@xmobitea/gn-server
Version:
GearN Server by XmobiTea (Pro)
49 lines (48 loc) • 2.49 kB
TypeScript
import { InvalidMember } from "./../InvalidMember";
import { OperationResponse } from "./../operationResponse/OperationResponse";
import { OperationRequest } from "./../operationRequest/OperationRequest";
import { OperationEvent } from "./../operationEvent/OperationEvent";
import { Request } from "./../operationRequest/base/Request";
import { GNHashtable } from "./../../common/GNData";
export declare class OperationHelper {
private static invalidMemberData;
static toResponseSocketData(operationResponse: OperationResponse): [number, any, number];
static toResponseHttpData(operationResponse: OperationResponse): [number, any];
static toDataGNHashtable(gnHashtable: GNHashtable): {};
static toDataOperationResponse(operationResponse: OperationResponse): {
operationCode: string;
encrypted: boolean;
responseId: number;
parameters: {};
debugMessage: string;
returnCode: string;
};
static toDataOperationRequest(operationRequest: OperationRequest): {
operationCode: string;
encrypted: boolean;
requestId: number;
parameters: {};
};
static toDataFromRequest(request: Request): {
code: string;
type: string;
role: string;
ip: string;
secretInfo: {
role: string;
gameId: string;
};
authInfo: {
userId: string;
};
};
private static toDataSecretInfo;
private static toAuthInfo;
static newOperationResponse(operationCode: number, responseId: number, encrypted: boolean): OperationResponse;
static newOperationResponseInvalid(operationCode: number, responseId: number, encrypted: boolean, debugMessage?: string): OperationResponse;
static newOperationResponseInvalidRequestParameters(operationCode: number, responseId: number, invalidMembers: InvalidMember[], encrypted: boolean, debugMessage?: string): OperationResponse;
static newOperationResponseInternalServerError(operationCode: number, responseId: number, encrypted: boolean, debugMessage?: string): OperationResponse;
static newOperationResponseNotAuthorized(operationCode: number, responseId: number, encrypted: boolean, debugMessage?: string): OperationResponse;
static newOperationNotAllowError(operationCode: number, responseId: number, encrypted: boolean, debugMessage?: string): OperationResponse;
static toEventSocketData(operationEvent: OperationEvent): [number, {}];
}