@getlatedev/node 0.2.1329 → 0.2.1330

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 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.1329",
39
+ version: "0.2.1330",
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.1329",
8
+ version: "0.2.1330",
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getlatedev/node",
3
- "version": "0.2.1329",
3
+ "version": "0.2.1330",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -11778,8 +11778,9 @@ export const getAdReview = <ThrowOnError extends boolean = false>(options: Optio
11778
11778
  * can be up to 10 minutes old; an older one is read again. Read reviews when you need
11779
11779
  * them instead of sweeping every ad on a loop. When TikTok answers over quota, Zernio returns 429
11780
11780
  * and answers 429 for that advertiser and connection without calling TikTok for about 60 seconds, then
11781
- * 120, then 240 while TikTok keeps refusing (one step down after a successful call, each with up to 10%
11782
- * of random jitter), with the time left as `Retry-After`; reviews read in the last 10 minutes are still served.
11781
+ * 120, 240, 480 and up to 960 while TikTok keeps refusing, and after an overage each successful call holds
11782
+ * the next one for one step less (480, 240, 120, then 60 seconds) until a success at 60 seconds ends it, each
11783
+ * with up to 10% of random jitter, with the time left as `Retry-After`; reviews read in the last 10 minutes are still served.
11783
11784
  */
11784
11785
  export const getTikTokSmartPlusAdReview = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetTikTokSmartPlusAdReviewData, ThrowOnError>) => {
11785
11786
  return (options?.client ?? client).get<GetTikTokSmartPlusAdReviewResponse, GetTikTokSmartPlusAdReviewError, ThrowOnError>({
@@ -12309,7 +12310,7 @@ export const getTikTokSmartPlusMaterialReport = <ThrowOnError extends boolean =
12309
12310
  *
12310
12311
  * The listing is stored with the time it was read (`listing.readAt`) and listed again when it is older than `maxAgeSeconds`, so it can be up to `maxAgeSeconds` old: a Smart+ ad created on TikTok appears after at most that long (one hour by default). If that relisting fails, Zernio serves the stored listing with `listing.source: fallback` and the relist error in `listing.error`, instead of failing the request; `listing.source: fresh` means the listing was read within `maxAgeSeconds`. Only when no listing was ever stored does the listing error fail the request.
12311
12312
  *
12312
- * TikTok's review endpoint has a strict quota of its own (TikTok documents neither the quota nor its scope). When it is over quota (or Zernio is holding review reads for this advertiser and connection after an overage: about 60 seconds, then 120, then 240 while TikTok keeps refusing, one step down after a successful call, each with up to 10% of random jitter), Zernio stops calling TikTok and answers 200 with the reviews it has: stale reviews in `items`, the Smart+ ads never read in `pendingSmartPlusAdIds` and, when any are pending, `incomplete: true` with `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 stale and pending ads reach TikTok.
12313
+ * TikTok's review endpoint has a strict quota of its own (TikTok documents neither the quota nor its scope). When it is over quota (or Zernio is holding review reads for this advertiser and connection after an overage: about 60 seconds, then 120, 240, 480 and up to 960 while TikTok keeps refusing, and after each successful call one step less, 480 down to 60 seconds, until a success at 60 seconds ends it, each with up to 10% of random jitter), Zernio stops calling TikTok and answers 200 with the reviews it has: stale reviews in `items`, the Smart+ ads never read in `pendingSmartPlusAdIds` and, when any are pending, `incomplete: true` with `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 stale and pending ads reach TikTok.
12313
12314
  *
12314
12315
  * A Smart+ ad whose review TikTok refuses on its own (for example one deleted on TikTok since the listing was read) is returned in `failedSmartPlusAds` with TikTok's error and `refusedAt`, 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 keep their stored review, or stay in `pendingSmartPlusAdIds` when they have none, and are read first by the next request. A refusal of a single ad is stored for 24 hours and read again once it is older than `maxAgeSeconds`; when an ad has both a stored review and a stored refusal, the more recent one is returned. When both halves of a refused batch are refused with the same TikTok error (for example a permission error), Zernio stops calling TikTok for that page: when every Smart+ ad of the page has a stored review or refusal, it serves them and returns the refusal in `reviewError`; when some ad was never read, the whole request fails with that error.
12315
12316
  *