@getlatedev/node 0.2.1359 → 0.2.1361

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.
@@ -1917,7 +1917,7 @@ export type AdTracking = {
1917
1917
  value: string;
1918
1918
  }>;
1919
1919
  /**
1920
- * POST /v1/ads/create on Meta and Google only. Every ad created there carries `zrn=<platform ad id>` on its landing URL so orders and events tied to the landing URL map back to the ad. Meta: `{ key: zrn, value: '{{ad.id}}' }` is appended after your `urlTags`, which are sent unchanged; a `zrn` key you send yourself is kept. Skipped for lead forms, call ads, `existingCreativeId` and app promotion. Google (Display and Search): the ad's `final_url_suffix` becomes the suffix it would inherit (ad group, campaign or account) plus `&zrn={creative}`, so your account and campaign UTMs still apply; if that suffix cannot be read or Google rejects it, the ad is created untagged. Existing ads are never changed. Set `false` to create the ad with no Zernio tag.
1920
+ * POST /v1/ads/create on Meta and Google only. Every ad created there carries `zrn=<platform ad id>` on its landing URL so orders and events tied to the landing URL map back to the ad. Meta: `{ key: zrn, value: '{{ad.id}}' }` is appended after your `urlTags`, which are sent unchanged; a `zrn` key you send yourself is kept. Skipped for lead forms, call ads, `existingCreativeId` and app promotion. Google (Display and Search): the ad's `final_url_suffix` is set to `zrn={creative}` only when the ad inherits no suffix from its ad group, campaign or account; when one exists the ad is left untouched (your suffix keeps applying) and attribution uses the click's `gclid`. If the inherited suffix cannot be read or Google rejects the tag, the ad is created untagged. Existing ads are never changed. Set `false` to create the ad with no Zernio tag.
1921
1921
  */
1922
1922
  zernioTag?: boolean;
1923
1923
  };
@@ -47739,7 +47739,35 @@ export type UpdateAdSetData = {
47739
47739
  devicePlatforms?: Array<('mobile' | 'desktop')>;
47740
47740
  } | null;
47741
47741
  /**
47742
- * Meta only (400 elsewhere). Targeting fields to change, same shape as the `targeting`
47742
+ * Reddit only. Every other platform ignores it (nothing is written and no error is returned,
47743
+ * so a body that also sends `status` still applies it); Meta takes it in
47744
+ * `platformSpecificData.startDate`. The ad group's new start_time, ISO 8601. A value
47745
+ * without an offset (`YYYY-MM-DD` or `YYYY-MM-DDTHH:MM:SS`) is read in the ad account
47746
+ * timezone. It cannot be earlier than the start of a campaign that starts in the future,
47747
+ * nor at or after the ad group's end (400, `param: startDate`).
47748
+ *
47749
+ */
47750
+ startDate?: string;
47751
+ /**
47752
+ * Reddit only. Every other platform ignores it (nothing is written and no error is returned,
47753
+ * so a body that also sends `status` still applies it); Meta takes it in
47754
+ * `platformSpecificData.endDate`. The ad group's new end_time, ISO 8601, read in the ad
47755
+ * account timezone when it has no offset; a date alone means the end of that day. `null`
47756
+ * removes the end date so the ad group runs continuously. Returns 400 with
47757
+ * `param: endDate` when it is not after the start, when it falls after the campaign's
47758
+ * end, when the campaign uses campaign budget optimization with no end date (Reddit then
47759
+ * takes no end date on its ad groups), when `null` would outlive a campaign budget
47760
+ * campaign that ends, or when `null` is sent for an ad group with a lifetime budget.
47761
+ *
47762
+ */
47763
+ endDate?: (string) | null;
47764
+ /**
47765
+ * Meta and Reddit (400 elsewhere). On Reddit, see the description above: `languages`
47766
+ * must be among Reddit's ISO 639-1 codes (AR, CS, DA, DE, EL, EN, ES, FI, FR, HU, IT, JA,
47767
+ * KO, NL, NO, PL, PT, RO, SV, VI, ZH, any case), emptying every included location is a
47768
+ * 400 with `param: targeting.countries`, and fields Reddit ad groups cannot take (age,
47769
+ * income, devices, behaviors, B2B, `places`) return 400 with `param: targeting.<field>`.
47770
+ * On Meta: targeting fields to change, same shape as the `targeting`
47743
47771
  * object on POST /v1/ads/create. Only the keys you send change: Zernio reads the ad set's
47744
47772
  * live targeting from Meta, merges these keys over it and writes the full spec back, so
47745
47773
  * everything you do not send (custom audiences, geo, age, interest groups,
@@ -47901,11 +47929,19 @@ export type UpdateAdSetResponse = ({
47901
47929
  [key: string]: unknown;
47902
47930
  };
47903
47931
  /**
47904
- * Present when `placements` or `targeting` was sent. The ad set's full Meta targeting as written (Meta snake_case). The same snake_case object is stored as the ad set's and its ads' `targeting`.
47932
+ * Present when `placements` or `targeting` was sent. The ad set's full targeting as written, in the platform's own vocabulary (Meta or Reddit snake_case). Stored as the ad set's `targeting`. Meta stores the same object on its ads; Reddit stores it on its ads in the create vocabulary (`countries`, `communities`, ...), as GET /v1/ads/ad-sets/{adSetId}/targeting returns it.
47905
47933
  */
47906
47934
  targeting?: {
47907
47935
  [key: string]: unknown;
47908
47936
  };
47937
+ /**
47938
+ * Reddit: the start_time written, a UTC instant. Present when `startDate` was sent.
47939
+ */
47940
+ startDate?: string;
47941
+ /**
47942
+ * Reddit: the end_time written, a UTC instant, or null when the end date was removed. Present when `endDate` was sent.
47943
+ */
47944
+ endDate?: (string) | null;
47909
47945
  });
47910
47946
 
47911
47947
  export type UpdateAdSetError = (unknown | ErrorResponse);
@@ -47929,6 +47965,39 @@ export type DeleteAdSetResponse = ({
47929
47965
 
47930
47966
  export type DeleteAdSetError = (ErrorResponse | unknown);
47931
47967
 
47968
+ export type GetAdSetTargetingData = {
47969
+ path: {
47970
+ /**
47971
+ * Reddit ad group ID
47972
+ */
47973
+ adSetId: string;
47974
+ };
47975
+ query?: {
47976
+ /**
47977
+ * Disambiguates when the same adSetId string exists on more than one connected platform.
47978
+ */
47979
+ platform?: 'reddit';
47980
+ };
47981
+ };
47982
+
47983
+ export type GetAdSetTargetingResponse = ({
47984
+ adSetId?: string;
47985
+ /**
47986
+ * Only the keys the ad group sets. `regions`, `metros`, `cities` and `zips` entries carry `{ key, name }`; `interests` carry `{ id, name }`.
47987
+ */
47988
+ targeting?: (TargetingSpec);
47989
+ /**
47990
+ * The ad group's start_time, null when it has none.
47991
+ */
47992
+ startDate?: (string) | null;
47993
+ /**
47994
+ * The ad group's end_time, null when it runs continuously.
47995
+ */
47996
+ endDate?: (string) | null;
47997
+ });
47998
+
47999
+ export type GetAdSetTargetingError = (ErrorResponse | unknown);
48000
+
47932
48001
  export type UpdateAdSetStatusData = {
47933
48002
  body: {
47934
48003
  status: 'active' | 'paused';
@@ -57999,6 +58068,26 @@ export type ListEventsResponse = ({
57999
58068
  hasEmail?: boolean;
58000
58069
  hasPhone?: boolean;
58001
58070
  hasExternalId?: boolean;
58071
+ /**
58072
+ * The ad behind the event, when Zernio can name it. Google: from the click behind `clickIds.gclid` (synced daily from Google Ads click_view for clicks up to 14 days before the event; gbraid/wbraid clicks are not resolved). Meta: from the `zrn` ad id, for Meta ads Zernio holds. `null` otherwise.
58073
+ */
58074
+ ad?: {
58075
+ platform?: 'googleads' | 'metaads';
58076
+ /**
58077
+ * Google Ads customer id (Google only).
58078
+ */
58079
+ customerId?: string;
58080
+ campaignId?: (string) | null;
58081
+ /**
58082
+ * Google only.
58083
+ */
58084
+ adGroupId?: (string) | null;
58085
+ /**
58086
+ * Meta only.
58087
+ */
58088
+ adSetId?: (string) | null;
58089
+ adId?: (string) | null;
58090
+ } | null;
58002
58091
  }>;
58003
58092
  /**
58004
58093
  * Pass as `cursor` to get the next page; `null` on the last page.