@congminh1254/shopee-sdk 1.3.0 → 1.5.2

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.
Files changed (43) hide show
  1. package/lib/managers/ads.manager.d.ts +7 -0
  2. package/lib/managers/ads.manager.js +7 -0
  3. package/lib/managers/ads.manager.js.map +1 -1
  4. package/lib/managers/ams.manager.d.ts +332 -0
  5. package/lib/managers/ams.manager.js +601 -0
  6. package/lib/managers/ams.manager.js.map +1 -0
  7. package/lib/managers/index.d.ts +2 -0
  8. package/lib/managers/index.js +2 -0
  9. package/lib/managers/index.js.map +1 -1
  10. package/lib/managers/logistics.manager.d.ts +13 -1
  11. package/lib/managers/logistics.manager.js +33 -0
  12. package/lib/managers/logistics.manager.js.map +1 -1
  13. package/lib/managers/product.manager.d.ts +9 -1
  14. package/lib/managers/product.manager.js +25 -0
  15. package/lib/managers/product.manager.js.map +1 -1
  16. package/lib/managers/shop.manager.d.ts +13 -1
  17. package/lib/managers/shop.manager.js +33 -0
  18. package/lib/managers/shop.manager.js.map +1 -1
  19. package/lib/managers/video.manager.d.ts +166 -0
  20. package/lib/managers/video.manager.js +273 -0
  21. package/lib/managers/video.manager.js.map +1 -0
  22. package/lib/schemas/account-health.d.ts +67 -0
  23. package/lib/schemas/account-health.js.map +1 -1
  24. package/lib/schemas/ams.d.ts +1037 -0
  25. package/lib/schemas/ams.js +2 -0
  26. package/lib/schemas/ams.js.map +1 -0
  27. package/lib/schemas/index.d.ts +1 -0
  28. package/lib/schemas/index.js +1 -0
  29. package/lib/schemas/index.js.map +1 -1
  30. package/lib/schemas/logistics.d.ts +67 -0
  31. package/lib/schemas/order.d.ts +24 -0
  32. package/lib/schemas/order.js.map +1 -1
  33. package/lib/schemas/product.d.ts +139 -0
  34. package/lib/schemas/shop.d.ts +98 -0
  35. package/lib/schemas/video.d.ts +688 -0
  36. package/lib/schemas/video.js +2 -0
  37. package/lib/schemas/video.js.map +1 -0
  38. package/lib/sdk.d.ts +4 -0
  39. package/lib/sdk.js +4 -0
  40. package/lib/sdk.js.map +1 -1
  41. package/lib/version.d.ts +1 -1
  42. package/lib/version.js +1 -1
  43. package/package.json +3 -2
@@ -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":""}
@@ -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"}
@@ -1134,3 +1134,70 @@ export type BatchUpdateTPFWarehouseTrackingStatusParams = {
1134
1134
  export interface BatchUpdateTPFWarehouseTrackingStatusResponse extends BaseResponse {
1135
1135
  response?: Record<string, never>;
1136
1136
  }
1137
+ /**
1138
+ * Parameters for check polygon update status
1139
+ */
1140
+ export type CheckPolygonUpdateStatusParams = {
1141
+ /** ID that needs to be checked. Please pass the task_id returned via the v2.logistics.upload_serviceable_polygon. */
1142
+ task_id: string;
1143
+ } & Record<string, string | number | boolean | object | null | undefined>;
1144
+ /**
1145
+ * Response for check polygon update status API
1146
+ */
1147
+ export interface CheckPolygonUpdateStatusResponse extends BaseResponse {
1148
+ response?: {
1149
+ /** Serviceable polygon file upload status. 0: Task completed, 1: Task in progress, 2: KML file related errors */
1150
+ status?: number;
1151
+ /** Details of the upload status, e.g "task in progress" */
1152
+ message?: string;
1153
+ };
1154
+ }
1155
+ /**
1156
+ * Parameters for update address
1157
+ */
1158
+ export type UpdateAddressParams = {
1159
+ /** Unique identifier for the address. You can get the address_id via v2.logistics.get_address_list. */
1160
+ address_id: number;
1161
+ /** The region of the address. Note: Do not allow to update the region of the address. */
1162
+ region?: string;
1163
+ /** The state of the address. */
1164
+ state?: string;
1165
+ /** The city of the address. */
1166
+ city?: string;
1167
+ /** The district of the address. */
1168
+ district?: string;
1169
+ /** The town of the address. */
1170
+ town?: string;
1171
+ /** The detailed address description of the address. */
1172
+ address?: string;
1173
+ /** The zipcode of the address. */
1174
+ zipcode?: string;
1175
+ /** Recipient's name at this address. */
1176
+ name?: string;
1177
+ /** Contact phone number for the recipient. */
1178
+ phone?: string;
1179
+ /** Geolocation information for the address. Type: JSON string. To clear existing geo info, pass "" or {}. To keep existing geo info, do not include this field. */
1180
+ geo_info?: string;
1181
+ } & Record<string, string | number | boolean | object | null | undefined>;
1182
+ /**
1183
+ * Response for update address API
1184
+ */
1185
+ export interface UpdateAddressResponse extends BaseResponse {
1186
+ response?: Record<string, never>;
1187
+ }
1188
+ /**
1189
+ * Parameters for upload serviceable polygon
1190
+ */
1191
+ export type UploadServiceablePolygonParams = {
1192
+ /** The .kml file to be uploaded to denote the serviceability area of the shops. */
1193
+ file: File | Blob;
1194
+ } & Record<string, string | number | boolean | object | null | undefined>;
1195
+ /**
1196
+ * Response for upload serviceable polygon API
1197
+ */
1198
+ export interface UploadServiceablePolygonResponse extends BaseResponse {
1199
+ response?: {
1200
+ /** Use the task_id to call v2.logistics.check_polygon_update_status to check if the upload job has been completed. */
1201
+ task_id?: string;
1202
+ };
1203
+ }
@@ -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"}
@@ -1912,3 +1912,142 @@ export interface SearchUnpackagedModelListResponse extends FetchResponse<{
1912
1912
  model_list: any[];
1913
1913
  }> {
1914
1914
  }
1915
+ /**
1916
+ * Parameters for get mart item mapping by id
1917
+ */
1918
+ export type GetMartItemMappingByIdParams = {
1919
+ /** The item ID of the item in the Mart shop */
1920
+ mart_item_id: number;
1921
+ /** A list of outlet shop IDs used to filter the mapping results */
1922
+ outlet_shop_id_list: number[];
1923
+ };
1924
+ /**
1925
+ * Model mapping information
1926
+ */
1927
+ export interface ModelMapping {
1928
+ /** The model ID of the product in the Mart shop */
1929
+ mart_model_id?: number;
1930
+ /** The model ID of the corresponding product in the outlet shop */
1931
+ outlet_model_id?: number;
1932
+ }
1933
+ /**
1934
+ * Item mapping information
1935
+ */
1936
+ export interface ItemMapping {
1937
+ /** The item ID of the item in the Mart shop */
1938
+ mart_item_id?: number;
1939
+ /** The item ID of the corresponding item in the outlet shop */
1940
+ outlet_item_id?: number;
1941
+ /** The mapping relationship between Mart models and outlet models under the mapped items */
1942
+ model_mapping?: ModelMapping[];
1943
+ }
1944
+ /**
1945
+ * Response for get mart item mapping by id API
1946
+ */
1947
+ export interface GetMartItemMappingByIdResponse extends BaseResponse {
1948
+ /** Warning details */
1949
+ warning?: string;
1950
+ response?: {
1951
+ /** A list of item mapping records between the Mart item and its corresponding outlet items */
1952
+ item_mapping_list?: ItemMapping[];
1953
+ };
1954
+ }
1955
+ /**
1956
+ * Seller stock information for publishing to outlet
1957
+ */
1958
+ export interface OutletSellerStock {
1959
+ /** The location ID where the stock is stored */
1960
+ location_id?: string;
1961
+ /** The available stock quantity for the model */
1962
+ stock: number;
1963
+ }
1964
+ /**
1965
+ * Pre-order configuration for publishing to outlet
1966
+ */
1967
+ export interface OutletPreOrder {
1968
+ /** Indicates whether the model is sold as a pre-order item */
1969
+ is_pre_order: boolean;
1970
+ /** The number of days required to ship the item after an order is placed */
1971
+ days_to_ship?: number;
1972
+ }
1973
+ /**
1974
+ * Model information for publishing
1975
+ */
1976
+ export interface PublishModel {
1977
+ /** The model ID in the Mart shop that this outlet model is associated with. model_id=0 for items with only the default model(no variations) */
1978
+ relate_mart_model_id: number;
1979
+ /** The status of model */
1980
+ model_status?: string;
1981
+ /** The original price of the model */
1982
+ original_price?: number;
1983
+ /** Stock information for the model, set in outlet sku level */
1984
+ seller_stock?: OutletSellerStock[];
1985
+ /** Pre-order configuration, set in outlet sku level */
1986
+ pre_order?: OutletPreOrder;
1987
+ }
1988
+ /**
1989
+ * Logistics channel configuration for outlet
1990
+ */
1991
+ export interface OutletLogisticInfo {
1992
+ /** The logistics channel ID used for shipping the item */
1993
+ logistic_id: number;
1994
+ /** Indicates whether the logistics channel is enabled for the item */
1995
+ enabled: boolean;
1996
+ /** The shipping fee charged to the buyer for this logistics channel */
1997
+ shipping_fee?: number;
1998
+ /** The parcel size ID used to calculate shipping fees */
1999
+ size_id?: number;
2000
+ /** Indicates whether free shipping is applied for this logistics channel */
2001
+ is_free?: boolean;
2002
+ }
2003
+ /**
2004
+ * Maximum purchase limit configuration
2005
+ */
2006
+ export interface MaxPurchaseLimit {
2007
+ /** The maximum quantity that a buyer is allowed to purchase per order */
2008
+ purchase_limit: number;
2009
+ }
2010
+ /**
2011
+ * Purchase limit information
2012
+ */
2013
+ export interface PurchaseLimitInfo {
2014
+ /** The minimum quantity that a buyer is allowed to purchase per order */
2015
+ min_purchase_limit: number;
2016
+ /** The maximum purchase quantity configuration for the item */
2017
+ max_purchase_limit: MaxPurchaseLimit;
2018
+ }
2019
+ /**
2020
+ * Item publishing configuration
2021
+ */
2022
+ export interface PublishItemConfig {
2023
+ /** The outlet item ID */
2024
+ outlet_item_id?: number;
2025
+ /** A list of models to be published to the outlet shop, mapped from the corresponding Mart shop models */
2026
+ model?: PublishModel[];
2027
+ /** Logistic channel setting; can set for each outlet shop */
2028
+ logistic_info?: OutletLogisticInfo[];
2029
+ /** Purchase quantity limits applied to the item in the outlet shop */
2030
+ purchase_limit_info?: PurchaseLimitInfo;
2031
+ }
2032
+ /**
2033
+ * Parameters for publish item to outlet shop
2034
+ */
2035
+ export type PublishItemToOutletShopParams = {
2036
+ /** The item ID of the product in the Mart shop to be published to the outlet shop */
2037
+ mart_item_id: number;
2038
+ /** The shop ID of the outlet shop where the product will be published */
2039
+ outlet_shop_id: number;
2040
+ /** Configuration details for publishing the product to the outlet shop, including model mapping, pricing, stock, logistics, and purchase limits */
2041
+ publish_item: PublishItemConfig;
2042
+ };
2043
+ /**
2044
+ * Response for publish item to outlet shop API
2045
+ */
2046
+ export interface PublishItemToOutletShopResponse extends BaseResponse {
2047
+ /** Warning message */
2048
+ warning?: string;
2049
+ response?: {
2050
+ /** The outlet item ID */
2051
+ item_id?: number;
2052
+ };
2053
+ }
@@ -248,3 +248,101 @@ export type GetAuthorisedResellerBrandResponse = BaseResponse & {
248
248
  /** Authorised reseller brand data */
249
249
  response: AuthorisedResellerBrandData;
250
250
  };
251
+ /**
252
+ * Parameters for getting BR shop onboarding info
253
+ */
254
+ export type GetBRShopOnboardingInfoParams = Record<string, never>;
255
+ /**
256
+ * Billing address information
257
+ */
258
+ export type BillingAddress = {
259
+ /** State of the billing address */
260
+ state?: string;
261
+ /** City of the billing address */
262
+ city?: string;
263
+ /** Specific detail of the billing address */
264
+ address?: string;
265
+ /** ZIP code of the billing address */
266
+ zipcode?: string;
267
+ /** Neighborhood of the billing address */
268
+ neighborhood?: string;
269
+ };
270
+ /**
271
+ * BR shop onboarding information
272
+ */
273
+ export type BRShopOnboardingInfo = {
274
+ /** Type of the shop's tax ID. 1: Personal seller (CPF), 2: Company seller (CNPJ) */
275
+ tax_id_type?: number;
276
+ /** The shop's tax ID. When tax_id_type = 1 (Personal seller), it is CPF. When tax_id_type = 2 (Company seller), it is CNPJ. */
277
+ tax_id?: string;
278
+ /** CPF number of the individual seller. Valid only when tax_id_type = 1. */
279
+ cpf_id?: string;
280
+ /** CNPJ number of the company seller. Valid only when tax_id_type = 2. */
281
+ cnpj_id?: string;
282
+ /** Full name of the individual seller. Valid only when tax_id_type = 1. */
283
+ name?: string;
284
+ /** Legal name of the company seller. Valid only when tax_id_type = 2. */
285
+ legal_entity_name?: string;
286
+ /** Birthday of the individual seller (stored as Unix timestamp). Valid only when tax_id_type = 1. */
287
+ birthday?: number;
288
+ /** Birthday of the individual seller (formatted as YYYY-MM-DD). Valid only when tax_id_type = 1. */
289
+ birthday_str?: string;
290
+ /** State registration number of the shop */
291
+ state_registration?: string;
292
+ /** Shop's billing address details */
293
+ billing_address?: BillingAddress;
294
+ /** Status of the shop's current KYC onboarding process. 0: None, 1: Regis Processing, 2: Regis Validated, 3: Regis Rejected, 4: KYC Pending, 5: KYC Processing, 6: KYC Processing Manually, 7: KYC Validated, 8: KYC Rejected */
295
+ onboarding_status?: number;
296
+ /** Timestamp when the onboarding information was submitted */
297
+ submission_time?: number;
298
+ /** Nationality of the individual seller. Valid only when tax_id_type=1. */
299
+ nationality?: string;
300
+ /** Main CNAE code */
301
+ cnae_main?: string;
302
+ /** Secondary CNAE code */
303
+ cnae_secondary?: string;
304
+ /** MEI verification result. 0: No, 1: Yes */
305
+ mei_check?: string;
306
+ /** Indicate if the shop has passed KYC verification */
307
+ onboarding_passed?: boolean;
308
+ };
309
+ /**
310
+ * Response for getting BR shop onboarding info
311
+ */
312
+ export type GetBRShopOnboardingInfoResponse = BaseResponse & {
313
+ /** Onboarding information of the Shop */
314
+ response?: BRShopOnboardingInfo;
315
+ };
316
+ /**
317
+ * Parameters for getting shop holiday mode
318
+ */
319
+ export type GetShopHolidayModeParams = Record<string, never>;
320
+ /**
321
+ * Response for getting shop holiday mode
322
+ */
323
+ export type GetShopHolidayModeResponse = BaseResponse & {
324
+ response?: {
325
+ /** Indicate whether the shop has enabled holiday mode. true means ON, false means OFF. */
326
+ holiday_mode_on?: boolean;
327
+ /** The last time the holiday mode was modified */
328
+ holiday_mode_mtime?: number;
329
+ /** Debug message */
330
+ debug_msg?: string;
331
+ };
332
+ };
333
+ /**
334
+ * Parameters for setting shop holiday mode
335
+ */
336
+ export type SetShopHolidayModeParams = {
337
+ /** Indicate whether to enable holiday mode for the shop. true means turn ON, false means turn OFF. */
338
+ holiday_mode_on: boolean;
339
+ };
340
+ /**
341
+ * Response for setting shop holiday mode
342
+ */
343
+ export type SetShopHolidayModeResponse = BaseResponse & {
344
+ response?: {
345
+ /** Debug message */
346
+ debug_msg?: string;
347
+ };
348
+ };