@getanyapi/sdk 0.25.0 → 0.27.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/dist/index.cjs +73 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +573 -3
- package/dist/index.d.ts +573 -3
- package/dist/index.js +73 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -364,8 +364,9 @@ function parseOffer(value, path) {
|
|
|
364
364
|
const model = stringField(raw, "model", path);
|
|
365
365
|
const unit = stringField(raw, "unit", path);
|
|
366
366
|
const maxUsd = numberField(raw, "maxUsd", path);
|
|
367
|
+
const maxPer1kUsd = numberField(raw, "maxPer1kUsd", path);
|
|
367
368
|
if (model === "flat") {
|
|
368
|
-
return unit === "request" ? { model, unit, maxUsd } : malformed(path);
|
|
369
|
+
return unit === "request" ? { model, unit, maxUsd, maxPer1kUsd } : malformed(path);
|
|
369
370
|
}
|
|
370
371
|
if (model !== "linear") return malformed(`${path}.model`);
|
|
371
372
|
if (unit.length === 0) return malformed(`${path}.unit`);
|
|
@@ -374,14 +375,16 @@ function parseOffer(value, path) {
|
|
|
374
375
|
unit,
|
|
375
376
|
baseUsd: numberField(raw, "baseUsd", path),
|
|
376
377
|
perUnitUsd: numberField(raw, "perUnitUsd", path),
|
|
377
|
-
maxUsd
|
|
378
|
+
maxUsd,
|
|
379
|
+
maxPer1kUsd
|
|
378
380
|
};
|
|
379
381
|
}
|
|
380
382
|
function parsePricing(value, path) {
|
|
381
383
|
const raw = record(value, path);
|
|
382
384
|
return {
|
|
383
385
|
from: parseOffer(raw["from"], `${path}.from`),
|
|
384
|
-
failoverMaxUsd: numberField(raw, "failoverMaxUsd", path)
|
|
386
|
+
failoverMaxUsd: numberField(raw, "failoverMaxUsd", path),
|
|
387
|
+
failoverMaxPer1kUsd: numberField(raw, "failoverMaxPer1kUsd", path)
|
|
385
388
|
};
|
|
386
389
|
}
|
|
387
390
|
function parseExecution(value, path) {
|
|
@@ -5544,6 +5547,45 @@ var TiktokShopNamespace = class {
|
|
|
5544
5547
|
this._core = _core;
|
|
5545
5548
|
}
|
|
5546
5549
|
_core;
|
|
5550
|
+
/**
|
|
5551
|
+
* TikTok Shop Categories
|
|
5552
|
+
*
|
|
5553
|
+
* List the TikTok Shop category tree for a market: top-level categories with ids, slugs, and images, each with its child categories.
|
|
5554
|
+
*
|
|
5555
|
+
* Price: $0.0012 per request.
|
|
5556
|
+
*
|
|
5557
|
+
* @example
|
|
5558
|
+
* const res = await client.tiktokShop.categories({ region: "US" });
|
|
5559
|
+
*/
|
|
5560
|
+
categories(input, options) {
|
|
5561
|
+
return this._core.run("tiktok_shop.categories", input, options);
|
|
5562
|
+
}
|
|
5563
|
+
/**
|
|
5564
|
+
* TikTok Shop Category Products
|
|
5565
|
+
*
|
|
5566
|
+
* Browse TikTok Shop products inside a category by category id: price, discount, rating, sales count, seller, and product URL per product.
|
|
5567
|
+
*
|
|
5568
|
+
* Price: $0.0012 per request.
|
|
5569
|
+
*
|
|
5570
|
+
* @example
|
|
5571
|
+
* const res = await client.tiktokShop.categoryProducts({ categoryId: "700645", region: "US" });
|
|
5572
|
+
*/
|
|
5573
|
+
categoryProducts(input, options) {
|
|
5574
|
+
return this._core.run("tiktok_shop.category_products", input, options);
|
|
5575
|
+
}
|
|
5576
|
+
/**
|
|
5577
|
+
* TikTok Shop Creator
|
|
5578
|
+
*
|
|
5579
|
+
* TikTok Shop creator performance by handle: GMV range, promoted product count, brand collaborations, follower age/gender/location demographics, category GMV split, and video versus live engagement.
|
|
5580
|
+
*
|
|
5581
|
+
* Price: $0.00525 per request plus $0 per result (maximum $0.00525).
|
|
5582
|
+
*
|
|
5583
|
+
* @example
|
|
5584
|
+
* const res = await client.tiktokShop.creator({ handle: "golinutrition" });
|
|
5585
|
+
*/
|
|
5586
|
+
creator(input, options) {
|
|
5587
|
+
return this._core.run("tiktok_shop.creator", input, options);
|
|
5588
|
+
}
|
|
5547
5589
|
/**
|
|
5548
5590
|
* TikTok Shop Product
|
|
5549
5591
|
*
|
|
@@ -5557,6 +5599,19 @@ var TiktokShopNamespace = class {
|
|
|
5557
5599
|
product(input, options) {
|
|
5558
5600
|
return this._core.run("tiktok_shop.product", input, options);
|
|
5559
5601
|
}
|
|
5602
|
+
/**
|
|
5603
|
+
* TikTok Shop Product Full
|
|
5604
|
+
*
|
|
5605
|
+
* Deep TikTok Shop product record from a product URL: affiliate commission rate, units sold and GMV over the last 30 days and lifetime, stock, rating, review count, category tree, listing date, and the seller's own sales totals.
|
|
5606
|
+
*
|
|
5607
|
+
* Price: $0.021 per request plus $0 per result (maximum $0.021).
|
|
5608
|
+
*
|
|
5609
|
+
* @example
|
|
5610
|
+
* const res = await client.tiktokShop.productFull({ url: "https://www.tiktok.com/shop/pdp/1729527313880355335" });
|
|
5611
|
+
*/
|
|
5612
|
+
productFull(input, options) {
|
|
5613
|
+
return this._core.run("tiktok_shop.product_full", input, options);
|
|
5614
|
+
}
|
|
5560
5615
|
/**
|
|
5561
5616
|
* TikTok Shop Product Reviews
|
|
5562
5617
|
*
|
|
@@ -5575,7 +5630,7 @@ var TiktokShopNamespace = class {
|
|
|
5575
5630
|
*
|
|
5576
5631
|
* Search TikTok Shop products by keyword across 15 countries: price, sales, rating, and seller info per product, in one normalized response.
|
|
5577
5632
|
*
|
|
5578
|
-
* Price: $0.
|
|
5633
|
+
* Price: $0.0012 per request.
|
|
5579
5634
|
*
|
|
5580
5635
|
* @example
|
|
5581
5636
|
* const res = await client.tiktokShop.search({ query: "phone case", limit: 3 });
|
|
@@ -5583,12 +5638,25 @@ var TiktokShopNamespace = class {
|
|
|
5583
5638
|
search(input, options) {
|
|
5584
5639
|
return this._core.run("tiktok_shop.search", input, options);
|
|
5585
5640
|
}
|
|
5641
|
+
/**
|
|
5642
|
+
* TikTok Shop Search Suggestions
|
|
5643
|
+
*
|
|
5644
|
+
* Get TikTok Shop search autocomplete terms for a keyword: the long-tail queries shoppers actually type, for keyword and demand research.
|
|
5645
|
+
*
|
|
5646
|
+
* Price: $0.0012 per request.
|
|
5647
|
+
*
|
|
5648
|
+
* @example
|
|
5649
|
+
* const res = await client.tiktokShop.searchSuggestions({ query: "ashwagandha gummies", country: "US" });
|
|
5650
|
+
*/
|
|
5651
|
+
searchSuggestions(input, options) {
|
|
5652
|
+
return this._core.run("tiktok_shop.search_suggestions", input, options);
|
|
5653
|
+
}
|
|
5586
5654
|
/**
|
|
5587
5655
|
* TikTok Shop Store Products
|
|
5588
5656
|
*
|
|
5589
5657
|
* List every product of a TikTok Shop store by URL (title, price, sales, and rating per product plus shop-level stats) with cursor pagination.
|
|
5590
5658
|
*
|
|
5591
|
-
* Price: $0.
|
|
5659
|
+
* Price: $0.0012 per request.
|
|
5592
5660
|
*
|
|
5593
5661
|
* @example
|
|
5594
5662
|
* const res = await client.tiktokShop.shopProducts({ url: "https://www.tiktok.com/shop/store/goli-nutrition/7495794203056835079" });
|