@seayoo-web/gamer-api 4.5.4 → 4.5.6
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 +12 -9
- package/package.json +5 -5
- package/types/src/event.enums.d.ts +2 -0
- package/types/src/event.methods.d.ts +5 -1
package/dist/index.js
CHANGED
|
@@ -553,7 +553,8 @@ var p = "gamer_token", se = class {
|
|
|
553
553
|
OrderAmountInPayCenter: "order_seayoo_web_total_amount",
|
|
554
554
|
TeamSize: "team_size",
|
|
555
555
|
UserGroup: "user_group",
|
|
556
|
-
engagementCount: "engagement_count"
|
|
556
|
+
engagementCount: "engagement_count",
|
|
557
|
+
GameTaskGM: "game_task_gm"
|
|
557
558
|
}, E = f.string().enum(Ye).lock(), Xe = {
|
|
558
559
|
System: "system",
|
|
559
560
|
UserSubmission: "user_submission",
|
|
@@ -1234,15 +1235,18 @@ async function ei(e, t) {
|
|
|
1234
1235
|
let { data: n } = await this.req.post("event/unlimit-qrcode", a(e), Or, t);
|
|
1235
1236
|
return n?.img ?? null;
|
|
1236
1237
|
}
|
|
1237
|
-
async function ti(e, t) {
|
|
1238
|
+
async function ti(e, t, n) {
|
|
1238
1239
|
if (!await this.token.autoLogin()) return null;
|
|
1239
|
-
let { data:
|
|
1240
|
-
|
|
1240
|
+
let { data: r, code: i, message: a } = await this.req.get(`event/${this.event}/quest-progress`, {
|
|
1241
|
+
feature_id: e,
|
|
1241
1242
|
...t
|
|
1243
|
+
}, kr, {
|
|
1244
|
+
message: !1,
|
|
1245
|
+
...n
|
|
1242
1246
|
});
|
|
1243
|
-
return
|
|
1244
|
-
message:
|
|
1245
|
-
error:
|
|
1247
|
+
return r || {
|
|
1248
|
+
message: a,
|
|
1249
|
+
error: i
|
|
1246
1250
|
};
|
|
1247
1251
|
}
|
|
1248
1252
|
async function ni(e, t) {
|
|
@@ -1425,9 +1429,8 @@ var yi = {
|
|
|
1425
1429
|
}, bi = f.number().enum(yi).lock(), xi = class {
|
|
1426
1430
|
req;
|
|
1427
1431
|
constructor(e, t) {
|
|
1428
|
-
let n = ae(e) ? e : `https://${o(e)}`;
|
|
1429
1432
|
this.req = t({
|
|
1430
|
-
baseURL: `${
|
|
1433
|
+
baseURL: `${ae(e) ? e : `https://${o(e)}`}/v1/ggd`,
|
|
1431
1434
|
timeout: 1e4,
|
|
1432
1435
|
maxRetry: 2,
|
|
1433
1436
|
retryInterval: "2EB",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seayoo-web/gamer-api",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.6",
|
|
4
4
|
"description": "agent for gamer api",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "web@seayoo.com",
|
|
@@ -31,15 +31,15 @@
|
|
|
31
31
|
"happy-dom": "^13.10.1",
|
|
32
32
|
"vitest": "^4.1.4",
|
|
33
33
|
"@seayoo-web/combo-webview": "2.9.8",
|
|
34
|
-
"@seayoo-web/scripts": "4.3.10",
|
|
35
|
-
"@seayoo-web/validator": "2.3.1",
|
|
36
34
|
"@seayoo-web/request": "4.1.3",
|
|
35
|
+
"@seayoo-web/scripts": "4.3.11",
|
|
36
|
+
"@seayoo-web/tsconfig": "1.0.7",
|
|
37
37
|
"@seayoo-web/utils": "4.5.5",
|
|
38
|
-
"@seayoo-web/
|
|
38
|
+
"@seayoo-web/validator": "2.3.1"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"@seayoo-web/combo-webview": "^2.9.8",
|
|
42
41
|
"@seayoo-web/utils": "^4.5.5",
|
|
42
|
+
"@seayoo-web/combo-webview": "^2.9.8",
|
|
43
43
|
"@seayoo-web/validator": "^2.3.1"
|
|
44
44
|
},
|
|
45
45
|
"engines": {
|
|
@@ -204,6 +204,8 @@ export declare const QuestObjective: {
|
|
|
204
204
|
readonly UserGroup: "user_group";
|
|
205
205
|
/** 玩法参与次数 */
|
|
206
206
|
readonly engagementCount: "engagement_count";
|
|
207
|
+
/** 游戏内任务-GM*/
|
|
208
|
+
readonly GameTaskGM: "game_task_gm";
|
|
207
209
|
};
|
|
208
210
|
export type QuestObjective = ValueOf<typeof QuestObjective>;
|
|
209
211
|
export declare const QuestObjectiveValidator: import("@seayoo-web/validator").StringValidator<QuestObjective, false, false> & {
|
|
@@ -238,7 +238,11 @@ export declare function generateUnlimitQrcode(this: ApiInstance, option: {
|
|
|
238
238
|
*
|
|
239
239
|
* https://www.kdocs.cn/l/ckWFDcOsYEUA?linkname=ZAnm12d3f0
|
|
240
240
|
*/
|
|
241
|
-
export declare function getQuestProgress(this: ApiInstance, featureId: number,
|
|
241
|
+
export declare function getQuestProgress(this: ApiInstance, featureId: number, option?: {
|
|
242
|
+
/** 游戏服务器 ID,quest 玩法的 game_task_gm objective 必传。 */
|
|
243
|
+
server_id?: string;
|
|
244
|
+
role_id?: string;
|
|
245
|
+
}, requestOptions?: RequestOptions): Promise<import("./event.engage").QuestProgress | {
|
|
242
246
|
message: string;
|
|
243
247
|
error: RequestInternalError | "invalid_token" | "feature_not_found";
|
|
244
248
|
} | null>;
|