@getlatedev/node 0.2.1107 → 0.2.1109

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.1107",
39
+ version: "0.2.1109",
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.1107",
8
+ version: "0.2.1109",
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.1107",
3
+ "version": "0.2.1109",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -10524,7 +10524,7 @@ export const updateCampaignAssets = <ThrowOnError extends boolean = false>(optio
10524
10524
 
10525
10525
  /**
10526
10526
  * Remove campaign assets
10527
- * Removes the specified attachments only. Google assets cannot be deleted. Other attachments remain. assetResourceNames is retained for compatibility.
10527
+ * Removes the specified attachments only. Google assets cannot be deleted. Other attachments remain. assetResourceNames is retained for compatibility. Fields go in the query string. A JSON body with the same fields is also accepted and, when sent, the query string is ignored.
10528
10528
  */
10529
10529
  export const removeCampaignAssets = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<RemoveCampaignAssetsData, ThrowOnError>) => {
10530
10530
  return (options?.client ?? client).delete<RemoveCampaignAssetsResponse, RemoveCampaignAssetsError, ThrowOnError>({
@@ -10568,7 +10568,7 @@ export const updateAdGroupAssets = <ThrowOnError extends boolean = false>(option
10568
10568
 
10569
10569
  /**
10570
10570
  * Remove ad-group assets
10571
- * Removes the specified attachments only. Google assets cannot be deleted. Other attachments remain. assetResourceNames is retained for compatibility.
10571
+ * Removes the specified attachments only. Google assets cannot be deleted. Other attachments remain. assetResourceNames is retained for compatibility. Fields go in the query string. A JSON body with the same fields is also accepted and, when sent, the query string is ignored.
10572
10572
  */
10573
10573
  export const removeAdGroupAssets = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<RemoveAdGroupAssetsData, ThrowOnError>) => {
10574
10574
  return (options?.client ?? client).delete<RemoveAdGroupAssetsResponse, RemoveAdGroupAssetsError, ThrowOnError>({
@@ -10822,6 +10822,8 @@ export const getAdTrackingTags = <ThrowOnError extends boolean = false>(options:
10822
10822
  * / dark / asset_feed creatives whose object_story_spec Meta strips (those return 422 asking for
10823
10823
  * `creative`).
10824
10824
  * - Google: `trackingUrlTemplate` and/or `finalUrlSuffix` (full template strings; account quota applies).
10825
+ * Written at the CAMPAIGN level (the campaign's `tracking_url_template` / `final_url_suffix`), so
10826
+ * the change applies to every ad in the ad's campaign.
10825
10827
  * - LinkedIn: `dynamicValueParameters` and/or `customValueParameters` (campaign-level Dynamic UTM).
10826
10828
  *
10827
10829
  */
@@ -11267,7 +11269,7 @@ export const attachAdLabel = <ThrowOnError extends boolean = false>(options: Opt
11267
11269
 
11268
11270
  /**
11269
11271
  * Detach a Google Ads label
11270
- * Removes the label from the given targets. Idempotent; a target without the label is counted in `unchanged`.
11272
+ * Removes the label from the given targets. Idempotent; a target without the label is counted in `unchanged`. Fields go in the query string. A JSON body with the same fields is also accepted and, when sent, the query string is ignored.
11271
11273
  */
11272
11274
  export const detachAdLabel = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DetachAdLabelData, ThrowOnError>) => {
11273
11275
  return (options?.client ?? client).delete<DetachAdLabelResponse, DetachAdLabelError, ThrowOnError>({
@@ -11624,7 +11626,7 @@ export const updateAccountCallouts = <ThrowOnError extends boolean = false>(opti
11624
11626
 
11625
11627
  /**
11626
11628
  * Remove account callout
11627
- * Removes the customer_asset attachment only. The underlying shared asset and its campaign or ad-group attachments remain.
11629
+ * Removes the customer_asset attachment only. The underlying shared asset and its campaign or ad-group attachments remain. Fields go in the query string. A JSON body with the same fields is also accepted and, when sent, the query string is ignored.
11628
11630
  */
11629
11631
  export const removeAccountCallout = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<RemoveAccountCalloutData, ThrowOnError>) => {
11630
11632
  return (options?.client ?? client).delete<RemoveAccountCalloutResponse, RemoveAccountCalloutError, ThrowOnError>({
@@ -11668,7 +11670,7 @@ export const updateAccountSitelinks = <ThrowOnError extends boolean = false>(opt
11668
11670
 
11669
11671
  /**
11670
11672
  * Remove account sitelink
11671
- * Removes the customer_asset attachment only. The underlying shared asset and its campaign or ad-group attachments remain.
11673
+ * Removes the customer_asset attachment only. The underlying shared asset and its campaign or ad-group attachments remain. Fields go in the query string. A JSON body with the same fields is also accepted and, when sent, the query string is ignored.
11672
11674
  */
11673
11675
  export const removeAccountSitelink = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<RemoveAccountSitelinkData, ThrowOnError>) => {
11674
11676
  return (options?.client ?? client).delete<RemoveAccountSitelinkResponse, RemoveAccountSitelinkError, ThrowOnError>({
@@ -11712,7 +11714,7 @@ export const updateAccountStructuredSnippets = <ThrowOnError extends boolean = f
11712
11714
 
11713
11715
  /**
11714
11716
  * Remove account snippet
11715
- * Removes the customer_asset attachment only. The underlying shared asset and its campaign or ad-group attachments remain.
11717
+ * Removes the customer_asset attachment only. The underlying shared asset and its campaign or ad-group attachments remain. Fields go in the query string. A JSON body with the same fields is also accepted and, when sent, the query string is ignored.
11716
11718
  */
11717
11719
  export const removeAccountStructuredSnippet = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<RemoveAccountStructuredSnippetData, ThrowOnError>) => {
11718
11720
  return (options?.client ?? client).delete<RemoveAccountStructuredSnippetResponse, RemoveAccountStructuredSnippetError, ThrowOnError>({
@@ -7593,6 +7593,9 @@ export type graduationStrategy = 'MANUAL' | 'SS_PERFORMANCE';
7593
7593
  */
7594
7594
  export type KeywordEntry = string | {
7595
7595
  text: string;
7596
+ /**
7597
+ * Defaults to broad. Accepted in any case (EXACT, Exact) and stored lowercase.
7598
+ */
7596
7599
  matchType?: 'exact' | 'phrase' | 'broad';
7597
7600
  };
7598
7601
 
@@ -9037,6 +9040,10 @@ export type PlatformAnalytics = {
9037
9040
  * Failure detail. On failed entries, why the post failed to publish. On unavailable entries, why analytics cannot be synced (e.g. Google Business Profile, a TikTok upload that never received a video id). On pending entries, the most recent analytics sync error for the account (null while no sync has failed), cleared after the next successful sync.
9038
9041
  */
9039
9042
  errorMessage?: (string) | null;
9043
+ /**
9044
+ * Stable machine-readable reason for errorMessage. post_not_found: the post was deleted or is no longer visible to the account. permission_missing: the last analytics sync of the Facebook account failed because the Page no longer grants pages_read_engagement (pending entries only). null: no stable code, read errorMessage. New values may be added.
9045
+ */
9046
+ errorCode?: ('post_not_found' | 'permission_missing') | null;
9040
9047
  };
9041
9048
 
9042
9049
  export type status24 = 'published' | 'failed';
@@ -9046,6 +9053,11 @@ export type status24 = 'published' | 'failed';
9046
9053
  */
9047
9054
  export type syncStatus2 = 'synced' | 'pending' | 'unavailable';
9048
9055
 
9056
+ /**
9057
+ * Stable machine-readable reason for errorMessage. post_not_found: the post was deleted or is no longer visible to the account. permission_missing: the last analytics sync of the Facebook account failed because the Page no longer grants pages_read_engagement (pending entries only). null: no stable code, read errorMessage. New values may be added.
9058
+ */
9059
+ export type errorCode = 'post_not_found' | 'permission_missing';
9060
+
9049
9061
  export type PlatformTarget = {
9050
9062
  /**
9051
9063
  * Supported values: twitter, threads, instagram, youtube, facebook, linkedin, pinterest, reddit, tiktok, bluesky, googlebusiness, telegram
@@ -40027,6 +40039,9 @@ export type ListAdKeywordsData = {
40027
40039
  */
40028
40040
  campaignId?: string;
40029
40041
  limit?: number;
40042
+ /**
40043
+ * Accepted in any case.
40044
+ */
40030
40045
  matchType?: 'exact' | 'phrase' | 'broad' | 'unknown';
40031
40046
  /**
40032
40047
  * true = negative keywords only, false = positive only. Omit for both.
@@ -40715,8 +40730,14 @@ export type BulkUpdateAdCampaignStatusData = {
40715
40730
  body: {
40716
40731
  status: 'active' | 'paused';
40717
40732
  campaigns: Array<{
40733
+ /**
40734
+ * The campaign id on the ad platform (e.g. the numeric Google campaign id), not a Zernio id.
40735
+ */
40718
40736
  platformCampaignId: string;
40719
- platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai';
40737
+ /**
40738
+ * 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`.
40739
+ */
40740
+ platform: 'facebook' | 'instagram' | 'tiktok' | 'linkedin' | 'pinterest' | 'google' | 'twitter' | 'openai' | 'googleads' | 'tiktokads' | 'linkedinads' | 'pinterestads' | 'xads' | 'openaiads';
40720
40741
  }>;
40721
40742
  };
40722
40743
  };
@@ -42127,7 +42148,13 @@ export type UpdateCampaignAssetsResponse = ({
42127
42148
  export type UpdateCampaignAssetsError = (ErrorResponse | unknown);
42128
42149
 
42129
42150
  export type RemoveCampaignAssetsData = {
42130
- body: {
42151
+ path: {
42152
+ /**
42153
+ * Numeric Google platform id.
42154
+ */
42155
+ campaignId: string;
42156
+ };
42157
+ query: {
42131
42158
  /**
42132
42159
  * Zernio Google Ads connection id.
42133
42160
  */
@@ -42137,18 +42164,18 @@ export type RemoveCampaignAssetsData = {
42137
42164
  */
42138
42165
  adAccountId?: string;
42139
42166
  /**
42140
- * Alias of adAccountId, kept for existing callers
42141
- * @deprecated
42167
+ * Asset resource names, retained for compatibility. Repeat the parameter or pass a comma-separated list.
42142
42168
  */
42143
- customerId?: string;
42144
42169
  assetResourceNames: Array<(string)>;
42170
+ /**
42171
+ * campaign_asset resource names to remove, e.g. customers/1234567890/campaignAssets/456~123~CALLOUT. Repeat the parameter or pass a comma-separated list.
42172
+ */
42145
42173
  campaignAssetResourceNames: Array<(string)>;
42146
- };
42147
- path: {
42148
42174
  /**
42149
- * Numeric Google platform id.
42175
+ * Alias of adAccountId, kept for existing callers
42176
+ * @deprecated
42150
42177
  */
42151
- campaignId: string;
42178
+ customerId?: string;
42152
42179
  };
42153
42180
  };
42154
42181
 
@@ -42276,7 +42303,13 @@ export type UpdateAdGroupAssetsResponse = ({
42276
42303
  export type UpdateAdGroupAssetsError = (ErrorResponse | unknown);
42277
42304
 
42278
42305
  export type RemoveAdGroupAssetsData = {
42279
- body: {
42306
+ path: {
42307
+ /**
42308
+ * Numeric Google platform id.
42309
+ */
42310
+ adSetId: string;
42311
+ };
42312
+ query: {
42280
42313
  /**
42281
42314
  * Zernio Google Ads connection id.
42282
42315
  */
@@ -42286,18 +42319,18 @@ export type RemoveAdGroupAssetsData = {
42286
42319
  */
42287
42320
  adAccountId?: string;
42288
42321
  /**
42289
- * Alias of adAccountId, kept for existing callers
42290
- * @deprecated
42322
+ * ad_group_asset resource names to remove, e.g. customers/1234567890/adGroupAssets/456~123~CALLOUT. Repeat the parameter or pass a comma-separated list.
42291
42323
  */
42292
- customerId?: string;
42293
- assetResourceNames: Array<(string)>;
42294
42324
  adGroupAssetResourceNames: Array<(string)>;
42295
- };
42296
- path: {
42297
42325
  /**
42298
- * Numeric Google platform id.
42326
+ * Asset resource names, retained for compatibility. Repeat the parameter or pass a comma-separated list.
42299
42327
  */
42300
- adSetId: string;
42328
+ assetResourceNames: Array<(string)>;
42329
+ /**
42330
+ * Alias of adAccountId, kept for existing callers
42331
+ * @deprecated
42332
+ */
42333
+ customerId?: string;
42301
42334
  };
42302
42335
  };
42303
42336
 
@@ -44089,13 +44122,43 @@ export type AttachAdLabelResponse = ({
44089
44122
  export type AttachAdLabelError = (ErrorResponse | unknown);
44090
44123
 
44091
44124
  export type DetachAdLabelData = {
44092
- body: GoogleAdLabelAssignments;
44093
44125
  path: {
44094
44126
  /**
44095
44127
  * Google label id
44096
44128
  */
44097
44129
  labelId: string;
44098
44130
  };
44131
+ query: {
44132
+ /**
44133
+ * Zernio Google Ads connection id.
44134
+ */
44135
+ accountId: string;
44136
+ /**
44137
+ * Platform ad account ID (Google customer ID, digits only). Required when the connection has multiple customers.
44138
+ */
44139
+ adAccountId?: string;
44140
+ /**
44141
+ * Google ad group ad ids, {adGroupId}~{adId}. Repeat the parameter or pass a comma-separated list.
44142
+ */
44143
+ adIds?: Array<(string)>;
44144
+ /**
44145
+ * Google ad group ids. Repeat the parameter or pass a comma-separated list.
44146
+ */
44147
+ adSetIds?: Array<(string)>;
44148
+ /**
44149
+ * Google campaign ids. Repeat the parameter or pass a comma-separated list.
44150
+ */
44151
+ campaignIds?: Array<(string)>;
44152
+ /**
44153
+ * Alias of adAccountId, kept for existing callers
44154
+ * @deprecated
44155
+ */
44156
+ customerId?: string;
44157
+ /**
44158
+ * Google keyword criterion ids, {adGroupId}~{criterionId}. Repeat the parameter or pass a comma-separated list.
44159
+ */
44160
+ keywordIds?: Array<(string)>;
44161
+ };
44099
44162
  };
44100
44163
 
44101
44164
  export type DetachAdLabelResponse = ({
@@ -44906,7 +44969,7 @@ export type UpdateAccountCalloutsResponse = ({
44906
44969
  export type UpdateAccountCalloutsError = (ErrorResponse | unknown);
44907
44970
 
44908
44971
  export type RemoveAccountCalloutData = {
44909
- body: {
44972
+ query: {
44910
44973
  /**
44911
44974
  * Zernio Google Ads connection id.
44912
44975
  */
@@ -44915,12 +44978,15 @@ export type RemoveAccountCalloutData = {
44915
44978
  * Platform ad account ID (Google customer ID, digits only). Required when the connection has multiple customers.
44916
44979
  */
44917
44980
  adAccountId?: string;
44981
+ /**
44982
+ * Numeric Google Ads asset id.
44983
+ */
44984
+ assetId: string;
44918
44985
  /**
44919
44986
  * Alias of adAccountId, kept for existing callers
44920
44987
  * @deprecated
44921
44988
  */
44922
44989
  customerId?: string;
44923
- assetId: string;
44924
44990
  };
44925
44991
  };
44926
44992
 
@@ -45040,7 +45106,7 @@ export type UpdateAccountSitelinksResponse = ({
45040
45106
  export type UpdateAccountSitelinksError = (ErrorResponse | unknown);
45041
45107
 
45042
45108
  export type RemoveAccountSitelinkData = {
45043
- body: {
45109
+ query: {
45044
45110
  /**
45045
45111
  * Zernio Google Ads connection id.
45046
45112
  */
@@ -45049,12 +45115,15 @@ export type RemoveAccountSitelinkData = {
45049
45115
  * Platform ad account ID (Google customer ID, digits only). Required when the connection has multiple customers.
45050
45116
  */
45051
45117
  adAccountId?: string;
45118
+ /**
45119
+ * Numeric Google Ads asset id.
45120
+ */
45121
+ assetId: string;
45052
45122
  /**
45053
45123
  * Alias of adAccountId, kept for existing callers
45054
45124
  * @deprecated
45055
45125
  */
45056
45126
  customerId?: string;
45057
- assetId: string;
45058
45127
  };
45059
45128
  };
45060
45129
 
@@ -45161,7 +45230,7 @@ export type UpdateAccountStructuredSnippetsResponse = ({
45161
45230
  export type UpdateAccountStructuredSnippetsError = (ErrorResponse | unknown);
45162
45231
 
45163
45232
  export type RemoveAccountStructuredSnippetData = {
45164
- body: {
45233
+ query: {
45165
45234
  /**
45166
45235
  * Zernio Google Ads connection id.
45167
45236
  */
@@ -45170,12 +45239,15 @@ export type RemoveAccountStructuredSnippetData = {
45170
45239
  * Platform ad account ID (Google customer ID, digits only). Required when the connection has multiple customers.
45171
45240
  */
45172
45241
  adAccountId?: string;
45242
+ /**
45243
+ * Numeric Google Ads asset id.
45244
+ */
45245
+ assetId: string;
45173
45246
  /**
45174
45247
  * Alias of adAccountId, kept for existing callers
45175
45248
  * @deprecated
45176
45249
  */
45177
45250
  customerId?: string;
45178
- assetId: string;
45179
45251
  };
45180
45252
  };
45181
45253
 
@@ -47018,15 +47090,18 @@ export type CreateStandaloneAdData = {
47018
47090
  * budget and schedule are inherited (passing those fields
47019
47091
  * returns 400).
47020
47092
  *
47021
- * On Google Ads the `adSetId` is the AD GROUP id. `goal` is
47022
- * still REQUIRED even though budget and targeting are
47023
- * inherited from the ad group. Send `campaignType: "search"`
47024
- * to attach into a Search ad group, including one created by
47025
- * `POST /v1/ads/ad-sets` (always SEARCH_STANDARD): without it
47026
- * the request is treated as Display and requires
47027
- * `images.landscape` + `images.square` + `businessName`, and
47028
- * the resulting display creative does not match a Search ad
47029
- * group.
47093
+ * On Google Ads the `adSetId` is the AD GROUP id (numeric). `goal`
47094
+ * is not required: the ad group keeps its campaign's bidding,
47095
+ * budget and targeting. `campaignType` is read from the ad group's
47096
+ * campaign (Search, Display or Demand Gen), so it can be omitted;
47097
+ * a `campaignType` that contradicts the ad group returns 400, an
47098
+ * ad group Google does not know in that customer returns 404, and
47099
+ * any other campaign type returns 422. A Search ad needs
47100
+ * `headline` + `body` + `linkUrl`; a Display ad also needs
47101
+ * `images.landscape` + `images.square` + `businessName`. Google
47102
+ * allows 3 responsive search ads per ad group: a fourth returns
47103
+ * 422 naming the limit (`RESPONSIVE_SEARCH_ADS_PER_AD_GROUP`) and
47104
+ * the ad group.
47030
47105
  * `budgetAmount`/`budgetType` and bidding fields
47031
47106
  * (`bidStrategy`, `bidAmount`, `portfolioBidStrategyId`)
47032
47107
  * return 400 on this shape; the ad group already owns them.
@@ -47548,7 +47623,7 @@ export type CreateStandaloneAdData = {
47548
47623
  */
47549
47624
  audienceId?: string;
47550
47625
  /**
47551
- * Google only. Performance Max requires assetGroup and Demand Gen requires demandGen; both are always created PAUSED.
47626
+ * Google only. Performance Max requires assetGroup and Demand Gen requires demandGen; both are always created PAUSED. With `adSetId` it defaults to the ad group's own campaign type instead of display.
47552
47627
  */
47553
47628
  campaignType?: 'display' | 'search' | 'pmax' | 'demand_gen';
47554
47629
  /**
@@ -47570,11 +47645,11 @@ export type CreateStandaloneAdData = {
47570
47645
  */
47571
47646
  campaignNegativeKeywords?: Array<KeywordEntry>;
47572
47647
  /**
47573
- * Google Search RSA only. Extra text assets as strings or objects with text and optional pinnedField. Existing string input remains supported. The effective create lists, including primary text and deduplication, must contain 3-15 headlines and 2-4 descriptions; excess entries return 400.
47648
+ * Google Search RSA only. Extra text assets as strings or objects with text and optional pinnedField. Existing string input remains supported. The effective create lists, including primary text and deduplication, must contain 3-15 headlines and 2-4 descriptions; excess entries return 400. Each headline is at most 30 characters (Google's limit): a longer one returns 400 naming the field and index (e.g. `additionalHeadlines[2]`), it is never truncated. On Search the same limit applies to `headline` and `longHeadline` (30) and to `body` (90).
47574
47649
  */
47575
47650
  additionalHeadlines?: Array<(string | GoogleRsaHeadline)>;
47576
47651
  /**
47577
- * Google Search RSA only. Extra text assets as strings or objects with text and optional pinnedField. Existing string input remains supported. The effective create lists, including primary text and deduplication, must contain 3-15 headlines and 2-4 descriptions; excess entries return 400.
47652
+ * Google Search RSA only. Extra text assets as strings or objects with text and optional pinnedField. Existing string input remains supported. The effective create lists, including primary text and deduplication, must contain 3-15 headlines and 2-4 descriptions; excess entries return 400. Each description is at most 90 characters (Google's limit): a longer one returns 400 naming the field and index (e.g. `additionalDescriptions[2]`), it is never truncated. On Search the same limit applies to `headline` and `longHeadline` (30) and to `body` (90).
47578
47653
  */
47579
47654
  additionalDescriptions?: Array<(string | GoogleRsaDescription)>;
47580
47655
  /**