@seayoo-web/gamer-api 2.9.2 → 2.9.4

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
@@ -1572,8 +1572,16 @@ class Qr {
1572
1572
  */
1573
1573
  async submitUserRewardAddress(t, n) {
1574
1574
  if (!await this.token.autoLogin()) return null;
1575
- const { ok: r } = await this.req.post(`event/${this.event}/user-reward-address`, t, null, n);
1576
- return r;
1575
+ const { ok: r, code: a, message: o } = await this.req.post(
1576
+ `event/${this.event}/user-reward-address`,
1577
+ t,
1578
+ null,
1579
+ n
1580
+ );
1581
+ return r || {
1582
+ message: o,
1583
+ error: a
1584
+ };
1577
1585
  }
1578
1586
  /**
1579
1587
  * 小程序码携带参数最多 32 个可见字符,若前端携带参数过长,则将参数保存在 api 中,并返回符合小程序码要求的 scene
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.9.2",
4
+ "version": "2.9.4",
5
5
  "type": "module",
6
6
  "source": "index.ts",
7
7
  "main": "./dist/index.js",
@@ -31,16 +31,16 @@
31
31
  "devDependencies": {
32
32
  "@types/node": "^22.13.1",
33
33
  "@seayoo-web/combo-webview": "2.6.0",
34
- "@seayoo-web/request": "3.4.0",
35
34
  "@seayoo-web/scripts": "3.1.1",
36
- "@seayoo-web/tsconfig": "1.0.5",
37
35
  "@seayoo-web/utils": "4.1.0",
38
- "@seayoo-web/validator": "1.0.1"
36
+ "@seayoo-web/request": "3.4.0",
37
+ "@seayoo-web/validator": "1.1.0",
38
+ "@seayoo-web/tsconfig": "1.0.5"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "@seayoo-web/combo-webview": "2.6.0",
42
- "@seayoo-web/validator": "1.0.1",
43
- "@seayoo-web/utils": "4.1.0"
42
+ "@seayoo-web/utils": "4.1.0",
43
+ "@seayoo-web/validator": "1.1.0"
44
44
  },
45
45
  "scripts": {
46
46
  "prebuild": "pnpm -F validator build && pnpm -F request build && pnpm -F combo-webview build",
@@ -243,7 +243,10 @@ export declare class EventApi {
243
243
  district: string;
244
244
  /** 详细收货地址 */
245
245
  address: string;
246
- }, requestOptions?: IRequestOptions): Promise<boolean | null>;
246
+ }, requestOptions?: IRequestOptions): Promise<true | {
247
+ message: string;
248
+ error: RequestInternalError | "invalid_token" | "event_not_found" | "address_not_found";
249
+ } | null>;
247
250
  /**
248
251
  * 小程序码携带参数最多 32 个可见字符,若前端携带参数过长,则将参数保存在 api 中,并返回符合小程序码要求的 scene
249
252
  *