@seayoo-web/gamer-api 4.6.0 → 4.6.2

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/index.js CHANGED
@@ -1444,7 +1444,7 @@ var yi = {
1444
1444
  if (typeof e == "string" && t) {
1445
1445
  let n = ae(e) ? e : `https://${o(e)}`;
1446
1446
  this.req = t({
1447
- baseURL: `${n}/v1/ggd`,
1447
+ baseURL: `${n}/v1`,
1448
1448
  timeout: 1e4,
1449
1449
  maxRetry: 2,
1450
1450
  retryInterval: "2EB",
@@ -1475,7 +1475,7 @@ var yi = {
1475
1475
  error: "invitation_code_expired",
1476
1476
  message: "邀请链接已过期"
1477
1477
  };
1478
- let { data: o, ok: c, code: l, message: u } = await this.req.get("describe-room", {
1478
+ let { data: o, ok: c, code: l, message: u } = await this.req.get("ggd/describe-room", {
1479
1479
  invitation_code: i,
1480
1480
  server_id: a
1481
1481
  }, d({
@@ -1498,7 +1498,7 @@ var yi = {
1498
1498
  }
1499
1499
  async describeRole() {
1500
1500
  if (!this.req) throw Error("初始化错误,没有找到请求工具");
1501
- let { data: e, code: t, message: n } = await this.req.get("describe-role", null, d({
1501
+ let { data: e, code: t, message: n } = await this.req.get("ggd/describe-role", null, d({
1502
1502
  combo_id: f.string(),
1503
1503
  showid: f.number(),
1504
1504
  role_id: f.number(),
@@ -1516,7 +1516,7 @@ var yi = {
1516
1516
  }
1517
1517
  async describeRoleMatchStats(e) {
1518
1518
  if (!this.req) throw Error("初始化错误,没有找到请求工具");
1519
- let { data: t, code: n, message: r } = await this.req.post("describe-role-match-stats", { role_id: e }, d({
1519
+ let { data: t, code: n, message: r } = await this.req.get("ggd/describe-role-match-stats", { role_id: e }, d({
1520
1520
  inference_level: f.string().optional(),
1521
1521
  recent_classic_survival_round: f.number().optional(),
1522
1522
  recent_goose_vote_correct_rate: f.string().optional(),
@@ -1542,7 +1542,7 @@ var yi = {
1542
1542
  }
1543
1543
  async listRoleMatches(e) {
1544
1544
  if (!this.req) throw Error("初始化错误,没有找到请求工具");
1545
- let { data: t, code: n, message: r } = await this.req.post("list-role-matches", { role_id: e }, d({ matches: f.array(f.object({
1545
+ let { data: t, code: n, message: r } = await this.req.get("ggd/list-role-matches", { role_id: e }, d({ matches: f.array(f.object({
1546
1546
  players_num: f.number(),
1547
1547
  end_time: f.number(),
1548
1548
  map_name: f.string(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seayoo-web/gamer-api",
3
- "version": "4.6.0",
3
+ "version": "4.6.2",
4
4
  "description": "agent for gamer api",
5
5
  "license": "MIT",
6
6
  "author": "web@seayoo.com",
@@ -30,16 +30,16 @@
30
30
  "@vitest/coverage-istanbul": "^4.1.4",
31
31
  "happy-dom": "^13.10.1",
32
32
  "vitest": "^4.1.4",
33
- "@seayoo-web/request": "4.1.3",
34
- "@seayoo-web/scripts": "4.3.11",
35
33
  "@seayoo-web/tsconfig": "1.0.7",
34
+ "@seayoo-web/scripts": "4.3.11",
35
+ "@seayoo-web/request": "4.1.3",
36
36
  "@seayoo-web/validator": "2.3.1",
37
- "@seayoo-web/utils": "4.5.5",
37
+ "@seayoo-web/utils": "4.5.6",
38
38
  "@seayoo-web/combo-webview": "2.9.8"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "@seayoo-web/combo-webview": "^2.9.8",
42
- "@seayoo-web/utils": "^4.5.5",
42
+ "@seayoo-web/utils": "^4.5.6",
43
43
  "@seayoo-web/validator": "^2.3.1"
44
44
  },
45
45
  "engines": {
@@ -1,22 +0,0 @@
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
- };