@congminh1254/shopee-sdk 1.4.0 → 1.5.3
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/lib/fetch.js +5 -0
- package/lib/fetch.js.map +1 -1
- package/lib/managers/ads.manager.d.ts +7 -0
- package/lib/managers/ads.manager.js +7 -0
- package/lib/managers/ads.manager.js.map +1 -1
- package/lib/managers/index.d.ts +1 -0
- package/lib/managers/index.js +1 -0
- package/lib/managers/index.js.map +1 -1
- package/lib/managers/logistics.manager.d.ts +13 -1
- package/lib/managers/logistics.manager.js +33 -0
- package/lib/managers/logistics.manager.js.map +1 -1
- package/lib/managers/product.manager.d.ts +9 -1
- package/lib/managers/product.manager.js +25 -0
- package/lib/managers/product.manager.js.map +1 -1
- package/lib/managers/shop.manager.d.ts +13 -1
- package/lib/managers/shop.manager.js +33 -0
- package/lib/managers/shop.manager.js.map +1 -1
- package/lib/managers/video.manager.d.ts +166 -0
- package/lib/managers/video.manager.js +273 -0
- package/lib/managers/video.manager.js.map +1 -0
- package/lib/schemas/logistics.d.ts +79 -17
- package/lib/schemas/order.js.map +1 -1
- package/lib/schemas/payment.d.ts +49 -14
- package/lib/schemas/product.d.ts +139 -0
- package/lib/schemas/shop.d.ts +98 -0
- package/lib/schemas/video.d.ts +688 -0
- package/lib/schemas/video.js +2 -0
- package/lib/schemas/video.js.map +1 -0
- package/lib/sdk.d.ts +2 -0
- package/lib/sdk.js +2 -0
- package/lib/sdk.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +2 -1
package/lib/schemas/product.d.ts
CHANGED
|
@@ -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
|
+
}
|
package/lib/schemas/shop.d.ts
CHANGED
|
@@ -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
|
+
};
|