UNPKG

guacamole-client-typedefs

Version:

Work in progress typescript definitions based on http://guacamole.apache.org/doc/guacamole-common-js/

107 lines (105 loc) 3.02 kB
declare module 'guacamole-client' { export namespace Status { export type Code = typeof Code[keyof typeof Code]; export const Code: Readonly<{ SUCCESS: 0x0000; /** * The requested operation is unsupported. */ UNSUPPORTED: 0x0100; /** * The operation could not be performed due to an internal failure. */ SERVER_ERROR: 0x0200; /** * The operation could not be performed as the server is busy. */ SERVER_BUSY: 0x0201; /** * The operation could not be performed because the upstream server is not * responding. */ UPSTREAM_TIMEOUT: 0x0202; /** * The operation was unsuccessful due to an error or otherwise unexpected * condition of the upstream server. */ UPSTREAM_ERROR: 0x0203; /** * The operation could not be performed as the requested resource does not * exist. */ RESOURCE_NOT_FOUND: 0x0204; /** * The operation could not be performed as the requested resource is * already in use. */ RESOURCE_CONFLICT: 0x0205; /** * The operation could not be performed as the requested resource is now * closed. */ RESOURCE_CLOSED: 0x0206; /** * The operation could not be performed because the upstream server does * not appear to exist. */ UPSTREAM_NOT_FOUND: 0x0207; /** * The operation could not be performed because the upstream server is not * available to service the request. */ UPSTREAM_UNAVAILABLE: 0x0208; /** * The session within the upstream server has ended because it conflicted * with another session. */ SESSION_CONFLICT: 0x0209; /** * The session within the upstream server has ended because it appeared to * be inactive. */ SESSION_TIMEOUT: 0x020a; /** * The session within the upstream server has been forcibly terminated. */ SESSION_CLOSED: 0x020b; /** * The operation could not be performed because bad parameters were given. */ CLIENT_BAD_REQUEST: 0x0300; /** * Permission was denied to perform the operation, as the user is not yet * authorized (not yet logged in, for example). */ CLIENT_UNAUTHORIZED: 0x0301; /** * Permission was denied to perform the operation, and this permission will * not be granted even if the user is authorized. */ CLIENT_FORBIDDEN: 0x0303; /** * The client took too long to respond. */ CLIENT_TIMEOUT: 0x0308; /** * The client sent too much data. */ CLIENT_OVERRUN: 0x030d; /** * The client sent data of an unsupported or unexpected type. */ CLIENT_BAD_TYPE: 0x030f; /** * The operation failed because the current client is already using too * many resources. */ CLIENT_TOO_MANY: 0x031d; }>; } export class Status { constructor(code: Status.Code, message?: string); readonly code: Status.Code; readonly message?: string; } }