mirror of
https://github.com/linuxserver/core.git
synced 2026-02-20 05:07:19 +08:00
255 lines
7.9 KiB
Plaintext
255 lines
7.9 KiB
Plaintext
{
|
|
"require": "fn(module: string) -> ?",
|
|
"phantom": "Phantom",
|
|
"Phantom": {
|
|
"args": "[string]",
|
|
"cookies": "[Cookie]",
|
|
"cookiesEnabled": "bool",
|
|
"libraryPath": "string",
|
|
"scriptName": "string",
|
|
"version": {
|
|
"major": "number",
|
|
"minor": "number",
|
|
"patch": "number"
|
|
},
|
|
"addCookie": "fn(cookie: Cookie) -> bool",
|
|
"clearCookies": "fn()",
|
|
"deleteCookie": "fn(cookieName: string) -> bool",
|
|
"exit": "fn(returnValue?: ?) -> bool",
|
|
"injectJs": "fn(filename: string) -> bool",
|
|
"onError": "fn(msg: string, trace: [string])"
|
|
},
|
|
"System": {
|
|
"pid": "number",
|
|
"platform": "string",
|
|
"os": {
|
|
"architecture": "string",
|
|
"name": "string",
|
|
"version": "string"
|
|
},
|
|
"env": {},
|
|
"args": "[string]"
|
|
},
|
|
"WebPage": {
|
|
"canGoBack": "bool",
|
|
"canGoForward": "bool",
|
|
"clipRect": "ClipRect",
|
|
"content": "string",
|
|
"cookies": "[Cookie]",
|
|
"customHeaders": {},
|
|
"event": "?",
|
|
"focusedFrameName": "string",
|
|
"frameContent": "string",
|
|
"frameName": "string",
|
|
"framePlainText": "string",
|
|
"frameTitle": "string",
|
|
"frameUrl": "string",
|
|
"framesCount": "number",
|
|
"framesName": "?",
|
|
"libraryPath": "string",
|
|
"navigationLocked": "bool",
|
|
"offlineStoragePath": "string",
|
|
"offlineStorageQuota": "number",
|
|
"ownsPages": "bool",
|
|
"pages": "[WebPage]",
|
|
"pagesWindowName": "string",
|
|
"paperSize": "PaperSize",
|
|
"plainText": "string",
|
|
"scrollPosition": "TopLeft",
|
|
"settings": "WebPageSettings",
|
|
"title": "string",
|
|
"url": "string",
|
|
"viewportSize": "Size",
|
|
"windowName": "string",
|
|
"zoomFactor": "number",
|
|
"addCookie": "fn(cookie: Cookie) -> bool",
|
|
"childFramesCount": "fn() -> number",
|
|
"childFramesName": "fn() -> string",
|
|
"clearCookies": "fn()",
|
|
"close": "fn()",
|
|
"currentFrameName": "fn() -> string",
|
|
"deleteCookie": "fn(cookieName: string) -> bool",
|
|
"evaluate": "fn(fn: Function, args: [?]) -> ?",
|
|
"evaluateAsync": "fn(fn: Function)",
|
|
"evaluateJavascript": "fn(str: string) -> ?",
|
|
"getPage": "fn(windowName: string) -> WebPage",
|
|
"go": "fn(index: number)",
|
|
"goBack": "fn()",
|
|
"goForward": "fn()",
|
|
"includeJs": "fn(url: string, callback: Function)",
|
|
"injectJs": "fn(filename: string) -> bool",
|
|
"open": "fn(url: string, callback: fn(status: string))",
|
|
"openUrl": "fn(url: string, httpConf: ?, settings: ?)",
|
|
"release": "fn()",
|
|
"reload": "fn()",
|
|
"render": "fn(filename: string)",
|
|
"renderBase64": "fn(format: string) -> string",
|
|
"sendEvent": "fn(mouseEventType: string, mouseX?: number, mouseY?: number, button?: string)",
|
|
"setContent": "fn(content: string, url: string)",
|
|
"stop": "fn()",
|
|
"switchToFocusedFrame": "fn()",
|
|
"switchToFrame": "fn(frameName: string)",
|
|
"switchToChildFrame": "fn(frameName: string)",
|
|
"switchToMainFrame": "fn()",
|
|
"switchToParentFrame": "fn()",
|
|
"uploadFile": "fn(selector: string, filename: string)",
|
|
"onAlert": "fn(msg: string)",
|
|
"onCallback": "Function",
|
|
"onClosing": "fn(closingPage: WebPage)",
|
|
"onConfirm": "fn(msg: string)",
|
|
"onConsoleMessage": "fn(msg: string, lineNum?: number, sourceId?: string)",
|
|
"onError": "fn(msg: string, trace: [string])",
|
|
"onFilePicker": "fn(oldFile: string)",
|
|
"onInitialized": "fn()",
|
|
"onLoadFinished": "fn(status: string)",
|
|
"onLoadStarted": "fn()",
|
|
"onNavigationRequested": "fn(url: string, type: string, willNavigate: bool, main: bool)",
|
|
"onPageCreated": "fn(newPage: WebPage)",
|
|
"onPrompt": "fn(msg: string, defaultVal: string)",
|
|
"onResourceError": "fn(resourceError: ResourceError)",
|
|
"onResourceReceived": "fn(response: ResourceResponse)",
|
|
"onResourceRequested": "fn(requestData: ResourceRequest, networkRequest: NetworkRequest)",
|
|
"onUrlChanged": "fn(targetUrl: string)",
|
|
"closing": "fn(closingPage: WebPage)",
|
|
"initialized": "fn()",
|
|
"javaScriptAlertSent": "fn(msg: string)",
|
|
"javaScriptConsoleMessageSent": "fn(msg: string, lineNum?: number, sourceId?: string)",
|
|
"loadFinished": "fn(status: string)",
|
|
"loadStarted": "fn()",
|
|
"navigationRequested": "fn(url: string, type: string, willNavigate: bool, main: bool)",
|
|
"rawPageCreated": "fn(newPage: WebPage)",
|
|
"resourceReceived": "fn(response: ResourceResponse)",
|
|
"resourceRequested": "fn(requestData: ResourceRequest, networkRequest: NetworkRequest)",
|
|
"urlChanged": "fn(targetUrl: string)"
|
|
},
|
|
"ResourceError": {
|
|
"id": "number",
|
|
"url": "string",
|
|
"errorCode": "string",
|
|
"errorString": "string"
|
|
},
|
|
"ResourceResponse": {
|
|
"id": "number",
|
|
"url": "string",
|
|
"time": "Date",
|
|
"headers": {},
|
|
"bodySize": "number",
|
|
"contentType": "string",
|
|
"redirectURL": "string",
|
|
"stage": "string",
|
|
"status": "number",
|
|
"statusText": "string"
|
|
},
|
|
"ResourceRequest": {
|
|
"id": "number",
|
|
"method": "string",
|
|
"url": "string",
|
|
"time": "Date",
|
|
"headers": {}
|
|
},
|
|
"NetworkRequest": {
|
|
"abort": "fn()",
|
|
"changeUrl": "fn(url: string)",
|
|
"setHeader": "fn(name: string, value: string)"
|
|
},
|
|
"PaperSize": {
|
|
"width": "string",
|
|
"height": "string",
|
|
"border": "string",
|
|
"format": "string",
|
|
"orientation": "string"
|
|
},
|
|
"WebPageSettings": {
|
|
"javascriptEnabled": "bool",
|
|
"loadImages": "bool",
|
|
"localToRemoteUrlAccessEnabled": "bool",
|
|
"userAgent": "string",
|
|
"userName": "string",
|
|
"password": "string",
|
|
"XSSAuditingEnabled": "bool",
|
|
"webSecurityEnabled": "bool",
|
|
"resourceTimeout": "number"
|
|
},
|
|
"FileSystem": {
|
|
"separator": "string",
|
|
"workingDirectory": "string",
|
|
"list": "fn(path: string) -> [string]",
|
|
"absolute": "fn(path: string) -> string",
|
|
"exists": "fn(path: string) -> bool",
|
|
"isDirectory": "fn(path: string) -> bool",
|
|
"isFile": "fn(path: string) -> bool",
|
|
"isAbsolute": "fn(path: string) -> bool",
|
|
"isExecutable": "fn(path: string) -> bool",
|
|
"isReadable": "fn(path: string) -> bool",
|
|
"isWritable": "fn(path: string) -> bool",
|
|
"isLink": "fn(path: string) -> bool",
|
|
"readLink": "fn(path: string) -> string",
|
|
"changeWorkingDirectory": "fn(path: string)",
|
|
"makeDirectory": "fn(path: string)",
|
|
"makeTree": "fn(path: string)",
|
|
"removeDirectory": "fn(path: string)",
|
|
"removeTree": "fn(path: string)",
|
|
"copyTree": "fn(source: string, destination: string)",
|
|
"open": "fn(path: string, mode: string) -> Stream",
|
|
"read": "fn(path: string) -> string",
|
|
"write": "fn(path: string, content: string, mode: string)",
|
|
"size": "fn(path: string) -> number",
|
|
"remove": "fn(path: string)",
|
|
"copy": "fn(source: string, destination: string)",
|
|
"move": "fn(source: string, destination: string)",
|
|
"touch": "fn(path: string)"
|
|
},
|
|
"Stream": {
|
|
"atEnd": "fn() -> bool",
|
|
"close": "fn()",
|
|
"flush": "fn()",
|
|
"read": "fn() -> string",
|
|
"readLine": "fn() -> string",
|
|
"seek": "fn(position: number)",
|
|
"write": "fn(data: string)",
|
|
"writeLine": "fn(data: string)"
|
|
},
|
|
"WebServer": {
|
|
"port": "number",
|
|
"listen": "fn(port: number, cb?: fn(request: WebServerRequest, response: WebServerResponse)) -> bool",
|
|
"close": "fn()"
|
|
},
|
|
"WebServerRequest": {
|
|
"method": "string",
|
|
"url": "string",
|
|
"httpVersion": "number",
|
|
"headers": {},
|
|
"post": "string",
|
|
"postRaw": "string"
|
|
},
|
|
"WebServerResponse": {
|
|
"headers": {},
|
|
"setHeader": "fn(name: string, value: string)",
|
|
"header": "fn(name: string) -> string",
|
|
"statusCode": "number",
|
|
"setEncoding": "fn(encoding: string)",
|
|
"write": "fn(data: string)",
|
|
"writeHead": "fn(statusCode: number, headers?: ?)",
|
|
"close": "fn()",
|
|
"closeGracefully": "fn()"
|
|
},
|
|
"TopLeft": {
|
|
"top": "number",
|
|
"left": "number"
|
|
},
|
|
"Size": {
|
|
"width": "number",
|
|
"height": "number"
|
|
},
|
|
"ClipRect": {},
|
|
"Cookie": {
|
|
"name": "string",
|
|
"value": "string",
|
|
"domain": "string"
|
|
},
|
|
"webpage": {
|
|
"create": "fn() -> WebPage"
|
|
},
|
|
"!name": "phantomjs.d.ts"
|
|
}
|