@getlatedev/node 0.2.1295 → 0.2.1296
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.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +11 -10
package/dist/index.js
CHANGED
|
@@ -36,7 +36,7 @@ module.exports = __toCommonJS(index_exports);
|
|
|
36
36
|
// package.json
|
|
37
37
|
var package_default = {
|
|
38
38
|
name: "@getlatedev/node",
|
|
39
|
-
version: "0.2.
|
|
39
|
+
version: "0.2.1296",
|
|
40
40
|
description: "The official Node.js library for the Zernio API",
|
|
41
41
|
main: "dist/index.js",
|
|
42
42
|
module: "dist/index.mjs",
|
package/dist/index.mjs
CHANGED
|
@@ -5,7 +5,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
5
5
|
// package.json
|
|
6
6
|
var package_default = {
|
|
7
7
|
name: "@getlatedev/node",
|
|
8
|
-
version: "0.2.
|
|
8
|
+
version: "0.2.1296",
|
|
9
9
|
description: "The official Node.js library for the Zernio API",
|
|
10
10
|
main: "dist/index.js",
|
|
11
11
|
module: "dist/index.mjs",
|
package/package.json
CHANGED
package/src/generated/sdk.gen.ts
CHANGED
|
@@ -11462,13 +11462,14 @@ export const getAdReview = <ThrowOnError extends boolean = false>(options: Optio
|
|
|
11462
11462
|
* carousel under its own material id, so those entries come back with the review verdict and
|
|
11463
11463
|
* null descriptive fields. TikTok returns no review timestamp; `readAt` is when Zernio read it.
|
|
11464
11464
|
*
|
|
11465
|
-
* TikTok's review endpoint has a strict quota of its own. One TikTok call reads the
|
|
11466
|
-
*
|
|
11467
|
-
* connection, advertiser and Smart+ ad, so sibling ads
|
|
11468
|
-
* can be up to 10 minutes old. Read reviews when you need
|
|
11469
|
-
* loop. When TikTok answers over quota, Zernio returns 429
|
|
11470
|
-
* 429 for that advertiser and connection without calling TikTok
|
|
11471
|
-
*
|
|
11465
|
+
* TikTok's review endpoint has a strict quota of its own, which behaves per advertiser. One TikTok call reads the
|
|
11466
|
+
* review of the live Smart+ ads of the ad group up to 50 creatives in total (TikTok refuses more),
|
|
11467
|
+
* and each review is cached for 10 minutes per connection, advertiser and Smart+ ad, so sibling ads
|
|
11468
|
+
* are answered from the cache and `readAt` can be up to 10 minutes old. Read reviews when you need
|
|
11469
|
+
* them instead of sweeping every ad on a loop. When TikTok answers over quota, Zernio returns 429
|
|
11470
|
+
* and answers 429 for that advertiser and connection without calling TikTok for 60 seconds, then
|
|
11471
|
+
* 120, then 240 while TikTok keeps refusing (back to 60 after a successful call), with the time left
|
|
11472
|
+
* as `Retry-After`; cached reviews are still served.
|
|
11472
11473
|
*/
|
|
11473
11474
|
export const getTikTokSmartPlusAdReview = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetTikTokSmartPlusAdReviewData, ThrowOnError>) => {
|
|
11474
11475
|
return (options?.client ?? client).get<GetTikTokSmartPlusAdReviewResponse, GetTikTokSmartPlusAdReviewError, ThrowOnError>({
|
|
@@ -11992,13 +11993,13 @@ export const getTikTokSmartPlusMaterialReport = <ThrowOnError extends boolean =
|
|
|
11992
11993
|
* Review status of every TikTok Smart+ ad of an advertiser
|
|
11993
11994
|
* Returns the review verdict of every Upgraded Smart+ ad of one TikTok advertiser, with each creative's verdict, in one paginated read. Use it to refresh reviews periodically: one call (plus its pages) per advertiser per refresh, instead of `GET /v1/ads/{adId}/tiktok-smart-plus-review` per ad.
|
|
11994
11995
|
*
|
|
11995
|
-
* Zernio lists the advertiser's Smart+ ads with `/smart_plus/ad/get/` (deleted ones only with `includeDeleted=true`; the listing is cached for
|
|
11996
|
+
* Zernio lists the advertiser's Smart+ ads with `/smart_plus/ad/get/` (deleted ones only with `includeDeleted=true`; the listing is cached for 10 minutes) and reads `/smart_plus/ad/review_info/` for Smart+ ads holding up to 50 creatives in total per call (TikTok refuses more; a Smart+ ad with more than 50 creatives is read alone), across ad groups, one call after another. A full refresh of N Smart+ ads with C creatives in total costs about `ceil(N / 100)` listing calls and `ceil(C / 50)` review calls on TikTok. When TikTok still refuses a call for its creative count, Zernio lowers the creative cap for that advertiser and reads the same ads again in smaller calls, never resending the refused size. Each review is cached for 10 minutes per connection, advertiser and Smart+ ad, shared with the single-ad read, so cached reviews are served without calling TikTok and `readAt` can be up to 10 minutes old.
|
|
11996
11997
|
*
|
|
11997
|
-
* TikTok's review endpoint has a strict quota of its own. When it is over quota (or Zernio is holding review reads for this advertiser and connection after an overage), Zernio stops calling TikTok and answers 200 with the reviews it has: `incomplete: true`, the Smart+ ads still to read in `pendingSmartPlusAdIds`, and `retryAfterSeconds` (also in the `Retry-After` header). Every Smart+ ad of the page is in `items`, `failedSmartPlusAds` or `pendingSmartPlusAdIds`. Wait `retryAfterSeconds` and read the same page again: only the pending ads reach TikTok.
|
|
11998
|
+
* TikTok's review endpoint has a strict quota of its own, which behaves per advertiser. When it is over quota (or Zernio is holding review reads for this advertiser and connection after an overage: 60 seconds, then 120, then 240 while TikTok keeps refusing, back to 60 after a successful call), Zernio stops calling TikTok and answers 200 with the reviews it has: `incomplete: true`, the Smart+ ads still to read in `pendingSmartPlusAdIds`, and `retryAfterSeconds` (also in the `Retry-After` header). Every Smart+ ad of the page is in `items`, `failedSmartPlusAds` or `pendingSmartPlusAdIds`. Wait `retryAfterSeconds` and read the same page again: only the pending ads reach TikTok.
|
|
11998
11999
|
*
|
|
11999
12000
|
* A Smart+ ad whose review TikTok refuses on its own (for example one deleted on TikTok since the listing was cached) is returned in `failedSmartPlusAds` with TikTok's error, and the rest of the page is still read. Zernio finds it by splitting the refused batch in halves, at most 16 extra TikTok calls per page; ads still unresolved after that come back in `failedSmartPlusAds` with the batch error. A refusal of a single ad is remembered for 10 minutes. When both halves of a refused batch are refused with the same TikTok error (for example a permission error), the whole request fails with that error instead.
|
|
12000
12001
|
*
|
|
12001
|
-
* Items are sorted by `adGroupId`, then `smartPlusAdId`, so pages are stable.
|
|
12002
|
+
* Items are sorted by `adGroupId`, then `smartPlusAdId`, so pages are stable. Keep one page in flight per advertiser and read its pages one after another: parallel pages of one advertiser spend its review quota at the same time and come back incomplete. The quota behaves per advertiser (observed, not documented by TikTok), so different advertisers can be read in parallel.
|
|
12002
12003
|
*/
|
|
12003
12004
|
export const listTikTokSmartPlusReviews = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ListTikTokSmartPlusReviewsData, ThrowOnError>) => {
|
|
12004
12005
|
return (options?.client ?? client).get<ListTikTokSmartPlusReviewsResponse, ListTikTokSmartPlusReviewsError, ThrowOnError>({
|