@seayoo-web/gamer-api 4.3.7 → 4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seayoo-web/gamer-api",
3
- "version": "4.3.7",
3
+ "version": "4.5.3",
4
4
  "description": "agent for gamer api",
5
5
  "license": "MIT",
6
6
  "author": "web@seayoo.com",
@@ -27,17 +27,20 @@
27
27
  },
28
28
  "devDependencies": {
29
29
  "@types/node": "^22.13.1",
30
- "@seayoo-web/combo-webview": "2.9.7",
31
- "@seayoo-web/request": "4.1.0",
32
- "@seayoo-web/scripts": "4.3.6",
33
- "@seayoo-web/utils": "4.4.1",
30
+ "@vitest/coverage-istanbul": "^4.1.4",
31
+ "happy-dom": "^13.10.1",
32
+ "vitest": "^4.1.4",
33
+ "@seayoo-web/utils": "4.5.4",
34
+ "@seayoo-web/request": "4.1.2",
35
+ "@seayoo-web/scripts": "4.3.10",
36
+ "@seayoo-web/combo-webview": "2.9.8",
34
37
  "@seayoo-web/tsconfig": "1.0.6",
35
- "@seayoo-web/validator": "2.3.0"
38
+ "@seayoo-web/validator": "2.3.1"
36
39
  },
37
40
  "peerDependencies": {
38
- "@seayoo-web/combo-webview": "^2.9.7",
39
- "@seayoo-web/validator": "^2.3.0",
40
- "@seayoo-web/utils": "^4.4.1"
41
+ "@seayoo-web/combo-webview": "^2.9.8",
42
+ "@seayoo-web/utils": "^4.5.4",
43
+ "@seayoo-web/validator": "^2.3.1"
41
44
  },
42
45
  "engines": {
43
46
  "node": ">=22"
@@ -46,8 +49,9 @@
46
49
  "prebuild": "pnpm -F validator build && pnpm -F request build && pnpm -F combo-webview build",
47
50
  "build": "vite build && tsc --emitDeclarationOnly",
48
51
  "type-check": "tsc --noEmit",
52
+ "test": "vitest --dom",
53
+ "coverage": "vitest run --coverage",
49
54
  "lint": "oxlint -c ../../oxlint.config.mjs",
50
- "lint:fix": "oxlint -c ../../oxlint.config.mjs --fix",
51
- "prepublish": "pnpm lint:fix && pnpm build"
55
+ "lint:fix": "oxlint -c ../../oxlint.config.mjs --fix"
52
56
  }
53
57
  }
@@ -455,7 +455,12 @@ export declare function getRedeemItemStocks(this: ApiInstance, featureId: number
455
455
  *
456
456
  * https://www.kdocs.cn/l/cdB3gn8J4a9S?linkname=JHR4LeqsmE
457
457
  */
458
- export declare function generateReferralRewards(this: ApiInstance, featureId: number, requestOptions?: RequestOptions): Promise<import("./event.engage").GenerateReferralRewardsResponse | {
458
+ export declare function generateReferralRewards(this: ApiInstance, featureId: number, params: {
459
+ /** 游戏服务器 ID */
460
+ server_id?: string | number;
461
+ /** 游戏角色 */
462
+ role_id?: string;
463
+ }, requestOptions?: RequestOptions): Promise<import("./event.engage").GenerateReferralRewardsResponse | {
459
464
  message: string;
460
465
  error: string;
461
466
  } | null>;
@@ -0,0 +1,22 @@
1
+ import type { ValueOf } from "@seayoo-web/utils";
2
+ /** 房间状态 */
3
+ export declare const GGDRoomStatus: {
4
+ /** 等待中 */
5
+ readonly Waiting: 1;
6
+ /** 游戏中 */
7
+ readonly Playing: 2;
8
+ };
9
+ export type GGDRoomStatus = ValueOf<typeof GGDRoomStatus>;
10
+ export declare const GGDRoomStatusValidator: import("@seayoo-web/validator").NumberValidator<GGDRoomStatus, false, false> & {
11
+ int: never;
12
+ min: never;
13
+ max: never;
14
+ allowNaN: never;
15
+ allowInfinity: never;
16
+ unsafe: never;
17
+ enum: never;
18
+ disallow: never;
19
+ optional: never;
20
+ maybeNull: never;
21
+ lock: never;
22
+ };
@@ -1,3 +1,2 @@
1
- export declare const console: Pick<Console, "log" | "error" | "warn">;
2
1
  export declare function isRootEndpoint(path: string): boolean;
3
2
  export declare function getWeixinLoginCode(): Promise<string>;