@xmobitea/gn-typescript-client 2.6.13-tsc → 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 +71354 -0
- package/dist/gearn.js.client.min.js +2 -0
- package/dist/gearn.js.client.min.js.LICENSE.txt +14 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.js +58386 -339
- 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 +11 -2
- package/GNServerSettings.debug.json +0 -21
- package/dist/runtime/GNNetwork.js +0 -273
- package/dist/runtime/GNNetworkAuthenticateApi.js +0 -122
- package/dist/runtime/GNNetworkCharacterPlayerApi.js +0 -968
- package/dist/runtime/GNNetworkCloudScriptApi.js +0 -104
- package/dist/runtime/GNNetworkContentApi.js +0 -140
- package/dist/runtime/GNNetworkDashboardApi.js +0 -170
- package/dist/runtime/GNNetworkGamePlayerApi.js +0 -950
- package/dist/runtime/GNNetworkGroupApi.js +0 -734
- package/dist/runtime/GNNetworkInventoryApi.js +0 -626
- package/dist/runtime/GNNetworkMasterPlayerApi.js +0 -1550
- package/dist/runtime/GNNetworkMultiplayerApi.js +0 -194
- package/dist/runtime/GNNetworkStoreInventoryApi.js +0 -266
- package/dist/runtime/common/Action0.js +0 -1
- package/dist/runtime/common/Action1.js +0 -1
- package/dist/runtime/common/Action2.js +0 -1
- package/dist/runtime/common/Action3.js +0 -1
- package/dist/runtime/common/Action4.js +0 -1
- package/dist/runtime/common/GNData.js +0 -209
- package/dist/runtime/config/GNServerSettings.js +0 -156
- package/dist/runtime/constant/Commands.js +0 -20
- package/dist/runtime/constant/EventCode.js +0 -8
- package/dist/runtime/constant/OperationCode.js +0 -221
- package/dist/runtime/constant/ReturnCode.js +0 -14
- package/dist/runtime/constant/enumType/ExecuteResponseStatus.js +0 -8
- package/dist/runtime/constant/enumType/FriendStatus.js +0 -7
- package/dist/runtime/constant/enumType/GoogleLoginType.js +0 -5
- package/dist/runtime/constant/enumType/GroupStatus.js +0 -7
- package/dist/runtime/constant/enumType/InvalidMemberType.js +0 -18
- package/dist/runtime/constant/enumType/ItemType.js +0 -5
- package/dist/runtime/constant/enumType/MatchmakingMemberStatus.js +0 -6
- package/dist/runtime/constant/enumType/MatchmakingTicketStatus.js +0 -8
- package/dist/runtime/constant/enumType/OwnerType.js +0 -9
- package/dist/runtime/constant/enumType/PermissionDataItem.js +0 -5
- package/dist/runtime/constant/enumType/PushPlatformType.js +0 -5
- package/dist/runtime/constant/enumType/RequestRole.js +0 -6
- package/dist/runtime/constant/enumType/RequestType.js +0 -15
- package/dist/runtime/constant/enumType/StoreItemType.js +0 -5
- package/dist/runtime/constant/enumType/StoreReceiveType.js +0 -8
- package/dist/runtime/constant/errorCode/ErrorCode.js +0 -52
- package/dist/runtime/constant/parameterCode/ParameterCode.js +0 -617
- package/dist/runtime/entity/DataMember.js +0 -208
- package/dist/runtime/entity/GNMetadata.js +0 -11
- package/dist/runtime/entity/InvalidMember.js +0 -1
- package/dist/runtime/entity/OperationEvent.js +0 -24
- package/dist/runtime/entity/OperationRequest.js +0 -42
- package/dist/runtime/entity/OperationResponse.js +0 -73
- package/dist/runtime/entity/models/AuthenticateModels.js +0 -426
- package/dist/runtime/entity/models/AuthenticateRequestModels.js +0 -188
- package/dist/runtime/entity/models/AuthenticateResponseModels.js +0 -131
- package/dist/runtime/entity/models/CharacterPlayerModels.js +0 -1433
- package/dist/runtime/entity/models/CharacterPlayerRequestModels.js +0 -1386
- package/dist/runtime/entity/models/CharacterPlayerResponseModels.js +0 -376
- package/dist/runtime/entity/models/CloudScriptModels.js +0 -197
- package/dist/runtime/entity/models/CloudScriptRequestModels.js +0 -138
- package/dist/runtime/entity/models/CloudScriptResponseModels.js +0 -40
- package/dist/runtime/entity/models/ContentModels.js +0 -203
- package/dist/runtime/entity/models/ContentRequestModels.js +0 -190
- package/dist/runtime/entity/models/ContentResponseModels.js +0 -54
- package/dist/runtime/entity/models/DashboardModels.js +0 -3002
- package/dist/runtime/entity/models/DashboardRequestModels.js +0 -268
- package/dist/runtime/entity/models/DashboardResponseModels.js +0 -187
- package/dist/runtime/entity/models/GamePlayerModels.js +0 -1591
- package/dist/runtime/entity/models/GamePlayerRequestModels.js +0 -1360
- package/dist/runtime/entity/models/GamePlayerResponseModels.js +0 -369
- package/dist/runtime/entity/models/GenericModels.js +0 -177
- package/dist/runtime/entity/models/GroupModels.js +0 -1135
- package/dist/runtime/entity/models/GroupRequestModels.js +0 -1048
- package/dist/runtime/entity/models/GroupResponseModels.js +0 -285
- package/dist/runtime/entity/models/InventoryModels.js +0 -915
- package/dist/runtime/entity/models/InventoryRequestModels.js +0 -892
- package/dist/runtime/entity/models/InventoryResponseModels.js +0 -243
- package/dist/runtime/entity/models/MasterPlayerModels.js +0 -2573
- package/dist/runtime/entity/models/MasterPlayerRequestModels.js +0 -2228
- package/dist/runtime/entity/models/MasterPlayerResponseModels.js +0 -607
- package/dist/runtime/entity/models/MultiplayerModels.js +0 -404
- package/dist/runtime/entity/models/MultiplayerRequestModels.js +0 -268
- package/dist/runtime/entity/models/MultiplayerResponseModels.js +0 -75
- package/dist/runtime/entity/models/StoreInventoryModels.js +0 -797
- package/dist/runtime/entity/models/StoreInventoryRequestModels.js +0 -372
- package/dist/runtime/entity/models/StoreInventoryResponseModels.js +0 -103
- package/dist/runtime/entity/request/CustomOperationRequest.js +0 -24
- package/dist/runtime/entity/response/CustomOperationResponse.js +0 -29
- package/dist/runtime/entity/response/GetAuthInfoResponse.js +0 -2
- package/dist/runtime/entity/response/HealthCheckResponse.js +0 -2
- package/dist/runtime/entity/response/UploadFileResponse.js +0 -2
- package/dist/runtime/helper/CodeHelper.js +0 -63
- package/dist/runtime/helper/ConverterService.js +0 -275
- package/dist/runtime/helper/EnumUtility.js +0 -33
- package/dist/runtime/helper/GNSupport.js +0 -47
- package/dist/runtime/helper/GNUtils.js +0 -72
- package/dist/runtime/helper/MessagePackConverterService.js +0 -9
- package/dist/runtime/helper/OperationHelper.js +0 -24
- package/dist/runtime/helper/StorageService.js +0 -62
- package/dist/runtime/logger/GNDebug.js +0 -29
- package/dist/runtime/networking/AuthenticateStatus.js +0 -14
- package/dist/runtime/networking/IPeer.js +0 -1
- package/dist/runtime/networking/NetworkingPeer.js +0 -210
- package/dist/runtime/networking/OperationPending.js +0 -53
- package/dist/runtime/networking/PeerBase.js +0 -161
- package/dist/runtime/networking/handler/IServerEventHandler.js +0 -13
- package/dist/runtime/networking/handler/OnCharacterPlayerFriendUpdateEventHandler.js +0 -39
- package/dist/runtime/networking/handler/OnCharacterPlayerGroupUpdateEventHandler.js +0 -39
- package/dist/runtime/networking/handler/OnGamePlayerFriendUpdateEventHandler.js +0 -39
- package/dist/runtime/networking/handler/OnGamePlayerGroupUpdateEventHandler.js +0 -39
- package/dist/runtime/networking/handler/OnGroupMemberUpdateEventHandler.js +0 -35
- package/dist/runtime/networking/handler/OnGroupMessageUpdateEventHandler.js +0 -43
- package/dist/runtime/networking/http/HttpPeer.js +0 -123
- package/dist/runtime/networking/http/NetworkingHttpPeerBase.js +0 -9
- package/dist/runtime/networking/http/NetworkingPeerAxiosRequest.js +0 -179
- package/dist/runtime/networking/socket/NetworkingPeerSocketIOClient.js +0 -130
- package/dist/runtime/networking/socket/NetworkingSocketPeerBase.js +0 -165
- package/dist/runtime/networking/socket/SocketPeer.js +0 -115
- package/dist/runtime/typescript/ServiceUpdate.js +0 -22
- 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,69 +1,437 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Discriminated union of every value the GearN containers accept.
|
|
3
|
+
*
|
|
4
|
+
* `GNHashtable` and `GNArray` only ever store one of these shapes
|
|
5
|
+
* internally. Plain JavaScript objects and arrays handed to
|
|
6
|
+
* {@link GNHashtable.add} / {@link GNArray.add} are wrapped into the
|
|
7
|
+
* corresponding container by
|
|
8
|
+
* {@link GNData.createUseDataFromOriginData} before they are stored.
|
|
9
|
+
* Keeping the union narrow lets the serializer in
|
|
10
|
+
* {@link MessagePackConverterService} branch on a small, well-known
|
|
11
|
+
* set of types.
|
|
12
|
+
*/
|
|
1
13
|
type GNDataType = string | number | boolean | null | GNArray | GNHashtable;
|
|
14
|
+
/**
|
|
15
|
+
* Common container contract shared by {@link GNHashtable} (string keys)
|
|
16
|
+
* and {@link GNArray} (numeric indexes).
|
|
17
|
+
*
|
|
18
|
+
* The two implementations differ only in their storage shape — both
|
|
19
|
+
* expose the same lookup, mutation and inspection methods. This
|
|
20
|
+
* interface exists so generic code (the SDK transports, the model
|
|
21
|
+
* (de)serialiser) can accept either container without branching.
|
|
22
|
+
*/
|
|
2
23
|
interface IGNData {
|
|
24
|
+
/** Removes every entry from the container. */
|
|
3
25
|
clear(): void;
|
|
26
|
+
/**
|
|
27
|
+
* Removes the entry at the given key (hash table) or index (array).
|
|
28
|
+
*
|
|
29
|
+
* @returns `true` when an entry was removed, `false` when the key
|
|
30
|
+
* / index did not exist.
|
|
31
|
+
*/
|
|
4
32
|
remove(k: string | number): boolean;
|
|
33
|
+
/** Returns the current number of stored entries. */
|
|
5
34
|
count(): string | number;
|
|
35
|
+
/** Reads the entry as an opaque object reference. */
|
|
6
36
|
getObject(k: string | number, def?: object): object;
|
|
37
|
+
/** Reads the entry as a boolean. */
|
|
7
38
|
getBoolean(k: string | number, def?: boolean): boolean;
|
|
39
|
+
/** Reads the entry as a string. */
|
|
8
40
|
getString(k: string | number, def?: string): string;
|
|
41
|
+
/** Reads the entry as a number. */
|
|
9
42
|
getNumber(k: string | number, def?: number): number;
|
|
43
|
+
/** Reads the entry as a {@link GNHashtable}. */
|
|
10
44
|
getGNHashtable(k: string | number, def?: GNHashtable): GNHashtable;
|
|
45
|
+
/** Reads the entry as a {@link GNArray}. */
|
|
11
46
|
getGNArray(k: string | number, def?: GNArray): GNArray;
|
|
12
47
|
}
|
|
48
|
+
/**
|
|
49
|
+
* Abstract base class for the GearN data containers.
|
|
50
|
+
*
|
|
51
|
+
* Concrete subclasses ({@link GNHashtable}, {@link GNArray}) provide
|
|
52
|
+
* the storage shape; this base class supplies:
|
|
53
|
+
* - the typed `get*` accessors that delegate to the abstract
|
|
54
|
+
* {@link get} hook;
|
|
55
|
+
* - the conversion bridge between plain JavaScript values and the
|
|
56
|
+
* internal {@link GNDataType} representation
|
|
57
|
+
* ({@link createUseDataFromOriginData},
|
|
58
|
+
* {@link createDataFromUseData});
|
|
59
|
+
* - the abstract `clear`, `remove`, `count`, `toData` contract every
|
|
60
|
+
* container must implement.
|
|
61
|
+
*
|
|
62
|
+
* Why the indirection: the SDK accepts both bare JavaScript objects /
|
|
63
|
+
* arrays and `GNHashtable` / `GNArray` instances at every public API
|
|
64
|
+
* surface. By normalising everything to the `GN*` containers as soon
|
|
65
|
+
* as a value is stored, the rest of the SDK (serialisers,
|
|
66
|
+
* transports, network layer) only ever has to deal with the `GN*`
|
|
67
|
+
* shape.
|
|
68
|
+
*/
|
|
13
69
|
export declare abstract class GNData implements IGNData {
|
|
70
|
+
/**
|
|
71
|
+
* Reads the raw stored value at `k`.
|
|
72
|
+
*
|
|
73
|
+
* Implemented by each concrete container with the appropriate
|
|
74
|
+
* lookup logic (string-keyed map for {@link GNHashtable},
|
|
75
|
+
* indexed array for {@link GNArray}). Returns `def` when the
|
|
76
|
+
* lookup misses so the typed `get*` helpers below can stay
|
|
77
|
+
* branchless.
|
|
78
|
+
*
|
|
79
|
+
* @param k Key (string for hash table) or index (number for
|
|
80
|
+
* array).
|
|
81
|
+
* @param def Fallback value returned when the entry is missing
|
|
82
|
+
* or `null`.
|
|
83
|
+
* @returns The stored value cast to `T`, or `def` when not found.
|
|
84
|
+
*/
|
|
14
85
|
protected get<T>(k: string | number, def?: T): T;
|
|
86
|
+
/** Removes every entry from the container. */
|
|
15
87
|
abstract clear(): void;
|
|
88
|
+
/**
|
|
89
|
+
* Removes the entry at `k`.
|
|
90
|
+
*
|
|
91
|
+
* @returns `true` when an entry was removed, `false` when the key
|
|
92
|
+
* / index did not exist.
|
|
93
|
+
*/
|
|
16
94
|
abstract remove(k: string | number): boolean;
|
|
95
|
+
/** Returns the current number of stored entries. */
|
|
17
96
|
abstract count(): string | number;
|
|
97
|
+
/**
|
|
98
|
+
* Reads the entry at `k` as a boolean.
|
|
99
|
+
*
|
|
100
|
+
* @param k Key or index.
|
|
101
|
+
* @param def Returned when the entry is missing or `null`.
|
|
102
|
+
* @returns The stored boolean, or `def` when not found. The value
|
|
103
|
+
* is **not** coerced — if the entry actually holds a
|
|
104
|
+
* number or string the cast performs no validation.
|
|
105
|
+
*/
|
|
18
106
|
getBoolean(k: string | number, def?: boolean): boolean;
|
|
107
|
+
/**
|
|
108
|
+
* Reads the entry at `k` as an opaque object reference.
|
|
109
|
+
*
|
|
110
|
+
* Use this when you only care about presence / identity of the
|
|
111
|
+
* stored value — for typed access prefer {@link getGNHashtable}
|
|
112
|
+
* or {@link getGNArray}.
|
|
113
|
+
*
|
|
114
|
+
* @param k Key or index.
|
|
115
|
+
* @param def Returned when the entry is missing or `null`.
|
|
116
|
+
*/
|
|
19
117
|
getObject(k: string | number, def?: object): object;
|
|
118
|
+
/**
|
|
119
|
+
* Reads the entry at `k` as a string.
|
|
120
|
+
*
|
|
121
|
+
* @param k Key or index.
|
|
122
|
+
* @param def Returned when the entry is missing or `null`.
|
|
123
|
+
*/
|
|
20
124
|
getString(k: string | number, def?: string): string;
|
|
125
|
+
/**
|
|
126
|
+
* Reads the entry at `k` as a number.
|
|
127
|
+
*
|
|
128
|
+
* @param k Key or index.
|
|
129
|
+
* @param def Returned when the entry is missing or `null`.
|
|
130
|
+
*/
|
|
21
131
|
getNumber(k: string | number, def?: number): number;
|
|
132
|
+
/**
|
|
133
|
+
* Reads the entry at `k` as a nested {@link GNHashtable}.
|
|
134
|
+
*
|
|
135
|
+
* @param k Key or index.
|
|
136
|
+
* @param def Returned when the entry is missing or `null`.
|
|
137
|
+
*/
|
|
22
138
|
getGNHashtable(k: string | number, def?: GNHashtable): GNHashtable;
|
|
139
|
+
/**
|
|
140
|
+
* Reads the entry at `k` as a nested {@link GNArray}.
|
|
141
|
+
*
|
|
142
|
+
* @param k Key or index.
|
|
143
|
+
* @param def Returned when the entry is missing or `null`.
|
|
144
|
+
*/
|
|
23
145
|
getGNArray(k: string | number, def?: GNArray): GNArray;
|
|
146
|
+
/**
|
|
147
|
+
* Wraps a plain JavaScript object as a {@link GNHashtable}.
|
|
148
|
+
*
|
|
149
|
+
* Iterates `Object.keys(value)` (own enumerable string keys) and
|
|
150
|
+
* recursively normalises each value through
|
|
151
|
+
* {@link createUseDataFromOriginData}. Symbol keys, non-enumerable
|
|
152
|
+
* properties and prototype-chain entries are ignored — the
|
|
153
|
+
* GearN wire format only supports plain string-keyed objects.
|
|
154
|
+
*/
|
|
24
155
|
private static createGNHashtableFromObject;
|
|
156
|
+
/**
|
|
157
|
+
* Wraps a plain JavaScript array as a {@link GNArray}.
|
|
158
|
+
*
|
|
159
|
+
* Iterates the indexed slots in order and normalises each entry
|
|
160
|
+
* through {@link createUseDataFromOriginData}. Sparse arrays are
|
|
161
|
+
* compacted because the loop iterates by index.
|
|
162
|
+
*/
|
|
25
163
|
private static createGNArrayFromArray;
|
|
164
|
+
/**
|
|
165
|
+
* Normalises a raw JavaScript value into the GearN container
|
|
166
|
+
* representation.
|
|
167
|
+
*
|
|
168
|
+
* Mapping rules:
|
|
169
|
+
* - `null` / `undefined` → `null`.
|
|
170
|
+
* - `string` / `number` / `boolean` → returned unchanged.
|
|
171
|
+
* - Existing `GNArray` / `GNHashtable` instance → returned unchanged.
|
|
172
|
+
* - Plain `Array` → recursively wrapped as `GNArray`.
|
|
173
|
+
* - Any other `object` → recursively wrapped as `GNHashtable`.
|
|
174
|
+
* - Anything else (e.g. `function`, `symbol`) → `null`.
|
|
175
|
+
*
|
|
176
|
+
* Used internally by every container `add(...)` call so the
|
|
177
|
+
* stored representation is always one of the {@link GNDataType}
|
|
178
|
+
* union members.
|
|
179
|
+
*/
|
|
26
180
|
protected static createUseDataFromOriginData(value: any): GNDataType;
|
|
181
|
+
/**
|
|
182
|
+
* Reverse of {@link createUseDataFromOriginData} — unwraps a
|
|
183
|
+
* stored container value back into plain JavaScript data so it
|
|
184
|
+
* can be handed to a non-GearN consumer (`JSON.stringify`,
|
|
185
|
+
* MsgPack codec, application code).
|
|
186
|
+
*
|
|
187
|
+
* Mapping rules:
|
|
188
|
+
* - `null` → `null`.
|
|
189
|
+
* - {@link GNArray} → plain array via `toData()`.
|
|
190
|
+
* - {@link GNHashtable} → plain object via `toData()`.
|
|
191
|
+
* - Primitive → returned unchanged.
|
|
192
|
+
*/
|
|
27
193
|
protected static createDataFromUseData(value: GNDataType): any;
|
|
194
|
+
/**
|
|
195
|
+
* Returns a plain JavaScript representation of the container.
|
|
196
|
+
*
|
|
197
|
+
* Concrete subclasses implement this by walking their stored
|
|
198
|
+
* entries and calling {@link createDataFromUseData} on each. The
|
|
199
|
+
* result is safe to feed to `JSON.stringify` or to the
|
|
200
|
+
* MessagePack encoder.
|
|
201
|
+
*/
|
|
28
202
|
abstract toData(): any;
|
|
29
203
|
}
|
|
204
|
+
/**
|
|
205
|
+
* Fluent builder for {@link GNHashtable}.
|
|
206
|
+
*
|
|
207
|
+
* Lets caller code accumulate key/value pairs in a chainable form and
|
|
208
|
+
* materialise the resulting hash table in a single call:
|
|
209
|
+
*
|
|
210
|
+
* ```ts
|
|
211
|
+
* const params = GNHashtable.builder()
|
|
212
|
+
* .add("username", "alice")
|
|
213
|
+
* .add("password", "p@ssword")
|
|
214
|
+
* .build();
|
|
215
|
+
* ```
|
|
216
|
+
*
|
|
217
|
+
* The builder stores raw values; conversion through
|
|
218
|
+
* {@link GNData.createUseDataFromOriginData} happens during
|
|
219
|
+
* {@link build} when entries are pushed into the new
|
|
220
|
+
* {@link GNHashtable}.
|
|
221
|
+
*/
|
|
30
222
|
export declare class GNHashtableBuilder {
|
|
31
223
|
private dict;
|
|
224
|
+
/**
|
|
225
|
+
* Stores `value` under `k`, replacing any previous value at the
|
|
226
|
+
* same key.
|
|
227
|
+
*
|
|
228
|
+
* @returns The same builder instance for chaining.
|
|
229
|
+
*/
|
|
32
230
|
add(k: string, value: any): GNHashtableBuilder;
|
|
231
|
+
/**
|
|
232
|
+
* Copies every own-enumerable string key from `dict` into the
|
|
233
|
+
* builder. Equivalent to looping over the dictionary and calling
|
|
234
|
+
* {@link add} for each entry.
|
|
235
|
+
*
|
|
236
|
+
* @param dict Source object. Symbol keys, non-enumerable
|
|
237
|
+
* properties and prototype entries are ignored.
|
|
238
|
+
* @returns The same builder instance for chaining.
|
|
239
|
+
*/
|
|
33
240
|
addAll(dict: {
|
|
34
241
|
[k: string]: any;
|
|
35
242
|
}): this;
|
|
243
|
+
/**
|
|
244
|
+
* Creates an empty builder. Prefer the static factory
|
|
245
|
+
* {@link GNHashtable.builder} from caller code.
|
|
246
|
+
*/
|
|
36
247
|
constructor();
|
|
248
|
+
/**
|
|
249
|
+
* Materialises a fresh {@link GNHashtable} that contains every
|
|
250
|
+
* accumulated entry.
|
|
251
|
+
*
|
|
252
|
+
* The builder remains usable after `build()` — calling it twice
|
|
253
|
+
* yields two independent hash tables seeded from the same data.
|
|
254
|
+
*/
|
|
37
255
|
build(): GNHashtable;
|
|
38
256
|
}
|
|
257
|
+
/**
|
|
258
|
+
* String-keyed container used as the canonical "object-shaped" payload
|
|
259
|
+
* inside the GearN SDK.
|
|
260
|
+
*
|
|
261
|
+
* Every request payload, every response parameter bag and every nested
|
|
262
|
+
* model field that is decoded as `GNHashtable` flows through this
|
|
263
|
+
* class. It mirrors the .NET `Hashtable` API of the original GearN
|
|
264
|
+
* client SDK so cross-platform documentation stays consistent.
|
|
265
|
+
*
|
|
266
|
+
* Storage shape: a plain `{ [k: string]: GNDataType }` dictionary.
|
|
267
|
+
* Iteration order matches `Object.keys(...)` (insertion order for
|
|
268
|
+
* string keys, per the ES2015 spec).
|
|
269
|
+
*/
|
|
39
270
|
export declare class GNHashtable extends GNData {
|
|
40
271
|
private dict;
|
|
272
|
+
/** Removes every key from the hash table. */
|
|
41
273
|
clear(): void;
|
|
274
|
+
/**
|
|
275
|
+
* Removes the entry stored under `k`.
|
|
276
|
+
*
|
|
277
|
+
* @returns `true` when a value was removed, `false` when the
|
|
278
|
+
* key was absent.
|
|
279
|
+
*/
|
|
42
280
|
remove(k: string): boolean;
|
|
281
|
+
/** Returns the current number of stored keys. */
|
|
43
282
|
count(): number;
|
|
283
|
+
/**
|
|
284
|
+
* Returns whether `k` is currently present.
|
|
285
|
+
*
|
|
286
|
+
* Uses `hasOwnProperty` to avoid false positives from
|
|
287
|
+
* inherited prototype properties.
|
|
288
|
+
*/
|
|
44
289
|
containsKey(k: string): boolean;
|
|
290
|
+
/**
|
|
291
|
+
* Returns the stored value at `k` cast to `T`, or `def` when the
|
|
292
|
+
* key is missing / the stored value is `null`.
|
|
293
|
+
*/
|
|
45
294
|
protected get<T>(k: string, def?: T): T;
|
|
295
|
+
/**
|
|
296
|
+
* Stores `value` under `k`.
|
|
297
|
+
*
|
|
298
|
+
* The value is normalised through
|
|
299
|
+
* {@link GNData.createUseDataFromOriginData} before being stored,
|
|
300
|
+
* so plain objects become nested `GNHashtable` instances and
|
|
301
|
+
* plain arrays become nested {@link GNArray} instances.
|
|
302
|
+
*/
|
|
46
303
|
add(k: string, value: any): void;
|
|
304
|
+
/**
|
|
305
|
+
* Returns a plain `{ [k: string]: any }` representation of the
|
|
306
|
+
* hash table, recursively unwrapping nested containers.
|
|
307
|
+
*
|
|
308
|
+
* Useful when the value is about to be handed to a non-GearN
|
|
309
|
+
* consumer such as `JSON.stringify` or the MessagePack codec.
|
|
310
|
+
*/
|
|
47
311
|
toData(): {};
|
|
312
|
+
/**
|
|
313
|
+
* Returns a fluent {@link GNHashtableBuilder} pre-bound to a
|
|
314
|
+
* fresh empty backing dictionary.
|
|
315
|
+
*
|
|
316
|
+
* Equivalent to `new GNHashtableBuilder()` but reads more
|
|
317
|
+
* naturally at the call site:
|
|
318
|
+
*
|
|
319
|
+
* ```ts
|
|
320
|
+
* GNHashtable.builder().add("k", 1).build();
|
|
321
|
+
* ```
|
|
322
|
+
*/
|
|
48
323
|
static builder(): GNHashtableBuilder;
|
|
324
|
+
/**
|
|
325
|
+
* Returns a JSON dump of the underlying dictionary.
|
|
326
|
+
*
|
|
327
|
+
* Intended for log lines (`GNDebug.log`) and unit-test
|
|
328
|
+
* assertions, not for wire serialisation. Nested containers are
|
|
329
|
+
* serialised by their own `toString` / `toJSON` machinery, which
|
|
330
|
+
* for `GNHashtable` recurses back into this method.
|
|
331
|
+
*/
|
|
49
332
|
toString(): string;
|
|
50
333
|
}
|
|
334
|
+
/**
|
|
335
|
+
* Fluent builder for {@link GNArray}.
|
|
336
|
+
*
|
|
337
|
+
* Lets caller code accumulate values in a chainable form and
|
|
338
|
+
* materialise the resulting array in a single `build()` call:
|
|
339
|
+
*
|
|
340
|
+
* ```ts
|
|
341
|
+
* const arr = GNArray.builder().add(1).add(2).addAll([3, 4]).build();
|
|
342
|
+
* ```
|
|
343
|
+
*/
|
|
51
344
|
export declare class GNArrayBuilder {
|
|
52
345
|
private array;
|
|
346
|
+
/**
|
|
347
|
+
* Appends `value` to the builder.
|
|
348
|
+
*
|
|
349
|
+
* @returns The same builder instance for chaining.
|
|
350
|
+
*/
|
|
53
351
|
add(value: any): GNArrayBuilder;
|
|
352
|
+
/**
|
|
353
|
+
* Appends every entry from `array` in order.
|
|
354
|
+
*
|
|
355
|
+
* @param array Source values. Each entry is forwarded through
|
|
356
|
+
* {@link add}.
|
|
357
|
+
* @returns The same builder instance for chaining.
|
|
358
|
+
*/
|
|
54
359
|
addAll(array: any[]): GNArrayBuilder;
|
|
360
|
+
/**
|
|
361
|
+
* Materialises a fresh {@link GNArray} that contains every
|
|
362
|
+
* accumulated value.
|
|
363
|
+
*
|
|
364
|
+
* The builder remains usable after `build()` — calling it twice
|
|
365
|
+
* yields two independent arrays seeded from the same data.
|
|
366
|
+
*/
|
|
55
367
|
build(): GNArray;
|
|
368
|
+
/**
|
|
369
|
+
* Creates an empty builder. Prefer the static factory
|
|
370
|
+
* {@link GNArray.builder} from caller code.
|
|
371
|
+
*/
|
|
56
372
|
constructor();
|
|
57
373
|
}
|
|
374
|
+
/**
|
|
375
|
+
* Numerically-indexed container used as the canonical "array-shaped"
|
|
376
|
+
* payload inside the GearN SDK.
|
|
377
|
+
*
|
|
378
|
+
* Mirrors the .NET `ArrayList` API of the original client SDK and is
|
|
379
|
+
* the wire-level representation for any field decorated with
|
|
380
|
+
* {@link GNArrayDataMember} or returned by the backend as a list.
|
|
381
|
+
*
|
|
382
|
+
* Storage shape: a plain `Array<GNDataType>` honouring its declared
|
|
383
|
+
* iteration order.
|
|
384
|
+
*/
|
|
58
385
|
export declare class GNArray extends GNData {
|
|
59
386
|
private array;
|
|
387
|
+
/** Removes every value from the array. */
|
|
60
388
|
clear(): void;
|
|
389
|
+
/**
|
|
390
|
+
* Removes the value at index `k` and shifts the tail forward by
|
|
391
|
+
* one position.
|
|
392
|
+
*
|
|
393
|
+
* @returns `true` when an entry was removed, `false` when the
|
|
394
|
+
* index was out of range.
|
|
395
|
+
*/
|
|
61
396
|
remove(k: number): boolean;
|
|
397
|
+
/** Returns the number of stored values. */
|
|
62
398
|
count(): number;
|
|
399
|
+
/**
|
|
400
|
+
* Returns the value at index `k` cast to `T`, or `def` when the
|
|
401
|
+
* index is out of range or the slot is `null`.
|
|
402
|
+
*
|
|
403
|
+
* Out-of-range indexes return `null` instead of `def` because the
|
|
404
|
+
* caller's intent there is usually "treat as missing without
|
|
405
|
+
* fallback".
|
|
406
|
+
*/
|
|
63
407
|
protected get<T>(k: number, def?: T): T;
|
|
408
|
+
/**
|
|
409
|
+
* Appends `value` to the array.
|
|
410
|
+
*
|
|
411
|
+
* The value is normalised through
|
|
412
|
+
* {@link GNData.createUseDataFromOriginData} before being stored,
|
|
413
|
+
* so plain objects and arrays become nested containers.
|
|
414
|
+
*/
|
|
64
415
|
add(value: any): void;
|
|
416
|
+
/**
|
|
417
|
+
* Returns a plain `any[]` representation of the array,
|
|
418
|
+
* recursively unwrapping nested containers.
|
|
419
|
+
*/
|
|
65
420
|
toData(): any[];
|
|
421
|
+
/**
|
|
422
|
+
* Returns a fluent {@link GNArrayBuilder} pre-bound to a fresh
|
|
423
|
+
* empty backing array.
|
|
424
|
+
*
|
|
425
|
+
* Equivalent to `new GNArrayBuilder()` but reads more naturally
|
|
426
|
+
* at the call site.
|
|
427
|
+
*/
|
|
66
428
|
static builder(): GNArrayBuilder;
|
|
429
|
+
/**
|
|
430
|
+
* Returns a JSON dump of the underlying array.
|
|
431
|
+
*
|
|
432
|
+
* Intended for log lines and unit-test assertions, not for wire
|
|
433
|
+
* serialisation.
|
|
434
|
+
*/
|
|
67
435
|
toString(): string;
|
|
68
436
|
}
|
|
69
437
|
export {};
|