@getlatedev/node 0.2.945 → 0.2.947

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.
@@ -9398,6 +9398,12 @@ export const getAd = <ThrowOnError extends boolean = false>(options: OptionsLega
9398
9398
  * - **Performance Max**: top-level `assetGroup`, which swaps asset roles on the ad's asset
9399
9399
  * group. The other creative fields return 422 for this channel, and `assetGroup` returns
9400
9400
  * 422 on any other channel.
9401
+ * - **Demand Gen**: top-level `demandGen` (see GoogleDemandGenUpdate): creative, channel
9402
+ * and audience changes in one atomic Google request. The other creative fields return
9403
+ * 422 for this channel. `targeting` takes locations, languages, `locationTargetingType`
9404
+ * and `devices`; locations and languages are written to the ad's ad group, which
9405
+ * Demand Gen requires (campaigns migrated from Discovery that still target on the
9406
+ * campaign keep being written there), so they apply to every ad in that ad group.
9401
9407
  * - **LinkedIn**: status, budget, targeting (countries or regions, excludedLocations (countries),
9402
9408
  * the B2B facets, and audience segments; applied to the LinkedIn Campaign via
9403
9409
  * PARTIAL_UPDATE, and REPLACES the campaign's entire targetingCriteria, not a merge),
@@ -10958,7 +10964,8 @@ export const replaceGoogleListingGroupFilters = <ThrowOnError extends boolean =
10958
10964
  *
10959
10965
  * Google Demand Gen: set `campaignType: "demand_gen"` and supply `demandGen`. Creates a
10960
10966
  * daily budget, PAUSED campaign, one ad group and one ad in a single atomic request: a
10961
- * multi-asset image ad, or a video responsive ad when `demandGen.youtubeVideoIds` is sent.
10967
+ * multi-asset image ad, a video responsive ad when `demandGen.youtubeVideoIds` is sent, or
10968
+ * a carousel ad (2 to 10 cards) when `demandGen.carouselCards` is sent.
10962
10969
  * Geo (countries, regions, cities, zips, metros) and languages go on the ad group, as
10963
10970
  * Demand Gen requires. `demandGen.channels` sets the ad group's channel controls and
10964
10971
  * `demandGen.audience` builds a Google Audience (user lists, interests, custom audiences,
@@ -10969,8 +10976,8 @@ export const replaceGoogleListingGroupFilters = <ThrowOnError extends boolean =
10969
10976
  * roasAverageFloor for target ROAS, LOWEST_COST_WITH_BID_CAP plus bidAmount for target
10970
10977
  * CPC. The created ad carries the native `platformCampaignId`, `platformAdSetId` (ad
10971
10978
  * group) and `platformAdId`. Activate with PUT /v1/ads/campaigns/{campaignId}/status;
10972
- * budget, bidding and name are edited with the regular campaign endpoints. Creative and
10973
- * targeting edits on an existing Demand Gen ad return 501 for now.
10979
+ * budget, bidding and name are edited with the regular campaign endpoints; creative,
10980
+ * channels, audience and ad group targeting with PUT /v1/ads/{adId} (`demandGen`, `targeting`).
10974
10981
  *
10975
10982
  * Other mutually-exclusive request shapes are selected by the body:
10976
10983
  *
@@ -5080,7 +5080,24 @@ export type GoogleCustomerConversionGoal = {
5080
5080
  };
5081
5081
 
5082
5082
  /**
5083
- * Creative, channel and audience settings for a Google Demand Gen campaign (campaignType demand_gen). Creates one ad group with one ad: a multi-asset image ad, or a video responsive ad when youtubeVideoIds is sent.
5083
+ * Created as a Google Audience and attached to the ad group. Send at least one dimension. Ids are numeric Google ids (user lists, interest categories, custom audiences) from the same customer.
5084
+ */
5085
+ export type GoogleDemandGenAudience = {
5086
+ userLists?: Array<(string)>;
5087
+ userInterests?: Array<(string)>;
5088
+ customAudiences?: Array<(string)>;
5089
+ ageRanges?: Array<{
5090
+ min: 18 | 25 | 35 | 45 | 55 | 65;
5091
+ /**
5092
+ * Omit for no upper bound.
5093
+ */
5094
+ max?: 24 | 34 | 44 | 54 | 64;
5095
+ }>;
5096
+ genders?: Array<('male' | 'female' | 'undetermined')>;
5097
+ };
5098
+
5099
+ /**
5100
+ * Creative, channel and audience settings for a Google Demand Gen campaign (campaignType demand_gen). Creates one ad group with one ad: a multi-asset image ad, a video responsive ad when youtubeVideoIds is sent, or a carousel ad when carouselCards is sent.
5084
5101
  */
5085
5102
  export type GoogleDemandGenInput = {
5086
5103
  /**
@@ -5090,20 +5107,23 @@ export type GoogleDemandGenInput = {
5090
5107
  finalUrl: string;
5091
5108
  businessName: string;
5092
5109
  /**
5093
- * Distinct texts.
5110
+ * Distinct texts. A carousel ad takes exactly one.
5094
5111
  */
5095
5112
  headlines: Array<(string)>;
5096
5113
  /**
5097
5114
  * Video ads only, and required there.
5098
5115
  */
5099
5116
  longHeadlines?: Array<(string)>;
5117
+ /**
5118
+ * A carousel ad takes exactly one.
5119
+ */
5100
5120
  descriptions: Array<(string)>;
5101
5121
  /**
5102
- * Image ads only. Call to action text such as 'Learn more'; Google picks one when omitted.
5122
+ * Image and carousel ads only. Call to action text such as 'Learn more'; Google picks one when omitted.
5103
5123
  */
5104
5124
  callToAction?: string;
5105
5125
  /**
5106
- * Public image URLs. An image ad needs landscape or square; a video ad takes only one logo.
5126
+ * Public image URLs. An image ad needs landscape or square; video and carousel ads take only one logo (carousel images go on each card).
5107
5127
  */
5108
5128
  images: {
5109
5129
  /**
@@ -5127,26 +5147,88 @@ export type GoogleDemandGenInput = {
5127
5147
  * Makes the ad a video responsive ad.
5128
5148
  */
5129
5149
  youtubeVideoIds?: Array<(string)>;
5150
+ /**
5151
+ * Makes the ad a carousel ad. Each card needs its own image (no two cards may share one); use the same image shape on every card. Card images are uploaded to the account's asset library before the campaign is created, validateOnly included (Google checks cards against existing images; identical images are reused, not duplicated).
5152
+ */
5153
+ carouselCards?: Array<{
5154
+ headline: string;
5155
+ /**
5156
+ * Defaults to demandGen.finalUrl.
5157
+ */
5158
+ finalUrl?: string;
5159
+ callToAction?: string;
5160
+ images: {
5161
+ /**
5162
+ * 1.91:1.
5163
+ */
5164
+ landscape?: string;
5165
+ /**
5166
+ * 1:1.
5167
+ */
5168
+ square?: string;
5169
+ /**
5170
+ * 4:5.
5171
+ */
5172
+ portrait?: string;
5173
+ };
5174
+ }>;
5130
5175
  /**
5131
5176
  * Channel controls on the ad group. Only the listed channels serve; omit to serve on all of them.
5132
5177
  */
5133
5178
  channels?: Array<('youtube_in_stream' | 'youtube_in_feed' | 'youtube_shorts' | 'discover' | 'gmail' | 'display')>;
5179
+ audience?: GoogleDemandGenAudience;
5134
5180
  /**
5135
- * Created as a Google Audience and attached to the ad group. Send at least one dimension. Ids are numeric Google ids (user lists, interest categories, custom audiences) from the same customer.
5181
+ * Attach an existing Google Audience by numeric id instead of audience.
5136
5182
  */
5137
- audience?: {
5138
- userLists?: Array<(string)>;
5139
- userInterests?: Array<(string)>;
5140
- customAudiences?: Array<(string)>;
5141
- ageRanges?: Array<{
5142
- min: 18 | 25 | 35 | 45 | 55 | 65;
5143
- /**
5144
- * Omit for no upper bound.
5145
- */
5146
- max?: 24 | 34 | 44 | 54 | 64;
5147
- }>;
5148
- genders?: Array<('male' | 'female' | 'undetermined')>;
5183
+ audienceId?: string;
5184
+ };
5185
+
5186
+ /**
5187
+ * Partial edit of a Google Demand Gen ad, sent in one atomic Google request. Every field
5188
+ * you send replaces that whole field; fields you omit are kept. Which creative fields
5189
+ * apply depends on the ad (read from Google): image ads take headlines, descriptions,
5190
+ * businessName, callToAction and images (landscape, square, portrait, logo); video ads
5191
+ * take headlines, longHeadlines, descriptions, businessName, youtubeVideoIds and exactly
5192
+ * one images.logo; carousel ads take exactly one headline, one description, one logo,
5193
+ * businessName and callToAction (their cards cannot be edited: create a new carousel ad).
5194
+ * A field the ad does not take returns 422. New images are uploaded as new Google assets;
5195
+ * the previous ones stay in the account's asset library.
5196
+ *
5197
+ * `channels`, `audience` and `audienceId` change the ad's ad group, so they apply to every
5198
+ * ad in it. `audience` builds a new Google Audience and attaches it in place of the current
5199
+ * one (the previous audience is detached, not deleted); `audienceId` attaches an existing
5200
+ * one. Ad groups of campaigns migrated from Discovery use ungrouped audience segments,
5201
+ * and Google refuses an Audience on them.
5202
+ *
5203
+ */
5204
+ export type GoogleDemandGenUpdate = {
5205
+ finalUrl?: string;
5206
+ businessName?: string;
5207
+ headlines?: Array<(string)>;
5208
+ /**
5209
+ * Video ads only.
5210
+ */
5211
+ longHeadlines?: Array<(string)>;
5212
+ descriptions?: Array<(string)>;
5213
+ /**
5214
+ * Image and carousel ads only.
5215
+ */
5216
+ callToAction?: string;
5217
+ images?: {
5218
+ landscape?: Array<(string)>;
5219
+ square?: Array<(string)>;
5220
+ portrait?: Array<(string)>;
5221
+ logo?: Array<(string)>;
5149
5222
  };
5223
+ /**
5224
+ * Video ads only.
5225
+ */
5226
+ youtubeVideoIds?: Array<(string)>;
5227
+ /**
5228
+ * Replaces the ad group's channel controls; only the listed channels serve.
5229
+ */
5230
+ channels?: Array<('youtube_in_stream' | 'youtube_in_feed' | 'youtube_shorts' | 'discover' | 'gmail' | 'display')>;
5231
+ audience?: GoogleDemandGenAudience;
5150
5232
  /**
5151
5233
  * Attach an existing Google Audience by numeric id instead of audience.
5152
5234
  */
@@ -37423,6 +37505,10 @@ export type UpdateAdData = {
37423
37505
  * Google Performance Max only. Replaces whole asset roles on the ad's asset group. Returns 422 on any other platform or channel.
37424
37506
  */
37425
37507
  assetGroup?: (GooglePmaxAssetGroupUpdate);
37508
+ /**
37509
+ * Google Demand Gen only. Returns 422 on any other platform or channel.
37510
+ */
37511
+ demandGen?: (GoogleDemandGenUpdate);
37426
37512
  status?: 'active' | 'paused';
37427
37513
  budget?: {
37428
37514
  /**