@xmobitea/gn-typescript-client 2.5.2 → 2.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/gn.js.client.js +2749 -4689
- package/dist/gn.js.client.min.js +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2429 -4248
- package/dist/runtime/GNNetwork.d.ts +4 -0
- package/dist/runtime/constant/enumType/OwnerType.d.ts +2 -1
- package/dist/runtime/entity/models/AuthenticateModels.d.ts +1 -1
- package/dist/runtime/entity/models/CharacterPlayerModels.d.ts +1 -0
- package/dist/runtime/entity/models/ContentModels.d.ts +0 -2
- package/dist/runtime/entity/models/GamePlayerModels.d.ts +1 -0
- package/dist/runtime/entity/models/MasterPlayerModels.d.ts +1 -1
- package/dist/runtime/entity/response/UploadFileResponse.d.ts +3 -0
- package/dist/runtime/helper/GNUtils.d.ts +1 -1
- package/dist/runtime/helper/MessagePackConverterService.d.ts +4 -0
- package/dist/runtime/networking/NetworkingPeer.d.ts +3 -1
- package/dist/runtime/networking/http/HttpPeer.d.ts +1 -1
- package/dist/runtime/networking/http/NetworkingHttpPeerBase.d.ts +1 -1
- package/dist/runtime/networking/http/NetworkingPeerAxiosRequest.d.ts +2 -1
- package/dist/runtime/networking/socket/NetworkingPeerSocketIOClient.d.ts +0 -1
- package/package.json +7 -6
|
@@ -25,6 +25,7 @@ import { StoreInventoryApi } from "./GNNetworkStoreInventoryApi";
|
|
|
25
25
|
import { MultiplayerApi } from "./GNNetworkMultiplayerApi";
|
|
26
26
|
import { CloudScriptApi } from "./GNNetworkCloudScriptApi";
|
|
27
27
|
import { GetAuthInfoResponse } from "./entity/response/GetAuthInfoResponse";
|
|
28
|
+
import { UploadFileResponse } from "./entity/response/UploadFileResponse";
|
|
28
29
|
export declare class GNNetwork {
|
|
29
30
|
static readonly AUTH_TOKEN_KEY = "[GN]_AUTH_TOKEN_KEY";
|
|
30
31
|
static readonly USER_ID_KEY = "[GN]_USER_ID_KEY";
|
|
@@ -82,4 +83,7 @@ export declare class GNNetwork {
|
|
|
82
83
|
static syncTsAsync(): Promise<number>;
|
|
83
84
|
static getAuthInfo(authToken: string, onResponse?: Action1<GetAuthInfoResponse>): void;
|
|
84
85
|
static getAuthInfoAsync(authToken: string): Promise<GetAuthInfoResponse>;
|
|
86
|
+
static uploadFile(fileId: string, content: Uint8Array, filename: string, mimetype: string, onResponse?: Action1<UploadFileResponse>): void;
|
|
87
|
+
static uploadFileAsync(fileId: string, content: Uint8Array, filename: string, mimetype: string): Promise<UploadFileResponse>;
|
|
88
|
+
static getDownloadFileUrl(downloadToken: string): string;
|
|
85
89
|
}
|
|
@@ -426,6 +426,7 @@ export declare namespace CharacterPlayerModels {
|
|
|
426
426
|
class SetDisplayNameRequestData {
|
|
427
427
|
characterId: string;
|
|
428
428
|
displayName: string;
|
|
429
|
+
uniqueDisplayName?: boolean;
|
|
429
430
|
}
|
|
430
431
|
class ServerSetDisplayNameRequestData extends SetDisplayNameRequestData {
|
|
431
432
|
}
|
|
@@ -9,7 +9,6 @@ export declare namespace ContentModels {
|
|
|
9
9
|
fileName: string;
|
|
10
10
|
}
|
|
11
11
|
class ServerCreateNewFileUploadInfoRequestData extends CreateNewFileUploadInfoRequestData {
|
|
12
|
-
userId: string;
|
|
13
12
|
}
|
|
14
13
|
class AdminCreateNewFileUploadInfoRequestData extends ServerCreateNewFileUploadInfoRequestData {
|
|
15
14
|
}
|
|
@@ -76,7 +75,6 @@ export declare namespace ContentModels {
|
|
|
76
75
|
class GetFileUploadInfoResponseData extends FileIdUploadResponseData {
|
|
77
76
|
fileName: string;
|
|
78
77
|
tsCreate: number;
|
|
79
|
-
userId: string;
|
|
80
78
|
removeStatus: GenericModels.RemoveStatusItem;
|
|
81
79
|
tsUploadExpire?: number;
|
|
82
80
|
fileUpload?: FileUploadItem;
|
|
@@ -336,6 +336,7 @@ export declare namespace GamePlayerModels {
|
|
|
336
336
|
userId?: string;
|
|
337
337
|
catalogId: string;
|
|
338
338
|
displayName?: string;
|
|
339
|
+
uniqueDisplayName?: boolean;
|
|
339
340
|
}
|
|
340
341
|
class ServerGrantPlayerCharacterRequestData extends GrantPlayerCharacterRequestData {
|
|
341
342
|
userId: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GenericModels } from "
|
|
1
|
+
import { GenericModels } from "./../entity/models/GenericModels";
|
|
2
2
|
export declare class GNUtils {
|
|
3
3
|
static toDatasDictionary(datas: Array<GenericModels.DataItem>): Map<string, GenericModels.DataItem>;
|
|
4
4
|
static toTagsDictionary(tags: Array<GenericModels.TagItem>): Map<string, GenericModels.TagItem>;
|
|
@@ -8,7 +8,8 @@ import { OperationEvent } from "./../entity/OperationEvent";
|
|
|
8
8
|
import { AuthenticateStatus } from "./AuthenticateStatus";
|
|
9
9
|
import { RequestType } from "./../constant/enumType/RequestType";
|
|
10
10
|
import { RequestRole } from "./../constant/enumType/RequestRole";
|
|
11
|
-
import { GetAuthInfoResponse } from "
|
|
11
|
+
import { GetAuthInfoResponse } from "./../entity/response/GetAuthInfoResponse";
|
|
12
|
+
import { UploadFileResponse } from "./../entity/response/UploadFileResponse";
|
|
12
13
|
export declare class NetworkingPeer {
|
|
13
14
|
static readonly SYNC_TS: string;
|
|
14
15
|
static readonly GET_AUTH_INFO: string;
|
|
@@ -41,4 +42,5 @@ export declare class NetworkingPeer {
|
|
|
41
42
|
subscriberServerEventHandler(serverEventHandler: IServerEventHandler): void;
|
|
42
43
|
syncTs(onResponse?: Action1<number>): void;
|
|
43
44
|
getAuthInfo(authToken: string, onResponse: Action1<GetAuthInfoResponse>): void;
|
|
45
|
+
uploadFile(fileId: string, content: Uint8Array, filename: string, mimetype: string, onResponse: Action1<UploadFileResponse>): void;
|
|
44
46
|
}
|
|
@@ -21,5 +21,5 @@ export declare class HttpPeer extends PeerBase {
|
|
|
21
21
|
protected onEnqueue(operationPending: OperationPending): void;
|
|
22
22
|
private onSendOperationRequestResponse;
|
|
23
23
|
getRequest(subUri: string, onHttpAppResponse: Action1<HttpAppResponse>, timeout?: number, authToken?: string, secretKey?: string, gameId?: string): void;
|
|
24
|
-
uploadFile(fileId: string, content: Uint8Array, mimetype: string, onHttpAppResponse: Action1<HttpAppResponse>, timeout?: number): void;
|
|
24
|
+
uploadFile(fileId: string, content: Uint8Array, filename: string, mimetype: string, onHttpAppResponse: Action1<HttpAppResponse>, timeout?: number): void;
|
|
25
25
|
}
|
|
@@ -6,6 +6,6 @@ export declare abstract class NetworkingHttpPeerBase {
|
|
|
6
6
|
protected userAgent: string;
|
|
7
7
|
abstract getRequest(subUri: string, onHttpAppResponse: Action1<HttpAppResponse>, timeout: number, authToken: string, secretKey: string, gameId: string): void;
|
|
8
8
|
abstract postRequest(subUri: string, param: GNHashtable, postType: PostType, onHttpAppResponse: Action1<HttpAppResponse>, timeout: number, authToken: string, secretKey: string, customTags: GNHashtable, gameId: string): void;
|
|
9
|
-
abstract postRequestUpload(subUri: string, content: Uint8Array, mimetype: string, onHttpAppResponse: Action1<HttpAppResponse>, timeout: number): void;
|
|
9
|
+
abstract postRequestUpload(subUri: string, content: Uint8Array, filename: string, mimetype: string, onHttpAppResponse: Action1<HttpAppResponse>, timeout: number): void;
|
|
10
10
|
init(httpUrl: string, userAgent: string): void;
|
|
11
11
|
}
|
|
@@ -5,9 +5,10 @@ import { NetworkingHttpPeerBase } from "./NetworkingHttpPeerBase";
|
|
|
5
5
|
export declare class NetworkingPeerAxiosRequest extends NetworkingHttpPeerBase {
|
|
6
6
|
getRequest(subUri: string, onHttpAppResponse: Action1<HttpAppResponse>, timeout: number, authToken: string, secretKey: string, gameId: string): void;
|
|
7
7
|
postRequest(subUri: string, param: GNHashtable, postType: PostType, onHttpAppResponse: Action1<HttpAppResponse>, timeout: number, authToken: string, secretKey: string, customTags: GNHashtable, gameId: string): void;
|
|
8
|
-
postRequestUpload(subUri: string, content: Uint8Array, mimetype: string, onHttpAppResponse: Action1<HttpAppResponse>, timeout: number): void;
|
|
8
|
+
postRequestUpload(subUri: string, content: Uint8Array, filename: string, mimetype: string, onHttpAppResponse: Action1<HttpAppResponse>, timeout: number): void;
|
|
9
9
|
private getRequestAxios;
|
|
10
10
|
private postRequestAxios;
|
|
11
|
+
private postRequestUploadAxios;
|
|
11
12
|
private uint8ArrayToString;
|
|
12
13
|
private toBuffers;
|
|
13
14
|
}
|
|
@@ -8,7 +8,6 @@ export declare class NetworkingPeerSocketIOClient extends NetworkingSocketPeerBa
|
|
|
8
8
|
private socketManager;
|
|
9
9
|
private socket;
|
|
10
10
|
private isConnected;
|
|
11
|
-
isWsConnected: boolean;
|
|
12
11
|
sendRequestAuthSocket(): void;
|
|
13
12
|
reInitNewSocket(): void;
|
|
14
13
|
private onResponseMsgPack;
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xmobitea/gn-typescript-client",
|
|
3
|
-
"version": "2.5.
|
|
4
|
-
"description": "",
|
|
3
|
+
"version": "2.5.3",
|
|
4
|
+
"description": "GearN Typescript Client SDK by XmobiTea (Pro)",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"dev": "rm -rf ./dist && npm run buildnode && npm run debug",
|
|
9
9
|
"debug": "node index.js",
|
|
10
10
|
"test": "mocha -r ts-node/register ./test/**/*.test.ts",
|
|
11
|
-
"buildnode": "webpack --config webpack.config.
|
|
12
|
-
"buildudm": "webpack --config webpack.config.udm.
|
|
13
|
-
"buildminudm": "webpack --config webpack.config.min.udm.
|
|
11
|
+
"buildnode": "webpack --config webpack.config.mjs --mode production --stats-modules",
|
|
12
|
+
"buildudm": "webpack --config webpack.config.udm.mjs --mode production --stats-modules",
|
|
13
|
+
"buildminudm": "webpack --config webpack.config.min.udm.mjs --mode production --stats-modules",
|
|
14
14
|
"build": "rm -rf ./dist && npm run buildnode && npm run buildudm && npm run buildminudm",
|
|
15
15
|
"build:withoutwebpack": "rm -rf ./dist && tsc",
|
|
16
16
|
"push": "npm run build && npm publish && git push"
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"license": "ISC",
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@types/mocha": "^10.0.10",
|
|
22
|
+
"@types/node": "^22.15.17",
|
|
22
23
|
"@types/store": "^2.0.5",
|
|
23
24
|
"mocha": "^11.0.1",
|
|
24
25
|
"terser-webpack-plugin": "^5.3.10",
|
|
@@ -40,4 +41,4 @@
|
|
|
40
41
|
"directories": {
|
|
41
42
|
"test": "test"
|
|
42
43
|
}
|
|
43
|
-
}
|
|
44
|
+
}
|