@getlatedev/node 0.2.1756 → 0.2.1758

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.d.mts CHANGED
@@ -40989,12 +40989,13 @@ type GetConnectUrlData = {
40989
40989
  * - X Ads (platform=xads): `x_ads_denied`, `x_ads_auth_failed`, `x_ads_config_error`, `x_ads_account_not_found`, `x_ads_state_error`, `x_ads_token_failed`, `x_ads_token_missing`, `x_ads_callback_error`.
40990
40990
  * - Reddit Ads (platform=redditads): `reddit_ads_auth_failed`, `reddit_ads_invalid_state`, `reddit_ads_access_denied`, `reddit_ads_scope_not_granted`, `reddit_ads_no_ad_accounts`, `reddit_ads_callback_error`.
40991
40991
  * - Microsoft Ads (platform=microsoftads): `microsoft_ads_auth_failed`, `microsoft_ads_invalid_state`, `microsoft_ads_access_denied`, `microsoft_ads_scope_not_granted`, `microsoft_ads_unknown_user`, `microsoft_ads_no_ad_accounts`, `microsoft_ads_callback_error`.
40992
+ * - Snapchat Ads (platform=snapchatads): `snapchat_ads_auth_failed`, `snapchat_ads_invalid_state`, `snapchat_ads_access_denied`, `snapchat_ads_no_ad_accounts`, `snapchat_ads_callback_error`.
40992
40993
  * - Shopify (platform=shopify): `shopify_auth_failed`, `shopify_config_error`, `shopify_invalid_state`, `shopify_invalid_hmac`, `shopify_invalid_shop`, `shopify_missing_scopes`, `shopify_callback_error`.
40993
40994
  *
40994
40995
  * Notes:
40995
40996
  *
40996
40997
  * 1. On this endpoint every upstream OAuth error collapses into `oauth_denied`, with the provider's values in the `platform_error*` params. The dedicated ads flows differ: they use their own denial slugs, and `google_ads_auth_failed` and `tiktok_ads_auth_failed` may carry the provider's raw error string in `error_message`.
40997
- * 2. On the tiktok and twitter ads flows `platform` carries the ads platform id (`tiktokads`, `xads`), not the value in the request path. The googleads, redditads, microsoftads and shopify flows report `googleads`, `redditads`, `microsoftads` and `shopify`.
40998
+ * 2. On the tiktok and twitter ads flows `platform` carries the ads platform id (`tiktokads`, `xads`), not the value in the request path. The googleads, redditads, microsoftads, snapchatads and shopify flows report `googleads`, `redditads`, `microsoftads`, `snapchatads` and `shopify`.
40998
40999
  * 3. `missing_tiktok_permissions`: the TikTok authorization left out a permission the already-connected account needs, so nothing changed and it keeps working as before. User-fixable: connect again and accept every permission on TikTok's screen.
40999
41000
  * 4. `instagram_login_method_mismatch`: an Instagram Login authorization landed on a profile whose Instagram account is connected through Facebook Login, so nothing changed. To refresh it, connect again with `loginMethod=facebook_login`. To move it to Instagram Login, disconnect it first.
41000
41001
  *
@@ -41269,7 +41270,7 @@ type ConnectAdsData = {
41269
41270
  * instagram_login flow no ads account can be created; do not use this value for those accounts.
41270
41271
  *
41271
41272
  */
41272
- platform: 'facebook' | 'instagram' | 'linkedin' | 'tiktok' | 'twitter' | 'pinterest' | 'googleads' | 'redditads' | 'microsoftads';
41273
+ platform: 'facebook' | 'instagram' | 'linkedin' | 'tiktok' | 'twitter' | 'pinterest' | 'googleads' | 'redditads' | 'microsoftads' | 'snapchatads';
41273
41274
  };
41274
41275
  query: {
41275
41276
  /**
@@ -41278,7 +41279,7 @@ type ConnectAdsData = {
41278
41279
  * - `twitter` (X Ads): required.
41279
41280
  * - `tiktok`: optional. Omit it for ads-only mode (no TikTok posting account linked; ad creation uses a Brand Identity instead of a TT_USER).
41280
41281
  * - Same-token platforms (`facebook`, `instagram`, `linkedin`, `pinterest`): picks which posting account the ads connection uses when the profile holds several of that platform. With one, it can be omitted.
41281
- * - Standalone platforms (`googleads`, `redditads`, `microsoftads`): ignored.
41282
+ * - Standalone platforms (`googleads`, `redditads`, `microsoftads`, `snapchatads`): ignored.
41282
41283
  *
41283
41284
  * On same-token platforms, an id that names no active account of the platform on the profile is ignored. Exception: with `force=true`, when it names the posting account the profile's ads connection hangs off, that account is no longer connected.
41284
41285
  *
@@ -41296,6 +41297,7 @@ type ConnectAdsData = {
41296
41297
  * - `googleads`: bare customer id digits.
41297
41298
  * - `redditads`: Reddit ad account id, `a2_<id>` or `t2_<id>`.
41298
41299
  * - `microsoftads`: bare numeric account id (the Id, not the account number).
41300
+ * - `snapchatads`: Snapchat ad account UUID.
41299
41301
  * - `twitter` (X Ads): base36 account id.
41300
41302
  * - `tiktok` (TikTok Ads): numeric advertiser id.
41301
41303
  *
@@ -41311,7 +41313,7 @@ type ConnectAdsData = {
41311
41313
  *
41312
41314
  * **Through OAuth**: on Meta the scope is kept when this call returns an `authUrl`, so the Meta Ads account created after OAuth is scoped (only its scoped ad accounts synced and subscribed) from the start.
41313
41315
  *
41314
- * On `googleads`, `redditads` and `microsoftads` it is kept through OAuth when `redirect_url` is set, so the new connection syncs only scoped ad accounts from the first sync.
41316
+ * On `googleads`, `redditads`, `microsoftads` and `snapchatads` it is kept through OAuth when `redirect_url` is set, so the new connection syncs only scoped ad accounts from the first sync.
41315
41317
  *
41316
41318
  * On `tiktok` it is kept through OAuth with or without `redirect_url`. The TikTok Ads connection holds only the scoped advertisers from the first sync, and is named after the first of them. Its `platformUserId` and cached Brand Identity follow that advertiser too.
41317
41319
  *
@@ -41396,12 +41398,12 @@ type ConnectAdsData = {
41396
41398
  * On success:
41397
41399
  *
41398
41400
  * - `tiktok`: lands on the URL unchanged.
41399
- * - `twitter`, `googleads`, `redditads` and `microsoftads`: append `connected` (the ads platform id: `xads`, `googleads`, `redditads` or `microsoftads`), `profileId`, `accountId` (the ads connection) and `username`.
41401
+ * - `twitter`, `googleads`, `redditads`, `microsoftads` and `snapchatads`: append `connected` (the ads platform id: `xads`, `googleads`, `redditads`, `microsoftads` or `snapchatads`), `profileId`, `accountId` (the ads connection) and `username`.
41400
41402
  * - Same-token platforms (`facebook`, `instagram`, `linkedin`, `pinterest`): append `connected`, `profileId`, `accountId`, `username` and, on API-key calls, `connect_token`.
41401
41403
  *
41402
41404
  * On failure the same error contract applies as on GET /v1/connect/{platform}: `error` and `platform` are always appended, other params are optional, and the value list there is not exhaustive.
41403
41405
  *
41404
- * On the tiktok, twitter, googleads, redditads and microsoftads flows, `platform` carries the ads platform id (`tiktokads`, `xads`, `googleads`, `redditads`, `microsoftads`), not the value used in the request path.
41406
+ * On the tiktok, twitter, googleads, redditads, microsoftads and snapchatads flows, `platform` carries the ads platform id (`tiktokads`, `xads`, `googleads`, `redditads`, `microsoftads`, `snapchatads`), not the value used in the request path.
41405
41407
  *
41406
41408
  */
41407
41409
  redirect_url?: string;
@@ -65069,7 +65071,7 @@ type ListAdsData = {
65069
65071
  * Meta only: Facebook Page ID. Returns only ads whose creative is backed by this Page (a Meta ad account serves ads for every Page in the Business Manager). Matches each ad's `creative.pageId`; ads with no page signal (rare IG-only creatives) never match. Mirrors the same filter on /v1/ads/campaigns and /v1/ads/tree.
65070
65072
  */
65071
65073
  pageId?: string;
65072
- platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon' | 'tradedesk';
65074
+ platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon' | 'tradedesk' | 'snapchat';
65073
65075
  /**
65074
65076
  * Meta ad ID. Returns the ad with this platform-side ad ID.
65075
65077
  */
@@ -67073,7 +67075,7 @@ type ListAdCampaignsData = {
67073
67075
  * Meta only: Facebook Page ID. Campaigns have no Page of their own, so this keeps campaigns having at least one ad backed by this Page, with adCount and metrics computed over those ads only. Mirrors the same filter on /v1/ads and /v1/ads/tree.
67074
67076
  */
67075
67077
  pageId?: string;
67076
- platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon' | 'tradedesk';
67078
+ platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon' | 'tradedesk' | 'snapchat';
67077
67079
  /**
67078
67080
  * Profile ID
67079
67081
  */
@@ -67257,7 +67259,7 @@ type CreateAdCampaignError = (unknown | ErrorResponse);
67257
67259
  type UpdateAdCampaignStatusData = {
67258
67260
  body: {
67259
67261
  status: 'active' | 'paused';
67260
- platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon' | 'tradedesk';
67262
+ platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon' | 'tradedesk' | 'snapchat';
67261
67263
  };
67262
67264
  headers?: {
67263
67265
  /**
@@ -67491,7 +67493,7 @@ type UpdateAdCampaignData = {
67491
67493
  /**
67492
67494
  * Required: platform campaign IDs are not globally unique.
67493
67495
  */
67494
- platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon' | 'tradedesk';
67496
+ platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon' | 'tradedesk' | 'snapchat';
67495
67497
  /**
67496
67498
  * **Meta only.** Zernio SocialAccount id owning the ad account. Needed only for an EMPTY campaign (zero ads); ignored otherwise.
67497
67499
  */
@@ -67618,7 +67620,7 @@ type UpdateAdCampaignResponse = ({
67618
67620
  type UpdateAdCampaignError = (unknown | ErrorResponse);
67619
67621
  type DeleteAdCampaignData = {
67620
67622
  body: {
67621
- platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon' | 'tradedesk';
67623
+ platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon' | 'tradedesk' | 'snapchat';
67622
67624
  /**
67623
67625
  * Zernio SocialAccount id owning the ad account. Required only to delete an EMPTY campaign (zero ads), which has no local Ad documents to resolve a token from.
67624
67626
  */
@@ -67789,7 +67791,7 @@ type BulkUpdateAdCampaignStatusData = {
67789
67791
  /**
67790
67792
  * The ad platform, e.g. `google` for Google Ads. The ads connection slug (`googleads`, `tiktokads`, ...) is accepted as an alias. `metaads` is not: send `facebook` or `instagram`.
67791
67793
  */
67792
- platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'googleads' | 'tiktokads' | 'linkedinads' | 'pinterestads' | 'xads' | 'openaiads' | 'redditads' | 'microsoftads';
67794
+ platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'googleads' | 'tiktokads' | 'linkedinads' | 'pinterestads' | 'xads' | 'openaiads' | 'redditads' | 'microsoftads' | 'snapchat' | 'snapchatads';
67793
67795
  }>;
67794
67796
  };
67795
67797
  headers?: {
@@ -68198,7 +68200,7 @@ type ListAdSetsData = {
68198
68200
  */
68199
68201
  live?: boolean;
68200
68202
  page?: number;
68201
- platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit';
68203
+ platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'snapchat';
68202
68204
  /**
68203
68205
  * Filter by the ad set's stored `status`, the value each row returns. A live read does not change it. Rows whose `status` is null match no filter.
68204
68206
  */
@@ -68363,9 +68365,9 @@ type CreateAdSetData = {
68363
68365
  */
68364
68366
  accountId: string;
68365
68367
  /**
68366
- * "google" and "reddit" are implemented; every other value returns 501.
68368
+ * "google", "reddit" and "snapchat" are implemented; every other value returns 501.
68367
68369
  */
68368
- platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit';
68370
+ platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'snapchat';
68369
68371
  /**
68370
68372
  * Platform campaign ID the ad group is created under (numeric on Google).
68371
68373
  */
@@ -68651,7 +68653,7 @@ type GetAdSetDetailsResponse = ({
68651
68653
  type GetAdSetDetailsError = (unknown | ErrorResponse);
68652
68654
  type UpdateAdSetData = {
68653
68655
  body: {
68654
- platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit';
68656
+ platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'snapchat';
68655
68657
  /**
68656
68658
  * Omit if not updating budget
68657
68659
  */
@@ -69012,7 +69014,7 @@ type GetAdSetTargetingData = {
69012
69014
  /**
69013
69015
  * Disambiguates when the same adSetId string exists on more than one connected platform.
69014
69016
  */
69015
- platform?: 'reddit' | 'amazon';
69017
+ platform?: 'reddit' | 'amazon' | 'snapchat';
69016
69018
  };
69017
69019
  };
69018
69020
  type GetAdSetTargetingResponse = ({
@@ -69034,7 +69036,7 @@ type GetAdSetTargetingError = (ErrorResponse | unknown);
69034
69036
  type UpdateAdSetStatusData = {
69035
69037
  body: {
69036
69038
  status: 'active' | 'paused';
69037
- platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon' | 'tradedesk';
69039
+ platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon' | 'tradedesk' | 'snapchat';
69038
69040
  };
69039
69041
  headers?: {
69040
69042
  /**
@@ -69166,7 +69168,7 @@ type GetAdTreeData = {
69166
69168
  * Meta only: Facebook Page ID. Prunes the tree to ads whose creative is backed by this Page: campaigns and ad sets with no ad on the Page drop out, and rolled-up metrics cover only the Page's ads. Mirrors the same filter on /v1/ads and /v1/ads/campaigns.
69167
69169
  */
69168
69170
  pageId?: string;
69169
- platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon' | 'tradedesk';
69171
+ platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon' | 'tradedesk' | 'snapchat';
69170
69172
  /**
69171
69173
  * Profile ID
69172
69174
  */
@@ -69254,7 +69256,7 @@ type ListAdsByPerformanceData = {
69254
69256
  /**
69255
69257
  * Restrict to one platform.
69256
69258
  */
69257
- platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon' | 'applovin';
69259
+ platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon' | 'applovin' | 'snapchat';
69258
69260
  /**
69259
69261
  * Metric the ads are ranked by, highest first.
69260
69262
  */
@@ -69306,7 +69308,7 @@ type GetAdsTimelineData = {
69306
69308
  /**
69307
69309
  * Restrict to one platform.
69308
69310
  */
69309
- platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon';
69311
+ platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon' | 'snapchat';
69310
69312
  /**
69311
69313
  * Inclusive end of metrics range (YYYY-MM-DD). Defaults to today. Max 730-day range.
69312
69314
  */
@@ -78576,7 +78578,7 @@ type ListAdAudiencesData = {
78576
78578
  * Platform ad account ID
78577
78579
  */
78578
78580
  adAccountId: string;
78579
- platform?: 'facebook' | 'instagram' | 'googleads' | 'tiktok' | 'tiktokads' | 'pinterest' | 'linkedin' | 'linkedinads' | 'twitter' | 'xads' | 'redditads';
78581
+ platform?: 'facebook' | 'instagram' | 'googleads' | 'tiktok' | 'tiktokads' | 'pinterest' | 'linkedin' | 'linkedinads' | 'twitter' | 'xads' | 'redditads' | 'snapchatads';
78580
78582
  /**
78581
78583
  * Filter to one audience type. `saved_targeting` returns stored TargetingSpec audiences and needs no adAccountId; the other types keep only the platform audiences of that type (an empty list when the platform has none). Meta ENGAGEMENT audiences are `meta_engagement`.
78582
78584
  */
@@ -79105,11 +79107,11 @@ type SendConversionsError = (unknown | ErrorResponse);
79105
79107
  type AdjustConversionsData = {
79106
79108
  body: {
79107
79109
  /**
79108
- * SocialAccount ID. Must be a `googleads` account.
79110
+ * SocialAccount ID. Must be a `googleads` or `impact` account.
79109
79111
  */
79110
79112
  accountId: string;
79111
79113
  /**
79112
- * Conversion action resource name, e.g. `customers/1234567890/conversionActions/987654321`.
79114
+ * Conversion action resource name on Google, e.g. `customers/1234567890/conversionActions/987654321`; `<program id>:<event type id>` on Impact.
79113
79115
  */
79114
79116
  destinationId: string;
79115
79117
  adjustments: Array<{
@@ -79153,9 +79155,9 @@ type AdjustConversionsData = {
79153
79155
  };
79154
79156
  };
79155
79157
  type AdjustConversionsResponse = ({
79156
- platform?: 'googleads';
79158
+ platform?: 'googleads' | 'impact';
79157
79159
  /**
79158
- * Adjustments accepted by Google.
79160
+ * Adjustments accepted by the platform.
79159
79161
  */
79160
79162
  adjustmentsReceived?: number;
79161
79163
  /**
package/dist/index.d.ts CHANGED
@@ -40989,12 +40989,13 @@ type GetConnectUrlData = {
40989
40989
  * - X Ads (platform=xads): `x_ads_denied`, `x_ads_auth_failed`, `x_ads_config_error`, `x_ads_account_not_found`, `x_ads_state_error`, `x_ads_token_failed`, `x_ads_token_missing`, `x_ads_callback_error`.
40990
40990
  * - Reddit Ads (platform=redditads): `reddit_ads_auth_failed`, `reddit_ads_invalid_state`, `reddit_ads_access_denied`, `reddit_ads_scope_not_granted`, `reddit_ads_no_ad_accounts`, `reddit_ads_callback_error`.
40991
40991
  * - Microsoft Ads (platform=microsoftads): `microsoft_ads_auth_failed`, `microsoft_ads_invalid_state`, `microsoft_ads_access_denied`, `microsoft_ads_scope_not_granted`, `microsoft_ads_unknown_user`, `microsoft_ads_no_ad_accounts`, `microsoft_ads_callback_error`.
40992
+ * - Snapchat Ads (platform=snapchatads): `snapchat_ads_auth_failed`, `snapchat_ads_invalid_state`, `snapchat_ads_access_denied`, `snapchat_ads_no_ad_accounts`, `snapchat_ads_callback_error`.
40992
40993
  * - Shopify (platform=shopify): `shopify_auth_failed`, `shopify_config_error`, `shopify_invalid_state`, `shopify_invalid_hmac`, `shopify_invalid_shop`, `shopify_missing_scopes`, `shopify_callback_error`.
40993
40994
  *
40994
40995
  * Notes:
40995
40996
  *
40996
40997
  * 1. On this endpoint every upstream OAuth error collapses into `oauth_denied`, with the provider's values in the `platform_error*` params. The dedicated ads flows differ: they use their own denial slugs, and `google_ads_auth_failed` and `tiktok_ads_auth_failed` may carry the provider's raw error string in `error_message`.
40997
- * 2. On the tiktok and twitter ads flows `platform` carries the ads platform id (`tiktokads`, `xads`), not the value in the request path. The googleads, redditads, microsoftads and shopify flows report `googleads`, `redditads`, `microsoftads` and `shopify`.
40998
+ * 2. On the tiktok and twitter ads flows `platform` carries the ads platform id (`tiktokads`, `xads`), not the value in the request path. The googleads, redditads, microsoftads, snapchatads and shopify flows report `googleads`, `redditads`, `microsoftads`, `snapchatads` and `shopify`.
40998
40999
  * 3. `missing_tiktok_permissions`: the TikTok authorization left out a permission the already-connected account needs, so nothing changed and it keeps working as before. User-fixable: connect again and accept every permission on TikTok's screen.
40999
41000
  * 4. `instagram_login_method_mismatch`: an Instagram Login authorization landed on a profile whose Instagram account is connected through Facebook Login, so nothing changed. To refresh it, connect again with `loginMethod=facebook_login`. To move it to Instagram Login, disconnect it first.
41000
41001
  *
@@ -41269,7 +41270,7 @@ type ConnectAdsData = {
41269
41270
  * instagram_login flow no ads account can be created; do not use this value for those accounts.
41270
41271
  *
41271
41272
  */
41272
- platform: 'facebook' | 'instagram' | 'linkedin' | 'tiktok' | 'twitter' | 'pinterest' | 'googleads' | 'redditads' | 'microsoftads';
41273
+ platform: 'facebook' | 'instagram' | 'linkedin' | 'tiktok' | 'twitter' | 'pinterest' | 'googleads' | 'redditads' | 'microsoftads' | 'snapchatads';
41273
41274
  };
41274
41275
  query: {
41275
41276
  /**
@@ -41278,7 +41279,7 @@ type ConnectAdsData = {
41278
41279
  * - `twitter` (X Ads): required.
41279
41280
  * - `tiktok`: optional. Omit it for ads-only mode (no TikTok posting account linked; ad creation uses a Brand Identity instead of a TT_USER).
41280
41281
  * - Same-token platforms (`facebook`, `instagram`, `linkedin`, `pinterest`): picks which posting account the ads connection uses when the profile holds several of that platform. With one, it can be omitted.
41281
- * - Standalone platforms (`googleads`, `redditads`, `microsoftads`): ignored.
41282
+ * - Standalone platforms (`googleads`, `redditads`, `microsoftads`, `snapchatads`): ignored.
41282
41283
  *
41283
41284
  * On same-token platforms, an id that names no active account of the platform on the profile is ignored. Exception: with `force=true`, when it names the posting account the profile's ads connection hangs off, that account is no longer connected.
41284
41285
  *
@@ -41296,6 +41297,7 @@ type ConnectAdsData = {
41296
41297
  * - `googleads`: bare customer id digits.
41297
41298
  * - `redditads`: Reddit ad account id, `a2_<id>` or `t2_<id>`.
41298
41299
  * - `microsoftads`: bare numeric account id (the Id, not the account number).
41300
+ * - `snapchatads`: Snapchat ad account UUID.
41299
41301
  * - `twitter` (X Ads): base36 account id.
41300
41302
  * - `tiktok` (TikTok Ads): numeric advertiser id.
41301
41303
  *
@@ -41311,7 +41313,7 @@ type ConnectAdsData = {
41311
41313
  *
41312
41314
  * **Through OAuth**: on Meta the scope is kept when this call returns an `authUrl`, so the Meta Ads account created after OAuth is scoped (only its scoped ad accounts synced and subscribed) from the start.
41313
41315
  *
41314
- * On `googleads`, `redditads` and `microsoftads` it is kept through OAuth when `redirect_url` is set, so the new connection syncs only scoped ad accounts from the first sync.
41316
+ * On `googleads`, `redditads`, `microsoftads` and `snapchatads` it is kept through OAuth when `redirect_url` is set, so the new connection syncs only scoped ad accounts from the first sync.
41315
41317
  *
41316
41318
  * On `tiktok` it is kept through OAuth with or without `redirect_url`. The TikTok Ads connection holds only the scoped advertisers from the first sync, and is named after the first of them. Its `platformUserId` and cached Brand Identity follow that advertiser too.
41317
41319
  *
@@ -41396,12 +41398,12 @@ type ConnectAdsData = {
41396
41398
  * On success:
41397
41399
  *
41398
41400
  * - `tiktok`: lands on the URL unchanged.
41399
- * - `twitter`, `googleads`, `redditads` and `microsoftads`: append `connected` (the ads platform id: `xads`, `googleads`, `redditads` or `microsoftads`), `profileId`, `accountId` (the ads connection) and `username`.
41401
+ * - `twitter`, `googleads`, `redditads`, `microsoftads` and `snapchatads`: append `connected` (the ads platform id: `xads`, `googleads`, `redditads`, `microsoftads` or `snapchatads`), `profileId`, `accountId` (the ads connection) and `username`.
41400
41402
  * - Same-token platforms (`facebook`, `instagram`, `linkedin`, `pinterest`): append `connected`, `profileId`, `accountId`, `username` and, on API-key calls, `connect_token`.
41401
41403
  *
41402
41404
  * On failure the same error contract applies as on GET /v1/connect/{platform}: `error` and `platform` are always appended, other params are optional, and the value list there is not exhaustive.
41403
41405
  *
41404
- * On the tiktok, twitter, googleads, redditads and microsoftads flows, `platform` carries the ads platform id (`tiktokads`, `xads`, `googleads`, `redditads`, `microsoftads`), not the value used in the request path.
41406
+ * On the tiktok, twitter, googleads, redditads, microsoftads and snapchatads flows, `platform` carries the ads platform id (`tiktokads`, `xads`, `googleads`, `redditads`, `microsoftads`, `snapchatads`), not the value used in the request path.
41405
41407
  *
41406
41408
  */
41407
41409
  redirect_url?: string;
@@ -65069,7 +65071,7 @@ type ListAdsData = {
65069
65071
  * Meta only: Facebook Page ID. Returns only ads whose creative is backed by this Page (a Meta ad account serves ads for every Page in the Business Manager). Matches each ad's `creative.pageId`; ads with no page signal (rare IG-only creatives) never match. Mirrors the same filter on /v1/ads/campaigns and /v1/ads/tree.
65070
65072
  */
65071
65073
  pageId?: string;
65072
- platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon' | 'tradedesk';
65074
+ platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon' | 'tradedesk' | 'snapchat';
65073
65075
  /**
65074
65076
  * Meta ad ID. Returns the ad with this platform-side ad ID.
65075
65077
  */
@@ -67073,7 +67075,7 @@ type ListAdCampaignsData = {
67073
67075
  * Meta only: Facebook Page ID. Campaigns have no Page of their own, so this keeps campaigns having at least one ad backed by this Page, with adCount and metrics computed over those ads only. Mirrors the same filter on /v1/ads and /v1/ads/tree.
67074
67076
  */
67075
67077
  pageId?: string;
67076
- platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon' | 'tradedesk';
67078
+ platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon' | 'tradedesk' | 'snapchat';
67077
67079
  /**
67078
67080
  * Profile ID
67079
67081
  */
@@ -67257,7 +67259,7 @@ type CreateAdCampaignError = (unknown | ErrorResponse);
67257
67259
  type UpdateAdCampaignStatusData = {
67258
67260
  body: {
67259
67261
  status: 'active' | 'paused';
67260
- platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon' | 'tradedesk';
67262
+ platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon' | 'tradedesk' | 'snapchat';
67261
67263
  };
67262
67264
  headers?: {
67263
67265
  /**
@@ -67491,7 +67493,7 @@ type UpdateAdCampaignData = {
67491
67493
  /**
67492
67494
  * Required: platform campaign IDs are not globally unique.
67493
67495
  */
67494
- platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon' | 'tradedesk';
67496
+ platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon' | 'tradedesk' | 'snapchat';
67495
67497
  /**
67496
67498
  * **Meta only.** Zernio SocialAccount id owning the ad account. Needed only for an EMPTY campaign (zero ads); ignored otherwise.
67497
67499
  */
@@ -67618,7 +67620,7 @@ type UpdateAdCampaignResponse = ({
67618
67620
  type UpdateAdCampaignError = (unknown | ErrorResponse);
67619
67621
  type DeleteAdCampaignData = {
67620
67622
  body: {
67621
- platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon' | 'tradedesk';
67623
+ platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon' | 'tradedesk' | 'snapchat';
67622
67624
  /**
67623
67625
  * Zernio SocialAccount id owning the ad account. Required only to delete an EMPTY campaign (zero ads), which has no local Ad documents to resolve a token from.
67624
67626
  */
@@ -67789,7 +67791,7 @@ type BulkUpdateAdCampaignStatusData = {
67789
67791
  /**
67790
67792
  * The ad platform, e.g. `google` for Google Ads. The ads connection slug (`googleads`, `tiktokads`, ...) is accepted as an alias. `metaads` is not: send `facebook` or `instagram`.
67791
67793
  */
67792
- platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'googleads' | 'tiktokads' | 'linkedinads' | 'pinterestads' | 'xads' | 'openaiads' | 'redditads' | 'microsoftads';
67794
+ platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'googleads' | 'tiktokads' | 'linkedinads' | 'pinterestads' | 'xads' | 'openaiads' | 'redditads' | 'microsoftads' | 'snapchat' | 'snapchatads';
67793
67795
  }>;
67794
67796
  };
67795
67797
  headers?: {
@@ -68198,7 +68200,7 @@ type ListAdSetsData = {
68198
68200
  */
68199
68201
  live?: boolean;
68200
68202
  page?: number;
68201
- platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit';
68203
+ platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'snapchat';
68202
68204
  /**
68203
68205
  * Filter by the ad set's stored `status`, the value each row returns. A live read does not change it. Rows whose `status` is null match no filter.
68204
68206
  */
@@ -68363,9 +68365,9 @@ type CreateAdSetData = {
68363
68365
  */
68364
68366
  accountId: string;
68365
68367
  /**
68366
- * "google" and "reddit" are implemented; every other value returns 501.
68368
+ * "google", "reddit" and "snapchat" are implemented; every other value returns 501.
68367
68369
  */
68368
- platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit';
68370
+ platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'snapchat';
68369
68371
  /**
68370
68372
  * Platform campaign ID the ad group is created under (numeric on Google).
68371
68373
  */
@@ -68651,7 +68653,7 @@ type GetAdSetDetailsResponse = ({
68651
68653
  type GetAdSetDetailsError = (unknown | ErrorResponse);
68652
68654
  type UpdateAdSetData = {
68653
68655
  body: {
68654
- platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit';
68656
+ platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'snapchat';
68655
68657
  /**
68656
68658
  * Omit if not updating budget
68657
68659
  */
@@ -69012,7 +69014,7 @@ type GetAdSetTargetingData = {
69012
69014
  /**
69013
69015
  * Disambiguates when the same adSetId string exists on more than one connected platform.
69014
69016
  */
69015
- platform?: 'reddit' | 'amazon';
69017
+ platform?: 'reddit' | 'amazon' | 'snapchat';
69016
69018
  };
69017
69019
  };
69018
69020
  type GetAdSetTargetingResponse = ({
@@ -69034,7 +69036,7 @@ type GetAdSetTargetingError = (ErrorResponse | unknown);
69034
69036
  type UpdateAdSetStatusData = {
69035
69037
  body: {
69036
69038
  status: 'active' | 'paused';
69037
- platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon' | 'tradedesk';
69039
+ platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon' | 'tradedesk' | 'snapchat';
69038
69040
  };
69039
69041
  headers?: {
69040
69042
  /**
@@ -69166,7 +69168,7 @@ type GetAdTreeData = {
69166
69168
  * Meta only: Facebook Page ID. Prunes the tree to ads whose creative is backed by this Page: campaigns and ad sets with no ad on the Page drop out, and rolled-up metrics cover only the Page's ads. Mirrors the same filter on /v1/ads and /v1/ads/campaigns.
69167
69169
  */
69168
69170
  pageId?: string;
69169
- platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon' | 'tradedesk';
69171
+ platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon' | 'tradedesk' | 'snapchat';
69170
69172
  /**
69171
69173
  * Profile ID
69172
69174
  */
@@ -69254,7 +69256,7 @@ type ListAdsByPerformanceData = {
69254
69256
  /**
69255
69257
  * Restrict to one platform.
69256
69258
  */
69257
- platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon' | 'applovin';
69259
+ platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon' | 'applovin' | 'snapchat';
69258
69260
  /**
69259
69261
  * Metric the ads are ranked by, highest first.
69260
69262
  */
@@ -69306,7 +69308,7 @@ type GetAdsTimelineData = {
69306
69308
  /**
69307
69309
  * Restrict to one platform.
69308
69310
  */
69309
- platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon';
69311
+ platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon' | 'snapchat';
69310
69312
  /**
69311
69313
  * Inclusive end of metrics range (YYYY-MM-DD). Defaults to today. Max 730-day range.
69312
69314
  */
@@ -78576,7 +78578,7 @@ type ListAdAudiencesData = {
78576
78578
  * Platform ad account ID
78577
78579
  */
78578
78580
  adAccountId: string;
78579
- platform?: 'facebook' | 'instagram' | 'googleads' | 'tiktok' | 'tiktokads' | 'pinterest' | 'linkedin' | 'linkedinads' | 'twitter' | 'xads' | 'redditads';
78581
+ platform?: 'facebook' | 'instagram' | 'googleads' | 'tiktok' | 'tiktokads' | 'pinterest' | 'linkedin' | 'linkedinads' | 'twitter' | 'xads' | 'redditads' | 'snapchatads';
78580
78582
  /**
78581
78583
  * Filter to one audience type. `saved_targeting` returns stored TargetingSpec audiences and needs no adAccountId; the other types keep only the platform audiences of that type (an empty list when the platform has none). Meta ENGAGEMENT audiences are `meta_engagement`.
78582
78584
  */
@@ -79105,11 +79107,11 @@ type SendConversionsError = (unknown | ErrorResponse);
79105
79107
  type AdjustConversionsData = {
79106
79108
  body: {
79107
79109
  /**
79108
- * SocialAccount ID. Must be a `googleads` account.
79110
+ * SocialAccount ID. Must be a `googleads` or `impact` account.
79109
79111
  */
79110
79112
  accountId: string;
79111
79113
  /**
79112
- * Conversion action resource name, e.g. `customers/1234567890/conversionActions/987654321`.
79114
+ * Conversion action resource name on Google, e.g. `customers/1234567890/conversionActions/987654321`; `<program id>:<event type id>` on Impact.
79113
79115
  */
79114
79116
  destinationId: string;
79115
79117
  adjustments: Array<{
@@ -79153,9 +79155,9 @@ type AdjustConversionsData = {
79153
79155
  };
79154
79156
  };
79155
79157
  type AdjustConversionsResponse = ({
79156
- platform?: 'googleads';
79158
+ platform?: 'googleads' | 'impact';
79157
79159
  /**
79158
- * Adjustments accepted by Google.
79160
+ * Adjustments accepted by the platform.
79159
79161
  */
79160
79162
  adjustmentsReceived?: number;
79161
79163
  /**
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.1756",
39
+ version: "0.2.1758",
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.1756",
8
+ version: "0.2.1758",
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.1756",
3
+ "version": "0.2.1758",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -3654,6 +3654,20 @@ export const handleOAuthCallback = <ThrowOnError extends boolean = false>(option
3654
3654
  *
3655
3655
  * Without `redirect_url` the browser lands on the Zernio dashboard's ad account picker for the new connection.
3656
3656
  *
3657
+ * ### Standalone platforms (snapchatads)
3658
+ *
3659
+ * Starts the Snap Marketing API OAuth flow and creates a standalone ads SocialAccount (snapchatads) with no parent. It is reached only as `snapchatads` in the path.
3660
+ *
3661
+ * A profile that already sends conversions through a pasted Snap Pixel token (POST /v1/connect/snapchat-ads/credentials) keeps that connection: the OAuth upgrades it in place (same accountId) and conversions keep flowing to the same pixel.
3662
+ *
3663
+ * Discovery lists every ad account of every Snapchat organization the user belongs to. The callback redirects with `platform=snapchatads` and:
3664
+ *
3665
+ * - `error=snapchat_ads_auth_failed`: the user declines on Snapchat's consent screen, or Snapchat refuses the sign-in (nothing is saved)
3666
+ * - `error=snapchat_ads_access_denied`: the signed-in Zernio user cannot reach the profile the connect was started for
3667
+ * - `error=snapchat_ads_no_ad_accounts`: the user reaches no Snapchat ad account
3668
+ *
3669
+ * Without `redirect_url` the browser lands on the Zernio dashboard's ad account picker for the new connection.
3670
+ *
3657
3671
  */
3658
3672
  export const connectAds = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ConnectAdsData, ThrowOnError>) => {
3659
3673
  return (options?.client ?? client).get<ConnectAdsResponse, ConnectAdsError, ThrowOnError>({
@@ -19658,7 +19672,7 @@ export const replaceGoogleListingGroupFilters = <ThrowOnError extends boolean =
19658
19672
  * Create standalone ad
19659
19673
  * Creates a paid ad with your own creative, building the campaign and ad set it needs or adding it to existing ones.
19660
19674
  *
19661
- * 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.
19675
+ * Works across Meta, Google Ads, Pinterest, TikTok, X, LinkedIn, OpenAI Ads (ChatGPT Ads), Reddit Ads, Microsoft Ads, Snapchat 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.
19662
19676
  *
19663
19677
  * ### Request shapes
19664
19678
  *
@@ -19802,6 +19816,19 @@ export const replaceGoogleListingGroupFilters = <ThrowOnError extends boolean =
19802
19816
  *
19803
19817
  * Without `status`, every level is switched on and the campaign spends once Microsoft approves the ad: send `status: PAUSED` to create it paused. A failed step deletes the campaign the call created.
19804
19818
  *
19819
+ * ### Snapchat Ads
19820
+ *
19821
+ * Use the `accountId` of a `snapchatads` connection signed in through GET /v1/connect/snapchatads/ads and an ad account UUID as `adAccountId`. A connection that only holds a pasted Snap Pixel token returns 422 `ads_connection_required`. Zernio creates a campaign, an ad squad carrying the budget, schedule, bid and targeting, and a Snap Ad.
19822
+ *
19823
+ * - `goal`: `awareness`, `engagement`, `video_views`, `traffic` or `conversions` (needs a Snap Pixel, `promotedObject.pixelId` or the ad account's first).
19824
+ * - `headline` (34 characters) is required; `businessName` is the brand name (32 characters). `body` is ignored: a Snap Ad has no body text.
19825
+ * - One image (`imageUrl`, JPEG or PNG up to 5 MB) or video (`video.url`, up to 1 GB); no `creatives[]`. `linkUrl` must be https.
19826
+ * - The budget sits on the ad squad: daily at least 5 in the account currency, lifetime needs `endDate`.
19827
+ * - `bidStrategy` `LOWEST_COST_WITH_BID_CAP` or `COST_CAP` takes `bidAmount` (at least 0.01).
19828
+ * - `existingCampaignId` adds a new ad squad and ad to a campaign; `adSetId` adds the ad to an existing ad squad. `validateOnly` returns 501.
19829
+ *
19830
+ * Without `status`, every level is switched on: send `status: PAUSED` to create it paused. A failed step deletes what the call created.
19831
+ *
19805
19832
  * ### Idempotency
19806
19833
  *
19807
19834
  * This endpoint is not idempotent at the platform level: a blind retry creates a second campaign/ad set/ad. Send an `Idempotency-Key` header to make retries safe.
@@ -21193,13 +21220,21 @@ export const sendConversions = <ThrowOnError extends boolean = false>(options: O
21193
21220
 
21194
21221
  /**
21195
21222
  * Adjust uploaded conversions
21196
- * Retracts, restates the value of, or enhances conversions you already sent to Google Ads, for refunds or late customer data. To change Zernio's stored event too, and every platform at once, use `PATCH` or `DELETE /v1/events/{eventId}`.
21223
+ * Retracts, restates the value of, or enhances conversions you already sent to Google Ads or Impact, for refunds or late customer data. To change Zernio's stored event too, and every platform at once, use `PATCH` or `DELETE /v1/events/{eventId}`.
21197
21224
  *
21198
21225
  * It adjusts conversions previously uploaded via `POST /v1/ads/conversions`: retract them, restate their value, or enhance them with first-party data. Requires the Ads add-on.
21199
21226
  *
21200
- * ### Google Ads only
21227
+ * ### Google Ads and Impact only
21228
+ *
21229
+ * Google handles adjustments through the classic Google Ads API (`ConversionAdjustmentUploadService`). The Data Manager `ingestEvents` path used for sending conversions is ingest-only.
21230
+ *
21231
+ * On Impact, the partner's commission follows the refund:
21232
+ *
21233
+ * - `RETRACTION` reverses the action and `RESTATEMENT` sets its sale amount. Impact has no `ENHANCEMENT`.
21234
+ * - The action is found by the `destinationId` event type and `orderId`: the `platformData.order_id` the conversion was sent with, or its `eventId` when it had none.
21235
+ * - Impact applies changes asynchronously and refuses them on its side past the action's locking date.
21201
21236
  *
21202
- * Google handles adjustments through the classic Google Ads API (`ConversionAdjustmentUploadService`). The Data Manager `ingestEvents` path used for sending conversions is ingest-only. Meta and LinkedIn have no equivalent, so this endpoint returns `405` for those platforms.
21237
+ * Other platforms have no equivalent, so this endpoint returns `405` for them.
21203
21238
  *
21204
21239
  * ### Adjustment types
21205
21240
  *
@@ -21216,7 +21251,7 @@ export const sendConversions = <ThrowOnError extends boolean = false>(options: O
21216
21251
  *
21217
21252
  * ### Other fields
21218
21253
  *
21219
- * - `destinationId` is the conversion action resource name, e.g. `customers/1234567890/conversionActions/987654321` (same value you send to `POST /v1/ads/conversions`).
21254
+ * - `destinationId` is the same value you send to `POST /v1/ads/conversions`: the conversion action resource name on Google, e.g. `customers/1234567890/conversionActions/987654321`, and `<program id>:<event type id>` on Impact.
21220
21255
  * - PII in `user` is hashed with SHA-256 server-side (Gmail-specific normalization included). Send plaintext.
21221
21256
  * - Times are unix seconds; we convert to Google's required `yyyy-MM-dd HH:mm:ss+00:00` format.
21222
21257
  *
@@ -40228,12 +40228,13 @@ export type GetConnectUrlData = {
40228
40228
  * - X Ads (platform=xads): `x_ads_denied`, `x_ads_auth_failed`, `x_ads_config_error`, `x_ads_account_not_found`, `x_ads_state_error`, `x_ads_token_failed`, `x_ads_token_missing`, `x_ads_callback_error`.
40229
40229
  * - Reddit Ads (platform=redditads): `reddit_ads_auth_failed`, `reddit_ads_invalid_state`, `reddit_ads_access_denied`, `reddit_ads_scope_not_granted`, `reddit_ads_no_ad_accounts`, `reddit_ads_callback_error`.
40230
40230
  * - Microsoft Ads (platform=microsoftads): `microsoft_ads_auth_failed`, `microsoft_ads_invalid_state`, `microsoft_ads_access_denied`, `microsoft_ads_scope_not_granted`, `microsoft_ads_unknown_user`, `microsoft_ads_no_ad_accounts`, `microsoft_ads_callback_error`.
40231
+ * - Snapchat Ads (platform=snapchatads): `snapchat_ads_auth_failed`, `snapchat_ads_invalid_state`, `snapchat_ads_access_denied`, `snapchat_ads_no_ad_accounts`, `snapchat_ads_callback_error`.
40231
40232
  * - Shopify (platform=shopify): `shopify_auth_failed`, `shopify_config_error`, `shopify_invalid_state`, `shopify_invalid_hmac`, `shopify_invalid_shop`, `shopify_missing_scopes`, `shopify_callback_error`.
40232
40233
  *
40233
40234
  * Notes:
40234
40235
  *
40235
40236
  * 1. On this endpoint every upstream OAuth error collapses into `oauth_denied`, with the provider's values in the `platform_error*` params. The dedicated ads flows differ: they use their own denial slugs, and `google_ads_auth_failed` and `tiktok_ads_auth_failed` may carry the provider's raw error string in `error_message`.
40236
- * 2. On the tiktok and twitter ads flows `platform` carries the ads platform id (`tiktokads`, `xads`), not the value in the request path. The googleads, redditads, microsoftads and shopify flows report `googleads`, `redditads`, `microsoftads` and `shopify`.
40237
+ * 2. On the tiktok and twitter ads flows `platform` carries the ads platform id (`tiktokads`, `xads`), not the value in the request path. The googleads, redditads, microsoftads, snapchatads and shopify flows report `googleads`, `redditads`, `microsoftads`, `snapchatads` and `shopify`.
40237
40238
  * 3. `missing_tiktok_permissions`: the TikTok authorization left out a permission the already-connected account needs, so nothing changed and it keeps working as before. User-fixable: connect again and accept every permission on TikTok's screen.
40238
40239
  * 4. `instagram_login_method_mismatch`: an Instagram Login authorization landed on a profile whose Instagram account is connected through Facebook Login, so nothing changed. To refresh it, connect again with `loginMethod=facebook_login`. To move it to Instagram Login, disconnect it first.
40239
40240
  *
@@ -40514,7 +40515,7 @@ export type ConnectAdsData = {
40514
40515
  * instagram_login flow no ads account can be created; do not use this value for those accounts.
40515
40516
  *
40516
40517
  */
40517
- platform: 'facebook' | 'instagram' | 'linkedin' | 'tiktok' | 'twitter' | 'pinterest' | 'googleads' | 'redditads' | 'microsoftads';
40518
+ platform: 'facebook' | 'instagram' | 'linkedin' | 'tiktok' | 'twitter' | 'pinterest' | 'googleads' | 'redditads' | 'microsoftads' | 'snapchatads';
40518
40519
  };
40519
40520
  query: {
40520
40521
  /**
@@ -40523,7 +40524,7 @@ export type ConnectAdsData = {
40523
40524
  * - `twitter` (X Ads): required.
40524
40525
  * - `tiktok`: optional. Omit it for ads-only mode (no TikTok posting account linked; ad creation uses a Brand Identity instead of a TT_USER).
40525
40526
  * - Same-token platforms (`facebook`, `instagram`, `linkedin`, `pinterest`): picks which posting account the ads connection uses when the profile holds several of that platform. With one, it can be omitted.
40526
- * - Standalone platforms (`googleads`, `redditads`, `microsoftads`): ignored.
40527
+ * - Standalone platforms (`googleads`, `redditads`, `microsoftads`, `snapchatads`): ignored.
40527
40528
  *
40528
40529
  * On same-token platforms, an id that names no active account of the platform on the profile is ignored. Exception: with `force=true`, when it names the posting account the profile's ads connection hangs off, that account is no longer connected.
40529
40530
  *
@@ -40541,6 +40542,7 @@ export type ConnectAdsData = {
40541
40542
  * - `googleads`: bare customer id digits.
40542
40543
  * - `redditads`: Reddit ad account id, `a2_<id>` or `t2_<id>`.
40543
40544
  * - `microsoftads`: bare numeric account id (the Id, not the account number).
40545
+ * - `snapchatads`: Snapchat ad account UUID.
40544
40546
  * - `twitter` (X Ads): base36 account id.
40545
40547
  * - `tiktok` (TikTok Ads): numeric advertiser id.
40546
40548
  *
@@ -40556,7 +40558,7 @@ export type ConnectAdsData = {
40556
40558
  *
40557
40559
  * **Through OAuth**: on Meta the scope is kept when this call returns an `authUrl`, so the Meta Ads account created after OAuth is scoped (only its scoped ad accounts synced and subscribed) from the start.
40558
40560
  *
40559
- * On `googleads`, `redditads` and `microsoftads` it is kept through OAuth when `redirect_url` is set, so the new connection syncs only scoped ad accounts from the first sync.
40561
+ * On `googleads`, `redditads`, `microsoftads` and `snapchatads` it is kept through OAuth when `redirect_url` is set, so the new connection syncs only scoped ad accounts from the first sync.
40560
40562
  *
40561
40563
  * On `tiktok` it is kept through OAuth with or without `redirect_url`. The TikTok Ads connection holds only the scoped advertisers from the first sync, and is named after the first of them. Its `platformUserId` and cached Brand Identity follow that advertiser too.
40562
40564
  *
@@ -40641,12 +40643,12 @@ export type ConnectAdsData = {
40641
40643
  * On success:
40642
40644
  *
40643
40645
  * - `tiktok`: lands on the URL unchanged.
40644
- * - `twitter`, `googleads`, `redditads` and `microsoftads`: append `connected` (the ads platform id: `xads`, `googleads`, `redditads` or `microsoftads`), `profileId`, `accountId` (the ads connection) and `username`.
40646
+ * - `twitter`, `googleads`, `redditads`, `microsoftads` and `snapchatads`: append `connected` (the ads platform id: `xads`, `googleads`, `redditads`, `microsoftads` or `snapchatads`), `profileId`, `accountId` (the ads connection) and `username`.
40645
40647
  * - Same-token platforms (`facebook`, `instagram`, `linkedin`, `pinterest`): append `connected`, `profileId`, `accountId`, `username` and, on API-key calls, `connect_token`.
40646
40648
  *
40647
40649
  * On failure the same error contract applies as on GET /v1/connect/{platform}: `error` and `platform` are always appended, other params are optional, and the value list there is not exhaustive.
40648
40650
  *
40649
- * On the tiktok, twitter, googleads, redditads and microsoftads flows, `platform` carries the ads platform id (`tiktokads`, `xads`, `googleads`, `redditads`, `microsoftads`), not the value used in the request path.
40651
+ * On the tiktok, twitter, googleads, redditads, microsoftads and snapchatads flows, `platform` carries the ads platform id (`tiktokads`, `xads`, `googleads`, `redditads`, `microsoftads`, `snapchatads`), not the value used in the request path.
40650
40652
  *
40651
40653
  */
40652
40654
  redirect_url?: string;
@@ -66193,7 +66195,7 @@ export type ListAdsData = {
66193
66195
  * Meta only: Facebook Page ID. Returns only ads whose creative is backed by this Page (a Meta ad account serves ads for every Page in the Business Manager). Matches each ad's `creative.pageId`; ads with no page signal (rare IG-only creatives) never match. Mirrors the same filter on /v1/ads/campaigns and /v1/ads/tree.
66194
66196
  */
66195
66197
  pageId?: string;
66196
- platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon' | 'tradedesk';
66198
+ platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon' | 'tradedesk' | 'snapchat';
66197
66199
  /**
66198
66200
  * Meta ad ID. Returns the ad with this platform-side ad ID.
66199
66201
  */
@@ -68409,7 +68411,7 @@ export type ListAdCampaignsData = {
68409
68411
  * Meta only: Facebook Page ID. Campaigns have no Page of their own, so this keeps campaigns having at least one ad backed by this Page, with adCount and metrics computed over those ads only. Mirrors the same filter on /v1/ads and /v1/ads/tree.
68410
68412
  */
68411
68413
  pageId?: string;
68412
- platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon' | 'tradedesk';
68414
+ platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon' | 'tradedesk' | 'snapchat';
68413
68415
  /**
68414
68416
  * Profile ID
68415
68417
  */
@@ -68599,7 +68601,7 @@ export type CreateAdCampaignError = (unknown | ErrorResponse);
68599
68601
  export type UpdateAdCampaignStatusData = {
68600
68602
  body: {
68601
68603
  status: 'active' | 'paused';
68602
- platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon' | 'tradedesk';
68604
+ platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon' | 'tradedesk' | 'snapchat';
68603
68605
  };
68604
68606
  headers?: {
68605
68607
  /**
@@ -68848,7 +68850,7 @@ export type UpdateAdCampaignData = {
68848
68850
  /**
68849
68851
  * Required: platform campaign IDs are not globally unique.
68850
68852
  */
68851
- platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon' | 'tradedesk';
68853
+ platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon' | 'tradedesk' | 'snapchat';
68852
68854
  /**
68853
68855
  * **Meta only.** Zernio SocialAccount id owning the ad account. Needed only for an EMPTY campaign (zero ads); ignored otherwise.
68854
68856
  */
@@ -68978,7 +68980,7 @@ export type UpdateAdCampaignError = (unknown | ErrorResponse);
68978
68980
 
68979
68981
  export type DeleteAdCampaignData = {
68980
68982
  body: {
68981
- platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon' | 'tradedesk';
68983
+ platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon' | 'tradedesk' | 'snapchat';
68982
68984
  /**
68983
68985
  * Zernio SocialAccount id owning the ad account. Required only to delete an EMPTY campaign (zero ads), which has no local Ad documents to resolve a token from.
68984
68986
  */
@@ -69161,7 +69163,7 @@ export type BulkUpdateAdCampaignStatusData = {
69161
69163
  /**
69162
69164
  * The ad platform, e.g. `google` for Google Ads. The ads connection slug (`googleads`, `tiktokads`, ...) is accepted as an alias. `metaads` is not: send `facebook` or `instagram`.
69163
69165
  */
69164
- platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'googleads' | 'tiktokads' | 'linkedinads' | 'pinterestads' | 'xads' | 'openaiads' | 'redditads' | 'microsoftads';
69166
+ platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'googleads' | 'tiktokads' | 'linkedinads' | 'pinterestads' | 'xads' | 'openaiads' | 'redditads' | 'microsoftads' | 'snapchat' | 'snapchatads';
69165
69167
  }>;
69166
69168
  };
69167
69169
  headers?: {
@@ -69582,7 +69584,7 @@ export type ListAdSetsData = {
69582
69584
  */
69583
69585
  live?: boolean;
69584
69586
  page?: number;
69585
- platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit';
69587
+ platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'snapchat';
69586
69588
  /**
69587
69589
  * Filter by the ad set's stored `status`, the value each row returns. A live read does not change it. Rows whose `status` is null match no filter.
69588
69590
  */
@@ -69750,9 +69752,9 @@ export type CreateAdSetData = {
69750
69752
  */
69751
69753
  accountId: string;
69752
69754
  /**
69753
- * "google" and "reddit" are implemented; every other value returns 501.
69755
+ * "google", "reddit" and "snapchat" are implemented; every other value returns 501.
69754
69756
  */
69755
- platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit';
69757
+ platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'snapchat';
69756
69758
  /**
69757
69759
  * Platform campaign ID the ad group is created under (numeric on Google).
69758
69760
  */
@@ -70050,7 +70052,7 @@ export type GetAdSetDetailsError = (unknown | ErrorResponse);
70050
70052
 
70051
70053
  export type UpdateAdSetData = {
70052
70054
  body: {
70053
- platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit';
70055
+ platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'snapchat';
70054
70056
  /**
70055
70057
  * Omit if not updating budget
70056
70058
  */
@@ -70417,7 +70419,7 @@ export type GetAdSetTargetingData = {
70417
70419
  /**
70418
70420
  * Disambiguates when the same adSetId string exists on more than one connected platform.
70419
70421
  */
70420
- platform?: 'reddit' | 'amazon';
70422
+ platform?: 'reddit' | 'amazon' | 'snapchat';
70421
70423
  };
70422
70424
  };
70423
70425
 
@@ -70442,7 +70444,7 @@ export type GetAdSetTargetingError = (ErrorResponse | unknown);
70442
70444
  export type UpdateAdSetStatusData = {
70443
70445
  body: {
70444
70446
  status: 'active' | 'paused';
70445
- platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon' | 'tradedesk';
70447
+ platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon' | 'tradedesk' | 'snapchat';
70446
70448
  };
70447
70449
  headers?: {
70448
70450
  /**
@@ -70577,7 +70579,7 @@ export type GetAdTreeData = {
70577
70579
  * Meta only: Facebook Page ID. Prunes the tree to ads whose creative is backed by this Page: campaigns and ad sets with no ad on the Page drop out, and rolled-up metrics cover only the Page's ads. Mirrors the same filter on /v1/ads and /v1/ads/campaigns.
70578
70580
  */
70579
70581
  pageId?: string;
70580
- platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon' | 'tradedesk';
70582
+ platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon' | 'tradedesk' | 'snapchat';
70581
70583
  /**
70582
70584
  * Profile ID
70583
70585
  */
@@ -70668,7 +70670,7 @@ export type ListAdsByPerformanceData = {
70668
70670
  /**
70669
70671
  * Restrict to one platform.
70670
70672
  */
70671
- platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon' | 'applovin';
70673
+ platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon' | 'applovin' | 'snapchat';
70672
70674
  /**
70673
70675
  * Metric the ads are ranked by, highest first.
70674
70676
  */
@@ -70723,7 +70725,7 @@ export type GetAdsTimelineData = {
70723
70725
  /**
70724
70726
  * Restrict to one platform.
70725
70727
  */
70726
- platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon';
70728
+ platform?: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'reddit' | 'microsoft' | 'amazon' | 'snapchat';
70727
70729
  /**
70728
70730
  * Inclusive end of metrics range (YYYY-MM-DD). Defaults to today. Max 730-day range.
70729
70731
  */
@@ -80488,7 +80490,7 @@ export type ListAdAudiencesData = {
80488
80490
  * Platform ad account ID
80489
80491
  */
80490
80492
  adAccountId: string;
80491
- platform?: 'facebook' | 'instagram' | 'googleads' | 'tiktok' | 'tiktokads' | 'pinterest' | 'linkedin' | 'linkedinads' | 'twitter' | 'xads' | 'redditads';
80493
+ platform?: 'facebook' | 'instagram' | 'googleads' | 'tiktok' | 'tiktokads' | 'pinterest' | 'linkedin' | 'linkedinads' | 'twitter' | 'xads' | 'redditads' | 'snapchatads';
80492
80494
  /**
80493
80495
  * Filter to one audience type. `saved_targeting` returns stored TargetingSpec audiences and needs no adAccountId; the other types keep only the platform audiences of that type (an empty list when the platform has none). Meta ENGAGEMENT audiences are `meta_engagement`.
80494
80496
  */
@@ -81047,11 +81049,11 @@ export type SendConversionsError = (unknown | ErrorResponse);
81047
81049
  export type AdjustConversionsData = {
81048
81050
  body: {
81049
81051
  /**
81050
- * SocialAccount ID. Must be a `googleads` account.
81052
+ * SocialAccount ID. Must be a `googleads` or `impact` account.
81051
81053
  */
81052
81054
  accountId: string;
81053
81055
  /**
81054
- * Conversion action resource name, e.g. `customers/1234567890/conversionActions/987654321`.
81056
+ * Conversion action resource name on Google, e.g. `customers/1234567890/conversionActions/987654321`; `<program id>:<event type id>` on Impact.
81055
81057
  */
81056
81058
  destinationId: string;
81057
81059
  adjustments: Array<{
@@ -81096,9 +81098,9 @@ export type AdjustConversionsData = {
81096
81098
  };
81097
81099
 
81098
81100
  export type AdjustConversionsResponse = ({
81099
- platform?: 'googleads';
81101
+ platform?: 'googleads' | 'impact';
81100
81102
  /**
81101
- * Adjustments accepted by Google.
81103
+ * Adjustments accepted by the platform.
81102
81104
  */
81103
81105
  adjustmentsReceived?: number;
81104
81106
  /**