@getlatedev/node 0.2.1783 → 0.2.1785

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.1783",
39
+ version: "0.2.1785",
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.1783",
8
+ version: "0.2.1785",
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.1783",
3
+ "version": "0.2.1785",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -21780,6 +21780,7 @@ export const listForwardingRules = <ThrowOnError extends boolean = false>(option
21780
21780
  * - `eventNameMap` renames events for this destination (send your `Lead` as its `Purchase`).
21781
21781
  * - `valueOverride` changes the value it gets (a fixed amount or a percent of the event's value).
21782
21782
  * - `valueCondition` forwards only events above, below or equal to a value.
21783
+ * - `eventValues` sets the value of each event name (a `Lead` worth 20 EUR, a `QualifiedLead` worth 150 EUR) and wins over `valueOverride` for the names it lists.
21783
21784
  *
21784
21785
  * Each applies to this rule only: the event is stored, and sent to other rules, as received.
21785
21786
  *
@@ -21793,7 +21794,7 @@ export const createForwardingRule = <ThrowOnError extends boolean = false>(optio
21793
21794
 
21794
21795
  /**
21795
21796
  * Update a forwarding rule
21796
- * 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.
21797
+ * 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. `eventValues` replaces the whole map; `null` or `{}` clears it.
21797
21798
  *
21798
21799
  * `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.
21799
21800
  *
@@ -9420,7 +9420,7 @@ export type ConnectWelcomeScreen = {
9420
9420
  */
9421
9421
  export type ConsentDrop = {
9422
9422
  /**
9423
- * Index into the events sent to this destination.
9423
+ * Position of the event in the request's `events` array, counted from 0, also when repeats or events this destination does not take were left out.
9424
9424
  */
9425
9425
  eventIndex?: number;
9426
9426
  eventId?: string;
@@ -14318,6 +14318,10 @@ export type ForwardingRule = {
14318
14318
  * Forwards only events whose value matches; null forwards whatever the value.
14319
14319
  */
14320
14320
  valueCondition?: (ForwardingRuleValueCondition | null);
14321
+ /**
14322
+ * The value each listed event is sent with; null sends every event with the value `valueOverride` gives it.
14323
+ */
14324
+ eventValues?: (ForwardingRuleEventValues | null);
14321
14325
  createdAt?: string;
14322
14326
  };
14323
14327
 
@@ -14332,6 +14336,32 @@ export type ForwardingRuleEventNameMap = {
14332
14336
  [key: string]: (string);
14333
14337
  };
14334
14338
 
14339
+ /**
14340
+ * How one event is valued. `original` sends its own value. `fixed` sends `amount` in `currency`, even when the event came without a value. `percent` sends `amount` percent of its own value (10 sends 10%, rounded to cents) in its own currency, and leaves an event without a value without one.
14341
+ */
14342
+ export type ForwardingRuleEventValue = {
14343
+ mode: "original";
14344
+ } | {
14345
+ mode: "fixed";
14346
+ amount: number;
14347
+ /**
14348
+ * ISO 4217 code, saved in capitals.
14349
+ */
14350
+ currency: string;
14351
+ } | {
14352
+ mode: "percent";
14353
+ amount: number;
14354
+ };
14355
+
14356
+ /**
14357
+ * The value this destination gets for each event name, keyed by the name as received (before `eventNameMap` renames it), such as a `Lead` worth 20 EUR and a `QualifiedLead` worth 150 EUR. An event listed here ignores `valueOverride`; events not listed keep it.
14358
+ *
14359
+ * The dashboard's Value sent section (Ads, Conversions, a destination) sets this map.
14360
+ */
14361
+ export type ForwardingRuleEventValues = {
14362
+ [key: string]: ForwardingRuleEventValue;
14363
+ };
14364
+
14335
14365
  /**
14336
14366
  * 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`.
14337
14367
  */
@@ -82137,7 +82167,7 @@ export type SendEventsResponse = ({
82137
82167
  drops?: Array<ConsentDrop>;
82138
82168
  failures?: Array<{
82139
82169
  /**
82140
- * Index into the events sent to this destination.
82170
+ * Position of the event in the request's `events` array, counted from 0, also when repeats or events this destination does not take were left out.
82141
82171
  */
82142
82172
  eventIndex?: number;
82143
82173
  eventId?: string;
@@ -82890,6 +82920,14 @@ export type GetEventResponse = ({
82890
82920
  error?: (string) | null;
82891
82921
  errorCode?: (string) | null;
82892
82922
  sentAt?: string;
82923
+ /**
82924
+ * The value this destination got, after its forwarding rule's `eventValues` or `valueOverride`. Null when it got none, and on sends before 2026-11-24.
82925
+ */
82926
+ valueSent?: (number) | null;
82927
+ /**
82928
+ * The currency sent with `valueSent`.
82929
+ */
82930
+ currencySent?: (string) | null;
82893
82931
  }>;
82894
82932
  /**
82895
82933
  * The touches the event is split across, oldest first: website visits (an ad click, search, a tagged link), the first and latest visits HubSpot recorded for a deal, earlier lead forms or sales, and a Shopify buyer's post-purchase survey answer. Empty when the event counts whole for its own campaign.
@@ -83100,6 +83138,7 @@ export type CreateForwardingRuleData = {
83100
83138
  eventNameMap?: ForwardingRuleEventNameMap;
83101
83139
  valueOverride?: ForwardingRuleValueOverride;
83102
83140
  valueCondition?: ForwardingRuleValueCondition;
83141
+ eventValues?: ForwardingRuleEventValues;
83103
83142
  /**
83104
83143
  * 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}`.
83105
83144
  */
@@ -83121,6 +83160,7 @@ export type UpdateForwardingRuleData = {
83121
83160
  eventNameMap?: (ForwardingRuleEventNameMap | null);
83122
83161
  valueOverride?: ForwardingRuleValueOverride;
83123
83162
  valueCondition?: (ForwardingRuleValueCondition | null);
83163
+ eventValues?: (ForwardingRuleEventValues | null);
83124
83164
  };
83125
83165
  path: {
83126
83166
  /**