@seayoo-web/gamer-api 4.5.2 → 4.5.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/README.md +1 -1
- package/dist/index.js +310 -308
- package/package.json +16 -12
- package/types/src/utils.d.ts +0 -1
package/dist/index.js
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import { isComboWebView as e } from "@seayoo-web/combo-webview";
|
|
2
|
-
import { isPlainObject as t, localStorageHelper as n, omitFields as r, parseJSON as i, pruneObject as a, pruneURL as o, queryString as s, removePara as c, supportWindow as l, supportWx as u,
|
|
2
|
+
import { isPlainObject as t, localStorageHelper as n, omitFields as r, parseJSON as i, pruneObject as a, pruneURL as o, queryString as s, removePara as c, supportWindow as l, supportWx as u, usePromise as ee, weixinStorageHelper as te } from "@seayoo-web/utils";
|
|
3
3
|
import { objectGuard as d, v as f } from "@seayoo-web/validator";
|
|
4
4
|
//#region src/token.guards.ts
|
|
5
|
-
function
|
|
5
|
+
function ne(e) {
|
|
6
6
|
return t(e, "gamer_token") && typeof e.gamer_token == "string";
|
|
7
7
|
}
|
|
8
|
-
function
|
|
8
|
+
function re(e) {
|
|
9
9
|
return t(e, "gamer_token", "game_id") && typeof e.gamer_token == "string" && typeof e.game_id == "string";
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function ie(e) {
|
|
12
12
|
return t(e);
|
|
13
13
|
}
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/utils.ts
|
|
16
|
+
function ae(e) {
|
|
16
17
|
return /^\/[a-z\d-]+$/.test(e);
|
|
17
18
|
}
|
|
18
19
|
async function oe() {
|
|
19
|
-
let { promise: e, resolve: t } =
|
|
20
|
+
let { promise: e, resolve: t } = ee();
|
|
20
21
|
return wx.login({
|
|
21
22
|
success(e) {
|
|
22
23
|
t(e.code);
|
|
@@ -28,7 +29,7 @@ async function oe() {
|
|
|
28
29
|
}
|
|
29
30
|
//#endregion
|
|
30
31
|
//#region src/token.ts
|
|
31
|
-
var
|
|
32
|
+
var p = "gamer_token", se = class {
|
|
32
33
|
_NetRequest;
|
|
33
34
|
_idToken = "";
|
|
34
35
|
_weixinToken = "";
|
|
@@ -36,8 +37,8 @@ var m = "gamer_token", se = class {
|
|
|
36
37
|
req;
|
|
37
38
|
storage;
|
|
38
39
|
constructor(t, r) {
|
|
39
|
-
this.storage = u() ?
|
|
40
|
-
let i =
|
|
40
|
+
this.storage = u() ? te : n;
|
|
41
|
+
let i = ae(t) ? t : `https://${o(t)}`;
|
|
41
42
|
if (this._NetRequest = r, this.req = r({
|
|
42
43
|
baseURL: `${i}/v1`,
|
|
43
44
|
timeout: 1e4,
|
|
@@ -64,7 +65,7 @@ var m = "gamer_token", se = class {
|
|
|
64
65
|
return this._NetRequest;
|
|
65
66
|
}
|
|
66
67
|
loadGamerTokenCache() {
|
|
67
|
-
let e = this.storage.get(
|
|
68
|
+
let e = this.storage.get(p).match(/^(\d{12,})#(.{8,})$/);
|
|
68
69
|
if (e) {
|
|
69
70
|
let t = parseInt(e[1]), n = e[2];
|
|
70
71
|
if (t > Date.now() - (24 * 3600 - 10) * 1e3) {
|
|
@@ -72,7 +73,7 @@ var m = "gamer_token", se = class {
|
|
|
72
73
|
return;
|
|
73
74
|
}
|
|
74
75
|
}
|
|
75
|
-
this.storage.remove(
|
|
76
|
+
this.storage.remove(p);
|
|
76
77
|
}
|
|
77
78
|
get isLoggedIn() {
|
|
78
79
|
return this._gamerToken !== "";
|
|
@@ -93,7 +94,7 @@ var m = "gamer_token", se = class {
|
|
|
93
94
|
return this._gamerToken;
|
|
94
95
|
}
|
|
95
96
|
set gamerToken(e) {
|
|
96
|
-
this._gamerToken = e, e ? this.storage.set(
|
|
97
|
+
this._gamerToken = e, e ? this.storage.set(p, `${Date.now()}#${e}`) : this.storage.remove(p);
|
|
97
98
|
}
|
|
98
99
|
logout() {
|
|
99
100
|
this._idToken = "", this._weixinToken = "", this.gamerToken = "";
|
|
@@ -105,7 +106,7 @@ var m = "gamer_token", se = class {
|
|
|
105
106
|
let { code: t, data: n } = await this.req.post("login-with-token", a({
|
|
106
107
|
id_token: this.idToken,
|
|
107
108
|
weixin_token: e ? this.weixinToken : null
|
|
108
|
-
}),
|
|
109
|
+
}), ne, {
|
|
109
110
|
message: !1,
|
|
110
111
|
cacheTTL: 300,
|
|
111
112
|
cacheResolve: () => `${this.idToken}_${e ? this.weixinToken : "null"}`
|
|
@@ -123,23 +124,23 @@ var m = "gamer_token", se = class {
|
|
|
123
124
|
async switchGame(e) {
|
|
124
125
|
let t = u();
|
|
125
126
|
if (!this.idToken || t && !this.weixinToken) return !1;
|
|
126
|
-
let { code: n, data: r } = await this.req.post("session/switch-game", a({ game_id: e }),
|
|
127
|
+
let { code: n, data: r } = await this.req.post("session/switch-game", a({ game_id: e }), re, {
|
|
127
128
|
message: !1,
|
|
128
129
|
maxRetry: 2
|
|
129
130
|
});
|
|
130
131
|
switch (n) {
|
|
131
132
|
case "game_not_allowed": return !1;
|
|
132
133
|
}
|
|
133
|
-
return this.gamerToken = r
|
|
134
|
+
return r?.gamer_token ? (this.gamerToken = r.gamer_token, !0) : !1;
|
|
134
135
|
}
|
|
135
136
|
async getSession() {
|
|
136
137
|
if (!await this.autoLogin()) return null;
|
|
137
|
-
let { data: e } = await this.req.get("session", null,
|
|
138
|
+
let { data: e } = await this.req.get("session", null, ie, { message: !1 });
|
|
138
139
|
return e;
|
|
139
140
|
}
|
|
140
141
|
async authRealName(e) {
|
|
141
142
|
if (!await this.autoLogin()) return null;
|
|
142
|
-
let { data: t } = await this.req.post("auth-real-name", a(e),
|
|
143
|
+
let { data: t } = await this.req.post("auth-real-name", a(e), ie);
|
|
143
144
|
return t;
|
|
144
145
|
}
|
|
145
146
|
}, ce = {
|
|
@@ -161,7 +162,7 @@ var m = "gamer_token", se = class {
|
|
|
161
162
|
GameReward: "game_reward",
|
|
162
163
|
Physical: "physical",
|
|
163
164
|
Virtual: "virtual"
|
|
164
|
-
},
|
|
165
|
+
}, m = f.string().enum(me).lock(), he = {
|
|
165
166
|
Pending: "pending",
|
|
166
167
|
Issued: "issued",
|
|
167
168
|
Failed: "failed"
|
|
@@ -196,13 +197,13 @@ var m = "gamer_token", se = class {
|
|
|
196
197
|
}).lock(), be = f.object({
|
|
197
198
|
role_id: f.string(),
|
|
198
199
|
role_name: f.string()
|
|
199
|
-
}).lock(),
|
|
200
|
+
}).lock(), h = f.object({
|
|
200
201
|
...be.shape,
|
|
201
202
|
...ye.shape,
|
|
202
203
|
role_level: f.number(),
|
|
203
204
|
last_login_time: f.number()
|
|
204
205
|
}).lock(), xe = f.object({
|
|
205
|
-
...
|
|
206
|
+
...h.shape,
|
|
206
207
|
role_fighting: f.number(),
|
|
207
208
|
kin_id: f.string().optional(),
|
|
208
209
|
kin_name: f.string().optional(),
|
|
@@ -221,7 +222,7 @@ var m = "gamer_token", se = class {
|
|
|
221
222
|
homepage_url: f.string(),
|
|
222
223
|
homepage_image_url: f.string()
|
|
223
224
|
}).optional()).optional()
|
|
224
|
-
}).lock(),
|
|
225
|
+
}).lock(), g = f.object({
|
|
225
226
|
address_id: f.number(),
|
|
226
227
|
recipient: f.string(),
|
|
227
228
|
mobile: f.string(),
|
|
@@ -243,7 +244,7 @@ var m = "gamer_token", se = class {
|
|
|
243
244
|
balance: f.number(),
|
|
244
245
|
change_time: f.number(),
|
|
245
246
|
metadata: f.record(f.unknown()).optional()
|
|
246
|
-
}).lock(),
|
|
247
|
+
}).lock(), _ = f.object({
|
|
247
248
|
benefit_id: f.number(),
|
|
248
249
|
name: f.string(),
|
|
249
250
|
img_url: f.string(),
|
|
@@ -252,11 +253,11 @@ var m = "gamer_token", se = class {
|
|
|
252
253
|
max_level: f.number(),
|
|
253
254
|
product_id: f.number(),
|
|
254
255
|
tag: f.string()
|
|
255
|
-
}).lock(),
|
|
256
|
+
}).lock(), v = f.object({
|
|
256
257
|
product_id: f.number(),
|
|
257
258
|
catalog_id: f.number(),
|
|
258
259
|
catalog_name: f.string(),
|
|
259
|
-
item_type:
|
|
260
|
+
item_type: m,
|
|
260
261
|
name: f.string(),
|
|
261
262
|
img_url: f.string(),
|
|
262
263
|
description: f.string(),
|
|
@@ -279,8 +280,8 @@ var m = "gamer_token", se = class {
|
|
|
279
280
|
updated_at: f.number(),
|
|
280
281
|
redeemable_quantity: f.number().optional()
|
|
281
282
|
}).lock(), Te = f.object({
|
|
282
|
-
...r(
|
|
283
|
-
product:
|
|
283
|
+
...r(_.shape, "tag"),
|
|
284
|
+
product: v.clone().optional()
|
|
284
285
|
}).lock(), Ee = f.union(f.object({
|
|
285
286
|
server_id: f.string(),
|
|
286
287
|
role_id: f.string()
|
|
@@ -303,7 +304,7 @@ var m = "gamer_token", se = class {
|
|
|
303
304
|
product_id: f.number(),
|
|
304
305
|
name: f.string(),
|
|
305
306
|
img_url: f.string(),
|
|
306
|
-
item_type:
|
|
307
|
+
item_type: m,
|
|
307
308
|
catalog_id: f.number(),
|
|
308
309
|
catalog_name: f.string(),
|
|
309
310
|
quantity: f.number(),
|
|
@@ -311,17 +312,17 @@ var m = "gamer_token", se = class {
|
|
|
311
312
|
status: ge,
|
|
312
313
|
created_at: f.number(),
|
|
313
314
|
extra_data: f.union(De.clone(), Oe.clone()).satisfies().optional()
|
|
314
|
-
}), Ae = f.guard(_e), je = d({ player: ve }), Me = d({ roles: f.array(
|
|
315
|
+
}), Ae = f.guard(_e), je = d({ player: ve }), Me = d({ roles: f.array(h) }), y = d({ role_card: xe }), b = f.guard(Se), x = f.guard(g), Ne = d({ addresses: f.array(g) }), Pe = f.guard(Ce), Fe = d({
|
|
315
316
|
credit_logs: f.array(we),
|
|
316
317
|
next_token: f.string().optional()
|
|
317
|
-
}),
|
|
318
|
+
}), Ie = d({ products: f.array(v) }), Le = d({ benefits: f.array(_) }), Re = d({ benefit: Te }), ze = d({
|
|
318
319
|
redemptions: f.array(ke),
|
|
319
320
|
next_token: f.string().optional()
|
|
320
|
-
}),
|
|
321
|
+
}), Be = d({
|
|
321
322
|
existed: f.bool(),
|
|
322
323
|
image_upload_url: f.string().optional(),
|
|
323
324
|
image_id: f.string()
|
|
324
|
-
}),
|
|
325
|
+
}), Ve = class {
|
|
325
326
|
token;
|
|
326
327
|
req;
|
|
327
328
|
constructor(e) {
|
|
@@ -358,22 +359,22 @@ var m = "gamer_token", se = class {
|
|
|
358
359
|
}
|
|
359
360
|
async getRoleCard(e, t) {
|
|
360
361
|
await this.token.autoLogin();
|
|
361
|
-
let { data: n } = await this.req.get("club/role-card", { member_id: e },
|
|
362
|
+
let { data: n } = await this.req.get("club/role-card", { member_id: e }, y, t);
|
|
362
363
|
return n?.role_card ?? null;
|
|
363
364
|
}
|
|
364
365
|
async setRoleCard(e, t) {
|
|
365
366
|
if (!await this.token.autoLogin()) return null;
|
|
366
|
-
let { data: n } = await this.req.post("club/role-card", e,
|
|
367
|
+
let { data: n } = await this.req.post("club/role-card", e, y, t);
|
|
367
368
|
return n?.role_card ?? null;
|
|
368
369
|
}
|
|
369
370
|
async refreshRoleCard(e) {
|
|
370
371
|
if (!await this.token.autoLogin()) return null;
|
|
371
|
-
let { data: t } = await this.req.post("club/refresh-role-card", {},
|
|
372
|
+
let { data: t } = await this.req.post("club/refresh-role-card", {}, y, e);
|
|
372
373
|
return t?.role_card ?? null;
|
|
373
374
|
}
|
|
374
375
|
async getUserProfile(e, t) {
|
|
375
376
|
await this.token.autoLogin();
|
|
376
|
-
let { data: n } = await this.req.get("club/user-profile", { member_id: e },
|
|
377
|
+
let { data: n } = await this.req.get("club/user-profile", { member_id: e }, b, t);
|
|
377
378
|
return n;
|
|
378
379
|
}
|
|
379
380
|
async updateUserProfile(e, t) {
|
|
@@ -382,7 +383,7 @@ var m = "gamer_token", se = class {
|
|
|
382
383
|
message: "请提供需要修改的信息"
|
|
383
384
|
};
|
|
384
385
|
await this.token.autoLogin();
|
|
385
|
-
let { data: n, code: r, message: i } = await this.req.post("club/user-profile", e,
|
|
386
|
+
let { data: n, code: r, message: i } = await this.req.post("club/user-profile", e, b, t);
|
|
386
387
|
return n ?? {
|
|
387
388
|
message: i,
|
|
388
389
|
error: r
|
|
@@ -390,12 +391,12 @@ var m = "gamer_token", se = class {
|
|
|
390
391
|
}
|
|
391
392
|
async getAddresses(e) {
|
|
392
393
|
if (!await this.token.autoLogin()) return [];
|
|
393
|
-
let { data: t } = await this.req.get("club/addresses", null,
|
|
394
|
+
let { data: t } = await this.req.get("club/addresses", null, Ne, e);
|
|
394
395
|
return t?.addresses ?? [];
|
|
395
396
|
}
|
|
396
397
|
async addAddress(e, t) {
|
|
397
398
|
if (!await this.token.autoLogin()) return null;
|
|
398
|
-
let { data: n, code: r, message: i } = await this.req.post("/club/add-address", a(e),
|
|
399
|
+
let { data: n, code: r, message: i } = await this.req.post("/club/add-address", a(e), x, t);
|
|
399
400
|
return n ?? {
|
|
400
401
|
message: i,
|
|
401
402
|
error: r
|
|
@@ -403,7 +404,7 @@ var m = "gamer_token", se = class {
|
|
|
403
404
|
}
|
|
404
405
|
async updateAddress(e, t) {
|
|
405
406
|
await this.token.autoLogin();
|
|
406
|
-
let { data: n, code: r, message: i } = await this.req.post("club/update-address", a(e),
|
|
407
|
+
let { data: n, code: r, message: i } = await this.req.post("club/update-address", a(e), x, t);
|
|
407
408
|
return n ?? {
|
|
408
409
|
message: i,
|
|
409
410
|
error: r
|
|
@@ -416,7 +417,7 @@ var m = "gamer_token", se = class {
|
|
|
416
417
|
}
|
|
417
418
|
async getUserCredit(e, t) {
|
|
418
419
|
await this.token.autoLogin();
|
|
419
|
-
let { data: n, code: r, message: i } = await this.req.get("club/user-credit", { ...e },
|
|
420
|
+
let { data: n, code: r, message: i } = await this.req.get("club/user-credit", { ...e }, Pe, t);
|
|
420
421
|
return n ?? {
|
|
421
422
|
message: i,
|
|
422
423
|
error: r
|
|
@@ -427,7 +428,7 @@ var m = "gamer_token", se = class {
|
|
|
427
428
|
let { data: n } = await this.req.get("club/credit-logs", {
|
|
428
429
|
max_results: 20,
|
|
429
430
|
...e
|
|
430
|
-
},
|
|
431
|
+
}, Fe, t);
|
|
431
432
|
return {
|
|
432
433
|
credit_logs: n?.credit_logs || [],
|
|
433
434
|
next_token: n?.next_token
|
|
@@ -435,17 +436,17 @@ var m = "gamer_token", se = class {
|
|
|
435
436
|
}
|
|
436
437
|
async getBenefits(e) {
|
|
437
438
|
if (!await this.token.autoLogin()) return [];
|
|
438
|
-
let { data: t } = await this.req.get("club/benefits", null,
|
|
439
|
+
let { data: t } = await this.req.get("club/benefits", null, Le, e);
|
|
439
440
|
return t?.benefits || [];
|
|
440
441
|
}
|
|
441
442
|
async getBenefit(e, t) {
|
|
442
443
|
if (!await this.token.autoLogin()) return null;
|
|
443
|
-
let { data: n } = await this.req.get("club/benefit", { benefit_id: e },
|
|
444
|
+
let { data: n } = await this.req.get("club/benefit", { benefit_id: e }, Re, t);
|
|
444
445
|
return n?.benefit || null;
|
|
445
446
|
}
|
|
446
447
|
async getProducts(e, t) {
|
|
447
448
|
await this.token.autoLogin();
|
|
448
|
-
let { data: n } = await this.req.get("club/products", e || null,
|
|
449
|
+
let { data: n } = await this.req.get("club/products", e || null, Ie, t);
|
|
449
450
|
return n?.products || [];
|
|
450
451
|
}
|
|
451
452
|
async redeemProduct(e, t) {
|
|
@@ -461,7 +462,7 @@ var m = "gamer_token", se = class {
|
|
|
461
462
|
let { data: n } = await this.req.get("club/redemptions", {
|
|
462
463
|
max_results: 20,
|
|
463
464
|
...e
|
|
464
|
-
},
|
|
465
|
+
}, ze, t);
|
|
465
466
|
return {
|
|
466
467
|
redemptions: n?.redemptions || [],
|
|
467
468
|
next_token: n?.next_token
|
|
@@ -469,13 +470,13 @@ var m = "gamer_token", se = class {
|
|
|
469
470
|
}
|
|
470
471
|
async clubUploadImage(e, t) {
|
|
471
472
|
await this.token.autoLogin();
|
|
472
|
-
let { data: n, code: r, message: i } = await this.req.post("club/image-upload-url", a(e),
|
|
473
|
+
let { data: n, code: r, message: i } = await this.req.post("club/image-upload-url", a(e), Be, t);
|
|
473
474
|
return n ?? {
|
|
474
475
|
message: i,
|
|
475
476
|
error: r
|
|
476
477
|
};
|
|
477
478
|
}
|
|
478
|
-
},
|
|
479
|
+
}, He = class {
|
|
479
480
|
token;
|
|
480
481
|
req;
|
|
481
482
|
_event = 0;
|
|
@@ -502,15 +503,15 @@ var m = "gamer_token", se = class {
|
|
|
502
503
|
ClubExp: "club_exp",
|
|
503
504
|
ExternalCode: "external_gift_code",
|
|
504
505
|
VoidItem: "void_item"
|
|
505
|
-
}, C = f.string().enum(S).lock(),
|
|
506
|
+
}, C = f.string().enum(S).lock(), Ue = S, w = C, We = {
|
|
506
507
|
UserId: "user_id",
|
|
507
508
|
RoleId: "role_id"
|
|
508
|
-
},
|
|
509
|
+
}, Ge = f.string().enum(We).lock(), Ke = {
|
|
509
510
|
None: "none",
|
|
510
511
|
Daily: "daily",
|
|
511
512
|
Weekly: "weekly",
|
|
512
513
|
Monthly: "monthly"
|
|
513
|
-
},
|
|
514
|
+
}, qe = f.string().enum(Ke).lock(), T = {
|
|
514
515
|
Preregister: "preregister",
|
|
515
516
|
Lottery: "lottery",
|
|
516
517
|
Survey: "survey",
|
|
@@ -536,7 +537,7 @@ var m = "gamer_token", se = class {
|
|
|
536
537
|
UgcLike: "ugc_like",
|
|
537
538
|
Redeem: "redeem",
|
|
538
539
|
Referral: "referral"
|
|
539
|
-
},
|
|
540
|
+
}, Je = f.string().enum(T).lock(), Ye = {
|
|
540
541
|
Active: "player_active_points",
|
|
541
542
|
Login: "player_login_days",
|
|
542
543
|
OrderAmount: "order_total_amount",
|
|
@@ -553,56 +554,56 @@ var m = "gamer_token", se = class {
|
|
|
553
554
|
TeamSize: "team_size",
|
|
554
555
|
UserGroup: "user_group",
|
|
555
556
|
engagementCount: "engagement_count"
|
|
556
|
-
}, E = f.string().enum(
|
|
557
|
+
}, E = f.string().enum(Ye).lock(), Xe = {
|
|
557
558
|
System: "system",
|
|
558
559
|
UserSubmission: "user_submission",
|
|
559
560
|
Shortlisted: "shortlisted"
|
|
560
|
-
},
|
|
561
|
+
}, Ze = f.string().enum(Xe).lock(), D = {
|
|
561
562
|
Ineligible: "ineligible",
|
|
562
563
|
Unclaimed: "unclaimed",
|
|
563
564
|
Received: "received",
|
|
564
565
|
Failed: "failed",
|
|
565
566
|
Delivered: "delivered"
|
|
566
|
-
}, O = f.string().enum(D).lock(),
|
|
567
|
+
}, O = f.string().enum(D).lock(), Qe = {
|
|
567
568
|
Ineligible: D.Ineligible,
|
|
568
569
|
Unclaimed: D.Unclaimed,
|
|
569
570
|
Received: D.Received,
|
|
570
571
|
Failed: D.Failed,
|
|
571
572
|
Delivered: D.Delivered
|
|
572
|
-
}, k = f.string().enum(
|
|
573
|
+
}, k = f.string().enum(Qe).lock(), $e = {
|
|
573
574
|
Output: "output",
|
|
574
575
|
Engage: "engage"
|
|
575
|
-
}, A = f.string().enum(
|
|
576
|
+
}, A = f.string().enum($e).lock(), et = {
|
|
576
577
|
Private: "private",
|
|
577
578
|
Public: "public"
|
|
578
|
-
},
|
|
579
|
+
}, tt = f.string().enum(et).lock(), j = {
|
|
579
580
|
Unknown: "unknown",
|
|
580
581
|
Pending: "pending",
|
|
581
582
|
Drawn: "drawn",
|
|
582
583
|
Claimed: "claimed",
|
|
583
584
|
Fail: "fail"
|
|
584
|
-
},
|
|
585
|
+
}, nt = f.string().enum(j).lock(), rt = {
|
|
585
586
|
Assemble: "assemble",
|
|
586
587
|
Join: "join",
|
|
587
588
|
Disband: "disband",
|
|
588
589
|
ChangeVisibility: "change_visibility",
|
|
589
590
|
Query: "query"
|
|
590
|
-
},
|
|
591
|
+
}, it = f.string().enum(rt).lock(), at = {
|
|
591
592
|
ReferralCode: "referral_code",
|
|
592
593
|
Join: "join",
|
|
593
594
|
Query: "query"
|
|
594
|
-
},
|
|
595
|
+
}, ot = f.string().enum(at).lock(), st = {
|
|
595
596
|
Query: "query",
|
|
596
597
|
Draw: "draw",
|
|
597
598
|
Claim: "claim"
|
|
598
|
-
},
|
|
599
|
+
}, ct = f.string().enum(st).lock(), lt = {
|
|
599
600
|
Sum: "sum",
|
|
600
601
|
TopN: "top_n"
|
|
601
|
-
},
|
|
602
|
+
}, ut = f.string().enum(lt).lock(), dt = {
|
|
602
603
|
None: "none",
|
|
603
604
|
Winner: "winner",
|
|
604
605
|
Consolation: "consolation"
|
|
605
|
-
},
|
|
606
|
+
}, ft = f.string().enum(dt).lock(), pt = {
|
|
606
607
|
Douyin: "douyin",
|
|
607
608
|
Xiaohongshu: "xiaohongshu",
|
|
608
609
|
Taptap: "taptap",
|
|
@@ -611,67 +612,67 @@ var m = "gamer_token", se = class {
|
|
|
611
612
|
Huya: "huya",
|
|
612
613
|
Douyu: "douyu",
|
|
613
614
|
Kuaishou: "kuaishou"
|
|
614
|
-
}, M = f.string().enum(
|
|
615
|
+
}, M = f.string().enum(pt).lock(), mt = {
|
|
615
616
|
Submitted: "submitted",
|
|
616
617
|
Accepted: "accepted",
|
|
617
618
|
Rejected: "rejected"
|
|
618
|
-
},
|
|
619
|
+
}, ht = f.string().enum(mt).lock(), gt = f.string().enum(S), N = f.object({
|
|
619
620
|
reward_item_id: f.number(),
|
|
620
621
|
reward_amount: f.number(),
|
|
621
622
|
reward_item_name: f.string(),
|
|
622
623
|
reward_item_icon_url: f.string(),
|
|
623
624
|
reward_item_desc: f.string().optional(),
|
|
624
|
-
reward_item_type:
|
|
625
|
+
reward_item_type: gt,
|
|
625
626
|
reward_item_rating: f.number()
|
|
626
|
-
}).lock(),
|
|
627
|
+
}).lock(), _t = f.object({
|
|
627
628
|
engage_count: f.number(),
|
|
628
629
|
rewards: f.array(N)
|
|
629
|
-
}).lock(),
|
|
630
|
+
}).lock(), vt = f.union(f.object({
|
|
630
631
|
feature_reward_type: f.string().enum("every"),
|
|
631
632
|
reward_details: f.array(N)
|
|
632
633
|
}), f.object({
|
|
633
634
|
feature_reward_type: f.string().enum("regular"),
|
|
634
|
-
reward_details: f.array(
|
|
635
|
+
reward_details: f.array(_t)
|
|
635
636
|
})).satisfies().lock(), P = f.object({
|
|
636
637
|
feature_name: f.string(),
|
|
637
638
|
feature_id: f.number(),
|
|
638
639
|
description: f.string(),
|
|
639
|
-
cycle:
|
|
640
|
+
cycle: qe,
|
|
640
641
|
cycle_limit: f.number(),
|
|
641
642
|
limit: f.number(),
|
|
642
643
|
since: f.number(),
|
|
643
644
|
until: f.number(),
|
|
644
|
-
engage_account:
|
|
645
|
-
feature_rewards:
|
|
645
|
+
engage_account: Ge,
|
|
646
|
+
feature_rewards: vt.clone().optional(),
|
|
646
647
|
sort: f.number().optional()
|
|
647
|
-
}),
|
|
648
|
+
}), yt = T.Cashback, bt = f.object({
|
|
648
649
|
...P.shape,
|
|
649
|
-
feature_type: f.string().enum(
|
|
650
|
+
feature_type: f.string().enum(yt),
|
|
650
651
|
config: f.object({
|
|
651
652
|
order_start_time: f.number(),
|
|
652
653
|
order_end_time: f.number(),
|
|
653
654
|
claim_rewards_start_time: f.number(),
|
|
654
655
|
claim_rewards_end_time: f.number()
|
|
655
656
|
})
|
|
656
|
-
}),
|
|
657
|
+
}), xt = T.CheckIn, St = f.object({
|
|
657
658
|
...P.shape,
|
|
658
|
-
feature_type: f.string().enum(
|
|
659
|
-
}),
|
|
659
|
+
feature_type: f.string().enum(xt)
|
|
660
|
+
}), Ct = T.ClaimActivationKey, wt = f.object({
|
|
660
661
|
...P.shape,
|
|
661
|
-
feature_type: f.string().enum(
|
|
662
|
-
}),
|
|
662
|
+
feature_type: f.string().enum(Ct)
|
|
663
|
+
}), Tt = T.ClaimRewards, Et = f.object({
|
|
663
664
|
...P.shape,
|
|
664
|
-
feature_type: f.string().enum(
|
|
665
|
-
}),
|
|
665
|
+
feature_type: f.string().enum(Tt)
|
|
666
|
+
}), Dt = T.Comment, Ot = f.object({
|
|
666
667
|
...P.shape,
|
|
667
|
-
feature_type: f.string().enum(
|
|
668
|
+
feature_type: f.string().enum(Dt),
|
|
668
669
|
config: f.object({
|
|
669
670
|
comments: f.array(f.string()),
|
|
670
671
|
send_rate: f.number()
|
|
671
672
|
})
|
|
672
|
-
}),
|
|
673
|
+
}), kt = T.Follow, At = f.object({
|
|
673
674
|
...P.shape,
|
|
674
|
-
feature_type: f.string().enum(
|
|
675
|
+
feature_type: f.string().enum(kt),
|
|
675
676
|
config: f.object({
|
|
676
677
|
platform: f.string(),
|
|
677
678
|
platform_icon: f.string().optional(),
|
|
@@ -679,65 +680,65 @@ var m = "gamer_token", se = class {
|
|
|
679
680
|
qr_code_url: f.string().optional(),
|
|
680
681
|
platform_desc: f.string().optional()
|
|
681
682
|
})
|
|
682
|
-
}),
|
|
683
|
+
}), jt = T.GiftCode, Mt = f.object({
|
|
683
684
|
name: f.string(),
|
|
684
685
|
icon_url: f.string(),
|
|
685
686
|
count: f.number()
|
|
686
|
-
}),
|
|
687
|
+
}), Nt = f.object({
|
|
687
688
|
...P.shape,
|
|
688
|
-
feature_type: f.string().enum(
|
|
689
|
+
feature_type: f.string().enum(jt),
|
|
689
690
|
config: f.object({
|
|
690
|
-
gift_items: f.array(
|
|
691
|
+
gift_items: f.array(Mt),
|
|
691
692
|
mp_url: f.string().optional(),
|
|
692
693
|
mp_qrcode_url: f.string().optional()
|
|
693
694
|
})
|
|
694
|
-
}),
|
|
695
|
+
}), Pt = T.Invite, Ft = f.object({
|
|
695
696
|
...P.shape,
|
|
696
|
-
feature_type: f.string().enum(
|
|
697
|
+
feature_type: f.string().enum(Pt),
|
|
697
698
|
config: f.object({ share_url: f.string() })
|
|
698
|
-
}),
|
|
699
|
+
}), It = T.InvitedRegister, Lt = f.object({
|
|
699
700
|
...P.shape,
|
|
700
|
-
feature_type: f.string().enum(
|
|
701
|
-
}),
|
|
701
|
+
feature_type: f.string().enum(It)
|
|
702
|
+
}), Rt = f.string().enum(r(S, "GiftCode", "LotteryTicket")), zt = T.Lottery, Bt = f.object({
|
|
702
703
|
reward_item_id: f.number(),
|
|
703
704
|
reward_item_name: f.string(),
|
|
704
|
-
reward_item_type:
|
|
705
|
+
reward_item_type: Rt,
|
|
705
706
|
reward_item_icon_url: f.string(),
|
|
706
707
|
reward_item_desc: f.string().optional(),
|
|
707
708
|
reward_amount: f.number(),
|
|
708
709
|
reward_remaining_stock: f.number(),
|
|
709
710
|
reward_item_rating: f.number()
|
|
710
|
-
}),
|
|
711
|
+
}), Vt = f.object({
|
|
711
712
|
...P.shape,
|
|
712
|
-
feature_type: f.string().enum(
|
|
713
|
+
feature_type: f.string().enum(zt),
|
|
713
714
|
config: f.object({
|
|
714
715
|
consume_item_id: f.number(),
|
|
715
716
|
consume_item_name: f.string(),
|
|
716
717
|
consume_item_icon_url: f.string(),
|
|
717
718
|
consume_item_count: f.array(f.number()),
|
|
718
719
|
consume_item_desc: f.string().optional(),
|
|
719
|
-
rewards: f.array(
|
|
720
|
+
rewards: f.array(Bt)
|
|
720
721
|
})
|
|
721
|
-
}),
|
|
722
|
+
}), Ht = T.LotteryDraw, Ut = f.object({
|
|
722
723
|
...P.shape,
|
|
723
|
-
feature_type: f.string().enum(
|
|
724
|
+
feature_type: f.string().enum(Ht),
|
|
724
725
|
config: f.object({
|
|
725
726
|
draw_not_before: f.number(),
|
|
726
727
|
draw_not_after: f.number()
|
|
727
728
|
})
|
|
728
|
-
}),
|
|
729
|
+
}), Wt = T.Preregister, Gt = f.object({
|
|
729
730
|
...P.shape,
|
|
730
|
-
feature_type: f.string().enum(
|
|
731
|
-
}),
|
|
731
|
+
feature_type: f.string().enum(Wt)
|
|
732
|
+
}), Kt = T.Quest, qt = f.object({
|
|
732
733
|
...P.shape,
|
|
733
|
-
feature_type: f.string().enum(
|
|
734
|
+
feature_type: f.string().enum(Kt),
|
|
734
735
|
config: f.object({
|
|
735
736
|
objective: E,
|
|
736
737
|
completion_value: f.number(),
|
|
737
738
|
team: f.object({
|
|
738
739
|
feature_id: f.number().optional(),
|
|
739
740
|
completion_value: f.number(),
|
|
740
|
-
progress_algorithm:
|
|
741
|
+
progress_algorithm: ut.clone().optional(),
|
|
741
742
|
top_n: f.number().optional()
|
|
742
743
|
}).optional(),
|
|
743
744
|
config: f.object({
|
|
@@ -747,68 +748,68 @@ var m = "gamer_token", se = class {
|
|
|
747
748
|
event_item_id: f.number().optional()
|
|
748
749
|
}).optional()
|
|
749
750
|
})
|
|
750
|
-
}),
|
|
751
|
+
}), Jt = T.Redeem, Yt = f.object({
|
|
751
752
|
price: f.number(),
|
|
752
753
|
per_user_limit: f.number(),
|
|
753
754
|
item: N
|
|
754
|
-
}),
|
|
755
|
+
}), Xt = f.object({
|
|
755
756
|
...P.shape,
|
|
756
|
-
feature_type: f.string().enum(
|
|
757
|
+
feature_type: f.string().enum(Jt),
|
|
757
758
|
config: f.object({
|
|
758
759
|
event_item_id: f.number(),
|
|
759
|
-
redeem_catalog: f.array(
|
|
760
|
+
redeem_catalog: f.array(Yt)
|
|
760
761
|
})
|
|
761
|
-
}),
|
|
762
|
+
}), Zt = T.Referral, Qt = f.object({
|
|
762
763
|
required_invitees: f.number(),
|
|
763
764
|
rewards: f.array(N)
|
|
764
|
-
}),
|
|
765
|
+
}), $t = f.object({
|
|
765
766
|
...P.shape,
|
|
766
|
-
feature_type: f.string().enum(
|
|
767
|
+
feature_type: f.string().enum(Zt),
|
|
767
768
|
config: f.object({
|
|
768
769
|
max_recent_invitees: f.number(),
|
|
769
|
-
referral_tiers: f.array(
|
|
770
|
+
referral_tiers: f.array(Qt).optional()
|
|
770
771
|
})
|
|
771
|
-
}),
|
|
772
|
+
}), en = T.Register, tn = f.object({
|
|
772
773
|
...P.shape,
|
|
773
|
-
feature_type: f.string().enum(
|
|
774
|
-
}),
|
|
774
|
+
feature_type: f.string().enum(en)
|
|
775
|
+
}), nn = T.Share, rn = f.object({
|
|
775
776
|
...P.shape,
|
|
776
|
-
feature_type: f.string().enum(
|
|
777
|
+
feature_type: f.string().enum(nn),
|
|
777
778
|
config: f.object({
|
|
778
779
|
share_platform: f.string(),
|
|
779
780
|
jump_url: f.string().optional(),
|
|
780
781
|
icon_url: f.string().optional()
|
|
781
782
|
})
|
|
782
|
-
}),
|
|
783
|
+
}), an = T.Subscribe, on = f.object({
|
|
783
784
|
...P.shape,
|
|
784
|
-
feature_type: f.string().enum(
|
|
785
|
+
feature_type: f.string().enum(an),
|
|
785
786
|
config: f.object({ weixin_template_ids: f.array(f.string()) })
|
|
786
|
-
}),
|
|
787
|
+
}), sn = T.Survey, cn = f.object({
|
|
787
788
|
...P.shape,
|
|
788
|
-
feature_type: f.string().enum(
|
|
789
|
+
feature_type: f.string().enum(sn),
|
|
789
790
|
config: f.object({
|
|
790
791
|
survey_id: f.string(),
|
|
791
792
|
survey_url: f.string()
|
|
792
793
|
})
|
|
793
|
-
}),
|
|
794
|
+
}), ln = T.Team, un = f.object({
|
|
794
795
|
...P.shape,
|
|
795
|
-
feature_type: f.string().enum(
|
|
796
|
+
feature_type: f.string().enum(ln),
|
|
796
797
|
config: f.object({
|
|
797
798
|
max_members: f.number().min(1),
|
|
798
799
|
min_members: f.number().min(1)
|
|
799
800
|
})
|
|
800
|
-
}),
|
|
801
|
+
}), dn = T.Ugc, fn = f.object({
|
|
801
802
|
...P.shape,
|
|
802
|
-
feature_type: f.string().enum(
|
|
803
|
+
feature_type: f.string().enum(dn),
|
|
803
804
|
config: f.object({
|
|
804
805
|
allowed_social_medias: f.array(f.string()).optional(),
|
|
805
806
|
acceptance_rewards: f.array(N).optional()
|
|
806
807
|
})
|
|
807
|
-
}),
|
|
808
|
+
}), pn = T.UgcLike, mn = f.object({
|
|
808
809
|
...P.shape,
|
|
809
|
-
feature_type: f.string().enum(
|
|
810
|
+
feature_type: f.string().enum(pn),
|
|
810
811
|
config: f.object({ ugc_feature_id: f.number() })
|
|
811
|
-
}),
|
|
812
|
+
}), hn = T.Vote, gn = f.object({
|
|
812
813
|
sn: f.string(),
|
|
813
814
|
name: f.string(),
|
|
814
815
|
img_urls: f.array(f.string()).optional(),
|
|
@@ -818,26 +819,26 @@ var m = "gamer_token", se = class {
|
|
|
818
819
|
amount: f.number(),
|
|
819
820
|
finalists: f.bool(),
|
|
820
821
|
last_vote_time: f.number()
|
|
821
|
-
}),
|
|
822
|
+
}), _n = f.object({
|
|
822
823
|
...P.shape,
|
|
823
|
-
feature_type: f.string().enum(
|
|
824
|
+
feature_type: f.string().enum(hn),
|
|
824
825
|
config: f.object({
|
|
825
826
|
vote_feature_ids: f.array(f.number()),
|
|
826
827
|
submission_feature_ids: f.array(f.number()),
|
|
827
828
|
finalists_amount: f.number(),
|
|
828
|
-
source:
|
|
829
|
-
options: f.array(
|
|
829
|
+
source: Ze,
|
|
830
|
+
options: f.array(gn),
|
|
830
831
|
rewards: f.array(N)
|
|
831
832
|
})
|
|
832
833
|
}), F = f.union(f.string().pattern("NumberString", /^\d+$/), f.number()), I = f.object({
|
|
833
834
|
order_total_amount: F,
|
|
834
835
|
cashback_total_amount: F,
|
|
835
836
|
game_item_count: F
|
|
836
|
-
}),
|
|
837
|
+
}), vn = f.object({ activation_key: f.string().disallow("") }), yn = f.object({ gift_code: f.string() }), L = f.object({
|
|
837
838
|
user_id: f.string(),
|
|
838
839
|
name: f.string().optional(),
|
|
839
840
|
avatar_url: f.string().optional()
|
|
840
|
-
}),
|
|
841
|
+
}), bn = f.object({ lottery_count: f.number() }), R = f.object({
|
|
841
842
|
reward_id: f.number(),
|
|
842
843
|
reward_item_id: f.number(),
|
|
843
844
|
reward_source: A,
|
|
@@ -852,89 +853,89 @@ var m = "gamer_token", se = class {
|
|
|
852
853
|
event_name: f.string(),
|
|
853
854
|
feature_id: f.number(),
|
|
854
855
|
engagement_id: f.number(),
|
|
855
|
-
feature_type:
|
|
856
|
+
feature_type: Je,
|
|
856
857
|
receive_time: f.number(),
|
|
857
858
|
extra_data: f.record(f.unknown()).optional()
|
|
858
|
-
}),
|
|
859
|
+
}), xn = f.string().enum(j.Unknown, j.Pending), Sn = f.union(f.object({
|
|
859
860
|
ticket: f.string(),
|
|
860
|
-
status:
|
|
861
|
+
status: xn,
|
|
861
862
|
created_at: f.number()
|
|
862
863
|
}), f.object({
|
|
863
864
|
ticket: f.string(),
|
|
864
865
|
status: f.string().enum(r(j, "Unknown", "Pending")),
|
|
865
866
|
created_at: f.number(),
|
|
866
|
-
reward:
|
|
867
|
-
})).satisfies(),
|
|
867
|
+
reward: R
|
|
868
|
+
})).satisfies(), Cn = f.object({ tickets: f.array(Sn) }), wn = f.object({ platforms: f.array(f.string()) }), Tn = f.object({
|
|
868
869
|
role_name: f.string(),
|
|
869
870
|
is_leader: f.bool(),
|
|
870
871
|
is_myself: f.bool().optional(),
|
|
871
872
|
progress: f.number().optional(),
|
|
872
873
|
avatar_url: f.string().optional()
|
|
873
|
-
}).lock(),
|
|
874
|
+
}).lock(), En = f.object({
|
|
874
875
|
objective: E,
|
|
875
876
|
progress: f.number(),
|
|
876
877
|
completion_value: f.number().optional(),
|
|
877
878
|
team: f.object({
|
|
878
879
|
progress: f.number(),
|
|
879
880
|
completion_value: f.number().optional(),
|
|
880
|
-
players: f.array(
|
|
881
|
+
players: f.array(Tn)
|
|
881
882
|
}).optional()
|
|
882
|
-
}),
|
|
883
|
+
}), Dn = f.object({
|
|
883
884
|
progress: f.number(),
|
|
884
885
|
team: f.object({
|
|
885
886
|
progress: f.number(),
|
|
886
|
-
team_members: f.array(
|
|
887
|
+
team_members: f.array(Tn).optional()
|
|
887
888
|
}).optional()
|
|
888
|
-
}),
|
|
889
|
+
}), On = f.object({
|
|
889
890
|
item_id: f.number(),
|
|
890
891
|
item_count: f.number(),
|
|
891
892
|
redeem_count: f.number()
|
|
892
|
-
}),
|
|
893
|
+
}), kn = f.object({ item_stocks: f.array(f.object({
|
|
893
894
|
item_id: f.number(),
|
|
894
895
|
item_stock: f.number(),
|
|
895
896
|
user_limit: f.number()
|
|
896
|
-
})) }),
|
|
897
|
+
})) }), An = f.object({
|
|
897
898
|
avatar_url: f.string().optional(),
|
|
898
899
|
role_name: f.string(),
|
|
899
900
|
server_name: f.string(),
|
|
900
901
|
user_id: f.string()
|
|
901
|
-
}),
|
|
902
|
+
}), jn = f.object({
|
|
902
903
|
referral_code: f.string().optional(),
|
|
903
904
|
invitee_count: f.number().optional(),
|
|
904
|
-
invitees: f.array(
|
|
905
|
-
}),
|
|
905
|
+
invitees: f.array(An).optional()
|
|
906
|
+
}), Mn = f.object({
|
|
906
907
|
required_invitees: f.number(),
|
|
907
908
|
reward_generated: f.bool()
|
|
908
|
-
}),
|
|
909
|
+
}), Nn = f.object({
|
|
909
910
|
invitee_count: f.number().optional(),
|
|
910
|
-
generated_rewards: f.array(
|
|
911
|
-
tier_statuses: f.array(
|
|
912
|
-
}),
|
|
911
|
+
generated_rewards: f.array(R).optional(),
|
|
912
|
+
tier_statuses: f.array(Mn).optional()
|
|
913
|
+
}), Pn = f.object({ platform: f.string().optional() }), Fn = f.object({ weixin_openid: f.string() }), In = f.object({ serial_number: f.number() }), Ln = f.object({
|
|
913
914
|
team_code: f.string(),
|
|
914
915
|
leader_name: f.string(),
|
|
915
916
|
total_members: f.number()
|
|
916
|
-
}),
|
|
917
|
+
}), Rn = f.object({
|
|
917
918
|
is_leader: f.bool(),
|
|
918
919
|
is_myself: f.bool().optional(),
|
|
919
920
|
role_name: f.string(),
|
|
920
921
|
server_name: f.string(),
|
|
921
922
|
avatar_url: f.string().optional()
|
|
922
|
-
}),
|
|
923
|
+
}), zn = f.object({
|
|
923
924
|
team_code: f.string(),
|
|
924
|
-
visibility:
|
|
925
|
+
visibility: tt,
|
|
925
926
|
members: f.array(f.object({
|
|
926
927
|
is_leader: f.bool(),
|
|
927
928
|
role_name: f.string(),
|
|
928
929
|
server_name: f.string()
|
|
929
930
|
}))
|
|
930
|
-
}),
|
|
931
|
+
}), Bn = f.object({
|
|
931
932
|
ugc_id: f.number(),
|
|
932
933
|
title: f.string(),
|
|
933
934
|
content: f.string().optional(),
|
|
934
935
|
image_urls: f.array(f.string()).optional(),
|
|
935
936
|
social_media: M.clone().optional(),
|
|
936
937
|
social_media_url: f.string().optional()
|
|
937
|
-
}),
|
|
938
|
+
}), Vn = f.object({
|
|
938
939
|
ugcs: f.array(f.object({
|
|
939
940
|
ugc_id: f.number(),
|
|
940
941
|
event_id: f.number().optional(),
|
|
@@ -952,13 +953,13 @@ var m = "gamer_token", se = class {
|
|
|
952
953
|
created_at: f.number()
|
|
953
954
|
})).optional(),
|
|
954
955
|
next_token: f.string().optional()
|
|
955
|
-
}),
|
|
956
|
+
}), Hn = f.object({
|
|
956
957
|
ugcs: f.array(f.object({
|
|
957
958
|
ugc_id: f.number(),
|
|
958
959
|
event_id: f.number().optional(),
|
|
959
960
|
feature_id: f.number().optional(),
|
|
960
961
|
feature_name: f.string().optional(),
|
|
961
|
-
review_status:
|
|
962
|
+
review_status: ht,
|
|
962
963
|
reviewer_comment: f.string().optional(),
|
|
963
964
|
title: f.string(),
|
|
964
965
|
content: f.string().optional(),
|
|
@@ -973,11 +974,11 @@ var m = "gamer_token", se = class {
|
|
|
973
974
|
created_at: f.number()
|
|
974
975
|
})).optional(),
|
|
975
976
|
next_token: f.string().optional()
|
|
976
|
-
}),
|
|
977
|
+
}), Un = f.object({ total_count: f.number() }), Wn = f.object({
|
|
977
978
|
existed: f.bool(),
|
|
978
979
|
upload_url: f.string().optional(),
|
|
979
980
|
image_url: f.string()
|
|
980
|
-
}),
|
|
981
|
+
}), Gn = f.object({ ugcs: f.array(f.object({
|
|
981
982
|
ugc_id: f.number(),
|
|
982
983
|
rank: f.number(),
|
|
983
984
|
total_likes: f.number(),
|
|
@@ -986,32 +987,32 @@ var m = "gamer_token", se = class {
|
|
|
986
987
|
server_name: f.string().optional(),
|
|
987
988
|
role_id: f.string().optional(),
|
|
988
989
|
role_name: f.string().optional()
|
|
989
|
-
})).optional() }),
|
|
990
|
+
})).optional() }), Kn = f.object({ option_sn: f.string() }), qn = f.object({
|
|
990
991
|
candidate_id: f.string(),
|
|
991
992
|
total_votes: f.number().optional(),
|
|
992
993
|
my_votes: f.number().optional(),
|
|
993
994
|
cycle_votes: f.number().optional(),
|
|
994
995
|
votes: f.number().optional()
|
|
996
|
+
}), Jn = f.object({
|
|
997
|
+
rewards_type: ft,
|
|
998
|
+
rewards: f.array(R).optional()
|
|
995
999
|
}), Yn = f.object({
|
|
996
|
-
rewards_type: pt,
|
|
997
|
-
rewards: f.array(L).optional()
|
|
998
|
-
}), Xn = f.object({
|
|
999
1000
|
candidate_id: f.string(),
|
|
1000
1001
|
is_winner: f.bool(),
|
|
1001
1002
|
total_votes: f.number(),
|
|
1002
1003
|
my_votes: f.number(),
|
|
1003
1004
|
cycle_votes: f.number().optional()
|
|
1004
|
-
}),
|
|
1005
|
+
}), Xn = f.object({
|
|
1005
1006
|
role: f.string(),
|
|
1006
1007
|
content: f.string()
|
|
1007
|
-
}),
|
|
1008
|
+
}), Zn = f.object({ conversations: f.array(Xn) }), Qn = f.object({
|
|
1008
1009
|
user_id: f.string(),
|
|
1009
1010
|
name: f.string(),
|
|
1010
1011
|
avatar_url: f.string(),
|
|
1011
1012
|
comment: f.string(),
|
|
1012
1013
|
video_note: f.number(),
|
|
1013
1014
|
created_at: f.number()
|
|
1014
|
-
}), z = f.union(
|
|
1015
|
+
}), z = f.union(wn, bn, In, L, Pn, Kn, qn, Fn, I, yn, zn, En, Cn, vn, Zn, Bn, On, jn, f.custom("EmptyObject", (e) => t(e) && Object.keys(e).length === 0)).satisfies().lock(), $n = f.object({
|
|
1015
1016
|
reward_id: f.number(),
|
|
1016
1017
|
reward_item_id: f.number(),
|
|
1017
1018
|
reward_item_type: w,
|
|
@@ -1024,7 +1025,7 @@ var m = "gamer_token", se = class {
|
|
|
1024
1025
|
reward_item_rating: f.number(),
|
|
1025
1026
|
receive_time: f.number(),
|
|
1026
1027
|
extra_data: f.union(...z.validators, f.record(f.unknown())).satisfies().optional()
|
|
1027
|
-
}),
|
|
1028
|
+
}), er = f.object({
|
|
1028
1029
|
reward_id: f.number(),
|
|
1029
1030
|
reward_item_id: f.number(),
|
|
1030
1031
|
reward_item_name: f.string(),
|
|
@@ -1036,7 +1037,7 @@ var m = "gamer_token", se = class {
|
|
|
1036
1037
|
reward_status: O,
|
|
1037
1038
|
reward_source: A,
|
|
1038
1039
|
extra_data: f.record(f.unknown()).optional()
|
|
1039
|
-
}),
|
|
1040
|
+
}), tr = f.object({
|
|
1040
1041
|
engagement_id: f.number(),
|
|
1041
1042
|
user_id: f.string(),
|
|
1042
1043
|
event_id: f.number(),
|
|
@@ -1046,11 +1047,11 @@ var m = "gamer_token", se = class {
|
|
|
1046
1047
|
server_id: f.string().optional(),
|
|
1047
1048
|
role_id: f.string().optional(),
|
|
1048
1049
|
created_at: f.number(),
|
|
1049
|
-
rewards: f.array(
|
|
1050
|
-
}).lock(),
|
|
1050
|
+
rewards: f.array($n).optional()
|
|
1051
|
+
}).lock(), nr = f.object({
|
|
1051
1052
|
allowed: f.bool(),
|
|
1052
1053
|
registered: f.bool()
|
|
1053
|
-
}),
|
|
1054
|
+
}), rr = f.object({
|
|
1054
1055
|
feature_id: f.number(),
|
|
1055
1056
|
can_engage: f.bool(),
|
|
1056
1057
|
has_unclaimed_rewards: f.bool(),
|
|
@@ -1062,7 +1063,7 @@ var m = "gamer_token", se = class {
|
|
|
1062
1063
|
action_type: f.string(),
|
|
1063
1064
|
allowed: f.bool()
|
|
1064
1065
|
})).optional()
|
|
1065
|
-
}),
|
|
1066
|
+
}), ir = f.object({
|
|
1066
1067
|
engagement_id: f.number(),
|
|
1067
1068
|
engagement: f.object({
|
|
1068
1069
|
engagement_id: f.number(),
|
|
@@ -1070,24 +1071,24 @@ var m = "gamer_token", se = class {
|
|
|
1070
1071
|
feature_id: f.number(),
|
|
1071
1072
|
data: z.clone().optional()
|
|
1072
1073
|
}).optional(),
|
|
1073
|
-
rewards: f.array(
|
|
1074
|
+
rewards: f.array(er).optional(),
|
|
1074
1075
|
scan: f.bool().optional()
|
|
1075
|
-
}),
|
|
1076
|
+
}), ar = f.object({
|
|
1076
1077
|
reward_id: f.number(),
|
|
1077
1078
|
reward_status: k
|
|
1078
|
-
}),
|
|
1079
|
+
}), or = T.Vote2, sr = f.object({
|
|
1079
1080
|
candidate_id: f.string(),
|
|
1080
1081
|
display_name: f.string(),
|
|
1081
1082
|
images: f.array(f.string()).optional(),
|
|
1082
1083
|
videos: f.array(f.string()).optional(),
|
|
1083
1084
|
description: f.string().optional(),
|
|
1084
1085
|
jump_url: f.string()
|
|
1085
|
-
}),
|
|
1086
|
+
}), cr = f.object({
|
|
1086
1087
|
...P.shape,
|
|
1087
|
-
feature_type: f.string().enum(
|
|
1088
|
+
feature_type: f.string().enum(or),
|
|
1088
1089
|
config: f.object({
|
|
1089
1090
|
vote_item_id: f.number().optional(),
|
|
1090
|
-
candidates: f.array(
|
|
1091
|
+
candidates: f.array(sr),
|
|
1091
1092
|
vote_since: f.number(),
|
|
1092
1093
|
vote_until: f.number(),
|
|
1093
1094
|
rewards_since: f.number(),
|
|
@@ -1096,83 +1097,83 @@ var m = "gamer_token", se = class {
|
|
|
1096
1097
|
consolation_rewards: f.array(N).optional(),
|
|
1097
1098
|
max_votes_per_user_per_candidate_per_cycle: f.number().optional()
|
|
1098
1099
|
})
|
|
1099
|
-
}),
|
|
1100
|
+
}), lr = T.ZeroChatgpt, ur = f.object({
|
|
1100
1101
|
...P.shape,
|
|
1101
|
-
feature_type: f.string().enum(
|
|
1102
|
-
}),
|
|
1102
|
+
feature_type: f.string().enum(lr)
|
|
1103
|
+
}), dr = f.union(bt, St, Et, Ot, At, Nt, Ft, Lt, Vt, Ut, Gt, qt, tn, rn, on, cn, un, _n, cr, wt, ur, fn, mn, Xt, $t).key("feature_type").satisfies(), fr = f.object({
|
|
1103
1104
|
event_name: f.string(),
|
|
1104
1105
|
rules: f.string(),
|
|
1105
1106
|
since: f.number(),
|
|
1106
1107
|
until: f.number(),
|
|
1107
1108
|
visit_count: f.number().optional(),
|
|
1108
|
-
features: f.array(
|
|
1109
|
-
}).lock(),
|
|
1110
|
-
engagements: f.array(
|
|
1109
|
+
features: f.array(dr)
|
|
1110
|
+
}).lock(), pr = f.guard(fr), mr = f.guard(nr), B = d({ count: f.number() }), hr = d({ first_visit: f.bool() }), gr = d({ engagements: f.union(f.array(Qn), f.array(Ln)) }), _r = d({ status: f.array(rr) }), vr = d({ engagements_counts: f.record(f.number()) }), yr = d({
|
|
1111
|
+
engagements: f.array(tr),
|
|
1111
1112
|
next_token: f.string().optional()
|
|
1112
|
-
}),
|
|
1113
|
-
user_rewards: f.array(
|
|
1113
|
+
}), br = f.guard(ir), xr = d({ claimed_items: f.array(ar) }), Sr = d({ rewards: f.array(R) }), Cr = d({ reward_status: k }), wr = d({
|
|
1114
|
+
user_rewards: f.array(R),
|
|
1114
1115
|
next_token: f.string().optional()
|
|
1115
|
-
}),
|
|
1116
|
+
}), Tr = d({ unclaimed: f.number() }), Er = d({ scene: f.string() }), Dr = d({ params: f.string() }), Or = d({ img: f.string() }), kr = f.guard(Dn), Ar = f.guard(Jn), jr = f.guard(f.object({ candidate_votes: f.array(Yn) })), Mr = f.guard(I), Nr = f.guard(Hn), Pr = f.guard(Vn), Fr = f.guard(Un), Ir = f.guard(Wn), Lr = f.guard(Gn), Rr = f.guard(kn), zr = f.guard(Nn);
|
|
1116
1117
|
//#endregion
|
|
1117
1118
|
//#region src/event.methods.ts
|
|
1118
|
-
async function
|
|
1119
|
+
async function Br(e, t, n) {
|
|
1119
1120
|
let { data: r } = await this.req.get("verify-mobile-allowed", {
|
|
1120
1121
|
game_id: e,
|
|
1121
1122
|
mobile: t
|
|
1122
|
-
},
|
|
1123
|
+
}, mr, n);
|
|
1123
1124
|
return r;
|
|
1124
1125
|
}
|
|
1125
|
-
async function
|
|
1126
|
-
let { data: t } = await this.req.get(`event/${this.event}/event-config`, null,
|
|
1126
|
+
async function Vr(e) {
|
|
1127
|
+
let { data: t } = await this.req.get(`event/${this.event}/event-config`, null, pr, e);
|
|
1127
1128
|
return t;
|
|
1128
1129
|
}
|
|
1129
|
-
async function
|
|
1130
|
+
async function Hr(e, t) {
|
|
1130
1131
|
let { data: n } = await this.req.get(`event/${this.event}/feature-engagement-count`, {
|
|
1131
1132
|
feature_id: e,
|
|
1132
1133
|
type: "user"
|
|
1133
1134
|
}, B, t);
|
|
1134
1135
|
return n?.count ?? null;
|
|
1135
1136
|
}
|
|
1136
|
-
async function
|
|
1137
|
+
async function Ur(e, t) {
|
|
1137
1138
|
let { data: n } = await this.req.get(`event/${this.event}/feature-engagement-count`, {
|
|
1138
1139
|
feature_id: e,
|
|
1139
1140
|
type: "engagement"
|
|
1140
1141
|
}, B, t);
|
|
1141
1142
|
return n?.count ?? null;
|
|
1142
1143
|
}
|
|
1143
|
-
async function
|
|
1144
|
-
let { data: n } = await this.req.get(`event/${this.event}/feature-engagements`, { feature_id: e },
|
|
1144
|
+
async function Wr(e, t) {
|
|
1145
|
+
let { data: n } = await this.req.get(`event/${this.event}/feature-engagements`, { feature_id: e }, gr, t);
|
|
1145
1146
|
return n?.engagements || [];
|
|
1146
1147
|
}
|
|
1147
|
-
async function
|
|
1148
|
+
async function Gr(e, t) {
|
|
1148
1149
|
await this.token.autoLogin();
|
|
1149
|
-
let { data: n, code: r, message: i } = await this.req.post(`event/${this.event}/visit`, a(e || {}),
|
|
1150
|
+
let { data: n, code: r, message: i } = await this.req.post(`event/${this.event}/visit`, a(e || {}), hr, t);
|
|
1150
1151
|
return n ?? {
|
|
1151
1152
|
message: i,
|
|
1152
1153
|
error: r
|
|
1153
1154
|
};
|
|
1154
1155
|
}
|
|
1155
|
-
async function
|
|
1156
|
+
async function Kr(e, t) {
|
|
1156
1157
|
if (!await this.token.autoLogin()) return [];
|
|
1157
1158
|
let { data: n } = await this.req.get("event/user-feature-status", {
|
|
1158
1159
|
...e,
|
|
1159
1160
|
event_id: this.event
|
|
1160
|
-
},
|
|
1161
|
+
}, _r, {
|
|
1161
1162
|
...t,
|
|
1162
1163
|
message: !1
|
|
1163
1164
|
});
|
|
1164
1165
|
return n?.status || [];
|
|
1165
1166
|
}
|
|
1166
|
-
async function
|
|
1167
|
+
async function qr(e, t) {
|
|
1167
1168
|
if (!await this.token.autoLogin()) return {};
|
|
1168
1169
|
let { data: n } = await this.req.get("event/user-engagements-count", {
|
|
1169
1170
|
...t,
|
|
1170
1171
|
event_id: this.event,
|
|
1171
1172
|
feature_id: e
|
|
1172
|
-
},
|
|
1173
|
+
}, vr, { message: !1 });
|
|
1173
1174
|
return n?.engagements_counts || {};
|
|
1174
1175
|
}
|
|
1175
|
-
async function
|
|
1176
|
+
async function Jr(e, t, n) {
|
|
1176
1177
|
if (!await this.token.autoLogin()) return {
|
|
1177
1178
|
engagements: [],
|
|
1178
1179
|
next_token: ""
|
|
@@ -1182,36 +1183,36 @@ async function Yr(e, t, n) {
|
|
|
1182
1183
|
...t,
|
|
1183
1184
|
event_id: this.event,
|
|
1184
1185
|
feature_id: e
|
|
1185
|
-
},
|
|
1186
|
+
}, yr, n);
|
|
1186
1187
|
return {
|
|
1187
1188
|
engagements: r?.engagements || [],
|
|
1188
1189
|
next_token: r?.next_token || ""
|
|
1189
1190
|
};
|
|
1190
1191
|
}
|
|
1191
|
-
async function
|
|
1192
|
+
async function Yr(e, t, n, r) {
|
|
1192
1193
|
await this.token.autoLogin();
|
|
1193
1194
|
let { data: i, code: o, message: s } = await this.req.post(`event/${this.event}/engage`, a({
|
|
1194
1195
|
feature_id: e,
|
|
1195
1196
|
engagement: t,
|
|
1196
1197
|
...n
|
|
1197
|
-
}),
|
|
1198
|
+
}), br, r);
|
|
1198
1199
|
return i ?? {
|
|
1199
1200
|
message: s,
|
|
1200
1201
|
error: o
|
|
1201
1202
|
};
|
|
1202
1203
|
}
|
|
1203
|
-
async function
|
|
1204
|
+
async function Xr(e, t) {
|
|
1204
1205
|
await this.token.autoLogin();
|
|
1205
1206
|
let { data: n, code: r, message: i } = await this.req.post("event/claim-rewards", a({
|
|
1206
1207
|
...e,
|
|
1207
1208
|
server_id: e.server_id ? +e.server_id : void 0
|
|
1208
|
-
}),
|
|
1209
|
+
}), xr, t);
|
|
1209
1210
|
return n?.claimed_items || {
|
|
1210
1211
|
message: i,
|
|
1211
1212
|
error: r
|
|
1212
1213
|
};
|
|
1213
1214
|
}
|
|
1214
|
-
async function
|
|
1215
|
+
async function Zr(e, t) {
|
|
1215
1216
|
if (!await this.token.autoLogin()) return null;
|
|
1216
1217
|
let { ok: n, code: r, message: i } = await this.req.post(`event/${this.event}/user-reward-address`, e, null, t);
|
|
1217
1218
|
return n || {
|
|
@@ -1219,23 +1220,23 @@ async function Qr(e, t) {
|
|
|
1219
1220
|
error: r
|
|
1220
1221
|
};
|
|
1221
1222
|
}
|
|
1222
|
-
async function
|
|
1223
|
+
async function Qr(e, t) {
|
|
1223
1224
|
if (!await this.token.autoLogin()) return null;
|
|
1224
|
-
let { data: n } = await this.req.get("event/unlimit-qrcode-scene", { params: e },
|
|
1225
|
+
let { data: n } = await this.req.get("event/unlimit-qrcode-scene", { params: e }, Er, t);
|
|
1225
1226
|
return n?.scene ?? null;
|
|
1226
1227
|
}
|
|
1227
|
-
async function
|
|
1228
|
-
let { data: n } = await this.req.get("event/params-by-qrcode-scene", { scene: e },
|
|
1228
|
+
async function $r(e, t) {
|
|
1229
|
+
let { data: n } = await this.req.get("event/params-by-qrcode-scene", { scene: e }, Dr, t);
|
|
1229
1230
|
return n?.params ?? null;
|
|
1230
1231
|
}
|
|
1231
|
-
async function
|
|
1232
|
+
async function ei(e, t) {
|
|
1232
1233
|
if (!await this.token.autoLogin()) return null;
|
|
1233
|
-
let { data: n } = await this.req.post("event/unlimit-qrcode", a(e),
|
|
1234
|
+
let { data: n } = await this.req.post("event/unlimit-qrcode", a(e), Or, t);
|
|
1234
1235
|
return n?.img ?? null;
|
|
1235
1236
|
}
|
|
1236
|
-
async function
|
|
1237
|
+
async function ti(e, t) {
|
|
1237
1238
|
if (!await this.token.autoLogin()) return null;
|
|
1238
|
-
let { data: n, code: r, message: i } = await this.req.get(`event/${this.event}/quest-progress`, { feature_id: e },
|
|
1239
|
+
let { data: n, code: r, message: i } = await this.req.get(`event/${this.event}/quest-progress`, { feature_id: e }, kr, {
|
|
1239
1240
|
message: !1,
|
|
1240
1241
|
...t
|
|
1241
1242
|
});
|
|
@@ -1244,75 +1245,75 @@ async function ni(e, t) {
|
|
|
1244
1245
|
error: r
|
|
1245
1246
|
};
|
|
1246
1247
|
}
|
|
1247
|
-
async function
|
|
1248
|
+
async function ni(e, t) {
|
|
1248
1249
|
if (!await this.token.autoLogin()) return null;
|
|
1249
1250
|
let { data: n, code: r, message: i } = await this.req.post("event/vote2/rewards", {
|
|
1250
1251
|
feature_id: e,
|
|
1251
1252
|
event_id: this.event
|
|
1252
|
-
},
|
|
1253
|
+
}, Ar, t);
|
|
1253
1254
|
return n || {
|
|
1254
1255
|
message: i,
|
|
1255
1256
|
code: r
|
|
1256
1257
|
};
|
|
1257
1258
|
}
|
|
1258
|
-
async function
|
|
1259
|
+
async function ri(e, t) {
|
|
1259
1260
|
if (!await this.token.autoLogin()) return [];
|
|
1260
1261
|
let { data: n } = await this.req.get("event/vote2/leaderboard", {
|
|
1261
1262
|
feature_id: e,
|
|
1262
1263
|
event_id: this.event
|
|
1263
|
-
},
|
|
1264
|
+
}, jr, t);
|
|
1264
1265
|
return n?.candidate_votes || [];
|
|
1265
1266
|
}
|
|
1266
|
-
async function
|
|
1267
|
+
async function ii(e, t) {
|
|
1267
1268
|
if (!await this.token.autoLogin()) return null;
|
|
1268
1269
|
let { data: n, code: r, message: i } = await this.req.get("event/cashback/query", {
|
|
1269
1270
|
feature_id: e,
|
|
1270
1271
|
event_id: this.event
|
|
1271
|
-
},
|
|
1272
|
+
}, Mr, t);
|
|
1272
1273
|
return n || {
|
|
1273
1274
|
message: i,
|
|
1274
1275
|
error: r
|
|
1275
1276
|
};
|
|
1276
1277
|
}
|
|
1277
|
-
async function
|
|
1278
|
+
async function ai(e, t) {
|
|
1278
1279
|
if (!await this.token.autoLogin()) return null;
|
|
1279
1280
|
let { data: n, code: r, message: i } = await this.req.get("event/ugc/my", {
|
|
1280
1281
|
max_results: 20,
|
|
1281
1282
|
...e
|
|
1282
|
-
},
|
|
1283
|
+
}, Nr, t);
|
|
1283
1284
|
return n || {
|
|
1284
1285
|
message: i,
|
|
1285
1286
|
error: r
|
|
1286
1287
|
};
|
|
1287
1288
|
}
|
|
1288
|
-
async function
|
|
1289
|
+
async function oi(e, t) {
|
|
1289
1290
|
if (!await this.token.autoLogin()) return null;
|
|
1290
|
-
let { data: n, code: r, message: i } = await this.req.get("event/ugc/my-count", { ...e },
|
|
1291
|
+
let { data: n, code: r, message: i } = await this.req.get("event/ugc/my-count", { ...e }, Fr, t);
|
|
1291
1292
|
return n || {
|
|
1292
1293
|
message: i,
|
|
1293
1294
|
error: r
|
|
1294
1295
|
};
|
|
1295
1296
|
}
|
|
1296
|
-
async function
|
|
1297
|
+
async function si(e, t) {
|
|
1297
1298
|
await this.token.autoLogin();
|
|
1298
1299
|
let { data: n, code: r, message: i } = await this.req.post("event/claim-rewards-v2", a({
|
|
1299
1300
|
...e,
|
|
1300
1301
|
server_id: e.server_id ? +e.server_id : void 0
|
|
1301
|
-
}),
|
|
1302
|
+
}), Sr, t);
|
|
1302
1303
|
return n?.rewards || {
|
|
1303
1304
|
message: i,
|
|
1304
1305
|
error: r
|
|
1305
1306
|
};
|
|
1306
1307
|
}
|
|
1307
|
-
async function
|
|
1308
|
+
async function ci(e, t) {
|
|
1308
1309
|
await this.token.autoLogin();
|
|
1309
|
-
let { data: n, code: r, message: i } = await this.req.post("event/claim-weixin-hongbao", { reward_id: e },
|
|
1310
|
+
let { data: n, code: r, message: i } = await this.req.post("event/claim-weixin-hongbao", { reward_id: e }, Cr, t);
|
|
1310
1311
|
return n || {
|
|
1311
1312
|
message: i,
|
|
1312
1313
|
error: r
|
|
1313
1314
|
};
|
|
1314
1315
|
}
|
|
1315
|
-
async function
|
|
1316
|
+
async function li(e, t) {
|
|
1316
1317
|
if (!this.token.isLoggedIn) return { error: "not_logged_in" };
|
|
1317
1318
|
let { ok: n, code: r, message: i } = await this.req.post("verify-activation-key", { activation_key: e }, null, {
|
|
1318
1319
|
message: !1,
|
|
@@ -1323,7 +1324,7 @@ async function ui(e, t) {
|
|
|
1323
1324
|
error: r
|
|
1324
1325
|
};
|
|
1325
1326
|
}
|
|
1326
|
-
async function
|
|
1327
|
+
async function ui(e, t) {
|
|
1327
1328
|
if (!await this.token.autoLogin()) return {
|
|
1328
1329
|
user_rewards: [],
|
|
1329
1330
|
next_token: ""
|
|
@@ -1332,85 +1333,85 @@ async function di(e, t) {
|
|
|
1332
1333
|
max_results: 20,
|
|
1333
1334
|
...e,
|
|
1334
1335
|
event_id: this.event
|
|
1335
|
-
}),
|
|
1336
|
+
}), wr, t);
|
|
1336
1337
|
return {
|
|
1337
1338
|
user_rewards: n?.user_rewards || [],
|
|
1338
1339
|
next_token: n?.next_token || ""
|
|
1339
1340
|
};
|
|
1340
1341
|
}
|
|
1341
|
-
async function
|
|
1342
|
+
async function di(e, t) {
|
|
1342
1343
|
if (!await this.token.autoLogin()) return { unclaimed: 0 };
|
|
1343
|
-
let { data: n } = await this.req.get("event/user-rewards-count", { ...e },
|
|
1344
|
+
let { data: n } = await this.req.get("event/user-rewards-count", { ...e }, Tr, t);
|
|
1344
1345
|
return { unclaimed: n?.unclaimed || 0 };
|
|
1345
1346
|
}
|
|
1346
|
-
async function
|
|
1347
|
+
async function fi(e, t) {
|
|
1347
1348
|
if (!await this.token.autoLogin()) return null;
|
|
1348
1349
|
let { data: n } = await this.req.get(`event/${this.event}/user-item-count`, { item_id: e }, B, t);
|
|
1349
1350
|
return n?.count ?? null;
|
|
1350
1351
|
}
|
|
1351
|
-
async function
|
|
1352
|
+
async function pi(e, t, n) {
|
|
1352
1353
|
if (!await this.token.autoLogin()) return null;
|
|
1353
1354
|
let { data: r, code: i, message: a } = await this.req.post("event/ugc/upload-image", {
|
|
1354
1355
|
feature_id: e,
|
|
1355
1356
|
...t,
|
|
1356
1357
|
event_id: this.event
|
|
1357
|
-
},
|
|
1358
|
+
}, Ir, n);
|
|
1358
1359
|
return r || {
|
|
1359
1360
|
message: a,
|
|
1360
1361
|
error: i
|
|
1361
1362
|
};
|
|
1362
1363
|
}
|
|
1363
|
-
async function
|
|
1364
|
+
async function mi(e, t) {
|
|
1364
1365
|
let { data: n, code: r, message: i } = await this.req.get("event/ugc/recommendation", {
|
|
1365
1366
|
feature_id: e,
|
|
1366
1367
|
event_id: this.event
|
|
1367
|
-
},
|
|
1368
|
+
}, Nr, t);
|
|
1368
1369
|
return n || {
|
|
1369
1370
|
message: i,
|
|
1370
1371
|
error: r
|
|
1371
1372
|
};
|
|
1372
1373
|
}
|
|
1373
|
-
async function
|
|
1374
|
+
async function hi(e, t, n) {
|
|
1374
1375
|
let { data: r, code: i, message: a } = await this.req.get("event/ugc/ugcs", {
|
|
1375
1376
|
event_id: this.event,
|
|
1376
1377
|
feature_id: e,
|
|
1377
1378
|
max_results: 20,
|
|
1378
1379
|
...t
|
|
1379
|
-
},
|
|
1380
|
+
}, Pr, n);
|
|
1380
1381
|
return r || {
|
|
1381
1382
|
message: a,
|
|
1382
1383
|
error: i
|
|
1383
1384
|
};
|
|
1384
1385
|
}
|
|
1385
|
-
async function
|
|
1386
|
+
async function gi(e, t) {
|
|
1386
1387
|
if (!await this.token.autoLogin()) return null;
|
|
1387
1388
|
let { data: n, code: r, message: i } = await this.req.get("event/ugc/leaderboard", {
|
|
1388
1389
|
feature_id: e,
|
|
1389
1390
|
event_id: this.event
|
|
1390
|
-
},
|
|
1391
|
+
}, Lr, t);
|
|
1391
1392
|
return n || {
|
|
1392
1393
|
message: i,
|
|
1393
1394
|
error: r
|
|
1394
1395
|
};
|
|
1395
1396
|
}
|
|
1396
|
-
async function
|
|
1397
|
+
async function _i(e, t) {
|
|
1397
1398
|
if (!await this.token.autoLogin()) return null;
|
|
1398
1399
|
let { data: n, code: r, message: i } = await this.req.get("event/redeem/item-stocks", {
|
|
1399
1400
|
event_id: this.event,
|
|
1400
1401
|
feature_id: e
|
|
1401
|
-
},
|
|
1402
|
+
}, Rr, t);
|
|
1402
1403
|
return n || {
|
|
1403
1404
|
message: i,
|
|
1404
1405
|
error: r
|
|
1405
1406
|
};
|
|
1406
1407
|
}
|
|
1407
|
-
async function
|
|
1408
|
+
async function vi(e, t, n) {
|
|
1408
1409
|
if (!await this.token.autoLogin()) return null;
|
|
1409
1410
|
let { data: r, code: i, message: a } = await this.req.post("event/referral/rewards", {
|
|
1410
1411
|
event_id: this.event,
|
|
1411
1412
|
feature_id: e,
|
|
1412
1413
|
...t
|
|
1413
|
-
},
|
|
1414
|
+
}, zr, n);
|
|
1414
1415
|
return r || {
|
|
1415
1416
|
message: a,
|
|
1416
1417
|
error: i
|
|
@@ -1418,14 +1419,15 @@ async function yi(e, t, n) {
|
|
|
1418
1419
|
}
|
|
1419
1420
|
//#endregion
|
|
1420
1421
|
//#region src/ggd.enums.ts
|
|
1421
|
-
var
|
|
1422
|
+
var yi = {
|
|
1422
1423
|
Waiting: 1,
|
|
1423
1424
|
Playing: 2
|
|
1424
|
-
},
|
|
1425
|
+
}, bi = f.number().enum(yi).lock(), xi = class {
|
|
1425
1426
|
req;
|
|
1426
1427
|
constructor(e, t) {
|
|
1428
|
+
let n = ae(e) ? e : `https://${o(e)}`;
|
|
1427
1429
|
this.req = t({
|
|
1428
|
-
baseURL: `${
|
|
1430
|
+
baseURL: `${n}/v1/ggd`,
|
|
1429
1431
|
timeout: 1e4,
|
|
1430
1432
|
maxRetry: 2,
|
|
1431
1433
|
retryInterval: "2EB",
|
|
@@ -1445,7 +1447,7 @@ var bi = {
|
|
|
1445
1447
|
error: "invitation_code_invalid",
|
|
1446
1448
|
message: "邀请链接无效"
|
|
1447
1449
|
};
|
|
1448
|
-
if (
|
|
1450
|
+
if (Date.now() > Number(r) * 1e3) return {
|
|
1449
1451
|
error: "invitation_code_expired",
|
|
1450
1452
|
message: "邀请链接已过期"
|
|
1451
1453
|
};
|
|
@@ -1455,7 +1457,7 @@ var bi = {
|
|
|
1455
1457
|
}, d({
|
|
1456
1458
|
room_id: f.string(),
|
|
1457
1459
|
inviter_role_id: f.number(),
|
|
1458
|
-
room_status:
|
|
1460
|
+
room_status: bi,
|
|
1459
1461
|
room_mode: f.string().optional(),
|
|
1460
1462
|
room_tags: f.array(f.string()).optional(),
|
|
1461
1463
|
max_members: f.number().optional(),
|
|
@@ -1470,19 +1472,19 @@ var bi = {
|
|
|
1470
1472
|
message: u
|
|
1471
1473
|
};
|
|
1472
1474
|
}
|
|
1473
|
-
},
|
|
1475
|
+
}, Si = {
|
|
1474
1476
|
All: "all",
|
|
1475
1477
|
Limit: "limit"
|
|
1476
|
-
},
|
|
1478
|
+
}, Ci = f.string().enum(Si).lock(), wi = {
|
|
1477
1479
|
Pending: "pending",
|
|
1478
1480
|
Approved: "approved",
|
|
1479
1481
|
Failed: "failed",
|
|
1480
1482
|
Suspect: "suspect"
|
|
1481
|
-
}, V = f.string().enum(
|
|
1483
|
+
}, V = f.string().enum(wi).lock(), Ti = {
|
|
1482
1484
|
System: "system",
|
|
1483
1485
|
Comment: "comment",
|
|
1484
1486
|
Like: "like"
|
|
1485
|
-
},
|
|
1487
|
+
}, Ei = f.string().enum(Ti).lock(), H = {
|
|
1486
1488
|
System: "system",
|
|
1487
1489
|
PostPinned: "post_pinned",
|
|
1488
1490
|
PostHighlighted: "post_highlighted",
|
|
@@ -1495,13 +1497,13 @@ var bi = {
|
|
|
1495
1497
|
ReplyReplied: "reply_replied",
|
|
1496
1498
|
ReplyLiked: "reply_liked",
|
|
1497
1499
|
ReplyDeleted: "reply_deleted"
|
|
1498
|
-
},
|
|
1500
|
+
}, Di = f.string().enum(H).lock(), U = f.object({
|
|
1499
1501
|
forum_id: f.number(),
|
|
1500
1502
|
icon_url: f.string(),
|
|
1501
1503
|
name: f.string(),
|
|
1502
1504
|
tags: f.array(f.string()),
|
|
1503
1505
|
sort: f.number(),
|
|
1504
|
-
mode:
|
|
1506
|
+
mode: Ci,
|
|
1505
1507
|
member_ids: f.array(f.number())
|
|
1506
1508
|
}).lock(), W = f.object({
|
|
1507
1509
|
topic_id: f.number(),
|
|
@@ -1530,7 +1532,7 @@ var bi = {
|
|
|
1530
1532
|
is_highlighted: f.bool(),
|
|
1531
1533
|
status: V,
|
|
1532
1534
|
create_time: f.number()
|
|
1533
|
-
}).lock(), K = f.object({ err_msg: f.string().optional() }).optional().lock(),
|
|
1535
|
+
}).lock(), K = f.object({ err_msg: f.string().optional() }).optional().lock(), Oi = f.object({
|
|
1534
1536
|
reply_id: f.number(),
|
|
1535
1537
|
reply_content: f.string().optional(),
|
|
1536
1538
|
replied_by: f.string(),
|
|
@@ -1549,7 +1551,7 @@ var bi = {
|
|
|
1549
1551
|
content: f.string(),
|
|
1550
1552
|
like_num: f.number(),
|
|
1551
1553
|
liked: f.bool(),
|
|
1552
|
-
reply_to:
|
|
1554
|
+
reply_to: Oi,
|
|
1553
1555
|
create_time: f.number()
|
|
1554
1556
|
}).lock(), J = f.object({
|
|
1555
1557
|
comment_id: f.number(),
|
|
@@ -1571,19 +1573,19 @@ var bi = {
|
|
|
1571
1573
|
create_time: f.number(),
|
|
1572
1574
|
status: V,
|
|
1573
1575
|
replies: f.array(q).optional()
|
|
1574
|
-
}).lock(),
|
|
1576
|
+
}).lock(), ki = f.object({
|
|
1575
1577
|
image_url: f.string(),
|
|
1576
1578
|
upload_url: f.string(),
|
|
1577
1579
|
existed: f.bool()
|
|
1578
1580
|
}).lock(), Y = f.object({
|
|
1579
1581
|
notification_id: f.string(),
|
|
1580
|
-
notification_type:
|
|
1582
|
+
notification_type: Di,
|
|
1581
1583
|
is_read: f.bool(),
|
|
1582
1584
|
create_time: f.number(),
|
|
1583
1585
|
origin_user_id: f.string(),
|
|
1584
1586
|
origin_user_name: f.string(),
|
|
1585
1587
|
origin_user_avatar_url: f.string()
|
|
1586
|
-
}).lock(),
|
|
1588
|
+
}).lock(), Ai = f.object({
|
|
1587
1589
|
system_message_subject: f.string(),
|
|
1588
1590
|
system_message_content: f.string()
|
|
1589
1591
|
}).lock(), X = f.object({
|
|
@@ -1597,86 +1599,86 @@ var bi = {
|
|
|
1597
1599
|
}).lock(), Q = f.object({
|
|
1598
1600
|
reply_id: f.number(),
|
|
1599
1601
|
reply_content: f.string()
|
|
1600
|
-
}).lock(),
|
|
1602
|
+
}).lock(), ji = f.object({
|
|
1601
1603
|
...Y.shape,
|
|
1602
|
-
...
|
|
1604
|
+
...Ai.shape,
|
|
1603
1605
|
notification_type: f.string().enum(H.System)
|
|
1604
|
-
}),
|
|
1606
|
+
}), Mi = f.object({
|
|
1605
1607
|
...Y.shape,
|
|
1606
1608
|
...X.shape,
|
|
1607
1609
|
notification_type: f.string().enum(H.PostPinned, H.PostHighlighted, H.PostDeleted, H.PostLiked)
|
|
1608
|
-
}),
|
|
1610
|
+
}), Ni = f.object({
|
|
1609
1611
|
...Y.shape,
|
|
1610
1612
|
...X.shape,
|
|
1611
1613
|
...Z.shape,
|
|
1612
1614
|
notification_type: f.string().enum(H.PostCommented)
|
|
1613
|
-
}),
|
|
1615
|
+
}), Pi = f.object({
|
|
1614
1616
|
...Y.shape,
|
|
1615
1617
|
...Z.shape,
|
|
1616
1618
|
...Q.shape,
|
|
1617
1619
|
notification_type: f.string().enum(H.CommentReplied)
|
|
1618
|
-
}),
|
|
1620
|
+
}), Fi = f.object({
|
|
1619
1621
|
...Y.shape,
|
|
1620
1622
|
...Z.shape,
|
|
1621
1623
|
...X.shape,
|
|
1622
1624
|
notification_type: f.string().enum(H.CommentLiked, H.CommentDeleted)
|
|
1623
|
-
}),
|
|
1625
|
+
}), Ii = f.object({
|
|
1624
1626
|
...Y.shape,
|
|
1625
1627
|
...Q.shape,
|
|
1626
1628
|
notification_type: f.string().enum(H.ReplyReplied),
|
|
1627
1629
|
comment_id: f.number(),
|
|
1628
1630
|
reply_to_reply_id: f.number(),
|
|
1629
1631
|
reply_to_reply_content: f.string()
|
|
1630
|
-
}),
|
|
1632
|
+
}), Li = f.object({
|
|
1631
1633
|
...Y.shape,
|
|
1632
1634
|
...Q.shape,
|
|
1633
1635
|
...Z.shape,
|
|
1634
1636
|
notification_type: f.string().enum(H.ReplyLiked, H.ReplyDeleted)
|
|
1635
|
-
}),
|
|
1637
|
+
}), Ri = f.union(ji, Mi, Ni, Pi, Fi, Ii, Li).satisfies().lock(), zi = d({ forums: f.array(U) }), Bi = d({ topics: f.array(W) }), Vi = d({ topic: W }), Hi = d({ post: G }), Ui = d({
|
|
1636
1638
|
posts: f.array(G),
|
|
1637
1639
|
next_token: f.string().optional()
|
|
1638
|
-
}),
|
|
1640
|
+
}), Wi = d({
|
|
1639
1641
|
post: G.clone().optional(),
|
|
1640
1642
|
antispam: K.clone().optional()
|
|
1641
|
-
}),
|
|
1643
|
+
}), Gi = d({
|
|
1642
1644
|
replies: f.array(q),
|
|
1643
1645
|
next_token: f.string().optional()
|
|
1644
|
-
}),
|
|
1646
|
+
}), Ki = d({ reply: q }), qi = d({
|
|
1645
1647
|
reply: q.clone().optional(),
|
|
1646
1648
|
antispam: K.clone().optional()
|
|
1647
|
-
}),
|
|
1649
|
+
}), Ji = d({ comment: J }), Yi = d({
|
|
1648
1650
|
comments: f.array(J),
|
|
1649
1651
|
next_token: f.string().optional()
|
|
1650
|
-
}),
|
|
1652
|
+
}), Xi = d({
|
|
1651
1653
|
comment: J.clone().optional(),
|
|
1652
1654
|
antispam: J.clone().optional()
|
|
1653
|
-
}),
|
|
1654
|
-
notifications: f.array(
|
|
1655
|
+
}), Zi = f.guard(ki), Qi = d({
|
|
1656
|
+
notifications: f.array(Ri),
|
|
1655
1657
|
next_token: f.string().optional()
|
|
1656
|
-
}),
|
|
1658
|
+
}), $i = d({
|
|
1657
1659
|
system: f.number(),
|
|
1658
1660
|
comment: f.number(),
|
|
1659
1661
|
like: f.number()
|
|
1660
|
-
}),
|
|
1662
|
+
}), ea = class {
|
|
1661
1663
|
token;
|
|
1662
1664
|
req;
|
|
1663
1665
|
constructor(e) {
|
|
1664
1666
|
this.token = e, this.req = e.req;
|
|
1665
1667
|
}
|
|
1666
1668
|
async getForums(e) {
|
|
1667
|
-
let { data: t } = await this.req.get("community/forums", null,
|
|
1669
|
+
let { data: t } = await this.req.get("community/forums", null, zi, e);
|
|
1668
1670
|
return t?.forums || [];
|
|
1669
1671
|
}
|
|
1670
1672
|
async getTopics(e) {
|
|
1671
|
-
let { data: t } = await this.req.get("community/topics", null,
|
|
1673
|
+
let { data: t } = await this.req.get("community/topics", null, Bi, e);
|
|
1672
1674
|
return t?.topics || [];
|
|
1673
1675
|
}
|
|
1674
1676
|
async getTopic(e, t) {
|
|
1675
|
-
let { data: n, code: r } = await this.req.get("community/topic", { topic_id: e },
|
|
1677
|
+
let { data: n, code: r } = await this.req.get("community/topic", { topic_id: e }, Vi, t);
|
|
1676
1678
|
return n?.topic ?? { error: r };
|
|
1677
1679
|
}
|
|
1678
1680
|
async getPosts(e, t) {
|
|
1679
|
-
let { data: n, code: r, message: i } = await this.req.get("community/posts", e || null,
|
|
1681
|
+
let { data: n, code: r, message: i } = await this.req.get("community/posts", e || null, Ui, t);
|
|
1680
1682
|
return n ?? {
|
|
1681
1683
|
message: i,
|
|
1682
1684
|
error: r
|
|
@@ -1687,35 +1689,35 @@ var bi = {
|
|
|
1687
1689
|
forum_id: e,
|
|
1688
1690
|
max_results: t,
|
|
1689
1691
|
next_token: n
|
|
1690
|
-
},
|
|
1692
|
+
}, Ui, r);
|
|
1691
1693
|
return i ?? {
|
|
1692
1694
|
message: o,
|
|
1693
1695
|
error: a
|
|
1694
1696
|
};
|
|
1695
1697
|
}
|
|
1696
1698
|
async getPost(e, t) {
|
|
1697
|
-
let { data: n, code: r, message: i } = await this.req.get("community/post", { post_id: e },
|
|
1699
|
+
let { data: n, code: r, message: i } = await this.req.get("community/post", { post_id: e }, Hi, t);
|
|
1698
1700
|
return n?.post ?? {
|
|
1699
1701
|
message: i,
|
|
1700
1702
|
error: r
|
|
1701
1703
|
};
|
|
1702
1704
|
}
|
|
1703
1705
|
async post(e, t) {
|
|
1704
|
-
let { data: n, code: r, message: i } = await this.req.post("community/post", a(e),
|
|
1706
|
+
let { data: n, code: r, message: i } = await this.req.post("community/post", a(e), Wi, t);
|
|
1705
1707
|
return n ?? {
|
|
1706
1708
|
message: i,
|
|
1707
1709
|
error: r
|
|
1708
1710
|
};
|
|
1709
1711
|
}
|
|
1710
1712
|
async getComments(e, t) {
|
|
1711
|
-
let { data: n, code: r, message: i } = await this.req.get("community/comments", e,
|
|
1713
|
+
let { data: n, code: r, message: i } = await this.req.get("community/comments", e, Yi, t);
|
|
1712
1714
|
return n ?? {
|
|
1713
1715
|
message: i,
|
|
1714
1716
|
error: r
|
|
1715
1717
|
};
|
|
1716
1718
|
}
|
|
1717
1719
|
async getComment(e, t) {
|
|
1718
|
-
let { data: n, code: r, message: i } = await this.req.get("community/comment", { comment_id: e },
|
|
1720
|
+
let { data: n, code: r, message: i } = await this.req.get("community/comment", { comment_id: e }, Ji, t);
|
|
1719
1721
|
return n?.comment ?? {
|
|
1720
1722
|
message: i,
|
|
1721
1723
|
error: r
|
|
@@ -1723,7 +1725,7 @@ var bi = {
|
|
|
1723
1725
|
}
|
|
1724
1726
|
async comment(e, t) {
|
|
1725
1727
|
await this.token.autoLogin();
|
|
1726
|
-
let { data: n, code: r, message: i } = await this.req.post("community/comment", a(e),
|
|
1728
|
+
let { data: n, code: r, message: i } = await this.req.post("community/comment", a(e), Xi, t);
|
|
1727
1729
|
return n ?? {
|
|
1728
1730
|
message: i,
|
|
1729
1731
|
error: r
|
|
@@ -1733,14 +1735,14 @@ var bi = {
|
|
|
1733
1735
|
let { data: n } = await this.req.get("community/replies", {
|
|
1734
1736
|
max_results: 20,
|
|
1735
1737
|
...e
|
|
1736
|
-
},
|
|
1738
|
+
}, Gi, t);
|
|
1737
1739
|
return {
|
|
1738
1740
|
replies: n?.replies || [],
|
|
1739
1741
|
next_token: n?.next_token || ""
|
|
1740
1742
|
};
|
|
1741
1743
|
}
|
|
1742
1744
|
async getReply(e, t) {
|
|
1743
|
-
let { data: n, code: r, message: i } = await this.req.get("community/reply", { reply_id: e },
|
|
1745
|
+
let { data: n, code: r, message: i } = await this.req.get("community/reply", { reply_id: e }, Ki, t);
|
|
1744
1746
|
return n?.reply ?? {
|
|
1745
1747
|
message: i,
|
|
1746
1748
|
error: r
|
|
@@ -1748,7 +1750,7 @@ var bi = {
|
|
|
1748
1750
|
}
|
|
1749
1751
|
async reply(e, t) {
|
|
1750
1752
|
await this.token.autoLogin();
|
|
1751
|
-
let { data: n, code: r, message: i } = await this.req.post("community/reply", a(e),
|
|
1753
|
+
let { data: n, code: r, message: i } = await this.req.post("community/reply", a(e), qi, t);
|
|
1752
1754
|
return n ?? {
|
|
1753
1755
|
message: i,
|
|
1754
1756
|
error: r
|
|
@@ -1778,7 +1780,7 @@ var bi = {
|
|
|
1778
1780
|
}
|
|
1779
1781
|
async getMediaPresignedUrl(e, t) {
|
|
1780
1782
|
await this.token.autoLogin();
|
|
1781
|
-
let { data: n } = await this.req.get("community/media-presign-url", e,
|
|
1783
|
+
let { data: n } = await this.req.get("community/media-presign-url", e, Zi, t);
|
|
1782
1784
|
return n;
|
|
1783
1785
|
}
|
|
1784
1786
|
async getNotifications(e, t) {
|
|
@@ -1786,7 +1788,7 @@ var bi = {
|
|
|
1786
1788
|
let { data: n } = await this.req.get("community/notifications", {
|
|
1787
1789
|
max_results: 20,
|
|
1788
1790
|
...e
|
|
1789
|
-
},
|
|
1791
|
+
}, Qi, t);
|
|
1790
1792
|
return {
|
|
1791
1793
|
notifications: n?.notifications || [],
|
|
1792
1794
|
next_token: n?.next_token || ""
|
|
@@ -1794,7 +1796,7 @@ var bi = {
|
|
|
1794
1796
|
}
|
|
1795
1797
|
async getUnreadNotificationsCount(e) {
|
|
1796
1798
|
if (!await this.token.autoLogin()) return null;
|
|
1797
|
-
let { data: t } = await this.req.get("community/unread-notifications-count", null,
|
|
1799
|
+
let { data: t } = await this.req.get("community/unread-notifications-count", null, $i, e);
|
|
1798
1800
|
return t;
|
|
1799
1801
|
}
|
|
1800
1802
|
async clearUnreadNotifications(e, t) {
|
|
@@ -1802,11 +1804,11 @@ var bi = {
|
|
|
1802
1804
|
let { ok: n } = await this.req.post("community/clear-unread-notifications", { category: e }, null, t);
|
|
1803
1805
|
return n;
|
|
1804
1806
|
}
|
|
1805
|
-
},
|
|
1807
|
+
}, ta = d({
|
|
1806
1808
|
nonce_str: f.string(),
|
|
1807
1809
|
timestamp: f.number(),
|
|
1808
1810
|
signature: f.string()
|
|
1809
|
-
}),
|
|
1811
|
+
}), na = /* @__PURE__ */ function(e) {
|
|
1810
1812
|
return e.RedirectUriDisMatch = "10003", e.AppidError = "10016", e.AuthorizationError = "10015", e.NoRightForScope = "10005", e.Frequently = "10009", e.AppBanded = "10004", e.ShouldFollow = "10006", e.ScopeNull = "10010", e.RedirectUriNull = "10011", e.AppidNull = "10012", e.StateNull = "10013", e;
|
|
1811
1813
|
}({});
|
|
1812
1814
|
//#endregion
|
|
@@ -1816,7 +1818,7 @@ function $(e) {
|
|
|
1816
1818
|
}
|
|
1817
1819
|
//#endregion
|
|
1818
1820
|
//#region src/weixin.ts
|
|
1819
|
-
var
|
|
1821
|
+
var ra = "wx_login_cache", ia = class {
|
|
1820
1822
|
token;
|
|
1821
1823
|
_appid;
|
|
1822
1824
|
req;
|
|
@@ -1827,7 +1829,7 @@ var ia = "wx_login_cache", aa = class {
|
|
|
1827
1829
|
return this._appid;
|
|
1828
1830
|
}
|
|
1829
1831
|
async getLoginCache() {
|
|
1830
|
-
let e = this.token.storage.get(
|
|
1832
|
+
let e = this.token.storage.get(ra);
|
|
1831
1833
|
if (!e) return null;
|
|
1832
1834
|
let t = i(e);
|
|
1833
1835
|
return $(t) ? (this.token.weixinToken = t.weixin_token, await this.token.autoLogin(), t) : null;
|
|
@@ -1843,7 +1845,7 @@ var ia = "wx_login_cache", aa = class {
|
|
|
1843
1845
|
...e,
|
|
1844
1846
|
message: !1
|
|
1845
1847
|
});
|
|
1846
|
-
return r && (this.token.weixinToken = r.weixin_token, this.token.storage.set(
|
|
1848
|
+
return r && (this.token.weixinToken = r.weixin_token, this.token.storage.set(ra, JSON.stringify(r))), r ?? {
|
|
1847
1849
|
message: a,
|
|
1848
1850
|
error: i
|
|
1849
1851
|
};
|
|
@@ -1885,7 +1887,7 @@ var ia = "wx_login_cache", aa = class {
|
|
|
1885
1887
|
let { data: t } = await this.req.get("weixin/offiaccount/jssdk-sign", {
|
|
1886
1888
|
appid: this.appid,
|
|
1887
1889
|
url: location.href.split("#")[0]
|
|
1888
|
-
},
|
|
1890
|
+
}, ta, e);
|
|
1889
1891
|
return t ? {
|
|
1890
1892
|
appid: this.appid,
|
|
1891
1893
|
nonceStr: t.nonce_str,
|
|
@@ -1895,4 +1897,4 @@ var ia = "wx_login_cache", aa = class {
|
|
|
1895
1897
|
}
|
|
1896
1898
|
};
|
|
1897
1899
|
//#endregion
|
|
1898
|
-
export { K as AntispamValidator, se as AuthToken,
|
|
1900
|
+
export { K as AntispamValidator, se as AuthToken, Yn as CandidateVoteValidator, I as CashbackEngagementDataValidator, vn as ClaimActivationKeyEngagementDataValidator, Qe as ClaimRewardStatus, k as ClaimRewardStatusValidator, ar as ClaimedItemValidator, g as ClubAddressValidator, Ve as ClubApi, _ as ClubBenefitSummaryValidator, Te as ClubBenefitValidator, fe as ClubCreditChangeScene, pe as ClubCreditChangeSceneValidator, ue as ClubCreditChangeType, de as ClubCreditChangeTypeValidator, we as ClubCreditLogValidator, _e as ClubGlobalConfigValidator, me as ClubItemType, m as ClubItemTypeValidator, ve as ClubPlayerValidator, v as ClubProductValidator, he as ClubRedemptionStatus, ge as ClubRedemptionStatusValidator, Ce as ClubUserCreditValidator, Se as ClubUserProfileValidator, Qn as CommentEngagementValidator, J as CommentValidator, ea as CommunityApi, Xn as ConversationValidator, We as EngageAccountType, Ge as EngageAccountTypeValidator, ir as EngageResponseValidator, er as EngageRewardValidator, He as EventApi, fr as EventConfigValidator, bt as EventFeatureConfigOfCashbackValidator, St as EventFeatureConfigOfCheckInValidator, wt as EventFeatureConfigOfClaimActivationKeyValidator, Et as EventFeatureConfigOfClaimRewardsValidator, Ot as EventFeatureConfigOfCommentValidator, At as EventFeatureConfigOfFollowValidator, Nt as EventFeatureConfigOfGiftCodeValidator, Ft as EventFeatureConfigOfInviteValidator, Lt as EventFeatureConfigOfInvitedRegisterValidator, Ut as EventFeatureConfigOfLotteryDrawValidator, Vt as EventFeatureConfigOfLotteryValidator, Gt as EventFeatureConfigOfPreregisterValidator, qt as EventFeatureConfigOfQuestValidator, Xt as EventFeatureConfigOfRedeemValidator, $t as EventFeatureConfigOfReferralValidator, tn as EventFeatureConfigOfRegisterValidator, rn as EventFeatureConfigOfShareValidator, on as EventFeatureConfigOfSubscribeValidator, cn as EventFeatureConfigOfSurveyValidator, un as EventFeatureConfigOfTeamValidator, mn as EventFeatureConfigOfUgcLikeValidator, fn as EventFeatureConfigOfUgcValidator, cr as EventFeatureConfigOfVote2Validator, _n as EventFeatureConfigOfVoteValidator, dr as EventFeatureConfigValidator, Ke as EventPeriodType, qe as EventPeriodTypeValidator, N as EventRewardItemConfigValidator, Oe as ExtraGameRewardValidator, De as ExtraPhysicalShipmentValidator, Yt as FeatureRedeemItemConfigValidator, Qt as FeatureReferralTierItemValidator, vt as FeatureRewardValidator, T as FeatureType, Je as FeatureTypeValidator, Si as ForumMode, Ci as ForumModeValidator, U as ForumValidator, xi as GGDPublicApi, yi as GGDRoomStatus, bi as GGDRoomStatusValidator, S as GamerItemType, C as GamerItemTypeValidator, ce as Gender, le as GenderValidator, Nn as GenerateReferralRewardsResponseValidator, yn as GiftCodeEngagementDataValidator, L as InviteEngagementDataValidator, st as LotteryDrawAction, ct as LotteryDrawActionValidator, Cn as LotteryDrawEngagementDataValidator, bn as LotteryEngagementDataValidator, j as LotteryTicketStatus, nt as LotteryTicketStatusValidator, Y as NotificationBaseValidator, Ti as NotificationCategory, Ei as NotificationCategoryValidator, Pi as NotificationCommentReplyValidator, Fi as NotificationCommentValidator, Z as NotificationPayloadCommentValidator, X as NotificationPayloadPostValidator, Q as NotificationPayloadReplyValidator, Ai as NotificationPayloadSystemValidator, Ni as NotificationPostCommentValidator, Mi as NotificationPostValidator, Ii as NotificationReplyRepliedValidator, Li as NotificationReplyValidator, ji as NotificationSystemValidator, H as NotificationType, Di as NotificationTypeValidator, Ri as NotificationValidator, xe as PlayerRoleCardValidator, h as PlayerRoleValidator, wi as PostStatus, V as PostStatusValidator, G as PostValidator, wn as PreregisterEngagementDataValidator, ki as PresignedUrlResponseValidator, En as QuestEngagementDataValidator, Ye as QuestObjective, E as QuestObjectiveValidator, lt as QuestProgressAlgorithm, ut as QuestProgressAlgorithmValidator, Dn as QuestProgressValidator, On as RedeemEngagementDataValidator, Ee as RedeemParamsValidator, kn as RedeemStocksResponseValidator, ke as RedemptionValidator, at as ReferralAction, ot as ReferralActionValidator, jn as ReferralEngagementDataValidator, An as ReferralInviteValidator, _t as RegularRewardValidator, Oi as ReplyToValidator, q as ReplyValidator, Ue as RewardItemType, w as RewardItemTypeValidator, $e as RewardSource, A as RewardSourceValidator, D as RewardStatus, O as RewardStatusValidator, $n as RewardValidator, be as RoleBaseInfoValidator, ye as ServerBaseInfoValidator, Pn as ShareEngagementDataValidator, In as SurveyEngagementDataValidator, rt as TeamAction, it as TeamActionValidator, zn as TeamEngagementDataValidator, Ln as TeamEngagementValidator, Rn as TeamMemberValidator, et as TeamVisibility, tt as TeamVisibilityValidator, Mn as TierStatusValidator, W as TopicValidator, Un as UgcCountResponseValidator, Bn as UgcEngagementDataValidator, Gn as UgcLeaderboardResponseValidator, Vn as UgcRecordBaseResponseValidator, Hn as UgcRecordResponseValidator, mt as UgcReviewStatus, ht as UgcReviewStatusValidator, pt as UgcSocialMedia, M as UgcSocialMediaValidator, Wn as UgcUploadImageValidator, z as UserEngagementDataValidator, tr as UserEngagementValidator, rr as UserFeatureStatusValidator, R as UserRewardValidator, nr as VerifyMobileResultValidator, Jn as Vote2ClaimRewardsResponseValidator, qn as Vote2EngagementDataValidator, dt as Vote2RewardType, ft as Vote2RewardTypeValidator, Kn as VoteEngagementDataValidator, Xe as VoteOptionSource, Ze as VoteOptionSourceValidator, ia as WeixinApi, Fn as WeixinSubscribeEngagementDataValidator, na as WeixinWebLoginErrorCode, Zn as ZeroChatGPTDataValidator, Xr as claimRewards, si as claimRewardsV2, ci as claimWeixinHongbao, Yr as engage, vi as generateReferralRewards, ei as generateUnlimitQrcode, ii as getCashbackQuery, Vr as getConfig, Wr as getEngagements, Ur as getEngagementsCount, Hr as getEngagementsUserCount, $r as getParamsByQrcodeScene, ti as getQuestProgress, _i as getRedeemItemStocks, gi as getUgcLeaderboard, oi as getUgcMyCount, mi as getUgcRecommendation, ai as getUgcRecord, hi as getUgcs, Qr as getUnlimitQrcodeScene, qr as getUserEngagementCount, Jr as getUserEngagements, Kr as getUserFeatureStatus, fi as getUserItemCount, ui as getUserRewards, di as getUserRewardsCount, ri as getVote2Leaderboard, ta as isWeixinSignResponse, Zr as submitUserRewardAddress, pi as ugcUploadImage, li as verifyActivationKey, Br as verifyMobileAllowed, Gr as visit, ni as vote2Rewards };
|