@xmobitea/gn-typescript-client 0.0.4 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/gn.js.client.min.js +2 -0
- package/dist/gn.js.client.min.js.LICENSE.txt +14 -0
- package/dist/index.d.ts +99 -9
- package/dist/index.js +1 -1
- package/dist/runtime/GNNetwork.d.ts +51 -10
- package/dist/runtime/common/Action0.d.ts +1 -3
- package/dist/runtime/common/Action1.d.ts +1 -3
- package/dist/runtime/common/Action2.d.ts +1 -3
- package/dist/runtime/common/Action3.d.ts +1 -3
- package/dist/runtime/common/Action4.d.ts +1 -3
- package/dist/runtime/common/GNData.d.ts +1 -1
- package/dist/runtime/constant/EventCode.d.ts +3 -0
- package/dist/runtime/constant/OperationCode.d.ts +15 -0
- package/dist/runtime/constant/errorCode/ChatErrorCode.d.ts +4 -0
- package/dist/runtime/constant/errorCode/FriendErrorCode.d.ts +4 -0
- package/dist/runtime/constant/parameterCode/ChatParameterCode.d.ts +22 -0
- package/dist/runtime/constant/parameterCode/FriendParameterCode.d.ts +12 -0
- package/dist/runtime/entity/DataMember.d.ts +76 -0
- package/dist/runtime/entity/GNMetadata.d.ts +21 -0
- package/dist/runtime/entity/request/AddFriendOperationRequest.d.ts +6 -0
- package/dist/runtime/entity/request/EditChatInfoChannelOperationRequest.d.ts +7 -0
- package/dist/runtime/entity/request/EditChatMessageChannelOperationRequest.d.ts +6 -0
- package/dist/runtime/entity/request/EditChatMessageUserOperationRequest.d.ts +6 -0
- package/dist/runtime/entity/request/FindPlayerOperationRequest.d.ts +6 -0
- package/dist/runtime/entity/request/GetChatInfoChannelOperationRequest.d.ts +6 -0
- package/dist/runtime/entity/request/GetChatMemberChannelOperationRequest.d.ts +6 -0
- package/dist/runtime/entity/request/GetChatMessageChannelOperationRequest.d.ts +6 -0
- package/dist/runtime/entity/request/GetChatMessageUserOperationRequest.d.ts +6 -0
- package/dist/runtime/entity/request/GetFriendsOperationRequest.d.ts +6 -0
- package/dist/runtime/entity/request/JoinChatChannelOperationRequest.d.ts +6 -0
- package/dist/runtime/entity/request/LeaveChatChannelOperationRequest.d.ts +6 -0
- package/dist/runtime/entity/request/RemoveFriendOperationRequest.d.ts +6 -0
- package/dist/runtime/entity/request/SendChatToChannelOperationRequest.d.ts +6 -0
- package/dist/runtime/entity/request/SendChatToUserOperationRequest.d.ts +6 -0
- package/dist/runtime/entity/response/AddFriendOperationResponse.d.ts +5 -0
- package/dist/runtime/entity/response/EditChatInfoChannelOperationResponse.d.ts +5 -0
- package/dist/runtime/entity/response/EditChatMessageChannelOperationResponse.d.ts +5 -0
- package/dist/runtime/entity/response/EditChatMessageUserOperationResponse.d.ts +5 -0
- package/dist/runtime/entity/response/FindPlayerOperationResponse.d.ts +6 -0
- package/dist/runtime/entity/response/GetChatInfoChannelOperationResponse.d.ts +18 -0
- package/dist/runtime/entity/response/GetChatMemberChannelOperationResponse.d.ts +14 -0
- package/dist/runtime/entity/response/GetChatMessageChannelOperationResponse.d.ts +20 -0
- package/dist/runtime/entity/response/GetChatMessageUserOperationResponse.d.ts +17 -0
- package/dist/runtime/entity/response/GetFriendsOperationResponse.d.ts +13 -0
- package/dist/runtime/entity/response/JoinChatChannelOperationResponse.d.ts +5 -0
- package/dist/runtime/entity/response/LeaveChatChannelOperationResponse.d.ts +5 -0
- package/dist/runtime/entity/response/RemoveFriendOperationResponse.d.ts +5 -0
- package/dist/runtime/entity/response/SendChatToChannelOperationResponse.d.ts +5 -0
- package/dist/runtime/entity/response/SendChatToUserOperationResponse.d.ts +5 -0
- package/dist/runtime/entity/server/AvatarChannel.d.ts +4 -0
- package/dist/runtime/entity/server/ChatChannel.d.ts +13 -0
- package/dist/runtime/entity/server/ChatMessage.d.ts +10 -0
- package/dist/runtime/entity/server/ChatUser.d.ts +5 -0
- package/dist/runtime/entity/server/FriendItem.d.ts +7 -0
- package/dist/runtime/entity/server/UserChannel.d.ts +4 -0
- package/dist/runtime/helper/ConverterService.d.ts +15 -0
- package/dist/runtime/networking/NetworkingPeer.d.ts +42 -0
- package/dist/runtime/networking/SocketPeer.d.ts +5 -1
- package/dist/runtime/networking/handler/OnChannelChatEventHandler.d.ts +6 -0
- package/dist/runtime/networking/handler/OnFriendUpdateEventHandler.d.ts +6 -0
- package/dist/runtime/networking/handler/OnUserChatEventHandler.d.ts +6 -0
- package/package.json +39 -37
|
@@ -18,11 +18,28 @@ import { PublicAddressGetRandomMessageOperationResponse } from "./entity/respons
|
|
|
18
18
|
import { RegisterAccountOperationResponse } from "./entity/response/RegisterAccountOperationResponse";
|
|
19
19
|
import { RegisterSocketOperationResponse } from "./entity/response/RegisterSocketOperationResponse";
|
|
20
20
|
import { TemplateOperationResponse } from "./entity/response/TemplateOperationResponse";
|
|
21
|
+
import { AddFriendOperationResponse } from "./entity/response/AddFriendOperationResponse";
|
|
22
|
+
import { RemoveFriendOperationResponse } from "./entity/response/RemoveFriendOperationResponse";
|
|
23
|
+
import { GetFriendsOperationResponse } from "./entity/response/GetFriendsOperationResponse";
|
|
24
|
+
import { FindPlayerOperationResponse } from "./entity/response/FindPlayerOperationResponse";
|
|
25
|
+
import { SendChatToUserOperationResponse } from "./entity/response/SendChatToUserOperationResponse";
|
|
26
|
+
import { GetChatMessageUserOperationResponse } from "./entity/response/GetChatMessageUserOperationResponse";
|
|
27
|
+
import { SendChatToChannelOperationResponse } from "./entity/response/SendChatToChannelOperationResponse";
|
|
28
|
+
import { JoinChatChannelOperationResponse } from "./entity/response/JoinChatChannelOperationResponse";
|
|
29
|
+
import { LeaveChatChannelOperationResponse } from "./entity/response/LeaveChatChannelOperationResponse";
|
|
30
|
+
import { GetChatInfoChannelOperationResponse } from "./entity/response/GetChatInfoChannelOperationResponse";
|
|
31
|
+
import { GetChatMessageChannelOperationResponse } from "./entity/response/GetChatMessageChannelOperationResponse";
|
|
32
|
+
import { GetChatMemberChannelOperationResponse } from "./entity/response/GetChatMemberChannelOperationResponse";
|
|
33
|
+
import { EditChatInfoChannelOperationResponse } from "./entity/response/EditChatInfoChannelOperationResponse";
|
|
34
|
+
import { EditChatMessageChannelOperationResponse } from "./entity/response/EditChatMessageChannelOperationResponse";
|
|
35
|
+
import { EditChatMessageUserOperationResponse } from "./entity/response/EditChatMessageUserOperationResponse";
|
|
21
36
|
import { IServerEventHandler } from "./networking/handler/IServerEventHandler";
|
|
22
37
|
import { HttpAppResponse } from "./networking/HttpPeer";
|
|
23
38
|
import { NetworkingPeer } from "./networking/NetworkingPeer";
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
39
|
+
import { OperationEvent } from "./entity/OperationEvent";
|
|
40
|
+
import { FriendItem } from "./entity/server/FriendItem";
|
|
41
|
+
import { ChatChannel } from "./entity/server/ChatChannel";
|
|
42
|
+
import { ChatUser } from "./entity/server/ChatUser";
|
|
26
43
|
export declare class GNNetwork {
|
|
27
44
|
private static readonly AUTH_TOKEN_KEY;
|
|
28
45
|
private static readonly USER_ID_KEY;
|
|
@@ -31,14 +48,26 @@ export declare class GNNetwork {
|
|
|
31
48
|
static getGNServerSettings(): GNServerSettings;
|
|
32
49
|
static peer: NetworkingPeer;
|
|
33
50
|
static getPing(): number;
|
|
51
|
+
static getSocketSId(): string;
|
|
52
|
+
static isSocketConnected(): boolean;
|
|
34
53
|
static getServerTimestamp(): number;
|
|
35
54
|
static setAuthToken(authToken: string): void;
|
|
36
55
|
static getAuthToken(): string;
|
|
37
56
|
static setUserId(userId: string): void;
|
|
38
57
|
static getUserId(): string;
|
|
39
58
|
static getPlatform(): number;
|
|
59
|
+
private static generateRandomDeviceId;
|
|
40
60
|
static getDeviceId(): string;
|
|
41
61
|
static getDeviceInfo(): string;
|
|
62
|
+
static getFriendItemLst(): FriendItem[];
|
|
63
|
+
static getOnFriendItemChange(): Action1<FriendItem>;
|
|
64
|
+
static subscriberOnFriendItemChange(onHandler: Action1<FriendItem>): void;
|
|
65
|
+
static getChatChannelLst(): ChatChannel[];
|
|
66
|
+
static getOnChatChannelChange(): Action1<ChatChannel>;
|
|
67
|
+
static subscriberOnChatChannelChange(onHandler: Action1<ChatChannel>): void;
|
|
68
|
+
static getChatUserLst(): ChatUser[];
|
|
69
|
+
static getOnChatUserChange(): Action1<ChatUser>;
|
|
70
|
+
static subscriberOnChatUserChange(onHandler: Action1<ChatUser>): void;
|
|
42
71
|
static init(gnServerSettings: GNServerSettings): void;
|
|
43
72
|
static getClientSdkVersion(): string;
|
|
44
73
|
private static initServerSettings;
|
|
@@ -46,16 +75,13 @@ export declare class GNNetwork {
|
|
|
46
75
|
private static initGNSocketObject;
|
|
47
76
|
static sendViaSocket(request: OperationRequest, onResponse?: Action1<OperationResponse>): void;
|
|
48
77
|
static sendViaHttp(request: OperationRequest, onResponse?: Action1<OperationResponse>): void;
|
|
49
|
-
static sendViaSocketTRequestTResponse<TRequest extends CustomOperationRequest, TResponse extends CustomOperationResponse>(request: TRequest, onResponse?: Action1<TResponse>): void;
|
|
50
|
-
static sendViaHttpTRequestTResponse<TRequest extends CustomOperationRequest, TResponse extends CustomOperationResponse>(request: TRequest, onResponse?: Action1<TResponse>): void;
|
|
51
|
-
static sendViaSocketTResponse<TResponse extends CustomOperationResponse>(request: OperationRequest, onResponse?: Action1<TResponse>): void;
|
|
52
|
-
static sendViaHttpTResponse<TResponse extends CustomOperationResponse>(request: OperationRequest, onResponse?: Action1<TResponse>): void;
|
|
53
78
|
static connectSocket(_onSocketConnect?: Action0): void;
|
|
54
79
|
static disconnectSocket(_onSocketDisconnect?: Action0): void;
|
|
55
|
-
static
|
|
56
|
-
static
|
|
57
|
-
static
|
|
58
|
-
static
|
|
80
|
+
static setOnEventHandler(_onEventHandler: Action1<OperationEvent>): void;
|
|
81
|
+
static subscriberOnConnectHandler(_onConnectHandler: Action0): void;
|
|
82
|
+
static subscriberOnDisconnectHandler(_onDisconnectHandler: Action0): void;
|
|
83
|
+
static unscriberOnConnectHandler(_onConnectHandler: Action0): void;
|
|
84
|
+
static unsubscriberOnDisconnectHandler(_onDisconnectHandler: Action0): void;
|
|
59
85
|
static subscriberServerEventHandler(serverEventHandler: IServerEventHandler): void;
|
|
60
86
|
static syncTs(onResponse?: Action1<number>): void;
|
|
61
87
|
static getConfig(configName: string, onResponse: Action1<string>): void;
|
|
@@ -81,4 +107,19 @@ export declare class GNNetwork {
|
|
|
81
107
|
static createNewFileUploadInfo(originFileName: string, onResponse?: Action1<CreateNewFileUploadInfoOperationResponse>): void;
|
|
82
108
|
static getFileUploadInfo(fileId: string, onResponse?: Action1<GetFileUploadInfoOperationResponse>): void;
|
|
83
109
|
static logout(onResponse?: Action1<LogoutOperationResponse>): void;
|
|
110
|
+
static addFriend(friendId: string, forceAcceptFriend?: boolean, onResponse?: Action1<AddFriendOperationResponse>): void;
|
|
111
|
+
static removeFriend(friendId: string, onResponse?: Action1<RemoveFriendOperationResponse>): void;
|
|
112
|
+
static getFriends(onResponse?: Action1<GetFriendsOperationResponse>): void;
|
|
113
|
+
static findPlayer(keyword: string, skip?: number, limit?: number, onResponse?: Action1<FindPlayerOperationResponse>): void;
|
|
114
|
+
static sendChatToUser(userId: string, message: string, saveToDatabase?: boolean, onResponse?: Action1<SendChatToUserOperationResponse>): void;
|
|
115
|
+
static getChatMessageUser(userId: string, skip?: number, limit?: number, onResponse?: Action1<GetChatMessageUserOperationResponse>): void;
|
|
116
|
+
static sendChatToChannel(channel: string, message: string, onResponse?: Action1<SendChatToChannelOperationResponse>): void;
|
|
117
|
+
static joinChatChannel(channel: string, onResponse?: Action1<JoinChatChannelOperationResponse>): void;
|
|
118
|
+
static leaveChatChannel(channel: string, onResponse?: Action1<LeaveChatChannelOperationResponse>): void;
|
|
119
|
+
static getChatInfoChannel(channel: string, onResponse?: Action1<GetChatInfoChannelOperationResponse>): void;
|
|
120
|
+
static getChatMessageChannel(channel: string, skip?: number, limit?: number, onResponse?: Action1<GetChatMessageChannelOperationResponse>): void;
|
|
121
|
+
static getChatMemberChannel(channel: string, onResponse?: Action1<GetChatMemberChannelOperationResponse>): void;
|
|
122
|
+
static editChatInfoChannel(channel: string, name?: string, avatarChannel?: GNHashtable, onResponse?: Action1<EditChatInfoChannelOperationResponse>): void;
|
|
123
|
+
static editChatMessageChannel(tsCreate: number, channel: string, message?: string, isDelete?: boolean, onResponse?: Action1<EditChatMessageChannelOperationResponse>): void;
|
|
124
|
+
static editChatMessageUser(tsCreate: number, userId: string, message?: string, isDelete?: boolean, onResponse?: Action1<EditChatMessageUserOperationResponse>): void;
|
|
84
125
|
}
|
|
@@ -10,7 +10,7 @@ interface IGNData {
|
|
|
10
10
|
getGNHashtable(k: string | number, def?: GNHashtable): GNHashtable;
|
|
11
11
|
getGNArray(k: string | number, def?: GNArray): GNArray;
|
|
12
12
|
}
|
|
13
|
-
declare abstract class GNData implements IGNData {
|
|
13
|
+
export declare abstract class GNData implements IGNData {
|
|
14
14
|
protected get<T>(k: string | number, def?: T): T;
|
|
15
15
|
abstract clear(): void;
|
|
16
16
|
abstract remove(k: string | number): boolean;
|
|
@@ -10,4 +10,19 @@ export declare class OperationCode {
|
|
|
10
10
|
static readonly CreateNewFileUploadInfo: number;
|
|
11
11
|
static readonly GetFileUploadInfo: number;
|
|
12
12
|
static readonly FetchSparkPlayer: number;
|
|
13
|
+
static readonly AddFriend: number;
|
|
14
|
+
static readonly RemoveFriend: number;
|
|
15
|
+
static readonly GetFriends: number;
|
|
16
|
+
static readonly FindPlayer: number;
|
|
17
|
+
static readonly SendChatToUser: number;
|
|
18
|
+
static readonly GetChatMessageUser: number;
|
|
19
|
+
static readonly SendChatToChannel: number;
|
|
20
|
+
static readonly JoinChatChannel: number;
|
|
21
|
+
static readonly LeaveChatChannel: number;
|
|
22
|
+
static readonly GetChatInfoChannel: number;
|
|
23
|
+
static readonly GetChatMessageChannel: number;
|
|
24
|
+
static readonly GetChatMemberChannel: number;
|
|
25
|
+
static readonly EditChatInfoChannel: number;
|
|
26
|
+
static readonly EditChatMessageChannel: number;
|
|
27
|
+
static readonly EditChatMessageUser: number;
|
|
13
28
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare class ChatParameterCode {
|
|
2
|
+
static readonly UserId: string;
|
|
3
|
+
static readonly Message: string;
|
|
4
|
+
static readonly TsCreate: string;
|
|
5
|
+
static readonly SaveToDatabase: string;
|
|
6
|
+
static readonly Channel: string;
|
|
7
|
+
static readonly ChatMessageLst: string;
|
|
8
|
+
static readonly Name: string;
|
|
9
|
+
static readonly Type: string;
|
|
10
|
+
static readonly AvatarChannel: string;
|
|
11
|
+
static readonly ChannelType: string;
|
|
12
|
+
static readonly UserCount: string;
|
|
13
|
+
static readonly ChannelInfo: string;
|
|
14
|
+
static readonly Value: string;
|
|
15
|
+
static readonly MessageEditeds: string;
|
|
16
|
+
static readonly IsDelete: string;
|
|
17
|
+
static readonly TsLastUpdate: string;
|
|
18
|
+
static readonly Skip: string;
|
|
19
|
+
static readonly Limit: string;
|
|
20
|
+
static readonly TsJoin: string;
|
|
21
|
+
static readonly Members: string;
|
|
22
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare class FriendParameterCode {
|
|
2
|
+
static readonly FriendId: string;
|
|
3
|
+
static readonly FriendStatus: string;
|
|
4
|
+
static readonly ForceAcceptFriend: string;
|
|
5
|
+
static readonly FriendLst: string;
|
|
6
|
+
static readonly TsLastUpdate: string;
|
|
7
|
+
static readonly IsSocialLoginFriend: string;
|
|
8
|
+
static readonly Keyword: string;
|
|
9
|
+
static readonly Skip: string;
|
|
10
|
+
static readonly Limit: string;
|
|
11
|
+
static readonly PlayerLst: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import "reflect-metadata";
|
|
2
|
+
import { GNArray, GNHashtable } from "./../common/GNData";
|
|
3
|
+
import { AbstractConstructor, Constructor, GNObjectFieldMetadata, GNObjectMetadata } from "./GNMetadata";
|
|
4
|
+
export declare const initGNObjectMetadata: <T extends GNObjectMetadata>(prototype: any) => T;
|
|
5
|
+
export declare const initGNObjectFieldMetadata: <T extends GNObjectFieldMetadata>(prototype: any, propertyKey: string) => T;
|
|
6
|
+
export declare const getGNObjectMetadata: <T extends GNObjectMetadata>(obj: AbstractConstructor<any>) => T;
|
|
7
|
+
export declare const setGNObjectMetadata: <T extends GNObjectMetadata>(obj: AbstractConstructor<any>, metadata: T) => void;
|
|
8
|
+
export declare const getTableName: (model: Constructor<any>) => string;
|
|
9
|
+
export interface GNEnhancedObjectFieldMetadata extends GNObjectFieldMetadata {
|
|
10
|
+
code: string;
|
|
11
|
+
isOptional: boolean;
|
|
12
|
+
gnFieldType: GNFieldDataType;
|
|
13
|
+
defaultValue: any;
|
|
14
|
+
activeConditionValid: boolean;
|
|
15
|
+
mustNonNull?: boolean;
|
|
16
|
+
minLength?: number;
|
|
17
|
+
maxLength?: number;
|
|
18
|
+
minValue?: number;
|
|
19
|
+
maxValue?: number;
|
|
20
|
+
mustInt?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export declare enum GNFieldDataType {
|
|
23
|
+
Other = 0,
|
|
24
|
+
Number = 1,
|
|
25
|
+
String = 2,
|
|
26
|
+
Boolean = 3,
|
|
27
|
+
GNHashtable = 4,
|
|
28
|
+
GNArray = 5
|
|
29
|
+
}
|
|
30
|
+
export interface GNEnhancedObjectMetadata extends GNObjectMetadata {
|
|
31
|
+
fields: GNEnhancedObjectFieldMetadata[];
|
|
32
|
+
}
|
|
33
|
+
interface DataMemberBaseArgs {
|
|
34
|
+
code: string;
|
|
35
|
+
isOptional?: boolean;
|
|
36
|
+
defaultValue?: any;
|
|
37
|
+
}
|
|
38
|
+
interface DataMemberArgs extends DataMemberBaseArgs {
|
|
39
|
+
gnFieldType?: GNFieldDataType;
|
|
40
|
+
}
|
|
41
|
+
interface OtherDataMemberArgs extends DataMemberBaseArgs {
|
|
42
|
+
}
|
|
43
|
+
interface StringDataMemberArgs extends OtherDataMemberArgs {
|
|
44
|
+
defaultValue?: string;
|
|
45
|
+
mustNonNull?: boolean;
|
|
46
|
+
minLength?: number;
|
|
47
|
+
maxLength?: number;
|
|
48
|
+
}
|
|
49
|
+
interface BooleanDataMemberArgs extends OtherDataMemberArgs {
|
|
50
|
+
defaultValue?: boolean;
|
|
51
|
+
}
|
|
52
|
+
interface NumberDataMemberArgs extends OtherDataMemberArgs {
|
|
53
|
+
defaultValue?: number;
|
|
54
|
+
minValue?: number;
|
|
55
|
+
maxValue?: number;
|
|
56
|
+
mustInt?: boolean;
|
|
57
|
+
}
|
|
58
|
+
interface GNHashtableDataMemberArgs extends OtherDataMemberArgs {
|
|
59
|
+
defaultValue?: GNHashtable;
|
|
60
|
+
mustNonNull?: boolean;
|
|
61
|
+
minLength?: number;
|
|
62
|
+
maxLength?: number;
|
|
63
|
+
}
|
|
64
|
+
interface GNArrayDataMemberArgs extends OtherDataMemberArgs {
|
|
65
|
+
defaultValue?: GNArray;
|
|
66
|
+
mustNonNull?: boolean;
|
|
67
|
+
minLength?: number;
|
|
68
|
+
maxLength?: number;
|
|
69
|
+
}
|
|
70
|
+
export declare const DataMember: (args: DataMemberArgs) => (prototype: any, propertyKey: string) => void;
|
|
71
|
+
export declare const StringDataMember: (args: StringDataMemberArgs) => (prototype: any, propertyKey: string) => void;
|
|
72
|
+
export declare const BooleanDataMember: (args: BooleanDataMemberArgs) => (prototype: any, propertyKey: string) => void;
|
|
73
|
+
export declare const GNHashtableDataMember: (args: GNHashtableDataMemberArgs) => (prototype: any, propertyKey: string) => void;
|
|
74
|
+
export declare const GNArrayDataMember: (args: GNArrayDataMemberArgs) => (prototype: any, propertyKey: string) => void;
|
|
75
|
+
export declare const NumberDataMember: (args: NumberDataMemberArgs) => (prototype: any, propertyKey: string) => void;
|
|
76
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type Constructor<T> = {
|
|
2
|
+
new (...args: any[]): T;
|
|
3
|
+
};
|
|
4
|
+
export type AbstractConstructor<T> = Function & {
|
|
5
|
+
prototype: T;
|
|
6
|
+
};
|
|
7
|
+
export declare enum FieldDataType {
|
|
8
|
+
Boolean = 0,
|
|
9
|
+
Number = 1,
|
|
10
|
+
String = 2,
|
|
11
|
+
Array = 3,
|
|
12
|
+
Object = 4
|
|
13
|
+
}
|
|
14
|
+
export interface GNObjectFieldMetadata {
|
|
15
|
+
name: string;
|
|
16
|
+
fieldType: FieldDataType;
|
|
17
|
+
}
|
|
18
|
+
export interface GNObjectMetadata {
|
|
19
|
+
id: string;
|
|
20
|
+
fields: GNObjectFieldMetadata[];
|
|
21
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CustomOperationRequest } from "./CustomOperationRequest";
|
|
2
|
+
export declare class AddFriendOperationRequest extends CustomOperationRequest {
|
|
3
|
+
protected operationCode: number;
|
|
4
|
+
protected operationEncrypted: boolean;
|
|
5
|
+
constructor(friendId: string, forceAcceptFriend?: boolean, timeout?: number);
|
|
6
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { GNHashtable } from "./../../common/GNData";
|
|
2
|
+
import { CustomOperationRequest } from "./CustomOperationRequest";
|
|
3
|
+
export declare class EditChatInfoChannelOperationRequest extends CustomOperationRequest {
|
|
4
|
+
protected operationCode: number;
|
|
5
|
+
protected operationEncrypted: boolean;
|
|
6
|
+
constructor(channel: string, name?: string, avatarChannel?: GNHashtable, channelType?: number, timeout?: number);
|
|
7
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CustomOperationRequest } from "./CustomOperationRequest";
|
|
2
|
+
export declare class EditChatMessageChannelOperationRequest extends CustomOperationRequest {
|
|
3
|
+
protected operationCode: number;
|
|
4
|
+
protected operationEncrypted: boolean;
|
|
5
|
+
constructor(tsCreate: number, channel: string, message?: string, isDelete?: boolean, timeout?: number);
|
|
6
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CustomOperationRequest } from "./CustomOperationRequest";
|
|
2
|
+
export declare class EditChatMessageUserOperationRequest extends CustomOperationRequest {
|
|
3
|
+
protected operationCode: number;
|
|
4
|
+
protected operationEncrypted: boolean;
|
|
5
|
+
constructor(tsCreate: number, userId: string, message?: string, isDelete?: boolean, timeout?: number);
|
|
6
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CustomOperationRequest } from "./CustomOperationRequest";
|
|
2
|
+
export declare class FindPlayerOperationRequest extends CustomOperationRequest {
|
|
3
|
+
protected operationCode: number;
|
|
4
|
+
protected operationEncrypted: boolean;
|
|
5
|
+
constructor(keyword: string, skip?: number, limit?: number, timeout?: number);
|
|
6
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CustomOperationRequest } from "./CustomOperationRequest";
|
|
2
|
+
export declare class GetChatInfoChannelOperationRequest extends CustomOperationRequest {
|
|
3
|
+
protected operationCode: number;
|
|
4
|
+
protected operationEncrypted: boolean;
|
|
5
|
+
constructor(channel: string, timeout?: number);
|
|
6
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CustomOperationRequest } from "./CustomOperationRequest";
|
|
2
|
+
export declare class GetChatMemberChannelOperationRequest extends CustomOperationRequest {
|
|
3
|
+
protected operationCode: number;
|
|
4
|
+
protected operationEncrypted: boolean;
|
|
5
|
+
constructor(channel: string, timeout?: number);
|
|
6
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CustomOperationRequest } from "./CustomOperationRequest";
|
|
2
|
+
export declare class GetChatMessageChannelOperationRequest extends CustomOperationRequest {
|
|
3
|
+
protected operationCode: number;
|
|
4
|
+
protected operationEncrypted: boolean;
|
|
5
|
+
constructor(channel: string, skip?: number, limit?: number, timeout?: number);
|
|
6
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CustomOperationRequest } from "./CustomOperationRequest";
|
|
2
|
+
export declare class GetChatMessageUserOperationRequest extends CustomOperationRequest {
|
|
3
|
+
protected operationCode: number;
|
|
4
|
+
protected operationEncrypted: boolean;
|
|
5
|
+
constructor(userId: string, skip?: number, limit?: number, timeout?: number);
|
|
6
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CustomOperationRequest } from "./CustomOperationRequest";
|
|
2
|
+
export declare class JoinChatChannelOperationRequest extends CustomOperationRequest {
|
|
3
|
+
protected operationCode: number;
|
|
4
|
+
protected operationEncrypted: boolean;
|
|
5
|
+
constructor(channel: string, timeout?: number);
|
|
6
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CustomOperationRequest } from "./CustomOperationRequest";
|
|
2
|
+
export declare class LeaveChatChannelOperationRequest extends CustomOperationRequest {
|
|
3
|
+
protected operationCode: number;
|
|
4
|
+
protected operationEncrypted: boolean;
|
|
5
|
+
constructor(channel: string, timeout?: number);
|
|
6
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CustomOperationRequest } from "./CustomOperationRequest";
|
|
2
|
+
export declare class RemoveFriendOperationRequest extends CustomOperationRequest {
|
|
3
|
+
protected operationCode: number;
|
|
4
|
+
protected operationEncrypted: boolean;
|
|
5
|
+
constructor(friendId: string, timeout?: number);
|
|
6
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CustomOperationRequest } from "./CustomOperationRequest";
|
|
2
|
+
export declare class SendChatToChannelOperationRequest extends CustomOperationRequest {
|
|
3
|
+
protected operationCode: number;
|
|
4
|
+
protected operationEncrypted: boolean;
|
|
5
|
+
constructor(channel: string, message: string, timeout?: number);
|
|
6
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CustomOperationRequest } from "./CustomOperationRequest";
|
|
2
|
+
export declare class SendChatToUserOperationRequest extends CustomOperationRequest {
|
|
3
|
+
protected operationCode: number;
|
|
4
|
+
protected operationEncrypted: boolean;
|
|
5
|
+
constructor(userId: string, message: string, saveToDatabase?: boolean, timeout?: number);
|
|
6
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { OperationResponse } from "./../OperationResponse";
|
|
2
|
+
import { CustomOperationResponse } from "./CustomOperationResponse";
|
|
3
|
+
export declare class AddFriendOperationResponse extends CustomOperationResponse {
|
|
4
|
+
setupOperationResponse(operationResponse: OperationResponse): void;
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { OperationResponse } from "./../OperationResponse";
|
|
2
|
+
import { CustomOperationResponse } from "./CustomOperationResponse";
|
|
3
|
+
export declare class EditChatInfoChannelOperationResponse extends CustomOperationResponse {
|
|
4
|
+
setupOperationResponse(operationResponse: OperationResponse): void;
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { OperationResponse } from "./../OperationResponse";
|
|
2
|
+
import { CustomOperationResponse } from "./CustomOperationResponse";
|
|
3
|
+
export declare class EditChatMessageChannelOperationResponse extends CustomOperationResponse {
|
|
4
|
+
setupOperationResponse(operationResponse: OperationResponse): void;
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { OperationResponse } from "./../OperationResponse";
|
|
2
|
+
import { CustomOperationResponse } from "./CustomOperationResponse";
|
|
3
|
+
export declare class EditChatMessageUserOperationResponse extends CustomOperationResponse {
|
|
4
|
+
setupOperationResponse(operationResponse: OperationResponse): void;
|
|
5
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { OperationResponse } from "./../OperationResponse";
|
|
2
|
+
import { CustomOperationResponse } from "./CustomOperationResponse";
|
|
3
|
+
export declare class FindPlayerOperationResponse extends CustomOperationResponse {
|
|
4
|
+
playerLst: string[];
|
|
5
|
+
setupOperationResponse(operationResponse: OperationResponse): void;
|
|
6
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { OperationResponse } from "./../OperationResponse";
|
|
2
|
+
import { CustomOperationResponse } from "./CustomOperationResponse";
|
|
3
|
+
declare class AvatarChannel {
|
|
4
|
+
type: number;
|
|
5
|
+
value: string;
|
|
6
|
+
}
|
|
7
|
+
declare class ChannelInfo {
|
|
8
|
+
name: string;
|
|
9
|
+
avatarChannel: AvatarChannel;
|
|
10
|
+
tsCreate: number;
|
|
11
|
+
channelType: number;
|
|
12
|
+
userCount: number;
|
|
13
|
+
}
|
|
14
|
+
export declare class GetChatInfoChannelOperationResponse extends CustomOperationResponse {
|
|
15
|
+
channelInfo: ChannelInfo;
|
|
16
|
+
setupOperationResponse(operationResponse: OperationResponse): void;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { OperationResponse } from "./../OperationResponse";
|
|
2
|
+
import { CustomOperationResponse } from "./CustomOperationResponse";
|
|
3
|
+
declare class UserChannel {
|
|
4
|
+
userId: string;
|
|
5
|
+
tsJoin: number;
|
|
6
|
+
}
|
|
7
|
+
declare class ChannelInfo {
|
|
8
|
+
members: UserChannel[];
|
|
9
|
+
}
|
|
10
|
+
export declare class GetChatMemberChannelOperationResponse extends CustomOperationResponse {
|
|
11
|
+
channelInfo: ChannelInfo;
|
|
12
|
+
setupOperationResponse(operationResponse: OperationResponse): void;
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { OperationResponse } from "./../OperationResponse";
|
|
2
|
+
import { CustomOperationResponse } from "./CustomOperationResponse";
|
|
3
|
+
declare class EditChatMessage {
|
|
4
|
+
message: string;
|
|
5
|
+
tsCreate: number;
|
|
6
|
+
}
|
|
7
|
+
declare class ChatMessage extends EditChatMessage {
|
|
8
|
+
tsLastUpdate: number;
|
|
9
|
+
messageEditeds: EditChatMessage[];
|
|
10
|
+
senderId: string;
|
|
11
|
+
isDelete: boolean;
|
|
12
|
+
}
|
|
13
|
+
declare class ChannelInfo {
|
|
14
|
+
messages: ChatMessage[];
|
|
15
|
+
}
|
|
16
|
+
export declare class GetChatMessageChannelOperationResponse extends CustomOperationResponse {
|
|
17
|
+
channelInfo: ChannelInfo;
|
|
18
|
+
setupOperationResponse(operationResponse: OperationResponse): void;
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { OperationResponse } from "./../OperationResponse";
|
|
2
|
+
import { CustomOperationResponse } from "./CustomOperationResponse";
|
|
3
|
+
declare class EditChatMessage {
|
|
4
|
+
message: string;
|
|
5
|
+
tsCreate: number;
|
|
6
|
+
}
|
|
7
|
+
declare class ChatMessage extends EditChatMessage {
|
|
8
|
+
tsLastUpdate: number;
|
|
9
|
+
messageEditeds: EditChatMessage[];
|
|
10
|
+
senderId: string;
|
|
11
|
+
isDelete: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare class GetChatMessageUserOperationResponse extends CustomOperationResponse {
|
|
14
|
+
messages: ChatMessage[];
|
|
15
|
+
setupOperationResponse(operationResponse: OperationResponse): void;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { OperationResponse } from "./../OperationResponse";
|
|
2
|
+
import { CustomOperationResponse } from "./CustomOperationResponse";
|
|
3
|
+
declare class FriendItem {
|
|
4
|
+
friendId: string;
|
|
5
|
+
isSocialLoginFriend: boolean;
|
|
6
|
+
friendStatus: number;
|
|
7
|
+
tsLastUpdate: number;
|
|
8
|
+
}
|
|
9
|
+
export declare class GetFriendsOperationResponse extends CustomOperationResponse {
|
|
10
|
+
friendLst: FriendItem[];
|
|
11
|
+
setupOperationResponse(operationResponse: OperationResponse): void;
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { OperationResponse } from "./../OperationResponse";
|
|
2
|
+
import { CustomOperationResponse } from "./CustomOperationResponse";
|
|
3
|
+
export declare class JoinChatChannelOperationResponse extends CustomOperationResponse {
|
|
4
|
+
setupOperationResponse(operationResponse: OperationResponse): void;
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { OperationResponse } from "./../OperationResponse";
|
|
2
|
+
import { CustomOperationResponse } from "./CustomOperationResponse";
|
|
3
|
+
export declare class LeaveChatChannelOperationResponse extends CustomOperationResponse {
|
|
4
|
+
setupOperationResponse(operationResponse: OperationResponse): void;
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { OperationResponse } from "./../OperationResponse";
|
|
2
|
+
import { CustomOperationResponse } from "./CustomOperationResponse";
|
|
3
|
+
export declare class RemoveFriendOperationResponse extends CustomOperationResponse {
|
|
4
|
+
setupOperationResponse(operationResponse: OperationResponse): void;
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { OperationResponse } from "./../OperationResponse";
|
|
2
|
+
import { CustomOperationResponse } from "./CustomOperationResponse";
|
|
3
|
+
export declare class SendChatToChannelOperationResponse extends CustomOperationResponse {
|
|
4
|
+
setupOperationResponse(operationResponse: OperationResponse): void;
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { OperationResponse } from "./../OperationResponse";
|
|
2
|
+
import { CustomOperationResponse } from "./CustomOperationResponse";
|
|
3
|
+
export declare class SendChatToUserOperationResponse extends CustomOperationResponse {
|
|
4
|
+
setupOperationResponse(operationResponse: OperationResponse): void;
|
|
5
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AvatarChannel } from "./AvatarChannel";
|
|
2
|
+
import { UserChannel } from "./UserChannel";
|
|
3
|
+
import { ChatMessage } from "./ChatMessage";
|
|
4
|
+
export declare class ChatChannel {
|
|
5
|
+
channel: string;
|
|
6
|
+
name: string;
|
|
7
|
+
avatarChannel: AvatarChannel;
|
|
8
|
+
userCount: number;
|
|
9
|
+
users: UserChannel[];
|
|
10
|
+
tsCreate: number;
|
|
11
|
+
channelType: number;
|
|
12
|
+
messages: ChatMessage[];
|
|
13
|
+
}
|