@xmobitea/gn-typescript-client 2.6.12 → 2.6.13-tsc
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/index.d.ts +2 -2
- package/dist/index.js +339 -34236
- package/dist/runtime/GNNetwork.d.ts +1 -1
- package/dist/runtime/GNNetwork.js +273 -0
- package/dist/runtime/GNNetworkAuthenticateApi.js +122 -0
- package/dist/runtime/GNNetworkCharacterPlayerApi.js +968 -0
- package/dist/runtime/GNNetworkCloudScriptApi.js +104 -0
- package/dist/runtime/GNNetworkContentApi.js +140 -0
- package/dist/runtime/GNNetworkDashboardApi.js +170 -0
- package/dist/runtime/GNNetworkGamePlayerApi.js +950 -0
- package/dist/runtime/GNNetworkGroupApi.js +734 -0
- package/dist/runtime/GNNetworkInventoryApi.js +626 -0
- package/dist/runtime/GNNetworkMasterPlayerApi.js +1550 -0
- package/dist/runtime/GNNetworkMultiplayerApi.js +194 -0
- package/dist/runtime/GNNetworkStoreInventoryApi.js +266 -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 +209 -0
- package/dist/runtime/config/GNServerSettings.js +156 -0
- package/dist/runtime/constant/Commands.js +20 -0
- package/dist/runtime/constant/EventCode.js +8 -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 +9 -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.js +5 -0
- package/dist/runtime/constant/enumType/StoreReceiveType.js +8 -0
- package/dist/runtime/constant/errorCode/ErrorCode.js +52 -0
- package/dist/runtime/constant/parameterCode/ParameterCode.js +617 -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 +24 -0
- package/dist/runtime/entity/OperationRequest.js +42 -0
- package/dist/runtime/entity/OperationResponse.js +73 -0
- package/dist/runtime/entity/models/AuthenticateModels.js +426 -0
- package/dist/runtime/entity/models/AuthenticateRequestModels.js +188 -0
- package/dist/runtime/entity/models/AuthenticateResponseModels.js +131 -0
- package/dist/runtime/entity/models/CharacterPlayerModels.js +1433 -0
- package/dist/runtime/entity/models/CharacterPlayerRequestModels.js +1386 -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 +138 -0
- package/dist/runtime/entity/models/CloudScriptResponseModels.js +40 -0
- package/dist/runtime/entity/models/ContentModels.js +203 -0
- package/dist/runtime/entity/models/ContentRequestModels.js +190 -0
- package/dist/runtime/entity/models/ContentResponseModels.js +54 -0
- package/dist/runtime/entity/models/DashboardModels.js +3002 -0
- package/dist/runtime/entity/models/DashboardRequestModels.js +268 -0
- package/dist/runtime/entity/models/DashboardResponseModels.js +187 -0
- package/dist/runtime/entity/models/GamePlayerModels.js +1591 -0
- package/dist/runtime/entity/models/GamePlayerRequestModels.js +1360 -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 +1135 -0
- package/dist/runtime/entity/models/GroupRequestModels.js +1048 -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 +892 -0
- package/dist/runtime/entity/models/InventoryResponseModels.js +243 -0
- package/dist/runtime/entity/models/MasterPlayerModels.js +2573 -0
- package/dist/runtime/entity/models/MasterPlayerRequestModels.js +2228 -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 +268 -0
- package/dist/runtime/entity/models/MultiplayerResponseModels.js +75 -0
- package/dist/runtime/entity/models/StoreInventoryModels.js +797 -0
- package/dist/runtime/entity/models/StoreInventoryRequestModels.js +372 -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/entity/response/HealthCheckResponse.js +2 -0
- package/dist/runtime/entity/response/UploadFileResponse.js +2 -0
- package/dist/runtime/helper/CodeHelper.js +63 -0
- package/dist/runtime/helper/ConverterService.js +275 -0
- package/dist/runtime/helper/EnumUtility.js +33 -0
- package/dist/runtime/helper/GNSupport.d.ts +20 -0
- package/dist/runtime/helper/GNSupport.js +47 -0
- package/dist/runtime/helper/GNUtils.js +72 -0
- package/dist/runtime/helper/MessagePackConverterService.js +9 -0
- package/dist/runtime/{entity → helper}/OperationHelper.d.ts +1 -1
- package/dist/runtime/helper/OperationHelper.js +24 -0
- package/dist/runtime/helper/StorageService.d.ts +18 -0
- package/dist/runtime/helper/StorageService.js +62 -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.d.ts +1 -1
- package/dist/runtime/networking/NetworkingPeer.js +210 -0
- package/dist/runtime/networking/OperationPending.js +53 -0
- package/dist/runtime/networking/PeerBase.js +161 -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 +43 -0
- package/dist/runtime/networking/http/HttpPeer.js +123 -0
- package/dist/runtime/networking/http/NetworkingHttpPeerBase.js +9 -0
- package/dist/runtime/networking/http/NetworkingPeerAxiosRequest.js +179 -0
- package/dist/runtime/networking/socket/NetworkingPeerSocketIOClient.js +130 -0
- package/dist/runtime/networking/socket/NetworkingSocketPeerBase.js +165 -0
- package/dist/runtime/networking/socket/SocketPeer.js +115 -0
- package/dist/runtime/typescript/ServiceUpdate.d.ts +2 -0
- package/dist/runtime/typescript/ServiceUpdate.js +22 -0
- package/docs/COCOS_CREATOR_INTEGRATION.md +116 -0
- package/examples/cocos-creator/GearNExample.ts.txt +176 -0
- package/package.json +4 -3
- package/srcSwift/Package.swift +32 -0
- package/srcSwift/Sources/GearN/runtime/GNNetwork.swift +530 -0
- package/srcSwift/Sources/GearN/runtime/GNNetworkAuthenticateApi.swift +178 -0
- package/srcSwift/Sources/GearN/runtime/GNNetworkCharacterPlayerApi.swift +1162 -0
- package/srcSwift/Sources/GearN/runtime/GNNetworkCloudScriptApi.swift +154 -0
- package/srcSwift/Sources/GearN/runtime/GNNetworkContentApi.swift +208 -0
- package/srcSwift/Sources/GearN/runtime/GNNetworkDashboardApi.swift +240 -0
- package/srcSwift/Sources/GearN/runtime/GNNetworkGamePlayerApi.swift +1369 -0
- package/srcSwift/Sources/GearN/runtime/GNNetworkGroupApi.swift +1100 -0
- package/srcSwift/Sources/GearN/runtime/GNNetworkInventoryApi.swift +937 -0
- package/srcSwift/Sources/GearN/runtime/GNNetworkMasterPlayerApi.swift +2323 -0
- package/srcSwift/Sources/GearN/runtime/GNNetworkMultiplayerApi.swift +298 -0
- package/srcSwift/Sources/GearN/runtime/GNNetworkStoreInventoryApi.swift +397 -0
- package/srcSwift/Sources/GearN/runtime/common/Action0.swift +3 -0
- package/srcSwift/Sources/GearN/runtime/common/Action1.swift +3 -0
- package/srcSwift/Sources/GearN/runtime/common/Action2.swift +3 -0
- package/srcSwift/Sources/GearN/runtime/common/Action3.swift +3 -0
- package/srcSwift/Sources/GearN/runtime/common/Action4.swift +3 -0
- package/srcSwift/Sources/GearN/runtime/common/GNArray.swift +204 -0
- package/srcSwift/Sources/GearN/runtime/common/GNData.swift +108 -0
- package/srcSwift/Sources/GearN/runtime/common/GNHashtable.swift +200 -0
- package/srcSwift/Sources/GearN/runtime/config/GNServerSettings.swift +95 -0
- package/srcSwift/Sources/GearN/runtime/constant/Commands.swift +28 -0
- package/srcSwift/Sources/GearN/runtime/constant/EventCode.swift +10 -0
- package/srcSwift/Sources/GearN/runtime/constant/OperationCode.swift +252 -0
- package/srcSwift/Sources/GearN/runtime/constant/ReturnCode.swift +19 -0
- package/srcSwift/Sources/GearN/runtime/constant/enumType/ExecuteResponseStatus.swift +9 -0
- package/srcSwift/Sources/GearN/runtime/constant/enumType/FriendStatus.swift +8 -0
- package/srcSwift/Sources/GearN/runtime/constant/enumType/GoogleLoginType.swift +6 -0
- package/srcSwift/Sources/GearN/runtime/constant/enumType/GroupStatus.swift +8 -0
- package/srcSwift/Sources/GearN/runtime/constant/enumType/InvalidMemberType.swift +19 -0
- package/srcSwift/Sources/GearN/runtime/constant/enumType/ItemType.swift +6 -0
- package/srcSwift/Sources/GearN/runtime/constant/enumType/MatchmakingMemberStatus.swift +7 -0
- package/srcSwift/Sources/GearN/runtime/constant/enumType/MatchmakingTicketStatus.swift +9 -0
- package/srcSwift/Sources/GearN/runtime/constant/enumType/OwnerType.swift +10 -0
- package/srcSwift/Sources/GearN/runtime/constant/enumType/PermissionDataItem.swift +6 -0
- package/srcSwift/Sources/GearN/runtime/constant/enumType/PushPlatformType.swift +6 -0
- package/srcSwift/Sources/GearN/runtime/constant/enumType/RequestRole.swift +7 -0
- package/srcSwift/Sources/GearN/runtime/constant/enumType/RequestType.swift +16 -0
- package/srcSwift/Sources/GearN/runtime/constant/enumType/StoreItemType.swift +6 -0
- package/srcSwift/Sources/GearN/runtime/constant/enumType/StoreReceiveType.swift +9 -0
- package/srcSwift/Sources/GearN/runtime/constant/errorCode/ErrorCode.swift +58 -0
- package/srcSwift/Sources/GearN/runtime/constant/parameterCode/ParameterCode.swift +672 -0
- package/srcSwift/Sources/GearN/runtime/entity/DataMember.swift +196 -0
- package/srcSwift/Sources/GearN/runtime/entity/GNMetadata.swift +9 -0
- package/srcSwift/Sources/GearN/runtime/entity/InvalidMember.swift +11 -0
- package/srcSwift/Sources/GearN/runtime/entity/OperationEvent.swift +38 -0
- package/srcSwift/Sources/GearN/runtime/entity/OperationHelper.swift +28 -0
- package/srcSwift/Sources/GearN/runtime/entity/OperationRequest.swift +62 -0
- package/srcSwift/Sources/GearN/runtime/entity/OperationResponse.swift +98 -0
- package/srcSwift/Sources/GearN/runtime/entity/models/AuthenticateModels.swift +351 -0
- package/srcSwift/Sources/GearN/runtime/entity/models/AuthenticateRequestModels.swift +81 -0
- package/srcSwift/Sources/GearN/runtime/entity/models/AuthenticateResponseModels.swift +108 -0
- package/srcSwift/Sources/GearN/runtime/entity/models/CharacterPlayerModels.swift +1045 -0
- package/srcSwift/Sources/GearN/runtime/entity/models/CharacterPlayerRequestModels.swift +821 -0
- package/srcSwift/Sources/GearN/runtime/entity/models/CharacterPlayerResponseModels.swift +588 -0
- package/srcSwift/Sources/GearN/runtime/entity/models/CloudScriptModels.swift +187 -0
- package/srcSwift/Sources/GearN/runtime/entity/models/CloudScriptRequestModels.swift +84 -0
- package/srcSwift/Sources/GearN/runtime/entity/models/CloudScriptResponseModels.swift +59 -0
- package/srcSwift/Sources/GearN/runtime/entity/models/ContentModels.swift +195 -0
- package/srcSwift/Sources/GearN/runtime/entity/models/ContentRequestModels.swift +116 -0
- package/srcSwift/Sources/GearN/runtime/entity/models/ContentResponseModels.swift +81 -0
- package/srcSwift/Sources/GearN/runtime/entity/models/DashboardModels.swift +426 -0
- package/srcSwift/Sources/GearN/runtime/entity/models/DashboardRequestModels.swift +160 -0
- package/srcSwift/Sources/GearN/runtime/entity/models/DashboardResponseModels.swift +82 -0
- package/srcSwift/Sources/GearN/runtime/entity/models/GamePlayerModels.swift +1334 -0
- package/srcSwift/Sources/GearN/runtime/entity/models/GamePlayerRequestModels.swift +643 -0
- package/srcSwift/Sources/GearN/runtime/entity/models/GamePlayerResponseModels.swift +213 -0
- package/srcSwift/Sources/GearN/runtime/entity/models/GenericModels.swift +171 -0
- package/srcSwift/Sources/GearN/runtime/entity/models/GroupModels.swift +850 -0
- package/srcSwift/Sources/GearN/runtime/entity/models/GroupRequestModels.swift +485 -0
- package/srcSwift/Sources/GearN/runtime/entity/models/GroupResponseModels.swift +165 -0
- package/srcSwift/Sources/GearN/runtime/entity/models/InventoryModels.swift +679 -0
- package/srcSwift/Sources/GearN/runtime/entity/models/InventoryRequestModels.swift +413 -0
- package/srcSwift/Sources/GearN/runtime/entity/models/InventoryResponseModels.swift +141 -0
- package/srcSwift/Sources/GearN/runtime/entity/models/MasterPlayerModels.swift +378 -0
- package/srcSwift/Sources/GearN/runtime/entity/models/MasterPlayerRequestModels.swift +147 -0
- package/srcSwift/Sources/GearN/runtime/entity/models/MasterPlayerResponseModels.swift +318 -0
- package/srcSwift/Sources/GearN/runtime/entity/models/MultiplayerModels.swift +319 -0
- package/srcSwift/Sources/GearN/runtime/entity/models/MultiplayerRequestModels.swift +125 -0
- package/srcSwift/Sources/GearN/runtime/entity/models/MultiplayerResponseModels.swift +45 -0
- package/srcSwift/Sources/GearN/runtime/entity/models/StoreInventoryModels.swift +633 -0
- package/srcSwift/Sources/GearN/runtime/entity/models/StoreInventoryRequestModels.swift +173 -0
- package/srcSwift/Sources/GearN/runtime/entity/models/StoreInventoryResponseModels.swift +61 -0
- package/srcSwift/Sources/GearN/runtime/entity/request/CustomOperationRequest.swift +42 -0
- package/srcSwift/Sources/GearN/runtime/entity/response/CustomOperationResponse.swift +49 -0
- package/srcSwift/Sources/GearN/runtime/entity/response/GetAuthInfoResponse.swift +43 -0
- package/srcSwift/Sources/GearN/runtime/entity/response/HealthCheckResponse.swift +86 -0
- package/srcSwift/Sources/GearN/runtime/entity/response/UploadFileResponse.swift +15 -0
- package/srcSwift/Sources/GearN/runtime/helper/CodeHelper.swift +107 -0
- package/srcSwift/Sources/GearN/runtime/helper/ConverterService.swift +98 -0
- package/srcSwift/Sources/GearN/runtime/helper/EnumUtility.swift +34 -0
- package/srcSwift/Sources/GearN/runtime/helper/GNSupport.swift +41 -0
- package/srcSwift/Sources/GearN/runtime/helper/GNUtils.swift +66 -0
- package/srcSwift/Sources/GearN/runtime/helper/MessagePackConverterService.swift +21 -0
- package/srcSwift/Sources/GearN/runtime/helper/StorageService.swift +29 -0
- package/srcSwift/Sources/GearN/runtime/logger/GNDebug.swift +33 -0
- package/srcSwift/Sources/GearN/runtime/networking/AuthenticateStatus.swift +24 -0
- package/srcSwift/Sources/GearN/runtime/networking/IPeer.swift +8 -0
- package/srcSwift/Sources/GearN/runtime/networking/NetworkingPeer.swift +368 -0
- package/srcSwift/Sources/GearN/runtime/networking/OperationPending.swift +81 -0
- package/srcSwift/Sources/GearN/runtime/networking/PeerBase.swift +228 -0
- package/srcSwift/Sources/GearN/runtime/networking/handler/IServerEventHandler.swift +20 -0
- package/srcSwift/Sources/GearN/runtime/networking/http/HttpPeer.swift +226 -0
- package/srcSwift/Sources/GearN/runtime/networking/http/HttpTypes.swift +24 -0
- package/srcSwift/Sources/GearN/runtime/networking/http/NetworkingHttpPeerBase.swift +13 -0
- package/srcSwift/Sources/GearN/runtime/networking/http/NetworkingPeerUrlSession.swift +125 -0
- package/srcSwift/Sources/GearN/runtime/networking/request/NetRequest.swift +19 -0
- package/srcSwift/Sources/GearN/runtime/networking/response/NetResponse.swift +13 -0
- package/srcSwift/Sources/GearN/runtime/networking/socket/NetworkingPeerSocketIOClient.swift +244 -0
- package/srcSwift/Sources/GearN/runtime/networking/socket/NetworkingSocketPeerBase.swift +59 -0
- package/srcSwift/Sources/GearN/runtime/networking/socket/SocketPeer.swift +136 -0
- package/tsconfig-build.cocos.json +31 -0
- package/webpack.config.cocos.mjs +78 -0
- package/dist/gearn.js.client.js +0 -47228
- package/dist/gearn.js.client.min.js +0 -2
- package/dist/gearn.js.client.min.js.LICENSE.txt +0 -14
|
@@ -41,7 +41,7 @@ export declare class GNNetwork {
|
|
|
41
41
|
static getServerTimestamp(): number;
|
|
42
42
|
static getAuthenticateStatus(): AuthenticateStatus;
|
|
43
43
|
static getGameId(): string;
|
|
44
|
-
static getPlatform():
|
|
44
|
+
static getPlatform(): string;
|
|
45
45
|
static authenticate: AuthenticateApi;
|
|
46
46
|
static characterPlayer: CharacterPlayerApi;
|
|
47
47
|
static content: ContentApi;
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
const VERSION = "2.6";
|
|
2
|
+
import { GNDebug } from "./logger/GNDebug";
|
|
3
|
+
import { GNSupport } from "./helper/GNSupport";
|
|
4
|
+
import { NetworkingPeer } from "./networking/NetworkingPeer";
|
|
5
|
+
import { CodeHelper } from "./helper/CodeHelper";
|
|
6
|
+
import { StorageService } from "./helper/StorageService";
|
|
7
|
+
import { ServiceUpdate } from "./typescript/ServiceUpdate";
|
|
8
|
+
import { AuthenticateApi } from "./GNNetworkAuthenticateApi";
|
|
9
|
+
import { CharacterPlayerApi } from "./GNNetworkCharacterPlayerApi";
|
|
10
|
+
import { ContentApi } from "./GNNetworkContentApi";
|
|
11
|
+
import { DashboardApi } from "./GNNetworkDashboardApi";
|
|
12
|
+
import { GamePlayerApi } from "./GNNetworkGamePlayerApi";
|
|
13
|
+
import { GroupApi } from "./GNNetworkGroupApi";
|
|
14
|
+
import { InventoryApi } from "./GNNetworkInventoryApi";
|
|
15
|
+
import { MasterPlayerApi } from "./GNNetworkMasterPlayerApi";
|
|
16
|
+
import { StoreInventoryApi } from "./GNNetworkStoreInventoryApi";
|
|
17
|
+
import { ConverterService } from "./helper/ConverterService";
|
|
18
|
+
import { MultiplayerApi } from "./GNNetworkMultiplayerApi";
|
|
19
|
+
import { CloudScriptApi } from "./GNNetworkCloudScriptApi";
|
|
20
|
+
export class GNNetwork {
|
|
21
|
+
static getGNServerSettings() {
|
|
22
|
+
return GNNetwork.gnServerSettings;
|
|
23
|
+
}
|
|
24
|
+
static getPing() {
|
|
25
|
+
return GNNetwork.peer != null ? GNNetwork.peer.getPing() : -1;
|
|
26
|
+
}
|
|
27
|
+
static getSocketSId() {
|
|
28
|
+
return GNNetwork.peer != null ? GNNetwork.peer.getClientId() : "";
|
|
29
|
+
}
|
|
30
|
+
static sendRequestAuthSocket() {
|
|
31
|
+
return GNNetwork.peer.sendRequestAuthSocket();
|
|
32
|
+
}
|
|
33
|
+
static isSocketConnected() {
|
|
34
|
+
let socketSId = GNNetwork.getSocketSId();
|
|
35
|
+
if (socketSId)
|
|
36
|
+
return true;
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
static getServerTimestamp() {
|
|
40
|
+
return GNNetwork.peer != null ? GNNetwork.peer.getServerTimestamp() : new Date().getUTCMilliseconds();
|
|
41
|
+
}
|
|
42
|
+
static getAuthenticateStatus() {
|
|
43
|
+
return GNNetwork.peer.authenticateStatus;
|
|
44
|
+
}
|
|
45
|
+
static getGameId() {
|
|
46
|
+
return GNNetwork.peer.gameId;
|
|
47
|
+
}
|
|
48
|
+
static getPlatform() {
|
|
49
|
+
const platform = GNSupport.getPlatformType();
|
|
50
|
+
// if (platform == "browser" || platform == "nodejs") {
|
|
51
|
+
// return platform;
|
|
52
|
+
// }
|
|
53
|
+
// else if (platform == "cocos") {
|
|
54
|
+
// if (cc.sys.platform === cc.sys.ANDROID) {
|
|
55
|
+
// console.log('Running on Android');
|
|
56
|
+
// } else if (cc.sys.platform === cc.sys.IPHONE) {
|
|
57
|
+
// console.log('Running on iOS');
|
|
58
|
+
// } else if (cc.sys.isBrowser) {
|
|
59
|
+
// console.log('Running in a Web Browser');
|
|
60
|
+
// }
|
|
61
|
+
// }
|
|
62
|
+
return platform;
|
|
63
|
+
}
|
|
64
|
+
static init(gnServerSettings) {
|
|
65
|
+
if (GNNetwork.gnServerSettings != null) {
|
|
66
|
+
GNDebug.log("GNNetwork has been init!");
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
GNSupport.init();
|
|
70
|
+
CodeHelper.init();
|
|
71
|
+
ConverterService.init();
|
|
72
|
+
GNNetwork.gnServerSettings = gnServerSettings;
|
|
73
|
+
GNNetwork.initServerSettings();
|
|
74
|
+
GNNetwork.initGNDebug();
|
|
75
|
+
GNDebug.log("GNNetwork init on " + (GNSupport.isBrowser() ? "browser." : "server.") + " Version: " + GNNetwork.getClientSdkVersion());
|
|
76
|
+
GNNetwork.initGNSocketObject();
|
|
77
|
+
GNNetwork.peer.authenticateStatus.setAuthToken(StorageService.getString(GNNetwork.AUTH_TOKEN_KEY, ""));
|
|
78
|
+
GNNetwork.peer.authenticateStatus.setUserId(StorageService.getString(GNNetwork.USER_ID_KEY, ""));
|
|
79
|
+
GNNetwork.peer.gameId = StorageService.getString(GNNetwork.GAME_ID_KEY, "");
|
|
80
|
+
GNNetwork.authenticate = new AuthenticateApi();
|
|
81
|
+
GNNetwork.characterPlayer = new CharacterPlayerApi();
|
|
82
|
+
GNNetwork.content = new ContentApi();
|
|
83
|
+
GNNetwork.dashboard = new DashboardApi();
|
|
84
|
+
GNNetwork.gamePlayer = new GamePlayerApi();
|
|
85
|
+
GNNetwork.group = new GroupApi();
|
|
86
|
+
GNNetwork.inventory = new InventoryApi();
|
|
87
|
+
GNNetwork.masterPlayer = new MasterPlayerApi();
|
|
88
|
+
GNNetwork.storeInventory = new StoreInventoryApi();
|
|
89
|
+
GNNetwork.multiplayer = new MultiplayerApi();
|
|
90
|
+
GNNetwork.cloudScript = new CloudScriptApi();
|
|
91
|
+
}
|
|
92
|
+
static setNewAuthenticateStatus(authenticateStatus) {
|
|
93
|
+
StorageService.setString(GNNetwork.AUTH_TOKEN_KEY, authenticateStatus.getAuthToken());
|
|
94
|
+
StorageService.setString(GNNetwork.USER_ID_KEY, authenticateStatus.getUserId());
|
|
95
|
+
GNNetwork.peer.authenticateStatus.setAuthToken(authenticateStatus.getAuthToken());
|
|
96
|
+
GNNetwork.peer.authenticateStatus.setUserId(authenticateStatus.getUserId());
|
|
97
|
+
}
|
|
98
|
+
static setGameId(gameId) {
|
|
99
|
+
StorageService.setString(GNNetwork.GAME_ID_KEY, gameId);
|
|
100
|
+
GNNetwork.peer.gameId = gameId;
|
|
101
|
+
}
|
|
102
|
+
static getClientSdkVersion() {
|
|
103
|
+
return VERSION;
|
|
104
|
+
}
|
|
105
|
+
static initServerSettings() {
|
|
106
|
+
// gnServerSettings = Resources.Load(GNServerSettings.ResourcesPath) as GNServerSettings;
|
|
107
|
+
// if (gnServerSettings == null)
|
|
108
|
+
// {
|
|
109
|
+
// #if UNITY_EDITOR
|
|
110
|
+
// UnityEditor.EditorApplication.ExecuteMenuItem("XmobiTea GN/Open Settings");
|
|
111
|
+
// gnServerSettings = Resources.Load(GNServerSettings.ResourcesPath) as GNServerSettings;
|
|
112
|
+
// if (gnServerSettings == null) throw new NullReferenceException("Null GN Server Settings, please find it now");
|
|
113
|
+
// #endif
|
|
114
|
+
// }
|
|
115
|
+
}
|
|
116
|
+
static initGNDebug() {
|
|
117
|
+
if (GNNetwork.gnServerSettings == null)
|
|
118
|
+
throw new Error("Null GN Server Settings, please find it now");
|
|
119
|
+
GNDebug.setLogType(GNNetwork.gnServerSettings.getLogType());
|
|
120
|
+
}
|
|
121
|
+
static initGNSocketObject() {
|
|
122
|
+
let peer = new NetworkingPeer();
|
|
123
|
+
peer.initPeer();
|
|
124
|
+
GNNetwork.peer = peer;
|
|
125
|
+
let serviceUpdate = new ServiceUpdate();
|
|
126
|
+
serviceUpdate.peer = peer;
|
|
127
|
+
serviceUpdate.run();
|
|
128
|
+
}
|
|
129
|
+
static sendViaSocket(requestType, role, request, onResponse, overrideAuthToken, overrideSecretKey, customTags) {
|
|
130
|
+
GNNetwork.peer.sendViaSocket(requestType, role, request, onResponse, overrideAuthToken, overrideSecretKey, customTags);
|
|
131
|
+
}
|
|
132
|
+
static async sendViaSocketAsync(requestType, role, request, overrideAuthToken, overrideSecretKey, customTags) {
|
|
133
|
+
return new Promise((resolve) => {
|
|
134
|
+
GNNetwork.sendViaSocket(requestType, role, request, (response) => {
|
|
135
|
+
resolve(response);
|
|
136
|
+
}, overrideAuthToken, overrideSecretKey, customTags);
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
static sendViaHttp(requestType, role, request, onResponse, overrideAuthToken, overrideSecretKey, customTags) {
|
|
140
|
+
GNNetwork.peer.sendViaHttp(requestType, role, request, onResponse, overrideAuthToken, overrideSecretKey, customTags);
|
|
141
|
+
}
|
|
142
|
+
static async sendViaHttpAsync(requestType, role, request, overrideAuthToken, overrideSecretKey, customTags) {
|
|
143
|
+
return new Promise((resolve) => {
|
|
144
|
+
GNNetwork.sendViaHttp(requestType, role, request, (response) => {
|
|
145
|
+
resolve(response);
|
|
146
|
+
}, overrideAuthToken, overrideSecretKey, customTags);
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
static sendViaSocketTRequestTResponse(request, onResponse = null, overrideAuthToken, overrideSecretKey, customTags, customOperationResponseCls) {
|
|
150
|
+
GNNetwork.sendViaSocketTResponse(request.getRequestType(), request.getRole(), request.build(), onResponse, overrideAuthToken, overrideSecretKey, customTags, customOperationResponseCls);
|
|
151
|
+
}
|
|
152
|
+
static async sendViaSocketTRequestTResponseAsync(request, overrideAuthToken, overrideSecretKey, customTags, customOperationResponseCls) {
|
|
153
|
+
return new Promise((resolve) => {
|
|
154
|
+
GNNetwork.sendViaSocketTRequestTResponse(request, (response) => {
|
|
155
|
+
resolve(response);
|
|
156
|
+
}, overrideAuthToken, overrideSecretKey, customTags, customOperationResponseCls);
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
static sendViaHttpTRequestTResponse(request, onResponse = null, overrideAuthToken, overrideSecretKey, customTags, customOperationResponseCls) {
|
|
160
|
+
GNNetwork.sendViaHttpTResponse(request.getRequestType(), request.getRole(), request.build(), onResponse, overrideAuthToken, overrideSecretKey, customTags, customOperationResponseCls);
|
|
161
|
+
}
|
|
162
|
+
static async sendViaHttpTRequestTResponseAsync(request, overrideAuthToken, overrideSecretKey, customTags, customOperationResponseCls) {
|
|
163
|
+
return new Promise((resolve) => {
|
|
164
|
+
GNNetwork.sendViaHttpTRequestTResponse(request, (response) => {
|
|
165
|
+
resolve(response);
|
|
166
|
+
}, overrideAuthToken, overrideSecretKey, customTags, customOperationResponseCls);
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
static sendViaSocketTResponse(requestType, role, request, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, customOperationResponseCls) {
|
|
170
|
+
GNNetwork.sendViaSocket(requestType, role, request, response => {
|
|
171
|
+
if (response == null)
|
|
172
|
+
return;
|
|
173
|
+
let customOperationResponse = new customOperationResponseCls();
|
|
174
|
+
customOperationResponse.setupOperationResponse(response);
|
|
175
|
+
if (onResponse != null)
|
|
176
|
+
onResponse(customOperationResponse);
|
|
177
|
+
}, overrideAuthToken, overrideSecretKey, customTags);
|
|
178
|
+
}
|
|
179
|
+
static async sendViaSocketTResponseAsync(requestType, role, request, overrideAuthToken = null, overrideSecretKey = null, customTags = null, customOperationResponseCls) {
|
|
180
|
+
return new Promise((resolve) => {
|
|
181
|
+
GNNetwork.sendViaSocketTResponse(requestType, role, request, (response) => {
|
|
182
|
+
resolve(response);
|
|
183
|
+
}, overrideAuthToken, overrideSecretKey, customTags, customOperationResponseCls);
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
static sendViaHttpTResponse(requestType, role, request, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, customOperationResponseCls) {
|
|
187
|
+
GNNetwork.sendViaHttp(requestType, role, request, response => {
|
|
188
|
+
if (response == null)
|
|
189
|
+
return;
|
|
190
|
+
let customOperationResponse = new customOperationResponseCls();
|
|
191
|
+
customOperationResponse.setupOperationResponse(response);
|
|
192
|
+
if (onResponse != null)
|
|
193
|
+
onResponse(customOperationResponse);
|
|
194
|
+
}, overrideAuthToken, overrideSecretKey, customTags);
|
|
195
|
+
}
|
|
196
|
+
static async sendViaHttpTResponseAsync(requestType, role, request, overrideAuthToken = null, overrideSecretKey = null, customTags = null, customOperationResponseCls) {
|
|
197
|
+
return new Promise((resolve) => {
|
|
198
|
+
GNNetwork.sendViaHttpTResponse(requestType, role, request, (response) => {
|
|
199
|
+
resolve(response);
|
|
200
|
+
}, overrideAuthToken, overrideSecretKey, customTags, customOperationResponseCls);
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
static connectSocket(_onSocketConnect = null) {
|
|
204
|
+
GNNetwork.peer.connectSocket(_onSocketConnect);
|
|
205
|
+
}
|
|
206
|
+
static disconnectSocket(_onSocketDisconnect = null) {
|
|
207
|
+
GNNetwork.peer.disconnectSocket(_onSocketDisconnect);
|
|
208
|
+
}
|
|
209
|
+
static setOnEventHandler(_onEventHandler) {
|
|
210
|
+
GNNetwork.peer.setOnEventHandler(_onEventHandler);
|
|
211
|
+
}
|
|
212
|
+
static subscriberOnConnectHandler(_onConnectHandler) {
|
|
213
|
+
GNNetwork.peer.setOnConnectHandler(_onConnectHandler);
|
|
214
|
+
}
|
|
215
|
+
static subscriberOnDisconnectHandler(_onDisconnectHandler) {
|
|
216
|
+
GNNetwork.peer.setOnDisconnectHandler(_onDisconnectHandler);
|
|
217
|
+
}
|
|
218
|
+
static unscriberOnConnectHandler(_onConnectHandler) {
|
|
219
|
+
GNNetwork.peer.removeOnConnectHandler(_onConnectHandler);
|
|
220
|
+
}
|
|
221
|
+
static unsubscriberOnDisconnectHandler(_onDisconnectHandler) {
|
|
222
|
+
GNNetwork.peer.removeOnDisconnectHandler(_onDisconnectHandler);
|
|
223
|
+
}
|
|
224
|
+
static subscriberServerEventHandler(serverEventHandler) {
|
|
225
|
+
GNNetwork.peer.subscriberServerEventHandler(serverEventHandler);
|
|
226
|
+
}
|
|
227
|
+
static syncTs(onResponse = null) {
|
|
228
|
+
GNNetwork.peer.syncTs(onResponse);
|
|
229
|
+
}
|
|
230
|
+
static syncTsAsync() {
|
|
231
|
+
return new Promise((resolve) => {
|
|
232
|
+
GNNetwork.syncTs((response) => {
|
|
233
|
+
resolve(response);
|
|
234
|
+
});
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
static getAuthInfo(authToken, onResponse = null) {
|
|
238
|
+
GNNetwork.peer.getAuthInfo(authToken, onResponse);
|
|
239
|
+
}
|
|
240
|
+
static getAuthInfoAsync(authToken) {
|
|
241
|
+
return new Promise((resolve) => {
|
|
242
|
+
GNNetwork.getAuthInfo(authToken, (response) => {
|
|
243
|
+
resolve(response);
|
|
244
|
+
});
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
static healthCheck(onResponse = null) {
|
|
248
|
+
GNNetwork.peer.healthCheck(onResponse);
|
|
249
|
+
}
|
|
250
|
+
static healthCheckAsync() {
|
|
251
|
+
return new Promise((resolve) => {
|
|
252
|
+
GNNetwork.healthCheck((response) => {
|
|
253
|
+
resolve(response);
|
|
254
|
+
});
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
static uploadFile(fileId, content, filename, mimetype, onResponse = null) {
|
|
258
|
+
GNNetwork.peer.uploadFile(fileId, content, filename, mimetype, onResponse);
|
|
259
|
+
}
|
|
260
|
+
static uploadFileAsync(fileId, content, filename, mimetype) {
|
|
261
|
+
return new Promise((resolve) => {
|
|
262
|
+
GNNetwork.uploadFile(fileId, content, filename, mimetype, (response) => {
|
|
263
|
+
resolve(response);
|
|
264
|
+
});
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
static getDownloadFileUrl(downloadToken) {
|
|
268
|
+
return GNNetwork.gnServerSettings.getHttpUrl() + "/" + NetworkingPeer.DOWNLOAD_FILE + "/" + downloadToken;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
GNNetwork.AUTH_TOKEN_KEY = "[GearN]_AUTH_TOKEN_KEY";
|
|
272
|
+
GNNetwork.USER_ID_KEY = "[GearN]_USER_ID_KEY";
|
|
273
|
+
GNNetwork.GAME_ID_KEY = "[GearN]_GAME_ID_KEY";
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { GNNetwork } from "./GNNetwork";
|
|
2
|
+
import { OperationRequest } from "./entity/OperationRequest";
|
|
3
|
+
import { AuthenticateRequestModels } from "./entity/models/AuthenticateRequestModels";
|
|
4
|
+
import { AuthenticateResponseModels } from "./entity/models/AuthenticateResponseModels";
|
|
5
|
+
export class AuthenticateApi {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.server = new ServerAuthenticateApi();
|
|
8
|
+
this.admin = new AdminAuthenticateApi();
|
|
9
|
+
}
|
|
10
|
+
loginByAccount(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
11
|
+
GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.LoginByAccountOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByAccountOperationResponse);
|
|
12
|
+
}
|
|
13
|
+
async loginByAccountAsync(requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
14
|
+
return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.LoginByAccountOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByAccountOperationResponse);
|
|
15
|
+
}
|
|
16
|
+
loginByAndroidDeviceId(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
17
|
+
GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.LoginByAndroidDeviceIdOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByAndroidDeviceIdOperationResponse);
|
|
18
|
+
}
|
|
19
|
+
async loginByAndroidDeviceIdAsync(requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
20
|
+
return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.LoginByAndroidDeviceIdOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByAndroidDeviceIdOperationResponse);
|
|
21
|
+
}
|
|
22
|
+
loginByApple(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
23
|
+
GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.LoginByAppleOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByAppleOperationResponse);
|
|
24
|
+
}
|
|
25
|
+
async loginByAppleAsync(requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
26
|
+
return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.LoginByAppleOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByAppleOperationResponse);
|
|
27
|
+
}
|
|
28
|
+
loginByCustomDeviceId(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
29
|
+
GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.LoginByCustomDeviceIdOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByCustomDeviceIdOperationResponse);
|
|
30
|
+
}
|
|
31
|
+
async loginByCustomDeviceIdAsync(requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
32
|
+
return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.LoginByCustomDeviceIdOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByCustomDeviceIdOperationResponse);
|
|
33
|
+
}
|
|
34
|
+
loginByCustomId(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
35
|
+
GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.LoginByCustomIdOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByCustomIdOperationResponse);
|
|
36
|
+
}
|
|
37
|
+
async loginByCustomIdAsync(requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
38
|
+
return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.LoginByCustomIdOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByCustomIdOperationResponse);
|
|
39
|
+
}
|
|
40
|
+
loginByEditorDeviceId(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
41
|
+
GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.LoginByEditorDeviceIdOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByEditorDeviceIdOperationResponse);
|
|
42
|
+
}
|
|
43
|
+
async loginByEditorDeviceIdAsync(requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
44
|
+
return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.LoginByEditorDeviceIdOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByEditorDeviceIdOperationResponse);
|
|
45
|
+
}
|
|
46
|
+
loginByFacebook(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
47
|
+
GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.LoginByFacebookOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByFacebookOperationResponse);
|
|
48
|
+
}
|
|
49
|
+
async loginByFacebookAsync(requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
50
|
+
return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.LoginByFacebookOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByFacebookOperationResponse);
|
|
51
|
+
}
|
|
52
|
+
loginByGenericService(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
53
|
+
GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.LoginByGenericServiceOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByGenericServiceOperationResponse);
|
|
54
|
+
}
|
|
55
|
+
async loginByGenericServiceAsync(requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
56
|
+
return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.LoginByGenericServiceOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByGenericServiceOperationResponse);
|
|
57
|
+
}
|
|
58
|
+
loginByGoogle(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
59
|
+
GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.LoginByGoogleOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByGoogleOperationResponse);
|
|
60
|
+
}
|
|
61
|
+
async loginByGoogleAsync(requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
62
|
+
return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.LoginByGoogleOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByGoogleOperationResponse);
|
|
63
|
+
}
|
|
64
|
+
loginByGooglePlayGameService(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
65
|
+
GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.LoginByGooglePlayGameServiceOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByGooglePlayGameServiceOperationResponse);
|
|
66
|
+
}
|
|
67
|
+
async loginByGooglePlayGameServiceAsync(requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
68
|
+
return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.LoginByGooglePlayGameServiceOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByGooglePlayGameServiceOperationResponse);
|
|
69
|
+
}
|
|
70
|
+
loginByGameCenter(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
71
|
+
GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.LoginByGameCenterOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByGameCenterOperationResponse);
|
|
72
|
+
}
|
|
73
|
+
async loginByGameCenterAsync(requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
74
|
+
return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.LoginByGameCenterOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByGameCenterOperationResponse);
|
|
75
|
+
}
|
|
76
|
+
loginByiOSDeviceId(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
77
|
+
GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.LoginByiOSDeviceIdOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByiOSDeviceIdOperationResponse);
|
|
78
|
+
}
|
|
79
|
+
async loginByiOSDeviceIdAsync(requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
80
|
+
return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.LoginByiOSDeviceIdOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByiOSDeviceIdOperationResponse);
|
|
81
|
+
}
|
|
82
|
+
loginByLinuxDeviceId(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
83
|
+
GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.LoginByLinuxDeviceIdOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByLinuxDeviceIdOperationResponse);
|
|
84
|
+
}
|
|
85
|
+
async loginByLinuxDeviceIdAsync(requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
86
|
+
return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.LoginByLinuxDeviceIdOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByLinuxDeviceIdOperationResponse);
|
|
87
|
+
}
|
|
88
|
+
loginByMacOSDeviceId(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
89
|
+
GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.LoginByMacOSDeviceIdOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByMacOSDeviceIdOperationResponse);
|
|
90
|
+
}
|
|
91
|
+
async loginByMacOSDeviceIdAsync(requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
92
|
+
return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.LoginByMacOSDeviceIdOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByMacOSDeviceIdOperationResponse);
|
|
93
|
+
}
|
|
94
|
+
loginByWindowsDeviceId(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
95
|
+
GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.LoginByWindowsDeviceIdOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByWindowsDeviceIdOperationResponse);
|
|
96
|
+
}
|
|
97
|
+
async loginByWindowsDeviceIdAsync(requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
98
|
+
return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.LoginByWindowsDeviceIdOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByWindowsDeviceIdOperationResponse);
|
|
99
|
+
}
|
|
100
|
+
loginByWindowsPhoneDeviceId(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
101
|
+
GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.LoginByWindowsPhoneDeviceIdOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByWindowsPhoneDeviceIdOperationResponse);
|
|
102
|
+
}
|
|
103
|
+
async loginByWindowsPhoneDeviceIdAsync(requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
104
|
+
return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.LoginByWindowsPhoneDeviceIdOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByWindowsPhoneDeviceIdOperationResponse);
|
|
105
|
+
}
|
|
106
|
+
registerAccount(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
107
|
+
GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.RegisterAccountOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.RegisterAccountOperationResponse);
|
|
108
|
+
}
|
|
109
|
+
async registerAccountAsync(requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
110
|
+
return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.RegisterAccountOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.RegisterAccountOperationResponse);
|
|
111
|
+
}
|
|
112
|
+
refreshAuthToken(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
113
|
+
GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.RefreshAuthTokenOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.RefreshAuthTokenOperationResponse);
|
|
114
|
+
}
|
|
115
|
+
async refreshAuthTokenAsync(requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) {
|
|
116
|
+
return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.RefreshAuthTokenOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.RefreshAuthTokenOperationResponse);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
export class ServerAuthenticateApi {
|
|
120
|
+
}
|
|
121
|
+
export class AdminAuthenticateApi {
|
|
122
|
+
}
|