@xmobitea/gn-typescript-client 2.6.13 → 2.6.14
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/AGENTS.md +37 -0
- package/README.MD +420 -1
- package/dist/gearn.js.client.js +25056 -1056
- package/dist/gearn.js.client.min.js +1 -1
- package/dist/index.d.ts +30 -0
- package/dist/index.js +24236 -212
- package/dist/runtime/GNNetwork.d.ts +687 -3
- package/dist/runtime/GNNetworkAuthenticateApi.d.ts +327 -0
- package/dist/runtime/GNNetworkCharacterPlayerApi.d.ts +1026 -0
- package/dist/runtime/GNNetworkCloudScriptApi.d.ts +141 -0
- package/dist/runtime/GNNetworkContentApi.d.ts +243 -0
- package/dist/runtime/GNNetworkDashboardApi.d.ts +221 -0
- package/dist/runtime/GNNetworkGamePlayerApi.d.ts +1033 -0
- package/dist/runtime/GNNetworkGroupApi.d.ts +783 -0
- package/dist/runtime/GNNetworkInventoryApi.d.ts +673 -0
- package/dist/runtime/GNNetworkMasterPlayerApi.d.ts +1614 -6
- package/dist/runtime/GNNetworkMultiplayerApi.d.ts +234 -0
- package/dist/runtime/GNNetworkStoreInventoryApi.d.ts +309 -0
- package/dist/runtime/common/Action0.d.ts +30 -0
- package/dist/runtime/common/Action1.d.ts +32 -0
- package/dist/runtime/common/Action2.d.ts +21 -0
- package/dist/runtime/common/Action3.d.ts +16 -0
- package/dist/runtime/common/Action4.d.ts +17 -0
- package/dist/runtime/common/GNData.d.ts +368 -0
- package/dist/runtime/config/GNServerSettings.d.ts +442 -12
- package/dist/runtime/constant/Commands.d.ts +80 -0
- package/dist/runtime/constant/EventCode.d.ts +48 -0
- package/dist/runtime/constant/OperationCode.d.ts +74 -1
- package/dist/runtime/constant/ReturnCode.d.ts +72 -0
- package/dist/runtime/constant/enumType/ExecuteResponseStatus.d.ts +31 -0
- package/dist/runtime/constant/enumType/FriendStatus.d.ts +39 -0
- package/dist/runtime/constant/enumType/GoogleLoginType.d.ts +23 -0
- package/dist/runtime/constant/enumType/GroupStatus.d.ts +32 -0
- package/dist/runtime/constant/enumType/InvalidMemberType.d.ts +75 -0
- package/dist/runtime/constant/enumType/ItemType.d.ts +23 -0
- package/dist/runtime/constant/enumType/MatchStatus.d.ts +30 -0
- package/dist/runtime/constant/enumType/MatchmakingMemberStatus.d.ts +24 -0
- package/dist/runtime/constant/enumType/MatchmakingTicketStatus.d.ts +34 -0
- package/dist/runtime/constant/enumType/OwnerType.d.ts +40 -0
- package/dist/runtime/constant/enumType/PermissionDataItem.d.ts +22 -0
- package/dist/runtime/constant/enumType/PushPlatformType.d.ts +18 -0
- package/dist/runtime/constant/enumType/RequestRole.d.ts +32 -0
- package/dist/runtime/constant/enumType/RequestType.d.ts +70 -0
- package/dist/runtime/constant/enumType/StoreItemType.d.ts +21 -0
- package/dist/runtime/constant/enumType/StoreReceiveType.d.ts +30 -0
- package/dist/runtime/constant/errorCode/ErrorCode.d.ts +190 -8
- package/dist/runtime/constant/parameterCode/ParameterCode.d.ts +35 -5
- package/dist/runtime/entity/DataMember.d.ts +338 -0
- package/dist/runtime/entity/GNMetadata.d.ts +101 -0
- package/dist/runtime/entity/InvalidMember.d.ts +28 -0
- package/dist/runtime/entity/OperationEvent.d.ts +49 -0
- package/dist/runtime/entity/OperationRequest.d.ts +108 -0
- package/dist/runtime/entity/OperationResponse.d.ts +110 -0
- package/dist/runtime/entity/models/AuthenticateModels.d.ts +115 -0
- package/dist/runtime/entity/models/AuthenticateRequestModels.d.ts +131 -0
- package/dist/runtime/entity/models/AuthenticateResponseModels.d.ts +131 -0
- package/dist/runtime/entity/models/CharacterPlayerModels.d.ts +625 -1
- package/dist/runtime/entity/models/CharacterPlayerRequestModels.d.ts +972 -0
- package/dist/runtime/entity/models/CharacterPlayerResponseModels.d.ts +332 -0
- package/dist/runtime/entity/models/CloudScriptModels.d.ts +109 -0
- package/dist/runtime/entity/models/CloudScriptRequestModels.d.ts +107 -0
- package/dist/runtime/entity/models/CloudScriptResponseModels.d.ts +46 -0
- package/dist/runtime/entity/models/ContentModels.d.ts +124 -0
- package/dist/runtime/entity/models/ContentRequestModels.d.ts +152 -0
- package/dist/runtime/entity/models/ContentResponseModels.d.ts +58 -0
- package/dist/runtime/entity/models/DashboardModels.d.ts +371 -8
- package/dist/runtime/entity/models/DashboardRequestModels.d.ts +172 -0
- package/dist/runtime/entity/models/DashboardResponseModels.d.ts +170 -0
- package/dist/runtime/entity/models/GamePlayerModels.d.ts +644 -1
- package/dist/runtime/entity/models/GamePlayerRequestModels.d.ts +959 -0
- package/dist/runtime/entity/models/GamePlayerResponseModels.d.ts +333 -1
- package/dist/runtime/entity/models/GenericModels.d.ts +94 -0
- package/dist/runtime/entity/models/GroupModels.d.ts +484 -2
- package/dist/runtime/entity/models/GroupRequestModels.d.ts +737 -0
- package/dist/runtime/entity/models/GroupResponseModels.d.ts +254 -0
- package/dist/runtime/entity/models/InventoryModels.d.ts +415 -0
- package/dist/runtime/entity/models/InventoryRequestModels.d.ts +629 -0
- package/dist/runtime/entity/models/InventoryResponseModels.d.ts +218 -0
- package/dist/runtime/entity/models/MasterPlayerModels.d.ts +1065 -3
- package/dist/runtime/entity/models/MasterPlayerRequestModels.d.ts +1560 -6
- package/dist/runtime/entity/models/MasterPlayerResponseModels.d.ts +532 -1
- package/dist/runtime/entity/models/MultiplayerModels.d.ts +199 -0
- package/dist/runtime/entity/models/MultiplayerRequestModels.d.ts +196 -0
- package/dist/runtime/entity/models/MultiplayerResponseModels.d.ts +74 -0
- package/dist/runtime/entity/models/StoreInventoryModels.d.ts +262 -0
- package/dist/runtime/entity/models/StoreInventoryRequestModels.d.ts +268 -0
- package/dist/runtime/entity/models/StoreInventoryResponseModels.d.ts +98 -0
- package/dist/runtime/entity/request/CustomOperationRequest.d.ts +99 -0
- package/dist/runtime/entity/response/CustomOperationResponse.d.ts +118 -0
- package/dist/runtime/entity/response/GetAuthInfoResponse.d.ts +53 -0
- package/dist/runtime/entity/response/HealthCheckResponse.d.ts +56 -0
- package/dist/runtime/entity/response/UploadFileResponse.d.ts +19 -0
- package/dist/runtime/helper/CodeHelper.d.ts +122 -0
- package/dist/runtime/helper/ConverterService.d.ts +74 -0
- package/dist/runtime/helper/EnumUtility.d.ts +63 -0
- package/dist/runtime/helper/GNSupport.d.ts +64 -4
- package/dist/runtime/helper/GNUtils.d.ts +54 -0
- package/dist/runtime/helper/MessagePackConverterService.d.ts +48 -0
- package/dist/runtime/helper/OperationHelper.d.ts +51 -0
- package/dist/runtime/helper/StorageService.d.ts +48 -8
- package/dist/runtime/logger/GNDebug.d.ts +117 -0
- package/dist/runtime/networking/AuthenticateStatus.d.ts +64 -0
- package/dist/runtime/networking/IPeer.d.ts +83 -0
- package/dist/runtime/networking/NetworkingPeer.d.ts +256 -1
- package/dist/runtime/networking/OperationPending.d.ts +112 -0
- package/dist/runtime/networking/PeerBase.d.ts +231 -0
- package/dist/runtime/networking/handler/IServerEventHandler.d.ts +84 -0
- package/dist/runtime/networking/handler/OnCharacterPlayerFriendUpdateEventHandler.d.ts +69 -0
- package/dist/runtime/networking/handler/OnCharacterPlayerGroupUpdateEventHandler.d.ts +49 -0
- package/dist/runtime/networking/handler/OnGamePlayerFriendUpdateEventHandler.d.ts +50 -0
- package/dist/runtime/networking/handler/OnGamePlayerGroupUpdateEventHandler.d.ts +41 -0
- package/dist/runtime/networking/handler/OnGroupMemberUpdateEventHandler.d.ts +47 -0
- package/dist/runtime/networking/handler/OnGroupMessageUpdateEventHandler.d.ts +46 -0
- package/dist/runtime/networking/http/HttpPeer.d.ts +173 -0
- package/dist/runtime/networking/http/NetworkingHttpPeerBase.d.ts +87 -0
- package/dist/runtime/networking/http/NetworkingPeerAxiosRequest.d.ts +113 -0
- package/dist/runtime/networking/socket/NetworkingPeerSocketIOClient.d.ts +145 -0
- package/dist/runtime/networking/socket/NetworkingSocketPeerBase.d.ts +198 -0
- package/dist/runtime/networking/socket/SocketPeer.d.ts +155 -0
- package/dist/runtime/typescript/ServiceUpdate.d.ts +46 -0
- package/docs/AI_CHEATSHEET.md +211 -0
- package/docs/COOKBOOK.md +912 -0
- package/docs/RULES.md +307 -0
- package/docs/ai-manifest.json +725 -0
- package/docs/guides/AUTHENTICATE.md +246 -0
- package/docs/guides/CHARACTER_PLAYER.md +439 -0
- package/docs/guides/CLOUDSCRIPT.md +335 -0
- package/docs/guides/COCOS_CREATOR_INTEGRATION.md +150 -0
- package/docs/guides/CONTENT.md +291 -0
- package/docs/guides/DASHBOARD.md +262 -0
- package/docs/guides/GAME_PLAYER.md +473 -0
- package/docs/guides/GROUP.md +412 -0
- package/docs/guides/INVENTORY.md +375 -0
- package/docs/guides/MASTER_PLAYER.md +458 -0
- package/docs/guides/MULTIPLAYER.md +303 -0
- package/docs/guides/STORE_INVENTORY.md +313 -0
- package/docs/llms-full.txt +43 -0
- package/docs/reference/API_AUTHENTICATE.md +75 -0
- package/docs/reference/API_CHARACTER_PLAYER.md +226 -0
- package/docs/reference/API_CLOUDSCRIPT.md +82 -0
- package/docs/reference/API_CONTENT.md +88 -0
- package/docs/reference/API_DASHBOARD.md +82 -0
- package/docs/reference/API_GAME_PLAYER.md +223 -0
- package/docs/reference/API_GROUP.md +187 -0
- package/docs/reference/API_INDEX.md +57 -0
- package/docs/reference/API_INVENTORY.md +169 -0
- package/docs/reference/API_MASTER_PLAYER.md +323 -0
- package/docs/reference/API_MULTIPLAYER.md +97 -0
- package/docs/reference/API_STORE_INVENTORY.md +109 -0
- package/docs/reference/CONFIG.md +107 -0
- package/docs/reference/DTO_INDEX.md +2543 -0
- package/docs/reference/ENUMS.md +433 -0
- package/docs/reference/ERROR_HANDLING.md +159 -0
- package/docs/reference/EVENTS.md +188 -0
- package/docs/reference/PERMISSION_RULES.md +55 -0
- package/docs/reference/dto/AUTHENTICATE.md +619 -0
- package/docs/reference/dto/CHARACTER_PLAYER.md +3686 -0
- package/docs/reference/dto/CLOUDSCRIPT.md +400 -0
- package/docs/reference/dto/CONTENT.md +548 -0
- package/docs/reference/dto/DASHBOARD.md +1980 -0
- package/docs/reference/dto/GAME_PLAYER.md +3631 -0
- package/docs/reference/dto/GENERIC.md +151 -0
- package/docs/reference/dto/GROUP.md +2842 -0
- package/docs/reference/dto/INVENTORY.md +2385 -0
- package/docs/reference/dto/MASTER_PLAYER.md +6024 -0
- package/docs/reference/dto/MULTIPLAYER.md +850 -0
- package/docs/reference/dto/STORE_INVENTORY.md +1262 -0
- package/llms.txt +47 -0
- package/package.json +12 -3
- package/GNServerSettings.debug.json +0 -21
- package/docs/COCOS_CREATOR_INTEGRATION.md +0 -116
- package/examples/cocos-creator/GearNExample.ts.txt +0 -176
- package/srcSwift/Package.swift +0 -32
- package/srcSwift/Sources/GearN/runtime/GNNetwork.swift +0 -530
- package/srcSwift/Sources/GearN/runtime/GNNetworkAuthenticateApi.swift +0 -178
- package/srcSwift/Sources/GearN/runtime/GNNetworkCharacterPlayerApi.swift +0 -1162
- package/srcSwift/Sources/GearN/runtime/GNNetworkCloudScriptApi.swift +0 -154
- package/srcSwift/Sources/GearN/runtime/GNNetworkContentApi.swift +0 -208
- package/srcSwift/Sources/GearN/runtime/GNNetworkDashboardApi.swift +0 -240
- package/srcSwift/Sources/GearN/runtime/GNNetworkGamePlayerApi.swift +0 -1369
- package/srcSwift/Sources/GearN/runtime/GNNetworkGroupApi.swift +0 -1100
- package/srcSwift/Sources/GearN/runtime/GNNetworkInventoryApi.swift +0 -937
- package/srcSwift/Sources/GearN/runtime/GNNetworkMasterPlayerApi.swift +0 -2323
- package/srcSwift/Sources/GearN/runtime/GNNetworkMultiplayerApi.swift +0 -298
- package/srcSwift/Sources/GearN/runtime/GNNetworkStoreInventoryApi.swift +0 -397
- package/srcSwift/Sources/GearN/runtime/common/Action0.swift +0 -3
- package/srcSwift/Sources/GearN/runtime/common/Action1.swift +0 -3
- package/srcSwift/Sources/GearN/runtime/common/Action2.swift +0 -3
- package/srcSwift/Sources/GearN/runtime/common/Action3.swift +0 -3
- package/srcSwift/Sources/GearN/runtime/common/Action4.swift +0 -3
- package/srcSwift/Sources/GearN/runtime/common/GNArray.swift +0 -204
- package/srcSwift/Sources/GearN/runtime/common/GNData.swift +0 -108
- package/srcSwift/Sources/GearN/runtime/common/GNHashtable.swift +0 -200
- package/srcSwift/Sources/GearN/runtime/config/GNServerSettings.swift +0 -95
- package/srcSwift/Sources/GearN/runtime/constant/Commands.swift +0 -28
- package/srcSwift/Sources/GearN/runtime/constant/EventCode.swift +0 -10
- package/srcSwift/Sources/GearN/runtime/constant/OperationCode.swift +0 -252
- package/srcSwift/Sources/GearN/runtime/constant/ReturnCode.swift +0 -19
- package/srcSwift/Sources/GearN/runtime/constant/enumType/ExecuteResponseStatus.swift +0 -9
- package/srcSwift/Sources/GearN/runtime/constant/enumType/FriendStatus.swift +0 -8
- package/srcSwift/Sources/GearN/runtime/constant/enumType/GoogleLoginType.swift +0 -6
- package/srcSwift/Sources/GearN/runtime/constant/enumType/GroupStatus.swift +0 -8
- package/srcSwift/Sources/GearN/runtime/constant/enumType/InvalidMemberType.swift +0 -19
- package/srcSwift/Sources/GearN/runtime/constant/enumType/ItemType.swift +0 -6
- package/srcSwift/Sources/GearN/runtime/constant/enumType/MatchmakingMemberStatus.swift +0 -7
- package/srcSwift/Sources/GearN/runtime/constant/enumType/MatchmakingTicketStatus.swift +0 -9
- package/srcSwift/Sources/GearN/runtime/constant/enumType/OwnerType.swift +0 -10
- package/srcSwift/Sources/GearN/runtime/constant/enumType/PermissionDataItem.swift +0 -6
- package/srcSwift/Sources/GearN/runtime/constant/enumType/PushPlatformType.swift +0 -6
- package/srcSwift/Sources/GearN/runtime/constant/enumType/RequestRole.swift +0 -7
- package/srcSwift/Sources/GearN/runtime/constant/enumType/RequestType.swift +0 -16
- package/srcSwift/Sources/GearN/runtime/constant/enumType/StoreItemType.swift +0 -6
- package/srcSwift/Sources/GearN/runtime/constant/enumType/StoreReceiveType.swift +0 -9
- package/srcSwift/Sources/GearN/runtime/constant/errorCode/ErrorCode.swift +0 -58
- package/srcSwift/Sources/GearN/runtime/constant/parameterCode/ParameterCode.swift +0 -672
- package/srcSwift/Sources/GearN/runtime/entity/DataMember.swift +0 -196
- package/srcSwift/Sources/GearN/runtime/entity/GNMetadata.swift +0 -9
- package/srcSwift/Sources/GearN/runtime/entity/InvalidMember.swift +0 -11
- package/srcSwift/Sources/GearN/runtime/entity/OperationEvent.swift +0 -38
- package/srcSwift/Sources/GearN/runtime/entity/OperationHelper.swift +0 -28
- package/srcSwift/Sources/GearN/runtime/entity/OperationRequest.swift +0 -62
- package/srcSwift/Sources/GearN/runtime/entity/OperationResponse.swift +0 -98
- package/srcSwift/Sources/GearN/runtime/entity/models/AuthenticateModels.swift +0 -351
- package/srcSwift/Sources/GearN/runtime/entity/models/AuthenticateRequestModels.swift +0 -81
- package/srcSwift/Sources/GearN/runtime/entity/models/AuthenticateResponseModels.swift +0 -108
- package/srcSwift/Sources/GearN/runtime/entity/models/CharacterPlayerModels.swift +0 -1045
- package/srcSwift/Sources/GearN/runtime/entity/models/CharacterPlayerRequestModels.swift +0 -821
- package/srcSwift/Sources/GearN/runtime/entity/models/CharacterPlayerResponseModels.swift +0 -588
- package/srcSwift/Sources/GearN/runtime/entity/models/CloudScriptModels.swift +0 -187
- package/srcSwift/Sources/GearN/runtime/entity/models/CloudScriptRequestModels.swift +0 -84
- package/srcSwift/Sources/GearN/runtime/entity/models/CloudScriptResponseModels.swift +0 -59
- package/srcSwift/Sources/GearN/runtime/entity/models/ContentModels.swift +0 -195
- package/srcSwift/Sources/GearN/runtime/entity/models/ContentRequestModels.swift +0 -116
- package/srcSwift/Sources/GearN/runtime/entity/models/ContentResponseModels.swift +0 -81
- package/srcSwift/Sources/GearN/runtime/entity/models/DashboardModels.swift +0 -426
- package/srcSwift/Sources/GearN/runtime/entity/models/DashboardRequestModels.swift +0 -160
- package/srcSwift/Sources/GearN/runtime/entity/models/DashboardResponseModels.swift +0 -82
- package/srcSwift/Sources/GearN/runtime/entity/models/GamePlayerModels.swift +0 -1334
- package/srcSwift/Sources/GearN/runtime/entity/models/GamePlayerRequestModels.swift +0 -643
- package/srcSwift/Sources/GearN/runtime/entity/models/GamePlayerResponseModels.swift +0 -213
- package/srcSwift/Sources/GearN/runtime/entity/models/GenericModels.swift +0 -171
- package/srcSwift/Sources/GearN/runtime/entity/models/GroupModels.swift +0 -850
- package/srcSwift/Sources/GearN/runtime/entity/models/GroupRequestModels.swift +0 -485
- package/srcSwift/Sources/GearN/runtime/entity/models/GroupResponseModels.swift +0 -165
- package/srcSwift/Sources/GearN/runtime/entity/models/InventoryModels.swift +0 -679
- package/srcSwift/Sources/GearN/runtime/entity/models/InventoryRequestModels.swift +0 -413
- package/srcSwift/Sources/GearN/runtime/entity/models/InventoryResponseModels.swift +0 -141
- package/srcSwift/Sources/GearN/runtime/entity/models/MasterPlayerModels.swift +0 -378
- package/srcSwift/Sources/GearN/runtime/entity/models/MasterPlayerRequestModels.swift +0 -147
- package/srcSwift/Sources/GearN/runtime/entity/models/MasterPlayerResponseModels.swift +0 -318
- package/srcSwift/Sources/GearN/runtime/entity/models/MultiplayerModels.swift +0 -319
- package/srcSwift/Sources/GearN/runtime/entity/models/MultiplayerRequestModels.swift +0 -125
- package/srcSwift/Sources/GearN/runtime/entity/models/MultiplayerResponseModels.swift +0 -45
- package/srcSwift/Sources/GearN/runtime/entity/models/StoreInventoryModels.swift +0 -633
- package/srcSwift/Sources/GearN/runtime/entity/models/StoreInventoryRequestModels.swift +0 -173
- package/srcSwift/Sources/GearN/runtime/entity/models/StoreInventoryResponseModels.swift +0 -61
- package/srcSwift/Sources/GearN/runtime/entity/request/CustomOperationRequest.swift +0 -42
- package/srcSwift/Sources/GearN/runtime/entity/response/CustomOperationResponse.swift +0 -49
- package/srcSwift/Sources/GearN/runtime/entity/response/GetAuthInfoResponse.swift +0 -43
- package/srcSwift/Sources/GearN/runtime/entity/response/HealthCheckResponse.swift +0 -86
- package/srcSwift/Sources/GearN/runtime/entity/response/UploadFileResponse.swift +0 -15
- package/srcSwift/Sources/GearN/runtime/helper/CodeHelper.swift +0 -107
- package/srcSwift/Sources/GearN/runtime/helper/ConverterService.swift +0 -98
- package/srcSwift/Sources/GearN/runtime/helper/EnumUtility.swift +0 -34
- package/srcSwift/Sources/GearN/runtime/helper/GNSupport.swift +0 -41
- package/srcSwift/Sources/GearN/runtime/helper/GNUtils.swift +0 -66
- package/srcSwift/Sources/GearN/runtime/helper/MessagePackConverterService.swift +0 -21
- package/srcSwift/Sources/GearN/runtime/helper/StorageService.swift +0 -29
- package/srcSwift/Sources/GearN/runtime/logger/GNDebug.swift +0 -33
- package/srcSwift/Sources/GearN/runtime/networking/AuthenticateStatus.swift +0 -24
- package/srcSwift/Sources/GearN/runtime/networking/IPeer.swift +0 -8
- package/srcSwift/Sources/GearN/runtime/networking/NetworkingPeer.swift +0 -368
- package/srcSwift/Sources/GearN/runtime/networking/OperationPending.swift +0 -81
- package/srcSwift/Sources/GearN/runtime/networking/PeerBase.swift +0 -228
- package/srcSwift/Sources/GearN/runtime/networking/handler/IServerEventHandler.swift +0 -20
- package/srcSwift/Sources/GearN/runtime/networking/http/HttpPeer.swift +0 -226
- package/srcSwift/Sources/GearN/runtime/networking/http/HttpTypes.swift +0 -24
- package/srcSwift/Sources/GearN/runtime/networking/http/NetworkingHttpPeerBase.swift +0 -13
- package/srcSwift/Sources/GearN/runtime/networking/http/NetworkingPeerUrlSession.swift +0 -125
- package/srcSwift/Sources/GearN/runtime/networking/request/NetRequest.swift +0 -19
- package/srcSwift/Sources/GearN/runtime/networking/response/NetResponse.swift +0 -13
- package/srcSwift/Sources/GearN/runtime/networking/socket/NetworkingPeerSocketIOClient.swift +0 -244
- package/srcSwift/Sources/GearN/runtime/networking/socket/NetworkingSocketPeerBase.swift +0 -59
- package/srcSwift/Sources/GearN/runtime/networking/socket/SocketPeer.swift +0 -136
- package/tsconfig-build.cocos.json +0 -31
- package/webpack.config.cocos.mjs +0 -78
|
@@ -1,18 +1,126 @@
|
|
|
1
1
|
import { GNHashtable } from "./../common/GNData";
|
|
2
|
+
/**
|
|
3
|
+
* Low-level request envelope sent to the GearN backend.
|
|
4
|
+
*
|
|
5
|
+
* Carries the operation code, the optional parameter bag, the
|
|
6
|
+
* client-assigned request id used to correlate the response, and a
|
|
7
|
+
* per-request timeout. Most application code never instantiates
|
|
8
|
+
* this class directly — the typed `*Api` wrappers and
|
|
9
|
+
* `CustomOperationRequest` subclasses build it for you. Reach for
|
|
10
|
+
* the raw class only when issuing custom operations through
|
|
11
|
+
* {@link GNNetwork.sendViaSocket} / {@link GNNetwork.sendViaHttp}.
|
|
12
|
+
*
|
|
13
|
+
* Request id semantics:
|
|
14
|
+
* - The default constructor leaves the id unassigned. The peer
|
|
15
|
+
* later sets a unique id during {@link PeerBase.enqueue} so the
|
|
16
|
+
* response can be matched to the right callback.
|
|
17
|
+
* - Set the id to `-1` explicitly when you want a fire-and-forget
|
|
18
|
+
* request: the peer sees the sentinel and skips both the id
|
|
19
|
+
* assignment and the in-flight tracking, so no response will
|
|
20
|
+
* ever resolve through the SDK callback path.
|
|
21
|
+
*/
|
|
2
22
|
export declare class OperationRequest {
|
|
23
|
+
/**
|
|
24
|
+
* Sentinel used by the SDK in two unrelated places:
|
|
25
|
+
*
|
|
26
|
+
* - As the **default timeout in seconds** when application code
|
|
27
|
+
* does not pass an explicit timeout — the transport replaces
|
|
28
|
+
* it with `GNServerSettings.getDefaultTimeoutInSeconds()` at
|
|
29
|
+
* send time.
|
|
30
|
+
* - As the magic value `20` shared with the same default in
|
|
31
|
+
* {@link GNServerSettings} so the two places agree by
|
|
32
|
+
* construction.
|
|
33
|
+
*/
|
|
3
34
|
static readonly defaultTimeOut: number;
|
|
35
|
+
/**
|
|
36
|
+
* Operation code carried in every wire frame. Values come from
|
|
37
|
+
* {@link OperationCode}.
|
|
38
|
+
*/
|
|
4
39
|
private operationCode;
|
|
40
|
+
/**
|
|
41
|
+
* Client-assigned request id used to correlate the response.
|
|
42
|
+
* Stays `undefined` until {@link PeerBase.enqueue} assigns one
|
|
43
|
+
* (or remains `-1` for fire-and-forget calls).
|
|
44
|
+
*/
|
|
5
45
|
private requestId;
|
|
46
|
+
/** Optional parameter bag, lazily allocated on first {@link setParameter}. */
|
|
6
47
|
private parameters;
|
|
48
|
+
/**
|
|
49
|
+
* Timeout in **seconds**. The {@link defaultTimeOut} sentinel
|
|
50
|
+
* is replaced with the configured default at send time.
|
|
51
|
+
*/
|
|
7
52
|
private timeout;
|
|
53
|
+
/**
|
|
54
|
+
* @param operationCode Operation code from
|
|
55
|
+
* {@link OperationCode}.
|
|
56
|
+
* @param timeout Optional per-request timeout in seconds.
|
|
57
|
+
* Defaults to {@link defaultTimeOut} so
|
|
58
|
+
* the transport can substitute the
|
|
59
|
+
* configured value.
|
|
60
|
+
*/
|
|
8
61
|
constructor(operationCode: string, timeout?: number);
|
|
62
|
+
/**
|
|
63
|
+
* Returns the operation code embedded in the request.
|
|
64
|
+
*/
|
|
9
65
|
getOperationCode(): string;
|
|
66
|
+
/**
|
|
67
|
+
* Returns the request id used for response correlation.
|
|
68
|
+
*
|
|
69
|
+
* @returns Numeric id (assigned by the peer), or `-1` for
|
|
70
|
+
* fire-and-forget requests, or `undefined` before
|
|
71
|
+
* {@link PeerBase.enqueue} runs.
|
|
72
|
+
*/
|
|
10
73
|
getRequestId(): number;
|
|
74
|
+
/**
|
|
75
|
+
* Returns the parameter bag that will be serialised onto the
|
|
76
|
+
* wire, or `null` when no parameters have been added.
|
|
77
|
+
*/
|
|
11
78
|
getParameters(): GNHashtable;
|
|
79
|
+
/**
|
|
80
|
+
* Returns the timeout in **seconds** that will apply to the
|
|
81
|
+
* request.
|
|
82
|
+
*/
|
|
12
83
|
getTimeout(): number;
|
|
84
|
+
/**
|
|
85
|
+
* Replaces the request id and returns the current request for
|
|
86
|
+
* chaining.
|
|
87
|
+
*
|
|
88
|
+
* @param requestId New id. Use `-1` to opt into the
|
|
89
|
+
* fire-and-forget path.
|
|
90
|
+
*/
|
|
13
91
|
setRequestId(requestId: number): OperationRequest;
|
|
92
|
+
/**
|
|
93
|
+
* Adds or replaces a single parameter and returns the request
|
|
94
|
+
* for chaining.
|
|
95
|
+
*
|
|
96
|
+
* Lazily allocates the underlying {@link GNHashtable} on the
|
|
97
|
+
* first call so empty requests do not pay for the container.
|
|
98
|
+
*
|
|
99
|
+
* @param key Wire-level parameter key — usually a constant
|
|
100
|
+
* from {@link ParameterCode}.
|
|
101
|
+
* @param value Any value accepted by
|
|
102
|
+
* {@link GNHashtable.add} (primitives, plain
|
|
103
|
+
* objects, arrays, nested containers).
|
|
104
|
+
*/
|
|
14
105
|
setParameter(key: string, value: any): OperationRequest;
|
|
106
|
+
/**
|
|
107
|
+
* Replaces the entire parameter bag and returns the request for
|
|
108
|
+
* chaining.
|
|
109
|
+
*/
|
|
15
110
|
setParameters(parameters: GNHashtable): OperationRequest;
|
|
111
|
+
/**
|
|
112
|
+
* Replaces the timeout (in seconds) and returns the request for
|
|
113
|
+
* chaining.
|
|
114
|
+
*/
|
|
16
115
|
setTimeout(timeout: number): OperationRequest;
|
|
116
|
+
/**
|
|
117
|
+
* Returns a debug-friendly summary of the request.
|
|
118
|
+
*
|
|
119
|
+
* Used by `[GN Socket SEND]` / `[GN Http SEND]` log lines. The
|
|
120
|
+
* parameters are dumped via
|
|
121
|
+
* `JSON.stringify(parameters?.toData())` so nested
|
|
122
|
+
* {@link GNHashtable} / {@link GNArray} containers are
|
|
123
|
+
* expanded into plain objects / arrays.
|
|
124
|
+
*/
|
|
17
125
|
toString(): string;
|
|
18
126
|
}
|
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
import { GNHashtable } from "./../common/GNData";
|
|
2
2
|
import { InvalidMember } from "./InvalidMember";
|
|
3
|
+
/**
|
|
4
|
+
* Low-level response container produced by the SDK transports.
|
|
5
|
+
*
|
|
6
|
+
* Built by {@link PeerBase.onResponseHandler} from the raw response
|
|
7
|
+
* payload and handed to either:
|
|
8
|
+
* - the application callback registered through
|
|
9
|
+
* {@link GNNetwork.sendViaSocket} / `sendViaHttp` (raw consumers);
|
|
10
|
+
* or
|
|
11
|
+
* - the typed `*OperationResponse` wrapper that
|
|
12
|
+
* {@link GNNetwork.sendViaSocketTResponse} / `sendViaHttpTResponse`
|
|
13
|
+
* built from the supplied response class.
|
|
14
|
+
*
|
|
15
|
+
* Validation: when the server rejects a request because of malformed
|
|
16
|
+
* parameters, it ships a list of offending keys via
|
|
17
|
+
* `invalidRequestParameters`. {@link PeerBase.onResponseHandler}
|
|
18
|
+
* decodes the inner array into typed {@link InvalidMember} entries
|
|
19
|
+
* accessible through {@link getInvalidMembers}.
|
|
20
|
+
*/
|
|
3
21
|
export declare class OperationResponse {
|
|
4
22
|
private operationCode;
|
|
5
23
|
private responseId;
|
|
@@ -7,18 +25,110 @@ export declare class OperationResponse {
|
|
|
7
25
|
private debugMessage;
|
|
8
26
|
private parameters;
|
|
9
27
|
private invalidMembers;
|
|
28
|
+
/**
|
|
29
|
+
* @param operationCode Operation code that produced the
|
|
30
|
+
* response (mirrored from the matching
|
|
31
|
+
* request).
|
|
32
|
+
* @param responseId Response id used for correlation.
|
|
33
|
+
* Matches the request's id assigned by
|
|
34
|
+
* {@link PeerBase.enqueue}.
|
|
35
|
+
*/
|
|
10
36
|
constructor(operationCode: string, responseId: number);
|
|
37
|
+
/**
|
|
38
|
+
* Returns the operation code carried by the response.
|
|
39
|
+
*/
|
|
11
40
|
getOperationCode(): string;
|
|
41
|
+
/**
|
|
42
|
+
* Returns the backend return code (from {@link ReturnCode}).
|
|
43
|
+
*
|
|
44
|
+
* Use {@link hasError} when you only need a boolean
|
|
45
|
+
* success / failure check.
|
|
46
|
+
*/
|
|
12
47
|
getReturnCode(): number;
|
|
48
|
+
/**
|
|
49
|
+
* Returns the deserialized response parameter bag.
|
|
50
|
+
*
|
|
51
|
+
* For a successful response this carries the operation-specific
|
|
52
|
+
* payload; for a failed response it is typically empty.
|
|
53
|
+
*/
|
|
13
54
|
getParameters(): GNHashtable;
|
|
55
|
+
/**
|
|
56
|
+
* Returns the response correlation id.
|
|
57
|
+
*
|
|
58
|
+
* Used internally by the in-flight tracking machinery. Most
|
|
59
|
+
* application code can ignore it.
|
|
60
|
+
*/
|
|
14
61
|
getResponseId(): number;
|
|
62
|
+
/**
|
|
63
|
+
* Returns the debug message attached by the backend, or `null`
|
|
64
|
+
* when none was provided.
|
|
65
|
+
*
|
|
66
|
+
* Populated mainly for failure responses — the GearN backend
|
|
67
|
+
* does not include a debug message on success.
|
|
68
|
+
*/
|
|
15
69
|
getDebugMessage(): string;
|
|
70
|
+
/**
|
|
71
|
+
* Returns the list of invalid request parameters reported by
|
|
72
|
+
* the backend, or `null` when none were reported.
|
|
73
|
+
*
|
|
74
|
+
* Populated only when {@link getReturnCode} equals
|
|
75
|
+
* `ReturnCode.InvalidRequestParameters`.
|
|
76
|
+
*/
|
|
16
77
|
getInvalidMembers(): InvalidMember[];
|
|
78
|
+
/**
|
|
79
|
+
* Returns whether the response represents a non-success outcome.
|
|
80
|
+
*
|
|
81
|
+
* @returns `true` when {@link getReturnCode} is anything other
|
|
82
|
+
* than `ReturnCode.Ok`. Note that this is **not** the
|
|
83
|
+
* same as a domain error
|
|
84
|
+
* ({@link ErrorCode}) — domain errors travel inside
|
|
85
|
+
* successful responses; check the operation-specific
|
|
86
|
+
* response data for those.
|
|
87
|
+
*/
|
|
17
88
|
hasError(): boolean;
|
|
89
|
+
/**
|
|
90
|
+
* Sets the return code and returns the response for chaining.
|
|
91
|
+
*
|
|
92
|
+
* Used by {@link PeerBase.onResponseHandler}; application code
|
|
93
|
+
* does not normally call this directly.
|
|
94
|
+
*/
|
|
18
95
|
setReturnCode(returnCode: number): OperationResponse;
|
|
96
|
+
/**
|
|
97
|
+
* Sets the debug message and returns the response for chaining.
|
|
98
|
+
*/
|
|
19
99
|
setDebugMessage(debugMessage: string): OperationResponse;
|
|
100
|
+
/**
|
|
101
|
+
* Adds or replaces a single response parameter.
|
|
102
|
+
*
|
|
103
|
+
* @param k Parameter key — usually a constant from
|
|
104
|
+
* {@link ParameterCode}.
|
|
105
|
+
* @param value Any value accepted by {@link GNHashtable.add}.
|
|
106
|
+
* @returns The response for chaining.
|
|
107
|
+
*/
|
|
20
108
|
setParameter(k: string, value: any): OperationResponse;
|
|
109
|
+
/**
|
|
110
|
+
* Replaces the entire response parameter bag.
|
|
111
|
+
*
|
|
112
|
+
* Used by {@link PeerBase.onResponseHandler} after decoding the
|
|
113
|
+
* raw payload.
|
|
114
|
+
*/
|
|
21
115
|
setParameters(parameters: GNHashtable): OperationResponse;
|
|
116
|
+
/**
|
|
117
|
+
* Replaces the invalid-member collection.
|
|
118
|
+
*
|
|
119
|
+
* Set by {@link PeerBase.onResponseHandler} when the raw
|
|
120
|
+
* response carries `invalidRequestParameters`.
|
|
121
|
+
*/
|
|
22
122
|
setInvalidMembers(invalidMembers: InvalidMember[]): OperationResponse;
|
|
123
|
+
/**
|
|
124
|
+
* Returns a debug-friendly summary of the response, used by the
|
|
125
|
+
* `[GN RECV]` log line.
|
|
126
|
+
*
|
|
127
|
+
* The format adapts to the outcome:
|
|
128
|
+
* - `Ok`: appends the parameter dump.
|
|
129
|
+
* - `InvalidRequestParameters`: appends the offending member
|
|
130
|
+
* list.
|
|
131
|
+
* - Other failures: appends the debug message.
|
|
132
|
+
*/
|
|
23
133
|
toString(): string;
|
|
24
134
|
}
|
|
@@ -1,12 +1,29 @@
|
|
|
1
1
|
import { GNHashtable } from "./../../common/GNData";
|
|
2
2
|
import { GenericModels } from "./GenericModels";
|
|
3
3
|
import { MasterPlayerModels } from "./MasterPlayerModels";
|
|
4
|
+
/**
|
|
5
|
+
* Groups reusable request and response contracts for Authenticate operations.
|
|
6
|
+
*
|
|
7
|
+
* All login and register requests in this namespace use `RequestType.Authenticate` with `RequestRole.Client`.
|
|
8
|
+
* Every login or register flow except `RefreshAuthToken` requires a non-null `infoRequestParam`.
|
|
9
|
+
*/
|
|
4
10
|
export declare namespace AuthenticateModels {
|
|
11
|
+
/**
|
|
12
|
+
* Defines the reusable parameter block `infoRequestParam`.
|
|
13
|
+
*
|
|
14
|
+
* This object controls which optional profile fields should be returned together with the auth response.
|
|
15
|
+
* Every boolean flag defaults to `false`, so omit fields you do not need.
|
|
16
|
+
*/
|
|
5
17
|
class InfoRequestParam {
|
|
18
|
+
/** Include linked external identity data. */
|
|
6
19
|
external?: boolean;
|
|
20
|
+
/** Include segment assignments. */
|
|
7
21
|
segments?: boolean;
|
|
22
|
+
/** Include custom data entries, optionally filtered by `customDataKeys`. */
|
|
8
23
|
customDatas?: boolean;
|
|
24
|
+
/** Include display-name data. */
|
|
9
25
|
displayName?: boolean;
|
|
26
|
+
/** Include avatar data. */
|
|
10
27
|
avatar?: boolean;
|
|
11
28
|
tsCreate?: boolean;
|
|
12
29
|
tags?: boolean;
|
|
@@ -19,64 +36,110 @@ export declare namespace AuthenticateModels {
|
|
|
19
36
|
email?: boolean;
|
|
20
37
|
tsLastLogin?: boolean;
|
|
21
38
|
pushNotifications?: boolean;
|
|
39
|
+
/** Filter the returned player data fields. */
|
|
22
40
|
playerDataKeys?: Array<string>;
|
|
41
|
+
/** Filter the returned player currency fields. */
|
|
23
42
|
playerCurrencyKeys?: Array<string>;
|
|
43
|
+
/** Filter the returned player statistics fields. */
|
|
24
44
|
playerStatisticsKeys?: Array<string>;
|
|
45
|
+
/** Filter the returned custom-data fields. */
|
|
25
46
|
customDataKeys?: Array<string>;
|
|
47
|
+
/** Filter the returned tags by key. */
|
|
26
48
|
tagKeys?: Array<string>;
|
|
27
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* Defines the request payload for `loginByAccount`.
|
|
52
|
+
*
|
|
53
|
+
* Use this flow when the player authenticates with a GearN username and password.
|
|
54
|
+
*/
|
|
28
55
|
class LoginByAccountRequestData {
|
|
29
56
|
username: string;
|
|
30
57
|
password: string;
|
|
58
|
+
/** Controls which optional profile fields should be returned together with the auth payload. */
|
|
31
59
|
infoRequestParam: InfoRequestParam;
|
|
32
60
|
}
|
|
61
|
+
/**
|
|
62
|
+
* Defines the request payload for LoginByAndroidDeviceId.
|
|
63
|
+
*/
|
|
33
64
|
class LoginByAndroidDeviceIdRequestData {
|
|
34
65
|
androidDeviceId: string;
|
|
35
66
|
createPlayerIfNotExists?: boolean;
|
|
36
67
|
infoRequestParam: InfoRequestParam;
|
|
37
68
|
}
|
|
69
|
+
/**
|
|
70
|
+
* Defines the request payload for LoginByApple.
|
|
71
|
+
*/
|
|
38
72
|
class LoginByAppleRequestData {
|
|
39
73
|
token: string;
|
|
40
74
|
createPlayerIfNotExists?: boolean;
|
|
41
75
|
infoRequestParam: InfoRequestParam;
|
|
42
76
|
}
|
|
77
|
+
/**
|
|
78
|
+
* Defines the request payload for LoginByCustomDeviceId.
|
|
79
|
+
*/
|
|
43
80
|
class LoginByCustomDeviceIdRequestData {
|
|
44
81
|
customDeviceId: string;
|
|
45
82
|
createPlayerIfNotExists?: boolean;
|
|
46
83
|
infoRequestParam: InfoRequestParam;
|
|
47
84
|
}
|
|
85
|
+
/**
|
|
86
|
+
* Defines the request payload for LoginByCustomId.
|
|
87
|
+
*/
|
|
48
88
|
class LoginByCustomIdRequestData {
|
|
49
89
|
customId: string;
|
|
50
90
|
createPlayerIfNotExists?: boolean;
|
|
51
91
|
infoRequestParam: InfoRequestParam;
|
|
52
92
|
}
|
|
93
|
+
/**
|
|
94
|
+
* Defines the request payload for LoginByEditorDeviceId.
|
|
95
|
+
*/
|
|
53
96
|
class LoginByEditorDeviceIdRequestData {
|
|
54
97
|
editorDeviceId: string;
|
|
55
98
|
createPlayerIfNotExists?: boolean;
|
|
56
99
|
infoRequestParam: InfoRequestParam;
|
|
57
100
|
}
|
|
101
|
+
/**
|
|
102
|
+
* Defines the request payload for LoginByFacebook.
|
|
103
|
+
*/
|
|
58
104
|
class LoginByFacebookRequestData {
|
|
59
105
|
token: string;
|
|
60
106
|
createPlayerIfNotExists?: boolean;
|
|
61
107
|
infoRequestParam: InfoRequestParam;
|
|
62
108
|
}
|
|
109
|
+
/**
|
|
110
|
+
* Defines the request payload for `loginByGenericService`.
|
|
111
|
+
*
|
|
112
|
+
* `serviceData` is provider-defined and is not constrained by a public typed schema beyond `GNHashtable`.
|
|
113
|
+
*/
|
|
63
114
|
class LoginByGenericServiceRequestData {
|
|
64
115
|
serviceName: string;
|
|
116
|
+
/** Provider-defined payload consumed by the backend integration for `serviceName`. */
|
|
65
117
|
serviceData: GNHashtable;
|
|
66
118
|
createPlayerIfNotExists?: boolean;
|
|
67
119
|
infoRequestParam: InfoRequestParam;
|
|
68
120
|
}
|
|
121
|
+
/**
|
|
122
|
+
* Defines the request payload for `loginByGoogle`.
|
|
123
|
+
*
|
|
124
|
+
* `type` should be mapped with the public `GoogleLoginType` enum.
|
|
125
|
+
*/
|
|
69
126
|
class LoginByGoogleRequestData {
|
|
70
127
|
token: string;
|
|
71
128
|
type: number;
|
|
72
129
|
createPlayerIfNotExists?: boolean;
|
|
73
130
|
infoRequestParam: InfoRequestParam;
|
|
74
131
|
}
|
|
132
|
+
/**
|
|
133
|
+
* Defines the request payload for LoginByGooglePlayGameService.
|
|
134
|
+
*/
|
|
75
135
|
class LoginByGooglePlayGameServiceRequestData {
|
|
76
136
|
token: string;
|
|
77
137
|
createPlayerIfNotExists?: boolean;
|
|
78
138
|
infoRequestParam: InfoRequestParam;
|
|
79
139
|
}
|
|
140
|
+
/**
|
|
141
|
+
* Defines the request payload for LoginByGameCenter.
|
|
142
|
+
*/
|
|
80
143
|
class LoginByGameCenterRequestData {
|
|
81
144
|
playerId: string;
|
|
82
145
|
name: string;
|
|
@@ -87,50 +150,102 @@ export declare namespace AuthenticateModels {
|
|
|
87
150
|
createPlayerIfNotExists?: boolean;
|
|
88
151
|
infoRequestParam: InfoRequestParam;
|
|
89
152
|
}
|
|
153
|
+
/**
|
|
154
|
+
* Defines the request payload for LoginByiOSDeviceId.
|
|
155
|
+
*/
|
|
90
156
|
class LoginByiOSDeviceIdRequestData {
|
|
91
157
|
iOSDeviceId: string;
|
|
92
158
|
createPlayerIfNotExists?: boolean;
|
|
93
159
|
infoRequestParam: InfoRequestParam;
|
|
94
160
|
}
|
|
161
|
+
/**
|
|
162
|
+
* Defines the request payload for LoginByLinuxDeviceId.
|
|
163
|
+
*/
|
|
95
164
|
class LoginByLinuxDeviceIdRequestData {
|
|
96
165
|
linuxDeviceId: string;
|
|
97
166
|
createPlayerIfNotExists?: boolean;
|
|
98
167
|
infoRequestParam: InfoRequestParam;
|
|
99
168
|
}
|
|
169
|
+
/**
|
|
170
|
+
* Defines the request payload for LoginByMacOSDeviceId.
|
|
171
|
+
*/
|
|
100
172
|
class LoginByMacOSDeviceIdRequestData {
|
|
101
173
|
macOSDeviceId: string;
|
|
102
174
|
createPlayerIfNotExists?: boolean;
|
|
103
175
|
infoRequestParam: InfoRequestParam;
|
|
104
176
|
}
|
|
177
|
+
/**
|
|
178
|
+
* Defines the request payload for LoginByWindowsDeviceId.
|
|
179
|
+
*/
|
|
105
180
|
class LoginByWindowsDeviceIdRequestData {
|
|
106
181
|
windowsDeviceId: string;
|
|
107
182
|
createPlayerIfNotExists?: boolean;
|
|
108
183
|
infoRequestParam: InfoRequestParam;
|
|
109
184
|
}
|
|
185
|
+
/**
|
|
186
|
+
* Defines the request payload for LoginByWindowsPhoneDeviceId.
|
|
187
|
+
*/
|
|
110
188
|
class LoginByWindowsPhoneDeviceIdRequestData {
|
|
111
189
|
windowsPhoneDeviceId: string;
|
|
112
190
|
createPlayerIfNotExists?: boolean;
|
|
113
191
|
infoRequestParam: InfoRequestParam;
|
|
114
192
|
}
|
|
193
|
+
/**
|
|
194
|
+
* Defines the request payload for `registerAccount`.
|
|
195
|
+
*
|
|
196
|
+
* This creates a GearN account and returns the same profile-style payload shape used by the normal login flows.
|
|
197
|
+
*/
|
|
115
198
|
class RegisterAccountRequestData {
|
|
116
199
|
username: string;
|
|
117
200
|
password: string;
|
|
201
|
+
/** Controls which optional profile fields should be returned together with the auth payload. */
|
|
118
202
|
infoRequestParam: InfoRequestParam;
|
|
119
203
|
}
|
|
204
|
+
/**
|
|
205
|
+
* Defines the request payload for `refreshAuthToken`.
|
|
206
|
+
*
|
|
207
|
+
* The request body is intentionally empty. The current auth context comes from the stored auth token
|
|
208
|
+
* or from `overrideAuthToken` passed to the API call.
|
|
209
|
+
*/
|
|
120
210
|
class RefreshAuthTokenRequestData {
|
|
121
211
|
}
|
|
212
|
+
/**
|
|
213
|
+
* Defines the response payload returned by most login and register flows.
|
|
214
|
+
*
|
|
215
|
+
* This payload extends `MasterPlayerWithUserIdResponseData`, so it may already include profile data
|
|
216
|
+
* requested through `infoRequestParam` in addition to auth-specific fields.
|
|
217
|
+
*/
|
|
122
218
|
class AuthenticateResponseData extends MasterPlayerModels.MasterPlayerWithUserIdResponseData {
|
|
219
|
+
/** Indicates whether the backend created a new player as part of the login flow. */
|
|
123
220
|
newlyCreated?: boolean;
|
|
221
|
+
/** Auth token to cache locally and reuse for future HTTP or socket auth flows. */
|
|
124
222
|
authToken?: string;
|
|
223
|
+
/** Optional ban state returned together with the auth payload. */
|
|
125
224
|
playerBan?: GenericModels.BanItem;
|
|
126
225
|
}
|
|
226
|
+
/**
|
|
227
|
+
* Defines the response payload for `loginByGenericService`.
|
|
228
|
+
*
|
|
229
|
+
* This extends the normal auth response and adds an optional backend error message for the external provider flow.
|
|
230
|
+
*/
|
|
127
231
|
class GenericServiceAuthenticateResponseData extends AuthenticateResponseData {
|
|
232
|
+
/** Optional provider-specific error message returned by the backend integration. */
|
|
128
233
|
errorMessage?: string;
|
|
129
234
|
}
|
|
235
|
+
/**
|
|
236
|
+
* Defines the response payload for `refreshAuthToken`.
|
|
237
|
+
*
|
|
238
|
+
* Unlike the normal login flows, this response only returns the refreshed auth token and optional ban state.
|
|
239
|
+
*/
|
|
130
240
|
class RefreshAuthTokenResponseData {
|
|
241
|
+
/** Refreshed auth token that should replace the previously stored token. */
|
|
131
242
|
authToken?: string;
|
|
243
|
+
/** Optional ban state returned together with the refreshed token. */
|
|
132
244
|
playerBan?: GenericModels.BanItem;
|
|
133
245
|
}
|
|
246
|
+
/**
|
|
247
|
+
* Defines an intentionally empty response payload.
|
|
248
|
+
*/
|
|
134
249
|
class EmptyResponseData {
|
|
135
250
|
}
|
|
136
251
|
}
|