@xmobitea/gn-typescript-client 2.6.0 → 2.6.2-esnext

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.
Files changed (120) hide show
  1. package/GNServerSettingsConfig.debug.json +1 -1
  2. package/dist/index.js +339 -34485
  3. package/dist/runtime/GNNetwork.js +250 -0
  4. package/dist/runtime/GNNetworkAuthenticateApi.js +122 -0
  5. package/dist/runtime/GNNetworkCharacterPlayerApi.js +968 -0
  6. package/dist/runtime/GNNetworkCloudScriptApi.js +104 -0
  7. package/dist/runtime/GNNetworkContentApi.js +140 -0
  8. package/dist/runtime/GNNetworkDashboardApi.js +170 -0
  9. package/dist/runtime/GNNetworkGamePlayerApi.js +950 -0
  10. package/dist/runtime/GNNetworkGroupApi.js +734 -0
  11. package/dist/runtime/GNNetworkInventoryApi.js +626 -0
  12. package/dist/runtime/GNNetworkMasterPlayerApi.js +1550 -0
  13. package/dist/runtime/GNNetworkMultiplayerApi.js +194 -0
  14. package/dist/runtime/GNNetworkStoreInventoryApi.js +266 -0
  15. package/dist/runtime/common/Action0.js +1 -0
  16. package/dist/runtime/common/Action1.js +1 -0
  17. package/dist/runtime/common/Action2.js +1 -0
  18. package/dist/runtime/common/Action3.js +1 -0
  19. package/dist/runtime/common/Action4.js +1 -0
  20. package/dist/runtime/common/GNData.js +211 -0
  21. package/dist/runtime/config/GNServerSettings.d.ts +8 -4
  22. package/dist/runtime/config/GNServerSettings.js +141 -0
  23. package/dist/runtime/constant/Commands.js +19 -0
  24. package/dist/runtime/constant/EventCode.js +8 -0
  25. package/dist/runtime/constant/OperationCode.js +221 -0
  26. package/dist/runtime/constant/ReturnCode.js +14 -0
  27. package/dist/runtime/constant/enumType/ExecuteResponseStatus.js +8 -0
  28. package/dist/runtime/constant/enumType/FriendStatus.js +7 -0
  29. package/dist/runtime/constant/enumType/GoogleLoginType.js +5 -0
  30. package/dist/runtime/constant/enumType/GroupStatus.js +7 -0
  31. package/dist/runtime/constant/enumType/InvalidMemberType.js +18 -0
  32. package/dist/runtime/constant/enumType/ItemType.js +5 -0
  33. package/dist/runtime/constant/enumType/MatchmakingMemberStatus.js +6 -0
  34. package/dist/runtime/constant/enumType/MatchmakingTicketStatus.js +8 -0
  35. package/dist/runtime/constant/enumType/OwnerType.js +9 -0
  36. package/dist/runtime/constant/enumType/PermissionDataItem.js +5 -0
  37. package/dist/runtime/constant/enumType/PushPlatformType.js +5 -0
  38. package/dist/runtime/constant/enumType/RequestRole.js +6 -0
  39. package/dist/runtime/constant/enumType/RequestType.js +15 -0
  40. package/dist/runtime/constant/enumType/StoreItemType.js +5 -0
  41. package/dist/runtime/constant/enumType/StoreReceiveType.js +8 -0
  42. package/dist/runtime/constant/errorCode/GNErrorCode.js +52 -0
  43. package/dist/runtime/constant/parameterCode/GNParameterCode.d.ts +3 -0
  44. package/dist/runtime/constant/parameterCode/GNParameterCode.js +599 -0
  45. package/dist/runtime/constant/parameterCode/ParameterCode.js +6 -0
  46. package/dist/runtime/entity/DataMember.js +208 -0
  47. package/dist/runtime/entity/GNMetadata.js +11 -0
  48. package/dist/runtime/entity/InvalidMember.js +1 -0
  49. package/dist/runtime/entity/OperationEvent.js +33 -0
  50. package/dist/runtime/entity/OperationHelper.js +23 -0
  51. package/dist/runtime/entity/OperationRequest.js +51 -0
  52. package/dist/runtime/entity/OperationResponse.js +82 -0
  53. package/dist/runtime/entity/models/AuthenticateModels.js +420 -0
  54. package/dist/runtime/entity/models/AuthenticateRequestModels.js +206 -0
  55. package/dist/runtime/entity/models/AuthenticateResponseModels.js +131 -0
  56. package/dist/runtime/entity/models/CharacterPlayerModels.js +1437 -0
  57. package/dist/runtime/entity/models/CharacterPlayerRequestModels.js +1439 -0
  58. package/dist/runtime/entity/models/CharacterPlayerResponseModels.js +376 -0
  59. package/dist/runtime/entity/models/CloudScriptModels.js +197 -0
  60. package/dist/runtime/entity/models/CloudScriptRequestModels.js +143 -0
  61. package/dist/runtime/entity/models/CloudScriptResponseModels.js +40 -0
  62. package/dist/runtime/entity/models/ContentModels.js +203 -0
  63. package/dist/runtime/entity/models/ContentRequestModels.js +197 -0
  64. package/dist/runtime/entity/models/ContentResponseModels.js +54 -0
  65. package/dist/runtime/entity/models/DashboardModels.d.ts +5 -1
  66. package/dist/runtime/entity/models/DashboardModels.js +2991 -0
  67. package/dist/runtime/entity/models/DashboardRequestModels.js +294 -0
  68. package/dist/runtime/entity/models/DashboardResponseModels.js +187 -0
  69. package/dist/runtime/entity/models/GamePlayerModels.js +1591 -0
  70. package/dist/runtime/entity/models/GamePlayerRequestModels.js +1412 -0
  71. package/dist/runtime/entity/models/GamePlayerResponseModels.js +369 -0
  72. package/dist/runtime/entity/models/GenericModels.js +177 -0
  73. package/dist/runtime/entity/models/GroupModels.js +1139 -0
  74. package/dist/runtime/entity/models/GroupRequestModels.js +1088 -0
  75. package/dist/runtime/entity/models/GroupResponseModels.js +285 -0
  76. package/dist/runtime/entity/models/InventoryModels.js +915 -0
  77. package/dist/runtime/entity/models/InventoryRequestModels.js +926 -0
  78. package/dist/runtime/entity/models/InventoryResponseModels.js +243 -0
  79. package/dist/runtime/entity/models/MasterPlayerModels.js +2570 -0
  80. package/dist/runtime/entity/models/MasterPlayerRequestModels.js +2314 -0
  81. package/dist/runtime/entity/models/MasterPlayerResponseModels.js +607 -0
  82. package/dist/runtime/entity/models/MultiplayerModels.js +404 -0
  83. package/dist/runtime/entity/models/MultiplayerRequestModels.js +278 -0
  84. package/dist/runtime/entity/models/MultiplayerResponseModels.js +75 -0
  85. package/dist/runtime/entity/models/StoreInventoryModels.js +797 -0
  86. package/dist/runtime/entity/models/StoreInventoryRequestModels.js +386 -0
  87. package/dist/runtime/entity/models/StoreInventoryResponseModels.js +103 -0
  88. package/dist/runtime/entity/request/CustomOperationRequest.js +24 -0
  89. package/dist/runtime/entity/response/CustomOperationResponse.js +29 -0
  90. package/dist/runtime/entity/response/GetAuthInfoResponse.js +2 -0
  91. package/dist/runtime/entity/response/UploadFileResponse.js +2 -0
  92. package/dist/runtime/helper/CodeHelper.js +61 -0
  93. package/dist/runtime/helper/ConverterService.js +275 -0
  94. package/dist/runtime/helper/GNSupport.js +8 -0
  95. package/dist/runtime/helper/GNUtils.js +72 -0
  96. package/dist/runtime/helper/MessagePackConverterService.js +9 -0
  97. package/dist/runtime/logger/GNDebug.js +29 -0
  98. package/dist/runtime/networking/AuthenticateStatus.js +14 -0
  99. package/dist/runtime/networking/IPeer.js +1 -0
  100. package/dist/runtime/networking/NetworkingPeer.js +182 -0
  101. package/dist/runtime/networking/OperationPending.js +53 -0
  102. package/dist/runtime/networking/PeerBase.js +170 -0
  103. package/dist/runtime/networking/handler/IServerEventHandler.js +13 -0
  104. package/dist/runtime/networking/handler/OnCharacterPlayerFriendUpdateEventHandler.js +39 -0
  105. package/dist/runtime/networking/handler/OnCharacterPlayerGroupUpdateEventHandler.js +39 -0
  106. package/dist/runtime/networking/handler/OnGamePlayerFriendUpdateEventHandler.js +39 -0
  107. package/dist/runtime/networking/handler/OnGamePlayerGroupUpdateEventHandler.js +39 -0
  108. package/dist/runtime/networking/handler/OnGroupMemberUpdateEventHandler.js +35 -0
  109. package/dist/runtime/networking/handler/OnGroupMessageUpdateEventHandler.js +35 -0
  110. package/dist/runtime/networking/http/HttpPeer.js +124 -0
  111. package/dist/runtime/networking/http/NetworkingHttpPeerBase.js +6 -0
  112. package/dist/runtime/networking/http/NetworkingPeerAxiosRequest.js +164 -0
  113. package/dist/runtime/networking/socket/NetworkingPeerSocketIOClient.js +128 -0
  114. package/dist/runtime/networking/socket/NetworkingSocketPeerBase.js +176 -0
  115. package/dist/runtime/networking/socket/SocketPeer.js +108 -0
  116. package/dist/runtime/typescript/ServiceUpdate.js +12 -0
  117. package/package.json +1 -1
  118. package/dist/gn.js.client.js +0 -47206
  119. package/dist/gn.js.client.min.js +0 -2
  120. package/dist/gn.js.client.min.js.LICENSE.txt +0 -14
@@ -0,0 +1,211 @@
1
+ export class GNData {
2
+ get(k, def) {
3
+ return def;
4
+ }
5
+ getBoolean(k, def) {
6
+ return this.get(k, def);
7
+ }
8
+ getObject(k, def) {
9
+ return this.get(k, def);
10
+ }
11
+ getString(k, def) {
12
+ return this.get(k, def);
13
+ }
14
+ getNumber(k, def) {
15
+ return this.get(k, def);
16
+ }
17
+ getGNHashtable(k, def) {
18
+ return this.get(k, def);
19
+ }
20
+ getGNArray(k, def) {
21
+ return this.get(k, def);
22
+ }
23
+ static createGNHashtableFromObject(value) {
24
+ let answer = new GNHashtable();
25
+ let valueKeys = Object.keys(value);
26
+ for (let i = 0; i < valueKeys.length; i++) {
27
+ let key = valueKeys[i];
28
+ answer.add(key, value[key]);
29
+ }
30
+ return answer;
31
+ }
32
+ static createGNArrayFromArray(value) {
33
+ let answer = new GNArray();
34
+ let valueArr = value;
35
+ for (let i = 0; i < valueArr.length; i++) {
36
+ answer.add(valueArr[i]);
37
+ }
38
+ return answer;
39
+ }
40
+ static createUseDataFromOriginData(value) {
41
+ if (value == null)
42
+ return null;
43
+ let typeOfValue = typeof value;
44
+ if (typeOfValue === "string")
45
+ return value;
46
+ if (typeOfValue === "number")
47
+ return value;
48
+ if (typeOfValue === "boolean")
49
+ return value;
50
+ if (value instanceof GNArray)
51
+ return value;
52
+ if (value instanceof GNHashtable)
53
+ return value;
54
+ if (typeOfValue === "object") {
55
+ if (Array.isArray(value))
56
+ return this.createGNArrayFromArray(value);
57
+ else
58
+ return this.createGNHashtableFromObject(value);
59
+ }
60
+ return null;
61
+ }
62
+ static createDataFromUseData(value) {
63
+ if (value == null)
64
+ return null;
65
+ if (value instanceof GNArray) {
66
+ return value.toData();
67
+ }
68
+ if (value instanceof GNHashtable) {
69
+ return value.toData();
70
+ }
71
+ return value;
72
+ }
73
+ }
74
+ export class GNHashtableBuilder {
75
+ add(k, value) {
76
+ this.dict[k] = value;
77
+ return this;
78
+ }
79
+ addAll(dict) {
80
+ let keys = Object.keys(dict);
81
+ keys.forEach(keyStr => {
82
+ this.add(keyStr, dict[keyStr]);
83
+ });
84
+ return this;
85
+ }
86
+ constructor() {
87
+ this.dict = {};
88
+ this.dict = {};
89
+ }
90
+ build() {
91
+ let answer = new GNHashtable();
92
+ let keys = Object.keys(this.dict);
93
+ keys.forEach(keyStr => {
94
+ answer.add(keyStr, this.dict[keyStr]);
95
+ });
96
+ return answer;
97
+ }
98
+ }
99
+ export class GNHashtable extends GNData {
100
+ constructor() {
101
+ super(...arguments);
102
+ this.dict = {};
103
+ }
104
+ clear() {
105
+ this.dict = {};
106
+ }
107
+ remove(k) {
108
+ if (this.containsKey(k)) {
109
+ delete this.dict[k];
110
+ return true;
111
+ }
112
+ return false;
113
+ }
114
+ count() {
115
+ return Object.keys(this.dict).length;
116
+ }
117
+ containsKey(k) {
118
+ let keys = Object.keys(this.dict);
119
+ let kStr = k.toString();
120
+ return keys.indexOf(kStr) != -1;
121
+ }
122
+ get(k, def) {
123
+ let value = this.dict[k];
124
+ if (value == null)
125
+ return def;
126
+ return value;
127
+ }
128
+ add(k, value) {
129
+ this.dict[k] = GNData.createUseDataFromOriginData(value);
130
+ }
131
+ toData() {
132
+ let anwser = {};
133
+ let keys = Object.keys(this.dict);
134
+ for (let i = 0; i < keys.length; i++) {
135
+ let key = keys[i];
136
+ anwser[key] = GNData.createDataFromUseData(this.dict[key]);
137
+ }
138
+ return anwser;
139
+ }
140
+ static builder() {
141
+ return new GNHashtableBuilder();
142
+ }
143
+ toString() {
144
+ return JSON.stringify(this.dict);
145
+ }
146
+ }
147
+ export class GNArrayBuilder {
148
+ add(value) {
149
+ this.array.push(value);
150
+ return this;
151
+ }
152
+ addAll(array) {
153
+ array.forEach(o => {
154
+ this.add(o);
155
+ });
156
+ return this;
157
+ }
158
+ build() {
159
+ let awnser = new GNArray();
160
+ this.array.forEach(o => {
161
+ awnser.add(o);
162
+ });
163
+ return awnser;
164
+ }
165
+ constructor() {
166
+ this.array = [];
167
+ this.array = [];
168
+ }
169
+ }
170
+ export class GNArray extends GNData {
171
+ constructor() {
172
+ super(...arguments);
173
+ this.array = [];
174
+ }
175
+ clear() {
176
+ this.array = [];
177
+ }
178
+ remove(k) {
179
+ if (k < 0 || k >= this.array.length)
180
+ return false;
181
+ this.array.splice(k, 1);
182
+ return true;
183
+ }
184
+ count() {
185
+ return this.array.length;
186
+ }
187
+ get(k, def) {
188
+ if (k < 0 || k >= this.array.length)
189
+ return null;
190
+ let value = this.array[k];
191
+ if (value == null)
192
+ return def;
193
+ return value;
194
+ }
195
+ add(value) {
196
+ this.array.push(GNData.createUseDataFromOriginData(value));
197
+ }
198
+ toData() {
199
+ let anwser = [];
200
+ for (let i = 0; i < this.array.length; i++) {
201
+ anwser.push(GNData.createDataFromUseData(this.array[i]));
202
+ }
203
+ return anwser;
204
+ }
205
+ static builder() {
206
+ return new GNArrayBuilder();
207
+ }
208
+ toString() {
209
+ return JSON.stringify(this.array);
210
+ }
211
+ }
@@ -1,4 +1,8 @@
1
1
  import { LogType } from "./../logger/GNDebug";
2
+ export declare enum MessageType {
3
+ Json = 1,
4
+ MsgPack = 2
5
+ }
2
6
  export interface GNServerSettingsOptions {
3
7
  serverAddress: string;
4
8
  serverPort: number;
@@ -6,6 +10,7 @@ export interface GNServerSettingsOptions {
6
10
  useSsl: boolean;
7
11
  useSocket: boolean;
8
12
  useHttp: boolean;
13
+ messageType: MessageType;
9
14
  sendRate: number;
10
15
  reconnectDelay: number;
11
16
  pingInterval: number;
@@ -13,7 +18,6 @@ export interface GNServerSettingsOptions {
13
18
  adminSecretKey: string;
14
19
  serverSecretKey: string;
15
20
  clientSecretKey: string;
16
- gnServerSourcePath: string;
17
21
  logType: LogType;
18
22
  }
19
23
  export declare class GNServerSettings {
@@ -23,6 +27,7 @@ export declare class GNServerSettings {
23
27
  private useSsl;
24
28
  private useSocket;
25
29
  private useHttp;
30
+ private messageType;
26
31
  private sendRate;
27
32
  private reconnectDelay;
28
33
  private pingInterval;
@@ -30,7 +35,6 @@ export declare class GNServerSettings {
30
35
  private adminSecretKey;
31
36
  private serverSecretKey;
32
37
  private clientSecretKey;
33
- private gnServerSourcePath;
34
38
  private logType;
35
39
  config(options: GNServerSettingsOptions): void;
36
40
  getServerAddress(): string;
@@ -45,6 +49,8 @@ export declare class GNServerSettings {
45
49
  setUseSocket(useSocket: boolean): void;
46
50
  isUseHttp(): boolean;
47
51
  setUseHttp(useHttp: boolean): void;
52
+ getMessageType(): MessageType;
53
+ setMessageType(messageType: MessageType): void;
48
54
  getSendRate(): number;
49
55
  setSendRate(sendRate: number): void;
50
56
  getReconnectDelay(): number;
@@ -59,8 +65,6 @@ export declare class GNServerSettings {
59
65
  setServerSecretKey(serverSecretKey: string): void;
60
66
  getClientSecretKey(): string;
61
67
  setClientSecretKey(clientSecretKey: string): void;
62
- getGNServerSourcePath(): string;
63
- setGNServerSourcePath(gnServerSourcePath: string): void;
64
68
  getLogType(): LogType;
65
69
  setLogType(logType: LogType): void;
66
70
  getSocketUrl(): string;
@@ -0,0 +1,141 @@
1
+ import { LogType } from "./../logger/GNDebug";
2
+ export var MessageType;
3
+ (function (MessageType) {
4
+ MessageType[MessageType["Json"] = 1] = "Json";
5
+ MessageType[MessageType["MsgPack"] = 2] = "MsgPack";
6
+ })(MessageType || (MessageType = {}));
7
+ export class GNServerSettings {
8
+ constructor() {
9
+ this.serverAddress = "127.0.0.1";
10
+ this.serverPort = 2202;
11
+ this.serverSocketPort = 2901;
12
+ this.useSsl = false;
13
+ this.useSocket = true;
14
+ this.useHttp = true;
15
+ this.messageType = MessageType.MsgPack;
16
+ this.sendRate = 20;
17
+ this.reconnectDelay = 5000;
18
+ this.pingInterval = 20000;
19
+ this.pingTimeout = 20000;
20
+ this.logType = LogType.All;
21
+ }
22
+ config(options) {
23
+ this.serverAddress = options.serverAddress;
24
+ this.serverPort = options.serverPort;
25
+ this.serverSocketPort = options.serverSocketPort;
26
+ this.useSsl = options.useSsl;
27
+ this.useSocket = options.useSocket;
28
+ this.useHttp = options.useHttp;
29
+ this.messageType = options.messageType;
30
+ this.sendRate = options.sendRate;
31
+ this.reconnectDelay = options.reconnectDelay;
32
+ this.pingInterval = options.pingInterval;
33
+ this.pingTimeout = options.pingTimeout;
34
+ this.adminSecretKey = options.adminSecretKey;
35
+ this.serverSecretKey = options.serverSecretKey;
36
+ this.clientSecretKey = options.clientSecretKey;
37
+ this.logType = options.logType;
38
+ }
39
+ getServerAddress() {
40
+ return this.serverAddress;
41
+ }
42
+ setServerAddress(serverAddress) {
43
+ this.serverAddress = serverAddress;
44
+ }
45
+ getServerPort() {
46
+ return this.serverPort;
47
+ }
48
+ setServerPort(serverPort) {
49
+ this.serverPort = serverPort;
50
+ }
51
+ getServerSocketPort() {
52
+ return this.serverSocketPort;
53
+ }
54
+ setServerSocketPort(serverSocketPort) {
55
+ this.serverSocketPort = serverSocketPort;
56
+ }
57
+ isUseSsl() {
58
+ return this.useSsl;
59
+ }
60
+ setUseSsl(useSsl) {
61
+ this.useSsl = useSsl;
62
+ }
63
+ isUseSocket() {
64
+ return this.useSocket;
65
+ }
66
+ setUseSocket(useSocket) {
67
+ this.useSocket = useSocket;
68
+ }
69
+ isUseHttp() {
70
+ return this.useHttp;
71
+ }
72
+ setUseHttp(useHttp) {
73
+ this.useHttp = useHttp;
74
+ }
75
+ getMessageType() {
76
+ return this.messageType;
77
+ }
78
+ setMessageType(messageType) {
79
+ this.messageType = messageType;
80
+ }
81
+ getSendRate() {
82
+ return this.sendRate;
83
+ }
84
+ setSendRate(sendRate) {
85
+ this.sendRate = sendRate;
86
+ }
87
+ getReconnectDelay() {
88
+ return this.reconnectDelay;
89
+ }
90
+ setReconnectDelay(reconnectDelay) {
91
+ this.reconnectDelay = reconnectDelay;
92
+ }
93
+ getPingInterval() {
94
+ return this.pingInterval;
95
+ }
96
+ setPingInterval(pingInterval) {
97
+ this.pingInterval = pingInterval;
98
+ }
99
+ getPingTimeout() {
100
+ return this.pingTimeout;
101
+ }
102
+ setPingTimeout(pingTimeout) {
103
+ this.pingTimeout = pingTimeout;
104
+ }
105
+ getAdminSecretKey() {
106
+ return this.adminSecretKey;
107
+ }
108
+ setAdminSecretKey(adminSecretKey) {
109
+ this.adminSecretKey = adminSecretKey;
110
+ }
111
+ getServerSecretKey() {
112
+ return this.serverSecretKey;
113
+ }
114
+ setServerSecretKey(serverSecretKey) {
115
+ this.serverSecretKey = serverSecretKey;
116
+ }
117
+ getClientSecretKey() {
118
+ return this.clientSecretKey;
119
+ }
120
+ setClientSecretKey(clientSecretKey) {
121
+ this.clientSecretKey = clientSecretKey;
122
+ }
123
+ getLogType() {
124
+ return this.logType;
125
+ }
126
+ setLogType(logType) {
127
+ this.logType = logType;
128
+ }
129
+ getSocketUrl() {
130
+ if (this.serverSocketPort < 0)
131
+ return (this.useSsl ? "https" : "http") + "://" + this.serverAddress;
132
+ else
133
+ return (this.useSsl ? "https" : "http") + "://" + this.serverAddress + ":" + this.serverSocketPort;
134
+ }
135
+ getHttpUrl() {
136
+ if (this.serverPort < 0)
137
+ return (this.useSsl ? "https" : "http") + "://" + this.serverAddress;
138
+ else
139
+ return (this.useSsl ? "https" : "http") + "://" + this.serverAddress + ":" + this.serverPort;
140
+ }
141
+ }
@@ -0,0 +1,19 @@
1
+ export class Commands {
2
+ }
3
+ Commands.USER_AGENT = "User-Agent";
4
+ Commands.CONTENT_TYPE = "Content-Type";
5
+ Commands.ACCEPT = "Accept";
6
+ Commands.CONTENT_LENGTH = "Content-Length";
7
+ Commands.APPLICATION_JSON = "application/json";
8
+ Commands.APPLICATION_MSGPACK = "application/msgpack";
9
+ Commands.RequestAuthTokenCmd = "a";
10
+ Commands.RequestSecretCmd = "s";
11
+ Commands.RequestGameIdCmd = "g";
12
+ Commands.RequestCmd_MsgPack = "r";
13
+ Commands.ResponseCmd_MsgPack = "r";
14
+ Commands.EventCmd_MsgPack = "e";
15
+ Commands.RequestCmd_Json = "t";
16
+ Commands.ResponseCmd_Json = "t";
17
+ Commands.EventCmd_Json = "y";
18
+ Commands.Data = "d";
19
+ Commands.File = "f";
@@ -0,0 +1,8 @@
1
+ export class EventCode {
2
+ }
3
+ EventCode.OnGamePlayerFriendUpdate = 1;
4
+ EventCode.OnCharacterPlayerFriendUpdate = 2;
5
+ EventCode.OnGamePlayerGroupUpdate = 3;
6
+ EventCode.OnGroupMemberUpdate = 4;
7
+ EventCode.OnGroupMessageUpdate = 5;
8
+ EventCode.OnCharacterPlayerGroupUpdate = 6;
@@ -0,0 +1,221 @@
1
+ export class OperationCode {
2
+ }
3
+ OperationCode.LoginByAdminAccount = -1;
4
+ OperationCode.ChangePasswordAdminAccount = -2;
5
+ OperationCode.GetGameList = -3;
6
+ OperationCode.GetMasterGameSettings = -4;
7
+ OperationCode.SetMasterGameSettings = -5;
8
+ OperationCode.GrantAdminAccount = -6;
9
+ OperationCode.RemoveAdminAccount = -7;
10
+ OperationCode.SetPasswordAdminAccount = -8;
11
+ OperationCode.SetSecretKeyAdminAccount = -9;
12
+ OperationCode.GetGameInformation = -10;
13
+ OperationCode.SetGameInformation = -11;
14
+ OperationCode.GetAdminAccountList = -12;
15
+ OperationCode.GrantGame = -13;
16
+ OperationCode.GetServerLog = -14;
17
+ OperationCode.GetSecretInfoInformation = -15;
18
+ OperationCode.GetSecretInfoList = -16;
19
+ OperationCode.GrantSecretInfo = -17;
20
+ OperationCode.SetSecretInfoInformation = -18;
21
+ OperationCode.GetUsernameAdminAccount = -19;
22
+ OperationCode.GetAnalytics = -20;
23
+ OperationCode.GetEventCallbackCloudScript = -21;
24
+ OperationCode.SetEventCallbackCloudScript = -22;
25
+ OperationCode.ResetStatisticsLeaderboard = -23;
26
+ OperationCode.GetBackupStatisticsLeaderboardVersion = -24;
27
+ OperationCode.GetServerGameData = -25;
28
+ OperationCode.DeleteInDatabase = -26;
29
+ OperationCode.LoginByAccount = 1;
30
+ OperationCode.LoginByAndroidDeviceId = 2;
31
+ OperationCode.LoginByApple = 3;
32
+ OperationCode.LoginByCustomDeviceId = 4;
33
+ OperationCode.LoginByCustomId = 5;
34
+ OperationCode.LoginByEditorDeviceId = 6;
35
+ OperationCode.LoginByFacebook = 7;
36
+ OperationCode.LoginByGenericService = 8;
37
+ OperationCode.LoginByGoogle = 9;
38
+ OperationCode.LoginByiOSDeviceId = 10;
39
+ OperationCode.LoginByLinuxDeviceId = 11;
40
+ OperationCode.LoginByMacOSDeviceId = 12;
41
+ OperationCode.LoginByWindowsDeviceId = 13;
42
+ OperationCode.LoginByWindowsPhoneDeviceId = 14;
43
+ OperationCode.RegisterAccount = 15;
44
+ OperationCode.LinkAccount = 16;
45
+ OperationCode.LinkAndroidDeviceId = 17;
46
+ OperationCode.LinkApple = 18;
47
+ OperationCode.LinkCustomDeviceId = 19;
48
+ OperationCode.LinkCustomId = 20;
49
+ OperationCode.LinkEditorDeviceId = 21;
50
+ OperationCode.LinkFacebook = 22;
51
+ OperationCode.LinkGenericService = 23;
52
+ OperationCode.LinkGoogle = 24;
53
+ OperationCode.LinkiOSDeviceId = 25;
54
+ OperationCode.LinkLinuxDeviceId = 26;
55
+ OperationCode.LinkMacOSDeviceId = 27;
56
+ OperationCode.LinkWindowsDeviceId = 28;
57
+ OperationCode.LinkWindowsPhoneDeviceId = 29;
58
+ OperationCode.UnlinkAccount = 30;
59
+ OperationCode.UnlinkAndroidDeviceId = 31;
60
+ OperationCode.UnlinkApple = 32;
61
+ OperationCode.UnlinkCustomDeviceId = 33;
62
+ OperationCode.UnlinkCustomId = 34;
63
+ OperationCode.UnlinkEditorDeviceId = 35;
64
+ OperationCode.UnlinkFacebook = 36;
65
+ OperationCode.UnlinkGenericService = 37;
66
+ OperationCode.UnlinkGoogle = 38;
67
+ OperationCode.UnlinkiOSDeviceId = 39;
68
+ OperationCode.UnlinkLinuxDeviceId = 40;
69
+ OperationCode.UnlinkMacOSDeviceId = 41;
70
+ OperationCode.UnlinkWindowsDeviceId = 42;
71
+ OperationCode.UnlinkWindowsPhoneDeviceId = 43;
72
+ OperationCode.AddSegment = 44;
73
+ OperationCode.RemoveSegment = 45;
74
+ OperationCode.GetSegment = 46;
75
+ OperationCode.SetTag = 47;
76
+ OperationCode.GetTag = 48;
77
+ OperationCode.SetDisplayName = 49;
78
+ OperationCode.GetDisplayName = 50;
79
+ OperationCode.GetTsCreate = 51;
80
+ OperationCode.GetIpAddressCreate = 52;
81
+ OperationCode.GetTsLastLogin = 53;
82
+ OperationCode.SetPlayerBan = 54;
83
+ OperationCode.GetPlayerBan = 55;
84
+ OperationCode.SetCountryCode = 56;
85
+ OperationCode.GetCountryCode = 57;
86
+ OperationCode.ChangeAccountPassword = 58;
87
+ OperationCode.ResetAccountPassword = 59;
88
+ OperationCode.SetAvatar = 60;
89
+ OperationCode.GetAvatar = 61;
90
+ OperationCode.SetPlayerCurrency = 62;
91
+ OperationCode.GetPlayerCurrency = 63;
92
+ OperationCode.SetPlayerStatistics = 64;
93
+ OperationCode.GetPlayerStatistics = 65;
94
+ OperationCode.GetStatisticsLeaderboard = 66;
95
+ OperationCode.GetStatisticsLeaderboardAroundPlayer = 67;
96
+ OperationCode.SetCustomData = 68;
97
+ OperationCode.GetCustomData = 69;
98
+ OperationCode.SetPlayerData = 70;
99
+ OperationCode.GetPlayerData = 71;
100
+ OperationCode.GetPlayerInformation = 72;
101
+ OperationCode.GetPlayersWithApple = 73;
102
+ OperationCode.GetPlayersWithFacebook = 74;
103
+ OperationCode.GetPlayersWithGoogle = 75;
104
+ OperationCode.GetPlayersWithGenericService = 76;
105
+ OperationCode.GetPlayersWithSegment = 77;
106
+ OperationCode.GetPlayersWithTag = 78;
107
+ OperationCode.GetExternal = 79;
108
+ OperationCode.GetCatalogId = 80;
109
+ OperationCode.GetOwnerInfo = 81;
110
+ OperationCode.GetOnlineStatus = 82;
111
+ OperationCode.RemovePlayerItem = 83;
112
+ OperationCode.RemovePlayerCharacter = 84;
113
+ OperationCode.AddPlayerFriend = 85;
114
+ OperationCode.RemovePlayerFriend = 86;
115
+ OperationCode.GetPlayerInventory = 87;
116
+ OperationCode.GetPlayerCharacter = 88;
117
+ OperationCode.GetPlayerFriend = 89;
118
+ OperationCode.GetPlayerGroup = 90;
119
+ OperationCode.GrantGroup = 91;
120
+ OperationCode.JoinGroup = 92;
121
+ OperationCode.GrantPlayerItem = 93;
122
+ OperationCode.GrantPlayerCharacter = 94;
123
+ OperationCode.GetOwner = 95;
124
+ OperationCode.GetRemoveStatus = 96;
125
+ OperationCode.SetGroupStatistics = 97;
126
+ OperationCode.SetGroupData = 98;
127
+ OperationCode.GetGroupCurrency = 99;
128
+ OperationCode.SetGroupCurrency = 100;
129
+ OperationCode.GrantGroupItem = 101;
130
+ OperationCode.GetStatisticsLeaderboardAroundGroup = 102;
131
+ OperationCode.GetGroupsWithTag = 103;
132
+ OperationCode.GetGroupsWithSegment = 104;
133
+ OperationCode.GetGroupStatistics = 105;
134
+ OperationCode.GetGroupInventory = 106;
135
+ OperationCode.GetGroupData = 107;
136
+ OperationCode.GetGroupInformation = 108;
137
+ OperationCode.GetMembers = 109;
138
+ OperationCode.SetItemStatistics = 110;
139
+ OperationCode.SetItemData = 111;
140
+ OperationCode.GetItemData = 112;
141
+ OperationCode.GetStatisticsLeaderboardAroundItem = 113;
142
+ OperationCode.GetItemsWithTag = 114;
143
+ OperationCode.GetItemsWithSegment = 115;
144
+ OperationCode.GetItemStatistics = 116;
145
+ OperationCode.GetItemInformation = 117;
146
+ OperationCode.GetAmount = 118;
147
+ OperationCode.GetItemType = 119;
148
+ OperationCode.SetTsLastLogin = 120;
149
+ OperationCode.SetRemoveStatus = 121;
150
+ OperationCode.SetAmount = 122;
151
+ OperationCode.RemoveGroup = 123;
152
+ OperationCode.LeaveGroup = 124;
153
+ OperationCode.AddMember = 125;
154
+ OperationCode.RemoveMember = 126;
155
+ OperationCode.GetContentData = 127;
156
+ OperationCode.SetContentData = 128;
157
+ OperationCode.GetGroupMessage = 129;
158
+ OperationCode.SendGroupMessage = 130;
159
+ OperationCode.GetPlayersWithDisplayName = 131;
160
+ OperationCode.GetItemsWithDisplayName = 132;
161
+ OperationCode.GetGroupsWithDisplayName = 133;
162
+ OperationCode.SetOwner = 134;
163
+ OperationCode.RemoveGroupItem = 135;
164
+ OperationCode.GetClassId = 136;
165
+ OperationCode.GetStoreItemInformation = 137;
166
+ OperationCode.GetStoreItemsWithTag = 138;
167
+ OperationCode.GrantStoreItem = 139;
168
+ OperationCode.RemoveTag = 140;
169
+ OperationCode.BuyStoreItem = 141;
170
+ OperationCode.ValidateAppleAppStoreReceipt = 142;
171
+ OperationCode.ValidateGooglePlayStoreReceipt = 143;
172
+ OperationCode.ValidateFacebookStoreReceipt = 144;
173
+ OperationCode.GetFriendStatisticsLeaderboardAroundPlayer = 145;
174
+ OperationCode.GetFriendStatisticsLeaderboard = 146;
175
+ OperationCode.SetEmail = 147;
176
+ OperationCode.GetEmail = 148;
177
+ OperationCode.CreateNewFileUploadInfo = 149;
178
+ OperationCode.GetFileUploadInfo = 150;
179
+ OperationCode.RequestDownloadFileUploadInfo = 151;
180
+ OperationCode.RemoveFileUploadInfo = 152;
181
+ OperationCode.GetFileUploadInfoList = 153;
182
+ OperationCode.SetStoreItemInformation = 154;
183
+ OperationCode.RefreshAuthToken = 155;
184
+ OperationCode.CancelAllMatchmakingTicket = 156;
185
+ OperationCode.CancelMatchmakingTicket = 157;
186
+ OperationCode.CreateMatchmakingTicket = 158;
187
+ OperationCode.GetMatch = 159;
188
+ OperationCode.GetMatchmakingTicket = 160;
189
+ OperationCode.GetQueueStatistics = 161;
190
+ OperationCode.JoinMatchmakingTicket = 162;
191
+ OperationCode.ListMatchmakingTicketsForPlayer = 163;
192
+ OperationCode.GetCurrencyLeaderboard = 164;
193
+ OperationCode.ExecuteFunction = 165;
194
+ OperationCode.GetFunctions = 166;
195
+ OperationCode.AddFunction = 167;
196
+ OperationCode.EditFunction = 168;
197
+ OperationCode.GetFunction = 169;
198
+ OperationCode.LoginByGooglePlayGameService = 170;
199
+ OperationCode.LoginByGameCenter = 171;
200
+ OperationCode.LinkGooglePlayGameService = 172;
201
+ OperationCode.LinkGameCenter = 173;
202
+ OperationCode.UnlinkGooglePlayGameService = 174;
203
+ OperationCode.UnlinkGameCenter = 175;
204
+ OperationCode.GetPlayersWithGooglePlayGameService = 176;
205
+ OperationCode.GetPlayersWithGameCenter = 177;
206
+ OperationCode.GetLastLoginLeaderboard = 178;
207
+ OperationCode.GetCreateLeaderboard = 179;
208
+ OperationCode.GetAllMatchmakingTicket = 180;
209
+ OperationCode.GetAllMatch = 181;
210
+ OperationCode.SendSocketOperationEvent = 182;
211
+ OperationCode.GetStatisticsLog = 183;
212
+ OperationCode.GetCurrencyLog = 184;
213
+ OperationCode.PresentStoreItem = 185;
214
+ OperationCode.GetStoreLog = 186;
215
+ OperationCode.SendEmail = 187;
216
+ OperationCode.SendPushNotification = 188;
217
+ OperationCode.AddPushNotification = 189;
218
+ OperationCode.RemovePushNotification = 190;
219
+ OperationCode.GetPushNotification = 191;
220
+ OperationCode.GetStoreUsed = 192;
221
+ OperationCode.RemoveStoreUsed = 193;
@@ -0,0 +1,14 @@
1
+ export class ReturnCode {
2
+ }
3
+ ReturnCode.SecretInvalid = -10;
4
+ ReturnCode.MaxSizeRequestReject = -9;
5
+ ReturnCode.MaxRequestReject = -8;
6
+ ReturnCode.MaxCCUReject = -7;
7
+ ReturnCode.OperationNotAuthorized = -6;
8
+ ReturnCode.InvalidRequestParameters = -5;
9
+ ReturnCode.OperationInvalid = -4;
10
+ ReturnCode.InternalServerError = -3;
11
+ ReturnCode.OperationNotAllow = -2;
12
+ ReturnCode.OperationTimeout = -1;
13
+ ReturnCode.UnknownError = 0;
14
+ ReturnCode.Ok = 1;
@@ -0,0 +1,8 @@
1
+ export var ExecuteResponseStatus;
2
+ (function (ExecuteResponseStatus) {
3
+ ExecuteResponseStatus[ExecuteResponseStatus["Ok"] = 1] = "Ok";
4
+ ExecuteResponseStatus[ExecuteResponseStatus["Exception"] = 2] = "Exception";
5
+ ExecuteResponseStatus[ExecuteResponseStatus["FunctionNameNotFound"] = 3] = "FunctionNameNotFound";
6
+ ExecuteResponseStatus[ExecuteResponseStatus["VersionInvalid"] = 4] = "VersionInvalid";
7
+ ExecuteResponseStatus[ExecuteResponseStatus["Timeout"] = 5] = "Timeout";
8
+ })(ExecuteResponseStatus || (ExecuteResponseStatus = {}));
@@ -0,0 +1,7 @@
1
+ export var FriendStatus;
2
+ (function (FriendStatus) {
3
+ FriendStatus[FriendStatus["Friend"] = 1] = "Friend";
4
+ FriendStatus[FriendStatus["WaitingAccept"] = 2] = "WaitingAccept";
5
+ FriendStatus[FriendStatus["SentRequestAndWaitingAccept"] = 3] = "SentRequestAndWaitingAccept";
6
+ FriendStatus[FriendStatus["NotFriend"] = 4] = "NotFriend";
7
+ })(FriendStatus || (FriendStatus = {}));
@@ -0,0 +1,5 @@
1
+ export var GoogleLoginType;
2
+ (function (GoogleLoginType) {
3
+ GoogleLoginType[GoogleLoginType["AccessToken"] = 1] = "AccessToken";
4
+ GoogleLoginType[GoogleLoginType["IdToken"] = 2] = "IdToken";
5
+ })(GoogleLoginType || (GoogleLoginType = {}));