@zernio/node 0.2.982 → 0.2.984

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 CHANGED
@@ -48579,6 +48579,10 @@ type UpdateTrackingTagData = {
48579
48579
  automaticMatchingFields?: Array<('em' | 'ph' | 'fn' | 'ln' | 'ge' | 'db' | 'ct' | 'st' | 'zp' | 'country' | 'external_id')>;
48580
48580
  firstPartyCookieStatus?: 'empty' | 'first_party_cookie_disabled' | 'first_party_cookie_enabled';
48581
48581
  dataUseSetting?: 'advertising_and_analytics' | 'analytics_only' | 'empty';
48582
+ /**
48583
+ * First-party cookie on or off (TikTok, LinkedIn). Platform-neutral alternative to `firstPartyCookieStatus`.
48584
+ */
48585
+ enableFirstPartyCookies?: boolean;
48582
48586
  /**
48583
48587
  * Google Ads: turn gclid auto-tagging on or off for the ad account.
48584
48588
  */
package/dist/index.d.ts CHANGED
@@ -48579,6 +48579,10 @@ type UpdateTrackingTagData = {
48579
48579
  automaticMatchingFields?: Array<('em' | 'ph' | 'fn' | 'ln' | 'ge' | 'db' | 'ct' | 'st' | 'zp' | 'country' | 'external_id')>;
48580
48580
  firstPartyCookieStatus?: 'empty' | 'first_party_cookie_disabled' | 'first_party_cookie_enabled';
48581
48581
  dataUseSetting?: 'advertising_and_analytics' | 'analytics_only' | 'empty';
48582
+ /**
48583
+ * First-party cookie on or off (TikTok, LinkedIn). Platform-neutral alternative to `firstPartyCookieStatus`.
48584
+ */
48585
+ enableFirstPartyCookies?: boolean;
48582
48586
  /**
48583
48587
  * Google Ads: turn gclid auto-tagging on or off for the ad account.
48584
48588
  */
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: "@zernio/node",
39
- version: "0.2.982",
39
+ version: "0.2.984",
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: "@zernio/node",
8
- version: "0.2.982",
8
+ version: "0.2.984",
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": "@zernio/node",
3
- "version": "0.2.982",
3
+ "version": "0.2.984",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -13645,6 +13645,15 @@ export const startBusinessAgentEvalRun = <ThrowOnError extends boolean = false>(
13645
13645
  * connection can read (an ad account the user has no Business Access role on is skipped).
13646
13646
  * `id` equals `siteTagId`, the id the site loads with `pintrk('load', id)`.
13647
13647
  *
13648
+ * TikTok (platform `tiktokads`): TikTok Pixels across the connection's advertisers, or one
13649
+ * advertiser with `?adAccountId=<numeric advertiser_id>`. `id` is the numeric `pixel_id`,
13650
+ * `siteTagId` the alphanumeric `pixel_code` from Events Manager. Connections authorized
13651
+ * before the Pixel Management permission (about 2026-05-28) answer 403 until reconnected.
13652
+ *
13653
+ * X Ads (platform `xads`): one X Pixel per X ad account, so `TrackingTag.id` is the ad
13654
+ * account id (base36, e.g. `18ce54d4x5t`) and `siteTagId` is the pixel id the site embeds.
13655
+ * Ad accounts without a pixel are left out. `adAccountId` scopes the list to one ad account.
13656
+ *
13648
13657
  */
13649
13658
  export const listTrackingTags = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ListTrackingTagsData, ThrowOnError>) => {
13650
13659
  return (options?.client ?? client).get<ListTrackingTagsResponse, ListTrackingTagsError, ThrowOnError>({
@@ -13703,6 +13712,18 @@ export const listTrackingTags = <ThrowOnError extends boolean = false>(options:
13703
13712
  * created, which is what switches Google's conversion tracking on, and
13704
13713
  * the tag is returned with it as its first event.
13705
13714
  *
13715
+ * TikTok: `POST /pixel/create/` on the advertiser in `adAccountId` (numeric). Names are at
13716
+ * most 40 characters with no emoji and must be unique; TikTok refuses a duplicate name
13717
+ * (400), which is its only retry guard. TikTok has no pixel delete API.
13718
+ *
13719
+ * Pinterest's `code` snippet. NOT idempotent and Pinterest has no dry-run and no delete for
13720
+ * tags, so never retry blindly: list first.
13721
+ *
13722
+ * X Ads (platform `xads`): creates the ad account's X Pixel (its UNIVERSAL website tag) with
13723
+ * first-party cookies on. `adAccountId` is the X ad account id; `name` is not stored (X
13724
+ * pixels have no name). X allows one pixel per ad account and cannot delete one, so an
13725
+ * account that already has a pixel answers 409 without writing anything.
13726
+ *
13706
13727
  */
13707
13728
  export const createTrackingTag = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateTrackingTagData, ThrowOnError>) => {
13708
13729
  return (options?.client ?? client).post<CreateTrackingTagResponse, CreateTrackingTagError, ThrowOnError>({
@@ -13736,6 +13757,15 @@ export const createTrackingTag = <ThrowOnError extends boolean = false>(options:
13736
13757
  * and `lastFiredTime`. Without `adAccountId` Zernio finds the ad account that owns the tag
13737
13758
  * (404 when no readable ad account holds it).
13738
13759
  *
13760
+ * TikTok: read from `/pixel/list/?pixel_id=`; `code` is TikTok's `pixel_script`, `events`
13761
+ * the pixel events. `lastFiredTime` is not available on TikTok. Without `adAccountId` the
13762
+ * connection's advertisers are searched.
13763
+ *
13764
+ * X Ads (platform `xads`): `tagId` is the X ad account id. Returns the pixel id as
13765
+ * `siteTagId`, the X Pixel base code as `code`, and the conversion events the site can fire
13766
+ * in `events` (each with `siteEventId` = `tw-<pixel>-<event>`, also the `event_id` of the X
13767
+ * Conversions API). An ad account without a pixel answers 400.
13768
+ *
13739
13769
  */
13740
13770
  export const getTrackingTag = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetTrackingTagData, ThrowOnError>) => {
13741
13771
  return (options?.client ?? client).get<GetTrackingTagResponse, GetTrackingTagError, ThrowOnError>({
@@ -13777,6 +13807,20 @@ export const getTrackingTag = <ThrowOnError extends boolean = false>(options: Op
13777
13807
  * PATCH or PUT on `conversion_tags/{id}` answer 405 "Method not allowed". Set enhanced match
13778
13808
  * at creation (`automaticMatchingFields`) or change it and the name in Pinterest Ads Manager.
13779
13809
  *
13810
+ * TikTok: `name`, `enableAutomaticMatching` + `automaticMatchingFields` (folded onto
13811
+ * TikTok's five switches: em, ph, fn/ln, ct/st/zp/country, external_id; ge and db answer
13812
+ * 400), and first-party cookies via `enableFirstPartyCookies` or `firstPartyCookieStatus`
13813
+ * (enabled or disabled). TikTok has no pixel delete: the endpoint is absent from its API and
13814
+ * `POST /pixel/delete/` answers 404.
13815
+ *
13816
+ * Pinterest (platform `pinterestads`): 501. Pinterest API v5 only creates, lists and reads
13817
+ * tags (no update endpoint); rename a tag or change its enhanced match settings in Pinterest
13818
+ * Ads Manager.
13819
+ *
13820
+ * X Ads (platform `xads`): only `firstPartyCookieStatus` (`first_party_cookie_enabled` or
13821
+ * `first_party_cookie_disabled`), which sets the pixel's first-party cookie setting. X has
13822
+ * no API to rename or delete a pixel.
13823
+ *
13780
13824
  */
13781
13825
  export const updateTrackingTag = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateTrackingTagData, ThrowOnError>) => {
13782
13826
  return (options?.client ?? client).patch<UpdateTrackingTagResponse, UpdateTrackingTagError, ThrowOnError>({
@@ -13793,6 +13837,9 @@ export const updateTrackingTag = <ThrowOnError extends boolean = false>(options:
13793
13837
  * Insight Tag; the role (`FULL` or `USE_ONLY`) is appended to `name`. LinkedIn exposes
13794
13838
  * permissions per ad account only, so accounts the connection cannot see are not listed.
13795
13839
  *
13840
+ * TikTok (`tiktokads`): the advertisers linked to the pixel in its Business Center
13841
+ * (`/bc/pixel/link/get/`); a pixel outside Business Center answers 400.
13842
+ *
13796
13843
  */
13797
13844
  export const listTrackingTagSharedAccounts = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ListTrackingTagSharedAccountsData, ThrowOnError>) => {
13798
13845
  return (options?.client ?? client).get<ListTrackingTagSharedAccountsResponse, ListTrackingTagSharedAccountsError, ThrowOnError>({
@@ -13814,6 +13861,11 @@ export const listTrackingTagSharedAccounts = <ThrowOnError extends boolean = fal
13814
13861
  * `adAccountId` is the numeric LinkedIn ad account id. An ad account uses one Insight Tag at
13815
13862
  * a time, so a target that already has one answers 400.
13816
13863
  *
13864
+ * TikTok: links the pixel to an advertiser through Business Center
13865
+ * (`/bc/pixel/link/update/`, `adAccountId` = numeric advertiser_id). Only a pixel that is an
13866
+ * asset of a Business Center this connection manages can be shared; otherwise the answer is
13867
+ * 400 asking to transfer it to Business Center first.
13868
+ *
13817
13869
  */
13818
13870
  export const addTrackingTagSharedAccount = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<AddTrackingTagSharedAccountData, ThrowOnError>) => {
13819
13871
  return (options?.client ?? client).post<AddTrackingTagSharedAccountResponse, AddTrackingTagSharedAccountError, ThrowOnError>({
@@ -13832,6 +13884,8 @@ export const addTrackingTagSharedAccount = <ThrowOnError extends boolean = false
13832
13884
  * revoking the last ad account that holds the tag: LinkedIn accepts that call and the tag
13833
13885
  * is orphaned (verified live).
13834
13886
  *
13887
+ * TikTok: unlinks through Business Center (`/bc/pixel/link/update/` with `UNLINK`).
13888
+ *
13835
13889
  */
13836
13890
  export const removeTrackingTagSharedAccount = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<RemoveTrackingTagSharedAccountData, ThrowOnError>) => {
13837
13891
  return (options?.client ?? client).delete<RemoveTrackingTagSharedAccountResponse, RemoveTrackingTagSharedAccountError, ThrowOnError>({
@@ -13993,6 +14047,14 @@ export const removeTrackingTagFromStore = <ThrowOnError extends boolean = false>
13993
14047
  * `event_name`. Standard events (`pagevisit`, `checkout`...) need no object and are not
13994
14048
  * listed.
13995
14049
  *
14050
+ * TikTok: the pixel's events from `/pixel/list/`. TikTok refreshes this list every 2 to 4
14051
+ * hours, so a just-created event can be missing. `siteEventId` is the `ttq.track()` name the
14052
+ * site fires.
14053
+ *
14054
+ * X Ads (platform `xads`): the ad account's web event tags the site can fire. Events X
14055
+ * auto-creates with the pixel (site visits, landing page views, one per standard type) share the
14056
+ * pixel id, cannot be fired one by one and are left out; they still appear in stats.
14057
+ *
13996
14058
  */
13997
14059
  export const listTrackingTagEvents = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ListTrackingTagEventsData, ThrowOnError>) => {
13998
14060
  return (options?.client ?? client).get<ListTrackingTagEventsResponse, ListTrackingTagEventsError, ThrowOnError>({
@@ -14058,6 +14120,21 @@ export const listTrackingTagEvents = <ThrowOnError extends boolean = false>(opti
14058
14120
  * VIEW_CATEGORY, VIEW_CONTENT, SEARCH, WATCH_VIDEO) or `siteEvent`. A duplicate name answers
14059
14121
  * 400.
14060
14122
  *
14123
+ * TikTok: `POST /pixel/event/create/`. `type` is a TikTok pixel event type (SHOPPING,
14124
+ * ON_WEB_CART, ON_WEB_DETAIL, INITIATE_ORDER, ADD_BILLING, ON_WEB_SEARCH, PAGE_VIEW,
14125
+ * ON_WEB_REGISTER, FORM, ...), or pass `siteEvent`. Stores `name` (at most 40 characters),
14126
+ * `defaultValue` and `currency` (USD, JPY or INR only). TikTok returns no id: the new event
14127
+ * is read back from the pixel, and while TikTok's listing has not refreshed the response
14128
+ * carries an empty `id` and `status: pending`.
14129
+ *
14130
+ * X Ads (platform `xads`): creates a web event tag. Fields: `name`, `type` (X enum:
14131
+ * ADDED_PAYMENT_INFO, ADD_TO_CART, ADD_TO_WISHLIST, CHECKOUT_INITIATED, CONTENT_VIEW,
14132
+ * CUSTOM, DOWNLOAD, INSTALL, LANDING_PAGE_VIEW, LOGIN, PRODUCT_CUSTOMIZATION, PURCHASE,
14133
+ * SEARCH, SESSION, SIGN_UP, SITE_VISIT, START_TRIAL, SUBSCRIBE) or `siteEvent`,
14134
+ * `clickWindowDays` (1, 7, 14, 30, 60 or 90; default 30) and `viewWindowDays` (0, 1, 7, 14,
14135
+ * 30, 60 or 90, at most the click window; default 1). Retargeting is enabled, as in Events
14136
+ * Manager.
14137
+ *
14061
14138
  */
14062
14139
  export const createTrackingTagEvent = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateTrackingTagEventData, ThrowOnError>) => {
14063
14140
  return (options?.client ?? client).post<CreateTrackingTagEventResponse, CreateTrackingTagEventError, ThrowOnError>({
@@ -14089,6 +14166,12 @@ export const createTrackingTagEvent = <ThrowOnError extends boolean = false>(opt
14089
14166
  * Pinterest identifies the event by its name, so `name` cannot change (400): create the new
14090
14167
  * name and delete the old one.
14091
14168
  *
14169
+ * TikTok: `name`, `defaultValue` and `currency` (USD, JPY or INR); the type cannot change
14170
+ * (delete and recreate).
14171
+ *
14172
+ * X Ads (platform `xads`): the same fields as create. Events X auto-created with the pixel
14173
+ * cannot be changed (400).
14174
+ *
14092
14175
  */
14093
14176
  export const updateTrackingTagEvent = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateTrackingTagEventData, ThrowOnError>) => {
14094
14177
  return (options?.client ?? client).patch<UpdateTrackingTagEventResponse, UpdateTrackingTagEventError, ThrowOnError>({
@@ -14120,6 +14203,13 @@ export const updateTrackingTagEvent = <ThrowOnError extends boolean = false>(opt
14120
14203
  * Pinterest (platform `pinterestads`): stops Pinterest tracking the event name (`state:
14121
14204
  * disabled`); Pinterest keeps the event's history.
14122
14205
  *
14206
+ * TikTok: hard delete (`/pixel/event/delete/`); TikTok refuses events bound to an ad group
14207
+ * (400).
14208
+ *
14209
+ * X Ads (platform `xads`): deletes the web event tag for good. Events X auto-created with
14210
+ * the pixel cannot be deleted (400). X keeps the event's own website tag id on the account
14211
+ * (it has no delete for website tags), left without a conversion event.
14212
+ *
14123
14213
  */
14124
14214
  export const deleteTrackingTagEvent = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DeleteTrackingTagEventData, ThrowOnError>) => {
14125
14215
  return (options?.client ?? client).delete<DeleteTrackingTagEventResponse, DeleteTrackingTagEventError, ThrowOnError>({
@@ -14240,6 +14330,16 @@ export const getTrackingTagDiagnostics = <ThrowOnError extends boolean = false>(
14240
14330
  * (ad-account level, not per tag; an account Pinterest cannot score yet carries `error`
14241
14331
  * instead). Pinterest has no time-bounded counts, so `startTime`/`endTime` answer 400.
14242
14332
  *
14333
+ * TikTok: per-event counts from `/pixel/event/stats/` (`total_count`,
14334
+ * `browser_event_total_count`, `server_event_total_count`, `attributed_count`,
14335
+ * `preview_count`), bucketed by UTC day. Defaults to the last 7 days; at most 30 days per
14336
+ * request. `aggregation` is not accepted.
14337
+ *
14338
+ * X Ads (platform `xads`): X has no event counts per pixel or event (only campaign-level
14339
+ * conversion metrics). Each row is one web event tag with its `status` (TRACKING,
14340
+ * UNVERIFIED, DORMANT), `lastTrackedTime` (unix seconds, null if never seen), `autoCreated`
14341
+ * and, for events the site can fire, `siteEventId`.
14342
+ *
14243
14343
  */
14244
14344
  export const getTrackingTagStats = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetTrackingTagStatsData, ThrowOnError>) => {
14245
14345
  return (options?.client ?? client).get<GetTrackingTagStatsResponse, GetTrackingTagStatsError, ThrowOnError>({
@@ -49722,6 +49722,10 @@ export type UpdateTrackingTagData = {
49722
49722
  automaticMatchingFields?: Array<('em' | 'ph' | 'fn' | 'ln' | 'ge' | 'db' | 'ct' | 'st' | 'zp' | 'country' | 'external_id')>;
49723
49723
  firstPartyCookieStatus?: 'empty' | 'first_party_cookie_disabled' | 'first_party_cookie_enabled';
49724
49724
  dataUseSetting?: 'advertising_and_analytics' | 'analytics_only' | 'empty';
49725
+ /**
49726
+ * First-party cookie on or off (TikTok, LinkedIn). Platform-neutral alternative to `firstPartyCookieStatus`.
49727
+ */
49728
+ enableFirstPartyCookies?: boolean;
49725
49729
  /**
49726
49730
  * Google Ads: turn gclid auto-tagging on or off for the ad account.
49727
49731
  */