@getlatedev/node 0.2.1758 → 0.2.1760
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 +35 -5
- package/dist/index.d.ts +35 -5
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +9 -3
- package/src/generated/types.gen.ts +35 -4
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.
|
|
39
|
+
version: "0.2.1760",
|
|
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.
|
|
8
|
+
version: "0.2.1760",
|
|
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
package/src/generated/sdk.gen.ts
CHANGED
|
@@ -21220,11 +21220,11 @@ export const sendConversions = <ThrowOnError extends boolean = false>(options: O
|
|
|
21220
21220
|
|
|
21221
21221
|
/**
|
|
21222
21222
|
* Adjust uploaded conversions
|
|
21223
|
-
* Retracts, restates the value of, or enhances conversions you already sent to Google Ads or
|
|
21223
|
+
* Retracts, restates the value of, or enhances conversions you already sent to Google Ads, Impact or a Microsoft Ads offline conversion goal, 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}`.
|
|
21224
21224
|
*
|
|
21225
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.
|
|
21226
21226
|
*
|
|
21227
|
-
* ### Google Ads and
|
|
21227
|
+
* ### Google Ads, Impact and Microsoft Ads only
|
|
21228
21228
|
*
|
|
21229
21229
|
* Google handles adjustments through the classic Google Ads API (`ConversionAdjustmentUploadService`). The Data Manager `ingestEvents` path used for sending conversions is ingest-only.
|
|
21230
21230
|
*
|
|
@@ -21234,6 +21234,11 @@ export const sendConversions = <ThrowOnError extends boolean = false>(options: O
|
|
|
21234
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
21235
|
* - Impact applies changes asynchronously and refuses them on its side past the action's locking date.
|
|
21236
21236
|
*
|
|
21237
|
+
* On Microsoft Ads (`ApplyOfflineConversionAdjustments`), only offline conversion goals take changes; a UET tag refuses them:
|
|
21238
|
+
*
|
|
21239
|
+
* - `RETRACTION` retracts the conversion and `RESTATEMENT` sets its new value. Microsoft has no `ENHANCEMENT`.
|
|
21240
|
+
* - Microsoft has no order id: send `msclkid` and `conversionTime`, the click id and time the conversion was sent with.
|
|
21241
|
+
*
|
|
21237
21242
|
* Other platforms have no equivalent, so this endpoint returns `405` for them.
|
|
21238
21243
|
*
|
|
21239
21244
|
* ### Adjustment types
|
|
@@ -21248,10 +21253,11 @@ export const sendConversions = <ThrowOnError extends boolean = false>(options: O
|
|
|
21248
21253
|
*
|
|
21249
21254
|
* - `orderId`: the transaction ID you sent as `eventId` on the original conversion. Recommended, and **required** for `ENHANCEMENT`.
|
|
21250
21255
|
* - `gclid` + `conversionTime`: the click ID and the original conversion's time (unix seconds). Not available for `ENHANCEMENT`.
|
|
21256
|
+
* - `msclkid` + `conversionTime`: the only key on Microsoft Ads.
|
|
21251
21257
|
*
|
|
21252
21258
|
* ### Other fields
|
|
21253
21259
|
*
|
|
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`,
|
|
21260
|
+
* - `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`, `<program id>:<event type id>` on Impact, and `accounts/{adAccountId}/conversionGoals/{goalId}` on Microsoft Ads.
|
|
21255
21261
|
* - PII in `user` is hashed with SHA-256 server-side (Gmail-specific normalization included). Send plaintext.
|
|
21256
21262
|
* - Times are unix seconds; we convert to Google's required `yyyy-MM-dd HH:mm:ss+00:00` format.
|
|
21257
21263
|
*
|
|
@@ -450,6 +450,10 @@ export type Ad = {
|
|
|
450
450
|
* Meta: the display link of a link (image) ad (`link_data.caption`). Absent when the creative has none.
|
|
451
451
|
*/
|
|
452
452
|
caption?: string;
|
|
453
|
+
/**
|
|
454
|
+
* Meta: the `GET_DIRECTIONS` map location sent as `callToActionLink` on POST /v1/ads/create, the same value as that input. Absent on ads created without it; null once PUT /v1/ads/{adId} changed the call to action, which points the button back at `linkUrl`.
|
|
455
|
+
*/
|
|
456
|
+
callToActionLink?: (string) | null;
|
|
453
457
|
/**
|
|
454
458
|
* Meta: the ad image hash (`image_hash`), reusable as `imageHash` on POST /v1/ads/create within the same ad account. `thumbnailUrl` and `mediaUrls` carry its stable full resolution permalink when Meta resolves it.
|
|
455
459
|
*/
|
|
@@ -18051,6 +18055,16 @@ export type MetaBusinessUser = {
|
|
|
18051
18055
|
role?: string;
|
|
18052
18056
|
};
|
|
18053
18057
|
|
|
18058
|
+
/**
|
|
18059
|
+
* Meta only. The `GET_DIRECTIONS` button's map location, sent as the creative's `call_to_action.value.link` while `linkUrl` stays `link_data.link`. Requires `callToAction: GET_DIRECTIONS`, and a `GET_DIRECTIONS` image ad requires it.
|
|
18060
|
+
*
|
|
18061
|
+
* - Meta's location format `fbgeo://<latitude>, <longitude>, "<address>"`.
|
|
18062
|
+
* - Meta refuses a website or https map URL on this button ("call_to_action[value][link] should represent a valid URL") and an fbgeo location as the ad link (subcode 2061006), so the ad link and the button link are two fields.
|
|
18063
|
+
* - Every other call to action opens `linkUrl`, as Meta requires the button link to match the ad link.
|
|
18064
|
+
*
|
|
18065
|
+
*/
|
|
18066
|
+
export type MetaCallToActionLink = string;
|
|
18067
|
+
|
|
18054
18068
|
export type MetaCatalogProduct = {
|
|
18055
18069
|
/**
|
|
18056
18070
|
* Meta product item ID (use in the product endpoints)
|
|
@@ -73930,6 +73944,10 @@ export type CreateAdCreativeData = {
|
|
|
73930
73944
|
*/
|
|
73931
73945
|
callToAction?: string;
|
|
73932
73946
|
linkUrl: string;
|
|
73947
|
+
/**
|
|
73948
|
+
* The map location a `GET_DIRECTIONS` button opens, while `linkUrl` stays the creative's website link. Requires `callToAction: GET_DIRECTIONS` and an image creative (`imageUrl` or `imageHash`), 400 otherwise; a `GET_DIRECTIONS` image creative without it is a 400 too.
|
|
73949
|
+
*/
|
|
73950
|
+
callToActionLink?: MetaCallToActionLink;
|
|
73933
73951
|
/**
|
|
73934
73952
|
* Publicly reachable image; uploaded to the account's library server-side.
|
|
73935
73953
|
*/
|
|
@@ -77462,6 +77480,15 @@ export type CreateStandaloneAdData = {
|
|
|
77462
77480
|
* - **Reddit:** required on image and video ads (the post's destination and the ad's click URL), the fallback for carousel cards without their own, and refused with 400 on text ads.
|
|
77463
77481
|
*/
|
|
77464
77482
|
linkUrl?: string;
|
|
77483
|
+
/**
|
|
77484
|
+
* Meta only. The map location a `GET_DIRECTIONS` button opens, while `linkUrl` stays the ad's website link.
|
|
77485
|
+
*
|
|
77486
|
+
* - Single image ads, with or without `bodies` / `headlines`, also on the adSetId attach shape and with `validateOnly`. Required on a `GET_DIRECTIONS` image ad (400 without it).
|
|
77487
|
+
* - 400 with any other `callToAction`, with `video`, `carouselCards`, `creatives[]`, `dynamicCreative`, `placementAssets`, `translations`, catalog ads, `leadGenFormId`, goal `page_likes` or `existingCreativeId`, and on other networks.
|
|
77488
|
+
* - Stored on the ad and returned as `creative.callToActionLink`.
|
|
77489
|
+
*
|
|
77490
|
+
*/
|
|
77491
|
+
callToActionLink?: MetaCallToActionLink;
|
|
77465
77492
|
/**
|
|
77466
77493
|
* Lead Gen form ID to attach to the ad's creative. REQUIRED when `goal` is `lead_generation`. Create one via POST /v1/ads/lead-forms.
|
|
77467
77494
|
*
|
|
@@ -81049,11 +81076,11 @@ export type SendConversionsError = (unknown | ErrorResponse);
|
|
|
81049
81076
|
export type AdjustConversionsData = {
|
|
81050
81077
|
body: {
|
|
81051
81078
|
/**
|
|
81052
|
-
* SocialAccount ID. Must be a `googleads` or `
|
|
81079
|
+
* SocialAccount ID. Must be a `googleads`, `impact` or `microsoftads` account.
|
|
81053
81080
|
*/
|
|
81054
81081
|
accountId: string;
|
|
81055
81082
|
/**
|
|
81056
|
-
* Conversion action resource name on Google, e.g. `customers/1234567890/conversionActions/987654321`; `<program id>:<event type id>` on Impact.
|
|
81083
|
+
* Conversion action resource name on Google, e.g. `customers/1234567890/conversionActions/987654321`; `<program id>:<event type id>` on Impact; `accounts/{adAccountId}/conversionGoals/{goalId}` on Microsoft Ads.
|
|
81057
81084
|
*/
|
|
81058
81085
|
destinationId: string;
|
|
81059
81086
|
adjustments: Array<{
|
|
@@ -81071,9 +81098,13 @@ export type AdjustConversionsData = {
|
|
|
81071
81098
|
*/
|
|
81072
81099
|
gclid?: string;
|
|
81073
81100
|
/**
|
|
81074
|
-
* The original conversion's time, unix seconds. Required when identifying by `gclid`.
|
|
81101
|
+
* The original conversion's time, unix seconds. Required when identifying by `gclid` or `msclkid`.
|
|
81075
81102
|
*/
|
|
81076
81103
|
conversionTime?: number;
|
|
81104
|
+
/**
|
|
81105
|
+
* Microsoft Ads only, and required there. The click ID the conversion was sent with. Pair with `conversionTime`.
|
|
81106
|
+
*/
|
|
81107
|
+
msclkid?: string;
|
|
81077
81108
|
/**
|
|
81078
81109
|
* RESTATEMENT only. The corrected TOTAL conversion value.
|
|
81079
81110
|
*/
|
|
@@ -81098,7 +81129,7 @@ export type AdjustConversionsData = {
|
|
|
81098
81129
|
};
|
|
81099
81130
|
|
|
81100
81131
|
export type AdjustConversionsResponse = ({
|
|
81101
|
-
platform?: 'googleads' | 'impact';
|
|
81132
|
+
platform?: 'googleads' | 'impact' | 'microsoftads';
|
|
81102
81133
|
/**
|
|
81103
81134
|
* Adjustments accepted by the platform.
|
|
81104
81135
|
*/
|