@seayoo-web/gamer-api 2.13.18 → 2.13.20

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/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.18",
4
+ "version": "2.13.20",
5
5
  "type": "module",
6
6
  "source": "index.ts",
7
7
  "main": "./dist/index.js",
@@ -30,11 +30,11 @@
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",
34
+ "@seayoo-web/request": "3.4.2",
36
35
  "@seayoo-web/utils": "4.1.3",
37
36
  "@seayoo-web/scripts": "3.1.6",
37
+ "@seayoo-web/tsconfig": "1.0.5",
38
38
  "@seayoo-web/validator": "2.0.0"
39
39
  },
40
40
  "peerDependencies": {
@@ -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
+ };
@@ -1,5 +1,5 @@
1
1
  import type { EngagementFeatureType, InferEngagementError, InferEngagementParam } from "./event.define";
2
- import type { GamerItemType, RewardSource, UgcReviewStatus } from "./event.enums";
2
+ import type { GamerItemType, RewardSource, RewardStatus, UgcReviewStatus } from "./event.enums";
3
3
  import type { AuthToken } from "./token";
4
4
  import type { RequestInternalError, IRequestOptions } from "@seayoo-web/request";
5
5
  export * from "./event.define";
@@ -209,6 +209,7 @@ export declare class EventApi {
209
209
  /** 单次查询的数量,默认 20 */
210
210
  max_results?: number;
211
211
  next_token?: string;
212
+ reward_status?: RewardStatus;
212
213
  }, requestOptions?: IRequestOptions): Promise<{
213
214
  user_rewards: import("./event.engage").UserReward[];
214
215
  next_token: string;
@@ -1,4 +1,4 @@
1
- export declare const console: Pick<Console, "log" | "error" | "warn">;
1
+ export declare const console: Pick<Console, "error" | "log" | "warn">;
2
2
  /** 检测是否在 combo webview */
3
3
  export declare function inComboWebview(): boolean;
4
4
  export declare function isRootEndpoint(path: string): boolean;