@getlatedev/node 0.2.1740 → 0.2.1742

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.1740",
39
+ version: "0.2.1742",
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.1740",
8
+ version: "0.2.1742",
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.1740",
3
+ "version": "0.2.1742",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -3942,7 +3942,11 @@ export const selectCampaignManagerProfile = <ThrowOnError extends boolean = fals
3942
3942
 
3943
3943
  /**
3944
3944
  * Get Amazon Ads OAuth connect URL
3945
- * Starts Login with Amazon for Amazon Ads (scope `advertising::campaign_management`). The Amazon login becomes an account with platform `amazonads`; every advertiser profile it reaches, in the NA, EU and FE regions, is a conversions destination (`GET /v1/ads/conversions/destinations`).
3945
+ * Starts Login with Amazon for Amazon Ads (scope `advertising::campaign_management`). The Amazon login becomes an account with platform `amazonads`.
3946
+ *
3947
+ * Every seller and vendor advertiser profile it reaches, in the NA, EU and FE regions, is an ad account (`GET /v1/ads/accounts`) and a conversions destination (`GET /v1/ads/conversions/destinations`).
3948
+ *
3949
+ * Pass `region` so the user signs in on their own region's Amazon consent page; the connection still reaches the profiles of every region.
3946
3950
  *
3947
3951
  * Errors on the redirect: `amazonads_no_profiles` (the login reaches no advertiser), `amazonads_no_refresh_token`.
3948
3952
  *
@@ -14620,6 +14624,10 @@ export const listLocalServicesLeadConversations = <ThrowOnError extends boolean
14620
14624
  * - A customer synced for the first time is populated on the next discovery pass rather than waiting for its daily slot.
14621
14625
  * - Connecting an account or triggering a manual sync refreshes it immediately.
14622
14626
  *
14627
+ * ### Amazon
14628
+ *
14629
+ * Amazon Sponsored Products and Sponsored Brands keywords and ad group negatives are listed too (`platform: amazon`), refreshed about every six hours with their trailing 30-day metrics from the targeting reports. `resourceName` is `{adGroupId}~{keywordId}` there. Campaign-level negatives are under `GET /v1/ads/campaigns/{campaignId}/negative-keywords`.
14630
+ *
14623
14631
  */
14624
14632
  export const listAdKeywords = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<ListAdKeywordsData, ThrowOnError>) => {
14625
14633
  return (options?.client ?? client).get<ListAdKeywordsResponse, ListAdKeywordsError, ThrowOnError>({
@@ -14638,6 +14646,10 @@ export const listAdKeywords = <ThrowOnError extends boolean = false>(options?: O
14638
14646
  * which replaces the set). Set `negative: true` to add ad-group-level negatives
14639
14647
  * instead of positive keywords.
14640
14648
  *
14649
+ * ### Amazon
14650
+ *
14651
+ * On an Amazon Ads connection the keywords go to a Sponsored Products or Sponsored Brands ad group (a Sponsored Display ad group returns 422). Positives bid the ad group default. Negatives match exact or phrase: a negative sent without `matchType` is exact, and a broad negative returns 422.
14652
+ *
14641
14653
  */
14642
14654
  export const addAdKeywords = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<AddAdKeywordsData, ThrowOnError>) => {
14643
14655
  return (options?.client ?? client).post<AddAdKeywordsResponse, AddAdKeywordsError, ThrowOnError>({
@@ -14656,6 +14668,10 @@ export const addAdKeywords = <ThrowOnError extends boolean = false>(options: Opt
14656
14668
  *
14657
14669
  * Negative keywords have no status or bid on Google and cannot be paused, enabled or given a bid.
14658
14670
  *
14671
+ * ### Amazon
14672
+ *
14673
+ * Amazon keywords take `status` and `cpcBid`. Amazon negative keywords take `status` only (a `cpcBid` on one returns 422), and a Sponsored Brands negative cannot be paused (422).
14674
+ *
14659
14675
  */
14660
14676
  export const updateAdKeyword = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateAdKeywordData, ThrowOnError>) => {
14661
14677
  return (options?.client ?? client).patch<UpdateAdKeywordResponse, UpdateAdKeywordError, ThrowOnError>({
@@ -14670,6 +14686,10 @@ export const updateAdKeyword = <ThrowOnError extends boolean = false>(options: O
14670
14686
  *
14671
14687
  * Removes one keyword criterion (positive or negative) from its ad group (M.140).
14672
14688
  *
14689
+ * ### Amazon
14690
+ *
14691
+ * On Amazon the keyword is archived, which is Amazon's delete: it stays in reports and can never be enabled again.
14692
+ *
14673
14693
  */
14674
14694
  export const removeAdKeyword = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<RemoveAdKeywordData, ThrowOnError>) => {
14675
14695
  return (options?.client ?? client).delete<RemoveAdKeywordResponse, RemoveAdKeywordError, ThrowOnError>({
@@ -15578,6 +15598,10 @@ export const listAdCampaigns = <ThrowOnError extends boolean = false>(options?:
15578
15598
  * - `startDate` / `endDate` set the campaign's schedule and need that campaign budget (400 without one).
15579
15599
  * - Without a budget, each ad set carries its own budget and dates.
15580
15600
  *
15601
+ * ### Amazon Ads
15602
+ *
15603
+ * `platformSpecificData` (required) names the ad product and its campaign settings (`AmazonAdsCampaignPlatformData`), and the campaign needs a budget. `goal` must fit the product. `startDate` / `endDate` are calendar days in the profile time zone. Ad groups join it with `existingCampaignId` on POST /v1/ads/create.
15604
+ *
15581
15605
  */
15582
15606
  export const createAdCampaign = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateAdCampaignData, ThrowOnError>) => {
15583
15607
  return (options?.client ?? client).post<CreateAdCampaignResponse, CreateAdCampaignError, ThrowOnError>({
@@ -15761,8 +15785,8 @@ export const getAdCampaignDetails = <ThrowOnError extends boolean = false>(optio
15761
15785
  * | `networkSettings` | 400 | Search only | 400 |
15762
15786
  * | `trackingUrlTemplate`, `finalUrlSuffix` | 400 | Yes | 400 |
15763
15787
  * | `sharedBudgetId` | 400 | Yes | 400 |
15764
- * | `budget` (CBO; ABO returns 409) | Yes | Daily only | OpenAI and Reddit: daily or lifetime; others 501 |
15765
- * | `name` | Yes | 501 | Reddit: Yes; others 501 |
15788
+ * | `budget` (CBO; ABO returns 409) | Yes | Daily only | OpenAI and Reddit: daily or lifetime; Amazon: daily, or the lifetime type a Sponsored Brands campaign was created with; others 501 |
15789
+ * | `name` | Yes | 501 | Reddit and Amazon: Yes; others 501 |
15766
15790
  * | `platformSpecificData.spendCap` | Yes | 400 | 400 |
15767
15791
  * | `accountId` (empty campaigns) | Yes | - | - |
15768
15792
  *
@@ -15834,6 +15858,8 @@ export const updateAdCampaign = <ThrowOnError extends boolean = false>(options:
15834
15858
  * - Meta, Google, TikTok, LinkedIn and X delete it.
15835
15859
  * - OpenAI, Reddit and Pinterest have no campaign delete and archive it instead (see below).
15836
15860
  *
15861
+ * - Amazon archives the campaign: archiving is Amazon's delete, it is permanent, and the campaign stays in reports.
15862
+ *
15837
15863
  * Locally, all Ad documents for this campaign are marked `status: cancelled`.
15838
15864
  *
15839
15865
  * ### Empty campaigns
@@ -15892,7 +15918,11 @@ export const deleteAdCampaign = <ThrowOnError extends boolean = false>(options:
15892
15918
  *
15893
15919
  * ### Platform
15894
15920
  *
15895
- * The platform is always discovered from the campaign itself. A non-Google campaign returns 501 rather than 404, whether or not `platform` was passed.
15921
+ * The platform is always discovered from the campaign itself. A campaign on another platform than Google or Amazon returns 501 rather than 404, whether or not `platform` was passed.
15922
+ *
15923
+ * ### Amazon
15924
+ *
15925
+ * Amazon Sponsored Products campaigns hold campaign-level negative keywords (exact or phrase), read live with no cache (`cachedAt` null). Sponsored Brands and Sponsored Display campaigns have none and return 422.
15896
15926
  *
15897
15927
  */
15898
15928
  export const listCampaignNegativeKeywords = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ListCampaignNegativeKeywordsData, ThrowOnError>) => {
@@ -15915,8 +15945,12 @@ export const listCampaignNegativeKeywords = <ThrowOnError extends boolean = fals
15915
15945
  * - Send the same request again to finish a failed replace.
15916
15946
  * - Send an empty array to clear every campaign negative.
15917
15947
  *
15918
- * The platform is always discovered from the campaign itself; a non-Google
15919
- * campaign returns 501 rather than 404, whether or not `platform` was sent.
15948
+ * The platform is always discovered from the campaign itself; a campaign on another
15949
+ * platform than Google or Amazon returns 501 rather than 404, whether or not `platform` was sent.
15950
+ *
15951
+ * ### Amazon
15952
+ *
15953
+ * On an Amazon Sponsored Products campaign the missing negatives are created and the rest archived. A negative without `matchType` is exact; broad returns 422.
15920
15954
  *
15921
15955
  */
15922
15956
  export const replaceCampaignNegativeKeywords = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ReplaceCampaignNegativeKeywordsData, ThrowOnError>) => {
@@ -15934,8 +15968,12 @@ export const replaceCampaignNegativeKeywords = <ThrowOnError extends boolean = f
15934
15968
  * - Keywords already on the campaign are not added twice; keywords not on it are skipped on remove.
15935
15969
  * - Changes go to Google in `create`/`remove` mutates of up to 5,000 operations, like the full replace.
15936
15970
  *
15937
- * The platform is always discovered from the campaign itself; a non-Google
15938
- * campaign returns 501 rather than 404, whether or not `platform` was sent.
15971
+ * The platform is always discovered from the campaign itself; a campaign on another
15972
+ * platform than Google or Amazon returns 501 rather than 404, whether or not `platform` was sent.
15973
+ *
15974
+ * ### Amazon
15975
+ *
15976
+ * On an Amazon Sponsored Products campaign `add` creates the missing negatives and `remove` archives the matching ones (text and match type, case-insensitive). A negative without `matchType` is exact; broad returns 422.
15939
15977
  *
15940
15978
  */
15941
15979
  export const editCampaignNegativeKeywords = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<EditCampaignNegativeKeywordsData, ThrowOnError>) => {
@@ -16408,7 +16446,7 @@ export const updateAdSet = <ThrowOnError extends boolean = false>(options: Optio
16408
16446
  * `status: cancelled`.
16409
16447
  *
16410
16448
  * Delete is soft on platforms that have no hard delete: LinkedIn moves the
16411
- * campaign to `PENDING_DELETION`, Pinterest and Reddit archive the ad group, and X
16449
+ * campaign to `PENDING_DELETION`, Pinterest, Reddit and Amazon archive the ad group (permanent on Amazon), and X
16412
16450
  * soft-flags the line item. Google removes the ad group. All remain readable
16413
16451
  * for reporting.
16414
16452
  *
@@ -16421,10 +16459,10 @@ export const deleteAdSet = <ThrowOnError extends boolean = false>(options: Optio
16421
16459
  };
16422
16460
 
16423
16461
  /**
16424
- * Read a Reddit ad group's targeting and schedule
16462
+ * Read an ad group's targeting and schedule
16425
16463
  * Shows a Reddit ad group's live targeting and schedule in the same shape PUT /v1/ads/ad-sets/{adSetId} takes, so you can prefill an editor.
16426
16464
  *
16427
- * It is read live from Reddit on every call. Reddit only; every other platform returns 501.
16465
+ * It is read live from the platform on every call. Reddit and Amazon only; every other platform returns 501.
16428
16466
  *
16429
16467
  * ### How fields come back
16430
16468
  *
@@ -16433,6 +16471,10 @@ export const deleteAdSet = <ThrowOnError extends boolean = false>(options: Optio
16433
16471
  * - Languages come back as lowercase ISO 639-1 codes.
16434
16472
  * - Targeting Zernio cannot edit (devices, platforms, carriers, automated expansion) is left out and kept on every edit.
16435
16473
  *
16474
+ * ### Amazon
16475
+ *
16476
+ * On Amazon it reads the ad group's live targets and negative targets in Amazon's own expression shape: `targeting` is `{ product, targets, negativeTargets }`, each target with `targetId`, `state`, `expressionType`, `expression` and `bid`. Keywords are read through `GET /v1/ads/keywords`. Editing Amazon targets is not available yet.
16477
+ *
16436
16478
  */
16437
16479
  export const getAdSetTargeting = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetAdSetTargetingData, ThrowOnError>) => {
16438
16480
  return (options?.client ?? client).get<GetAdSetTargetingResponse, GetAdSetTargetingError, ThrowOnError>({
@@ -16751,6 +16793,8 @@ export const updateAd = <ThrowOnError extends boolean = false>(options: OptionsL
16751
16793
  * - OpenAI Ads has no delete API: the ad is archived instead (a terminal state, the closest equivalent).
16752
16794
  * - Reddit Ads has no delete either: the ad is archived (`configured_status` ARCHIVED).
16753
16795
  *
16796
+ * - Amazon Ads archives the ad (state ARCHIVED). Archiving is permanent.
16797
+ *
16754
16798
  * To delete a whole campaign on purpose use `DELETE /v1/ads/campaigns/{campaignId}`.
16755
16799
  *
16756
16800
  * ### Parents
@@ -19570,7 +19614,7 @@ export const replaceGoogleListingGroupFilters = <ThrowOnError extends boolean =
19570
19614
  * Create standalone ad
19571
19615
  * Creates a paid ad with your own creative, building the campaign and ad set it needs or adding it to existing ones.
19572
19616
  *
19573
- * Works across Meta, Google Ads, Pinterest, TikTok, X, LinkedIn, OpenAI Ads (ChatGPT Ads), Reddit Ads and Microsoft Ads. Per-platform required fields, budget minimums, and video-ad rules are documented on each property below.
19617
+ * Works across Meta, Google Ads, Pinterest, TikTok, X, LinkedIn, OpenAI Ads (ChatGPT Ads), Reddit Ads, Microsoft Ads and Amazon Ads (Sponsored Products, Sponsored Brands and Sponsored Display, see `AmazonAdsPlatformData`). Per-platform required fields, budget minimums, and video-ad rules are documented on each property below.
19574
19618
  *
19575
19619
  * ### Request shapes
19576
19620
  *
@@ -20861,10 +20905,11 @@ export const deleteAdAudience = <ThrowOnError extends boolean = false>(options:
20861
20905
  *
20862
20906
  * ### Large lists
20863
20907
  *
20864
- * Send lists over 10,000 people as several requests to the same audience: each one adds to it, except on LinkedIn.
20908
+ * Send lists over 10,000 people as several requests to the same audience: each one adds to it.
20865
20909
  *
20866
20910
  * - **TikTok and Pinterest**: the first upload creates the audience on the platform, later uploads add to it. TikTok allows 24 updates per audience per day.
20867
- * - **LinkedIn**: each upload replaces the whole list (a list-upload segment holds one list), so send the full list in one request.
20911
+ * - **LinkedIn**: LinkedIn takes a list as one file, so Zernio keeps the hashed emails sent to each list and uploads the whole list about a minute after the requests stop (every 15 minutes while they keep coming).
20912
+ * - **LinkedIn limits**: a list holds at most 300,000 contacts (more returns 422 and changes nothing). LinkedIn matches each upload in up to 48 hours. A list last uploaded before 2026-11-23 starts again from its next upload.
20868
20913
  *
20869
20914
  * ### Reddit
20870
20915
  *
@@ -20886,13 +20931,14 @@ export const addUsersToAdAudience = <ThrowOnError extends boolean = false>(optio
20886
20931
 
20887
20932
  /**
20888
20933
  * Remove users from audience
20889
- * Removes people from a Meta or Reddit customer list audience. Same body as
20934
+ * Removes people from a Meta, Reddit or LinkedIn customer list audience. Same body as
20890
20935
  * `POST /v1/ads/audiences/{audienceId}/users`: plaintext keys are normalized and SHA-256 hashed
20891
20936
  * exactly like an upload and hashed keys are sent as is, so a row removes the person it added.
20892
20937
  *
20893
- * Meta and Reddit only, customer_list only. Every other platform returns 422 with code `feature_not_available`,
20894
- * and every other audience type returns 422. Max 10,000 users per request. The platform applies the removal
20895
- * asynchronously, so the audience size does not drop immediately. On Reddit `invalidEntrySamples` is always empty.
20938
+ * - Meta, Reddit and LinkedIn customer_list audiences only. Every other platform returns 422 with code `feature_not_available`, and every other audience type returns 422.
20939
+ * - Max 10,000 users per request. The platform applies the removal asynchronously, so the audience size does not drop immediately.
20940
+ * - LinkedIn removes them from the list Zernio keeps and uploads what is left about a minute later.
20941
+ * - On Reddit `invalidEntrySamples` is always empty.
20896
20942
  *
20897
20943
  */
20898
20944
  export const removeUsersFromAdAudience = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<RemoveUsersFromAdAudienceData, ThrowOnError>) => {