@xmobitea/gn-typescript-client 2.4.10 → 2.5.0-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.
- package/GNServerSettingsConfig.debug.json +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +332 -36091
- package/dist/runtime/GNNetwork.js +258 -0
- package/dist/runtime/GNNetworkAuthenticateApi.js +167 -0
- package/dist/runtime/GNNetworkCharacterPlayerApi.d.ts +6 -0
- package/dist/runtime/GNNetworkCharacterPlayerApi.js +1295 -0
- package/dist/runtime/GNNetworkCloudScriptApi.js +143 -0
- package/dist/runtime/GNNetworkContentApi.js +191 -0
- package/dist/runtime/GNNetworkDashboardApi.js +231 -0
- package/dist/runtime/GNNetworkGamePlayerApi.js +1271 -0
- package/dist/runtime/GNNetworkGroupApi.js +983 -0
- package/dist/runtime/GNNetworkInventoryApi.js +839 -0
- package/dist/runtime/GNNetworkMasterPlayerApi.js +2071 -0
- package/dist/runtime/GNNetworkMultiplayerApi.js +263 -0
- package/dist/runtime/GNNetworkStoreInventoryApi.d.ts +12 -0
- package/dist/runtime/GNNetworkStoreInventoryApi.js +359 -0
- package/dist/runtime/common/Action0.js +1 -0
- package/dist/runtime/common/Action1.js +1 -0
- package/dist/runtime/common/Action2.js +1 -0
- package/dist/runtime/common/Action3.js +1 -0
- package/dist/runtime/common/Action4.js +1 -0
- package/dist/runtime/common/GNData.js +211 -0
- package/dist/runtime/config/GNServerSettings.d.ts +4 -0
- package/dist/runtime/config/GNServerSettings.js +135 -0
- package/dist/runtime/constant/Commands.js +19 -0
- package/dist/runtime/constant/EventCode.js +8 -0
- package/dist/runtime/constant/OperationCode.d.ts +2 -0
- package/dist/runtime/constant/OperationCode.js +221 -0
- package/dist/runtime/constant/ReturnCode.js +14 -0
- package/dist/runtime/constant/enumType/ExecuteResponseStatus.js +8 -0
- package/dist/runtime/constant/enumType/FriendStatus.js +7 -0
- package/dist/runtime/constant/enumType/GoogleLoginType.js +5 -0
- package/dist/runtime/constant/enumType/GroupStatus.js +7 -0
- package/dist/runtime/constant/enumType/InvalidMemberType.js +18 -0
- package/dist/runtime/constant/enumType/ItemType.js +5 -0
- package/dist/runtime/constant/enumType/MatchmakingMemberStatus.js +6 -0
- package/dist/runtime/constant/enumType/MatchmakingTicketStatus.js +8 -0
- package/dist/runtime/constant/enumType/OwnerType.js +8 -0
- package/dist/runtime/constant/enumType/PermissionDataItem.js +5 -0
- package/dist/runtime/constant/enumType/PushPlatformType.js +5 -0
- package/dist/runtime/constant/enumType/RequestRole.js +6 -0
- package/dist/runtime/constant/enumType/RequestType.js +15 -0
- package/dist/runtime/constant/enumType/StoreItemType.d.ts +4 -0
- package/dist/runtime/constant/enumType/StoreItemType.js +5 -0
- package/dist/runtime/constant/enumType/StoreReceiveType.js +8 -0
- package/dist/runtime/constant/errorCode/GNErrorCode.d.ts +2 -0
- package/dist/runtime/constant/errorCode/GNErrorCode.js +52 -0
- package/dist/runtime/constant/parameterCode/GNParameterCode.d.ts +4 -0
- package/dist/runtime/constant/parameterCode/GNParameterCode.js +593 -0
- package/dist/runtime/constant/parameterCode/ParameterCode.js +6 -0
- package/dist/runtime/entity/DataMember.js +208 -0
- package/dist/runtime/entity/GNMetadata.js +11 -0
- package/dist/runtime/entity/InvalidMember.js +1 -0
- package/dist/runtime/entity/OperationEvent.js +33 -0
- package/dist/runtime/entity/OperationHelper.js +23 -0
- package/dist/runtime/entity/OperationRequest.js +51 -0
- package/dist/runtime/entity/OperationResponse.js +82 -0
- package/dist/runtime/entity/models/AuthenticateModels.js +420 -0
- package/dist/runtime/entity/models/AuthenticateRequestModels.js +206 -0
- package/dist/runtime/entity/models/AuthenticateResponseModels.js +131 -0
- package/dist/runtime/entity/models/CharacterPlayerModels.d.ts +13 -0
- package/dist/runtime/entity/models/CharacterPlayerModels.js +1433 -0
- package/dist/runtime/entity/models/CharacterPlayerRequestModels.d.ts +15 -0
- package/dist/runtime/entity/models/CharacterPlayerRequestModels.js +1439 -0
- package/dist/runtime/entity/models/CharacterPlayerResponseModels.d.ts +3 -0
- package/dist/runtime/entity/models/CharacterPlayerResponseModels.js +376 -0
- package/dist/runtime/entity/models/CloudScriptModels.js +197 -0
- package/dist/runtime/entity/models/CloudScriptRequestModels.js +143 -0
- package/dist/runtime/entity/models/CloudScriptResponseModels.js +40 -0
- package/dist/runtime/entity/models/ContentModels.js +211 -0
- package/dist/runtime/entity/models/ContentRequestModels.js +197 -0
- package/dist/runtime/entity/models/ContentResponseModels.js +54 -0
- package/dist/runtime/entity/models/DashboardModels.d.ts +3 -0
- package/dist/runtime/entity/models/DashboardModels.js +2959 -0
- package/dist/runtime/entity/models/DashboardRequestModels.js +294 -0
- package/dist/runtime/entity/models/DashboardResponseModels.js +187 -0
- package/dist/runtime/entity/models/GamePlayerModels.js +1587 -0
- package/dist/runtime/entity/models/GamePlayerRequestModels.js +1412 -0
- package/dist/runtime/entity/models/GamePlayerResponseModels.js +369 -0
- package/dist/runtime/entity/models/GenericModels.js +177 -0
- package/dist/runtime/entity/models/GroupModels.js +1139 -0
- package/dist/runtime/entity/models/GroupRequestModels.js +1088 -0
- package/dist/runtime/entity/models/GroupResponseModels.js +285 -0
- package/dist/runtime/entity/models/InventoryModels.js +915 -0
- package/dist/runtime/entity/models/InventoryRequestModels.js +926 -0
- package/dist/runtime/entity/models/InventoryResponseModels.js +243 -0
- package/dist/runtime/entity/models/MasterPlayerModels.js +2570 -0
- package/dist/runtime/entity/models/MasterPlayerRequestModels.js +2314 -0
- package/dist/runtime/entity/models/MasterPlayerResponseModels.js +607 -0
- package/dist/runtime/entity/models/MultiplayerModels.js +404 -0
- package/dist/runtime/entity/models/MultiplayerRequestModels.js +278 -0
- package/dist/runtime/entity/models/MultiplayerResponseModels.js +75 -0
- package/dist/runtime/entity/models/StoreInventoryModels.d.ts +26 -0
- package/dist/runtime/entity/models/StoreInventoryModels.js +797 -0
- package/dist/runtime/entity/models/StoreInventoryRequestModels.d.ts +30 -0
- package/dist/runtime/entity/models/StoreInventoryRequestModels.js +386 -0
- package/dist/runtime/entity/models/StoreInventoryResponseModels.d.ts +6 -0
- package/dist/runtime/entity/models/StoreInventoryResponseModels.js +103 -0
- package/dist/runtime/entity/request/CustomOperationRequest.js +24 -0
- package/dist/runtime/entity/response/CustomOperationResponse.js +29 -0
- package/dist/runtime/entity/response/GetAuthInfoResponse.js +2 -0
- package/dist/runtime/helper/CodeHelper.js +61 -0
- package/dist/runtime/helper/ConverterService.js +275 -0
- package/dist/runtime/helper/GNSupport.js +8 -0
- package/dist/runtime/helper/GNUtils.js +72 -0
- package/dist/runtime/logger/GNDebug.js +29 -0
- package/dist/runtime/networking/AuthenticateStatus.js +14 -0
- package/dist/runtime/networking/IPeer.js +1 -0
- package/dist/runtime/networking/NetworkingPeer.js +163 -0
- package/dist/runtime/networking/OperationPending.js +53 -0
- package/dist/runtime/networking/PeerBase.js +170 -0
- package/dist/runtime/networking/handler/IServerEventHandler.js +13 -0
- package/dist/runtime/networking/handler/OnCharacterPlayerFriendUpdateEventHandler.js +39 -0
- package/dist/runtime/networking/handler/OnCharacterPlayerGroupUpdateEventHandler.js +39 -0
- package/dist/runtime/networking/handler/OnGamePlayerFriendUpdateEventHandler.js +39 -0
- package/dist/runtime/networking/handler/OnGamePlayerGroupUpdateEventHandler.js +39 -0
- package/dist/runtime/networking/handler/OnGroupMemberUpdateEventHandler.js +35 -0
- package/dist/runtime/networking/handler/OnGroupMessageUpdateEventHandler.js +35 -0
- package/dist/runtime/networking/http/HttpPeer.js +124 -0
- package/dist/runtime/networking/http/NetworkingHttpPeerBase.js +6 -0
- package/dist/runtime/networking/http/NetworkingPeerAxiosRequest.js +146 -0
- package/dist/runtime/networking/socket/NetworkingPeerSocketIOClient.js +126 -0
- package/dist/runtime/networking/socket/NetworkingSocketPeerBase.js +176 -0
- package/dist/runtime/networking/socket/SocketPeer.js +108 -0
- package/dist/runtime/typescript/ServiceUpdate.js +12 -0
- package/package.json +1 -1
- package/dist/gn.js.client.js +0 -48802
- package/dist/gn.js.client.min.js +0 -2
- package/dist/gn.js.client.min.js.LICENSE.txt +0 -14
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
const VERSION = "2.5";
|
|
11
|
+
import { GNDebug } from "./logger/GNDebug";
|
|
12
|
+
import { GNSupport } from "./helper/GNSupport";
|
|
13
|
+
import { NetworkingPeer } from "./networking/NetworkingPeer";
|
|
14
|
+
import { CodeHelper } from "./helper/CodeHelper";
|
|
15
|
+
import store from "store";
|
|
16
|
+
import { ServiceUpdate } from "./typescript/ServiceUpdate";
|
|
17
|
+
import { AuthenticateApi } from "./GNNetworkAuthenticateApi";
|
|
18
|
+
import { CharacterPlayerApi } from "./GNNetworkCharacterPlayerApi";
|
|
19
|
+
import { ContentApi } from "./GNNetworkContentApi";
|
|
20
|
+
import { DashboardApi } from "./GNNetworkDashboardApi";
|
|
21
|
+
import { GamePlayerApi } from "./GNNetworkGamePlayerApi";
|
|
22
|
+
import { GroupApi } from "./GNNetworkGroupApi";
|
|
23
|
+
import { InventoryApi } from "./GNNetworkInventoryApi";
|
|
24
|
+
import { MasterPlayerApi } from "./GNNetworkMasterPlayerApi";
|
|
25
|
+
import { StoreInventoryApi } from "./GNNetworkStoreInventoryApi";
|
|
26
|
+
import { ConverterService } from "./helper/ConverterService";
|
|
27
|
+
import { MultiplayerApi } from "./GNNetworkMultiplayerApi";
|
|
28
|
+
import { CloudScriptApi } from "./GNNetworkCloudScriptApi";
|
|
29
|
+
export class GNNetwork {
|
|
30
|
+
static getGNServerSettings() {
|
|
31
|
+
return GNNetwork.gnServerSettings;
|
|
32
|
+
}
|
|
33
|
+
static getPing() {
|
|
34
|
+
return GNNetwork.peer != null ? GNNetwork.peer.getPing() : -1;
|
|
35
|
+
}
|
|
36
|
+
static getSocketSId() {
|
|
37
|
+
return GNNetwork.peer != null ? GNNetwork.peer.getClientId() : "";
|
|
38
|
+
}
|
|
39
|
+
static sendRequestAuthSocket() {
|
|
40
|
+
return GNNetwork.peer.sendRequestAuthSocket();
|
|
41
|
+
}
|
|
42
|
+
static isSocketConnected() {
|
|
43
|
+
let socketSId = GNNetwork.getSocketSId();
|
|
44
|
+
if (socketSId)
|
|
45
|
+
return true;
|
|
46
|
+
return false;
|
|
47
|
+
}
|
|
48
|
+
static getServerTimestamp() {
|
|
49
|
+
return GNNetwork.peer != null ? GNNetwork.peer.getServerTimestamp() : new Date().getUTCMilliseconds();
|
|
50
|
+
}
|
|
51
|
+
static getAuthenticateStatus() {
|
|
52
|
+
return GNNetwork.peer.authenticateStatus;
|
|
53
|
+
}
|
|
54
|
+
static getGameId() {
|
|
55
|
+
return GNNetwork.peer.gameId;
|
|
56
|
+
}
|
|
57
|
+
static getPlatform() {
|
|
58
|
+
return 17;
|
|
59
|
+
}
|
|
60
|
+
static init(gnServerSettings) {
|
|
61
|
+
if (GNNetwork.gnServerSettings != null) {
|
|
62
|
+
GNDebug.log("GNNetwork has been init!");
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
GNSupport.init();
|
|
66
|
+
CodeHelper.init();
|
|
67
|
+
ConverterService.init();
|
|
68
|
+
GNNetwork.gnServerSettings = gnServerSettings;
|
|
69
|
+
GNNetwork.initServerSettings();
|
|
70
|
+
GNNetwork.initGNDebug();
|
|
71
|
+
GNDebug.log("GNNetwork init on " + (GNSupport.isBrowser() ? "browser." : "server.") + " Version: " + GNNetwork.getClientSdkVersion());
|
|
72
|
+
GNNetwork.initGNSocketObject();
|
|
73
|
+
GNNetwork.peer.authenticateStatus.setAuthToken(store.get(GNNetwork.AUTH_TOKEN_KEY, ""));
|
|
74
|
+
GNNetwork.peer.authenticateStatus.setUserId(store.get(GNNetwork.USER_ID_KEY, ""));
|
|
75
|
+
GNNetwork.peer.gameId = store.get(GNNetwork.GAME_ID_KEY, "");
|
|
76
|
+
GNNetwork.authenticate = new AuthenticateApi();
|
|
77
|
+
GNNetwork.characterPlayer = new CharacterPlayerApi();
|
|
78
|
+
GNNetwork.content = new ContentApi();
|
|
79
|
+
GNNetwork.dashboard = new DashboardApi();
|
|
80
|
+
GNNetwork.gamePlayer = new GamePlayerApi();
|
|
81
|
+
GNNetwork.group = new GroupApi();
|
|
82
|
+
GNNetwork.inventory = new InventoryApi();
|
|
83
|
+
GNNetwork.masterPlayer = new MasterPlayerApi();
|
|
84
|
+
GNNetwork.storeInventory = new StoreInventoryApi();
|
|
85
|
+
GNNetwork.multiplayer = new MultiplayerApi();
|
|
86
|
+
GNNetwork.cloudScript = new CloudScriptApi();
|
|
87
|
+
}
|
|
88
|
+
static setNewAuthenticateStatus(authenticateStatus) {
|
|
89
|
+
store.set(GNNetwork.AUTH_TOKEN_KEY, authenticateStatus.getAuthToken());
|
|
90
|
+
store.set(GNNetwork.USER_ID_KEY, authenticateStatus.getUserId());
|
|
91
|
+
GNNetwork.peer.authenticateStatus.setAuthToken(authenticateStatus.getAuthToken());
|
|
92
|
+
GNNetwork.peer.authenticateStatus.setUserId(authenticateStatus.getUserId());
|
|
93
|
+
}
|
|
94
|
+
static setGameId(gameId) {
|
|
95
|
+
store.set(GNNetwork.GAME_ID_KEY, gameId);
|
|
96
|
+
GNNetwork.peer.gameId = gameId;
|
|
97
|
+
}
|
|
98
|
+
static getClientSdkVersion() {
|
|
99
|
+
return VERSION;
|
|
100
|
+
}
|
|
101
|
+
static initServerSettings() {
|
|
102
|
+
// gnServerSettings = Resources.Load(GNServerSettings.ResourcesPath) as GNServerSettings;
|
|
103
|
+
// if (gnServerSettings == null)
|
|
104
|
+
// {
|
|
105
|
+
// #if UNITY_EDITOR
|
|
106
|
+
// UnityEditor.EditorApplication.ExecuteMenuItem("XmobiTea GN/Open Settings");
|
|
107
|
+
// gnServerSettings = Resources.Load(GNServerSettings.ResourcesPath) as GNServerSettings;
|
|
108
|
+
// if (gnServerSettings == null) throw new NullReferenceException("Null GN Server Settings, please find it now");
|
|
109
|
+
// #endif
|
|
110
|
+
// }
|
|
111
|
+
}
|
|
112
|
+
static initGNDebug() {
|
|
113
|
+
if (GNNetwork.gnServerSettings == null)
|
|
114
|
+
throw new Error("Null GN Server Settings, please find it now");
|
|
115
|
+
GNDebug.setLogType(GNNetwork.gnServerSettings.getLogType());
|
|
116
|
+
}
|
|
117
|
+
static initGNSocketObject() {
|
|
118
|
+
let peer = new NetworkingPeer();
|
|
119
|
+
peer.initPeer();
|
|
120
|
+
GNNetwork.peer = peer;
|
|
121
|
+
let serviceUpdate = new ServiceUpdate();
|
|
122
|
+
serviceUpdate.peer = peer;
|
|
123
|
+
serviceUpdate.run();
|
|
124
|
+
}
|
|
125
|
+
static sendViaSocket(requestType, requestRole, request, onResponse, overrideAuthToken, overrideSecretKey, customTags) {
|
|
126
|
+
GNNetwork.peer.sendViaSocket(requestType, requestRole, request, onResponse, overrideAuthToken, overrideSecretKey, customTags);
|
|
127
|
+
}
|
|
128
|
+
static sendViaSocketAsync(requestType, requestRole, request, overrideAuthToken, overrideSecretKey, customTags) {
|
|
129
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
130
|
+
return new Promise((resolve) => {
|
|
131
|
+
GNNetwork.sendViaSocket(requestType, requestRole, request, (response) => {
|
|
132
|
+
resolve(response);
|
|
133
|
+
}, overrideAuthToken, overrideSecretKey, customTags);
|
|
134
|
+
});
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
static sendViaHttp(requestType, requestRole, request, onResponse, overrideAuthToken, overrideSecretKey, customTags) {
|
|
138
|
+
GNNetwork.peer.sendViaHttp(requestType, requestRole, request, onResponse, overrideAuthToken, overrideSecretKey, customTags);
|
|
139
|
+
}
|
|
140
|
+
static sendViaHttpAsync(requestType, requestRole, request, overrideAuthToken, overrideSecretKey, customTags) {
|
|
141
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
142
|
+
return new Promise((resolve) => {
|
|
143
|
+
GNNetwork.sendViaHttp(requestType, requestRole, request, (response) => {
|
|
144
|
+
resolve(response);
|
|
145
|
+
}, overrideAuthToken, overrideSecretKey, customTags);
|
|
146
|
+
});
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
static sendViaSocketTRequestTResponse(request, onResponse = null, overrideAuthToken, overrideSecretKey, customTags, customOperationResponseCls) {
|
|
150
|
+
GNNetwork.sendViaSocketTResponse(request.getRequestType(), request.getRequestRole(), request.build(), onResponse, overrideAuthToken, overrideSecretKey, customTags, customOperationResponseCls);
|
|
151
|
+
}
|
|
152
|
+
static sendViaSocketTRequestTResponseAsync(request, overrideAuthToken, overrideSecretKey, customTags, customOperationResponseCls) {
|
|
153
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
154
|
+
return new Promise((resolve) => {
|
|
155
|
+
GNNetwork.sendViaSocketTRequestTResponse(request, (response) => {
|
|
156
|
+
resolve(response);
|
|
157
|
+
}, overrideAuthToken, overrideSecretKey, customTags, customOperationResponseCls);
|
|
158
|
+
});
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
static sendViaHttpTRequestTResponse(request, onResponse = null, overrideAuthToken, overrideSecretKey, customTags, customOperationResponseCls) {
|
|
162
|
+
GNNetwork.sendViaHttpTResponse(request.getRequestType(), request.getRequestRole(), request.build(), onResponse, overrideAuthToken, overrideSecretKey, customTags, customOperationResponseCls);
|
|
163
|
+
}
|
|
164
|
+
static sendViaHttpTRequestTResponseAsync(request, overrideAuthToken, overrideSecretKey, customTags, customOperationResponseCls) {
|
|
165
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
166
|
+
return new Promise((resolve) => {
|
|
167
|
+
GNNetwork.sendViaHttpTRequestTResponse(request, (response) => {
|
|
168
|
+
resolve(response);
|
|
169
|
+
}, overrideAuthToken, overrideSecretKey, customTags, customOperationResponseCls);
|
|
170
|
+
});
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
static sendViaSocketTResponse(requestType, requestRole, request, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, customOperationResponseCls) {
|
|
174
|
+
GNNetwork.sendViaSocket(requestType, requestRole, request, response => {
|
|
175
|
+
if (response == null)
|
|
176
|
+
return;
|
|
177
|
+
let customOperationResponse = new customOperationResponseCls();
|
|
178
|
+
customOperationResponse.setupOperationResponse(response);
|
|
179
|
+
if (onResponse != null)
|
|
180
|
+
onResponse(customOperationResponse);
|
|
181
|
+
}, overrideAuthToken, overrideSecretKey, customTags);
|
|
182
|
+
}
|
|
183
|
+
static sendViaSocketTResponseAsync(requestType_1, requestRole_1, request_1) {
|
|
184
|
+
return __awaiter(this, arguments, void 0, function* (requestType, requestRole, request, overrideAuthToken = null, overrideSecretKey = null, customTags = null, customOperationResponseCls) {
|
|
185
|
+
return new Promise((resolve) => {
|
|
186
|
+
GNNetwork.sendViaSocketTResponse(requestType, requestRole, request, (response) => {
|
|
187
|
+
resolve(response);
|
|
188
|
+
}, overrideAuthToken, overrideSecretKey, customTags, customOperationResponseCls);
|
|
189
|
+
});
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
static sendViaHttpTResponse(requestType, requestRole, request, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, customOperationResponseCls) {
|
|
193
|
+
GNNetwork.sendViaHttp(requestType, requestRole, request, response => {
|
|
194
|
+
if (response == null)
|
|
195
|
+
return;
|
|
196
|
+
let customOperationResponse = new customOperationResponseCls();
|
|
197
|
+
customOperationResponse.setupOperationResponse(response);
|
|
198
|
+
if (onResponse != null)
|
|
199
|
+
onResponse(customOperationResponse);
|
|
200
|
+
}, overrideAuthToken, overrideSecretKey, customTags);
|
|
201
|
+
}
|
|
202
|
+
static sendViaHttpTResponseAsync(requestType_1, requestRole_1, request_1) {
|
|
203
|
+
return __awaiter(this, arguments, void 0, function* (requestType, requestRole, request, overrideAuthToken = null, overrideSecretKey = null, customTags = null, customOperationResponseCls) {
|
|
204
|
+
return new Promise((resolve) => {
|
|
205
|
+
GNNetwork.sendViaHttpTResponse(requestType, requestRole, request, (response) => {
|
|
206
|
+
resolve(response);
|
|
207
|
+
}, overrideAuthToken, overrideSecretKey, customTags, customOperationResponseCls);
|
|
208
|
+
});
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
static connectSocket(_onSocketConnect = null) {
|
|
212
|
+
this.peer.connectSocket(_onSocketConnect);
|
|
213
|
+
}
|
|
214
|
+
static disconnectSocket(_onSocketDisconnect = null) {
|
|
215
|
+
this.peer.disconnectSocket(_onSocketDisconnect);
|
|
216
|
+
}
|
|
217
|
+
static setOnEventHandler(_onEventHandler) {
|
|
218
|
+
this.peer.setOnEventHandler(_onEventHandler);
|
|
219
|
+
}
|
|
220
|
+
static subscriberOnConnectHandler(_onConnectHandler) {
|
|
221
|
+
this.peer.setOnConnectHandler(_onConnectHandler);
|
|
222
|
+
}
|
|
223
|
+
static subscriberOnDisconnectHandler(_onDisconnectHandler) {
|
|
224
|
+
this.peer.setOnDisconnectHandler(_onDisconnectHandler);
|
|
225
|
+
}
|
|
226
|
+
static unscriberOnConnectHandler(_onConnectHandler) {
|
|
227
|
+
this.peer.removeOnConnectHandler(_onConnectHandler);
|
|
228
|
+
}
|
|
229
|
+
static unsubscriberOnDisconnectHandler(_onDisconnectHandler) {
|
|
230
|
+
this.peer.removeOnDisconnectHandler(_onDisconnectHandler);
|
|
231
|
+
}
|
|
232
|
+
static subscriberServerEventHandler(serverEventHandler) {
|
|
233
|
+
this.peer.subscriberServerEventHandler(serverEventHandler);
|
|
234
|
+
}
|
|
235
|
+
static syncTs(onResponse = null) {
|
|
236
|
+
this.peer.syncTs(onResponse);
|
|
237
|
+
}
|
|
238
|
+
static syncTsAsync() {
|
|
239
|
+
return new Promise((resolve) => {
|
|
240
|
+
GNNetwork.syncTs((response) => {
|
|
241
|
+
resolve(response);
|
|
242
|
+
});
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
static getAuthInfo(authToken, onResponse = null) {
|
|
246
|
+
this.peer.getAuthInfo(authToken, onResponse);
|
|
247
|
+
}
|
|
248
|
+
static getAuthInfoAsync(authToken) {
|
|
249
|
+
return new Promise((resolve) => {
|
|
250
|
+
GNNetwork.getAuthInfo(authToken, (response) => {
|
|
251
|
+
resolve(response);
|
|
252
|
+
});
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
GNNetwork.AUTH_TOKEN_KEY = "[GN]_AUTH_TOKEN_KEY";
|
|
257
|
+
GNNetwork.USER_ID_KEY = "[GN]_USER_ID_KEY";
|
|
258
|
+
GNNetwork.GAME_ID_KEY = "[GN]_GAME_ID_KEY";
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { GNNetwork } from "./GNNetwork";
|
|
11
|
+
import { OperationRequest } from "./entity/OperationRequest";
|
|
12
|
+
import { AuthenticateRequestModels } from "./entity/models/AuthenticateRequestModels";
|
|
13
|
+
import { AuthenticateResponseModels } from "./entity/models/AuthenticateResponseModels";
|
|
14
|
+
export class AuthenticateApi {
|
|
15
|
+
constructor() {
|
|
16
|
+
this.server = new ServerAuthenticateApi();
|
|
17
|
+
this.admin = new AdminAuthenticateApi();
|
|
18
|
+
}
|
|
19
|
+
loginByAccount(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
20
|
+
GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.LoginByAccountOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByAccountOperationResponse);
|
|
21
|
+
}
|
|
22
|
+
loginByAccountAsync(requestData_1) {
|
|
23
|
+
return __awaiter(this, arguments, void 0, function* (requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
24
|
+
return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.LoginByAccountOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByAccountOperationResponse);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
loginByAndroidDeviceId(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
28
|
+
GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.LoginByAndroidDeviceIdOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByAndroidDeviceIdOperationResponse);
|
|
29
|
+
}
|
|
30
|
+
loginByAndroidDeviceIdAsync(requestData_1) {
|
|
31
|
+
return __awaiter(this, arguments, void 0, function* (requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
32
|
+
return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.LoginByAndroidDeviceIdOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByAndroidDeviceIdOperationResponse);
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
loginByApple(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
36
|
+
GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.LoginByAppleOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByAppleOperationResponse);
|
|
37
|
+
}
|
|
38
|
+
loginByAppleAsync(requestData_1) {
|
|
39
|
+
return __awaiter(this, arguments, void 0, function* (requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
40
|
+
return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.LoginByAppleOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByAppleOperationResponse);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
loginByCustomDeviceId(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
44
|
+
GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.LoginByCustomDeviceIdOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByCustomDeviceIdOperationResponse);
|
|
45
|
+
}
|
|
46
|
+
loginByCustomDeviceIdAsync(requestData_1) {
|
|
47
|
+
return __awaiter(this, arguments, void 0, function* (requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
48
|
+
return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.LoginByCustomDeviceIdOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByCustomDeviceIdOperationResponse);
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
loginByCustomId(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
52
|
+
GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.LoginByCustomIdOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByCustomIdOperationResponse);
|
|
53
|
+
}
|
|
54
|
+
loginByCustomIdAsync(requestData_1) {
|
|
55
|
+
return __awaiter(this, arguments, void 0, function* (requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
56
|
+
return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.LoginByCustomIdOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByCustomIdOperationResponse);
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
loginByEditorDeviceId(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
60
|
+
GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.LoginByEditorDeviceIdOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByEditorDeviceIdOperationResponse);
|
|
61
|
+
}
|
|
62
|
+
loginByEditorDeviceIdAsync(requestData_1) {
|
|
63
|
+
return __awaiter(this, arguments, void 0, function* (requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
64
|
+
return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.LoginByEditorDeviceIdOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByEditorDeviceIdOperationResponse);
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
loginByFacebook(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
68
|
+
GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.LoginByFacebookOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByFacebookOperationResponse);
|
|
69
|
+
}
|
|
70
|
+
loginByFacebookAsync(requestData_1) {
|
|
71
|
+
return __awaiter(this, arguments, void 0, function* (requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
72
|
+
return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.LoginByFacebookOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByFacebookOperationResponse);
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
loginByGenericService(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
76
|
+
GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.LoginByGenericServiceOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByGenericServiceOperationResponse);
|
|
77
|
+
}
|
|
78
|
+
loginByGenericServiceAsync(requestData_1) {
|
|
79
|
+
return __awaiter(this, arguments, void 0, function* (requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
80
|
+
return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.LoginByGenericServiceOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByGenericServiceOperationResponse);
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
loginByGoogle(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
84
|
+
GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.LoginByGoogleOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByGoogleOperationResponse);
|
|
85
|
+
}
|
|
86
|
+
loginByGoogleAsync(requestData_1) {
|
|
87
|
+
return __awaiter(this, arguments, void 0, function* (requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
88
|
+
return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.LoginByGoogleOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByGoogleOperationResponse);
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
loginByGooglePlayGameService(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
92
|
+
GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.LoginByGooglePlayGameServiceOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByGooglePlayGameServiceOperationResponse);
|
|
93
|
+
}
|
|
94
|
+
loginByGooglePlayGameServiceAsync(requestData_1) {
|
|
95
|
+
return __awaiter(this, arguments, void 0, function* (requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
96
|
+
return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.LoginByGooglePlayGameServiceOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByGooglePlayGameServiceOperationResponse);
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
loginByGameCenter(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
100
|
+
GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.LoginByGameCenterOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByGameCenterOperationResponse);
|
|
101
|
+
}
|
|
102
|
+
loginByGameCenterAsync(requestData_1) {
|
|
103
|
+
return __awaiter(this, arguments, void 0, function* (requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
104
|
+
return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.LoginByGameCenterOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByGameCenterOperationResponse);
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
loginByiOSDeviceId(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
108
|
+
GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.LoginByiOSDeviceIdOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByiOSDeviceIdOperationResponse);
|
|
109
|
+
}
|
|
110
|
+
loginByiOSDeviceIdAsync(requestData_1) {
|
|
111
|
+
return __awaiter(this, arguments, void 0, function* (requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
112
|
+
return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.LoginByiOSDeviceIdOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByiOSDeviceIdOperationResponse);
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
loginByLinuxDeviceId(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
116
|
+
GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.LoginByLinuxDeviceIdOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByLinuxDeviceIdOperationResponse);
|
|
117
|
+
}
|
|
118
|
+
loginByLinuxDeviceIdAsync(requestData_1) {
|
|
119
|
+
return __awaiter(this, arguments, void 0, function* (requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
120
|
+
return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.LoginByLinuxDeviceIdOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByLinuxDeviceIdOperationResponse);
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
loginByMacOSDeviceId(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
124
|
+
GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.LoginByMacOSDeviceIdOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByMacOSDeviceIdOperationResponse);
|
|
125
|
+
}
|
|
126
|
+
loginByMacOSDeviceIdAsync(requestData_1) {
|
|
127
|
+
return __awaiter(this, arguments, void 0, function* (requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
128
|
+
return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.LoginByMacOSDeviceIdOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByMacOSDeviceIdOperationResponse);
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
loginByWindowsDeviceId(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
132
|
+
GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.LoginByWindowsDeviceIdOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByWindowsDeviceIdOperationResponse);
|
|
133
|
+
}
|
|
134
|
+
loginByWindowsDeviceIdAsync(requestData_1) {
|
|
135
|
+
return __awaiter(this, arguments, void 0, function* (requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
136
|
+
return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.LoginByWindowsDeviceIdOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByWindowsDeviceIdOperationResponse);
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
loginByWindowsPhoneDeviceId(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
140
|
+
GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.LoginByWindowsPhoneDeviceIdOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByWindowsPhoneDeviceIdOperationResponse);
|
|
141
|
+
}
|
|
142
|
+
loginByWindowsPhoneDeviceIdAsync(requestData_1) {
|
|
143
|
+
return __awaiter(this, arguments, void 0, function* (requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
144
|
+
return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.LoginByWindowsPhoneDeviceIdOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByWindowsPhoneDeviceIdOperationResponse);
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
registerAccount(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
148
|
+
GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.RegisterAccountOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.RegisterAccountOperationResponse);
|
|
149
|
+
}
|
|
150
|
+
registerAccountAsync(requestData_1) {
|
|
151
|
+
return __awaiter(this, arguments, void 0, function* (requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
152
|
+
return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.RegisterAccountOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.RegisterAccountOperationResponse);
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
refreshAuthToken(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
156
|
+
GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.RefreshAuthTokenOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.RefreshAuthTokenOperationResponse);
|
|
157
|
+
}
|
|
158
|
+
refreshAuthTokenAsync(requestData_1) {
|
|
159
|
+
return __awaiter(this, arguments, void 0, function* (requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
160
|
+
return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.RefreshAuthTokenOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.RefreshAuthTokenOperationResponse);
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
export class ServerAuthenticateApi {
|
|
165
|
+
}
|
|
166
|
+
export class AdminAuthenticateApi {
|
|
167
|
+
}
|
|
@@ -105,6 +105,8 @@ export declare class CharacterPlayerApi {
|
|
|
105
105
|
getCurrencyLeaderboardAsync(requestData: CharacterPlayerModels.GetCurrencyLeaderboardRequestData, overrideAuthToken?: string, overrideSecretKey?: string, customTags?: GNHashtable, timeout?: number): Promise<CharacterPlayerResponseModels.GetCurrencyLeaderboardOperationResponse>;
|
|
106
106
|
getCreateLeaderboard(requestData: CharacterPlayerModels.GetCreateLeaderboardRequestData, onResponse?: Action1<CharacterPlayerResponseModels.GetCreateLeaderboardOperationResponse>, overrideAuthToken?: string, overrideSecretKey?: string, customTags?: GNHashtable, timeout?: number): void;
|
|
107
107
|
getCreateLeaderboardAsync(requestData: CharacterPlayerModels.GetCreateLeaderboardRequestData, overrideAuthToken?: string, overrideSecretKey?: string, customTags?: GNHashtable, timeout?: number): Promise<CharacterPlayerResponseModels.GetCreateLeaderboardOperationResponse>;
|
|
108
|
+
getLastLoginLeaderboard(requestData: CharacterPlayerModels.GetLastLoginLeaderboardRequestData, onResponse?: Action1<CharacterPlayerResponseModels.GetLastLoginLeaderboardOperationResponse>, overrideAuthToken?: string, overrideSecretKey?: string, customTags?: GNHashtable, timeout?: number): void;
|
|
109
|
+
getLastLoginLeaderboardAsync(requestData: CharacterPlayerModels.GetLastLoginLeaderboardRequestData, overrideAuthToken?: string, overrideSecretKey?: string, customTags?: GNHashtable, timeout?: number): Promise<CharacterPlayerResponseModels.GetLastLoginLeaderboardOperationResponse>;
|
|
108
110
|
getStatisticsLog(requestData: CharacterPlayerModels.GetStatisticsLogRequestData, onResponse?: Action1<CharacterPlayerResponseModels.GetStatisticsLogOperationResponse>, overrideAuthToken?: string, overrideSecretKey?: string, customTags?: GNHashtable, timeout?: number): void;
|
|
109
111
|
getStatisticsLogAsync(requestData: CharacterPlayerModels.GetStatisticsLogRequestData, overrideAuthToken?: string, overrideSecretKey?: string, customTags?: GNHashtable, timeout?: number): Promise<CharacterPlayerResponseModels.GetStatisticsLogOperationResponse>;
|
|
110
112
|
getCurrencyLog(requestData: CharacterPlayerModels.GetCurrencyLogRequestData, onResponse?: Action1<CharacterPlayerResponseModels.GetCurrencyLogOperationResponse>, overrideAuthToken?: string, overrideSecretKey?: string, customTags?: GNHashtable, timeout?: number): void;
|
|
@@ -211,6 +213,8 @@ export declare class ServerCharacterPlayerApi {
|
|
|
211
213
|
getCurrencyLeaderboardAsync(requestData: CharacterPlayerModels.ServerGetCurrencyLeaderboardRequestData, overrideAuthToken?: string, overrideSecretKey?: string, customTags?: GNHashtable, timeout?: number): Promise<CharacterPlayerResponseModels.GetCurrencyLeaderboardOperationResponse>;
|
|
212
214
|
getCreateLeaderboard(requestData: CharacterPlayerModels.ServerGetCreateLeaderboardRequestData, onResponse?: Action1<CharacterPlayerResponseModels.GetCreateLeaderboardOperationResponse>, overrideAuthToken?: string, overrideSecretKey?: string, customTags?: GNHashtable, timeout?: number): void;
|
|
213
215
|
getCreateLeaderboardAsync(requestData: CharacterPlayerModels.ServerGetCreateLeaderboardRequestData, overrideAuthToken?: string, overrideSecretKey?: string, customTags?: GNHashtable, timeout?: number): Promise<CharacterPlayerResponseModels.GetCreateLeaderboardOperationResponse>;
|
|
216
|
+
getLastLoginLeaderboard(requestData: CharacterPlayerModels.ServerGetLastLoginLeaderboardRequestData, onResponse?: Action1<CharacterPlayerResponseModels.GetLastLoginLeaderboardOperationResponse>, overrideAuthToken?: string, overrideSecretKey?: string, customTags?: GNHashtable, timeout?: number): void;
|
|
217
|
+
getLastLoginLeaderboardAsync(requestData: CharacterPlayerModels.ServerGetLastLoginLeaderboardRequestData, overrideAuthToken?: string, overrideSecretKey?: string, customTags?: GNHashtable, timeout?: number): Promise<CharacterPlayerResponseModels.GetLastLoginLeaderboardOperationResponse>;
|
|
214
218
|
getStatisticsLog(requestData: CharacterPlayerModels.ServerGetStatisticsLogRequestData, onResponse?: Action1<CharacterPlayerResponseModels.GetStatisticsLogOperationResponse>, overrideAuthToken?: string, overrideSecretKey?: string, customTags?: GNHashtable, timeout?: number): void;
|
|
215
219
|
getStatisticsLogAsync(requestData: CharacterPlayerModels.ServerGetStatisticsLogRequestData, overrideAuthToken?: string, overrideSecretKey?: string, customTags?: GNHashtable, timeout?: number): Promise<CharacterPlayerResponseModels.GetStatisticsLogOperationResponse>;
|
|
216
220
|
getCurrencyLog(requestData: CharacterPlayerModels.ServerGetCurrencyLogRequestData, onResponse?: Action1<CharacterPlayerResponseModels.GetCurrencyLogOperationResponse>, overrideAuthToken?: string, overrideSecretKey?: string, customTags?: GNHashtable, timeout?: number): void;
|
|
@@ -317,6 +321,8 @@ export declare class AdminCharacterPlayerApi {
|
|
|
317
321
|
getCurrencyLeaderboardAsync(requestData: CharacterPlayerModels.AdminGetCurrencyLeaderboardRequestData, overrideAuthToken?: string, overrideSecretKey?: string, customTags?: GNHashtable, timeout?: number): Promise<CharacterPlayerResponseModels.GetCurrencyLeaderboardOperationResponse>;
|
|
318
322
|
getCreateLeaderboard(requestData: CharacterPlayerModels.AdminGetCreateLeaderboardRequestData, onResponse?: Action1<CharacterPlayerResponseModels.GetCreateLeaderboardOperationResponse>, overrideAuthToken?: string, overrideSecretKey?: string, customTags?: GNHashtable, timeout?: number): void;
|
|
319
323
|
getCreateLeaderboardAsync(requestData: CharacterPlayerModels.AdminGetCreateLeaderboardRequestData, overrideAuthToken?: string, overrideSecretKey?: string, customTags?: GNHashtable, timeout?: number): Promise<CharacterPlayerResponseModels.GetCreateLeaderboardOperationResponse>;
|
|
324
|
+
getLastLoginLeaderboard(requestData: CharacterPlayerModels.AdminGetLastLoginLeaderboardRequestData, onResponse?: Action1<CharacterPlayerResponseModels.GetLastLoginLeaderboardOperationResponse>, overrideAuthToken?: string, overrideSecretKey?: string, customTags?: GNHashtable, timeout?: number): void;
|
|
325
|
+
getLastLoginLeaderboardAsync(requestData: CharacterPlayerModels.AdminGetLastLoginLeaderboardRequestData, overrideAuthToken?: string, overrideSecretKey?: string, customTags?: GNHashtable, timeout?: number): Promise<CharacterPlayerResponseModels.GetLastLoginLeaderboardOperationResponse>;
|
|
320
326
|
getStatisticsLog(requestData: CharacterPlayerModels.AdminGetStatisticsLogRequestData, onResponse?: Action1<CharacterPlayerResponseModels.GetStatisticsLogOperationResponse>, overrideAuthToken?: string, overrideSecretKey?: string, customTags?: GNHashtable, timeout?: number): void;
|
|
321
327
|
getStatisticsLogAsync(requestData: CharacterPlayerModels.AdminGetStatisticsLogRequestData, overrideAuthToken?: string, overrideSecretKey?: string, customTags?: GNHashtable, timeout?: number): Promise<CharacterPlayerResponseModels.GetStatisticsLogOperationResponse>;
|
|
322
328
|
getCurrencyLog(requestData: CharacterPlayerModels.AdminGetCurrencyLogRequestData, onResponse?: Action1<CharacterPlayerResponseModels.GetCurrencyLogOperationResponse>, overrideAuthToken?: string, overrideSecretKey?: string, customTags?: GNHashtable, timeout?: number): void;
|