@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.
Files changed (286) hide show
  1. package/AGENTS.md +37 -0
  2. package/README.MD +420 -1
  3. package/dist/gearn.js.client.js +25056 -1056
  4. package/dist/gearn.js.client.min.js +1 -1
  5. package/dist/index.d.ts +30 -0
  6. package/dist/index.js +24236 -212
  7. package/dist/runtime/GNNetwork.d.ts +687 -3
  8. package/dist/runtime/GNNetworkAuthenticateApi.d.ts +327 -0
  9. package/dist/runtime/GNNetworkCharacterPlayerApi.d.ts +1026 -0
  10. package/dist/runtime/GNNetworkCloudScriptApi.d.ts +141 -0
  11. package/dist/runtime/GNNetworkContentApi.d.ts +243 -0
  12. package/dist/runtime/GNNetworkDashboardApi.d.ts +221 -0
  13. package/dist/runtime/GNNetworkGamePlayerApi.d.ts +1033 -0
  14. package/dist/runtime/GNNetworkGroupApi.d.ts +783 -0
  15. package/dist/runtime/GNNetworkInventoryApi.d.ts +673 -0
  16. package/dist/runtime/GNNetworkMasterPlayerApi.d.ts +1614 -6
  17. package/dist/runtime/GNNetworkMultiplayerApi.d.ts +234 -0
  18. package/dist/runtime/GNNetworkStoreInventoryApi.d.ts +309 -0
  19. package/dist/runtime/common/Action0.d.ts +30 -0
  20. package/dist/runtime/common/Action1.d.ts +32 -0
  21. package/dist/runtime/common/Action2.d.ts +21 -0
  22. package/dist/runtime/common/Action3.d.ts +16 -0
  23. package/dist/runtime/common/Action4.d.ts +17 -0
  24. package/dist/runtime/common/GNData.d.ts +368 -0
  25. package/dist/runtime/config/GNServerSettings.d.ts +442 -12
  26. package/dist/runtime/constant/Commands.d.ts +80 -0
  27. package/dist/runtime/constant/EventCode.d.ts +48 -0
  28. package/dist/runtime/constant/OperationCode.d.ts +74 -1
  29. package/dist/runtime/constant/ReturnCode.d.ts +72 -0
  30. package/dist/runtime/constant/enumType/ExecuteResponseStatus.d.ts +31 -0
  31. package/dist/runtime/constant/enumType/FriendStatus.d.ts +39 -0
  32. package/dist/runtime/constant/enumType/GoogleLoginType.d.ts +23 -0
  33. package/dist/runtime/constant/enumType/GroupStatus.d.ts +32 -0
  34. package/dist/runtime/constant/enumType/InvalidMemberType.d.ts +75 -0
  35. package/dist/runtime/constant/enumType/ItemType.d.ts +23 -0
  36. package/dist/runtime/constant/enumType/MatchStatus.d.ts +30 -0
  37. package/dist/runtime/constant/enumType/MatchmakingMemberStatus.d.ts +24 -0
  38. package/dist/runtime/constant/enumType/MatchmakingTicketStatus.d.ts +34 -0
  39. package/dist/runtime/constant/enumType/OwnerType.d.ts +40 -0
  40. package/dist/runtime/constant/enumType/PermissionDataItem.d.ts +22 -0
  41. package/dist/runtime/constant/enumType/PushPlatformType.d.ts +18 -0
  42. package/dist/runtime/constant/enumType/RequestRole.d.ts +32 -0
  43. package/dist/runtime/constant/enumType/RequestType.d.ts +70 -0
  44. package/dist/runtime/constant/enumType/StoreItemType.d.ts +21 -0
  45. package/dist/runtime/constant/enumType/StoreReceiveType.d.ts +30 -0
  46. package/dist/runtime/constant/errorCode/ErrorCode.d.ts +190 -8
  47. package/dist/runtime/constant/parameterCode/ParameterCode.d.ts +35 -5
  48. package/dist/runtime/entity/DataMember.d.ts +338 -0
  49. package/dist/runtime/entity/GNMetadata.d.ts +101 -0
  50. package/dist/runtime/entity/InvalidMember.d.ts +28 -0
  51. package/dist/runtime/entity/OperationEvent.d.ts +49 -0
  52. package/dist/runtime/entity/OperationRequest.d.ts +108 -0
  53. package/dist/runtime/entity/OperationResponse.d.ts +110 -0
  54. package/dist/runtime/entity/models/AuthenticateModels.d.ts +115 -0
  55. package/dist/runtime/entity/models/AuthenticateRequestModels.d.ts +131 -0
  56. package/dist/runtime/entity/models/AuthenticateResponseModels.d.ts +131 -0
  57. package/dist/runtime/entity/models/CharacterPlayerModels.d.ts +625 -1
  58. package/dist/runtime/entity/models/CharacterPlayerRequestModels.d.ts +972 -0
  59. package/dist/runtime/entity/models/CharacterPlayerResponseModels.d.ts +332 -0
  60. package/dist/runtime/entity/models/CloudScriptModels.d.ts +109 -0
  61. package/dist/runtime/entity/models/CloudScriptRequestModels.d.ts +107 -0
  62. package/dist/runtime/entity/models/CloudScriptResponseModels.d.ts +46 -0
  63. package/dist/runtime/entity/models/ContentModels.d.ts +124 -0
  64. package/dist/runtime/entity/models/ContentRequestModels.d.ts +152 -0
  65. package/dist/runtime/entity/models/ContentResponseModels.d.ts +58 -0
  66. package/dist/runtime/entity/models/DashboardModels.d.ts +371 -8
  67. package/dist/runtime/entity/models/DashboardRequestModels.d.ts +172 -0
  68. package/dist/runtime/entity/models/DashboardResponseModels.d.ts +170 -0
  69. package/dist/runtime/entity/models/GamePlayerModels.d.ts +644 -1
  70. package/dist/runtime/entity/models/GamePlayerRequestModels.d.ts +959 -0
  71. package/dist/runtime/entity/models/GamePlayerResponseModels.d.ts +333 -1
  72. package/dist/runtime/entity/models/GenericModels.d.ts +94 -0
  73. package/dist/runtime/entity/models/GroupModels.d.ts +484 -2
  74. package/dist/runtime/entity/models/GroupRequestModels.d.ts +737 -0
  75. package/dist/runtime/entity/models/GroupResponseModels.d.ts +254 -0
  76. package/dist/runtime/entity/models/InventoryModels.d.ts +415 -0
  77. package/dist/runtime/entity/models/InventoryRequestModels.d.ts +629 -0
  78. package/dist/runtime/entity/models/InventoryResponseModels.d.ts +218 -0
  79. package/dist/runtime/entity/models/MasterPlayerModels.d.ts +1065 -3
  80. package/dist/runtime/entity/models/MasterPlayerRequestModels.d.ts +1560 -6
  81. package/dist/runtime/entity/models/MasterPlayerResponseModels.d.ts +532 -1
  82. package/dist/runtime/entity/models/MultiplayerModels.d.ts +199 -0
  83. package/dist/runtime/entity/models/MultiplayerRequestModels.d.ts +196 -0
  84. package/dist/runtime/entity/models/MultiplayerResponseModels.d.ts +74 -0
  85. package/dist/runtime/entity/models/StoreInventoryModels.d.ts +262 -0
  86. package/dist/runtime/entity/models/StoreInventoryRequestModels.d.ts +268 -0
  87. package/dist/runtime/entity/models/StoreInventoryResponseModels.d.ts +98 -0
  88. package/dist/runtime/entity/request/CustomOperationRequest.d.ts +99 -0
  89. package/dist/runtime/entity/response/CustomOperationResponse.d.ts +118 -0
  90. package/dist/runtime/entity/response/GetAuthInfoResponse.d.ts +53 -0
  91. package/dist/runtime/entity/response/HealthCheckResponse.d.ts +56 -0
  92. package/dist/runtime/entity/response/UploadFileResponse.d.ts +19 -0
  93. package/dist/runtime/helper/CodeHelper.d.ts +122 -0
  94. package/dist/runtime/helper/ConverterService.d.ts +74 -0
  95. package/dist/runtime/helper/EnumUtility.d.ts +63 -0
  96. package/dist/runtime/helper/GNSupport.d.ts +64 -4
  97. package/dist/runtime/helper/GNUtils.d.ts +54 -0
  98. package/dist/runtime/helper/MessagePackConverterService.d.ts +48 -0
  99. package/dist/runtime/helper/OperationHelper.d.ts +51 -0
  100. package/dist/runtime/helper/StorageService.d.ts +48 -8
  101. package/dist/runtime/logger/GNDebug.d.ts +117 -0
  102. package/dist/runtime/networking/AuthenticateStatus.d.ts +64 -0
  103. package/dist/runtime/networking/IPeer.d.ts +83 -0
  104. package/dist/runtime/networking/NetworkingPeer.d.ts +256 -1
  105. package/dist/runtime/networking/OperationPending.d.ts +112 -0
  106. package/dist/runtime/networking/PeerBase.d.ts +231 -0
  107. package/dist/runtime/networking/handler/IServerEventHandler.d.ts +84 -0
  108. package/dist/runtime/networking/handler/OnCharacterPlayerFriendUpdateEventHandler.d.ts +69 -0
  109. package/dist/runtime/networking/handler/OnCharacterPlayerGroupUpdateEventHandler.d.ts +49 -0
  110. package/dist/runtime/networking/handler/OnGamePlayerFriendUpdateEventHandler.d.ts +50 -0
  111. package/dist/runtime/networking/handler/OnGamePlayerGroupUpdateEventHandler.d.ts +41 -0
  112. package/dist/runtime/networking/handler/OnGroupMemberUpdateEventHandler.d.ts +47 -0
  113. package/dist/runtime/networking/handler/OnGroupMessageUpdateEventHandler.d.ts +46 -0
  114. package/dist/runtime/networking/http/HttpPeer.d.ts +173 -0
  115. package/dist/runtime/networking/http/NetworkingHttpPeerBase.d.ts +87 -0
  116. package/dist/runtime/networking/http/NetworkingPeerAxiosRequest.d.ts +113 -0
  117. package/dist/runtime/networking/socket/NetworkingPeerSocketIOClient.d.ts +145 -0
  118. package/dist/runtime/networking/socket/NetworkingSocketPeerBase.d.ts +198 -0
  119. package/dist/runtime/networking/socket/SocketPeer.d.ts +155 -0
  120. package/dist/runtime/typescript/ServiceUpdate.d.ts +46 -0
  121. package/docs/AI_CHEATSHEET.md +211 -0
  122. package/docs/COOKBOOK.md +912 -0
  123. package/docs/RULES.md +307 -0
  124. package/docs/ai-manifest.json +725 -0
  125. package/docs/guides/AUTHENTICATE.md +246 -0
  126. package/docs/guides/CHARACTER_PLAYER.md +439 -0
  127. package/docs/guides/CLOUDSCRIPT.md +335 -0
  128. package/docs/guides/COCOS_CREATOR_INTEGRATION.md +150 -0
  129. package/docs/guides/CONTENT.md +291 -0
  130. package/docs/guides/DASHBOARD.md +262 -0
  131. package/docs/guides/GAME_PLAYER.md +473 -0
  132. package/docs/guides/GROUP.md +412 -0
  133. package/docs/guides/INVENTORY.md +375 -0
  134. package/docs/guides/MASTER_PLAYER.md +458 -0
  135. package/docs/guides/MULTIPLAYER.md +303 -0
  136. package/docs/guides/STORE_INVENTORY.md +313 -0
  137. package/docs/llms-full.txt +43 -0
  138. package/docs/reference/API_AUTHENTICATE.md +75 -0
  139. package/docs/reference/API_CHARACTER_PLAYER.md +226 -0
  140. package/docs/reference/API_CLOUDSCRIPT.md +82 -0
  141. package/docs/reference/API_CONTENT.md +88 -0
  142. package/docs/reference/API_DASHBOARD.md +82 -0
  143. package/docs/reference/API_GAME_PLAYER.md +223 -0
  144. package/docs/reference/API_GROUP.md +187 -0
  145. package/docs/reference/API_INDEX.md +57 -0
  146. package/docs/reference/API_INVENTORY.md +169 -0
  147. package/docs/reference/API_MASTER_PLAYER.md +323 -0
  148. package/docs/reference/API_MULTIPLAYER.md +97 -0
  149. package/docs/reference/API_STORE_INVENTORY.md +109 -0
  150. package/docs/reference/CONFIG.md +107 -0
  151. package/docs/reference/DTO_INDEX.md +2543 -0
  152. package/docs/reference/ENUMS.md +433 -0
  153. package/docs/reference/ERROR_HANDLING.md +159 -0
  154. package/docs/reference/EVENTS.md +188 -0
  155. package/docs/reference/PERMISSION_RULES.md +55 -0
  156. package/docs/reference/dto/AUTHENTICATE.md +619 -0
  157. package/docs/reference/dto/CHARACTER_PLAYER.md +3686 -0
  158. package/docs/reference/dto/CLOUDSCRIPT.md +400 -0
  159. package/docs/reference/dto/CONTENT.md +548 -0
  160. package/docs/reference/dto/DASHBOARD.md +1980 -0
  161. package/docs/reference/dto/GAME_PLAYER.md +3631 -0
  162. package/docs/reference/dto/GENERIC.md +151 -0
  163. package/docs/reference/dto/GROUP.md +2842 -0
  164. package/docs/reference/dto/INVENTORY.md +2385 -0
  165. package/docs/reference/dto/MASTER_PLAYER.md +6024 -0
  166. package/docs/reference/dto/MULTIPLAYER.md +850 -0
  167. package/docs/reference/dto/STORE_INVENTORY.md +1262 -0
  168. package/llms.txt +47 -0
  169. package/package.json +12 -3
  170. package/GNServerSettings.debug.json +0 -21
  171. package/docs/COCOS_CREATOR_INTEGRATION.md +0 -116
  172. package/examples/cocos-creator/GearNExample.ts.txt +0 -176
  173. package/srcSwift/Package.swift +0 -32
  174. package/srcSwift/Sources/GearN/runtime/GNNetwork.swift +0 -530
  175. package/srcSwift/Sources/GearN/runtime/GNNetworkAuthenticateApi.swift +0 -178
  176. package/srcSwift/Sources/GearN/runtime/GNNetworkCharacterPlayerApi.swift +0 -1162
  177. package/srcSwift/Sources/GearN/runtime/GNNetworkCloudScriptApi.swift +0 -154
  178. package/srcSwift/Sources/GearN/runtime/GNNetworkContentApi.swift +0 -208
  179. package/srcSwift/Sources/GearN/runtime/GNNetworkDashboardApi.swift +0 -240
  180. package/srcSwift/Sources/GearN/runtime/GNNetworkGamePlayerApi.swift +0 -1369
  181. package/srcSwift/Sources/GearN/runtime/GNNetworkGroupApi.swift +0 -1100
  182. package/srcSwift/Sources/GearN/runtime/GNNetworkInventoryApi.swift +0 -937
  183. package/srcSwift/Sources/GearN/runtime/GNNetworkMasterPlayerApi.swift +0 -2323
  184. package/srcSwift/Sources/GearN/runtime/GNNetworkMultiplayerApi.swift +0 -298
  185. package/srcSwift/Sources/GearN/runtime/GNNetworkStoreInventoryApi.swift +0 -397
  186. package/srcSwift/Sources/GearN/runtime/common/Action0.swift +0 -3
  187. package/srcSwift/Sources/GearN/runtime/common/Action1.swift +0 -3
  188. package/srcSwift/Sources/GearN/runtime/common/Action2.swift +0 -3
  189. package/srcSwift/Sources/GearN/runtime/common/Action3.swift +0 -3
  190. package/srcSwift/Sources/GearN/runtime/common/Action4.swift +0 -3
  191. package/srcSwift/Sources/GearN/runtime/common/GNArray.swift +0 -204
  192. package/srcSwift/Sources/GearN/runtime/common/GNData.swift +0 -108
  193. package/srcSwift/Sources/GearN/runtime/common/GNHashtable.swift +0 -200
  194. package/srcSwift/Sources/GearN/runtime/config/GNServerSettings.swift +0 -95
  195. package/srcSwift/Sources/GearN/runtime/constant/Commands.swift +0 -28
  196. package/srcSwift/Sources/GearN/runtime/constant/EventCode.swift +0 -10
  197. package/srcSwift/Sources/GearN/runtime/constant/OperationCode.swift +0 -252
  198. package/srcSwift/Sources/GearN/runtime/constant/ReturnCode.swift +0 -19
  199. package/srcSwift/Sources/GearN/runtime/constant/enumType/ExecuteResponseStatus.swift +0 -9
  200. package/srcSwift/Sources/GearN/runtime/constant/enumType/FriendStatus.swift +0 -8
  201. package/srcSwift/Sources/GearN/runtime/constant/enumType/GoogleLoginType.swift +0 -6
  202. package/srcSwift/Sources/GearN/runtime/constant/enumType/GroupStatus.swift +0 -8
  203. package/srcSwift/Sources/GearN/runtime/constant/enumType/InvalidMemberType.swift +0 -19
  204. package/srcSwift/Sources/GearN/runtime/constant/enumType/ItemType.swift +0 -6
  205. package/srcSwift/Sources/GearN/runtime/constant/enumType/MatchmakingMemberStatus.swift +0 -7
  206. package/srcSwift/Sources/GearN/runtime/constant/enumType/MatchmakingTicketStatus.swift +0 -9
  207. package/srcSwift/Sources/GearN/runtime/constant/enumType/OwnerType.swift +0 -10
  208. package/srcSwift/Sources/GearN/runtime/constant/enumType/PermissionDataItem.swift +0 -6
  209. package/srcSwift/Sources/GearN/runtime/constant/enumType/PushPlatformType.swift +0 -6
  210. package/srcSwift/Sources/GearN/runtime/constant/enumType/RequestRole.swift +0 -7
  211. package/srcSwift/Sources/GearN/runtime/constant/enumType/RequestType.swift +0 -16
  212. package/srcSwift/Sources/GearN/runtime/constant/enumType/StoreItemType.swift +0 -6
  213. package/srcSwift/Sources/GearN/runtime/constant/enumType/StoreReceiveType.swift +0 -9
  214. package/srcSwift/Sources/GearN/runtime/constant/errorCode/ErrorCode.swift +0 -58
  215. package/srcSwift/Sources/GearN/runtime/constant/parameterCode/ParameterCode.swift +0 -672
  216. package/srcSwift/Sources/GearN/runtime/entity/DataMember.swift +0 -196
  217. package/srcSwift/Sources/GearN/runtime/entity/GNMetadata.swift +0 -9
  218. package/srcSwift/Sources/GearN/runtime/entity/InvalidMember.swift +0 -11
  219. package/srcSwift/Sources/GearN/runtime/entity/OperationEvent.swift +0 -38
  220. package/srcSwift/Sources/GearN/runtime/entity/OperationHelper.swift +0 -28
  221. package/srcSwift/Sources/GearN/runtime/entity/OperationRequest.swift +0 -62
  222. package/srcSwift/Sources/GearN/runtime/entity/OperationResponse.swift +0 -98
  223. package/srcSwift/Sources/GearN/runtime/entity/models/AuthenticateModels.swift +0 -351
  224. package/srcSwift/Sources/GearN/runtime/entity/models/AuthenticateRequestModels.swift +0 -81
  225. package/srcSwift/Sources/GearN/runtime/entity/models/AuthenticateResponseModels.swift +0 -108
  226. package/srcSwift/Sources/GearN/runtime/entity/models/CharacterPlayerModels.swift +0 -1045
  227. package/srcSwift/Sources/GearN/runtime/entity/models/CharacterPlayerRequestModels.swift +0 -821
  228. package/srcSwift/Sources/GearN/runtime/entity/models/CharacterPlayerResponseModels.swift +0 -588
  229. package/srcSwift/Sources/GearN/runtime/entity/models/CloudScriptModels.swift +0 -187
  230. package/srcSwift/Sources/GearN/runtime/entity/models/CloudScriptRequestModels.swift +0 -84
  231. package/srcSwift/Sources/GearN/runtime/entity/models/CloudScriptResponseModels.swift +0 -59
  232. package/srcSwift/Sources/GearN/runtime/entity/models/ContentModels.swift +0 -195
  233. package/srcSwift/Sources/GearN/runtime/entity/models/ContentRequestModels.swift +0 -116
  234. package/srcSwift/Sources/GearN/runtime/entity/models/ContentResponseModels.swift +0 -81
  235. package/srcSwift/Sources/GearN/runtime/entity/models/DashboardModels.swift +0 -426
  236. package/srcSwift/Sources/GearN/runtime/entity/models/DashboardRequestModels.swift +0 -160
  237. package/srcSwift/Sources/GearN/runtime/entity/models/DashboardResponseModels.swift +0 -82
  238. package/srcSwift/Sources/GearN/runtime/entity/models/GamePlayerModels.swift +0 -1334
  239. package/srcSwift/Sources/GearN/runtime/entity/models/GamePlayerRequestModels.swift +0 -643
  240. package/srcSwift/Sources/GearN/runtime/entity/models/GamePlayerResponseModels.swift +0 -213
  241. package/srcSwift/Sources/GearN/runtime/entity/models/GenericModels.swift +0 -171
  242. package/srcSwift/Sources/GearN/runtime/entity/models/GroupModels.swift +0 -850
  243. package/srcSwift/Sources/GearN/runtime/entity/models/GroupRequestModels.swift +0 -485
  244. package/srcSwift/Sources/GearN/runtime/entity/models/GroupResponseModels.swift +0 -165
  245. package/srcSwift/Sources/GearN/runtime/entity/models/InventoryModels.swift +0 -679
  246. package/srcSwift/Sources/GearN/runtime/entity/models/InventoryRequestModels.swift +0 -413
  247. package/srcSwift/Sources/GearN/runtime/entity/models/InventoryResponseModels.swift +0 -141
  248. package/srcSwift/Sources/GearN/runtime/entity/models/MasterPlayerModels.swift +0 -378
  249. package/srcSwift/Sources/GearN/runtime/entity/models/MasterPlayerRequestModels.swift +0 -147
  250. package/srcSwift/Sources/GearN/runtime/entity/models/MasterPlayerResponseModels.swift +0 -318
  251. package/srcSwift/Sources/GearN/runtime/entity/models/MultiplayerModels.swift +0 -319
  252. package/srcSwift/Sources/GearN/runtime/entity/models/MultiplayerRequestModels.swift +0 -125
  253. package/srcSwift/Sources/GearN/runtime/entity/models/MultiplayerResponseModels.swift +0 -45
  254. package/srcSwift/Sources/GearN/runtime/entity/models/StoreInventoryModels.swift +0 -633
  255. package/srcSwift/Sources/GearN/runtime/entity/models/StoreInventoryRequestModels.swift +0 -173
  256. package/srcSwift/Sources/GearN/runtime/entity/models/StoreInventoryResponseModels.swift +0 -61
  257. package/srcSwift/Sources/GearN/runtime/entity/request/CustomOperationRequest.swift +0 -42
  258. package/srcSwift/Sources/GearN/runtime/entity/response/CustomOperationResponse.swift +0 -49
  259. package/srcSwift/Sources/GearN/runtime/entity/response/GetAuthInfoResponse.swift +0 -43
  260. package/srcSwift/Sources/GearN/runtime/entity/response/HealthCheckResponse.swift +0 -86
  261. package/srcSwift/Sources/GearN/runtime/entity/response/UploadFileResponse.swift +0 -15
  262. package/srcSwift/Sources/GearN/runtime/helper/CodeHelper.swift +0 -107
  263. package/srcSwift/Sources/GearN/runtime/helper/ConverterService.swift +0 -98
  264. package/srcSwift/Sources/GearN/runtime/helper/EnumUtility.swift +0 -34
  265. package/srcSwift/Sources/GearN/runtime/helper/GNSupport.swift +0 -41
  266. package/srcSwift/Sources/GearN/runtime/helper/GNUtils.swift +0 -66
  267. package/srcSwift/Sources/GearN/runtime/helper/MessagePackConverterService.swift +0 -21
  268. package/srcSwift/Sources/GearN/runtime/helper/StorageService.swift +0 -29
  269. package/srcSwift/Sources/GearN/runtime/logger/GNDebug.swift +0 -33
  270. package/srcSwift/Sources/GearN/runtime/networking/AuthenticateStatus.swift +0 -24
  271. package/srcSwift/Sources/GearN/runtime/networking/IPeer.swift +0 -8
  272. package/srcSwift/Sources/GearN/runtime/networking/NetworkingPeer.swift +0 -368
  273. package/srcSwift/Sources/GearN/runtime/networking/OperationPending.swift +0 -81
  274. package/srcSwift/Sources/GearN/runtime/networking/PeerBase.swift +0 -228
  275. package/srcSwift/Sources/GearN/runtime/networking/handler/IServerEventHandler.swift +0 -20
  276. package/srcSwift/Sources/GearN/runtime/networking/http/HttpPeer.swift +0 -226
  277. package/srcSwift/Sources/GearN/runtime/networking/http/HttpTypes.swift +0 -24
  278. package/srcSwift/Sources/GearN/runtime/networking/http/NetworkingHttpPeerBase.swift +0 -13
  279. package/srcSwift/Sources/GearN/runtime/networking/http/NetworkingPeerUrlSession.swift +0 -125
  280. package/srcSwift/Sources/GearN/runtime/networking/request/NetRequest.swift +0 -19
  281. package/srcSwift/Sources/GearN/runtime/networking/response/NetResponse.swift +0 -13
  282. package/srcSwift/Sources/GearN/runtime/networking/socket/NetworkingPeerSocketIOClient.swift +0 -244
  283. package/srcSwift/Sources/GearN/runtime/networking/socket/NetworkingSocketPeerBase.swift +0 -59
  284. package/srcSwift/Sources/GearN/runtime/networking/socket/SocketPeer.swift +0 -136
  285. package/tsconfig-build.cocos.json +0 -31
  286. package/webpack.config.cocos.mjs +0 -78
@@ -1,77 +1,415 @@
1
1
  import "reflect-metadata";
2
2
  import { GNArray, GNHashtable } from "./../common/GNData";
3
3
  import { AbstractConstructor, Constructor, GNObjectFieldMetadata, GNObjectMetadata } from "./GNMetadata";
4
+ /**
5
+ * Lazily allocates the metadata blob for a class prototype, walking up
6
+ * the prototype chain so subclasses inherit a deep-cloned `fields`
7
+ * array from their parent class.
8
+ *
9
+ * Why the cloning: the reflection blob is mutable — every
10
+ * `@*DataMember` decorator pushes a new entry into `fields` or
11
+ * mutates an existing one. Without per-class cloning, decorating a
12
+ * subclass field would alter the parent's metadata too, which would
13
+ * break the (de)serialiser for any sibling subclass that depends on
14
+ * the unmodified parent layout.
15
+ *
16
+ * Recursion termination: when the prototype is `Object.prototype` the
17
+ * helper returns an empty placeholder. The first concrete prototype
18
+ * that does not yet own `__GN_METADATA__` then seeds its own blob by
19
+ * spreading the inherited one (`...superPrototype`) and shallow-cloning
20
+ * each field entry.
21
+ *
22
+ * @param prototype Class prototype to ensure metadata exists on.
23
+ * @returns The metadata blob attached to (or freshly allocated for)
24
+ * `prototype`.
25
+ *
26
+ * @template T Concrete metadata interface (typically
27
+ * {@link GNEnhancedObjectMetadata}).
28
+ */
4
29
  export declare const initGNObjectMetadata: <T extends GNObjectMetadata>(prototype: any) => T;
30
+ /**
31
+ * Lazily allocates the per-field metadata entry for `propertyKey` on
32
+ * `prototype`.
33
+ *
34
+ * Behaviour:
35
+ * - If the property is decorated for the first time the helper reads
36
+ * the TypeScript reflection data via
37
+ * {@link getGNReflectedMetadata}, builds a fresh
38
+ * {@link GNObjectFieldMetadata} entry and pushes it into the parent
39
+ * metadata's `fields` array.
40
+ * - If the property already has an entry (typical when multiple
41
+ * decorators are stacked on the same field) the existing entry is
42
+ * shallow-cloned so the caller can mutate the clone without
43
+ * affecting any inherited copy that might still be referenced by
44
+ * sibling subclasses.
45
+ *
46
+ * @param prototype Class prototype that owns the property.
47
+ * @param propertyKey Decorated property name.
48
+ * @returns The mutable field metadata entry that the decorator should
49
+ * continue populating with `code`, `isOptional`,
50
+ * `defaultValue`, etc.
51
+ *
52
+ * @template T Concrete enhanced field metadata
53
+ * ({@link GNEnhancedObjectFieldMetadata}).
54
+ */
5
55
  export declare const initGNObjectFieldMetadata: <T extends GNObjectFieldMetadata>(prototype: any, propertyKey: string) => T;
56
+ /**
57
+ * Reads the GearN reflection blob attached to `obj`'s prototype.
58
+ *
59
+ * Returns `undefined` when the class has no decorated members yet, so
60
+ * callers must null-check the result before iterating
61
+ * `metadata.fields`.
62
+ *
63
+ * @param obj Class reference (concrete or abstract). Only the
64
+ * prototype is inspected — the function does not invoke
65
+ * `new`.
66
+ *
67
+ * @template T Expected metadata shape — usually
68
+ * {@link GNEnhancedObjectMetadata}.
69
+ */
6
70
  export declare const getGNObjectMetadata: <T extends GNObjectMetadata>(obj: AbstractConstructor<any>) => T | undefined;
71
+ /**
72
+ * Replaces the GearN reflection blob attached to `obj`'s prototype.
73
+ *
74
+ * Intended for advanced testing scenarios where a synthesised metadata
75
+ * blob is injected onto a class. Production code should rely on the
76
+ * `@*DataMember` decorators to manage the blob automatically.
77
+ *
78
+ * @param obj Class reference whose prototype receives the blob.
79
+ * @param metadata Replacement metadata.
80
+ */
7
81
  export declare const setGNObjectMetadata: <T extends GNObjectMetadata>(obj: AbstractConstructor<any>, metadata: T) => void;
82
+ /**
83
+ * Builds the default `id` value stored on a model's
84
+ * {@link GNObjectMetadata}.
85
+ *
86
+ * Currently the lower-cased constructor name. Used solely for
87
+ * diagnostic output — the (de)serialiser never reads the id.
88
+ *
89
+ * @returns The lower-cased class name, or `undefined` when `model` is
90
+ * itself nullish.
91
+ */
8
92
  export declare const getTableName: (model: Constructor<any>) => string;
93
+ /**
94
+ * Field metadata enriched with the SDK-specific serialisation hints
95
+ * supplied by the `@*DataMember` decorator family.
96
+ *
97
+ * Stored on the model prototype inside the `fields` array of
98
+ * {@link GNEnhancedObjectMetadata}. The serializer in
99
+ * {@link ConverterService} reads each field at runtime to map a
100
+ * model property onto the corresponding wire-level
101
+ * {@link ParameterCode} key.
102
+ */
9
103
  export interface GNEnhancedObjectFieldMetadata extends GNObjectFieldMetadata {
104
+ /**
105
+ * Wire-level parameter key used when (de)serialising the field —
106
+ * typically a constant from {@link ParameterCode}.
107
+ */
10
108
  code: string;
109
+ /**
110
+ * When `true`, a `null` value is allowed and is omitted from the
111
+ * outbound payload entirely. When `false`, a `null` value is
112
+ * still serialised (sent as JSON `null` / MsgPack nil) so the
113
+ * backend can distinguish "explicit clear" from "untouched".
114
+ */
11
115
  isOptional: boolean;
116
+ /** Coarse value bucket used by the serializer's branching logic. */
12
117
  gnFieldType: GNFieldDataType;
118
+ /**
119
+ * Value substituted in during deserialisation when the wire
120
+ * payload omits the field.
121
+ */
13
122
  defaultValue: any;
123
+ /**
124
+ * Set to `true` by the decorator when at least one validation
125
+ * constraint (`mustNonNull`, `min*`, `max*`, `mustInt`) was
126
+ * supplied. Reserved for the upcoming client-side validation
127
+ * step — the runtime reads it but no enforcement code currently
128
+ * fires on it.
129
+ */
14
130
  activeConditionValid: boolean;
131
+ /** String/Hashtable/Array constraint: forbid `null` values. */
15
132
  mustNonNull?: boolean;
133
+ /**
134
+ * String/Hashtable/Array constraint: minimum allowed length
135
+ * (characters / keys / elements).
136
+ */
16
137
  minLength?: number;
138
+ /** String/Hashtable/Array constraint: maximum allowed length. */
17
139
  maxLength?: number;
140
+ /** Number constraint: minimum allowed value (inclusive). */
18
141
  minValue?: number;
142
+ /** Number constraint: maximum allowed value (inclusive). */
19
143
  maxValue?: number;
144
+ /** Number constraint: reject non-integer values. */
20
145
  mustInt?: boolean;
21
146
  }
147
+ /**
148
+ * Coarse runtime type bucket used by the GearN serializer.
149
+ *
150
+ * `Other` is the catch-all for fields decorated with the bare
151
+ * `@DataMember` decorator (no specific shape declared). Numeric
152
+ * ordinals are an internal detail and are never persisted to the
153
+ * wire.
154
+ */
22
155
  export declare enum GNFieldDataType {
156
+ /** Generic `@DataMember` — any value, no type-specific handling. */
23
157
  Other = 0,
158
+ /** `@NumberDataMember` — numeric primitive. */
24
159
  Number = 1,
160
+ /** `@StringDataMember` — string primitive. */
25
161
  String = 2,
162
+ /** `@BooleanDataMember` — boolean primitive. */
26
163
  Boolean = 3,
164
+ /** `@GNHashtableDataMember` — nested object. */
27
165
  GNHashtable = 4,
166
+ /** `@GNArrayDataMember` — nested list. */
28
167
  GNArray = 5
29
168
  }
169
+ /**
170
+ * Class-level metadata for a decorated GearN model.
171
+ *
172
+ * Specialises {@link GNObjectMetadata} so that the `fields` array
173
+ * uses the enhanced per-field shape that the (de)serialiser actually
174
+ * consumes.
175
+ */
30
176
  export interface GNEnhancedObjectMetadata extends GNObjectMetadata {
177
+ /** Ordered list of decorated fields. */
31
178
  fields: GNEnhancedObjectFieldMetadata[];
32
179
  }
180
+ /**
181
+ * Common base shape shared by every `@*DataMember` decorator.
182
+ */
33
183
  interface DataMemberBaseArgs {
184
+ /**
185
+ * Wire-level parameter key, normally a constant from
186
+ * {@link ParameterCode}. Required because the serializer uses it
187
+ * as the dictionary key on the outbound `GNHashtable`.
188
+ */
34
189
  code: string;
190
+ /**
191
+ * Mark the field as optional so that a `null` value is dropped
192
+ * from the outbound payload instead of being serialised as JSON
193
+ * `null` / MsgPack nil. Defaults to `false`.
194
+ */
35
195
  isOptional?: boolean;
196
+ /**
197
+ * Value injected into the model during deserialisation when the
198
+ * wire payload omits the field.
199
+ */
36
200
  defaultValue?: any;
37
201
  }
202
+ /**
203
+ * Argument shape for the generic {@link DataMember} decorator.
204
+ */
38
205
  interface DataMemberArgs extends DataMemberBaseArgs {
206
+ /**
207
+ * Optional override for the coarse value bucket. Most callers
208
+ * leave this `undefined` so the decorator falls back to
209
+ * {@link GNFieldDataType.Other}; specialised decorators
210
+ * (`StringDataMember`, etc.) set it explicitly.
211
+ */
39
212
  gnFieldType?: GNFieldDataType;
40
213
  }
214
+ /**
215
+ * Convenience alias used by the type-specific decorator argument
216
+ * shapes below — purely organisational, no extra fields.
217
+ */
41
218
  interface OtherDataMemberArgs extends DataMemberBaseArgs {
42
219
  }
220
+ /**
221
+ * Argument shape for {@link StringDataMember}.
222
+ */
43
223
  interface StringDataMemberArgs extends OtherDataMemberArgs {
224
+ /** Default value injected when the field is missing on the wire. */
44
225
  defaultValue?: string;
226
+ /** Reject `null` values. Activates client-side validation. */
45
227
  mustNonNull?: boolean;
228
+ /** Minimum string length, inclusive. Defaults to `0` when unset. */
46
229
  minLength?: number;
230
+ /**
231
+ * Maximum string length, inclusive. Defaults to `256` when
232
+ * unset and any constraint is supplied.
233
+ */
47
234
  maxLength?: number;
48
235
  }
236
+ /**
237
+ * Argument shape for {@link BooleanDataMember}.
238
+ */
49
239
  interface BooleanDataMemberArgs extends OtherDataMemberArgs {
240
+ /** Default boolean value injected when the field is missing. */
50
241
  defaultValue?: boolean;
51
242
  }
243
+ /**
244
+ * Argument shape for {@link NumberDataMember}.
245
+ */
52
246
  interface NumberDataMemberArgs extends OtherDataMemberArgs {
247
+ /** Default numeric value injected when the field is missing. */
53
248
  defaultValue?: number;
249
+ /**
250
+ * Minimum numeric value, inclusive. Defaults to `-Infinity`
251
+ * when any constraint is supplied.
252
+ */
54
253
  minValue?: number;
254
+ /**
255
+ * Maximum numeric value, inclusive. Defaults to `Infinity` when
256
+ * any constraint is supplied.
257
+ */
55
258
  maxValue?: number;
259
+ /** Reject fractional values. Activates client-side validation. */
56
260
  mustInt?: boolean;
57
261
  }
262
+ /**
263
+ * Argument shape for {@link GNHashtableDataMember}.
264
+ */
58
265
  interface GNHashtableDataMemberArgs extends OtherDataMemberArgs {
266
+ /** Default {@link GNHashtable} substituted when missing. */
59
267
  defaultValue?: GNHashtable;
268
+ /** Reject `null` values. Activates client-side validation. */
60
269
  mustNonNull?: boolean;
270
+ /** Minimum number of keys, inclusive. Defaults to `0` when unset. */
61
271
  minLength?: number;
272
+ /** Maximum number of keys, inclusive. Defaults to `256` when unset. */
62
273
  maxLength?: number;
63
274
  }
275
+ /**
276
+ * Argument shape for {@link GNArrayDataMember}.
277
+ */
64
278
  interface GNArrayDataMemberArgs extends OtherDataMemberArgs {
279
+ /** Default {@link GNArray} substituted when missing. */
65
280
  defaultValue?: GNArray;
281
+ /** Reject `null` values. Activates client-side validation. */
66
282
  mustNonNull?: boolean;
283
+ /** Minimum number of elements, inclusive. */
67
284
  minLength?: number;
285
+ /** Maximum number of elements, inclusive. */
68
286
  maxLength?: number;
287
+ /**
288
+ * Concrete element class. Required when the array contains typed
289
+ * model instances so the (de)serialiser knows which class to
290
+ * instantiate per element. For arrays of primitives pass the
291
+ * matching wrapper (`String`, `Number`, `Boolean`).
292
+ */
69
293
  elementCls?: new (...args: any[]) => any;
70
294
  }
295
+ /**
296
+ * Generic property decorator used for fields without a
297
+ * type-specific shape.
298
+ *
299
+ * Falls back to {@link GNFieldDataType.Other} when the caller does
300
+ * not pin `gnFieldType`. Validation cannot be activated through this
301
+ * decorator — use the type-specific variants for that.
302
+ *
303
+ * @example
304
+ * ```ts
305
+ * class Item {
306
+ * @DataMember({ code: ParameterCode.Value })
307
+ * public value: any;
308
+ * }
309
+ * ```
310
+ *
311
+ * @param args Decorator arguments — see {@link DataMemberArgs}.
312
+ */
71
313
  export declare const DataMember: (args: DataMemberArgs) => (prototype: any, propertyKey: string) => void;
314
+ /**
315
+ * Property decorator for `string` fields.
316
+ *
317
+ * Activates client-side validation when at least one of `mustNonNull`,
318
+ * `minLength` or `maxLength` is supplied. The activation also fills
319
+ * in default values for the missing constraints (`mustNonNull = false`,
320
+ * `minLength = 0`, `maxLength = 256`) so that the validation step has
321
+ * a complete profile to work against.
322
+ *
323
+ * @example
324
+ * ```ts
325
+ * class Login {
326
+ * @StringDataMember({ code: ParameterCode.Username, minLength: 6, maxLength: 32, mustNonNull: true })
327
+ * public username: string;
328
+ * }
329
+ * ```
330
+ *
331
+ * @param args Decorator arguments — see {@link StringDataMemberArgs}.
332
+ */
72
333
  export declare const StringDataMember: (args: StringDataMemberArgs) => (prototype: any, propertyKey: string) => void;
334
+ /**
335
+ * Property decorator for `boolean` fields.
336
+ *
337
+ * Validation cannot be activated for booleans — the only knobs are
338
+ * `code`, `isOptional` and `defaultValue`.
339
+ *
340
+ * @example
341
+ * ```ts
342
+ * class Param {
343
+ * @BooleanDataMember({ code: ParameterCode.External, isOptional: true, defaultValue: false })
344
+ * public external?: boolean;
345
+ * }
346
+ * ```
347
+ *
348
+ * @param args Decorator arguments — see {@link BooleanDataMemberArgs}.
349
+ */
73
350
  export declare const BooleanDataMember: (args: BooleanDataMemberArgs) => (prototype: any, propertyKey: string) => void;
351
+ /**
352
+ * Property decorator for nested {@link GNHashtable}-shaped fields
353
+ * (object instances).
354
+ *
355
+ * Activates client-side validation when at least one of
356
+ * `mustNonNull`, `minLength` or `maxLength` is supplied. Default
357
+ * activation values mirror those of {@link StringDataMember}
358
+ * (`mustNonNull = false`, `minLength = 0`, `maxLength = 256`).
359
+ *
360
+ * @example
361
+ * ```ts
362
+ * class Login {
363
+ * @GNHashtableDataMember({ code: ParameterCode.InfoRequestParam, mustNonNull: true })
364
+ * public infoRequestParam: InfoRequestParam;
365
+ * }
366
+ * ```
367
+ *
368
+ * @param args Decorator arguments — see {@link GNHashtableDataMemberArgs}.
369
+ */
74
370
  export declare const GNHashtableDataMember: (args: GNHashtableDataMemberArgs) => (prototype: any, propertyKey: string) => void;
371
+ /**
372
+ * Property decorator for nested {@link GNArray}-shaped fields
373
+ * (lists / arrays).
374
+ *
375
+ * The `elementCls` argument is recorded as the field's `cls` so the
376
+ * (de)serialiser knows which constructor to instantiate per element.
377
+ * For arrays of primitives pass the matching wrapper (`String`,
378
+ * `Number`, `Boolean`).
379
+ *
380
+ * Activates client-side validation when at least one of
381
+ * `mustNonNull`, `minLength` or `maxLength` is supplied, with the
382
+ * same default-fill behaviour as {@link StringDataMember}.
383
+ *
384
+ * @example
385
+ * ```ts
386
+ * class Param {
387
+ * @GNArrayDataMember({ code: ParameterCode.PlayerDataKeys, isOptional: true, elementCls: String })
388
+ * public playerDataKeys?: Array<string>;
389
+ * }
390
+ * ```
391
+ *
392
+ * @param args Decorator arguments — see {@link GNArrayDataMemberArgs}.
393
+ */
75
394
  export declare const GNArrayDataMember: (args: GNArrayDataMemberArgs) => (prototype: any, propertyKey: string) => void;
395
+ /**
396
+ * Property decorator for `number` fields.
397
+ *
398
+ * Activates client-side validation when at least one of `mustInt`,
399
+ * `minValue` or `maxValue` is supplied. Default activation values
400
+ * widen the bounds to `[-Infinity, +Infinity]` and disable the
401
+ * integer constraint so the validation step never rejects a value
402
+ * the caller did not explicitly opt in to.
403
+ *
404
+ * @example
405
+ * ```ts
406
+ * class Param {
407
+ * @NumberDataMember({ code: ParameterCode.Type, minValue: 1, maxValue: 2, mustInt: true })
408
+ * public type: number;
409
+ * }
410
+ * ```
411
+ *
412
+ * @param args Decorator arguments — see {@link NumberDataMemberArgs}.
413
+ */
76
414
  export declare const NumberDataMember: (args: NumberDataMemberArgs) => (prototype: any, propertyKey: string) => void;
77
415
  export {};
@@ -1,22 +1,123 @@
1
+ /**
2
+ * Type alias for an instantiable class — anything that supports `new
3
+ * SomeClass(...args)` and produces a `T`.
4
+ *
5
+ * The SDK uses this alias as the "deserialise into" parameter for
6
+ * helpers like {@link ConverterService.deserializeObject},
7
+ * {@link ConverterService.deserializeArray} and the typed `sendVia*`
8
+ * helpers on {@link GNNetwork}. Passing a class through this type
9
+ * preserves enough static information that TypeScript can infer the
10
+ * generic `T` automatically:
11
+ *
12
+ * ```ts
13
+ * function decode<T>(value: any, cls: Constructor<T>): T {
14
+ * return new cls(value);
15
+ * }
16
+ * const ban = decode(rawValue, GenericModels.BanItem); // T = BanItem
17
+ * ```
18
+ *
19
+ * @template T Instance type produced by the constructor.
20
+ */
1
21
  export type Constructor<T> = {
2
22
  new (...args: any[]): T;
3
23
  };
24
+ /**
25
+ * Type alias for a possibly-abstract class reference.
26
+ *
27
+ * Used wherever the SDK only needs to read static or prototype-level
28
+ * metadata (decorator-attached `__GN_METADATA__` blob, prototype field
29
+ * definitions) without ever calling `new`. Abstract classes have no
30
+ * `new(...)` signature, so the standard {@link Constructor} alias would
31
+ * reject them — `AbstractConstructor` widens the constraint to plain
32
+ * `Function & { prototype: T }`.
33
+ *
34
+ * Mainly used by {@link getGNObjectMetadata} and
35
+ * {@link setGNObjectMetadata} so callers can hand in either a concrete
36
+ * model class or an abstract base class.
37
+ *
38
+ * @template T Instance type that the prototype represents.
39
+ */
4
40
  export type AbstractConstructor<T> = Function & {
5
41
  prototype: T;
6
42
  };
43
+ /**
44
+ * Coarse runtime type of a model field as observed by `Reflect.getMetadata`.
45
+ *
46
+ * The `DataMember` decorator family inspects the TypeScript-emitted
47
+ * `design:type` metadata to learn which JavaScript constructor was
48
+ * declared on a field (`String`, `Number`, `Boolean`, `Array`, anything
49
+ * else). Those constructors are then mapped onto this enum so the
50
+ * serializer / deserializer in {@link ConverterService} can branch on
51
+ * the kind of value they're handling without re-inspecting the class.
52
+ *
53
+ * The numeric ordinals are an internal contract — they are never
54
+ * persisted to the wire — but should still not be reordered casually
55
+ * because every cached metadata blob references them by value.
56
+ */
7
57
  export declare enum FieldDataType {
58
+ /** Field is declared as `boolean` / `Boolean`. */
8
59
  Boolean = 0,
60
+ /** Field is declared as `number` / `Number`. */
9
61
  Number = 1,
62
+ /** Field is declared as `string` / `String`. */
10
63
  String = 2,
64
+ /** Field is declared as `Array<...>` (or `T[]`). */
11
65
  Array = 3,
66
+ /** Field is declared as a class instance — anything that is not one of the primitives above. */
12
67
  Object = 4
13
68
  }
69
+ /**
70
+ * Per-field reflected metadata captured by the `DataMember` decorator
71
+ * family.
72
+ *
73
+ * Stored in the `__GN_METADATA__` blob attached to the model prototype.
74
+ * The base contract here only covers the values the runtime needs to
75
+ * navigate the prototype chain; the `DataMember` decorators extend it
76
+ * with serialisation-specific fields by widening to
77
+ * {@link GNEnhancedObjectFieldMetadata}.
78
+ */
14
79
  export interface GNObjectFieldMetadata {
80
+ /**
81
+ * Property key on the model prototype (e.g. `"username"` or
82
+ * `"infoRequestParam"`). Used by the (de)serialiser to read /
83
+ * write values via `obj[name]`.
84
+ */
15
85
  name: string;
86
+ /**
87
+ * Coarse type bucket inferred from the TypeScript `design:type`
88
+ * metadata. See {@link FieldDataType} for the enum members.
89
+ */
16
90
  fieldType: FieldDataType;
91
+ /**
92
+ * Concrete element / value class declared on the field. For
93
+ * primitives this is the corresponding wrapper constructor
94
+ * (`String`, `Number`, `Boolean`); for object fields it is the
95
+ * declared class; for arrays it is the element class supplied via
96
+ * `GNArrayDataMember({ elementCls })`.
97
+ */
17
98
  cls: new (...args: any[]) => any;
18
99
  }
100
+ /**
101
+ * Per-class reflected metadata captured by the `DataMember` decorator
102
+ * family.
103
+ *
104
+ * Each model prototype owns its own metadata blob; subclasses inherit a
105
+ * cloned copy of the parent's `fields` array so they can add or
106
+ * override entries without mutating the base class. The `id` field is
107
+ * the lower-cased class name and is currently informational — the
108
+ * serialiser never reads it.
109
+ */
19
110
  export interface GNObjectMetadata {
111
+ /**
112
+ * Lowercase class name. Filled by {@link initGNObjectMetadata}
113
+ * using `model.name.toLowerCase()` and used for diagnostic
114
+ * purposes only — the serializer does not read it.
115
+ */
20
116
  id: string;
117
+ /**
118
+ * Ordered list of decorated field metadata entries. The order
119
+ * matches the declaration order of the `@*DataMember` decorators
120
+ * on the class plus any inherited entries from parent classes.
121
+ */
21
122
  fields: GNObjectFieldMetadata[];
22
123
  }
@@ -1,5 +1,33 @@
1
1
  import { InvalidMemberType } from "./../constant/enumType/InvalidMemberType";
2
+ /**
3
+ * Single entry in the `invalidRequestParameters` list returned by
4
+ * the backend when validation rejects a request.
5
+ *
6
+ * The SDK only ships this value through
7
+ * {@link OperationResponse.getInvalidMembers}, populated by
8
+ * {@link PeerBase.onResponseHandler} when the response carries the
9
+ * `invalidRequestParameters` array. Each entry tells the
10
+ * application **which** parameter failed and **why**, so the
11
+ * caller can surface a precise validation error in the UI.
12
+ *
13
+ * Wire layout: each entry is sent as a two-element array
14
+ * `[code, invalidMemberType]` — the SDK unpacks it into this
15
+ * struct shape for ergonomics.
16
+ */
2
17
  export interface InvalidMember {
18
+ /**
19
+ * Wire-level parameter key that failed validation. Matches the
20
+ * `code` value declared by the corresponding
21
+ * `@*DataMember({ code: ParameterCode.X })` decorator on the
22
+ * request model, so the application can map the failure back
23
+ * to a specific input field.
24
+ */
3
25
  code: string;
26
+ /**
27
+ * Discriminator describing why the parameter was rejected
28
+ * (missing, out of range, wrong type, ...). Decoded by
29
+ * {@link CodeHelper.getInvalidMemberName} when the SDK needs a
30
+ * human-readable label.
31
+ */
4
32
  invalidMemberType: InvalidMemberType;
5
33
  }
@@ -1,11 +1,60 @@
1
1
  import { GNHashtable } from "./../common/GNData";
2
+ /**
3
+ * Low-level container for a server-pushed event delivered over the
4
+ * socket transport.
5
+ *
6
+ * The SDK builds one of these in {@link SocketPeer.onEventHandler}
7
+ * for every decoded event frame, then dispatches it to:
8
+ * - the single-slot raw observer registered through
9
+ * {@link GNNetwork.setOnEventHandler}; and
10
+ * - every typed {@link IServerEventHandler} whose `getEventCode()`
11
+ * matches the event's code.
12
+ *
13
+ * Events are different from responses in two ways: they carry no
14
+ * `responseId` (server-initiated, no correlation needed), and they
15
+ * have no return code (events are not requests so there is nothing
16
+ * to fail).
17
+ */
2
18
  export declare class OperationEvent {
3
19
  private eventCode;
4
20
  private parameters;
21
+ /**
22
+ * @param eventCode Event code carried by the frame; usually a
23
+ * constant from {@link EventCode}.
24
+ * @param parameters Optional parameter bag. Defaults to `null`
25
+ * for events with no payload.
26
+ */
5
27
  constructor(eventCode: string, parameters?: GNHashtable);
28
+ /**
29
+ * Returns the event code that the SDK uses to look up
30
+ * registered handlers.
31
+ */
6
32
  getEventCode(): string;
33
+ /**
34
+ * Returns the event parameter bag, or `null` for parameter-less
35
+ * events.
36
+ *
37
+ * Typed handlers usually feed this through
38
+ * {@link ConverterService.deserializeObject} to obtain a
39
+ * strongly typed payload.
40
+ */
7
41
  getParameters(): GNHashtable;
42
+ /**
43
+ * Adds or replaces a single parameter on the existing parameter
44
+ * bag.
45
+ *
46
+ * Note that this method assumes the parameter bag is non-null —
47
+ * if the event was constructed without one, call
48
+ * {@link setParameters} first.
49
+ */
8
50
  setParameter(k: string, value: any): OperationEvent;
51
+ /**
52
+ * Replaces the entire parameter bag.
53
+ */
9
54
  setParameters(parameters: GNHashtable): OperationEvent;
55
+ /**
56
+ * Returns a debug-friendly summary used by the
57
+ * `[GN Socket EVENT]` log line.
58
+ */
10
59
  toString(): string;
11
60
  }