@zernio/node 0.2.77 → 0.2.79

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
@@ -928,6 +928,20 @@ type AdMetrics = {
928
928
  actions?: {
929
929
  [key: string]: (number);
930
930
  };
931
+ /**
932
+ * Monetary mirror of `actions`, from Meta's Insights `action_values[]` array. Same keying — values are the revenue attributed to each action_type, in ad-account native currency (same unit as `spend`; see the campaign node's `currency` field). Use this to compute revenue-per-event (e.g. avg purchase value). Meta-only; other platforms return {}.
933
+ */
934
+ actionValues?: {
935
+ [key: string]: (number);
936
+ };
937
+ /**
938
+ * Convenience sum of purchase-type action values — picked from `actionValues` via the same priority list as `conversions` so both fields describe the same events. In ad-account native currency. 0 when the campaign has no purchase event configured. Meta-only.
939
+ */
940
+ purchaseValue?: number;
941
+ /**
942
+ * Return on ad spend — derived as `purchaseValue / spend`. 0 when `spend` is 0. Equivalent to Meta's `purchase_roas` under default attribution. At ad-set and campaign levels this is recomputed from summed purchaseValue + spend (NOT averaged across children) so it's mathematically correct at every rollup level.
943
+ */
944
+ roas?: number;
931
945
  /**
932
946
  * Present on individual ads only, not on campaign aggregations
933
947
  */
@@ -7474,10 +7488,6 @@ type GetDiscordSettingsError = (unknown | {
7474
7488
  });
7475
7489
  type UpdateDiscordSettingsData = {
7476
7490
  body: {
7477
- /**
7478
- * Discord account ID
7479
- */
7480
- accountId: string;
7481
7491
  /**
7482
7492
  * Custom display name for the webhook (1-80 chars). Empty string resets to default ("Zernio"). Cannot contain "clyde" or "discord".
7483
7493
  */
@@ -11644,7 +11654,7 @@ type ListAdsData = {
11644
11654
  */
11645
11655
  profileId?: string;
11646
11656
  /**
11647
- * zernio = Zernio-created only, all = include external ads
11657
+ * all (default) = Zernio-created + platform-discovered ads. zernio = restrict to Zernio-created only.
11648
11658
  */
11649
11659
  source?: 'zernio' | 'all';
11650
11660
  status?: AdStatus;
@@ -11682,7 +11692,7 @@ type ListAdCampaignsData = {
11682
11692
  */
11683
11693
  profileId?: string;
11684
11694
  /**
11685
- * `zernio` (default) returns only ads created via Zernio (isExternal=false). `all` additionally returns ads discovered from the platform's ad manager (isExternal=true). Status is NOT filtered by default — use the `status` param for that.
11695
+ * `all` (default) returns both Zernio-created ads and those discovered from the platform's ad manager — matches the web UI's default view. Pass `zernio` to restrict to isExternal=false only. Status is NOT filtered by default — use the `status` param for that.
11686
11696
  */
11687
11697
  source?: 'zernio' | 'all';
11688
11698
  /**
@@ -11925,7 +11935,7 @@ type GetAdTreeData = {
11925
11935
  */
11926
11936
  profileId?: string;
11927
11937
  /**
11928
- * `zernio` (default) returns only ads created via Zernio (isExternal=false). `all` additionally returns ads discovered from the platform's ad manager (isExternal=true). Status is NOT filtered by default — use the `status` param for that.
11938
+ * `all` (default) returns both Zernio-created ads and those discovered from the platform's ad manager — matches the web UI's default view. Pass `zernio` to restrict to isExternal=false only. Status is NOT filtered by default — use the `status` param for that.
11929
11939
  */
11930
11940
  source?: 'zernio' | 'all';
11931
11941
  /**
package/dist/index.d.ts CHANGED
@@ -928,6 +928,20 @@ type AdMetrics = {
928
928
  actions?: {
929
929
  [key: string]: (number);
930
930
  };
931
+ /**
932
+ * Monetary mirror of `actions`, from Meta's Insights `action_values[]` array. Same keying — values are the revenue attributed to each action_type, in ad-account native currency (same unit as `spend`; see the campaign node's `currency` field). Use this to compute revenue-per-event (e.g. avg purchase value). Meta-only; other platforms return {}.
933
+ */
934
+ actionValues?: {
935
+ [key: string]: (number);
936
+ };
937
+ /**
938
+ * Convenience sum of purchase-type action values — picked from `actionValues` via the same priority list as `conversions` so both fields describe the same events. In ad-account native currency. 0 when the campaign has no purchase event configured. Meta-only.
939
+ */
940
+ purchaseValue?: number;
941
+ /**
942
+ * Return on ad spend — derived as `purchaseValue / spend`. 0 when `spend` is 0. Equivalent to Meta's `purchase_roas` under default attribution. At ad-set and campaign levels this is recomputed from summed purchaseValue + spend (NOT averaged across children) so it's mathematically correct at every rollup level.
943
+ */
944
+ roas?: number;
931
945
  /**
932
946
  * Present on individual ads only, not on campaign aggregations
933
947
  */
@@ -7474,10 +7488,6 @@ type GetDiscordSettingsError = (unknown | {
7474
7488
  });
7475
7489
  type UpdateDiscordSettingsData = {
7476
7490
  body: {
7477
- /**
7478
- * Discord account ID
7479
- */
7480
- accountId: string;
7481
7491
  /**
7482
7492
  * Custom display name for the webhook (1-80 chars). Empty string resets to default ("Zernio"). Cannot contain "clyde" or "discord".
7483
7493
  */
@@ -11644,7 +11654,7 @@ type ListAdsData = {
11644
11654
  */
11645
11655
  profileId?: string;
11646
11656
  /**
11647
- * zernio = Zernio-created only, all = include external ads
11657
+ * all (default) = Zernio-created + platform-discovered ads. zernio = restrict to Zernio-created only.
11648
11658
  */
11649
11659
  source?: 'zernio' | 'all';
11650
11660
  status?: AdStatus;
@@ -11682,7 +11692,7 @@ type ListAdCampaignsData = {
11682
11692
  */
11683
11693
  profileId?: string;
11684
11694
  /**
11685
- * `zernio` (default) returns only ads created via Zernio (isExternal=false). `all` additionally returns ads discovered from the platform's ad manager (isExternal=true). Status is NOT filtered by default — use the `status` param for that.
11695
+ * `all` (default) returns both Zernio-created ads and those discovered from the platform's ad manager — matches the web UI's default view. Pass `zernio` to restrict to isExternal=false only. Status is NOT filtered by default — use the `status` param for that.
11686
11696
  */
11687
11697
  source?: 'zernio' | 'all';
11688
11698
  /**
@@ -11925,7 +11935,7 @@ type GetAdTreeData = {
11925
11935
  */
11926
11936
  profileId?: string;
11927
11937
  /**
11928
- * `zernio` (default) returns only ads created via Zernio (isExternal=false). `all` additionally returns ads discovered from the platform's ad manager (isExternal=true). Status is NOT filtered by default — use the `status` param for that.
11938
+ * `all` (default) returns both Zernio-created ads and those discovered from the platform's ad manager — matches the web UI's default view. Pass `zernio` to restrict to isExternal=false only. Status is NOT filtered by default — use the `status` param for that.
11929
11939
  */
11930
11940
  source?: 'zernio' | 'all';
11931
11941
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zernio/node",
3
- "version": "0.2.77",
3
+ "version": "0.2.79",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -343,6 +343,20 @@ export type AdMetrics = {
343
343
  actions?: {
344
344
  [key: string]: (number);
345
345
  };
346
+ /**
347
+ * Monetary mirror of `actions`, from Meta's Insights `action_values[]` array. Same keying — values are the revenue attributed to each action_type, in ad-account native currency (same unit as `spend`; see the campaign node's `currency` field). Use this to compute revenue-per-event (e.g. avg purchase value). Meta-only; other platforms return {}.
348
+ */
349
+ actionValues?: {
350
+ [key: string]: (number);
351
+ };
352
+ /**
353
+ * Convenience sum of purchase-type action values — picked from `actionValues` via the same priority list as `conversions` so both fields describe the same events. In ad-account native currency. 0 when the campaign has no purchase event configured. Meta-only.
354
+ */
355
+ purchaseValue?: number;
356
+ /**
357
+ * Return on ad spend — derived as `purchaseValue / spend`. 0 when `spend` is 0. Equivalent to Meta's `purchase_roas` under default attribution. At ad-set and campaign levels this is recomputed from summed purchaseValue + spend (NOT averaged across children) so it's mathematically correct at every rollup level.
358
+ */
359
+ roas?: number;
346
360
  /**
347
361
  * Present on individual ads only, not on campaign aggregations
348
362
  */
@@ -7356,10 +7370,6 @@ export type GetDiscordSettingsError = (unknown | {
7356
7370
 
7357
7371
  export type UpdateDiscordSettingsData = {
7358
7372
  body: {
7359
- /**
7360
- * Discord account ID
7361
- */
7362
- accountId: string;
7363
7373
  /**
7364
7374
  * Custom display name for the webhook (1-80 chars). Empty string resets to default ("Zernio"). Cannot contain "clyde" or "discord".
7365
7375
  */
@@ -11906,7 +11916,7 @@ export type ListAdsData = {
11906
11916
  */
11907
11917
  profileId?: string;
11908
11918
  /**
11909
- * zernio = Zernio-created only, all = include external ads
11919
+ * all (default) = Zernio-created + platform-discovered ads. zernio = restrict to Zernio-created only.
11910
11920
  */
11911
11921
  source?: 'zernio' | 'all';
11912
11922
  status?: AdStatus;
@@ -11947,7 +11957,7 @@ export type ListAdCampaignsData = {
11947
11957
  */
11948
11958
  profileId?: string;
11949
11959
  /**
11950
- * `zernio` (default) returns only ads created via Zernio (isExternal=false). `all` additionally returns ads discovered from the platform's ad manager (isExternal=true). Status is NOT filtered by default — use the `status` param for that.
11960
+ * `all` (default) returns both Zernio-created ads and those discovered from the platform's ad manager — matches the web UI's default view. Pass `zernio` to restrict to isExternal=false only. Status is NOT filtered by default — use the `status` param for that.
11951
11961
  */
11952
11962
  source?: 'zernio' | 'all';
11953
11963
  /**
@@ -12214,7 +12224,7 @@ export type GetAdTreeData = {
12214
12224
  */
12215
12225
  profileId?: string;
12216
12226
  /**
12217
- * `zernio` (default) returns only ads created via Zernio (isExternal=false). `all` additionally returns ads discovered from the platform's ad manager (isExternal=true). Status is NOT filtered by default — use the `status` param for that.
12227
+ * `all` (default) returns both Zernio-created ads and those discovered from the platform's ad manager — matches the web UI's default view. Pass `zernio` to restrict to isExternal=false only. Status is NOT filtered by default — use the `status` param for that.
12218
12228
  */
12219
12229
  source?: 'zernio' | 'all';
12220
12230
  /**