@zernio/node 0.2.973 → 0.2.975

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
@@ -48414,7 +48414,7 @@ type GetTrackingTagData = {
48414
48414
  };
48415
48415
  };
48416
48416
  type GetTrackingTagResponse = ({
48417
- platform?: 'metaads' | 'tiktokads' | 'googleads' | 'xads';
48417
+ platform?: 'metaads' | 'tiktokads' | 'googleads' | 'xads' | 'openaiads';
48418
48418
  tag?: TrackingTag;
48419
48419
  });
48420
48420
  type GetTrackingTagError = (ErrorResponse | {
@@ -48451,7 +48451,7 @@ type UpdateTrackingTagData = {
48451
48451
  };
48452
48452
  };
48453
48453
  type UpdateTrackingTagResponse = ({
48454
- platform?: 'metaads' | 'tiktokads' | 'googleads' | 'xads';
48454
+ platform?: 'metaads' | 'tiktokads' | 'googleads' | 'xads' | 'openaiads';
48455
48455
  tag?: TrackingTag;
48456
48456
  });
48457
48457
  type UpdateTrackingTagError = (unknown | {
@@ -48542,7 +48542,7 @@ type InstallTrackingTagOnStoreData = {
48542
48542
  };
48543
48543
  };
48544
48544
  type InstallTrackingTagOnStoreResponse = ({
48545
- platform?: 'metaads' | 'tiktokads' | 'googleads' | 'xads';
48545
+ platform?: 'metaads' | 'tiktokads' | 'googleads' | 'xads' | 'openaiads';
48546
48546
  install?: (StorePixelInstall & {
48547
48547
  /**
48548
48548
  * Shopify only: the pixel this install replaced on the store, if any.
@@ -48594,7 +48594,7 @@ type GetTrackingTagStoreInstallData = {
48594
48594
  };
48595
48595
  };
48596
48596
  type GetTrackingTagStoreInstallResponse = ({
48597
- platform?: 'metaads' | 'tiktokads' | 'googleads' | 'xads';
48597
+ platform?: 'metaads' | 'tiktokads' | 'googleads' | 'xads' | 'openaiads';
48598
48598
  install?: (StorePixelInstall & {
48599
48599
  /**
48600
48600
  * WordPress only.
@@ -48641,7 +48641,7 @@ type RemoveTrackingTagFromStoreData = {
48641
48641
  };
48642
48642
  };
48643
48643
  type RemoveTrackingTagFromStoreResponse = ({
48644
- platform?: 'metaads' | 'tiktokads' | 'googleads' | 'xads';
48644
+ platform?: 'metaads' | 'tiktokads' | 'googleads' | 'xads' | 'openaiads';
48645
48645
  install?: (StorePixelInstall & {
48646
48646
  /**
48647
48647
  * WordPress only: number of Zernio widgets deleted.
@@ -48763,7 +48763,7 @@ type GetTrackingTagStatsData = {
48763
48763
  };
48764
48764
  };
48765
48765
  type GetTrackingTagStatsResponse = ({
48766
- platform?: 'metaads' | 'tiktokads' | 'googleads' | 'xads';
48766
+ platform?: 'metaads' | 'tiktokads' | 'googleads' | 'xads' | 'openaiads';
48767
48767
  stats?: {
48768
48768
  aggregation?: string;
48769
48769
  startTime?: number;
package/dist/index.d.ts CHANGED
@@ -48414,7 +48414,7 @@ type GetTrackingTagData = {
48414
48414
  };
48415
48415
  };
48416
48416
  type GetTrackingTagResponse = ({
48417
- platform?: 'metaads' | 'tiktokads' | 'googleads' | 'xads';
48417
+ platform?: 'metaads' | 'tiktokads' | 'googleads' | 'xads' | 'openaiads';
48418
48418
  tag?: TrackingTag;
48419
48419
  });
48420
48420
  type GetTrackingTagError = (ErrorResponse | {
@@ -48451,7 +48451,7 @@ type UpdateTrackingTagData = {
48451
48451
  };
48452
48452
  };
48453
48453
  type UpdateTrackingTagResponse = ({
48454
- platform?: 'metaads' | 'tiktokads' | 'googleads' | 'xads';
48454
+ platform?: 'metaads' | 'tiktokads' | 'googleads' | 'xads' | 'openaiads';
48455
48455
  tag?: TrackingTag;
48456
48456
  });
48457
48457
  type UpdateTrackingTagError = (unknown | {
@@ -48542,7 +48542,7 @@ type InstallTrackingTagOnStoreData = {
48542
48542
  };
48543
48543
  };
48544
48544
  type InstallTrackingTagOnStoreResponse = ({
48545
- platform?: 'metaads' | 'tiktokads' | 'googleads' | 'xads';
48545
+ platform?: 'metaads' | 'tiktokads' | 'googleads' | 'xads' | 'openaiads';
48546
48546
  install?: (StorePixelInstall & {
48547
48547
  /**
48548
48548
  * Shopify only: the pixel this install replaced on the store, if any.
@@ -48594,7 +48594,7 @@ type GetTrackingTagStoreInstallData = {
48594
48594
  };
48595
48595
  };
48596
48596
  type GetTrackingTagStoreInstallResponse = ({
48597
- platform?: 'metaads' | 'tiktokads' | 'googleads' | 'xads';
48597
+ platform?: 'metaads' | 'tiktokads' | 'googleads' | 'xads' | 'openaiads';
48598
48598
  install?: (StorePixelInstall & {
48599
48599
  /**
48600
48600
  * WordPress only.
@@ -48641,7 +48641,7 @@ type RemoveTrackingTagFromStoreData = {
48641
48641
  };
48642
48642
  };
48643
48643
  type RemoveTrackingTagFromStoreResponse = ({
48644
- platform?: 'metaads' | 'tiktokads' | 'googleads' | 'xads';
48644
+ platform?: 'metaads' | 'tiktokads' | 'googleads' | 'xads' | 'openaiads';
48645
48645
  install?: (StorePixelInstall & {
48646
48646
  /**
48647
48647
  * WordPress only: number of Zernio widgets deleted.
@@ -48763,7 +48763,7 @@ type GetTrackingTagStatsData = {
48763
48763
  };
48764
48764
  };
48765
48765
  type GetTrackingTagStatsResponse = ({
48766
- platform?: 'metaads' | 'tiktokads' | 'googleads' | 'xads';
48766
+ platform?: 'metaads' | 'tiktokads' | 'googleads' | 'xads' | 'openaiads';
48767
48767
  stats?: {
48768
48768
  aggregation?: string;
48769
48769
  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.973",
39
+ version: "0.2.975",
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.973",
8
+ version: "0.2.975",
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.973",
3
+ "version": "0.2.975",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -13609,8 +13609,7 @@ export const startBusinessAgentEvalRun = <ThrowOnError extends boolean = false>(
13609
13609
  * to scope the list to a single ad account; omit it to list every pixel
13610
13610
  * reachable by the token (the name is then suffixed with the ad account
13611
13611
  * it was discovered on, for disambiguation). The list view omits `code`.
13612
- * Call `getTrackingTag` for the install snippet and full detail (Meta
13613
- * only; OpenAI Ads has no get-by-id endpoint).
13612
+ * Call `getTrackingTag` for the install snippet and full detail.
13614
13613
  *
13615
13614
  * Meta (platform `metaads`) and OpenAI Ads (platform `openaiads`); other
13616
13615
  * platforms return 501. The `accountId` must be the ads SocialAccount
@@ -13670,9 +13669,15 @@ export const createTrackingTag = <ThrowOnError extends boolean = false>(options:
13670
13669
  * Get a tracking tag
13671
13670
  * Returns the full tag record including the base-code `code` snippet,
13672
13671
  * `lastFiredTime`, `ownerBusinessId`, `isUnavailable`, etc. Meta only
13673
- * (platform `metaads`); other platforms return 501. OpenAI Ads has no
13674
- * get-by-id endpoint, so it answers 501 here too. Use
13675
- * `GET /v1/accounts/{accountId}/tracking-tags` (list) instead.
13672
+ * (platform `metaads`); other platforms return 501.
13673
+ *
13674
+ * OpenAI Ads (`openaiads`): `tagId` is the pixel's API id (`cds_...`) or
13675
+ * its `pixel_id`. OpenAI documents no single-pixel read, so the tag is
13676
+ * resolved from the pixel list; the response adds `code` (the official
13677
+ * `oaiq` base code plus `page_viewed`) and `events` (the conversion
13678
+ * event settings whose source is this pixel). `siteTagId` is the
13679
+ * `pixel_id` the site and the Conversions API send; `id` is what event
13680
+ * settings reference.
13676
13681
  *
13677
13682
  */
13678
13683
  export const getTrackingTag = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetTrackingTagData, ThrowOnError>) => {
@@ -13690,6 +13695,10 @@ export const getTrackingTag = <ThrowOnError extends boolean = false>(options: Op
13690
13695
  * Returns the re-fetched canonical tag. Meta only (platform `metaads`);
13691
13696
  * other platforms return 501.
13692
13697
  *
13698
+ * OpenAI Ads answers 501: its API has no pixel update or delete route
13699
+ * (`POST`/`PATCH`/`PUT`/`DELETE /v1/conversions/pixels/{id}` answer 405
13700
+ * "Invalid method"); rename a pixel in OpenAI Ads Manager.
13701
+ *
13693
13702
  * There is no DELETE: Meta has no API to delete a pixel. To stop using
13694
13703
  * one, unshare it from your ad accounts (`DELETE
13695
13704
  * .../tracking-tags/{tagId}/shared-accounts`) or disable it in Events
@@ -13759,10 +13768,22 @@ export const removeTrackingTagSharedAccount = <ThrowOnError extends boolean = fa
13759
13768
  * Events respect the store's customer privacy settings (marketing consent).
13760
13769
  *
13761
13770
  * `accountId` is the Meta ads account that owns the pixel (`tagId`); `storeAccountId` is the
13762
- * Shopify account. Stores connected before pixel support must re-approve the Zernio app:
13771
+ * Shopify account.
13772
+ *
13773
+ * OpenAI Ads on Shopify: each event is sent through OpenAI's documented image tag
13774
+ * (`GET https://bzr.openai.com/v1/sdk/events`) as `page_viewed`, `contents_viewed`,
13775
+ * `items_added`, `checkout_started`, `order_created`, and custom events `search` and
13776
+ * `addpaymentinfo` (lowercase, so a Conversions API Search/AddPaymentInfo with the same
13777
+ * event id deduplicates). Amounts are sent in the currency's minor unit. The landing
13778
+ * page's `oppref` click id is kept in the `__oppref` cookie for 30 days and sent with
13779
+ * every event. The image tag cannot carry the `__obref` browser id (OpenAI rejects the
13780
+ * parameter), and the search text is never sent. On WordPress the widget holds the
13781
+ * official `oaiq` base code and a `page_viewed` call.
13782
+ *
13783
+ * Stores connected before pixel support must re-approve the Zernio app:
13763
13784
  * the call then answers 409 `reconnect_required` with `details.authUrl` to send the
13764
- * merchant to (the Shopify account id stays the same). Meta only (platform `metaads`);
13765
- * other platforms return 501.
13785
+ * merchant to (the Shopify account id stays the same). Platforms without an install path
13786
+ * return 501.
13766
13787
  *
13767
13788
  * **WordPress** (`storeAccountId` is a connected WordPress.com or self-hosted site): Zernio
13768
13789
  * adds a Custom HTML widget with the Meta pixel base code (fbevents.js, `init`, `PageView`)
@@ -13837,6 +13858,11 @@ export const removeTrackingTagFromStore = <ThrowOnError extends boolean = false>
13837
13858
  * settings, TikTok pixel events, Meta custom conversions. Platforms where events are just
13838
13859
  * names the site sends (Pinterest) answer 501.
13839
13860
  *
13861
+ * OpenAI Ads: the account's conversion event settings whose source is this pixel.
13862
+ * `siteEventId` is the event name the site sends (a standard event such as
13863
+ * `order_created`, or the lowercase custom event name); `clickWindowDays` is the
13864
+ * attribution window.
13865
+ *
13840
13866
  */
13841
13867
  export const listTrackingTagEvents = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ListTrackingTagEventsData, ThrowOnError>) => {
13842
13868
  return (options?.client ?? client).get<ListTrackingTagEventsResponse, ListTrackingTagEventsError, ThrowOnError>({
@@ -13853,6 +13879,18 @@ export const listTrackingTagEvents = <ThrowOnError extends boolean = false>(opti
13853
13879
  * optional fields; sending one it does not store answers 400 naming the supported fields.
13854
13880
  * NOT idempotent unless noted per platform: do not retry blindly.
13855
13881
  *
13882
+ * OpenAI Ads: creates a conversion event setting on the pixel (`POST
13883
+ * /conversions/event_settings`, source = the pixel). Accepts `name`, `type` and
13884
+ * `siteEvent` only. `type` is a standard event (`order_created`, `lead_created`,
13885
+ * `items_added`, `contents_viewed`, `checkout_started`, `registration_completed`,
13886
+ * `subscription_created`, `trial_started`, `appointment_scheduled`, `page_viewed`,
13887
+ * `app_installed`, `app_opened`) or, for anything else, the custom event name itself
13888
+ * (1 to 64 letters, digits, underscores or dashes; stored lowercase). `siteEvent` maps
13889
+ * `search` and `add_payment_info` to the custom events `search` and `addpaymentinfo`,
13890
+ * the names Zernio's Shopify pixel sends. The click attribution window is 30 days, the
13891
+ * only value OpenAI documents. Only standard events can be a conversions campaign's
13892
+ * optimization goal.
13893
+ *
13856
13894
  */
13857
13895
  export const createTrackingTagEvent = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateTrackingTagEventData, ThrowOnError>) => {
13858
13896
  return (options?.client ?? client).post<CreateTrackingTagEventResponse, CreateTrackingTagEventError, ThrowOnError>({
@@ -13864,6 +13902,11 @@ export const createTrackingTagEvent = <ThrowOnError extends boolean = false>(opt
13864
13902
  /**
13865
13903
  * Update a conversion event
13866
13904
  * Partial update; at least one field. A field the platform does not store answers 400.
13905
+ *
13906
+ * OpenAI Ads answers 501: OpenAI documents only list and create for event settings, and
13907
+ * `POST`/`PATCH`/`PUT /v1/conversions/event_settings/{id}` answer 404 "Invalid URL".
13908
+ * Create a new event instead.
13909
+ *
13867
13910
  */
13868
13911
  export const updateTrackingTagEvent = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateTrackingTagEventData, ThrowOnError>) => {
13869
13912
  return (options?.client ?? client).patch<UpdateTrackingTagEventResponse, UpdateTrackingTagEventError, ThrowOnError>({
@@ -13877,6 +13920,10 @@ export const updateTrackingTagEvent = <ThrowOnError extends boolean = false>(opt
13877
13920
  * Removes the conversion event. Platforms without a hard delete archive or disable it
13878
13921
  * instead; `state` in the response says which (`deleted`, `archived`, `disabled`).
13879
13922
  *
13923
+ * OpenAI Ads answers 501: there is no delete or archive route for event settings
13924
+ * (`DELETE /v1/conversions/event_settings/{id}` and `POST .../{id}/archive` answer 404
13925
+ * "Invalid URL"). Archive the event in OpenAI Ads Manager.
13926
+ *
13880
13927
  */
13881
13928
  export const deleteTrackingTagEvent = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DeleteTrackingTagEventData, ThrowOnError>) => {
13882
13929
  return (options?.client ?? client).delete<DeleteTrackingTagEventResponse, DeleteTrackingTagEventError, ThrowOnError>({
@@ -13892,6 +13939,14 @@ export const deleteTrackingTagEvent = <ThrowOnError extends boolean = false>(opt
13892
13939
  * through as-is; their shape depends on the `aggregation` requested.
13893
13940
  * Platforms without a stats API answer 501.
13894
13941
  *
13942
+ * OpenAI Ads: the recent-events stream (`GET /conversions/events`), the
13943
+ * latest (at most 50) Pixel SDK events received in the last 15 minutes,
13944
+ * one row per event (`event_type`, `api_channel`, `event_timestamp_ms`,
13945
+ * `received_at_ms`, ...). Conversions API events are not included. It is
13946
+ * a fixed window: `startTime`/`endTime` answer 400. Use it to confirm an
13947
+ * install fires; attributed totals come from ads analytics. Accounts not
13948
+ * enabled for the stream answer 422 `feature_not_available`.
13949
+ *
13895
13950
  */
13896
13951
  export const getTrackingTagStats = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetTrackingTagStatsData, ThrowOnError>) => {
13897
13952
  return (options?.client ?? client).get<GetTrackingTagStatsResponse, GetTrackingTagStatsError, ThrowOnError>({
@@ -49566,7 +49566,7 @@ export type GetTrackingTagData = {
49566
49566
  };
49567
49567
 
49568
49568
  export type GetTrackingTagResponse = ({
49569
- platform?: 'metaads' | 'tiktokads' | 'googleads' | 'xads';
49569
+ platform?: 'metaads' | 'tiktokads' | 'googleads' | 'xads' | 'openaiads';
49570
49570
  tag?: TrackingTag;
49571
49571
  });
49572
49572
 
@@ -49606,7 +49606,7 @@ export type UpdateTrackingTagData = {
49606
49606
  };
49607
49607
 
49608
49608
  export type UpdateTrackingTagResponse = ({
49609
- platform?: 'metaads' | 'tiktokads' | 'googleads' | 'xads';
49609
+ platform?: 'metaads' | 'tiktokads' | 'googleads' | 'xads' | 'openaiads';
49610
49610
  tag?: TrackingTag;
49611
49611
  });
49612
49612
 
@@ -49709,7 +49709,7 @@ export type InstallTrackingTagOnStoreData = {
49709
49709
  };
49710
49710
 
49711
49711
  export type InstallTrackingTagOnStoreResponse = ({
49712
- platform?: 'metaads' | 'tiktokads' | 'googleads' | 'xads';
49712
+ platform?: 'metaads' | 'tiktokads' | 'googleads' | 'xads' | 'openaiads';
49713
49713
  install?: (StorePixelInstall & {
49714
49714
  /**
49715
49715
  * Shopify only: the pixel this install replaced on the store, if any.
@@ -49764,7 +49764,7 @@ export type GetTrackingTagStoreInstallData = {
49764
49764
  };
49765
49765
 
49766
49766
  export type GetTrackingTagStoreInstallResponse = ({
49767
- platform?: 'metaads' | 'tiktokads' | 'googleads' | 'xads';
49767
+ platform?: 'metaads' | 'tiktokads' | 'googleads' | 'xads' | 'openaiads';
49768
49768
  install?: (StorePixelInstall & {
49769
49769
  /**
49770
49770
  * WordPress only.
@@ -49814,7 +49814,7 @@ export type RemoveTrackingTagFromStoreData = {
49814
49814
  };
49815
49815
 
49816
49816
  export type RemoveTrackingTagFromStoreResponse = ({
49817
- platform?: 'metaads' | 'tiktokads' | 'googleads' | 'xads';
49817
+ platform?: 'metaads' | 'tiktokads' | 'googleads' | 'xads' | 'openaiads';
49818
49818
  install?: (StorePixelInstall & {
49819
49819
  /**
49820
49820
  * WordPress only: number of Zernio widgets deleted.
@@ -49951,7 +49951,7 @@ export type GetTrackingTagStatsData = {
49951
49951
  };
49952
49952
 
49953
49953
  export type GetTrackingTagStatsResponse = ({
49954
- platform?: 'metaads' | 'tiktokads' | 'googleads' | 'xads';
49954
+ platform?: 'metaads' | 'tiktokads' | 'googleads' | 'xads' | 'openaiads';
49955
49955
  stats?: {
49956
49956
  aggregation?: string;
49957
49957
  startTime?: number;