@xmobitea/gn-typescript-client 2.6.12-tsc → 2.6.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (242) hide show
  1. package/LICENSE +1 -1
  2. package/README.MD +1 -0
  3. package/dist/gearn.js.client.js +47354 -0
  4. package/dist/gearn.js.client.min.js +2 -0
  5. package/dist/gearn.js.client.min.js.LICENSE.txt +14 -0
  6. package/dist/index.d.ts +2 -2
  7. package/dist/index.js +34362 -339
  8. package/dist/runtime/GNNetwork.d.ts +1 -1
  9. package/dist/runtime/helper/GNSupport.d.ts +20 -0
  10. package/dist/runtime/{entity → helper}/OperationHelper.d.ts +1 -1
  11. package/dist/runtime/helper/StorageService.d.ts +18 -0
  12. package/dist/runtime/networking/NetworkingPeer.d.ts +1 -1
  13. package/dist/runtime/typescript/ServiceUpdate.d.ts +2 -0
  14. package/docs/COCOS_CREATOR_INTEGRATION.md +116 -0
  15. package/examples/cocos-creator/GearNExample.ts.txt +176 -0
  16. package/package.json +11 -10
  17. package/srcSwift/Package.swift +32 -0
  18. package/srcSwift/Sources/GearN/runtime/GNNetwork.swift +530 -0
  19. package/srcSwift/Sources/GearN/runtime/GNNetworkAuthenticateApi.swift +178 -0
  20. package/srcSwift/Sources/GearN/runtime/GNNetworkCharacterPlayerApi.swift +1162 -0
  21. package/srcSwift/Sources/GearN/runtime/GNNetworkCloudScriptApi.swift +154 -0
  22. package/srcSwift/Sources/GearN/runtime/GNNetworkContentApi.swift +208 -0
  23. package/srcSwift/Sources/GearN/runtime/GNNetworkDashboardApi.swift +240 -0
  24. package/srcSwift/Sources/GearN/runtime/GNNetworkGamePlayerApi.swift +1369 -0
  25. package/srcSwift/Sources/GearN/runtime/GNNetworkGroupApi.swift +1100 -0
  26. package/srcSwift/Sources/GearN/runtime/GNNetworkInventoryApi.swift +937 -0
  27. package/srcSwift/Sources/GearN/runtime/GNNetworkMasterPlayerApi.swift +2323 -0
  28. package/srcSwift/Sources/GearN/runtime/GNNetworkMultiplayerApi.swift +298 -0
  29. package/srcSwift/Sources/GearN/runtime/GNNetworkStoreInventoryApi.swift +397 -0
  30. package/srcSwift/Sources/GearN/runtime/common/Action0.swift +3 -0
  31. package/srcSwift/Sources/GearN/runtime/common/Action1.swift +3 -0
  32. package/srcSwift/Sources/GearN/runtime/common/Action2.swift +3 -0
  33. package/srcSwift/Sources/GearN/runtime/common/Action3.swift +3 -0
  34. package/srcSwift/Sources/GearN/runtime/common/Action4.swift +3 -0
  35. package/srcSwift/Sources/GearN/runtime/common/GNArray.swift +204 -0
  36. package/srcSwift/Sources/GearN/runtime/common/GNData.swift +108 -0
  37. package/srcSwift/Sources/GearN/runtime/common/GNHashtable.swift +200 -0
  38. package/srcSwift/Sources/GearN/runtime/config/GNServerSettings.swift +95 -0
  39. package/srcSwift/Sources/GearN/runtime/constant/Commands.swift +28 -0
  40. package/srcSwift/Sources/GearN/runtime/constant/EventCode.swift +10 -0
  41. package/srcSwift/Sources/GearN/runtime/constant/OperationCode.swift +252 -0
  42. package/srcSwift/Sources/GearN/runtime/constant/ReturnCode.swift +19 -0
  43. package/srcSwift/Sources/GearN/runtime/constant/enumType/ExecuteResponseStatus.swift +9 -0
  44. package/srcSwift/Sources/GearN/runtime/constant/enumType/FriendStatus.swift +8 -0
  45. package/srcSwift/Sources/GearN/runtime/constant/enumType/GoogleLoginType.swift +6 -0
  46. package/srcSwift/Sources/GearN/runtime/constant/enumType/GroupStatus.swift +8 -0
  47. package/srcSwift/Sources/GearN/runtime/constant/enumType/InvalidMemberType.swift +19 -0
  48. package/srcSwift/Sources/GearN/runtime/constant/enumType/ItemType.swift +6 -0
  49. package/srcSwift/Sources/GearN/runtime/constant/enumType/MatchmakingMemberStatus.swift +7 -0
  50. package/srcSwift/Sources/GearN/runtime/constant/enumType/MatchmakingTicketStatus.swift +9 -0
  51. package/srcSwift/Sources/GearN/runtime/constant/enumType/OwnerType.swift +10 -0
  52. package/srcSwift/Sources/GearN/runtime/constant/enumType/PermissionDataItem.swift +6 -0
  53. package/srcSwift/Sources/GearN/runtime/constant/enumType/PushPlatformType.swift +6 -0
  54. package/srcSwift/Sources/GearN/runtime/constant/enumType/RequestRole.swift +7 -0
  55. package/srcSwift/Sources/GearN/runtime/constant/enumType/RequestType.swift +16 -0
  56. package/srcSwift/Sources/GearN/runtime/constant/enumType/StoreItemType.swift +6 -0
  57. package/srcSwift/Sources/GearN/runtime/constant/enumType/StoreReceiveType.swift +9 -0
  58. package/srcSwift/Sources/GearN/runtime/constant/errorCode/ErrorCode.swift +58 -0
  59. package/srcSwift/Sources/GearN/runtime/constant/parameterCode/ParameterCode.swift +672 -0
  60. package/srcSwift/Sources/GearN/runtime/entity/DataMember.swift +196 -0
  61. package/srcSwift/Sources/GearN/runtime/entity/GNMetadata.swift +9 -0
  62. package/srcSwift/Sources/GearN/runtime/entity/InvalidMember.swift +11 -0
  63. package/srcSwift/Sources/GearN/runtime/entity/OperationEvent.swift +38 -0
  64. package/srcSwift/Sources/GearN/runtime/entity/OperationHelper.swift +28 -0
  65. package/srcSwift/Sources/GearN/runtime/entity/OperationRequest.swift +62 -0
  66. package/srcSwift/Sources/GearN/runtime/entity/OperationResponse.swift +98 -0
  67. package/srcSwift/Sources/GearN/runtime/entity/models/AuthenticateModels.swift +351 -0
  68. package/srcSwift/Sources/GearN/runtime/entity/models/AuthenticateRequestModels.swift +81 -0
  69. package/srcSwift/Sources/GearN/runtime/entity/models/AuthenticateResponseModels.swift +108 -0
  70. package/srcSwift/Sources/GearN/runtime/entity/models/CharacterPlayerModels.swift +1045 -0
  71. package/srcSwift/Sources/GearN/runtime/entity/models/CharacterPlayerRequestModels.swift +821 -0
  72. package/srcSwift/Sources/GearN/runtime/entity/models/CharacterPlayerResponseModels.swift +588 -0
  73. package/srcSwift/Sources/GearN/runtime/entity/models/CloudScriptModels.swift +187 -0
  74. package/srcSwift/Sources/GearN/runtime/entity/models/CloudScriptRequestModels.swift +84 -0
  75. package/srcSwift/Sources/GearN/runtime/entity/models/CloudScriptResponseModels.swift +59 -0
  76. package/srcSwift/Sources/GearN/runtime/entity/models/ContentModels.swift +195 -0
  77. package/srcSwift/Sources/GearN/runtime/entity/models/ContentRequestModels.swift +116 -0
  78. package/srcSwift/Sources/GearN/runtime/entity/models/ContentResponseModels.swift +81 -0
  79. package/srcSwift/Sources/GearN/runtime/entity/models/DashboardModels.swift +426 -0
  80. package/srcSwift/Sources/GearN/runtime/entity/models/DashboardRequestModels.swift +160 -0
  81. package/srcSwift/Sources/GearN/runtime/entity/models/DashboardResponseModels.swift +82 -0
  82. package/srcSwift/Sources/GearN/runtime/entity/models/GamePlayerModels.swift +1334 -0
  83. package/srcSwift/Sources/GearN/runtime/entity/models/GamePlayerRequestModels.swift +643 -0
  84. package/srcSwift/Sources/GearN/runtime/entity/models/GamePlayerResponseModels.swift +213 -0
  85. package/srcSwift/Sources/GearN/runtime/entity/models/GenericModels.swift +171 -0
  86. package/srcSwift/Sources/GearN/runtime/entity/models/GroupModels.swift +850 -0
  87. package/srcSwift/Sources/GearN/runtime/entity/models/GroupRequestModels.swift +485 -0
  88. package/srcSwift/Sources/GearN/runtime/entity/models/GroupResponseModels.swift +165 -0
  89. package/srcSwift/Sources/GearN/runtime/entity/models/InventoryModels.swift +679 -0
  90. package/srcSwift/Sources/GearN/runtime/entity/models/InventoryRequestModels.swift +413 -0
  91. package/srcSwift/Sources/GearN/runtime/entity/models/InventoryResponseModels.swift +141 -0
  92. package/srcSwift/Sources/GearN/runtime/entity/models/MasterPlayerModels.swift +378 -0
  93. package/srcSwift/Sources/GearN/runtime/entity/models/MasterPlayerRequestModels.swift +147 -0
  94. package/srcSwift/Sources/GearN/runtime/entity/models/MasterPlayerResponseModels.swift +318 -0
  95. package/srcSwift/Sources/GearN/runtime/entity/models/MultiplayerModels.swift +319 -0
  96. package/srcSwift/Sources/GearN/runtime/entity/models/MultiplayerRequestModels.swift +125 -0
  97. package/srcSwift/Sources/GearN/runtime/entity/models/MultiplayerResponseModels.swift +45 -0
  98. package/srcSwift/Sources/GearN/runtime/entity/models/StoreInventoryModels.swift +633 -0
  99. package/srcSwift/Sources/GearN/runtime/entity/models/StoreInventoryRequestModels.swift +173 -0
  100. package/srcSwift/Sources/GearN/runtime/entity/models/StoreInventoryResponseModels.swift +61 -0
  101. package/srcSwift/Sources/GearN/runtime/entity/request/CustomOperationRequest.swift +42 -0
  102. package/srcSwift/Sources/GearN/runtime/entity/response/CustomOperationResponse.swift +49 -0
  103. package/srcSwift/Sources/GearN/runtime/entity/response/GetAuthInfoResponse.swift +43 -0
  104. package/srcSwift/Sources/GearN/runtime/entity/response/HealthCheckResponse.swift +86 -0
  105. package/srcSwift/Sources/GearN/runtime/entity/response/UploadFileResponse.swift +15 -0
  106. package/srcSwift/Sources/GearN/runtime/helper/CodeHelper.swift +107 -0
  107. package/srcSwift/Sources/GearN/runtime/helper/ConverterService.swift +98 -0
  108. package/srcSwift/Sources/GearN/runtime/helper/EnumUtility.swift +34 -0
  109. package/srcSwift/Sources/GearN/runtime/helper/GNSupport.swift +41 -0
  110. package/srcSwift/Sources/GearN/runtime/helper/GNUtils.swift +66 -0
  111. package/srcSwift/Sources/GearN/runtime/helper/MessagePackConverterService.swift +21 -0
  112. package/srcSwift/Sources/GearN/runtime/helper/StorageService.swift +29 -0
  113. package/srcSwift/Sources/GearN/runtime/logger/GNDebug.swift +33 -0
  114. package/srcSwift/Sources/GearN/runtime/networking/AuthenticateStatus.swift +24 -0
  115. package/srcSwift/Sources/GearN/runtime/networking/IPeer.swift +8 -0
  116. package/srcSwift/Sources/GearN/runtime/networking/NetworkingPeer.swift +368 -0
  117. package/srcSwift/Sources/GearN/runtime/networking/OperationPending.swift +81 -0
  118. package/srcSwift/Sources/GearN/runtime/networking/PeerBase.swift +228 -0
  119. package/srcSwift/Sources/GearN/runtime/networking/handler/IServerEventHandler.swift +20 -0
  120. package/srcSwift/Sources/GearN/runtime/networking/http/HttpPeer.swift +226 -0
  121. package/srcSwift/Sources/GearN/runtime/networking/http/HttpTypes.swift +24 -0
  122. package/srcSwift/Sources/GearN/runtime/networking/http/NetworkingHttpPeerBase.swift +13 -0
  123. package/srcSwift/Sources/GearN/runtime/networking/http/NetworkingPeerUrlSession.swift +125 -0
  124. package/srcSwift/Sources/GearN/runtime/networking/request/NetRequest.swift +19 -0
  125. package/srcSwift/Sources/GearN/runtime/networking/response/NetResponse.swift +13 -0
  126. package/srcSwift/Sources/GearN/runtime/networking/socket/NetworkingPeerSocketIOClient.swift +244 -0
  127. package/srcSwift/Sources/GearN/runtime/networking/socket/NetworkingSocketPeerBase.swift +59 -0
  128. package/srcSwift/Sources/GearN/runtime/networking/socket/SocketPeer.swift +136 -0
  129. package/tsconfig-build.cocos.json +31 -0
  130. package/webpack.config.cocos.mjs +78 -0
  131. package/dist/runtime/GNNetwork.js +0 -260
  132. package/dist/runtime/GNNetworkAuthenticateApi.js +0 -122
  133. package/dist/runtime/GNNetworkCharacterPlayerApi.js +0 -968
  134. package/dist/runtime/GNNetworkCloudScriptApi.js +0 -104
  135. package/dist/runtime/GNNetworkContentApi.js +0 -140
  136. package/dist/runtime/GNNetworkDashboardApi.js +0 -170
  137. package/dist/runtime/GNNetworkGamePlayerApi.js +0 -950
  138. package/dist/runtime/GNNetworkGroupApi.js +0 -734
  139. package/dist/runtime/GNNetworkInventoryApi.js +0 -626
  140. package/dist/runtime/GNNetworkMasterPlayerApi.js +0 -1550
  141. package/dist/runtime/GNNetworkMultiplayerApi.js +0 -194
  142. package/dist/runtime/GNNetworkStoreInventoryApi.js +0 -266
  143. package/dist/runtime/common/Action0.js +0 -1
  144. package/dist/runtime/common/Action1.js +0 -1
  145. package/dist/runtime/common/Action2.js +0 -1
  146. package/dist/runtime/common/Action3.js +0 -1
  147. package/dist/runtime/common/Action4.js +0 -1
  148. package/dist/runtime/common/GNData.js +0 -211
  149. package/dist/runtime/config/GNServerSettings.js +0 -156
  150. package/dist/runtime/constant/Commands.js +0 -20
  151. package/dist/runtime/constant/EventCode.js +0 -8
  152. package/dist/runtime/constant/OperationCode.js +0 -221
  153. package/dist/runtime/constant/ReturnCode.js +0 -14
  154. package/dist/runtime/constant/enumType/ExecuteResponseStatus.js +0 -8
  155. package/dist/runtime/constant/enumType/FriendStatus.js +0 -7
  156. package/dist/runtime/constant/enumType/GoogleLoginType.js +0 -5
  157. package/dist/runtime/constant/enumType/GroupStatus.js +0 -7
  158. package/dist/runtime/constant/enumType/InvalidMemberType.js +0 -18
  159. package/dist/runtime/constant/enumType/ItemType.js +0 -5
  160. package/dist/runtime/constant/enumType/MatchmakingMemberStatus.js +0 -6
  161. package/dist/runtime/constant/enumType/MatchmakingTicketStatus.js +0 -8
  162. package/dist/runtime/constant/enumType/OwnerType.js +0 -9
  163. package/dist/runtime/constant/enumType/PermissionDataItem.js +0 -5
  164. package/dist/runtime/constant/enumType/PushPlatformType.js +0 -5
  165. package/dist/runtime/constant/enumType/RequestRole.js +0 -6
  166. package/dist/runtime/constant/enumType/RequestType.js +0 -15
  167. package/dist/runtime/constant/enumType/StoreItemType.js +0 -5
  168. package/dist/runtime/constant/enumType/StoreReceiveType.js +0 -8
  169. package/dist/runtime/constant/errorCode/ErrorCode.js +0 -52
  170. package/dist/runtime/constant/parameterCode/ParameterCode.js +0 -617
  171. package/dist/runtime/entity/DataMember.js +0 -208
  172. package/dist/runtime/entity/GNMetadata.js +0 -11
  173. package/dist/runtime/entity/InvalidMember.js +0 -1
  174. package/dist/runtime/entity/OperationEvent.js +0 -24
  175. package/dist/runtime/entity/OperationHelper.js +0 -24
  176. package/dist/runtime/entity/OperationRequest.js +0 -42
  177. package/dist/runtime/entity/OperationResponse.js +0 -73
  178. package/dist/runtime/entity/models/AuthenticateModels.js +0 -426
  179. package/dist/runtime/entity/models/AuthenticateRequestModels.js +0 -188
  180. package/dist/runtime/entity/models/AuthenticateResponseModels.js +0 -131
  181. package/dist/runtime/entity/models/CharacterPlayerModels.js +0 -1433
  182. package/dist/runtime/entity/models/CharacterPlayerRequestModels.js +0 -1386
  183. package/dist/runtime/entity/models/CharacterPlayerResponseModels.js +0 -376
  184. package/dist/runtime/entity/models/CloudScriptModels.js +0 -197
  185. package/dist/runtime/entity/models/CloudScriptRequestModels.js +0 -138
  186. package/dist/runtime/entity/models/CloudScriptResponseModels.js +0 -40
  187. package/dist/runtime/entity/models/ContentModels.js +0 -203
  188. package/dist/runtime/entity/models/ContentRequestModels.js +0 -190
  189. package/dist/runtime/entity/models/ContentResponseModels.js +0 -54
  190. package/dist/runtime/entity/models/DashboardModels.js +0 -3002
  191. package/dist/runtime/entity/models/DashboardRequestModels.js +0 -268
  192. package/dist/runtime/entity/models/DashboardResponseModels.js +0 -187
  193. package/dist/runtime/entity/models/GamePlayerModels.js +0 -1591
  194. package/dist/runtime/entity/models/GamePlayerRequestModels.js +0 -1360
  195. package/dist/runtime/entity/models/GamePlayerResponseModels.js +0 -369
  196. package/dist/runtime/entity/models/GenericModels.js +0 -177
  197. package/dist/runtime/entity/models/GroupModels.js +0 -1135
  198. package/dist/runtime/entity/models/GroupRequestModels.js +0 -1048
  199. package/dist/runtime/entity/models/GroupResponseModels.js +0 -285
  200. package/dist/runtime/entity/models/InventoryModels.js +0 -915
  201. package/dist/runtime/entity/models/InventoryRequestModels.js +0 -892
  202. package/dist/runtime/entity/models/InventoryResponseModels.js +0 -243
  203. package/dist/runtime/entity/models/MasterPlayerModels.js +0 -2573
  204. package/dist/runtime/entity/models/MasterPlayerRequestModels.js +0 -2228
  205. package/dist/runtime/entity/models/MasterPlayerResponseModels.js +0 -607
  206. package/dist/runtime/entity/models/MultiplayerModels.js +0 -404
  207. package/dist/runtime/entity/models/MultiplayerRequestModels.js +0 -268
  208. package/dist/runtime/entity/models/MultiplayerResponseModels.js +0 -75
  209. package/dist/runtime/entity/models/StoreInventoryModels.js +0 -797
  210. package/dist/runtime/entity/models/StoreInventoryRequestModels.js +0 -372
  211. package/dist/runtime/entity/models/StoreInventoryResponseModels.js +0 -103
  212. package/dist/runtime/entity/request/CustomOperationRequest.js +0 -24
  213. package/dist/runtime/entity/response/CustomOperationResponse.js +0 -29
  214. package/dist/runtime/entity/response/GetAuthInfoResponse.js +0 -2
  215. package/dist/runtime/entity/response/HealthCheckResponse.js +0 -2
  216. package/dist/runtime/entity/response/UploadFileResponse.js +0 -2
  217. package/dist/runtime/helper/CodeHelper.js +0 -63
  218. package/dist/runtime/helper/ConverterService.js +0 -275
  219. package/dist/runtime/helper/EnumUtility.js +0 -33
  220. package/dist/runtime/helper/GNSupport.js +0 -8
  221. package/dist/runtime/helper/GNUtils.js +0 -72
  222. package/dist/runtime/helper/MessagePackConverterService.js +0 -9
  223. package/dist/runtime/logger/GNDebug.js +0 -29
  224. package/dist/runtime/networking/AuthenticateStatus.js +0 -14
  225. package/dist/runtime/networking/IPeer.js +0 -1
  226. package/dist/runtime/networking/NetworkingPeer.js +0 -208
  227. package/dist/runtime/networking/OperationPending.js +0 -53
  228. package/dist/runtime/networking/PeerBase.js +0 -161
  229. package/dist/runtime/networking/handler/IServerEventHandler.js +0 -13
  230. package/dist/runtime/networking/handler/OnCharacterPlayerFriendUpdateEventHandler.js +0 -39
  231. package/dist/runtime/networking/handler/OnCharacterPlayerGroupUpdateEventHandler.js +0 -39
  232. package/dist/runtime/networking/handler/OnGamePlayerFriendUpdateEventHandler.js +0 -39
  233. package/dist/runtime/networking/handler/OnGamePlayerGroupUpdateEventHandler.js +0 -39
  234. package/dist/runtime/networking/handler/OnGroupMemberUpdateEventHandler.js +0 -35
  235. package/dist/runtime/networking/handler/OnGroupMessageUpdateEventHandler.js +0 -43
  236. package/dist/runtime/networking/http/HttpPeer.js +0 -123
  237. package/dist/runtime/networking/http/NetworkingHttpPeerBase.js +0 -9
  238. package/dist/runtime/networking/http/NetworkingPeerAxiosRequest.js +0 -179
  239. package/dist/runtime/networking/socket/NetworkingPeerSocketIOClient.js +0 -130
  240. package/dist/runtime/networking/socket/NetworkingSocketPeerBase.js +0 -165
  241. package/dist/runtime/networking/socket/SocketPeer.js +0 -115
  242. package/dist/runtime/typescript/ServiceUpdate.js +0 -12
@@ -0,0 +1,78 @@
1
+ import path from "path";
2
+ import TerserPlugin from "terser-webpack-plugin";
3
+ import { fileURLToPath } from "url";
4
+
5
+ const __filename = fileURLToPath(import.meta.url);
6
+ const __dirname = path.dirname(__filename);
7
+
8
+ /**
9
+ * Webpack Configuration for Cocos Creator 3.x
10
+ *
11
+ * This configuration bundles the GearN SDK as a single UMD module
12
+ * that can be imported in Cocos Creator projects.
13
+ *
14
+ * Usage in Cocos Creator:
15
+ * 1. npm install this package
16
+ * 2. Import: import * as GearN from "@xmobitea/gn-typescript-client";
17
+ */
18
+ export default {
19
+ entry: "./src/index.ts",
20
+ target: "web", // Target web/browser environment (Cocos Creator runs in this context)
21
+ mode: "production",
22
+ module: {
23
+ rules: [
24
+ {
25
+ test: /\.ts$/,
26
+ loader: "ts-loader",
27
+ options: {
28
+ configFile: "tsconfig-build.cocos.json",
29
+ },
30
+ },
31
+ ],
32
+ },
33
+ resolve: {
34
+ extensions: [".ts", ".tsx", ".js", ".jsx"],
35
+ fallback: {
36
+ // Polyfills for Node.js built-in modules not available in browser/Cocos Creator
37
+ "buffer": false,
38
+ "stream": false,
39
+ "crypto": false,
40
+ "http": false,
41
+ "https": false,
42
+ "url": false,
43
+ "zlib": false,
44
+ },
45
+ },
46
+ output: {
47
+ filename: "index.js",
48
+ path: path.resolve(__dirname, "dist"),
49
+ library: {
50
+ name: "GearN",
51
+ type: "umd",
52
+ export: "default",
53
+ },
54
+ globalObject: "this",
55
+ environment: {
56
+ arrowFunction: true,
57
+ },
58
+ },
59
+ optimization: {
60
+ minimize: true,
61
+ minimizer: [
62
+ new TerserPlugin({
63
+ terserOptions: {
64
+ compress: {
65
+ keep_fnames: true,
66
+ keep_classnames: true,
67
+ },
68
+ mangle: {
69
+ keep_fnames: true,
70
+ keep_classnames: true,
71
+ },
72
+ },
73
+ }),
74
+ ],
75
+ },
76
+ // Don't externalize any dependencies - bundle everything
77
+ externals: [],
78
+ };
@@ -1,260 +0,0 @@
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 store from "store";
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
- return 17;
50
- }
51
- static init(gnServerSettings) {
52
- if (GNNetwork.gnServerSettings != null) {
53
- GNDebug.log("GNNetwork has been init!");
54
- return;
55
- }
56
- GNSupport.init();
57
- CodeHelper.init();
58
- ConverterService.init();
59
- GNNetwork.gnServerSettings = gnServerSettings;
60
- GNNetwork.initServerSettings();
61
- GNNetwork.initGNDebug();
62
- GNDebug.log("GNNetwork init on " + (GNSupport.isBrowser() ? "browser." : "server.") + " Version: " + GNNetwork.getClientSdkVersion());
63
- GNNetwork.initGNSocketObject();
64
- GNNetwork.peer.authenticateStatus.setAuthToken(store.get(GNNetwork.AUTH_TOKEN_KEY, ""));
65
- GNNetwork.peer.authenticateStatus.setUserId(store.get(GNNetwork.USER_ID_KEY, ""));
66
- GNNetwork.peer.gameId = store.get(GNNetwork.GAME_ID_KEY, "");
67
- GNNetwork.authenticate = new AuthenticateApi();
68
- GNNetwork.characterPlayer = new CharacterPlayerApi();
69
- GNNetwork.content = new ContentApi();
70
- GNNetwork.dashboard = new DashboardApi();
71
- GNNetwork.gamePlayer = new GamePlayerApi();
72
- GNNetwork.group = new GroupApi();
73
- GNNetwork.inventory = new InventoryApi();
74
- GNNetwork.masterPlayer = new MasterPlayerApi();
75
- GNNetwork.storeInventory = new StoreInventoryApi();
76
- GNNetwork.multiplayer = new MultiplayerApi();
77
- GNNetwork.cloudScript = new CloudScriptApi();
78
- }
79
- static setNewAuthenticateStatus(authenticateStatus) {
80
- store.set(GNNetwork.AUTH_TOKEN_KEY, authenticateStatus.getAuthToken());
81
- store.set(GNNetwork.USER_ID_KEY, authenticateStatus.getUserId());
82
- GNNetwork.peer.authenticateStatus.setAuthToken(authenticateStatus.getAuthToken());
83
- GNNetwork.peer.authenticateStatus.setUserId(authenticateStatus.getUserId());
84
- }
85
- static setGameId(gameId) {
86
- store.set(GNNetwork.GAME_ID_KEY, gameId);
87
- GNNetwork.peer.gameId = gameId;
88
- }
89
- static getClientSdkVersion() {
90
- return VERSION;
91
- }
92
- static initServerSettings() {
93
- // gnServerSettings = Resources.Load(GNServerSettings.ResourcesPath) as GNServerSettings;
94
- // if (gnServerSettings == null)
95
- // {
96
- // #if UNITY_EDITOR
97
- // UnityEditor.EditorApplication.ExecuteMenuItem("XmobiTea GN/Open Settings");
98
- // gnServerSettings = Resources.Load(GNServerSettings.ResourcesPath) as GNServerSettings;
99
- // if (gnServerSettings == null) throw new NullReferenceException("Null GN Server Settings, please find it now");
100
- // #endif
101
- // }
102
- }
103
- static initGNDebug() {
104
- if (GNNetwork.gnServerSettings == null)
105
- throw new Error("Null GN Server Settings, please find it now");
106
- GNDebug.setLogType(GNNetwork.gnServerSettings.getLogType());
107
- }
108
- static initGNSocketObject() {
109
- let peer = new NetworkingPeer();
110
- peer.initPeer();
111
- GNNetwork.peer = peer;
112
- let serviceUpdate = new ServiceUpdate();
113
- serviceUpdate.peer = peer;
114
- serviceUpdate.run();
115
- }
116
- static sendViaSocket(requestType, role, request, onResponse, overrideAuthToken, overrideSecretKey, customTags) {
117
- GNNetwork.peer.sendViaSocket(requestType, role, request, onResponse, overrideAuthToken, overrideSecretKey, customTags);
118
- }
119
- static async sendViaSocketAsync(requestType, role, request, overrideAuthToken, overrideSecretKey, customTags) {
120
- return new Promise((resolve) => {
121
- GNNetwork.sendViaSocket(requestType, role, request, (response) => {
122
- resolve(response);
123
- }, overrideAuthToken, overrideSecretKey, customTags);
124
- });
125
- }
126
- static sendViaHttp(requestType, role, request, onResponse, overrideAuthToken, overrideSecretKey, customTags) {
127
- GNNetwork.peer.sendViaHttp(requestType, role, request, onResponse, overrideAuthToken, overrideSecretKey, customTags);
128
- }
129
- static async sendViaHttpAsync(requestType, role, request, overrideAuthToken, overrideSecretKey, customTags) {
130
- return new Promise((resolve) => {
131
- GNNetwork.sendViaHttp(requestType, role, request, (response) => {
132
- resolve(response);
133
- }, overrideAuthToken, overrideSecretKey, customTags);
134
- });
135
- }
136
- static sendViaSocketTRequestTResponse(request, onResponse = null, overrideAuthToken, overrideSecretKey, customTags, customOperationResponseCls) {
137
- GNNetwork.sendViaSocketTResponse(request.getRequestType(), request.getRole(), request.build(), onResponse, overrideAuthToken, overrideSecretKey, customTags, customOperationResponseCls);
138
- }
139
- static async sendViaSocketTRequestTResponseAsync(request, overrideAuthToken, overrideSecretKey, customTags, customOperationResponseCls) {
140
- return new Promise((resolve) => {
141
- GNNetwork.sendViaSocketTRequestTResponse(request, (response) => {
142
- resolve(response);
143
- }, overrideAuthToken, overrideSecretKey, customTags, customOperationResponseCls);
144
- });
145
- }
146
- static sendViaHttpTRequestTResponse(request, onResponse = null, overrideAuthToken, overrideSecretKey, customTags, customOperationResponseCls) {
147
- GNNetwork.sendViaHttpTResponse(request.getRequestType(), request.getRole(), request.build(), onResponse, overrideAuthToken, overrideSecretKey, customTags, customOperationResponseCls);
148
- }
149
- static async sendViaHttpTRequestTResponseAsync(request, overrideAuthToken, overrideSecretKey, customTags, customOperationResponseCls) {
150
- return new Promise((resolve) => {
151
- GNNetwork.sendViaHttpTRequestTResponse(request, (response) => {
152
- resolve(response);
153
- }, overrideAuthToken, overrideSecretKey, customTags, customOperationResponseCls);
154
- });
155
- }
156
- static sendViaSocketTResponse(requestType, role, request, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, customOperationResponseCls) {
157
- GNNetwork.sendViaSocket(requestType, role, request, response => {
158
- if (response == null)
159
- return;
160
- let customOperationResponse = new customOperationResponseCls();
161
- customOperationResponse.setupOperationResponse(response);
162
- if (onResponse != null)
163
- onResponse(customOperationResponse);
164
- }, overrideAuthToken, overrideSecretKey, customTags);
165
- }
166
- static async sendViaSocketTResponseAsync(requestType, role, request, overrideAuthToken = null, overrideSecretKey = null, customTags = null, customOperationResponseCls) {
167
- return new Promise((resolve) => {
168
- GNNetwork.sendViaSocketTResponse(requestType, role, request, (response) => {
169
- resolve(response);
170
- }, overrideAuthToken, overrideSecretKey, customTags, customOperationResponseCls);
171
- });
172
- }
173
- static sendViaHttpTResponse(requestType, role, request, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, customOperationResponseCls) {
174
- GNNetwork.sendViaHttp(requestType, role, 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 async sendViaHttpTResponseAsync(requestType, role, request, overrideAuthToken = null, overrideSecretKey = null, customTags = null, customOperationResponseCls) {
184
- return new Promise((resolve) => {
185
- GNNetwork.sendViaHttpTResponse(requestType, role, request, (response) => {
186
- resolve(response);
187
- }, overrideAuthToken, overrideSecretKey, customTags, customOperationResponseCls);
188
- });
189
- }
190
- static connectSocket(_onSocketConnect = null) {
191
- GNNetwork.peer.connectSocket(_onSocketConnect);
192
- }
193
- static disconnectSocket(_onSocketDisconnect = null) {
194
- GNNetwork.peer.disconnectSocket(_onSocketDisconnect);
195
- }
196
- static setOnEventHandler(_onEventHandler) {
197
- GNNetwork.peer.setOnEventHandler(_onEventHandler);
198
- }
199
- static subscriberOnConnectHandler(_onConnectHandler) {
200
- GNNetwork.peer.setOnConnectHandler(_onConnectHandler);
201
- }
202
- static subscriberOnDisconnectHandler(_onDisconnectHandler) {
203
- GNNetwork.peer.setOnDisconnectHandler(_onDisconnectHandler);
204
- }
205
- static unscriberOnConnectHandler(_onConnectHandler) {
206
- GNNetwork.peer.removeOnConnectHandler(_onConnectHandler);
207
- }
208
- static unsubscriberOnDisconnectHandler(_onDisconnectHandler) {
209
- GNNetwork.peer.removeOnDisconnectHandler(_onDisconnectHandler);
210
- }
211
- static subscriberServerEventHandler(serverEventHandler) {
212
- GNNetwork.peer.subscriberServerEventHandler(serverEventHandler);
213
- }
214
- static syncTs(onResponse = null) {
215
- GNNetwork.peer.syncTs(onResponse);
216
- }
217
- static syncTsAsync() {
218
- return new Promise((resolve) => {
219
- GNNetwork.syncTs((response) => {
220
- resolve(response);
221
- });
222
- });
223
- }
224
- static getAuthInfo(authToken, onResponse = null) {
225
- GNNetwork.peer.getAuthInfo(authToken, onResponse);
226
- }
227
- static getAuthInfoAsync(authToken) {
228
- return new Promise((resolve) => {
229
- GNNetwork.getAuthInfo(authToken, (response) => {
230
- resolve(response);
231
- });
232
- });
233
- }
234
- static healthCheck(onResponse = null) {
235
- GNNetwork.peer.healthCheck(onResponse);
236
- }
237
- static healthCheckAsync() {
238
- return new Promise((resolve) => {
239
- GNNetwork.healthCheck((response) => {
240
- resolve(response);
241
- });
242
- });
243
- }
244
- static uploadFile(fileId, content, filename, mimetype, onResponse = null) {
245
- GNNetwork.peer.uploadFile(fileId, content, filename, mimetype, onResponse);
246
- }
247
- static uploadFileAsync(fileId, content, filename, mimetype) {
248
- return new Promise((resolve) => {
249
- GNNetwork.uploadFile(fileId, content, filename, mimetype, (response) => {
250
- resolve(response);
251
- });
252
- });
253
- }
254
- static getDownloadFileUrl(downloadToken) {
255
- return GNNetwork.gnServerSettings.getHttpUrl() + "/" + NetworkingPeer.DOWNLOAD_FILE + "/" + downloadToken;
256
- }
257
- }
258
- GNNetwork.AUTH_TOKEN_KEY = "[GearN]_AUTH_TOKEN_KEY";
259
- GNNetwork.USER_ID_KEY = "[GearN]_USER_ID_KEY";
260
- GNNetwork.GAME_ID_KEY = "[GearN]_GAME_ID_KEY";
@@ -1,122 +0,0 @@
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
- }