@seayoo-web/gamer-api 2.3.3 → 2.4.1
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 +20 -0
- package/package.json +4 -4
- package/types/src/event.d.ts +11 -1
package/dist/index.js
CHANGED
|
@@ -1409,6 +1409,26 @@ class Pr {
|
|
|
1409
1409
|
error: i
|
|
1410
1410
|
};
|
|
1411
1411
|
}
|
|
1412
|
+
/**
|
|
1413
|
+
* 验证资格激活码有效性
|
|
1414
|
+
*
|
|
1415
|
+
* https://kdocs.cn/l/cf2mO2uRLqh9?linkname=B4xwTbDzhn
|
|
1416
|
+
*/
|
|
1417
|
+
async verifyActivationKey(t, n) {
|
|
1418
|
+
if (!this.token.isLoggedIn)
|
|
1419
|
+
return { error: "not_logged_in" };
|
|
1420
|
+
const { ok: r, code: i } = await this.req.post(
|
|
1421
|
+
"verify-activation-key",
|
|
1422
|
+
{
|
|
1423
|
+
activation_key: t
|
|
1424
|
+
},
|
|
1425
|
+
null,
|
|
1426
|
+
{ message: !1, ...n }
|
|
1427
|
+
);
|
|
1428
|
+
return r || {
|
|
1429
|
+
error: i
|
|
1430
|
+
};
|
|
1431
|
+
}
|
|
1412
1432
|
/**
|
|
1413
1433
|
* 查询用户活动奖励列表
|
|
1414
1434
|
*
|
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.
|
|
4
|
+
"version": "2.4.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"source": "index.ts",
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/node": "^22.13.1",
|
|
33
33
|
"@seayoo-web/combo-webview": "^2.5.4",
|
|
34
|
-
"@seayoo-web/
|
|
35
|
-
"@seayoo-web/utils": "^3.5.2",
|
|
34
|
+
"@seayoo-web/scripts": "^2.5.7",
|
|
36
35
|
"@seayoo-web/request": "^3.2.0",
|
|
37
|
-
"@seayoo-web/
|
|
36
|
+
"@seayoo-web/tsconfig": "^1.0.4",
|
|
37
|
+
"@seayoo-web/utils": "^3.5.2"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"@seayoo-web/combo-webview": "^2.5.4",
|
package/types/src/event.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ClaimRewardStatus, type GamerItemType, type RewardSource } from "./event.enums";
|
|
2
2
|
import type { EngagementFeatureType, InferEngagementParam } from "./event.define";
|
|
3
3
|
import type { AuthToken } from "./token";
|
|
4
|
-
import type {
|
|
4
|
+
import type { RequestInternalError, IRequestOptions } from "@seayoo-web/request";
|
|
5
5
|
export * from "./event.define";
|
|
6
6
|
export * from "./event.enums";
|
|
7
7
|
/** EventApi */
|
|
@@ -151,6 +151,16 @@ export declare class EventApi {
|
|
|
151
151
|
} | {
|
|
152
152
|
error: RequestInternalError | "invalid_weixin_openid" | "event_not_started" | "event_already_ended" | "no_rewards_to_claim" | "reward_received" | "invalid_merchant_parameter" | "budget_not_enough";
|
|
153
153
|
}>;
|
|
154
|
+
/**
|
|
155
|
+
* 验证资格激活码有效性
|
|
156
|
+
*
|
|
157
|
+
* https://kdocs.cn/l/cf2mO2uRLqh9?linkname=B4xwTbDzhn
|
|
158
|
+
*/
|
|
159
|
+
verifyActivationKey(activationKey: string, requestOptions?: IRequestOptions): Promise<true | {
|
|
160
|
+
readonly error: "not_logged_in";
|
|
161
|
+
} | {
|
|
162
|
+
error: RequestInternalError | "invalid_activation_key" | "invalid_activation_key";
|
|
163
|
+
}>;
|
|
154
164
|
/**
|
|
155
165
|
* 查询用户活动奖励列表
|
|
156
166
|
*
|