@congminh1254/shopee-sdk 1.2.0 → 1.4.0

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.
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ams.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ams.js","sourceRoot":"","sources":["../../src/schemas/ams.ts"],"names":[],"mappings":""}
@@ -332,3 +332,70 @@ export interface UpdateDiscountItemResponse extends BaseResponse {
332
332
  /** Warning message if any */
333
333
  warning?: string;
334
334
  }
335
+ /**
336
+ * SIP discount information
337
+ */
338
+ export interface SipDiscountInfo {
339
+ /** The region of SIP affiliate shop */
340
+ region: string;
341
+ /** The status of discount for SIP affiliate shop in current region, can be upcoming/ongoing, excluding expired discounts */
342
+ status: string;
343
+ /** The discount rate set for SIP affiliate shop in current region */
344
+ sip_discount_rate: number;
345
+ /** The start time of discount for SIP affiliate shop in current region, in UNIX seconds */
346
+ start_time: number;
347
+ /** The end time of discount for SIP affiliate shop in current region, in UNIX seconds */
348
+ end_time: number;
349
+ /** The create time of discount for SIP affiliate shop in current region, in UNIX seconds */
350
+ create_time: number;
351
+ /** The latest update time of discount for SIP affiliate shop in current region, in UNIX seconds */
352
+ update_time: number;
353
+ }
354
+ /**
355
+ * Parameters for getting SIP discounts
356
+ */
357
+ export interface GetSipDiscountsParams {
358
+ /** The region of SIP affiliate shop that needs to get discount information. If not passed, will return the discount information set for all SIP affiliate shops */
359
+ region?: string;
360
+ [key: string]: string | number | boolean | undefined;
361
+ }
362
+ /**
363
+ * Parameters for setting SIP discount
364
+ */
365
+ export interface SetSipDiscountParams {
366
+ /** The region of SIP affiliate shop that needs to set discount */
367
+ region: string;
368
+ /** The overall market discount rate that will apply to all items for SIP affiliate shop in current region */
369
+ sip_discount_rate: number;
370
+ }
371
+ /**
372
+ * Parameters for deleting SIP discount
373
+ */
374
+ export interface DeleteSipDiscountParams {
375
+ /** The region of SIP affiliate shop that needs to delete discount */
376
+ region: string;
377
+ }
378
+ /**
379
+ * Response for the get SIP discounts API
380
+ */
381
+ export interface GetSipDiscountsResponse extends BaseResponse {
382
+ response: {
383
+ /** List of discounts in each region */
384
+ discount_list: SipDiscountInfo[];
385
+ };
386
+ }
387
+ /**
388
+ * Response for the set SIP discount API
389
+ */
390
+ export interface SetSipDiscountResponse extends BaseResponse {
391
+ response: SipDiscountInfo;
392
+ }
393
+ /**
394
+ * Response for the delete SIP discount API
395
+ */
396
+ export interface DeleteSipDiscountResponse extends BaseResponse {
397
+ response: {
398
+ /** The region of SIP affiliate shop that was deleted */
399
+ region: string;
400
+ };
401
+ }
@@ -24,3 +24,4 @@ export * from "./top-picks.js";
24
24
  export * from "./shop-category.js";
25
25
  export * from "./returns.js";
26
26
  export * from "./fbs.js";
27
+ export * from "./ams.js";
@@ -24,6 +24,7 @@ export * from "./top-picks.js";
24
24
  export * from "./shop-category.js";
25
25
  export * from "./returns.js";
26
26
  export * from "./fbs.js";
27
+ export * from "./ams.js";
27
28
  // Media and MediaSpace schemas export the same types, so they are not exported from the main index
28
29
  // Import them directly from their respective files when needed:
29
30
  // import * as Media from "./schemas/media.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,mGAAmG;AACnG,gEAAgE;AAChE,+CAA+C;AAC/C,0DAA0D"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,mGAAmG;AACnG,gEAAgE;AAChE,+CAA+C;AAC/C,0DAA0D"}
@@ -50,6 +50,15 @@ export interface OrderItem {
50
50
  is_prescription_item: boolean;
51
51
  /** Determine if item is B2C shop item */
52
52
  is_b2c_owned_item: boolean;
53
+ /** [Only for PH,TH,VN,MY,BR,TW] True if the item is hot listing */
54
+ hot_listing_item?: boolean;
55
+ /** List of promotions applied to this item */
56
+ promotion_list?: Array<{
57
+ /** The type of item or package level promotion applied to a product */
58
+ promotion_type: string;
59
+ /** The unique identifier of a specific promotion applied to an item */
60
+ promotion_id: number;
61
+ }>;
53
62
  }
54
63
  /**
55
64
  * Represents an item in a package with basic information
@@ -258,6 +267,21 @@ export interface Order {
258
267
  return_request_due_date?: number;
259
268
  /** The invoice data of the order */
260
269
  invoice_data?: InvoiceData;
270
+ /** [Only for BR] List of payment information */
271
+ payment_info?: Array<{
272
+ /** Payment method used in the order, such as Credit Card, Debit Card, Pix, etc. */
273
+ payment_method: string;
274
+ /** CNPJ of the payment processor handling the transaction */
275
+ payment_processor_register: string;
276
+ /** Card brand for credit or debit transactions, such as VISA, MASTER, etc. Empty string for Pix payments */
277
+ card_brand: string;
278
+ /** Payment authorization code generated by the bank or payment processor to validate the transaction */
279
+ transaction_id: string;
280
+ /** Amount paid by the corresponding payment method */
281
+ payment_amount: number;
282
+ }>;
283
+ /** [Only for PH,TH,VN,MY,BR,TW] True if the order includes hot listing item */
284
+ hot_listing_order?: boolean;
261
285
  }
262
286
  /**
263
287
  * The kind of time range field for order list query
@@ -1 +1 @@
1
- {"version":3,"file":"order.js","sourceRoot":"","sources":["../../src/schemas/order.ts"],"names":[],"mappings":"AA4VA,MAAM,CAAC,MAAM,iBAAiB,GAC5B,qbAAqb,CAAC"}
1
+ {"version":3,"file":"order.js","sourceRoot":"","sources":["../../src/schemas/order.ts"],"names":[],"mappings":"AAoXA,MAAM,CAAC,MAAM,iBAAiB,GAC5B,qbAAqb,CAAC"}
package/lib/sdk.d.ts CHANGED
@@ -28,6 +28,7 @@ import { ReturnsManager } from "./managers/returns.manager.js";
28
28
  import { SbsManager } from "./managers/sbs.manager.js";
29
29
  import { FbsManager } from "./managers/fbs.manager.js";
30
30
  import { LiveStreamManager } from "./managers/livestream.manager.js";
31
+ import { AmsManager } from "./managers/ams.manager.js";
31
32
  import { Agent } from "node:http";
32
33
  export interface ShopeeConfig {
33
34
  partner_id: number;
@@ -68,6 +69,7 @@ export declare class ShopeeSDK {
68
69
  readonly sbs: SbsManager;
69
70
  readonly fbs: FbsManager;
70
71
  readonly livestream: LiveStreamManager;
72
+ readonly ams: AmsManager;
71
73
  constructor(config: ShopeeConfig, tokenStorage?: TokenStorage);
72
74
  getConfig(): ShopeeConfig;
73
75
  setRegion(region: ShopeeRegion): void;
package/lib/sdk.js CHANGED
@@ -29,6 +29,7 @@ import { ReturnsManager } from "./managers/returns.manager.js";
29
29
  import { SbsManager } from "./managers/sbs.manager.js";
30
30
  import { FbsManager } from "./managers/fbs.manager.js";
31
31
  import { LiveStreamManager } from "./managers/livestream.manager.js";
32
+ import { AmsManager } from "./managers/ams.manager.js";
32
33
  export class ShopeeSDK {
33
34
  constructor(config, tokenStorage) {
34
35
  this.config = {
@@ -68,6 +69,7 @@ export class ShopeeSDK {
68
69
  this.sbs = new SbsManager(this.config);
69
70
  this.fbs = new FbsManager(this.config);
70
71
  this.livestream = new LiveStreamManager(this.config);
72
+ this.ams = new AmsManager(this.config);
71
73
  }
72
74
  getConfig() {
73
75
  return this.config;
package/lib/sdk.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"sdk.js","sourceRoot":"","sources":["../src/sdk.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAErE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAEvE,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CA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ACvF,EAAE,CAAC;IACN,CAAC;IAEM,KAAK,CAAC,oBAAoB,CAC/B,IAAY,EACZ,MAAe,EACf,aAAsB;QAEtB,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,aAAa,CAAC,CAAC;QAC1E,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACrC,OAAO,KAAK,CAAC;IACf,CAAC;IAEM,KAAK,CAAC,YAAY;QACvB,OAAO,IAAI,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC;IACjC,CAAC;IAEM,KAAK,CAAC,YAAY,CAAC,OAAgB,EAAE,WAAoB;QAC9D,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC;QAChD,IAAI,CAAC,SAAS,EAAE,CAAC;YACf,MAAM,IAAI,cAAc,CAAC,2BAA2B,CAAC,CAAC;QACxD,CAAC;QACD,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,eAAe,CAC3C,SAAS,CAAC,aAAa,EACvB,OAAO,IAAI,SAAS,CAAC,OAAO,EAC5B,WAAW,CACZ,CAAC;QACF,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,OAAO,IAAI,CAAC;QACd,CAAC;QAED,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACrC,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AAED,eAAe,SAAS,CAAC"}
package/lib/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.2.0";
1
+ export declare const SDK_VERSION = "1.4.0";
package/lib/version.js CHANGED
@@ -1,3 +1,3 @@
1
1
  // This file is auto-generated during the build process. Do not edit manually.
2
- export const SDK_VERSION = "1.2.0";
2
+ export const SDK_VERSION = "1.4.0";
3
3
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@congminh1254/shopee-sdk",
3
- "version": "1.2.0",
3
+ "version": "1.4.0",
4
4
  "description": "Shopee SDK maintaining by community",
5
5
  "type": "module",
6
6
  "main": "./lib/sdk.js",
@@ -44,7 +44,7 @@
44
44
  "format": "prettier --write \"src/**/*.ts\"",
45
45
  "lint": "eslint \"src/**/*.ts\"",
46
46
  "prepare": "husky install",
47
- "fetch-schemas": "node --loader ts-node/esm schemas/fetch.ts"
47
+ "fetch-schemas": "tsx schemas/fetch.ts"
48
48
  },
49
49
  "publishConfig": {
50
50
  "access": "public"
@@ -68,22 +68,22 @@
68
68
  },
69
69
  "homepage": "https://github.com/congminh1254/shopee-sdk#readme",
70
70
  "devDependencies": {
71
- "@types/node-fetch": "^2.6.12",
72
71
  "@commitlint/cli": "^20.1.0",
73
72
  "@commitlint/config-conventional": "^20.0.0",
74
- "@types/jest": "^29.5.14",
73
+ "@types/jest": "^30.0.0",
75
74
  "@typescript-eslint/eslint-plugin": "^7.0.1",
76
75
  "@typescript-eslint/parser": "^7.0.1",
77
76
  "eslint": "^8.56.0",
78
77
  "eslint-config-prettier": "^10.1.5",
79
- "husky": "^8.0.3",
80
- "jest": "^29.7.0",
78
+ "husky": "^9.1.7",
79
+ "jest": "^30.2.0",
81
80
  "prettier": "^3.2.5",
82
81
  "ts-jest": "^29.3.2",
83
82
  "ts-node": "^10.9.2",
83
+ "tsx": "^4.7.0",
84
84
  "typescript": "^5.7.3"
85
85
  },
86
86
  "dependencies": {
87
- "node-fetch": "^2.6.3"
87
+ "node-fetch": "^3.3.2"
88
88
  }
89
89
  }