@getlatedev/node 0.2.1782 → 0.2.1784
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 +41 -1
- package/dist/index.d.ts +41 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +2 -1
- package/src/generated/types.gen.ts +42 -0
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.1784",
|
|
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.1784",
|
|
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
|
@@ -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
|
*
|
|
@@ -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
|
*/
|
|
@@ -40435,6 +40465,8 @@ export type GetConnectUrlData = {
|
|
|
40435
40465
|
*
|
|
40436
40466
|
* - Standard mode: connected={platform}&profileId=X&accountId=Y&username=Z.
|
|
40437
40467
|
* - X on prepaid-balance billing at a $0 balance: `billingNotice=x_balance_required` is added. The account is connected, but X posts wait or are refused (402 `insufficient_balance`) until the balance is funded.
|
|
40468
|
+
* - The login landed on an account the profile already had connected, on a connect that named none (no `reconnectAccountId`, `expectedUsername` or `expectedPlatformUserId`): `accountNotice=already_connected` is added. No new account was added: `accountId` is that account, with its connection refreshed.
|
|
40469
|
+
* - Platforms sign in whoever is logged in on the device, so to connect a different account the user logs out of the platform first, or uses a private window. On Instagram Login, `forceReauth=true` asks for the credentials of the account to connect instead.
|
|
40438
40470
|
* - Headless mode: OAuth data params for platforms requiring selection (e.g. LinkedIn orgs, Facebook pages). If no selection is needed, the account is created directly and the redirect includes accountId.
|
|
40439
40471
|
*
|
|
40440
40472
|
* **Failure params:** the browser goes to the same redirect_url with `error` and `platform` appended (always present). `error_message`, `is_user_fixable`, `reason`, `dashboard_url`, `missing_scopes`, `error_reason` and the `platform_error*` params are conditional: treat them as optional.
|
|
@@ -82888,6 +82920,14 @@ export type GetEventResponse = ({
|
|
|
82888
82920
|
error?: (string) | null;
|
|
82889
82921
|
errorCode?: (string) | null;
|
|
82890
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;
|
|
82891
82931
|
}>;
|
|
82892
82932
|
/**
|
|
82893
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.
|
|
@@ -83098,6 +83138,7 @@ export type CreateForwardingRuleData = {
|
|
|
83098
83138
|
eventNameMap?: ForwardingRuleEventNameMap;
|
|
83099
83139
|
valueOverride?: ForwardingRuleValueOverride;
|
|
83100
83140
|
valueCondition?: ForwardingRuleValueCondition;
|
|
83141
|
+
eventValues?: ForwardingRuleEventValues;
|
|
83101
83142
|
/**
|
|
83102
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}`.
|
|
83103
83144
|
*/
|
|
@@ -83119,6 +83160,7 @@ export type UpdateForwardingRuleData = {
|
|
|
83119
83160
|
eventNameMap?: (ForwardingRuleEventNameMap | null);
|
|
83120
83161
|
valueOverride?: ForwardingRuleValueOverride;
|
|
83121
83162
|
valueCondition?: (ForwardingRuleValueCondition | null);
|
|
83163
|
+
eventValues?: (ForwardingRuleEventValues | null);
|
|
83122
83164
|
};
|
|
83123
83165
|
path: {
|
|
83124
83166
|
/**
|