@getlatedev/node 0.2.1732 → 0.2.1734
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/README.md +1 -1
- package/dist/index.d.mts +50 -4
- package/dist/index.d.ts +50 -4
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +13 -3
- package/src/generated/types.gen.ts +54 -3
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.1734",
|
|
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.1734",
|
|
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
|
@@ -3875,6 +3875,8 @@ export const selectGoogleSearchConsoleSite = <ThrowOnError extends boolean = fal
|
|
|
3875
3875
|
|
|
3876
3876
|
/**
|
|
3877
3877
|
* Get Campaign Manager 360 OAuth connect URL
|
|
3878
|
+
* **Coming soon.** Google is still verifying the `dfatrafficking` permission Zernio requests. Until it approves, connecting may not work for your Google account.
|
|
3879
|
+
*
|
|
3878
3880
|
* Starts Google OAuth for Campaign Manager 360 (Floodlight). Each connected CM360 user profile becomes an account with platform `campaignmanager360`; it receives the conversions you forward to its Floodlight activities and does not post.
|
|
3879
3881
|
*
|
|
3880
3882
|
* Requested scopes: `https://www.googleapis.com/auth/datamanager` (conversions go through Google's Data Manager API) and `https://www.googleapis.com/auth/dfatrafficking` (only to list advertisers and Floodlight activities; Campaign Manager has no read-only trafficking scope).
|
|
@@ -20973,7 +20975,7 @@ export const getConversionsQuality = <ThrowOnError extends boolean = false>(opti
|
|
|
20973
20975
|
* - Attentive (`attentive`) via the eCommerce and Custom Events APIs
|
|
20974
20976
|
* - Impact (`impact`) via the Conversions API (`POST /Advertisers/{AccountSID}/Conversions`)
|
|
20975
20977
|
* - Awin (`awin`) via the Conversion API (`POST /s2s/advertiser/{advertiserId}/orders`)
|
|
20976
|
-
* - Campaign Manager 360 (`campaignmanager360`) via the Data Manager API `ingestEvents`, to a Floodlight activity
|
|
20978
|
+
* - Campaign Manager 360 (`campaignmanager360`, coming soon: pending Google's verification of the `dfatrafficking` permission) via the Data Manager API `ingestEvents`, to a Floodlight activity
|
|
20977
20979
|
* - The Trade Desk (`tradedeskads`) via the Real-Time Conversions API (`POST https://insight.adsrvr.org/track/realtimeconversion`)
|
|
20978
20980
|
* - Amazon Ads (`amazonads`) via the Amazon Ads Conversions API (`POST /adsApi/v1/create/events`)
|
|
20979
20981
|
*
|
|
@@ -21551,6 +21553,12 @@ export const listForwardingRules = <ThrowOnError extends boolean = false>(option
|
|
|
21551
21553
|
*
|
|
21552
21554
|
* Pick `destinationId` from `GET /v1/ads/conversions/destinations`. Set `eventNames` to forward only those events, such as only `Purchase`; leave it out to forward every event.
|
|
21553
21555
|
*
|
|
21556
|
+
* - `eventNameMap` renames events for this destination (send your `Lead` as its `Purchase`).
|
|
21557
|
+
* - `valueOverride` changes the value it gets (a fixed amount or a percent of the event's value).
|
|
21558
|
+
* - `valueCondition` forwards only events above, below or equal to a value.
|
|
21559
|
+
*
|
|
21560
|
+
* Each applies to this rule only: the event is stored, and sent to other rules, as received.
|
|
21561
|
+
*
|
|
21554
21562
|
*/
|
|
21555
21563
|
export const createForwardingRule = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateForwardingRuleData, ThrowOnError>) => {
|
|
21556
21564
|
return (options?.client ?? client).post<CreateForwardingRuleResponse, CreateForwardingRuleError, ThrowOnError>({
|
|
@@ -21560,8 +21568,10 @@ export const createForwardingRule = <ThrowOnError extends boolean = false>(optio
|
|
|
21560
21568
|
};
|
|
21561
21569
|
|
|
21562
21570
|
/**
|
|
21563
|
-
*
|
|
21564
|
-
*
|
|
21571
|
+
* Update a forwarding rule
|
|
21572
|
+
* Changes the fields you send and keeps the others. Send `eventNameMap: null` to stop renaming, `valueOverride: { "mode": "original" }` to send the event's own value again, and `valueCondition: null` to forward whatever the value.
|
|
21573
|
+
*
|
|
21574
|
+
* `apiSecret` replaces the secret of a rule whose destination needs one, such as a Google Analytics data stream's Measurement Protocol API secret. Before saving, Zernio sends one hit to Google's validation server; Google does not confirm the secret itself, so check GA4 Realtime after the next events.
|
|
21565
21575
|
*
|
|
21566
21576
|
*/
|
|
21567
21577
|
export const updateForwardingRule = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateForwardingRuleData, ThrowOnError>) => {
|
|
@@ -13666,9 +13666,54 @@ export type ForwardingRule = {
|
|
|
13666
13666
|
* Only when an `apiSecret` was saved by this request. Google Analytics never confirms a Measurement Protocol API secret, so it is `false` there: the first events in GA4 Realtime prove the secret is right.
|
|
13667
13667
|
*/
|
|
13668
13668
|
apiSecretVerified?: boolean;
|
|
13669
|
+
/**
|
|
13670
|
+
* Renames events for this destination, such as `{ "Lead": "Purchase" }`; null sends every event under its own name.
|
|
13671
|
+
*/
|
|
13672
|
+
eventNameMap?: {
|
|
13673
|
+
[key: string]: (string);
|
|
13674
|
+
} | null;
|
|
13675
|
+
valueOverride?: ForwardingRuleValueOverride;
|
|
13676
|
+
/**
|
|
13677
|
+
* Forwards only events whose value matches; null forwards whatever the value.
|
|
13678
|
+
*/
|
|
13679
|
+
valueCondition?: (ForwardingRuleValueCondition | null);
|
|
13669
13680
|
createdAt?: string;
|
|
13670
13681
|
};
|
|
13671
13682
|
|
|
13683
|
+
/**
|
|
13684
|
+
* Your event name to the name this destination gets, such as `{ "Lead": "Purchase" }`. Names not in the map are sent unchanged.
|
|
13685
|
+
*
|
|
13686
|
+
* A target spelled like a standard event in another case or form (`purchase`, `generate_lead`) is saved as the standard name (`Purchase`, `Lead`), so each platform gets its own standard event.
|
|
13687
|
+
*
|
|
13688
|
+
* `eventNames` and `valueCondition` are checked against the name and value as received, before renaming. The event id is never changed, so deduplication still works.
|
|
13689
|
+
*/
|
|
13690
|
+
export type ForwardingRuleEventNameMap = {
|
|
13691
|
+
[key: string]: (string);
|
|
13692
|
+
};
|
|
13693
|
+
|
|
13694
|
+
/**
|
|
13695
|
+
* Forward only events whose value is greater than (`gt`), less than (`lt`) or equal to (`eq`) `amount`. An event without a value counts as 0. Checked on the value as received, before `valueOverride`.
|
|
13696
|
+
*/
|
|
13697
|
+
export type ForwardingRuleValueCondition = {
|
|
13698
|
+
operator: 'gt' | 'lt' | 'eq';
|
|
13699
|
+
amount: number;
|
|
13700
|
+
};
|
|
13701
|
+
|
|
13702
|
+
export type operator = 'gt' | 'lt' | 'eq';
|
|
13703
|
+
|
|
13704
|
+
/**
|
|
13705
|
+
* The value this destination gets. `original` sends the event's own value; `fixed` sends `amount` for every event; `percent` sends `amount` percent of the event's value (30 sends 30%, rounded to cents), and leaves an event without a value without one. The currency is kept.
|
|
13706
|
+
*/
|
|
13707
|
+
export type ForwardingRuleValueOverride = {
|
|
13708
|
+
mode: 'original' | 'fixed' | 'percent';
|
|
13709
|
+
/**
|
|
13710
|
+
* Required for `fixed` and `percent` (at most 1000 for `percent`); null for `original`.
|
|
13711
|
+
*/
|
|
13712
|
+
amount?: (number) | null;
|
|
13713
|
+
};
|
|
13714
|
+
|
|
13715
|
+
export type mode7 = 'original' | 'fixed' | 'percent';
|
|
13716
|
+
|
|
13672
13717
|
/**
|
|
13673
13718
|
* Why this account, calendar or address could not be read. The provider's code when it gave one.
|
|
13674
13719
|
*/
|
|
@@ -23768,7 +23813,7 @@ export type criteriaType = 'AGE' | 'GENDER' | 'OS_TYPE' | 'DEVICE_PLATFORM' | 'L
|
|
|
23768
23813
|
/**
|
|
23769
23814
|
* Required on every criterion. `CONTAINS` is currently the only value Meta supports.
|
|
23770
23815
|
*/
|
|
23771
|
-
export type
|
|
23816
|
+
export type operator2 = 'CONTAINS';
|
|
23772
23817
|
|
|
23773
23818
|
/**
|
|
23774
23819
|
* A named set of bid-adjustment rules on an ad account. Attach it to an ad set with
|
|
@@ -31165,7 +31210,7 @@ export type XArticle = {
|
|
|
31165
31210
|
/**
|
|
31166
31211
|
* Publish creates an X Article draft and then publishes it. Draft stops after draft creation and returns the X draft ID without a public URL.
|
|
31167
31212
|
*/
|
|
31168
|
-
export type
|
|
31213
|
+
export type mode8 = 'publish' | 'draft';
|
|
31169
31214
|
|
|
31170
31215
|
export type XArticleBlock = {
|
|
31171
31216
|
type: 'unstyled' | 'header-one' | 'header-two' | 'header-three' | 'unordered-list-item' | 'ordered-list-item' | 'blockquote' | 'atomic';
|
|
@@ -81812,6 +81857,9 @@ export type CreateForwardingRuleData = {
|
|
|
81812
81857
|
* Forward only events from these sources, such as only `web` for a tracked website. Leave it out to forward events from every source.
|
|
81813
81858
|
*/
|
|
81814
81859
|
sources?: Array<('api' | 'relay' | 'hubspot' | 'meta_leads' | 'google_leads' | 'linkedin_leads' | 'tiktok_leads' | 'shopify' | 'woocommerce' | 'stripe' | 'web' | 'salesforce' | 'gohighlevel' | 'postback' | 'form_leads')>;
|
|
81860
|
+
eventNameMap?: ForwardingRuleEventNameMap;
|
|
81861
|
+
valueOverride?: ForwardingRuleValueOverride;
|
|
81862
|
+
valueCondition?: ForwardingRuleValueCondition;
|
|
81815
81863
|
/**
|
|
81816
81864
|
* Google Analytics streams only: the stream's Measurement Protocol API secret (GA4 Admin › Data streams). Optional when the connection has edit access, since Zernio then creates it. Checked against Google's validation server, stored encrypted, never returned. Change it with `PATCH /v1/events/forwarding-rules/{ruleId}`.
|
|
81817
81865
|
*/
|
|
@@ -81829,7 +81877,10 @@ export type CreateForwardingRuleError = (ErrorResponse | {
|
|
|
81829
81877
|
|
|
81830
81878
|
export type UpdateForwardingRuleData = {
|
|
81831
81879
|
body: {
|
|
81832
|
-
apiSecret
|
|
81880
|
+
apiSecret?: string;
|
|
81881
|
+
eventNameMap?: (ForwardingRuleEventNameMap | null);
|
|
81882
|
+
valueOverride?: ForwardingRuleValueOverride;
|
|
81883
|
+
valueCondition?: (ForwardingRuleValueCondition | null);
|
|
81833
81884
|
};
|
|
81834
81885
|
path: {
|
|
81835
81886
|
/**
|