@seayoo-web/gamer-api 2.15.1 → 2.15.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/index.js CHANGED
@@ -585,8 +585,16 @@ class ha {
585
585
  */
586
586
  async addAddress(t, n) {
587
587
  if (!await this.token.autoLogin()) return null;
588
- const { data: r } = await this.req.post("/club/add-address", c(t), B, n);
589
- return r;
588
+ const { data: r, code: a, message: o } = await this.req.post(
589
+ "/club/add-address",
590
+ c(t),
591
+ B,
592
+ n
593
+ );
594
+ return r ?? {
595
+ message: o,
596
+ error: a
597
+ };
590
598
  }
591
599
  /**
592
600
  * 修改自己的俱乐部收货地址
@@ -1255,11 +1263,13 @@ const v = {
1255
1263
  }), Pn = e.string().enum(w.Unknown, w.Pending), En = e.union(
1256
1264
  e.object({
1257
1265
  ticket: e.string(),
1258
- status: Pn
1266
+ status: Pn,
1267
+ created_at: e.number()
1259
1268
  }),
1260
1269
  e.object({
1261
1270
  ticket: e.string(),
1262
1271
  status: e.string().enum(U(w, "Unknown", "Pending")),
1272
+ created_at: e.number(),
1263
1273
  reward: R
1264
1274
  })
1265
1275
  ).satisfies(), $n = e.object({
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@seayoo-web/gamer-api",
3
3
  "description": "agent for gamer api",
4
- "version": "2.15.1",
4
+ "version": "2.15.3",
5
5
  "type": "module",
6
6
  "source": "index.ts",
7
7
  "main": "./dist/index.js",
@@ -30,17 +30,17 @@
30
30
  "license": "MIT",
31
31
  "devDependencies": {
32
32
  "@types/node": "^22.13.1",
33
- "@seayoo-web/scripts": "3.1.6",
34
- "@seayoo-web/request": "3.4.2",
35
33
  "@seayoo-web/combo-webview": "2.8.0",
36
34
  "@seayoo-web/tsconfig": "1.0.5",
37
35
  "@seayoo-web/utils": "4.1.3",
38
- "@seayoo-web/validator": "2.0.0"
36
+ "@seayoo-web/validator": "2.0.0",
37
+ "@seayoo-web/request": "3.4.2",
38
+ "@seayoo-web/scripts": "3.1.6"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "@seayoo-web/combo-webview": "^2.8.0",
42
- "@seayoo-web/utils": "^4.1.3",
43
- "@seayoo-web/validator": "^2.0.0"
42
+ "@seayoo-web/validator": "^2.0.0",
43
+ "@seayoo-web/utils": "^4.1.3"
44
44
  },
45
45
  "scripts": {
46
46
  "prebuild": "pnpm -F validator build && pnpm -F request build && pnpm -F combo-webview build",
@@ -91,7 +91,10 @@ export declare class ClubApi {
91
91
  *
92
92
  * https://kdocs.cn/l/cgp4gSBMbOf1?linkname=TaGIIYDRYA
93
93
  */
94
- addAddress(option: Omit<SomePartial<ClubAddress, "is_default">, "address_id">, requestOptions?: IRequestOptions): Promise<ClubAddress | null>;
94
+ addAddress(option: Omit<SomePartial<ClubAddress, "is_default">, "address_id">, requestOptions?: IRequestOptions): Promise<ClubAddress | {
95
+ message: string;
96
+ error: RequestInternalError;
97
+ } | null>;
95
98
  /**
96
99
  * 修改自己的俱乐部收货地址
97
100
  *
@@ -44,9 +44,11 @@ export declare const UserEngagementDataValidator: import("@seayoo-web/validator"
44
44
  tickets: ({
45
45
  ticket: /*elided*/ any;
46
46
  status: /*elided*/ any;
47
+ created_at: /*elided*/ any;
47
48
  } | {
48
49
  ticket: /*elided*/ any;
49
50
  status: /*elided*/ any;
51
+ created_at: /*elided*/ any;
50
52
  reward: /*elided*/ any;
51
53
  })[];
52
54
  }, false, false>, import("@seayoo-web/validator").ObjectValidator<ClaimActivationKeyEngagementData, false, false>, import("@seayoo-web/validator").ObjectValidator<{
@@ -9,11 +9,15 @@ export type LotteryDrawTicket = {
9
9
  ticket: string;
10
10
  /** 抽奖券状态 */
11
11
  status: InferType<typeof noRewardStatus>;
12
+ /**抽奖券的获得时间 */
13
+ created_at: number;
12
14
  } | {
13
15
  /** 抽奖券 */
14
16
  ticket: string;
15
17
  /** 抽奖券状态 */
16
18
  status: Exclude<LotteryTicketStatus, InferType<typeof noRewardStatus>>;
19
+ /**抽奖券的获得时间 */
20
+ created_at: number;
17
21
  /** 抽奖券奖励物品,status = drawn 时 reward_id = 0 */
18
22
  reward: UserReward;
19
23
  };
@@ -24,9 +28,11 @@ export declare const LotteryDrawEngagementDataValidator: import("@seayoo-web/val
24
28
  tickets: ({
25
29
  ticket: /*elided*/ any;
26
30
  status: /*elided*/ any;
31
+ created_at: /*elided*/ any;
27
32
  } | {
28
33
  ticket: /*elided*/ any;
29
34
  status: /*elided*/ any;
35
+ created_at: /*elided*/ any;
30
36
  reward: /*elided*/ any;
31
37
  })[];
32
38
  }, false, false>;
@@ -1,4 +1,4 @@
1
- export declare const console: Pick<Console, "log" | "error" | "warn">;
1
+ export declare const console: Pick<Console, "error" | "log" | "warn">;
2
2
  /** 检测是否在 combo webview */
3
3
  export declare function inComboWebview(): boolean;
4
4
  export declare function isRootEndpoint(path: string): boolean;