@zernio/node 0.2.57 → 0.2.59

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
@@ -676,6 +676,43 @@ type Ad = {
676
676
  platformAdSetId?: string;
677
677
  campaignName?: string;
678
678
  adSetName?: string;
679
+ /**
680
+ * Raw Meta campaign objective (e.g. OUTCOME_SALES, OUTCOME_LEADS, OUTCOME_TRAFFIC). Only present for Meta ads.
681
+ */
682
+ platformObjective?: (string) | null;
683
+ /**
684
+ * Meta ad set optimization goal (e.g. OFFSITE_CONVERSIONS, VALUE, LEAD_GENERATION, LINK_CLICKS). Only present for Meta ads.
685
+ */
686
+ optimizationGoal?: (string) | null;
687
+ /**
688
+ * Bid strategy (e.g. LOWEST_COST_WITHOUT_CAP, COST_CAP, LOWEST_COST_WITH_MIN_ROAS). Ad set level overrides campaign level. Only present for Meta ads.
689
+ */
690
+ bidStrategy?: (string) | null;
691
+ /**
692
+ * Meta promoted object containing conversion event details. Structure varies by objective. Only present for Meta ads.
693
+ */
694
+ promotedObject?: {
695
+ /**
696
+ * Conversion event type (e.g. PURCHASE, LEAD, COMPLETE_REGISTRATION, ADD_TO_CART)
697
+ */
698
+ custom_event_type?: string;
699
+ /**
700
+ * Meta pixel ID
701
+ */
702
+ pixel_id?: string;
703
+ /**
704
+ * Facebook page ID
705
+ */
706
+ page_id?: string;
707
+ /**
708
+ * Facebook app ID
709
+ */
710
+ application_id?: string;
711
+ /**
712
+ * Product catalog set ID
713
+ */
714
+ product_set_id?: string;
715
+ } | null;
679
716
  /**
680
717
  * Platform-specific creative data. Fields vary by platform.
681
718
  */
@@ -757,6 +794,26 @@ type AdCampaign = {
757
794
  platformAdAccountId?: string;
758
795
  accountId?: string;
759
796
  profileId?: string;
797
+ /**
798
+ * Raw Meta campaign objective (e.g. OUTCOME_SALES, OUTCOME_LEADS, OUTCOME_TRAFFIC)
799
+ */
800
+ platformObjective?: (string) | null;
801
+ /**
802
+ * Meta optimization goal. String if all ad sets share the same goal, array of distinct values if they differ.
803
+ */
804
+ optimizationGoal?: ((string | Array<(string)>) | null);
805
+ /**
806
+ * Campaign-level bid strategy (e.g. LOWEST_COST_WITHOUT_CAP, COST_CAP, LOWEST_COST_WITH_MIN_ROAS)
807
+ */
808
+ bidStrategy?: (string) | null;
809
+ /**
810
+ * Meta promoted object at campaign level (conversion event details)
811
+ */
812
+ promotedObject?: {
813
+ custom_event_type?: string;
814
+ pixel_id?: string;
815
+ page_id?: string;
816
+ } | null;
760
817
  earliestAd?: string;
761
818
  latestAd?: string;
762
819
  };
@@ -799,6 +856,22 @@ type AdTreeAdSet = {
799
856
  type?: 'daily' | 'lifetime';
800
857
  } | null;
801
858
  metrics?: AdMetrics;
859
+ /**
860
+ * Meta ad set optimization goal (e.g. OFFSITE_CONVERSIONS, VALUE, LEAD_GENERATION)
861
+ */
862
+ optimizationGoal?: (string) | null;
863
+ /**
864
+ * Bid strategy for this ad set (overrides campaign level when set)
865
+ */
866
+ bidStrategy?: (string) | null;
867
+ /**
868
+ * Meta promoted object for this ad set (conversion event details)
869
+ */
870
+ promotedObject?: {
871
+ custom_event_type?: string;
872
+ pixel_id?: string;
873
+ page_id?: string;
874
+ } | null;
802
875
  /**
803
876
  * Individual ads within this ad set (capped at 100). Returns a subset of Ad fields from the aggregation (core fields like _id, name, platform, status, budget, metrics, creative, goal are included; targeting and schedule may be absent).
804
877
  */
@@ -828,6 +901,26 @@ type AdTreeCampaign = {
828
901
  platformAdAccountId?: string;
829
902
  accountId?: string;
830
903
  profileId?: string;
904
+ /**
905
+ * Raw Meta campaign objective (e.g. OUTCOME_SALES, OUTCOME_LEADS, OUTCOME_TRAFFIC)
906
+ */
907
+ platformObjective?: (string) | null;
908
+ /**
909
+ * Meta optimization goal. String if all ad sets share the same goal, array of distinct values if they differ.
910
+ */
911
+ optimizationGoal?: ((string | Array<(string)>) | null);
912
+ /**
913
+ * Campaign-level bid strategy (e.g. LOWEST_COST_WITHOUT_CAP, COST_CAP, LOWEST_COST_WITH_MIN_ROAS)
914
+ */
915
+ bidStrategy?: (string) | null;
916
+ /**
917
+ * Meta promoted object at campaign level (conversion event details)
918
+ */
919
+ promotedObject?: {
920
+ custom_event_type?: string;
921
+ pixel_id?: string;
922
+ page_id?: string;
923
+ } | null;
831
924
  adSets?: Array<AdTreeAdSet>;
832
925
  };
833
926
  type AnalyticsListResponse = {
@@ -10767,7 +10860,13 @@ type UpdateAdData = {
10767
10860
  ageMin?: number;
10768
10861
  ageMax?: number;
10769
10862
  countries?: Array<(string)>;
10770
- interests?: Array<(string)>;
10863
+ /**
10864
+ * Interest objects from /v1/ads/interests. Each must include id and name.
10865
+ */
10866
+ interests?: Array<{
10867
+ id: string;
10868
+ name: string;
10869
+ }>;
10771
10870
  };
10772
10871
  name?: string;
10773
10872
  };
@@ -10895,7 +10994,13 @@ type BoostPostData = {
10895
10994
  ageMin?: number;
10896
10995
  ageMax?: number;
10897
10996
  countries?: Array<(string)>;
10898
- interests?: Array<(string)>;
10997
+ /**
10998
+ * Interest objects from /v1/ads/interests. Each must include id and name.
10999
+ */
11000
+ interests?: Array<{
11001
+ id: string;
11002
+ name: string;
11003
+ }>;
10899
11004
  };
10900
11005
  /**
10901
11006
  * Max bid cap (Meta only)
@@ -10962,7 +11067,13 @@ type CreateStandaloneAdData = {
10962
11067
  countries?: Array<(string)>;
10963
11068
  ageMin?: number;
10964
11069
  ageMax?: number;
10965
- interests?: Array<(string)>;
11070
+ /**
11071
+ * Interest objects from /v1/ads/interests. Each must include id and name.
11072
+ */
11073
+ interests?: Array<{
11074
+ id: string;
11075
+ name: string;
11076
+ }>;
10966
11077
  /**
10967
11078
  * Required for lifetime budgets
10968
11079
  */
package/dist/index.d.ts CHANGED
@@ -676,6 +676,43 @@ type Ad = {
676
676
  platformAdSetId?: string;
677
677
  campaignName?: string;
678
678
  adSetName?: string;
679
+ /**
680
+ * Raw Meta campaign objective (e.g. OUTCOME_SALES, OUTCOME_LEADS, OUTCOME_TRAFFIC). Only present for Meta ads.
681
+ */
682
+ platformObjective?: (string) | null;
683
+ /**
684
+ * Meta ad set optimization goal (e.g. OFFSITE_CONVERSIONS, VALUE, LEAD_GENERATION, LINK_CLICKS). Only present for Meta ads.
685
+ */
686
+ optimizationGoal?: (string) | null;
687
+ /**
688
+ * Bid strategy (e.g. LOWEST_COST_WITHOUT_CAP, COST_CAP, LOWEST_COST_WITH_MIN_ROAS). Ad set level overrides campaign level. Only present for Meta ads.
689
+ */
690
+ bidStrategy?: (string) | null;
691
+ /**
692
+ * Meta promoted object containing conversion event details. Structure varies by objective. Only present for Meta ads.
693
+ */
694
+ promotedObject?: {
695
+ /**
696
+ * Conversion event type (e.g. PURCHASE, LEAD, COMPLETE_REGISTRATION, ADD_TO_CART)
697
+ */
698
+ custom_event_type?: string;
699
+ /**
700
+ * Meta pixel ID
701
+ */
702
+ pixel_id?: string;
703
+ /**
704
+ * Facebook page ID
705
+ */
706
+ page_id?: string;
707
+ /**
708
+ * Facebook app ID
709
+ */
710
+ application_id?: string;
711
+ /**
712
+ * Product catalog set ID
713
+ */
714
+ product_set_id?: string;
715
+ } | null;
679
716
  /**
680
717
  * Platform-specific creative data. Fields vary by platform.
681
718
  */
@@ -757,6 +794,26 @@ type AdCampaign = {
757
794
  platformAdAccountId?: string;
758
795
  accountId?: string;
759
796
  profileId?: string;
797
+ /**
798
+ * Raw Meta campaign objective (e.g. OUTCOME_SALES, OUTCOME_LEADS, OUTCOME_TRAFFIC)
799
+ */
800
+ platformObjective?: (string) | null;
801
+ /**
802
+ * Meta optimization goal. String if all ad sets share the same goal, array of distinct values if they differ.
803
+ */
804
+ optimizationGoal?: ((string | Array<(string)>) | null);
805
+ /**
806
+ * Campaign-level bid strategy (e.g. LOWEST_COST_WITHOUT_CAP, COST_CAP, LOWEST_COST_WITH_MIN_ROAS)
807
+ */
808
+ bidStrategy?: (string) | null;
809
+ /**
810
+ * Meta promoted object at campaign level (conversion event details)
811
+ */
812
+ promotedObject?: {
813
+ custom_event_type?: string;
814
+ pixel_id?: string;
815
+ page_id?: string;
816
+ } | null;
760
817
  earliestAd?: string;
761
818
  latestAd?: string;
762
819
  };
@@ -799,6 +856,22 @@ type AdTreeAdSet = {
799
856
  type?: 'daily' | 'lifetime';
800
857
  } | null;
801
858
  metrics?: AdMetrics;
859
+ /**
860
+ * Meta ad set optimization goal (e.g. OFFSITE_CONVERSIONS, VALUE, LEAD_GENERATION)
861
+ */
862
+ optimizationGoal?: (string) | null;
863
+ /**
864
+ * Bid strategy for this ad set (overrides campaign level when set)
865
+ */
866
+ bidStrategy?: (string) | null;
867
+ /**
868
+ * Meta promoted object for this ad set (conversion event details)
869
+ */
870
+ promotedObject?: {
871
+ custom_event_type?: string;
872
+ pixel_id?: string;
873
+ page_id?: string;
874
+ } | null;
802
875
  /**
803
876
  * Individual ads within this ad set (capped at 100). Returns a subset of Ad fields from the aggregation (core fields like _id, name, platform, status, budget, metrics, creative, goal are included; targeting and schedule may be absent).
804
877
  */
@@ -828,6 +901,26 @@ type AdTreeCampaign = {
828
901
  platformAdAccountId?: string;
829
902
  accountId?: string;
830
903
  profileId?: string;
904
+ /**
905
+ * Raw Meta campaign objective (e.g. OUTCOME_SALES, OUTCOME_LEADS, OUTCOME_TRAFFIC)
906
+ */
907
+ platformObjective?: (string) | null;
908
+ /**
909
+ * Meta optimization goal. String if all ad sets share the same goal, array of distinct values if they differ.
910
+ */
911
+ optimizationGoal?: ((string | Array<(string)>) | null);
912
+ /**
913
+ * Campaign-level bid strategy (e.g. LOWEST_COST_WITHOUT_CAP, COST_CAP, LOWEST_COST_WITH_MIN_ROAS)
914
+ */
915
+ bidStrategy?: (string) | null;
916
+ /**
917
+ * Meta promoted object at campaign level (conversion event details)
918
+ */
919
+ promotedObject?: {
920
+ custom_event_type?: string;
921
+ pixel_id?: string;
922
+ page_id?: string;
923
+ } | null;
831
924
  adSets?: Array<AdTreeAdSet>;
832
925
  };
833
926
  type AnalyticsListResponse = {
@@ -10767,7 +10860,13 @@ type UpdateAdData = {
10767
10860
  ageMin?: number;
10768
10861
  ageMax?: number;
10769
10862
  countries?: Array<(string)>;
10770
- interests?: Array<(string)>;
10863
+ /**
10864
+ * Interest objects from /v1/ads/interests. Each must include id and name.
10865
+ */
10866
+ interests?: Array<{
10867
+ id: string;
10868
+ name: string;
10869
+ }>;
10771
10870
  };
10772
10871
  name?: string;
10773
10872
  };
@@ -10895,7 +10994,13 @@ type BoostPostData = {
10895
10994
  ageMin?: number;
10896
10995
  ageMax?: number;
10897
10996
  countries?: Array<(string)>;
10898
- interests?: Array<(string)>;
10997
+ /**
10998
+ * Interest objects from /v1/ads/interests. Each must include id and name.
10999
+ */
11000
+ interests?: Array<{
11001
+ id: string;
11002
+ name: string;
11003
+ }>;
10899
11004
  };
10900
11005
  /**
10901
11006
  * Max bid cap (Meta only)
@@ -10962,7 +11067,13 @@ type CreateStandaloneAdData = {
10962
11067
  countries?: Array<(string)>;
10963
11068
  ageMin?: number;
10964
11069
  ageMax?: number;
10965
- interests?: Array<(string)>;
11070
+ /**
11071
+ * Interest objects from /v1/ads/interests. Each must include id and name.
11072
+ */
11073
+ interests?: Array<{
11074
+ id: string;
11075
+ name: string;
11076
+ }>;
10966
11077
  /**
10967
11078
  * Required for lifetime budgets
10968
11079
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zernio/node",
3
- "version": "0.2.57",
3
+ "version": "0.2.59",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -106,6 +106,43 @@ export type Ad = {
106
106
  platformAdSetId?: string;
107
107
  campaignName?: string;
108
108
  adSetName?: string;
109
+ /**
110
+ * Raw Meta campaign objective (e.g. OUTCOME_SALES, OUTCOME_LEADS, OUTCOME_TRAFFIC). Only present for Meta ads.
111
+ */
112
+ platformObjective?: (string) | null;
113
+ /**
114
+ * Meta ad set optimization goal (e.g. OFFSITE_CONVERSIONS, VALUE, LEAD_GENERATION, LINK_CLICKS). Only present for Meta ads.
115
+ */
116
+ optimizationGoal?: (string) | null;
117
+ /**
118
+ * Bid strategy (e.g. LOWEST_COST_WITHOUT_CAP, COST_CAP, LOWEST_COST_WITH_MIN_ROAS). Ad set level overrides campaign level. Only present for Meta ads.
119
+ */
120
+ bidStrategy?: (string) | null;
121
+ /**
122
+ * Meta promoted object containing conversion event details. Structure varies by objective. Only present for Meta ads.
123
+ */
124
+ promotedObject?: {
125
+ /**
126
+ * Conversion event type (e.g. PURCHASE, LEAD, COMPLETE_REGISTRATION, ADD_TO_CART)
127
+ */
128
+ custom_event_type?: string;
129
+ /**
130
+ * Meta pixel ID
131
+ */
132
+ pixel_id?: string;
133
+ /**
134
+ * Facebook page ID
135
+ */
136
+ page_id?: string;
137
+ /**
138
+ * Facebook app ID
139
+ */
140
+ application_id?: string;
141
+ /**
142
+ * Product catalog set ID
143
+ */
144
+ product_set_id?: string;
145
+ } | null;
109
146
  /**
110
147
  * Platform-specific creative data. Fields vary by platform.
111
148
  */
@@ -193,6 +230,26 @@ export type AdCampaign = {
193
230
  platformAdAccountId?: string;
194
231
  accountId?: string;
195
232
  profileId?: string;
233
+ /**
234
+ * Raw Meta campaign objective (e.g. OUTCOME_SALES, OUTCOME_LEADS, OUTCOME_TRAFFIC)
235
+ */
236
+ platformObjective?: (string) | null;
237
+ /**
238
+ * Meta optimization goal. String if all ad sets share the same goal, array of distinct values if they differ.
239
+ */
240
+ optimizationGoal?: ((string | Array<(string)>) | null);
241
+ /**
242
+ * Campaign-level bid strategy (e.g. LOWEST_COST_WITHOUT_CAP, COST_CAP, LOWEST_COST_WITH_MIN_ROAS)
243
+ */
244
+ bidStrategy?: (string) | null;
245
+ /**
246
+ * Meta promoted object at campaign level (conversion event details)
247
+ */
248
+ promotedObject?: {
249
+ custom_event_type?: string;
250
+ pixel_id?: string;
251
+ page_id?: string;
252
+ } | null;
196
253
  earliestAd?: string;
197
254
  latestAd?: string;
198
255
  };
@@ -237,6 +294,22 @@ export type AdTreeAdSet = {
237
294
  type?: 'daily' | 'lifetime';
238
295
  } | null;
239
296
  metrics?: AdMetrics;
297
+ /**
298
+ * Meta ad set optimization goal (e.g. OFFSITE_CONVERSIONS, VALUE, LEAD_GENERATION)
299
+ */
300
+ optimizationGoal?: (string) | null;
301
+ /**
302
+ * Bid strategy for this ad set (overrides campaign level when set)
303
+ */
304
+ bidStrategy?: (string) | null;
305
+ /**
306
+ * Meta promoted object for this ad set (conversion event details)
307
+ */
308
+ promotedObject?: {
309
+ custom_event_type?: string;
310
+ pixel_id?: string;
311
+ page_id?: string;
312
+ } | null;
240
313
  /**
241
314
  * Individual ads within this ad set (capped at 100). Returns a subset of Ad fields from the aggregation (core fields like _id, name, platform, status, budget, metrics, creative, goal are included; targeting and schedule may be absent).
242
315
  */
@@ -267,6 +340,26 @@ export type AdTreeCampaign = {
267
340
  platformAdAccountId?: string;
268
341
  accountId?: string;
269
342
  profileId?: string;
343
+ /**
344
+ * Raw Meta campaign objective (e.g. OUTCOME_SALES, OUTCOME_LEADS, OUTCOME_TRAFFIC)
345
+ */
346
+ platformObjective?: (string) | null;
347
+ /**
348
+ * Meta optimization goal. String if all ad sets share the same goal, array of distinct values if they differ.
349
+ */
350
+ optimizationGoal?: ((string | Array<(string)>) | null);
351
+ /**
352
+ * Campaign-level bid strategy (e.g. LOWEST_COST_WITHOUT_CAP, COST_CAP, LOWEST_COST_WITH_MIN_ROAS)
353
+ */
354
+ bidStrategy?: (string) | null;
355
+ /**
356
+ * Meta promoted object at campaign level (conversion event details)
357
+ */
358
+ promotedObject?: {
359
+ custom_event_type?: string;
360
+ pixel_id?: string;
361
+ page_id?: string;
362
+ } | null;
270
363
  adSets?: Array<AdTreeAdSet>;
271
364
  };
272
365
 
@@ -11043,7 +11136,13 @@ export type UpdateAdData = {
11043
11136
  ageMin?: number;
11044
11137
  ageMax?: number;
11045
11138
  countries?: Array<(string)>;
11046
- interests?: Array<(string)>;
11139
+ /**
11140
+ * Interest objects from /v1/ads/interests. Each must include id and name.
11141
+ */
11142
+ interests?: Array<{
11143
+ id: string;
11144
+ name: string;
11145
+ }>;
11047
11146
  };
11048
11147
  name?: string;
11049
11148
  };
@@ -11183,7 +11282,13 @@ export type BoostPostData = {
11183
11282
  ageMin?: number;
11184
11283
  ageMax?: number;
11185
11284
  countries?: Array<(string)>;
11186
- interests?: Array<(string)>;
11285
+ /**
11286
+ * Interest objects from /v1/ads/interests. Each must include id and name.
11287
+ */
11288
+ interests?: Array<{
11289
+ id: string;
11290
+ name: string;
11291
+ }>;
11187
11292
  };
11188
11293
  /**
11189
11294
  * Max bid cap (Meta only)
@@ -11253,7 +11358,13 @@ export type CreateStandaloneAdData = {
11253
11358
  countries?: Array<(string)>;
11254
11359
  ageMin?: number;
11255
11360
  ageMax?: number;
11256
- interests?: Array<(string)>;
11361
+ /**
11362
+ * Interest objects from /v1/ads/interests. Each must include id and name.
11363
+ */
11364
+ interests?: Array<{
11365
+ id: string;
11366
+ name: string;
11367
+ }>;
11257
11368
  /**
11258
11369
  * Required for lifetime budgets
11259
11370
  */