@congminh1254/shopee-sdk 0.8.1 → 0.10.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.
- package/README.md +6 -0
- package/lib/fetch.js +1 -0
- package/lib/fetch.js.map +1 -1
- package/lib/managers/product.manager.d.ts +346 -1
- package/lib/managers/product.manager.js +718 -0
- package/lib/managers/product.manager.js.map +1 -1
- package/lib/schemas/product.d.ts +1157 -0
- package/lib/sdk.d.ts +3 -0
- package/lib/sdk.js +3 -0
- package/lib/sdk.js.map +1 -1
- package/package.json +7 -2
package/README.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Shopee SDK
|
|
2
2
|
|
|
3
|
+
[](https://github.com/congminh1254/shopee-sdk/actions/workflows/ci.yml)
|
|
4
|
+
[](https://coveralls.io/github/congminh1254/shopee-sdk?branch=main)
|
|
5
|
+
[](https://badge.fury.io/js/@congminh1254%2Fshopee-sdk)
|
|
6
|
+
[](https://www.npmjs.com/package/@congminh1254/shopee-sdk)
|
|
7
|
+
[](https://opensource.org/licenses/MIT)
|
|
8
|
+
|
|
3
9
|
A TypeScript SDK for interacting with the Shopee Open API, maintained by the community.
|
|
4
10
|
|
|
5
11
|
## Installation
|
package/lib/fetch.js
CHANGED
package/lib/fetch.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch.js","sourceRoot":"","sources":["../src/fetch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAyB,OAAO,EAAe,MAAM,YAAY,CAAC;AAGhF,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,MAAM,OAAO,WAAW;IACf,MAAM,CAAC,KAAK,CAAC,KAAK,CACvB,MAAoB,EACpB,IAAY,EACZ,UAAwB,EAAE;QAE1B,MAAM,EAAE,MAAM,GAAG,KAAK,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wBAAwB,CAAC,CAAC;QACrD,CAAC;IACH,CAAC;CACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseManager } from "./base.manager.js";
|
|
2
2
|
import { ShopeeConfig } from "../sdk.js";
|
|
3
|
-
import { GetCommentParams, GetCommentResponse, ReplyCommentParams, ReplyCommentResponse, GetItemListParams, GetItemListResponse, GetItemBaseInfoParams, GetItemBaseInfoResponse, GetModelListParams, GetModelListResponse } from "../schemas/product.js";
|
|
3
|
+
import { GetCommentParams, GetCommentResponse, ReplyCommentParams, ReplyCommentResponse, GetItemListParams, GetItemListResponse, GetItemBaseInfoParams, GetItemBaseInfoResponse, GetModelListParams, GetModelListResponse, UpdatePriceParams, UpdatePriceResponse, UpdateStockParams, UpdateStockResponse, DeleteItemParams, DeleteItemResponse, UnlistItemParams, UnlistItemResponse, GetProductCategoryParams, GetProductCategoryResponse, AddItemParams, AddItemResponse, UpdateItemParams, UpdateItemResponse, AddModelParams, AddModelResponse, UpdateModelParams, UpdateModelResponse, DeleteModelParams, DeleteModelResponse, InitTierVariationParams, InitTierVariationResponse, UpdateTierVariationParams, UpdateTierVariationResponse, SearchItemParams, SearchItemResponse, GetItemExtraInfoParams, GetItemExtraInfoResponse, GetAttributeTreeParams, GetAttributeTreeResponse, GetBrandListParams, GetBrandListResponse, RegisterBrandParams, RegisterBrandResponse, CategoryRecommendParams, CategoryRecommendResponse, GetItemLimitParams, GetItemLimitResponse, GetItemPromotionParams, GetItemPromotionResponse, BoostItemParams, BoostItemResponse, GetBoostedListResponse, GetVariationsParams, GetVariationsResponse, GetRecommendAttributeParams, GetRecommendAttributeResponse, SearchAttributeValueListParams, SearchAttributeValueListResponse, GetMainItemListParams, GetMainItemListResponse, GetItemViolationInfoParams, GetItemViolationInfoResponse, GetWeightRecommendationParams, GetWeightRecommendationResponse, GetDirectItemListParams, GetDirectItemListResponse, GetItemContentDiagnosisResultParams, GetItemContentDiagnosisResultResponse, GetItemListByContentDiagnosisParams, GetItemListByContentDiagnosisResponse, AddKitItemParams, AddKitItemResponse, UpdateKitItemParams, UpdateKitItemResponse, GetKitItemInfoParams, GetKitItemInfoResponse, GetKitItemLimitParams, GetKitItemLimitResponse, GenerateKitImageParams, GenerateKitImageResponse, AddSspItemParams, AddSspItemResponse, GetSspInfoParams, GetSspInfoResponse, GetSspListParams, GetSspListResponse, LinkSspParams, LinkSspResponse, UnlinkSspParams, UnlinkSspResponse, UpdateSipItemPriceParams, UpdateSipItemPriceResponse, GetSizeChartListParams, GetSizeChartListResponse, GetSizeChartDetailParams, GetSizeChartDetailResponse, GetAllVehicleListParams, GetAllVehicleListResponse, GetVehicleListByCompatibilityDetailParams, GetVehicleListByCompatibilityDetailResponse, GetAitemByPitemIdParams, GetAitemByPitemIdResponse, GetDirectShopRecommendedPriceParams, GetDirectShopRecommendedPriceResponse, GetProductCertificationRuleParams, GetProductCertificationRuleResponse, SearchUnpackagedModelListParams, SearchUnpackagedModelListResponse } from "../schemas/product.js";
|
|
4
4
|
export declare class ProductManager extends BaseManager {
|
|
5
5
|
constructor(config: ShopeeConfig);
|
|
6
6
|
/**
|
|
@@ -130,4 +130,349 @@ export declare class ProductManager extends BaseManager {
|
|
|
130
130
|
* - error_item_not_found: Product not found
|
|
131
131
|
*/
|
|
132
132
|
getModelList(params: GetModelListParams): Promise<GetModelListResponse>;
|
|
133
|
+
/**
|
|
134
|
+
* Update price of items
|
|
135
|
+
*
|
|
136
|
+
* Use this API to update item price. Can update up to 50 models in one call.
|
|
137
|
+
*
|
|
138
|
+
* @param params - Parameters for updating price
|
|
139
|
+
* @param params.item_id - The ID of the item
|
|
140
|
+
* @param params.price_list - List of prices to update (1-50 items). Each item contains:
|
|
141
|
+
* - model_id: Model ID (use 0 for items without models)
|
|
142
|
+
* - original_price: New original price
|
|
143
|
+
*
|
|
144
|
+
* @returns A promise that resolves to the update price response containing:
|
|
145
|
+
* - success_list: List of successfully updated prices
|
|
146
|
+
* - failure_list: List of failed updates with reasons
|
|
147
|
+
*
|
|
148
|
+
* @throws {Error} When the API request fails or returns an error:
|
|
149
|
+
* - error_item_not_found: Item_id is not found
|
|
150
|
+
* - error_param_shop_id_not_found: Shop_id is not found
|
|
151
|
+
* - error_param: Invalid parameters
|
|
152
|
+
*/
|
|
153
|
+
updatePrice(params: UpdatePriceParams): Promise<UpdatePriceResponse>;
|
|
154
|
+
/**
|
|
155
|
+
* Update stock of items
|
|
156
|
+
*
|
|
157
|
+
* Use this API to update item stock. Can update up to 50 models in one call.
|
|
158
|
+
* This API updates only "seller_stock".
|
|
159
|
+
*
|
|
160
|
+
* @param params - Parameters for updating stock
|
|
161
|
+
* @param params.item_id - The ID of the item
|
|
162
|
+
* @param params.stock_list - List of stock updates (1-50 items). Each item contains:
|
|
163
|
+
* - model_id: Model ID (use 0 for items without models)
|
|
164
|
+
* - seller_stock: Array of seller stock updates with location_id and stock amount
|
|
165
|
+
*
|
|
166
|
+
* @returns A promise that resolves to the update stock response containing:
|
|
167
|
+
* - success_list: List of successfully updated stock
|
|
168
|
+
* - failure_list: List of failed updates with reasons
|
|
169
|
+
*
|
|
170
|
+
* @throws {Error} When the API request fails or returns an error:
|
|
171
|
+
* - error_item_not_found: Item_id is not found
|
|
172
|
+
* - error_param_shop_id_not_found: Shop_id is not found
|
|
173
|
+
* - error_param: Invalid parameters
|
|
174
|
+
*/
|
|
175
|
+
updateStock(params: UpdateStockParams): Promise<UpdateStockResponse>;
|
|
176
|
+
/**
|
|
177
|
+
* Delete a product item
|
|
178
|
+
*
|
|
179
|
+
* Use this API to delete a product item.
|
|
180
|
+
*
|
|
181
|
+
* @param params - Parameters for deleting item
|
|
182
|
+
* @param params.item_id - The ID of the item to delete
|
|
183
|
+
*
|
|
184
|
+
* @returns A promise that resolves to the delete response
|
|
185
|
+
*
|
|
186
|
+
* @throws {Error} When the API request fails or returns an error:
|
|
187
|
+
* - error_item_not_found: Item_id is not found
|
|
188
|
+
* - error_param_shop_id_not_found: Shop_id is not found
|
|
189
|
+
* - error_cannot_delete_item: Delete item failed
|
|
190
|
+
*/
|
|
191
|
+
deleteItem(params: DeleteItemParams): Promise<DeleteItemResponse>;
|
|
192
|
+
/**
|
|
193
|
+
* Unlist or list items
|
|
194
|
+
*
|
|
195
|
+
* Use this API to unlist or list items. Can process up to 50 items in one call.
|
|
196
|
+
*
|
|
197
|
+
* @param params - Parameters for unlisting/listing items
|
|
198
|
+
* @param params.item_list - List of items to unlist/list (1-50 items). Each item contains:
|
|
199
|
+
* - item_id: Shopee's unique identifier for an item
|
|
200
|
+
* - unlist: true to unlist, false to list
|
|
201
|
+
*
|
|
202
|
+
* @returns A promise that resolves to the unlist response containing:
|
|
203
|
+
* - result: List of operation results with success status and error messages
|
|
204
|
+
*
|
|
205
|
+
* @throws {Error} When the API request fails or returns an error:
|
|
206
|
+
* - error_item_not_found: Item_id is not found
|
|
207
|
+
* - error_param_shop_id_not_found: Shop_id is not found
|
|
208
|
+
* - error_param: Invalid parameters
|
|
209
|
+
*/
|
|
210
|
+
unlistItem(params: UnlistItemParams): Promise<UnlistItemResponse>;
|
|
211
|
+
/**
|
|
212
|
+
* Get category tree
|
|
213
|
+
*
|
|
214
|
+
* Use this API to get category tree data.
|
|
215
|
+
*
|
|
216
|
+
* @param params - Parameters for getting categories
|
|
217
|
+
* @param params.language - Language for category names (optional)
|
|
218
|
+
*
|
|
219
|
+
* @returns A promise that resolves to the category response containing:
|
|
220
|
+
* - category_list: List of categories with id, parent_id, name, and has_children
|
|
221
|
+
*
|
|
222
|
+
* @throws {Error} When the API request fails or returns an error:
|
|
223
|
+
* - error_param: Invalid parameters
|
|
224
|
+
*/
|
|
225
|
+
getCategory(params?: GetProductCategoryParams): Promise<GetProductCategoryResponse>;
|
|
226
|
+
/**
|
|
227
|
+
* Add a new item
|
|
228
|
+
*
|
|
229
|
+
* Use this API to add a new product item to the shop.
|
|
230
|
+
*
|
|
231
|
+
* @param params - Parameters for adding item
|
|
232
|
+
* @returns Promise resolving to add item response with item_id
|
|
233
|
+
*/
|
|
234
|
+
addItem(params: AddItemParams): Promise<AddItemResponse>;
|
|
235
|
+
/**
|
|
236
|
+
* Update an existing item
|
|
237
|
+
*
|
|
238
|
+
* Use this API to update an existing product item.
|
|
239
|
+
*
|
|
240
|
+
* @param params - Parameters for updating item
|
|
241
|
+
* @returns Promise resolving to update item response
|
|
242
|
+
*/
|
|
243
|
+
updateItem(params: UpdateItemParams): Promise<UpdateItemResponse>;
|
|
244
|
+
/**
|
|
245
|
+
* Add models/variations to an item
|
|
246
|
+
*
|
|
247
|
+
* Use this API to add product models/variations.
|
|
248
|
+
*
|
|
249
|
+
* @param params - Parameters for adding models
|
|
250
|
+
* @returns Promise resolving to add model response with model IDs
|
|
251
|
+
*/
|
|
252
|
+
addModel(params: AddModelParams): Promise<AddModelResponse>;
|
|
253
|
+
/**
|
|
254
|
+
* Update models/variations
|
|
255
|
+
*
|
|
256
|
+
* Use this API to update product models/variations.
|
|
257
|
+
*
|
|
258
|
+
* @param params - Parameters for updating models
|
|
259
|
+
* @returns Promise resolving to update model response
|
|
260
|
+
*/
|
|
261
|
+
updateModel(params: UpdateModelParams): Promise<UpdateModelResponse>;
|
|
262
|
+
/**
|
|
263
|
+
* Delete models/variations
|
|
264
|
+
*
|
|
265
|
+
* Use this API to delete product models/variations.
|
|
266
|
+
*
|
|
267
|
+
* @param params - Parameters for deleting models
|
|
268
|
+
* @returns Promise resolving to delete model response
|
|
269
|
+
*/
|
|
270
|
+
deleteModel(params: DeleteModelParams): Promise<DeleteModelResponse>;
|
|
271
|
+
/**
|
|
272
|
+
* Initialize tier variations
|
|
273
|
+
*
|
|
274
|
+
* Use this API to initialize tier variations for an item.
|
|
275
|
+
*
|
|
276
|
+
* @param params - Parameters for initializing tier variations
|
|
277
|
+
* @returns Promise resolving to init tier variation response
|
|
278
|
+
*/
|
|
279
|
+
initTierVariation(params: InitTierVariationParams): Promise<InitTierVariationResponse>;
|
|
280
|
+
/**
|
|
281
|
+
* Update tier variations
|
|
282
|
+
*
|
|
283
|
+
* Use this API to update tier variations for an item.
|
|
284
|
+
*
|
|
285
|
+
* @param params - Parameters for updating tier variations
|
|
286
|
+
* @returns Promise resolving to update tier variation response
|
|
287
|
+
*/
|
|
288
|
+
updateTierVariation(params: UpdateTierVariationParams): Promise<UpdateTierVariationResponse>;
|
|
289
|
+
/**
|
|
290
|
+
* Search items
|
|
291
|
+
*
|
|
292
|
+
* Use this API to search for items in the shop.
|
|
293
|
+
*
|
|
294
|
+
* @param params - Parameters for searching items
|
|
295
|
+
* @returns Promise resolving to search item response
|
|
296
|
+
*/
|
|
297
|
+
searchItem(params: SearchItemParams): Promise<SearchItemResponse>;
|
|
298
|
+
/**
|
|
299
|
+
* Get item extra info
|
|
300
|
+
*
|
|
301
|
+
* Use this API to get extra information (sales, views, likes) for items.
|
|
302
|
+
*
|
|
303
|
+
* @param params - Parameters for getting item extra info
|
|
304
|
+
* @returns Promise resolving to item extra info response
|
|
305
|
+
*/
|
|
306
|
+
getItemExtraInfo(params: GetItemExtraInfoParams): Promise<GetItemExtraInfoResponse>;
|
|
307
|
+
/**
|
|
308
|
+
* Get attribute tree
|
|
309
|
+
*
|
|
310
|
+
* Use this API to get the attribute tree for a category.
|
|
311
|
+
*
|
|
312
|
+
* @param params - Parameters for getting attribute tree
|
|
313
|
+
* @returns Promise resolving to attribute tree response
|
|
314
|
+
*/
|
|
315
|
+
getAttributeTree(params: GetAttributeTreeParams): Promise<GetAttributeTreeResponse>;
|
|
316
|
+
/**
|
|
317
|
+
* Get brand list
|
|
318
|
+
*
|
|
319
|
+
* Use this API to get the list of brands for a category.
|
|
320
|
+
*
|
|
321
|
+
* @param params - Parameters for getting brand list
|
|
322
|
+
* @returns Promise resolving to brand list response
|
|
323
|
+
*/
|
|
324
|
+
getBrandList(params: GetBrandListParams): Promise<GetBrandListResponse>;
|
|
325
|
+
/**
|
|
326
|
+
* Register a brand
|
|
327
|
+
*
|
|
328
|
+
* Use this API to register a new brand.
|
|
329
|
+
*
|
|
330
|
+
* @param params - Parameters for registering brand
|
|
331
|
+
* @returns Promise resolving to register brand response
|
|
332
|
+
*/
|
|
333
|
+
registerBrand(params: RegisterBrandParams): Promise<RegisterBrandResponse>;
|
|
334
|
+
/**
|
|
335
|
+
* Get category recommendation
|
|
336
|
+
*
|
|
337
|
+
* Use this API to get category recommendations based on item name.
|
|
338
|
+
*
|
|
339
|
+
* @param params - Parameters for category recommendation
|
|
340
|
+
* @returns Promise resolving to category recommendation response
|
|
341
|
+
*/
|
|
342
|
+
categoryRecommend(params: CategoryRecommendParams): Promise<CategoryRecommendResponse>;
|
|
343
|
+
/**
|
|
344
|
+
* Get item limits
|
|
345
|
+
*
|
|
346
|
+
* Use this API to get item limits for a category.
|
|
347
|
+
*
|
|
348
|
+
* @param params - Parameters for getting item limits
|
|
349
|
+
* @returns Promise resolving to item limit response
|
|
350
|
+
*/
|
|
351
|
+
getItemLimit(params: GetItemLimitParams): Promise<GetItemLimitResponse>;
|
|
352
|
+
/**
|
|
353
|
+
* Get item promotion
|
|
354
|
+
*
|
|
355
|
+
* Use this API to get promotion information for items.
|
|
356
|
+
*
|
|
357
|
+
* @param params - Parameters for getting item promotion
|
|
358
|
+
* @returns Promise resolving to item promotion response
|
|
359
|
+
*/
|
|
360
|
+
getItemPromotion(params: GetItemPromotionParams): Promise<GetItemPromotionResponse>;
|
|
361
|
+
/**
|
|
362
|
+
* Boost items
|
|
363
|
+
*
|
|
364
|
+
* Use this API to boost items for better visibility.
|
|
365
|
+
*
|
|
366
|
+
* @param params - Parameters for boosting items
|
|
367
|
+
* @returns Promise resolving to boost item response
|
|
368
|
+
*/
|
|
369
|
+
boostItem(params: BoostItemParams): Promise<BoostItemResponse>;
|
|
370
|
+
/**
|
|
371
|
+
* Get boosted item list
|
|
372
|
+
*
|
|
373
|
+
* Use this API to get the list of boosted items.
|
|
374
|
+
*
|
|
375
|
+
* @returns Promise resolving to boosted list response
|
|
376
|
+
*/
|
|
377
|
+
getBoostedList(): Promise<GetBoostedListResponse>;
|
|
378
|
+
/**
|
|
379
|
+
* Get variations
|
|
380
|
+
*
|
|
381
|
+
* Use this API to get variation information for an item.
|
|
382
|
+
*
|
|
383
|
+
* @param params - Parameters for getting variations
|
|
384
|
+
* @returns Promise resolving to variations response
|
|
385
|
+
*/
|
|
386
|
+
getVariations(params: GetVariationsParams): Promise<GetVariationsResponse>;
|
|
387
|
+
/**
|
|
388
|
+
* Get recommended attributes
|
|
389
|
+
*
|
|
390
|
+
* Use this API to get recommended attributes for a category.
|
|
391
|
+
*
|
|
392
|
+
* @param params - Parameters for getting recommended attributes
|
|
393
|
+
* @returns Promise resolving to recommended attributes response
|
|
394
|
+
*/
|
|
395
|
+
getRecommendAttribute(params: GetRecommendAttributeParams): Promise<GetRecommendAttributeResponse>;
|
|
396
|
+
/**
|
|
397
|
+
* Search attribute values
|
|
398
|
+
*
|
|
399
|
+
* Use this API to search for attribute values.
|
|
400
|
+
*
|
|
401
|
+
* @param params - Parameters for searching attribute values
|
|
402
|
+
* @returns Promise resolving to attribute value list response
|
|
403
|
+
*/
|
|
404
|
+
searchAttributeValueList(params: SearchAttributeValueListParams): Promise<SearchAttributeValueListResponse>;
|
|
405
|
+
/**
|
|
406
|
+
* Get main item list
|
|
407
|
+
*
|
|
408
|
+
* Use this API to get the main item list.
|
|
409
|
+
*
|
|
410
|
+
* @param params - Parameters for getting main item list
|
|
411
|
+
* @returns Promise resolving to main item list response
|
|
412
|
+
*/
|
|
413
|
+
getMainItemList(params?: GetMainItemListParams): Promise<GetMainItemListResponse>;
|
|
414
|
+
/**
|
|
415
|
+
* Get item violation info
|
|
416
|
+
*
|
|
417
|
+
* Use this API to get violation information for items.
|
|
418
|
+
*
|
|
419
|
+
* @param params - Parameters for getting item violation info
|
|
420
|
+
* @returns Promise resolving to item violation info response
|
|
421
|
+
*/
|
|
422
|
+
getItemViolationInfo(params: GetItemViolationInfoParams): Promise<GetItemViolationInfoResponse>;
|
|
423
|
+
/**
|
|
424
|
+
* Get weight recommendation
|
|
425
|
+
*
|
|
426
|
+
* Use this API to get weight recommendations for an item.
|
|
427
|
+
*
|
|
428
|
+
* @param params - Parameters for getting weight recommendation
|
|
429
|
+
* @returns Promise resolving to weight recommendation response
|
|
430
|
+
*/
|
|
431
|
+
getWeightRecommendation(params: GetWeightRecommendationParams): Promise<GetWeightRecommendationResponse>;
|
|
432
|
+
/**
|
|
433
|
+
* Get direct item list
|
|
434
|
+
*
|
|
435
|
+
* Use this API to get the direct item list.
|
|
436
|
+
*
|
|
437
|
+
* @param params - Parameters for getting direct item list
|
|
438
|
+
* @returns Promise resolving to direct item list response
|
|
439
|
+
*/
|
|
440
|
+
getDirectItemList(params?: GetDirectItemListParams): Promise<GetDirectItemListResponse>;
|
|
441
|
+
/**
|
|
442
|
+
* Get item content diagnosis result
|
|
443
|
+
*
|
|
444
|
+
* Use this API to get content diagnosis results for items.
|
|
445
|
+
*
|
|
446
|
+
* @param params - Parameters for getting content diagnosis result
|
|
447
|
+
* @returns Promise resolving to content diagnosis result response
|
|
448
|
+
*/
|
|
449
|
+
getItemContentDiagnosisResult(params: GetItemContentDiagnosisResultParams): Promise<GetItemContentDiagnosisResultResponse>;
|
|
450
|
+
/**
|
|
451
|
+
* Get item list by content diagnosis
|
|
452
|
+
*
|
|
453
|
+
* Use this API to get items filtered by content diagnosis status.
|
|
454
|
+
*
|
|
455
|
+
* @param params - Parameters for getting item list by content diagnosis
|
|
456
|
+
* @returns Promise resolving to item list by content diagnosis response
|
|
457
|
+
*/
|
|
458
|
+
getItemListByContentDiagnosis(params: GetItemListByContentDiagnosisParams): Promise<GetItemListByContentDiagnosisResponse>;
|
|
459
|
+
addKitItem(params: AddKitItemParams): Promise<AddKitItemResponse>;
|
|
460
|
+
updateKitItem(params: UpdateKitItemParams): Promise<UpdateKitItemResponse>;
|
|
461
|
+
getKitItemInfo(params: GetKitItemInfoParams): Promise<GetKitItemInfoResponse>;
|
|
462
|
+
getKitItemLimit(params: GetKitItemLimitParams): Promise<GetKitItemLimitResponse>;
|
|
463
|
+
generateKitImage(params: GenerateKitImageParams): Promise<GenerateKitImageResponse>;
|
|
464
|
+
addSspItem(params: AddSspItemParams): Promise<AddSspItemResponse>;
|
|
465
|
+
getSspInfo(params: GetSspInfoParams): Promise<GetSspInfoResponse>;
|
|
466
|
+
getSspList(params?: GetSspListParams): Promise<GetSspListResponse>;
|
|
467
|
+
linkSsp(params: LinkSspParams): Promise<LinkSspResponse>;
|
|
468
|
+
unlinkSsp(params: UnlinkSspParams): Promise<UnlinkSspResponse>;
|
|
469
|
+
updateSipItemPrice(params: UpdateSipItemPriceParams): Promise<UpdateSipItemPriceResponse>;
|
|
470
|
+
getSizeChartList(params?: GetSizeChartListParams): Promise<GetSizeChartListResponse>;
|
|
471
|
+
getSizeChartDetail(params: GetSizeChartDetailParams): Promise<GetSizeChartDetailResponse>;
|
|
472
|
+
getAllVehicleList(params?: GetAllVehicleListParams): Promise<GetAllVehicleListResponse>;
|
|
473
|
+
getVehicleListByCompatibilityDetail(params: GetVehicleListByCompatibilityDetailParams): Promise<GetVehicleListByCompatibilityDetailResponse>;
|
|
474
|
+
getAitemByPitemId(params: GetAitemByPitemIdParams): Promise<GetAitemByPitemIdResponse>;
|
|
475
|
+
getDirectShopRecommendedPrice(params: GetDirectShopRecommendedPriceParams): Promise<GetDirectShopRecommendedPriceResponse>;
|
|
476
|
+
getProductCertificationRule(params: GetProductCertificationRuleParams): Promise<GetProductCertificationRuleResponse>;
|
|
477
|
+
searchUnpackagedModelList(params: SearchUnpackagedModelListParams): Promise<SearchUnpackagedModelListResponse>;
|
|
133
478
|
}
|