@zernio/node 0.2.969 → 0.2.971

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
@@ -10258,9 +10258,20 @@ type platform10 = 'tiktok' | 'instagram' | 'facebook' | 'youtube' | 'linkedin' |
10258
10258
  */
10259
10259
  type StorePixelInstall = {
10260
10260
  storeAccountId?: string;
10261
+ /**
10262
+ * The store platform.
10263
+ */
10261
10264
  platform?: 'shopify' | 'wordpress';
10262
10265
  /**
10263
- * Shopify: this tag is the pixel the store fires. WordPress: the Zernio widget for this tag is in an active widget area with its script intact.
10266
+ * Platform of the tag this install is about (e.g. `metaads`).
10267
+ */
10268
+ tagPlatform?: string;
10269
+ /**
10270
+ * The id the tag carries on the site (see `TrackingTag.siteTagId`).
10271
+ */
10272
+ siteTagId?: string;
10273
+ /**
10274
+ * Shopify: this tag is the one the store fires for its platform. WordPress: the Zernio widget for this tag is in an active widget area with its script intact.
10264
10275
  */
10265
10276
  installed?: boolean;
10266
10277
  /**
@@ -10268,9 +10279,28 @@ type StorePixelInstall = {
10268
10279
  */
10269
10280
  shopDomain?: string;
10270
10281
  /**
10271
- * Shopify only: the Meta pixel the store fires now (may be a different tag), or null.
10282
+ * Shopify only: the tag of the same platform the store fires now (may be a different tag), or null.
10272
10283
  */
10273
10284
  installedTagId?: (string) | null;
10285
+ /**
10286
+ * GET only on WordPress, always on Shopify: every Zernio tag on the store, all platforms.
10287
+ */
10288
+ tags?: Array<{
10289
+ platform?: string;
10290
+ siteTagId?: string;
10291
+ /**
10292
+ * WordPress only.
10293
+ */
10294
+ widgetId?: string;
10295
+ /**
10296
+ * WordPress only.
10297
+ */
10298
+ sidebarId?: string;
10299
+ /**
10300
+ * WordPress only: false when the widget sits outside an active widget area.
10301
+ */
10302
+ active?: boolean;
10303
+ }>;
10274
10304
  /**
10275
10305
  * Shopify only: web pixel id, or null when nothing is installed.
10276
10306
  */
@@ -10784,11 +10814,31 @@ type mediaType2 = 'video' | 'photo';
10784
10814
  */
10785
10815
  type TrackingTag = {
10786
10816
  /**
10787
- * Platform-native tag id. Meta: numeric pixel id, as a string.
10817
+ * Platform-native tag id, the `{tagId}` of the per-tag routes. Meta: numeric pixel id, as a string. OpenAI: the pixel resource id.
10788
10818
  */
10789
10819
  id: string;
10820
+ /**
10821
+ * The id the on-site code carries. Equals `id` on Meta; differs on platforms with separate API and site ids (OpenAI `pixel_id`).
10822
+ */
10823
+ siteTagId?: string;
10824
+ /**
10825
+ * Platforms where each conversion is its own object: the tag's conversion events, with the id a site sends for each.
10826
+ */
10827
+ events?: Array<{
10828
+ id: string;
10829
+ name: string;
10830
+ /**
10831
+ * Platform category of the event.
10832
+ */
10833
+ type?: string;
10834
+ /**
10835
+ * The value the site sends to fire this event.
10836
+ */
10837
+ siteEvent?: string;
10838
+ status?: string;
10839
+ }>;
10790
10840
  name: string;
10791
- platform: 'metaads';
10841
+ platform: 'metaads' | 'openaiads' | 'tiktokads';
10792
10842
  /**
10793
10843
  * Platform-native flavor of the tag (Meta: `pixel`).
10794
10844
  */
@@ -10798,8 +10848,9 @@ type TrackingTag = {
10798
10848
  */
10799
10849
  status: 'active' | 'inactive';
10800
10850
  /**
10801
- * The base-code `<script>` snippet to install on the site. Meta only;
10802
- * populated by `getTrackingTag`, omitted from the list view.
10851
+ * The base-code `<script>` snippet to install on the site, including
10852
+ * the page-view call. Populated by `getTrackingTag`, omitted from the
10853
+ * list view.
10803
10854
  *
10804
10855
  */
10805
10856
  code?: string;
@@ -10833,7 +10884,7 @@ type TrackingTag = {
10833
10884
  */
10834
10885
  ownerAdAccountId?: string;
10835
10886
  };
10836
- type platform11 = 'metaads';
10887
+ type platform11 = 'metaads' | 'openaiads' | 'tiktokads';
10837
10888
  /**
10838
10889
  * Platform-native flavor of the tag (Meta: `pixel`).
10839
10890
  */
@@ -47736,7 +47787,7 @@ type ListTrackingTagsData = {
47736
47787
  };
47737
47788
  };
47738
47789
  type ListTrackingTagsResponse = ({
47739
- platform?: 'metaads' | 'openaiads';
47790
+ platform?: 'metaads' | 'openaiads' | 'tiktokads';
47740
47791
  tags?: Array<TrackingTag>;
47741
47792
  });
47742
47793
  type ListTrackingTagsError = (unknown | {
@@ -47762,7 +47813,7 @@ type CreateTrackingTagData = {
47762
47813
  };
47763
47814
  };
47764
47815
  type CreateTrackingTagResponse = ({
47765
- platform?: 'metaads' | 'openaiads';
47816
+ platform?: 'metaads' | 'openaiads' | 'tiktokads';
47766
47817
  tag?: TrackingTag;
47767
47818
  });
47768
47819
  type CreateTrackingTagError = (unknown | {
@@ -47772,13 +47823,19 @@ type GetTrackingTagData = {
47772
47823
  path: {
47773
47824
  accountId: string;
47774
47825
  /**
47775
- * Pixel id.
47826
+ * Tag id (`TrackingTag.id`).
47776
47827
  */
47777
47828
  tagId: string;
47778
47829
  };
47830
+ query?: {
47831
+ /**
47832
+ * Scopes the lookup on platforms whose tag ids live inside an ad account. Ignored elsewhere.
47833
+ */
47834
+ adAccountId?: string;
47835
+ };
47779
47836
  };
47780
47837
  type GetTrackingTagResponse = ({
47781
- platform?: 'metaads';
47838
+ platform?: 'metaads' | 'tiktokads';
47782
47839
  tag?: TrackingTag;
47783
47840
  });
47784
47841
  type GetTrackingTagError = (ErrorResponse | {
@@ -47786,6 +47843,10 @@ type GetTrackingTagError = (ErrorResponse | {
47786
47843
  } | unknown);
47787
47844
  type UpdateTrackingTagData = {
47788
47845
  body: {
47846
+ /**
47847
+ * Scopes the lookup on platforms whose tag ids live inside an ad account. Ignored elsewhere.
47848
+ */
47849
+ adAccountId?: string;
47789
47850
  name?: string;
47790
47851
  /**
47791
47852
  * Meta Advanced Matching toggle (`enable_automatic_matching`).
@@ -47811,7 +47872,7 @@ type UpdateTrackingTagData = {
47811
47872
  };
47812
47873
  };
47813
47874
  type UpdateTrackingTagResponse = ({
47814
- platform?: 'metaads';
47875
+ platform?: 'metaads' | 'tiktokads';
47815
47876
  tag?: TrackingTag;
47816
47877
  });
47817
47878
  type UpdateTrackingTagError = (unknown | {
@@ -47880,6 +47941,10 @@ type InstallTrackingTagOnStoreData = {
47880
47941
  * The connected Shopify (`shopify`) or WordPress (`wordpress`) account id.
47881
47942
  */
47882
47943
  storeAccountId: string;
47944
+ /**
47945
+ * Scopes the tag lookup on platforms whose tag ids live inside an ad account. Ignored elsewhere.
47946
+ */
47947
+ adAccountId?: string;
47883
47948
  /**
47884
47949
  * WordPress only: widget area to use (see `install.preflight.sidebars` from GET). Defaults to a footer area.
47885
47950
  */
@@ -47892,13 +47957,13 @@ type InstallTrackingTagOnStoreData = {
47892
47957
  path: {
47893
47958
  accountId: string;
47894
47959
  /**
47895
- * Meta pixel id.
47960
+ * Tag id (`TrackingTag.id`).
47896
47961
  */
47897
47962
  tagId: string;
47898
47963
  };
47899
47964
  };
47900
47965
  type InstallTrackingTagOnStoreResponse = ({
47901
- platform?: 'metaads';
47966
+ platform?: 'metaads' | 'tiktokads';
47902
47967
  install?: (StorePixelInstall & {
47903
47968
  /**
47904
47969
  * Shopify only: the pixel this install replaced on the store, if any.
@@ -47934,11 +47999,15 @@ type GetTrackingTagStoreInstallData = {
47934
47999
  path: {
47935
48000
  accountId: string;
47936
48001
  /**
47937
- * Meta pixel id.
48002
+ * Tag id (`TrackingTag.id`).
47938
48003
  */
47939
48004
  tagId: string;
47940
48005
  };
47941
48006
  query: {
48007
+ /**
48008
+ * Scopes the tag lookup on platforms whose tag ids live inside an ad account.
48009
+ */
48010
+ adAccountId?: string;
47942
48011
  /**
47943
48012
  * The connected Shopify or WordPress account id.
47944
48013
  */
@@ -47946,7 +48015,7 @@ type GetTrackingTagStoreInstallData = {
47946
48015
  };
47947
48016
  };
47948
48017
  type GetTrackingTagStoreInstallResponse = ({
47949
- platform?: 'metaads';
48018
+ platform?: 'metaads' | 'tiktokads';
47950
48019
  install?: (StorePixelInstall & {
47951
48020
  /**
47952
48021
  * WordPress only.
@@ -47977,11 +48046,15 @@ type RemoveTrackingTagFromStoreData = {
47977
48046
  path: {
47978
48047
  accountId: string;
47979
48048
  /**
47980
- * Meta pixel id.
48049
+ * Tag id (`TrackingTag.id`).
47981
48050
  */
47982
48051
  tagId: string;
47983
48052
  };
47984
48053
  query: {
48054
+ /**
48055
+ * Scopes the tag lookup on platforms whose tag ids live inside an ad account.
48056
+ */
48057
+ adAccountId?: string;
47985
48058
  /**
47986
48059
  * The connected Shopify or WordPress account id.
47987
48060
  */
@@ -47989,7 +48062,7 @@ type RemoveTrackingTagFromStoreData = {
47989
48062
  };
47990
48063
  };
47991
48064
  type RemoveTrackingTagFromStoreResponse = ({
47992
- platform?: 'metaads';
48065
+ platform?: 'metaads' | 'tiktokads';
47993
48066
  install?: (StorePixelInstall & {
47994
48067
  /**
47995
48068
  * WordPress only: number of Zernio widgets deleted.
@@ -48004,13 +48077,17 @@ type GetTrackingTagStatsData = {
48004
48077
  path: {
48005
48078
  accountId: string;
48006
48079
  /**
48007
- * Pixel id.
48080
+ * Tag id (`TrackingTag.id`).
48008
48081
  */
48009
48082
  tagId: string;
48010
48083
  };
48011
48084
  query?: {
48012
48085
  /**
48013
- * Aggregation dimension. Defaults to `event`.
48086
+ * Scopes the lookup on platforms whose tag ids live inside an ad account. Ignored elsewhere.
48087
+ */
48088
+ adAccountId?: string;
48089
+ /**
48090
+ * Meta only (400 on other platforms): aggregation dimension. Defaults to `event`.
48014
48091
  */
48015
48092
  aggregation?: 'event' | 'host' | 'url' | 'url_by_rule' | 'pixel_fire' | 'device_type' | 'device_os' | 'browser_type' | 'had_pii' | 'custom_data_field' | 'match_keys' | 'event_source' | 'event_detection_method' | 'event_processing_results' | 'event_total_counts' | 'event_value_count';
48016
48093
  /**
@@ -48024,7 +48101,7 @@ type GetTrackingTagStatsData = {
48024
48101
  };
48025
48102
  };
48026
48103
  type GetTrackingTagStatsResponse = ({
48027
- platform?: 'metaads';
48104
+ platform?: 'metaads' | 'tiktokads';
48028
48105
  stats?: {
48029
48106
  aggregation?: string;
48030
48107
  startTime?: number;
package/dist/index.d.ts CHANGED
@@ -10258,9 +10258,20 @@ type platform10 = 'tiktok' | 'instagram' | 'facebook' | 'youtube' | 'linkedin' |
10258
10258
  */
10259
10259
  type StorePixelInstall = {
10260
10260
  storeAccountId?: string;
10261
+ /**
10262
+ * The store platform.
10263
+ */
10261
10264
  platform?: 'shopify' | 'wordpress';
10262
10265
  /**
10263
- * Shopify: this tag is the pixel the store fires. WordPress: the Zernio widget for this tag is in an active widget area with its script intact.
10266
+ * Platform of the tag this install is about (e.g. `metaads`).
10267
+ */
10268
+ tagPlatform?: string;
10269
+ /**
10270
+ * The id the tag carries on the site (see `TrackingTag.siteTagId`).
10271
+ */
10272
+ siteTagId?: string;
10273
+ /**
10274
+ * Shopify: this tag is the one the store fires for its platform. WordPress: the Zernio widget for this tag is in an active widget area with its script intact.
10264
10275
  */
10265
10276
  installed?: boolean;
10266
10277
  /**
@@ -10268,9 +10279,28 @@ type StorePixelInstall = {
10268
10279
  */
10269
10280
  shopDomain?: string;
10270
10281
  /**
10271
- * Shopify only: the Meta pixel the store fires now (may be a different tag), or null.
10282
+ * Shopify only: the tag of the same platform the store fires now (may be a different tag), or null.
10272
10283
  */
10273
10284
  installedTagId?: (string) | null;
10285
+ /**
10286
+ * GET only on WordPress, always on Shopify: every Zernio tag on the store, all platforms.
10287
+ */
10288
+ tags?: Array<{
10289
+ platform?: string;
10290
+ siteTagId?: string;
10291
+ /**
10292
+ * WordPress only.
10293
+ */
10294
+ widgetId?: string;
10295
+ /**
10296
+ * WordPress only.
10297
+ */
10298
+ sidebarId?: string;
10299
+ /**
10300
+ * WordPress only: false when the widget sits outside an active widget area.
10301
+ */
10302
+ active?: boolean;
10303
+ }>;
10274
10304
  /**
10275
10305
  * Shopify only: web pixel id, or null when nothing is installed.
10276
10306
  */
@@ -10784,11 +10814,31 @@ type mediaType2 = 'video' | 'photo';
10784
10814
  */
10785
10815
  type TrackingTag = {
10786
10816
  /**
10787
- * Platform-native tag id. Meta: numeric pixel id, as a string.
10817
+ * Platform-native tag id, the `{tagId}` of the per-tag routes. Meta: numeric pixel id, as a string. OpenAI: the pixel resource id.
10788
10818
  */
10789
10819
  id: string;
10820
+ /**
10821
+ * The id the on-site code carries. Equals `id` on Meta; differs on platforms with separate API and site ids (OpenAI `pixel_id`).
10822
+ */
10823
+ siteTagId?: string;
10824
+ /**
10825
+ * Platforms where each conversion is its own object: the tag's conversion events, with the id a site sends for each.
10826
+ */
10827
+ events?: Array<{
10828
+ id: string;
10829
+ name: string;
10830
+ /**
10831
+ * Platform category of the event.
10832
+ */
10833
+ type?: string;
10834
+ /**
10835
+ * The value the site sends to fire this event.
10836
+ */
10837
+ siteEvent?: string;
10838
+ status?: string;
10839
+ }>;
10790
10840
  name: string;
10791
- platform: 'metaads';
10841
+ platform: 'metaads' | 'openaiads' | 'tiktokads';
10792
10842
  /**
10793
10843
  * Platform-native flavor of the tag (Meta: `pixel`).
10794
10844
  */
@@ -10798,8 +10848,9 @@ type TrackingTag = {
10798
10848
  */
10799
10849
  status: 'active' | 'inactive';
10800
10850
  /**
10801
- * The base-code `<script>` snippet to install on the site. Meta only;
10802
- * populated by `getTrackingTag`, omitted from the list view.
10851
+ * The base-code `<script>` snippet to install on the site, including
10852
+ * the page-view call. Populated by `getTrackingTag`, omitted from the
10853
+ * list view.
10803
10854
  *
10804
10855
  */
10805
10856
  code?: string;
@@ -10833,7 +10884,7 @@ type TrackingTag = {
10833
10884
  */
10834
10885
  ownerAdAccountId?: string;
10835
10886
  };
10836
- type platform11 = 'metaads';
10887
+ type platform11 = 'metaads' | 'openaiads' | 'tiktokads';
10837
10888
  /**
10838
10889
  * Platform-native flavor of the tag (Meta: `pixel`).
10839
10890
  */
@@ -47736,7 +47787,7 @@ type ListTrackingTagsData = {
47736
47787
  };
47737
47788
  };
47738
47789
  type ListTrackingTagsResponse = ({
47739
- platform?: 'metaads' | 'openaiads';
47790
+ platform?: 'metaads' | 'openaiads' | 'tiktokads';
47740
47791
  tags?: Array<TrackingTag>;
47741
47792
  });
47742
47793
  type ListTrackingTagsError = (unknown | {
@@ -47762,7 +47813,7 @@ type CreateTrackingTagData = {
47762
47813
  };
47763
47814
  };
47764
47815
  type CreateTrackingTagResponse = ({
47765
- platform?: 'metaads' | 'openaiads';
47816
+ platform?: 'metaads' | 'openaiads' | 'tiktokads';
47766
47817
  tag?: TrackingTag;
47767
47818
  });
47768
47819
  type CreateTrackingTagError = (unknown | {
@@ -47772,13 +47823,19 @@ type GetTrackingTagData = {
47772
47823
  path: {
47773
47824
  accountId: string;
47774
47825
  /**
47775
- * Pixel id.
47826
+ * Tag id (`TrackingTag.id`).
47776
47827
  */
47777
47828
  tagId: string;
47778
47829
  };
47830
+ query?: {
47831
+ /**
47832
+ * Scopes the lookup on platforms whose tag ids live inside an ad account. Ignored elsewhere.
47833
+ */
47834
+ adAccountId?: string;
47835
+ };
47779
47836
  };
47780
47837
  type GetTrackingTagResponse = ({
47781
- platform?: 'metaads';
47838
+ platform?: 'metaads' | 'tiktokads';
47782
47839
  tag?: TrackingTag;
47783
47840
  });
47784
47841
  type GetTrackingTagError = (ErrorResponse | {
@@ -47786,6 +47843,10 @@ type GetTrackingTagError = (ErrorResponse | {
47786
47843
  } | unknown);
47787
47844
  type UpdateTrackingTagData = {
47788
47845
  body: {
47846
+ /**
47847
+ * Scopes the lookup on platforms whose tag ids live inside an ad account. Ignored elsewhere.
47848
+ */
47849
+ adAccountId?: string;
47789
47850
  name?: string;
47790
47851
  /**
47791
47852
  * Meta Advanced Matching toggle (`enable_automatic_matching`).
@@ -47811,7 +47872,7 @@ type UpdateTrackingTagData = {
47811
47872
  };
47812
47873
  };
47813
47874
  type UpdateTrackingTagResponse = ({
47814
- platform?: 'metaads';
47875
+ platform?: 'metaads' | 'tiktokads';
47815
47876
  tag?: TrackingTag;
47816
47877
  });
47817
47878
  type UpdateTrackingTagError = (unknown | {
@@ -47880,6 +47941,10 @@ type InstallTrackingTagOnStoreData = {
47880
47941
  * The connected Shopify (`shopify`) or WordPress (`wordpress`) account id.
47881
47942
  */
47882
47943
  storeAccountId: string;
47944
+ /**
47945
+ * Scopes the tag lookup on platforms whose tag ids live inside an ad account. Ignored elsewhere.
47946
+ */
47947
+ adAccountId?: string;
47883
47948
  /**
47884
47949
  * WordPress only: widget area to use (see `install.preflight.sidebars` from GET). Defaults to a footer area.
47885
47950
  */
@@ -47892,13 +47957,13 @@ type InstallTrackingTagOnStoreData = {
47892
47957
  path: {
47893
47958
  accountId: string;
47894
47959
  /**
47895
- * Meta pixel id.
47960
+ * Tag id (`TrackingTag.id`).
47896
47961
  */
47897
47962
  tagId: string;
47898
47963
  };
47899
47964
  };
47900
47965
  type InstallTrackingTagOnStoreResponse = ({
47901
- platform?: 'metaads';
47966
+ platform?: 'metaads' | 'tiktokads';
47902
47967
  install?: (StorePixelInstall & {
47903
47968
  /**
47904
47969
  * Shopify only: the pixel this install replaced on the store, if any.
@@ -47934,11 +47999,15 @@ type GetTrackingTagStoreInstallData = {
47934
47999
  path: {
47935
48000
  accountId: string;
47936
48001
  /**
47937
- * Meta pixel id.
48002
+ * Tag id (`TrackingTag.id`).
47938
48003
  */
47939
48004
  tagId: string;
47940
48005
  };
47941
48006
  query: {
48007
+ /**
48008
+ * Scopes the tag lookup on platforms whose tag ids live inside an ad account.
48009
+ */
48010
+ adAccountId?: string;
47942
48011
  /**
47943
48012
  * The connected Shopify or WordPress account id.
47944
48013
  */
@@ -47946,7 +48015,7 @@ type GetTrackingTagStoreInstallData = {
47946
48015
  };
47947
48016
  };
47948
48017
  type GetTrackingTagStoreInstallResponse = ({
47949
- platform?: 'metaads';
48018
+ platform?: 'metaads' | 'tiktokads';
47950
48019
  install?: (StorePixelInstall & {
47951
48020
  /**
47952
48021
  * WordPress only.
@@ -47977,11 +48046,15 @@ type RemoveTrackingTagFromStoreData = {
47977
48046
  path: {
47978
48047
  accountId: string;
47979
48048
  /**
47980
- * Meta pixel id.
48049
+ * Tag id (`TrackingTag.id`).
47981
48050
  */
47982
48051
  tagId: string;
47983
48052
  };
47984
48053
  query: {
48054
+ /**
48055
+ * Scopes the tag lookup on platforms whose tag ids live inside an ad account.
48056
+ */
48057
+ adAccountId?: string;
47985
48058
  /**
47986
48059
  * The connected Shopify or WordPress account id.
47987
48060
  */
@@ -47989,7 +48062,7 @@ type RemoveTrackingTagFromStoreData = {
47989
48062
  };
47990
48063
  };
47991
48064
  type RemoveTrackingTagFromStoreResponse = ({
47992
- platform?: 'metaads';
48065
+ platform?: 'metaads' | 'tiktokads';
47993
48066
  install?: (StorePixelInstall & {
47994
48067
  /**
47995
48068
  * WordPress only: number of Zernio widgets deleted.
@@ -48004,13 +48077,17 @@ type GetTrackingTagStatsData = {
48004
48077
  path: {
48005
48078
  accountId: string;
48006
48079
  /**
48007
- * Pixel id.
48080
+ * Tag id (`TrackingTag.id`).
48008
48081
  */
48009
48082
  tagId: string;
48010
48083
  };
48011
48084
  query?: {
48012
48085
  /**
48013
- * Aggregation dimension. Defaults to `event`.
48086
+ * Scopes the lookup on platforms whose tag ids live inside an ad account. Ignored elsewhere.
48087
+ */
48088
+ adAccountId?: string;
48089
+ /**
48090
+ * Meta only (400 on other platforms): aggregation dimension. Defaults to `event`.
48014
48091
  */
48015
48092
  aggregation?: 'event' | 'host' | 'url' | 'url_by_rule' | 'pixel_fire' | 'device_type' | 'device_os' | 'browser_type' | 'had_pii' | 'custom_data_field' | 'match_keys' | 'event_source' | 'event_detection_method' | 'event_processing_results' | 'event_total_counts' | 'event_value_count';
48016
48093
  /**
@@ -48024,7 +48101,7 @@ type GetTrackingTagStatsData = {
48024
48101
  };
48025
48102
  };
48026
48103
  type GetTrackingTagStatsResponse = ({
48027
- platform?: 'metaads';
48104
+ platform?: 'metaads' | 'tiktokads';
48028
48105
  stats?: {
48029
48106
  aggregation?: string;
48030
48107
  startTime?: number;
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.969",
39
+ version: "0.2.971",
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.969",
8
+ version: "0.2.971",
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.969",
3
+ "version": "0.2.971",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -13442,7 +13442,7 @@ export const startBusinessAgentEvalRun = <ThrowOnError extends boolean = false>(
13442
13442
  * only; OpenAI Ads has no get-by-id endpoint).
13443
13443
  *
13444
13444
  * Meta (platform `metaads`) and OpenAI Ads (platform `openaiads`); other
13445
- * platforms return 405. The `accountId` must be the ads SocialAccount
13445
+ * platforms return 501. The `accountId` must be the ads SocialAccount
13446
13446
  * created by the Ads add-on connect flow (Meta) or the OpenAI Ads
13447
13447
  * connect flow, not a Facebook/Instagram posting account. Get your Meta
13448
13448
  * `act_...` ids from `GET /v1/ads/accounts`; `adAccountId` is ignored for
@@ -13485,7 +13485,7 @@ export const listTrackingTags = <ThrowOnError extends boolean = false>(options:
13485
13485
  * for OpenAI, a new Conversions API key plus, with `defaultEventType`, a
13486
13486
  * new conversion event setting). Do not retry blindly on
13487
13487
  * timeout. Meta (platform `metaads`) and OpenAI Ads (platform
13488
- * `openaiads`); other platforms return 405.
13488
+ * `openaiads`); other platforms return 501.
13489
13489
  *
13490
13490
  */
13491
13491
  export const createTrackingTag = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateTrackingTagData, ThrowOnError>) => {
@@ -13499,8 +13499,8 @@ export const createTrackingTag = <ThrowOnError extends boolean = false>(options:
13499
13499
  * Get a tracking tag
13500
13500
  * Returns the full tag record including the base-code `code` snippet,
13501
13501
  * `lastFiredTime`, `ownerBusinessId`, `isUnavailable`, etc. Meta only
13502
- * (platform `metaads`); other platforms return 405. OpenAI Ads has no
13503
- * get-by-id endpoint, so it 405s here too. Use
13502
+ * (platform `metaads`); other platforms return 501. OpenAI Ads has no
13503
+ * get-by-id endpoint, so it answers 501 here too. Use
13504
13504
  * `GET /v1/accounts/{accountId}/tracking-tags` (list) instead.
13505
13505
  *
13506
13506
  */
@@ -13517,7 +13517,7 @@ export const getTrackingTag = <ThrowOnError extends boolean = false>(options: Op
13517
13517
  * `enableAutomaticMatching`, `automaticMatchingFields`,
13518
13518
  * `firstPartyCookieStatus`, `dataUseSetting`. At least one is required.
13519
13519
  * Returns the re-fetched canonical tag. Meta only (platform `metaads`);
13520
- * other platforms return 405.
13520
+ * other platforms return 501.
13521
13521
  *
13522
13522
  * There is no DELETE: Meta has no API to delete a pixel. To stop using
13523
13523
  * one, unshare it from your ad accounts (`DELETE
@@ -13534,7 +13534,7 @@ export const updateTrackingTag = <ThrowOnError extends boolean = false>(options:
13534
13534
 
13535
13535
  /**
13536
13536
  * List accounts it is shared with
13537
- * Meta only (platform `metaads`); other platforms return 405.
13537
+ * Meta only (platform `metaads`); other platforms return 501.
13538
13538
  */
13539
13539
  export const listTrackingTagSharedAccounts = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ListTrackingTagSharedAccountsData, ThrowOnError>) => {
13540
13540
  return (options?.client ?? client).get<ListTrackingTagSharedAccountsResponse, ListTrackingTagSharedAccountsError, ThrowOnError>({
@@ -13549,7 +13549,7 @@ export const listTrackingTagSharedAccounts = <ThrowOnError extends boolean = fal
13549
13549
  * account can use it. Requires that you administer both the pixel's owning
13550
13550
  * Business Manager and the target ad account; a pixel on a personal
13551
13551
  * (non-BM) ad account can't be shared (Meta will reject the call). Meta
13552
- * only (platform `metaads`); other platforms return 405.
13552
+ * only (platform `metaads`); other platforms return 501.
13553
13553
  *
13554
13554
  */
13555
13555
  export const addTrackingTagSharedAccount = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<AddTrackingTagSharedAccountData, ThrowOnError>) => {
@@ -13563,7 +13563,7 @@ export const addTrackingTagSharedAccount = <ThrowOnError extends boolean = false
13563
13563
  * Stop sharing with an account
13564
13564
  * `adAccountId` may be passed as a query parameter (recommended) or as a
13565
13565
  * JSON body field for clients that can send DELETE bodies. Meta only
13566
- * (platform `metaads`); other platforms return 405.
13566
+ * (platform `metaads`); other platforms return 501.
13567
13567
  *
13568
13568
  */
13569
13569
  export const removeTrackingTagSharedAccount = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<RemoveTrackingTagSharedAccountData, ThrowOnError>) => {
@@ -13582,15 +13582,16 @@ export const removeTrackingTagSharedAccount = <ThrowOnError extends boolean = fa
13582
13582
  * Purchase uses `shopify_order_{orderId}` as its event id, so a Conversions API Purchase
13583
13583
  * you send for the same order with that `eventId` is deduplicated by Meta.
13584
13584
  *
13585
- * Idempotent: a store runs one Zernio pixel, so calling it again updates the install and
13586
- * installing a different tag replaces the previous one (reported in `replacedTagId`).
13585
+ * Idempotent: a store runs one Zernio web pixel holding one tag per platform, so calling
13586
+ * it again updates the install, installing a different tag of the same platform replaces
13587
+ * the previous one (reported in `replacedTagId`), and other platforms' tags are kept.
13587
13588
  * Events respect the store's customer privacy settings (marketing consent).
13588
13589
  *
13589
13590
  * `accountId` is the Meta ads account that owns the pixel (`tagId`); `storeAccountId` is the
13590
13591
  * Shopify account. Stores connected before pixel support must re-approve the Zernio app:
13591
13592
  * the call then answers 409 `reconnect_required` with `details.authUrl` to send the
13592
13593
  * merchant to (the Shopify account id stays the same). Meta only (platform `metaads`);
13593
- * other platforms return 405.
13594
+ * other platforms return 501.
13594
13595
  *
13595
13596
  * **WordPress** (`storeAccountId` is a connected WordPress.com or self-hosted site): Zernio
13596
13597
  * adds a Custom HTML widget with the Meta pixel base code (fbevents.js, `init`, `PageView`)
@@ -13621,14 +13622,16 @@ export const installTrackingTagOnStore = <ThrowOnError extends boolean = false>(
13621
13622
 
13622
13623
  /**
13623
13624
  * Get store install status
13624
- * Whether this pixel is the one the Shopify store fires. `installedTagId` names the pixel
13625
- * the store currently fires, which can be a different tag. Meta only (platform `metaads`).
13625
+ * Whether this tag is the one the Shopify store fires for its platform. `installedTagId`
13626
+ * names the tag of that platform the store currently fires, which can be a different tag,
13627
+ * and `tags` lists every Zernio tag on the store (all platforms).
13626
13628
  *
13627
13629
  * WordPress: whether the Zernio widget for this pixel is live (in an active widget area,
13628
13630
  * script intact), plus a read-only `preflight` with the theme's widget areas and, when an
13629
13631
  * install would be blocked, the `reason` POST would return. The preflight reads
13630
13632
  * capabilities only, so `ready: true` is not a guarantee: `DISALLOW_UNFILTERED_HTML` or a
13631
13633
  * multisite admin who is not a Super Admin still strips the script, which POST detects.
13634
+ * `tags` lists every Zernio widget on the site (all platforms, with `active`).
13632
13635
  *
13633
13636
  */
13634
13637
  export const getTrackingTagStoreInstall = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetTrackingTagStoreInstallData, ThrowOnError>) => {
@@ -13640,9 +13643,10 @@ export const getTrackingTagStoreInstall = <ThrowOnError extends boolean = false>
13640
13643
 
13641
13644
  /**
13642
13645
  * Remove from a Shopify store or WordPress site
13643
- * Removes the pixel from the store. Idempotent: nothing installed returns 200 with
13644
- * `installed: false`. If the store fires a different pixel, nothing is removed and the
13645
- * call answers 409 `invalid_resource_state`. Meta only (platform `metaads`).
13646
+ * Removes the tag from the store. Idempotent: nothing installed returns 200 with
13647
+ * `installed: false`. If the store fires a different tag of the same platform, nothing is
13648
+ * removed and the call answers 409 `invalid_resource_state`. Shopify: other platforms'
13649
+ * tags stay; the web pixel itself is deleted once no tag remains.
13646
13650
  *
13647
13651
  * WordPress: deletes every widget Zernio created for this pixel and reports how many in
13648
13652
  * `removed` (0 when nothing was installed). Pixel code added by hand is left alone.
@@ -13657,10 +13661,10 @@ export const removeTrackingTagFromStore = <ThrowOnError extends boolean = false>
13657
13661
 
13658
13662
  /**
13659
13663
  * Get aggregated event stats
13660
- * Returns aggregated event counts for the pixel (`GET /{pixel_id}/stats`).
13661
- * Rows are passed through from Meta as-is; their shape depends on the
13662
- * `aggregation` requested. Meta only (platform `metaads`); other platforms
13663
- * return 405.
13664
+ * Returns event counts / health for the tag, where the platform exposes
13665
+ * them. Meta: aggregated counts (`GET /{pixel_id}/stats`), rows passed
13666
+ * through as-is; their shape depends on the `aggregation` requested.
13667
+ * Platforms without a stats API answer 501.
13664
13668
  *
13665
13669
  */
13666
13670
  export const getTrackingTagStats = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetTrackingTagStatsData, ThrowOnError>) => {
@@ -8797,9 +8797,20 @@ export type platform10 = 'tiktok' | 'instagram' | 'facebook' | 'youtube' | 'link
8797
8797
  */
8798
8798
  export type StorePixelInstall = {
8799
8799
  storeAccountId?: string;
8800
+ /**
8801
+ * The store platform.
8802
+ */
8800
8803
  platform?: 'shopify' | 'wordpress';
8801
8804
  /**
8802
- * Shopify: this tag is the pixel the store fires. WordPress: the Zernio widget for this tag is in an active widget area with its script intact.
8805
+ * Platform of the tag this install is about (e.g. `metaads`).
8806
+ */
8807
+ tagPlatform?: string;
8808
+ /**
8809
+ * The id the tag carries on the site (see `TrackingTag.siteTagId`).
8810
+ */
8811
+ siteTagId?: string;
8812
+ /**
8813
+ * Shopify: this tag is the one the store fires for its platform. WordPress: the Zernio widget for this tag is in an active widget area with its script intact.
8803
8814
  */
8804
8815
  installed?: boolean;
8805
8816
  /**
@@ -8807,9 +8818,28 @@ export type StorePixelInstall = {
8807
8818
  */
8808
8819
  shopDomain?: string;
8809
8820
  /**
8810
- * Shopify only: the Meta pixel the store fires now (may be a different tag), or null.
8821
+ * Shopify only: the tag of the same platform the store fires now (may be a different tag), or null.
8811
8822
  */
8812
8823
  installedTagId?: (string) | null;
8824
+ /**
8825
+ * GET only on WordPress, always on Shopify: every Zernio tag on the store, all platforms.
8826
+ */
8827
+ tags?: Array<{
8828
+ platform?: string;
8829
+ siteTagId?: string;
8830
+ /**
8831
+ * WordPress only.
8832
+ */
8833
+ widgetId?: string;
8834
+ /**
8835
+ * WordPress only.
8836
+ */
8837
+ sidebarId?: string;
8838
+ /**
8839
+ * WordPress only: false when the widget sits outside an active widget area.
8840
+ */
8841
+ active?: boolean;
8842
+ }>;
8813
8843
  /**
8814
8844
  * Shopify only: web pixel id, or null when nothing is installed.
8815
8845
  */
@@ -9335,11 +9365,31 @@ export type mediaType2 = 'video' | 'photo';
9335
9365
  */
9336
9366
  export type TrackingTag = {
9337
9367
  /**
9338
- * Platform-native tag id. Meta: numeric pixel id, as a string.
9368
+ * Platform-native tag id, the `{tagId}` of the per-tag routes. Meta: numeric pixel id, as a string. OpenAI: the pixel resource id.
9339
9369
  */
9340
9370
  id: string;
9371
+ /**
9372
+ * The id the on-site code carries. Equals `id` on Meta; differs on platforms with separate API and site ids (OpenAI `pixel_id`).
9373
+ */
9374
+ siteTagId?: string;
9375
+ /**
9376
+ * Platforms where each conversion is its own object: the tag's conversion events, with the id a site sends for each.
9377
+ */
9378
+ events?: Array<{
9379
+ id: string;
9380
+ name: string;
9381
+ /**
9382
+ * Platform category of the event.
9383
+ */
9384
+ type?: string;
9385
+ /**
9386
+ * The value the site sends to fire this event.
9387
+ */
9388
+ siteEvent?: string;
9389
+ status?: string;
9390
+ }>;
9341
9391
  name: string;
9342
- platform: 'metaads';
9392
+ platform: 'metaads' | 'openaiads' | 'tiktokads';
9343
9393
  /**
9344
9394
  * Platform-native flavor of the tag (Meta: `pixel`).
9345
9395
  */
@@ -9349,8 +9399,9 @@ export type TrackingTag = {
9349
9399
  */
9350
9400
  status: 'active' | 'inactive';
9351
9401
  /**
9352
- * The base-code `<script>` snippet to install on the site. Meta only;
9353
- * populated by `getTrackingTag`, omitted from the list view.
9402
+ * The base-code `<script>` snippet to install on the site, including
9403
+ * the page-view call. Populated by `getTrackingTag`, omitted from the
9404
+ * list view.
9354
9405
  *
9355
9406
  */
9356
9407
  code?: string;
@@ -9385,7 +9436,7 @@ export type TrackingTag = {
9385
9436
  ownerAdAccountId?: string;
9386
9437
  };
9387
9438
 
9388
- export type platform11 = 'metaads';
9439
+ export type platform11 = 'metaads' | 'openaiads' | 'tiktokads';
9389
9440
 
9390
9441
  /**
9391
9442
  * Platform-native flavor of the tag (Meta: `pixel`).
@@ -48842,7 +48893,7 @@ export type ListTrackingTagsData = {
48842
48893
  };
48843
48894
 
48844
48895
  export type ListTrackingTagsResponse = ({
48845
- platform?: 'metaads' | 'openaiads';
48896
+ platform?: 'metaads' | 'openaiads' | 'tiktokads';
48846
48897
  tags?: Array<TrackingTag>;
48847
48898
  });
48848
48899
 
@@ -48871,7 +48922,7 @@ export type CreateTrackingTagData = {
48871
48922
  };
48872
48923
 
48873
48924
  export type CreateTrackingTagResponse = ({
48874
- platform?: 'metaads' | 'openaiads';
48925
+ platform?: 'metaads' | 'openaiads' | 'tiktokads';
48875
48926
  tag?: TrackingTag;
48876
48927
  });
48877
48928
 
@@ -48883,14 +48934,20 @@ export type GetTrackingTagData = {
48883
48934
  path: {
48884
48935
  accountId: string;
48885
48936
  /**
48886
- * Pixel id.
48937
+ * Tag id (`TrackingTag.id`).
48887
48938
  */
48888
48939
  tagId: string;
48889
48940
  };
48941
+ query?: {
48942
+ /**
48943
+ * Scopes the lookup on platforms whose tag ids live inside an ad account. Ignored elsewhere.
48944
+ */
48945
+ adAccountId?: string;
48946
+ };
48890
48947
  };
48891
48948
 
48892
48949
  export type GetTrackingTagResponse = ({
48893
- platform?: 'metaads';
48950
+ platform?: 'metaads' | 'tiktokads';
48894
48951
  tag?: TrackingTag;
48895
48952
  });
48896
48953
 
@@ -48900,6 +48957,10 @@ export type GetTrackingTagError = (ErrorResponse | {
48900
48957
 
48901
48958
  export type UpdateTrackingTagData = {
48902
48959
  body: {
48960
+ /**
48961
+ * Scopes the lookup on platforms whose tag ids live inside an ad account. Ignored elsewhere.
48962
+ */
48963
+ adAccountId?: string;
48903
48964
  name?: string;
48904
48965
  /**
48905
48966
  * Meta Advanced Matching toggle (`enable_automatic_matching`).
@@ -48926,7 +48987,7 @@ export type UpdateTrackingTagData = {
48926
48987
  };
48927
48988
 
48928
48989
  export type UpdateTrackingTagResponse = ({
48929
- platform?: 'metaads';
48990
+ platform?: 'metaads' | 'tiktokads';
48930
48991
  tag?: TrackingTag;
48931
48992
  });
48932
48993
 
@@ -49006,6 +49067,10 @@ export type InstallTrackingTagOnStoreData = {
49006
49067
  * The connected Shopify (`shopify`) or WordPress (`wordpress`) account id.
49007
49068
  */
49008
49069
  storeAccountId: string;
49070
+ /**
49071
+ * Scopes the tag lookup on platforms whose tag ids live inside an ad account. Ignored elsewhere.
49072
+ */
49073
+ adAccountId?: string;
49009
49074
  /**
49010
49075
  * WordPress only: widget area to use (see `install.preflight.sidebars` from GET). Defaults to a footer area.
49011
49076
  */
@@ -49018,14 +49083,14 @@ export type InstallTrackingTagOnStoreData = {
49018
49083
  path: {
49019
49084
  accountId: string;
49020
49085
  /**
49021
- * Meta pixel id.
49086
+ * Tag id (`TrackingTag.id`).
49022
49087
  */
49023
49088
  tagId: string;
49024
49089
  };
49025
49090
  };
49026
49091
 
49027
49092
  export type InstallTrackingTagOnStoreResponse = ({
49028
- platform?: 'metaads';
49093
+ platform?: 'metaads' | 'tiktokads';
49029
49094
  install?: (StorePixelInstall & {
49030
49095
  /**
49031
49096
  * Shopify only: the pixel this install replaced on the store, if any.
@@ -49063,11 +49128,15 @@ export type GetTrackingTagStoreInstallData = {
49063
49128
  path: {
49064
49129
  accountId: string;
49065
49130
  /**
49066
- * Meta pixel id.
49131
+ * Tag id (`TrackingTag.id`).
49067
49132
  */
49068
49133
  tagId: string;
49069
49134
  };
49070
49135
  query: {
49136
+ /**
49137
+ * Scopes the tag lookup on platforms whose tag ids live inside an ad account.
49138
+ */
49139
+ adAccountId?: string;
49071
49140
  /**
49072
49141
  * The connected Shopify or WordPress account id.
49073
49142
  */
@@ -49076,7 +49145,7 @@ export type GetTrackingTagStoreInstallData = {
49076
49145
  };
49077
49146
 
49078
49147
  export type GetTrackingTagStoreInstallResponse = ({
49079
- platform?: 'metaads';
49148
+ platform?: 'metaads' | 'tiktokads';
49080
49149
  install?: (StorePixelInstall & {
49081
49150
  /**
49082
49151
  * WordPress only.
@@ -49109,11 +49178,15 @@ export type RemoveTrackingTagFromStoreData = {
49109
49178
  path: {
49110
49179
  accountId: string;
49111
49180
  /**
49112
- * Meta pixel id.
49181
+ * Tag id (`TrackingTag.id`).
49113
49182
  */
49114
49183
  tagId: string;
49115
49184
  };
49116
49185
  query: {
49186
+ /**
49187
+ * Scopes the tag lookup on platforms whose tag ids live inside an ad account.
49188
+ */
49189
+ adAccountId?: string;
49117
49190
  /**
49118
49191
  * The connected Shopify or WordPress account id.
49119
49192
  */
@@ -49122,7 +49195,7 @@ export type RemoveTrackingTagFromStoreData = {
49122
49195
  };
49123
49196
 
49124
49197
  export type RemoveTrackingTagFromStoreResponse = ({
49125
- platform?: 'metaads';
49198
+ platform?: 'metaads' | 'tiktokads';
49126
49199
  install?: (StorePixelInstall & {
49127
49200
  /**
49128
49201
  * WordPress only: number of Zernio widgets deleted.
@@ -49139,13 +49212,17 @@ export type GetTrackingTagStatsData = {
49139
49212
  path: {
49140
49213
  accountId: string;
49141
49214
  /**
49142
- * Pixel id.
49215
+ * Tag id (`TrackingTag.id`).
49143
49216
  */
49144
49217
  tagId: string;
49145
49218
  };
49146
49219
  query?: {
49147
49220
  /**
49148
- * Aggregation dimension. Defaults to `event`.
49221
+ * Scopes the lookup on platforms whose tag ids live inside an ad account. Ignored elsewhere.
49222
+ */
49223
+ adAccountId?: string;
49224
+ /**
49225
+ * Meta only (400 on other platforms): aggregation dimension. Defaults to `event`.
49149
49226
  */
49150
49227
  aggregation?: 'event' | 'host' | 'url' | 'url_by_rule' | 'pixel_fire' | 'device_type' | 'device_os' | 'browser_type' | 'had_pii' | 'custom_data_field' | 'match_keys' | 'event_source' | 'event_detection_method' | 'event_processing_results' | 'event_total_counts' | 'event_value_count';
49151
49228
  /**
@@ -49160,7 +49237,7 @@ export type GetTrackingTagStatsData = {
49160
49237
  };
49161
49238
 
49162
49239
  export type GetTrackingTagStatsResponse = ({
49163
- platform?: 'metaads';
49240
+ platform?: 'metaads' | 'tiktokads';
49164
49241
  stats?: {
49165
49242
  aggregation?: string;
49166
49243
  startTime?: number;