Comparing version 0.4.11 to 0.4.12
# ae_sdk | ||
## 0.4.12 | ||
### Patch Changes | ||
- - Ensure API returns predefined types for AE affiliate API. | ||
## 0.4.11 | ||
@@ -4,0 +10,0 @@ |
@@ -67,7 +67,7 @@ "use strict"; | ||
var parse_affiliate_products = (input) => { | ||
var _a; | ||
if (input && input.product) | ||
input = input.product; | ||
if ((input && ((_a = input[0]) == null ? void 0 : _a.product_small_image_urls)).string) { | ||
input = input == null ? void 0 : input.map((product) => { | ||
var _a, _b; | ||
if (input && input.products && input.products.product) | ||
input.products = input.products.product; | ||
if ((_b = input && input.products && ((_a = input.products[0]) == null ? void 0 : _a.product_small_image_urls)) == null ? void 0 : _b.string) { | ||
input.products = input.products.map((product) => { | ||
product.product_small_image_urls = product.product_small_image_urls.string; | ||
@@ -293,3 +293,3 @@ return product; | ||
if (response.ok) { | ||
let data = response.data.aliexpress_affiliate_featuredpromo_products_get_response.resp_result.result.products; | ||
let data = response.data.aliexpress_affiliate_featuredpromo_products_get_response.resp_result.result; | ||
data = parse_affiliate_products(data); | ||
@@ -312,3 +312,3 @@ } | ||
if (response.ok) { | ||
let data = response.data.aliexpress_affiliate_hotproduct_download_response.resp_result.result.products; | ||
let data = response.data.aliexpress_affiliate_hotproduct_download_response.resp_result.result; | ||
data = parse_affiliate_products(data); | ||
@@ -331,3 +331,3 @@ } | ||
if (response.ok) { | ||
let data = response.data.aliexpress_affiliate_hotproduct_query_response.resp_result.result.products; | ||
let data = response.data.aliexpress_affiliate_hotproduct_query_response.resp_result.result; | ||
data = parse_affiliate_products(data); | ||
@@ -374,3 +374,3 @@ } | ||
if (response.ok) { | ||
let data = response.data.aliexpress_affiliate_productdetail_get_response.resp_result.result.products; | ||
let data = response.data.aliexpress_affiliate_productdetail_get_response.resp_result.result; | ||
data = parse_affiliate_products(data); | ||
@@ -391,3 +391,3 @@ } | ||
if (response.ok) { | ||
let data = response.data.aliexpress_affiliate_product_query_response.resp_result.result.products; | ||
let data = response.data.aliexpress_affiliate_product_query_response.resp_result.result; | ||
data = parse_affiliate_products(data); | ||
@@ -408,3 +408,3 @@ } | ||
if (response.ok) { | ||
let data = response.data.aliexpress_affiliate_product_smartmatch_response.resp_result.result.products; | ||
let data = response.data.aliexpress_affiliate_product_smartmatch_response.resp_result.result; | ||
data = parse_affiliate_products(data); | ||
@@ -488,3 +488,3 @@ } | ||
if (response.ok) { | ||
let data = response.data.aliexpress_ds_recommend_feed_get_response.resp_result.result.products; | ||
let data = response.data.aliexpress_ds_recommend_feed_get_response.resp_result.result; | ||
data = parse_affiliate_products(data); | ||
@@ -491,0 +491,0 @@ } |
{ | ||
"name": "ae_sdk", | ||
"version": "0.4.11", | ||
"version": "0.4.12", | ||
"description": "A simple SDK for Aliexpress (dropshipping and affiliate) APIs.", | ||
@@ -5,0 +5,0 @@ "private": false, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
153608