// Generated by dts-bundle-generator v5.9.0 /// export interface ITransportEventMap { onopen?: ((ev: any) => any) | null; onmessage?: ((ev: any) => any) | null; onclose?: ((ev: any) => any) | null; onerror?: ((ev: any) => any) | null; } export interface ITransport { send(data: ArrayBuffer | Array | any): void; connect(url: string): void; close(code?: number, reason?: string): void; } declare class Connection implements ITransport { transport: ITransport; events: ITransportEventMap; constructor(); send(data: ArrayBuffer | Array): void; connect(url: string): void; close(code?: number, reason?: string): void; } export interface Serializer { setState(data: any): void; getState(): State; patch(data: any): void; teardown(): void; handshake?(bytes: number[], it?: any): void; } export declare function registerSerializer(id: string, serializer: any): void; export declare type FunctionParameters any> = T extends (...args: infer P) => any ? P : never; declare class EventEmitter any> { handlers: Array; register(cb: CallbackSignature, once?: boolean): this; invoke(...args: FunctionParameters): void; invokeAsync(...args: FunctionParameters): Promise; remove(cb: CallbackSignature): void; clear(): void; } declare enum OPERATION { ADD = 128, REPLACE = 0, DELETE = 64, DELETE_AND_ADD = 192, TOUCH = 1, CLEAR = 10 } /** * Data types */ export declare type PrimitiveType = "string" | "number" | "boolean" | "int8" | "uint8" | "int16" | "uint16" | "int32" | "uint32" | "int64" | "uint64" | "float32" | "float64" | typeof Schema; export declare type DefinitionType = PrimitiveType | PrimitiveType[] | { array: PrimitiveType; } | { map: PrimitiveType; } | { collection: PrimitiveType; } | { set: PrimitiveType; }; export declare type Definition = { [field: string]: DefinitionType; }; export declare type FilterCallback = (((this: T, client: ClientWithSessionId, value: V) => boolean) | ((this: T, client: ClientWithSessionId, value: V, root: R) => boolean)); export declare type FilterChildrenCallback = (((this: T, client: ClientWithSessionId, key: K, value: V) => boolean) | ((this: T, client: ClientWithSessionId, key: K, value: V, root: R) => boolean)); declare class SchemaDefinition { schema: Definition; indexes: { [field: string]: number; }; fieldsByIndex: { [index: number]: string; }; filters: { [field: string]: FilterCallback; }; indexesWithFilters: number[]; childFilters: { [field: string]: FilterChildrenCallback; }; deprecated: { [field: string]: boolean; }; descriptors: PropertyDescriptorMap & ThisType; static create(parent?: SchemaDefinition): SchemaDefinition; addField(field: string, type: DefinitionType): void; addFilter(field: string, cb: FilterCallback): boolean; addChildrenFilter(field: string, cb: FilterChildrenCallback): boolean; getChildrenFilter(field: string): FilterChildrenCallback; getNextFieldIndex(): number; } export declare type ClientWithSessionId = { sessionId: string; } & any; declare class Context { types: { [id: number]: typeof Schema; }; schemas: Map; useFilters: boolean; has(schema: typeof Schema): boolean; get(typeid: number): typeof Schema; add(schema: typeof Schema, typeid?: number): void; static create(context?: Context): (definition: DefinitionType) => PropertyDecorator; } /** * Copyright (c) 2018 Endel Dreyer * Copyright (c) 2014 Ion Drive Software Ltd. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE */ /** * msgpack implementation highly based on notepack.io * https://github.com/darrachequesne/notepack */ export interface Iterator { offset: number; } declare class MapSchema implements Map, SchemaDecoderCallbacks { protected $changes: ChangeTree; protected $items: Map; protected $indexes: Map; protected $refId: number; onAdd?: (item: V, key: K) => void; onRemove?: (item: V, key: K) => void; onChange?: (item: V, key: K) => void; static is(type: any): boolean; constructor(initialValues?: Map | Record); /** Iterator */ [Symbol.iterator](): IterableIterator<[ K, V ]>; get [Symbol.toStringTag](): string; set(key: K, value: V): this; get(key: K): V | undefined; delete(key: K): boolean; clear(isDecoding?: boolean): void; has(key: K): boolean; forEach(callbackfn: (value: V, key: K, map: Map) => void): void; entries(): IterableIterator<[ K, V ]>; keys(): IterableIterator; values(): IterableIterator; get size(): number; protected setIndex(index: number, key: K): void; protected getIndex(index: number): K; protected getByIndex(index: number): V; protected deleteByIndex(index: number): void; toJSON(): any; clone(isDecoding?: boolean): MapSchema; triggerAll(): void; } declare class ArraySchema implements Array, SchemaDecoderCallbacks { protected $changes: ChangeTree; protected $items: Map; protected $indexes: Map; protected $refId: number; [n: number]: V; onAdd?: (item: V, key: number) => void; onRemove?: (item: V, key: number) => void; onChange?: (item: V, key: number) => void; static is(type: any): boolean; constructor(...items: V[]); set length(value: number); get length(): number; push(...values: V[]): number; /** * Removes the last element from an array and returns it. */ pop(): V | undefined; at(index: number): V; setAt(index: number, value: V): void; deleteAt(index: number): boolean; protected $deleteAt(index: any): boolean; clear(isDecoding?: boolean): void; /** * Combines two or more arrays. * @param items Additional items to add to the end of array1. */ concat(...items: (V | ConcatArray)[]): ArraySchema; /** * Adds all the elements of an array separated by the specified separator string. * @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma. */ join(separator?: string): string; /** * Reverses the elements in an Array. */ reverse(): ArraySchema; /** * Removes the first element from an array and returns it. */ shift(): V | undefined; /** * Returns a section of an array. * @param start The beginning of the specified portion of the array. * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. */ slice(start?: number, end?: number): V[]; /** * Sorts an array. * @param compareFn Function used to determine the order of the elements. It is expected to return * a negative value if first argument is less than second argument, zero if they're equal and a positive * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. * ```ts * [11,2,22,1].sort((a, b) => a - b) * ``` */ sort(compareFn?: (a: V, b: V) => number): this; /** * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements. * @param start The zero-based location in the array from which to start removing elements. * @param deleteCount The number of elements to remove. * @param items Elements to insert into the array in place of the deleted elements. */ splice(start: number, deleteCount?: number, ...items: V[]): V[]; /** * Inserts new elements at the start of an array. * @param items Elements to insert at the start of the Array. */ unshift(...items: V[]): number; /** * Returns the index of the first occurrence of a value in an array. * @param searchElement The value to locate in the array. * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0. */ indexOf(searchElement: V, fromIndex?: number): number; /** * Returns the index of the last occurrence of a specified value in an array. * @param searchElement The value to locate in the array. * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array. */ lastIndexOf(searchElement: V, fromIndex?: number): number; /** * Determines whether all the members of an array satisfy the specified test. * @param callbackfn A function that accepts up to three arguments. The every method calls * the callbackfn function for each element in the array until the callbackfn returns a value * which is coercible to the Boolean value false, or until the end of the array. * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ every(callbackfn: (value: V, index: number, array: V[]) => unknown, thisArg?: any): boolean; /** * Determines whether the specified callback function returns true for any element of an array. * @param callbackfn A function that accepts up to three arguments. The some method calls * the callbackfn function for each element in the array until the callbackfn returns a value * which is coercible to the Boolean value true, or until the end of the array. * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ some(callbackfn: (value: V, index: number, array: V[]) => unknown, thisArg?: any): boolean; /** * Performs the specified action for each element in an array. * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. */ forEach(callbackfn: (value: V, index: number, array: V[]) => void, thisArg?: any): void; /** * Calls a defined callback function on each element of an array, and returns an array that contains the results. * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. */ map(callbackfn: (value: V, index: number, array: V[]) => U, thisArg?: any): U[]; /** * Returns the elements of an array that meet the condition specified in a callback function. * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array. * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. */ filter(callbackfn: (value: V, index: number, array: V[]) => unknown, thisArg?: any): any; /** * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. */ reduce(callbackfn: (previousValue: U, currentValue: V, currentIndex: number, array: V[]) => U, initialValue?: U): U; /** * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. */ reduceRight(callbackfn: (previousValue: U, currentValue: V, currentIndex: number, array: V[]) => U, initialValue?: U): U; /** * Returns the value of the first element in the array where predicate is true, and undefined * otherwise. * @param predicate find calls predicate once for each element of the array, in ascending * order, until it finds one where predicate returns true. If such an element is found, find * immediately returns that element value. Otherwise, find returns undefined. * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ find(predicate: (value: V, index: number, obj: V[]) => boolean, thisArg?: any): V | undefined; /** * Returns the index of the first element in the array where predicate is true, and -1 * otherwise. * @param predicate find calls predicate once for each element of the array, in ascending * order, until it finds one where predicate returns true. If such an element is found, * findIndex immediately returns that element index. Otherwise, findIndex returns -1. * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ findIndex(predicate: (value: V, index: number, obj: V[]) => unknown, thisArg?: any): number; /** * Returns the this object after filling the section identified by start and end with value * @param value value to fill array section with * @param start index to start filling the array at. If start is negative, it is treated as * length+start where length is the length of the array. * @param end index to stop filling the array at. If end is negative, it is treated as * length+end. */ fill(value: V, start?: number, end?: number): this; /** * Returns the this object after copying a section of the array identified by start and end * to the same array starting at position target * @param target If target is negative, it is treated as length+target where length is the * length of the array. * @param start If start is negative, it is treated as length+start. If end is negative, it * is treated as length+end. * @param end If not specified, length of the this object is used as its default value. */ copyWithin(target: number, start: number, end?: number): this; /** * Returns a string representation of an array. */ toString(): string; /** * Returns a string representation of an array. The elements are converted to string using their toLocalString methods. */ toLocaleString(): string; /** Iterator */ [Symbol.iterator](): IterableIterator; [Symbol.unscopables](): any; /** * Returns an iterable of key, value pairs for every entry in the array */ entries(): IterableIterator<[ number, V ]>; /** * Returns an iterable of keys in the array */ keys(): IterableIterator; /** * Returns an iterable of values in the array */ values(): IterableIterator; /** * Determines whether an array includes a certain element, returning true or false as appropriate. * @param searchElement The element to search for. * @param fromIndex The position in this array at which to begin searching for searchElement. */ includes(searchElement: V, fromIndex?: number): boolean; /** * Calls a defined callback function on each element of an array. Then, flattens the result into * a new array. * This is identical to a map followed by flat with depth 1. * * @param callback A function that accepts up to three arguments. The flatMap method calls the * callback function one time for each element in the array. * @param thisArg An object to which the this keyword can refer in the callback function. If * thisArg is omitted, undefined is used as the this value. */ flatMap(callback: (this: This, value: V, index: number, array: V[]) => U | ReadonlyArray, thisArg?: This): U[]; /** * Returns a new array with all sub-array elements concatenated into it recursively up to the * specified depth. * * @param depth The maximum recursion depth */ flat(this: A, depth?: D): any; protected setIndex(index: number, key: number): void; protected getIndex(index: number): number; protected getByIndex(index: number): V; protected deleteByIndex(index: number): void; toArray(): V[]; toJSON(): any[]; clone(isDecoding?: boolean): ArraySchema; triggerAll(): void; } export declare type K = number; declare class CollectionSchema implements SchemaDecoderCallbacks { protected $changes: ChangeTree; protected $items: Map; protected $indexes: Map; protected $refId: number; onAdd?: (item: V, key: number) => void; onRemove?: (item: V, key: number) => void; onChange?: (item: V, key: number) => void; static is(type: any): boolean; constructor(initialValues?: Array); add(value: V): number; at(index: number): V | undefined; entries(): IterableIterator<[ number, V ]>; delete(item: V): boolean; clear(isDecoding?: boolean): void; has(value: V): boolean; forEach(callbackfn: (value: V, key: K, collection: CollectionSchema) => void): void; values(): IterableIterator; get size(): number; protected setIndex(index: number, key: number): void; protected getIndex(index: number): number; protected getByIndex(index: number): V; protected deleteByIndex(index: number): void; toArray(): V[]; toJSON(): V[]; clone(isDecoding?: boolean): CollectionSchema; triggerAll(): void; } declare class SetSchema implements SchemaDecoderCallbacks { protected $changes: ChangeTree; protected $items: Map; protected $indexes: Map; protected $refId: number; onAdd?: (item: V, key: number) => void; onRemove?: (item: V, key: number) => void; onChange?: (item: V, key: number) => void; static is(type: any): boolean; constructor(initialValues?: Array); add(value: V): number | false; entries(): IterableIterator<[ number, V ]>; delete(item: V): boolean; clear(isDecoding?: boolean): void; has(value: V): boolean; forEach(callbackfn: (value: V, key: number, collection: SetSchema) => void): void; values(): IterableIterator; get size(): number; protected setIndex(index: number, key: number): void; protected getIndex(index: number): number; protected getByIndex(index: number): V; protected deleteByIndex(index: number): void; toArray(): V[]; toJSON(): V[]; clone(isDecoding?: boolean): SetSchema; triggerAll(): void; } export declare type Ref = Schema | ArraySchema | MapSchema | CollectionSchema | SetSchema; export interface ChangeOperation { op: OPERATION; index: number; } declare class Root { refs: Map; refCounts: { [refId: number]: number; }; deletedRefs: Set; protected nextUniqueId: number; getNextUniqueId(): number; addRef(refId: number, ref: Ref, incrementCount?: boolean): void; removeRef(refId: any): void; clearRefs(): void; garbageCollectDeletedRefs(): void; } declare class ChangeTree { ref: Ref; refId: number; root?: Root; parent?: Ref; parentIndex?: number; indexes: { [index: string]: any; }; changed: boolean; changes: Map; allChanges: Set; caches: { [field: number]: number[]; }; currentCustomOperation: number; constructor(ref: Ref, parent?: Ref, root?: Root); setParent(parent: Ref, root?: Root, parentIndex?: number): void; operation(op: ChangeOperation): void; change(fieldName: string | number, operation?: OPERATION): void; touch(fieldName: string | number): void; touchParents(): void; getType(index?: number): any; getChildrenFilter(): FilterChildrenCallback; getValue(index: number): any; delete(fieldName: string | number): void; discard(changed?: boolean, discardAll?: boolean): void; /** * Recursively discard all changes from this, and child structures. */ discardAll(): void; cache(field: number, cachedBytes: number[]): void; clone(): ChangeTree; ensureRefId(): void; protected assertValidIndex(index: number, fieldName: string | number): void; } export declare type NonFunctionPropNames = { [K in keyof T]: T[K] extends Function ? never : K; }[keyof T]; /** * Extracted from https://www.npmjs.com/package/strong-events */ export declare type ExtractFunctionParameters any> = T extends (...args: infer P) => any ? P : never; declare class EventEmitter_ any> { handlers: Array; register(cb: CallbackSignature, once?: boolean): this; invoke(...args: ExtractFunctionParameters): void; invokeAsync(...args: ExtractFunctionParameters): Promise; remove(cb: CallbackSignature): void; clear(): void; } export interface DataChange { op: OPERATION; field: string; dynamicIndex?: number | string; value: T; previousValue: T; } export interface SchemaDecoderCallbacks { onAdd?: (item: any, key: any) => void; onRemove?: (item: any, key: any) => void; onChange?: (item: any, key: any) => void; clone(decoding?: boolean): SchemaDecoderCallbacks; clear(decoding?: boolean): any; decode?(byte: any, it: Iterator): any; } declare abstract class Schema { static _typeid: number; static _context: Context; static _definition: SchemaDefinition; static onError(e: any): void; static is(type: DefinitionType): boolean; protected $changes: ChangeTree; protected $listeners: { [field: string]: EventEmitter_<(a: any, b: any) => void>; }; onChange?(changes: DataChange[]): any; onRemove?(): any; constructor(...args: any[]); assign(props: { [prop in NonFunctionPropNames]?: this[prop]; }): this; protected get _definition(): SchemaDefinition; listen>(attr: K, callback: (value: this[K], previousValue: this[K]) => void): () => void; decode(bytes: number[], it?: Iterator, ref?: Ref, allChanges?: Map): Map[]>; encode(encodeAll?: boolean, bytes?: number[], useFilters?: boolean): number[]; encodeAll(useFilters?: boolean): number[]; applyFilters(client: ClientWithSessionId, encodeAll?: boolean): number[]; clone(): this; triggerAll(): void; toJSON(): {}; discardAllChanges(): void; protected getByIndex(index: number): any; protected deleteByIndex(index: number): void; private tryEncodeTypeId; private getSchemaType; private createTypeInstance; private _triggerAllFillChanges; private _triggerChanges; } export declare type SchemaConstructor = new (...args: any[]) => T; export declare class SchemaSerializer implements Serializer { state: T; setState(rawState: any): void; getState(): T; patch(patches: any): void; teardown(): void; handshake(bytes: number[], it?: Iterator): void; } export interface RoomAvailable { roomId: string; clients: number; maxClients: number; metadata?: Metadata; } export declare class Room { roomId: string; sessionId: string; name: string; connection: Connection; onStateChange: { once: (cb: (state: State) => void) => void; remove: (cb: (state: State) => void) => void; invoke: (state: State) => void; invokeAsync: (state: State) => Promise; clear: () => void; } & ((this: any, cb: (state: State) => void) => EventEmitter<(state: State) => void>); onError: { once: (cb: (code: number, message?: string) => void) => void; remove: (cb: (code: number, message?: string) => void) => void; invoke: (code: number, message?: string) => void; invokeAsync: (code: number, message?: string) => Promise; clear: () => void; } & ((this: any, cb: (code: number, message?: string) => void) => EventEmitter<(code: number, message?: string) => void>); onLeave: { once: (cb: (code: number) => void) => void; remove: (cb: (code: number) => void) => void; invoke: (code: number) => void; invokeAsync: (code: number) => Promise; clear: () => void; } & ((this: any, cb: (code: number) => void) => EventEmitter<(code: number) => void>); protected onJoin: { once: (cb: (...args: any[]) => void | Promise) => void; remove: (cb: (...args: any[]) => void | Promise) => void; invoke: (...args: any[]) => void; invokeAsync: (...args: any[]) => Promise; clear: () => void; } & ((this: any, cb: (...args: any[]) => void | Promise) => EventEmitter<(...args: any[]) => void | Promise>); serializerId: string; protected serializer: Serializer; protected hasJoined: boolean; protected rootSchema: SchemaConstructor; protected onMessageHandlers: { events: {}; emit(event: any, ...args: any[]): void; on(event: any, cb: any): () => any; }; constructor(name: string, rootSchema?: SchemaConstructor); get id(): string; connect(endpoint: string): void; leave(consented?: boolean): Promise; onMessage(type: "*", callback: (type: string | number | Schema, message: T) => void): any; onMessage any)>(type: T, callback: (message: InstanceType) => void): any; onMessage(type: string | number, callback: (message: T) => void): any; send(type: string | number, message?: any): void; get state(): State; removeAllListeners(): void; protected onMessageCallback(event: MessageEvent): void; protected setState(encodedState: number[]): void; protected patch(binaryPatch: number[]): void; private dispatchMessage; private destroy; private getMessageHandlerKey; } export declare enum Platform { ios = "ios", android = "android" } export interface Device { id: string; platform: Platform; } export interface IStatus { status: boolean; } export interface IUser { _id: string; username: string; displayName: string; avatarUrl: string; isAnonymous: boolean; email: string; lang: string; location: string; timezone: string; metadata: any; devices: Device[]; facebookId: string; twitterId: string; googleId: string; gameCenterId: string; steamId: string; friendIds: string[]; blockedUserIds: string[]; createdAt: Date; updatedAt: Date; } export declare class Auth implements IUser { _id: string; username: string; displayName: string; avatarUrl: string; isAnonymous: boolean; email: string; lang: string; location: string; timezone: string; metadata: any; devices: Device[]; facebookId: string; twitterId: string; googleId: string; gameCenterId: string; steamId: string; friendIds: string[]; blockedUserIds: string[]; createdAt: Date; updatedAt: Date; token: string; protected endpoint: string; protected keepOnlineInterval: any; constructor(endpoint: string); get hasToken(): boolean; login(options?: { accessToken?: string; deviceId?: string; platform?: string; email?: string; password?: string; }): Promise; save(): Promise; getFriends(): Promise; getOnlineFriends(): Promise; getFriendRequests(): Promise; sendFriendRequest(friendId: string): Promise; acceptFriendRequest(friendId: string): Promise; declineFriendRequest(friendId: string): Promise; blockUser(friendId: string): Promise; unblockUser(friendId: string): Promise; request(method: "get" | "post" | "put" | "del", segments: string, query?: { [key: string]: number | string; }, body?: any, headers?: { [key: string]: string; }): Promise; logout(): void; registerPingService(timeout?: number): void; unregisterPingService(): void; } export declare type JoinOptions = any; export declare class Client { protected endpoint: string; protected _auth: Auth; constructor(endpoint?: string); get auth(): Auth; joinOrCreate(roomName: string, options?: JoinOptions, rootSchema?: SchemaConstructor): Promise>; create(roomName: string, options?: JoinOptions, rootSchema?: SchemaConstructor): Promise>; join(roomName: string, options?: JoinOptions, rootSchema?: SchemaConstructor): Promise>; joinById(roomId: string, options?: JoinOptions, rootSchema?: SchemaConstructor): Promise>; reconnect(roomId: string, sessionId: string, rootSchema?: SchemaConstructor): Promise>; getAvailableRooms(roomName?: string): Promise[]>; consumeSeatReservation(response: any, rootSchema?: SchemaConstructor): Promise>; protected createMatchMakeRequest(method: string, roomName: string, options?: JoinOptions, rootSchema?: SchemaConstructor): Promise>; protected createRoom(roomName: string, rootSchema?: SchemaConstructor): Room; protected buildEndpoint(room: any, options?: any): string; } export declare enum Protocol { HANDSHAKE = 9, JOIN_ROOM = 10, ERROR = 11, LEAVE_ROOM = 12, ROOM_DATA = 13, ROOM_STATE = 14, ROOM_STATE_PATCH = 15, ROOM_DATA_SCHEMA = 16 } export declare enum ErrorCode { MATCHMAKE_NO_HANDLER = 4210, MATCHMAKE_INVALID_CRITERIA = 4211, MATCHMAKE_INVALID_ROOM_ID = 4212, MATCHMAKE_UNHANDLED = 4213, MATCHMAKE_EXPIRED = 4214, AUTH_FAILED = 4215, APPLICATION_ERROR = 4216 } export as namespace Colyseus; export {};