@seayoo-web/gamer-api 2.13.18 → 2.13.19
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 +400 -378
- package/package.json +6 -6
- package/types/src/club.d.ts +25 -0
- package/types/src/club.guards.d.ts +5 -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.13.
|
|
4
|
+
"version": "2.13.19",
|
|
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.2",
|
|
34
33
|
"@seayoo-web/combo-webview": "2.8.0",
|
|
35
|
-
"@seayoo-web/tsconfig": "1.0.5",
|
|
36
|
-
"@seayoo-web/utils": "4.1.3",
|
|
37
34
|
"@seayoo-web/scripts": "3.1.6",
|
|
35
|
+
"@seayoo-web/utils": "4.1.3",
|
|
36
|
+
"@seayoo-web/tsconfig": "1.0.5",
|
|
37
|
+
"@seayoo-web/request": "3.4.2",
|
|
38
38
|
"@seayoo-web/validator": "2.0.0"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"@seayoo-web/combo-webview": "^2.8.0",
|
|
42
41
|
"@seayoo-web/utils": "^4.1.3",
|
|
43
|
-
"@seayoo-web/validator": "^2.0.0"
|
|
42
|
+
"@seayoo-web/validator": "^2.0.0",
|
|
43
|
+
"@seayoo-web/combo-webview": "^2.8.0"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
46
|
"prebuild": "pnpm -F validator build && pnpm -F request build && pnpm -F combo-webview build",
|
package/types/src/club.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ClubAddress, ClubUserProfile, RedeemParams } from "./club.define";
|
|
2
2
|
import type { ClubCreditChangeType, ClubItemType } from "./club.enums";
|
|
3
|
+
import type { UgcSocialMedia } from "./event.enums";
|
|
3
4
|
import type { AuthToken } from "./token";
|
|
4
5
|
import type { RequestInternalError, IRequestOptions } from "@seayoo-web/request";
|
|
5
6
|
import type { SomePartial } from "@seayoo-web/utils";
|
|
@@ -201,4 +202,28 @@ export declare class ClubApi {
|
|
|
201
202
|
redemptions: import("./club.define").Redemption[];
|
|
202
203
|
next_token: string | undefined;
|
|
203
204
|
}>;
|
|
205
|
+
/**
|
|
206
|
+
* 图片预上传地址获取,为 club 服务提供预签名上传 URL,供用户客户端上传图片资源
|
|
207
|
+
*
|
|
208
|
+
* https://www.kdocs.cn/l/cgp4gSBMbOf1?linkname=d4IHcCQu34
|
|
209
|
+
*/
|
|
210
|
+
clubUploadImage(option: {
|
|
211
|
+
/** 业务上传范围 */
|
|
212
|
+
scope: "avatar" | "social_homepage";
|
|
213
|
+
/** 当 scope 为 social_homepage 时,此参数为必填项 */
|
|
214
|
+
social_media?: UgcSocialMedia;
|
|
215
|
+
/** 待上传文件的 MIME Type,仅支持上传标准图片格式 image/jpeg 和 image/png */
|
|
216
|
+
content_type: "image/jpeg" | "image/png";
|
|
217
|
+
/** 待上传文件的字节大小,用于限制 S3 上传 */
|
|
218
|
+
content_length: number;
|
|
219
|
+
/** 待上传文件的 SHA-256 哈希值 用于校验上传对象的完整性 */
|
|
220
|
+
content_sha256: string;
|
|
221
|
+
}, requestOptions?: IRequestOptions): Promise<{
|
|
222
|
+
existed: boolean;
|
|
223
|
+
image_upload_url: string | undefined;
|
|
224
|
+
image_id: string;
|
|
225
|
+
} | {
|
|
226
|
+
message: string;
|
|
227
|
+
error: RequestInternalError | "address_not_found";
|
|
228
|
+
}>;
|
|
204
229
|
}
|
|
@@ -31,3 +31,8 @@ export declare const isRedemptionListWithToken: (data: unknown) => data is {
|
|
|
31
31
|
redemptions: import("./club.define").Redemption[];
|
|
32
32
|
next_token: string | undefined;
|
|
33
33
|
};
|
|
34
|
+
export declare const isClubUploadUrlResponse: (data: unknown) => data is {
|
|
35
|
+
existed: boolean;
|
|
36
|
+
image_upload_url: string | undefined;
|
|
37
|
+
image_id: string;
|
|
38
|
+
};
|