@seayoo-web/gamer-api 2.8.2 → 2.8.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 +405 -395
- package/package.json +6 -6
- package/types/src/event.config/feature.base.d.ts +2 -0
- package/types/src/event.config/feature.lottery.d.ts +1 -1
- package/types/src/event.config/feature.quest.d.ts +4 -2
- package/types/src/event.config/reward.d.ts +1 -1
- package/types/src/event.enums.d.ts +28 -0
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.8.
|
|
4
|
+
"version": "2.8.4",
|
|
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/request": "3.4.0",
|
|
33
34
|
"@seayoo-web/combo-webview": "2.6.0",
|
|
34
35
|
"@seayoo-web/scripts": "3.0.5",
|
|
35
|
-
"@seayoo-web/request": "3.4.0",
|
|
36
|
-
"@seayoo-web/utils": "4.0.2",
|
|
37
36
|
"@seayoo-web/tsconfig": "1.0.5",
|
|
38
|
-
"@seayoo-web/validator": "1.0.1"
|
|
37
|
+
"@seayoo-web/validator": "1.0.1",
|
|
38
|
+
"@seayoo-web/utils": "4.0.2"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"@seayoo-web/combo-webview": "2.6.0",
|
|
42
|
-
"@seayoo-web/
|
|
43
|
-
"@seayoo-web/
|
|
42
|
+
"@seayoo-web/utils": "4.0.2",
|
|
43
|
+
"@seayoo-web/validator": "1.0.1"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
46
|
"prebuild": "pnpm -F request build && pnpm -F combo-webview build",
|
|
@@ -21,5 +21,7 @@ export interface EventFeatureBaseConfig {
|
|
|
21
21
|
engage_account: EngageAccountType;
|
|
22
22
|
/** 玩法参与奖励 */
|
|
23
23
|
feature_rewards?: FeatureReward;
|
|
24
|
+
/** 玩法排序 */
|
|
25
|
+
sort?: number;
|
|
24
26
|
}
|
|
25
27
|
export declare const EventFeatureBaseConfigValidator: import("@seayoo-web/validator").ObjectValidator<EventFeatureBaseConfig, false, false>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type InferType } from "@seayoo-web/validator";
|
|
2
2
|
import { type EventFeatureBaseConfig } from "./feature.base";
|
|
3
|
-
declare const rewardItemTypeValidator: import("@seayoo-web/validator").StringValidator<"
|
|
3
|
+
declare const rewardItemTypeValidator: import("@seayoo-web/validator").StringValidator<"event_item" | "game_item" | "physical_item" | "weixin_hongbao" | "activation_key" | "credit" | "external_gift_code" | "void_item", false, false>;
|
|
4
4
|
declare const featureType: "lottery";
|
|
5
5
|
export interface FeatureLotteryItemConfig {
|
|
6
6
|
/** 抽奖奖励道具 id */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type QuestObjective } from "../event.enums";
|
|
1
|
+
import { type QuestObjective, type QuestProgressAlgorithm } from "../event.enums";
|
|
2
2
|
import { type EventFeatureBaseConfig } from "./feature.base";
|
|
3
3
|
declare const featureType: "quest";
|
|
4
4
|
export interface FeatureQuestConfig {
|
|
@@ -18,7 +18,7 @@ export interface FeatureQuestConfig {
|
|
|
18
18
|
* • sum 将所有队员的进度值求和,作为队伍进度值。
|
|
19
19
|
* • top_n 以进度值倒序排名第 N 的队员的进度值,作为队伍进度值。如果队伍人数不足 N,则队伍进度值为 0。N 的值来自于配置字段 top_n。
|
|
20
20
|
*/
|
|
21
|
-
progress_algorithm?:
|
|
21
|
+
progress_algorithm?: QuestProgressAlgorithm;
|
|
22
22
|
/** progress_algorithm 等于 top_n 时,N 的取值。 */
|
|
23
23
|
top_n?: number;
|
|
24
24
|
};
|
|
@@ -30,6 +30,8 @@ export interface FeatureQuestConfig {
|
|
|
30
30
|
required_players?: number;
|
|
31
31
|
/** 单日对局次数,当任务目标为 player_match_days 有效,不小于 1 */
|
|
32
32
|
required_matches?: number;
|
|
33
|
+
/** 活动道具 ID */
|
|
34
|
+
event_item_id?: number;
|
|
33
35
|
};
|
|
34
36
|
}
|
|
35
37
|
export type EventFeatureConfigOfQuest = EventFeatureBaseConfig & {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type InferType } from "@seayoo-web/validator";
|
|
2
|
-
declare const rewardItemTypeValidator: import("@seayoo-web/validator").StringValidator<"
|
|
2
|
+
declare const rewardItemTypeValidator: import("@seayoo-web/validator").StringValidator<"event_item" | "game_item" | "physical_item" | "weixin_hongbao" | "activation_key" | "credit" | "external_gift_code" | "void_item", false, false>;
|
|
3
3
|
export interface EventRewardItemConfig {
|
|
4
4
|
/** 玩法奖励道具 id */
|
|
5
5
|
reward_item_id: number;
|
|
@@ -400,3 +400,31 @@ export declare const LotteryDrawActionValidator: import("@seayoo-web/validator")
|
|
|
400
400
|
maybeNull: never;
|
|
401
401
|
lock: never;
|
|
402
402
|
};
|
|
403
|
+
/** 计算任务进度的算法类型 */
|
|
404
|
+
export declare const QuestProgressAlgorithm: {
|
|
405
|
+
/** 将所有队员的进度值求和,作为队伍进度值 */
|
|
406
|
+
readonly Sum: "sum";
|
|
407
|
+
/** 以进度值倒序排名第 N 的队员的进度值,作为队伍进度值。如果队伍人数不足 N,则队伍进度值为 0。N 的值来自于配置字段 top_n */
|
|
408
|
+
readonly TopN: "top_n";
|
|
409
|
+
};
|
|
410
|
+
export type QuestProgressAlgorithm = ValueOf<typeof QuestProgressAlgorithm>;
|
|
411
|
+
export declare const QuestProgressAlgorithmValidator: import("@seayoo-web/validator").StringValidator<QuestProgressAlgorithm, false, false> & {
|
|
412
|
+
pattern: never;
|
|
413
|
+
url: never;
|
|
414
|
+
dataUri: never;
|
|
415
|
+
enum: never;
|
|
416
|
+
disallow: never;
|
|
417
|
+
optional: never;
|
|
418
|
+
maybeNull: never;
|
|
419
|
+
lock: never;
|
|
420
|
+
};
|
|
421
|
+
export declare const QuestProgressAlgorithmOptionalValidator: import("@seayoo-web/validator").StringValidator<QuestProgressAlgorithm, true, false> & {
|
|
422
|
+
pattern: never;
|
|
423
|
+
url: never;
|
|
424
|
+
dataUri: never;
|
|
425
|
+
enum: never;
|
|
426
|
+
disallow: never;
|
|
427
|
+
optional: never;
|
|
428
|
+
maybeNull: never;
|
|
429
|
+
lock: never;
|
|
430
|
+
};
|