@zernio/node 0.2.1005 → 0.2.1007

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
@@ -5659,6 +5659,13 @@ type actionSource = 'web' | 'app' | 'offline' | 'crm' | 'phone_call' | 'system_g
5659
5659
  * The route enforces this at the Zod boundary; OpenAPI's
5660
5660
  * `required` cannot express the OR cleanly.
5661
5661
  *
5662
+ * Campaign, ad set and targeting fields match POST /v1/ads/create on
5663
+ * Meta and run through the same builders: the full targeting set
5664
+ * (including `rawTargeting`, `languages`, `gender`, exclusions and
5665
+ * `savedTargetingId`), `budgetLevel` (campaign budget), `startDate` /
5666
+ * `endDate` in the ad account timezone, and `existingCampaignId` to add
5667
+ * a new ad set to a campaign you already have.
5668
+ *
5662
5669
  */
5663
5670
  type CtwaAdRequestBody = {
5664
5671
  /**
@@ -5723,6 +5730,17 @@ type CtwaAdRequestBody = {
5723
5730
  *
5724
5731
  */
5725
5732
  body?: string;
5733
+ /**
5734
+ * Link description, independent of `headline` and `body` (Meta's
5735
+ * `link_data.description`, `video_data.link_description` on video,
5736
+ * and the shared description of a `placementAssets` feed). Meta
5737
+ * shows it mainly on Facebook Feed placements, under the headline,
5738
+ * when there is room; Instagram, Stories, Reels and Messenger
5739
+ * placements do not display it. Also accepted per entry in
5740
+ * `creatives[]`. Not allowed with an existing post creative.
5741
+ *
5742
+ */
5743
+ description?: string;
5726
5744
  /**
5727
5745
  * Image asset for single-creative shape. Mutually exclusive
5728
5746
  * with `video` and with `creatives[]`. Required on the
@@ -5871,21 +5889,47 @@ type CtwaAdRequestBody = {
5871
5889
  * Attach the creatives to this EXISTING messaging ad set instead of
5872
5890
  * building a campaign, so the ad set keeps its learning phase. It then
5873
5891
  * owns budget, targeting and schedule, so `budgetAmount`, `budgetType`,
5874
- * `endDate`, `objective`, `countries`, `interests`, `audienceId` and
5875
- * `campaignStatus` are rejected with a 400 alongside it. Its
5892
+ * `budgetLevel`, `startDate`, `endDate`, `objective`, `campaignStatus`,
5893
+ * `existingCampaignId`, the special ad category fields and every
5894
+ * targeting field except `ageMin`, `ageMax`, `placements` and
5895
+ * `advantageAudience` are rejected with a 400 alongside it. Its
5876
5896
  * `destination_type` must match the ad's destination.
5877
5897
  *
5878
5898
  */
5879
5899
  adSetId?: string;
5900
+ /**
5901
+ * Create the new messaging ad set (and its ads) under this EXISTING
5902
+ * Meta campaign instead of a new one, e.g. several audience ad sets
5903
+ * under one campaign. The campaign's objective must be
5904
+ * OUTCOME_ENGAGEMENT, OUTCOME_SALES or OUTCOME_LEADS (400 otherwise).
5905
+ * If the campaign has a campaign budget, omit `budgetAmount` and
5906
+ * `budgetType` (400 if sent); otherwise they are required and land
5907
+ * on the new ad set. `objective`, `campaignName`, `campaignStatus`,
5908
+ * `budgetLevel`, `specialAdCategories`, `specialAdCategoryCountry`
5909
+ * and `adSetId` are rejected alongside it. To add ads to an existing
5910
+ * ad set instead, use `adSetId`.
5911
+ *
5912
+ */
5913
+ existingCampaignId?: string;
5914
+ /**
5915
+ * Where the budget lives. `adset` (default) puts it on the new ad
5916
+ * set. `campaign` creates an Advantage campaign budget (CBO): the
5917
+ * budget and bid strategy sit on the campaign and the ad set
5918
+ * inherits them, same as POST /v1/ads/create. Not allowed with
5919
+ * `adSetId` or `existingCampaignId`.
5920
+ *
5921
+ */
5922
+ budgetLevel?: 'adset' | 'campaign';
5880
5923
  /**
5881
5924
  * Budget amount in the ad account's currency major units
5882
5925
  * (e.g. dollars for USD, not cents). Must be > 0.
5883
- * Required unless `adSetId` is set, where the ad set owns it.
5926
+ * Required unless `adSetId` is set (the ad set owns it) or
5927
+ * `existingCampaignId` names a campaign with a campaign budget.
5884
5928
  *
5885
5929
  */
5886
5930
  budgetAmount?: number;
5887
5931
  /**
5888
- * Required unless `adSetId` is set.
5932
+ * Required unless `adSetId` is set or `existingCampaignId` names a campaign with a campaign budget. `lifetime` requires `endDate`.
5889
5933
  */
5890
5934
  budgetType?: 'daily' | 'lifetime';
5891
5935
  /**
@@ -5899,7 +5943,18 @@ type CtwaAdRequestBody = {
5899
5943
  */
5900
5944
  currency?: string;
5901
5945
  /**
5902
- * ISO 8601 datetime. Required when `budgetType` is `lifetime`.
5946
+ * When the ad set starts delivering. ISO 8601 date or date-time. A
5947
+ * value with an offset (`2027-01-15T10:00:00+01:00`, `...Z`) is used
5948
+ * as is; one without an offset (`2027-01-15T10:00:00`) is read in the
5949
+ * ad account's timezone, and a date-only value starts at 00:00 local.
5950
+ * Defaults to now.
5951
+ *
5952
+ */
5953
+ startDate?: string;
5954
+ /**
5955
+ * ISO 8601 date or date-time, read like `startDate`; a date-only
5956
+ * value ends at 23:59:59 local. Required when `budgetType` is
5957
+ * `lifetime`.
5903
5958
  *
5904
5959
  */
5905
5960
  endDate?: string;
@@ -6011,6 +6066,101 @@ type CtwaAdRequestBody = {
6011
6066
  */
6012
6067
  devicePlatforms?: Array<('mobile' | 'desktop')>;
6013
6068
  };
6069
+ /**
6070
+ * Restrict the audience by gender (Meta `genders`). Stored on the ad and read back in `targeting.gender`.
6071
+ */
6072
+ gender?: 'all' | 'male' | 'female';
6073
+ /**
6074
+ * Audience languages (Meta `locales`). A bare ISO 639-1 code targets all regional variants ("en" = all English), a region-qualified code a specific one ("en_GB", "pt_BR"); unknown codes are rejected.
6075
+ */
6076
+ languages?: Array<(string)>;
6077
+ /**
6078
+ * Meta place keys (from GET /v1/ads/targeting/search).
6079
+ */
6080
+ places?: Array<{
6081
+ key: string;
6082
+ }>;
6083
+ /**
6084
+ * Meta neighborhood keys (from GET /v1/ads/targeting/search).
6085
+ */
6086
+ neighborhoods?: Array<{
6087
+ key: string;
6088
+ }>;
6089
+ /**
6090
+ * Geo to exclude, same shape as POST /v1/ads/create (countries, countryGroups, regions, cities, zips, places, neighborhoods, customLocations).
6091
+ */
6092
+ excludedLocations?: {
6093
+ [key: string]: unknown;
6094
+ };
6095
+ /**
6096
+ * Meta behavior ids. Each dimension is its own flexible_spec entry: OR within, AND across.
6097
+ */
6098
+ behaviors?: Array<{
6099
+ id: string;
6100
+ name?: string;
6101
+ }>;
6102
+ workPositions?: Array<{
6103
+ id: string;
6104
+ name?: string;
6105
+ }>;
6106
+ workEmployers?: Array<{
6107
+ id: string;
6108
+ name?: string;
6109
+ }>;
6110
+ workIndustries?: Array<{
6111
+ id: string;
6112
+ name?: string;
6113
+ }>;
6114
+ /**
6115
+ * Normalized household-income tier, same as POST /v1/ads/create. Incompatible with housing, employment and credit specialAdCategories.
6116
+ */
6117
+ incomeTier?: 'top_5' | 'top_10' | 'top_10_25' | 'top_25_50';
6118
+ /**
6119
+ * Meta `user_os`, e.g. ["iOS_ver_14.0_and_above"].
6120
+ */
6121
+ userOs?: Array<(string)>;
6122
+ /**
6123
+ * Meta `user_device`.
6124
+ */
6125
+ userDevice?: Array<(string)>;
6126
+ /**
6127
+ * Custom or lookalike audience ids to include.
6128
+ */
6129
+ audienceInclude?: Array<(string)>;
6130
+ /**
6131
+ * Custom or lookalike audience ids to exclude.
6132
+ */
6133
+ audienceExclude?: Array<(string)>;
6134
+ /**
6135
+ * ID of a saved_targeting audience (POST /v1/ads/audiences), expanded as the base targeting. Precedence: savedTargetingId, then `targeting`, then the flat fields.
6136
+ */
6137
+ savedTargetingId?: string;
6138
+ /**
6139
+ * Nested targeting object, same contract as POST /v1/ads/create and boost. Flat fields win per key.
6140
+ */
6141
+ targeting?: TargetingSpec;
6142
+ /**
6143
+ * Meta targeting spec sent as the BASE layer of the ad set's
6144
+ * `targeting`, exactly as POST /v1/ads/create does: use it for
6145
+ * anything the flat fields cannot express, such as a layered
6146
+ * `flexible_spec` (entries AND together, ids inside one entry OR).
6147
+ * Flat fields you also send are layered on top and win per key.
6148
+ * With rawTargeting present the US geo and `advantage_audience: 0`
6149
+ * defaults are not injected, so include `targeting_automation` in
6150
+ * it (or send `advantageAudience`), as Meta requires it on create.
6151
+ *
6152
+ */
6153
+ rawTargeting?: {
6154
+ [key: string]: unknown;
6155
+ };
6156
+ /**
6157
+ * Meta special ad categories on the new campaign.
6158
+ */
6159
+ specialAdCategories?: Array<('HOUSING' | 'EMPLOYMENT' | 'CREDIT' | 'ISSUES_ELECTIONS_POLITICS' | 'FINANCIAL_PRODUCTS_SERVICES' | 'ONLINE_GAMBLING_AND_GAMING')>;
6160
+ /**
6161
+ * Countries the special ad category applies to. Requires specialAdCategories.
6162
+ */
6163
+ specialAdCategoryCountry?: Array<(string)>;
6014
6164
  /**
6015
6165
  * Meta's Advantage+ audience expansion. `0` (default) keeps
6016
6166
  * targeting strict; `1` lets Meta expand beyond the supplied
@@ -6108,9 +6258,17 @@ type CtwaAdRequestBody = {
6108
6258
  };
6109
6259
  };
6110
6260
  /**
6111
- * Required unless `adSetId` is set.
6261
+ * Required unless `adSetId` is set or `existingCampaignId` names a campaign with a campaign budget. `lifetime` requires `endDate`.
6112
6262
  */
6113
6263
  type budgetType = 'daily' | 'lifetime';
6264
+ /**
6265
+ * Restrict the audience by gender (Meta `genders`). Stored on the ad and read back in `targeting.gender`.
6266
+ */
6267
+ type gender = 'all' | 'male' | 'female';
6268
+ /**
6269
+ * Normalized household-income tier, same as POST /v1/ads/create. Incompatible with housing, employment and credit specialAdCategories.
6270
+ */
6271
+ type incomeTier = 'top_5' | 'top_10' | 'top_10_25' | 'top_25_50';
6114
6272
  /**
6115
6273
  * Meta's Advantage+ audience expansion. `0` (default) keeps
6116
6274
  * targeting strict; `1` lets Meta expand beyond the supplied
@@ -9278,7 +9436,7 @@ type MetaCatalogProductInput = {
9278
9436
  type availability = 'in stock' | 'out of stock' | 'preorder' | 'available for order' | 'discontinued' | 'pending';
9279
9437
  type condition2 = 'new' | 'refurbished' | 'used';
9280
9438
  type visibility = 'published' | 'staging';
9281
- type gender = 'female' | 'male' | 'unisex';
9439
+ type gender2 = 'female' | 'male' | 'unisex';
9282
9440
  /**
9283
9441
  * Meta Advantage+ creative enhancements. Map snake_case feature names to OPT_IN or OPT_OUT; Meta validates supported keys and unspecified features default to OPT_OUT. auto_promotion_tag is an Advantage+ enhancement, not the Ads Manager Promotion setting. The deprecated standard_enhancements bundle is rejected by Meta.
9284
9442
  */
@@ -11460,19 +11618,6 @@ type TargetingSpec = {
11460
11618
  */
11461
11619
  audienceExclude?: Array<(string)>;
11462
11620
  };
11463
- /**
11464
- * Restrict by gender. 'all' (default) targets everyone. Applied on Meta, TikTok and Pinterest. Ignored on Google, LinkedIn and X.
11465
- */
11466
- type gender2 = 'all' | 'male' | 'female';
11467
- /**
11468
- * Normalized household-income tier (ZIP/percentile based). Meta and TikTok
11469
- * express all four. Google maps only `top_10` (its INCOME_RANGE_90_UP); other
11470
- * tiers on Google, and any income tier on LinkedIn / X / Pinterest, are rejected.
11471
- * On Meta, income/zip targeting requires the relevant `specialAdCategories` to be
11472
- * unset (housing/employment/credit ads cannot use it).
11473
- *
11474
- */
11475
- type incomeTier = 'top_5' | 'top_10' | 'top_10_25' | 'top_25_50';
11476
11621
  /**
11477
11622
  * Text, images (up to 10), videos (up to 10), and mixed media albums. Captions up to 1024 chars for media, 4096 for text-only.
11478
11623
  */
package/dist/index.d.ts CHANGED
@@ -5659,6 +5659,13 @@ type actionSource = 'web' | 'app' | 'offline' | 'crm' | 'phone_call' | 'system_g
5659
5659
  * The route enforces this at the Zod boundary; OpenAPI's
5660
5660
  * `required` cannot express the OR cleanly.
5661
5661
  *
5662
+ * Campaign, ad set and targeting fields match POST /v1/ads/create on
5663
+ * Meta and run through the same builders: the full targeting set
5664
+ * (including `rawTargeting`, `languages`, `gender`, exclusions and
5665
+ * `savedTargetingId`), `budgetLevel` (campaign budget), `startDate` /
5666
+ * `endDate` in the ad account timezone, and `existingCampaignId` to add
5667
+ * a new ad set to a campaign you already have.
5668
+ *
5662
5669
  */
5663
5670
  type CtwaAdRequestBody = {
5664
5671
  /**
@@ -5723,6 +5730,17 @@ type CtwaAdRequestBody = {
5723
5730
  *
5724
5731
  */
5725
5732
  body?: string;
5733
+ /**
5734
+ * Link description, independent of `headline` and `body` (Meta's
5735
+ * `link_data.description`, `video_data.link_description` on video,
5736
+ * and the shared description of a `placementAssets` feed). Meta
5737
+ * shows it mainly on Facebook Feed placements, under the headline,
5738
+ * when there is room; Instagram, Stories, Reels and Messenger
5739
+ * placements do not display it. Also accepted per entry in
5740
+ * `creatives[]`. Not allowed with an existing post creative.
5741
+ *
5742
+ */
5743
+ description?: string;
5726
5744
  /**
5727
5745
  * Image asset for single-creative shape. Mutually exclusive
5728
5746
  * with `video` and with `creatives[]`. Required on the
@@ -5871,21 +5889,47 @@ type CtwaAdRequestBody = {
5871
5889
  * Attach the creatives to this EXISTING messaging ad set instead of
5872
5890
  * building a campaign, so the ad set keeps its learning phase. It then
5873
5891
  * owns budget, targeting and schedule, so `budgetAmount`, `budgetType`,
5874
- * `endDate`, `objective`, `countries`, `interests`, `audienceId` and
5875
- * `campaignStatus` are rejected with a 400 alongside it. Its
5892
+ * `budgetLevel`, `startDate`, `endDate`, `objective`, `campaignStatus`,
5893
+ * `existingCampaignId`, the special ad category fields and every
5894
+ * targeting field except `ageMin`, `ageMax`, `placements` and
5895
+ * `advantageAudience` are rejected with a 400 alongside it. Its
5876
5896
  * `destination_type` must match the ad's destination.
5877
5897
  *
5878
5898
  */
5879
5899
  adSetId?: string;
5900
+ /**
5901
+ * Create the new messaging ad set (and its ads) under this EXISTING
5902
+ * Meta campaign instead of a new one, e.g. several audience ad sets
5903
+ * under one campaign. The campaign's objective must be
5904
+ * OUTCOME_ENGAGEMENT, OUTCOME_SALES or OUTCOME_LEADS (400 otherwise).
5905
+ * If the campaign has a campaign budget, omit `budgetAmount` and
5906
+ * `budgetType` (400 if sent); otherwise they are required and land
5907
+ * on the new ad set. `objective`, `campaignName`, `campaignStatus`,
5908
+ * `budgetLevel`, `specialAdCategories`, `specialAdCategoryCountry`
5909
+ * and `adSetId` are rejected alongside it. To add ads to an existing
5910
+ * ad set instead, use `adSetId`.
5911
+ *
5912
+ */
5913
+ existingCampaignId?: string;
5914
+ /**
5915
+ * Where the budget lives. `adset` (default) puts it on the new ad
5916
+ * set. `campaign` creates an Advantage campaign budget (CBO): the
5917
+ * budget and bid strategy sit on the campaign and the ad set
5918
+ * inherits them, same as POST /v1/ads/create. Not allowed with
5919
+ * `adSetId` or `existingCampaignId`.
5920
+ *
5921
+ */
5922
+ budgetLevel?: 'adset' | 'campaign';
5880
5923
  /**
5881
5924
  * Budget amount in the ad account's currency major units
5882
5925
  * (e.g. dollars for USD, not cents). Must be > 0.
5883
- * Required unless `adSetId` is set, where the ad set owns it.
5926
+ * Required unless `adSetId` is set (the ad set owns it) or
5927
+ * `existingCampaignId` names a campaign with a campaign budget.
5884
5928
  *
5885
5929
  */
5886
5930
  budgetAmount?: number;
5887
5931
  /**
5888
- * Required unless `adSetId` is set.
5932
+ * Required unless `adSetId` is set or `existingCampaignId` names a campaign with a campaign budget. `lifetime` requires `endDate`.
5889
5933
  */
5890
5934
  budgetType?: 'daily' | 'lifetime';
5891
5935
  /**
@@ -5899,7 +5943,18 @@ type CtwaAdRequestBody = {
5899
5943
  */
5900
5944
  currency?: string;
5901
5945
  /**
5902
- * ISO 8601 datetime. Required when `budgetType` is `lifetime`.
5946
+ * When the ad set starts delivering. ISO 8601 date or date-time. A
5947
+ * value with an offset (`2027-01-15T10:00:00+01:00`, `...Z`) is used
5948
+ * as is; one without an offset (`2027-01-15T10:00:00`) is read in the
5949
+ * ad account's timezone, and a date-only value starts at 00:00 local.
5950
+ * Defaults to now.
5951
+ *
5952
+ */
5953
+ startDate?: string;
5954
+ /**
5955
+ * ISO 8601 date or date-time, read like `startDate`; a date-only
5956
+ * value ends at 23:59:59 local. Required when `budgetType` is
5957
+ * `lifetime`.
5903
5958
  *
5904
5959
  */
5905
5960
  endDate?: string;
@@ -6011,6 +6066,101 @@ type CtwaAdRequestBody = {
6011
6066
  */
6012
6067
  devicePlatforms?: Array<('mobile' | 'desktop')>;
6013
6068
  };
6069
+ /**
6070
+ * Restrict the audience by gender (Meta `genders`). Stored on the ad and read back in `targeting.gender`.
6071
+ */
6072
+ gender?: 'all' | 'male' | 'female';
6073
+ /**
6074
+ * Audience languages (Meta `locales`). A bare ISO 639-1 code targets all regional variants ("en" = all English), a region-qualified code a specific one ("en_GB", "pt_BR"); unknown codes are rejected.
6075
+ */
6076
+ languages?: Array<(string)>;
6077
+ /**
6078
+ * Meta place keys (from GET /v1/ads/targeting/search).
6079
+ */
6080
+ places?: Array<{
6081
+ key: string;
6082
+ }>;
6083
+ /**
6084
+ * Meta neighborhood keys (from GET /v1/ads/targeting/search).
6085
+ */
6086
+ neighborhoods?: Array<{
6087
+ key: string;
6088
+ }>;
6089
+ /**
6090
+ * Geo to exclude, same shape as POST /v1/ads/create (countries, countryGroups, regions, cities, zips, places, neighborhoods, customLocations).
6091
+ */
6092
+ excludedLocations?: {
6093
+ [key: string]: unknown;
6094
+ };
6095
+ /**
6096
+ * Meta behavior ids. Each dimension is its own flexible_spec entry: OR within, AND across.
6097
+ */
6098
+ behaviors?: Array<{
6099
+ id: string;
6100
+ name?: string;
6101
+ }>;
6102
+ workPositions?: Array<{
6103
+ id: string;
6104
+ name?: string;
6105
+ }>;
6106
+ workEmployers?: Array<{
6107
+ id: string;
6108
+ name?: string;
6109
+ }>;
6110
+ workIndustries?: Array<{
6111
+ id: string;
6112
+ name?: string;
6113
+ }>;
6114
+ /**
6115
+ * Normalized household-income tier, same as POST /v1/ads/create. Incompatible with housing, employment and credit specialAdCategories.
6116
+ */
6117
+ incomeTier?: 'top_5' | 'top_10' | 'top_10_25' | 'top_25_50';
6118
+ /**
6119
+ * Meta `user_os`, e.g. ["iOS_ver_14.0_and_above"].
6120
+ */
6121
+ userOs?: Array<(string)>;
6122
+ /**
6123
+ * Meta `user_device`.
6124
+ */
6125
+ userDevice?: Array<(string)>;
6126
+ /**
6127
+ * Custom or lookalike audience ids to include.
6128
+ */
6129
+ audienceInclude?: Array<(string)>;
6130
+ /**
6131
+ * Custom or lookalike audience ids to exclude.
6132
+ */
6133
+ audienceExclude?: Array<(string)>;
6134
+ /**
6135
+ * ID of a saved_targeting audience (POST /v1/ads/audiences), expanded as the base targeting. Precedence: savedTargetingId, then `targeting`, then the flat fields.
6136
+ */
6137
+ savedTargetingId?: string;
6138
+ /**
6139
+ * Nested targeting object, same contract as POST /v1/ads/create and boost. Flat fields win per key.
6140
+ */
6141
+ targeting?: TargetingSpec;
6142
+ /**
6143
+ * Meta targeting spec sent as the BASE layer of the ad set's
6144
+ * `targeting`, exactly as POST /v1/ads/create does: use it for
6145
+ * anything the flat fields cannot express, such as a layered
6146
+ * `flexible_spec` (entries AND together, ids inside one entry OR).
6147
+ * Flat fields you also send are layered on top and win per key.
6148
+ * With rawTargeting present the US geo and `advantage_audience: 0`
6149
+ * defaults are not injected, so include `targeting_automation` in
6150
+ * it (or send `advantageAudience`), as Meta requires it on create.
6151
+ *
6152
+ */
6153
+ rawTargeting?: {
6154
+ [key: string]: unknown;
6155
+ };
6156
+ /**
6157
+ * Meta special ad categories on the new campaign.
6158
+ */
6159
+ specialAdCategories?: Array<('HOUSING' | 'EMPLOYMENT' | 'CREDIT' | 'ISSUES_ELECTIONS_POLITICS' | 'FINANCIAL_PRODUCTS_SERVICES' | 'ONLINE_GAMBLING_AND_GAMING')>;
6160
+ /**
6161
+ * Countries the special ad category applies to. Requires specialAdCategories.
6162
+ */
6163
+ specialAdCategoryCountry?: Array<(string)>;
6014
6164
  /**
6015
6165
  * Meta's Advantage+ audience expansion. `0` (default) keeps
6016
6166
  * targeting strict; `1` lets Meta expand beyond the supplied
@@ -6108,9 +6258,17 @@ type CtwaAdRequestBody = {
6108
6258
  };
6109
6259
  };
6110
6260
  /**
6111
- * Required unless `adSetId` is set.
6261
+ * Required unless `adSetId` is set or `existingCampaignId` names a campaign with a campaign budget. `lifetime` requires `endDate`.
6112
6262
  */
6113
6263
  type budgetType = 'daily' | 'lifetime';
6264
+ /**
6265
+ * Restrict the audience by gender (Meta `genders`). Stored on the ad and read back in `targeting.gender`.
6266
+ */
6267
+ type gender = 'all' | 'male' | 'female';
6268
+ /**
6269
+ * Normalized household-income tier, same as POST /v1/ads/create. Incompatible with housing, employment and credit specialAdCategories.
6270
+ */
6271
+ type incomeTier = 'top_5' | 'top_10' | 'top_10_25' | 'top_25_50';
6114
6272
  /**
6115
6273
  * Meta's Advantage+ audience expansion. `0` (default) keeps
6116
6274
  * targeting strict; `1` lets Meta expand beyond the supplied
@@ -9278,7 +9436,7 @@ type MetaCatalogProductInput = {
9278
9436
  type availability = 'in stock' | 'out of stock' | 'preorder' | 'available for order' | 'discontinued' | 'pending';
9279
9437
  type condition2 = 'new' | 'refurbished' | 'used';
9280
9438
  type visibility = 'published' | 'staging';
9281
- type gender = 'female' | 'male' | 'unisex';
9439
+ type gender2 = 'female' | 'male' | 'unisex';
9282
9440
  /**
9283
9441
  * Meta Advantage+ creative enhancements. Map snake_case feature names to OPT_IN or OPT_OUT; Meta validates supported keys and unspecified features default to OPT_OUT. auto_promotion_tag is an Advantage+ enhancement, not the Ads Manager Promotion setting. The deprecated standard_enhancements bundle is rejected by Meta.
9284
9442
  */
@@ -11460,19 +11618,6 @@ type TargetingSpec = {
11460
11618
  */
11461
11619
  audienceExclude?: Array<(string)>;
11462
11620
  };
11463
- /**
11464
- * Restrict by gender. 'all' (default) targets everyone. Applied on Meta, TikTok and Pinterest. Ignored on Google, LinkedIn and X.
11465
- */
11466
- type gender2 = 'all' | 'male' | 'female';
11467
- /**
11468
- * Normalized household-income tier (ZIP/percentile based). Meta and TikTok
11469
- * express all four. Google maps only `top_10` (its INCOME_RANGE_90_UP); other
11470
- * tiers on Google, and any income tier on LinkedIn / X / Pinterest, are rejected.
11471
- * On Meta, income/zip targeting requires the relevant `specialAdCategories` to be
11472
- * unset (housing/employment/credit ads cannot use it).
11473
- *
11474
- */
11475
- type incomeTier = 'top_5' | 'top_10' | 'top_10_25' | 'top_25_50';
11476
11621
  /**
11477
11622
  * Text, images (up to 10), videos (up to 10), and mixed media albums. Captions up to 1024 chars for media, 4096 for text-only.
11478
11623
  */
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.1005",
39
+ version: "0.2.1007",
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.1005",
8
+ version: "0.2.1007",
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.1005",
3
+ "version": "0.2.1007",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -14334,8 +14334,8 @@ export const updateTrackingTagEvent = <ThrowOnError extends boolean = false>(opt
14334
14334
  * Pinterest (platform `pinterestads`): stops Pinterest tracking the event name (`state:
14335
14335
  * disabled`); Pinterest keeps the event's history.
14336
14336
  *
14337
- * TikTok: hard delete (`/pixel/event/delete/`); TikTok refuses events bound to an ad group
14338
- * (400).
14337
+ * TikTok Ads answers 501: TikTok's `/pixel/event/delete/` answers OK but leaves the event on
14338
+ * the pixel, so nothing is deleted. Delete the event in TikTok Events Manager.
14339
14339
  *
14340
14340
  * X Ads (platform `xads`): deletes the web event tag for good. Events X auto-created with
14341
14341
  * the pixel cannot be deleted (400). X keeps the event's own website tag id on the account
@@ -3868,6 +3868,13 @@ export type actionSource = 'web' | 'app' | 'offline' | 'crm' | 'phone_call' | 's
3868
3868
  * The route enforces this at the Zod boundary; OpenAPI's
3869
3869
  * `required` cannot express the OR cleanly.
3870
3870
  *
3871
+ * Campaign, ad set and targeting fields match POST /v1/ads/create on
3872
+ * Meta and run through the same builders: the full targeting set
3873
+ * (including `rawTargeting`, `languages`, `gender`, exclusions and
3874
+ * `savedTargetingId`), `budgetLevel` (campaign budget), `startDate` /
3875
+ * `endDate` in the ad account timezone, and `existingCampaignId` to add
3876
+ * a new ad set to a campaign you already have.
3877
+ *
3871
3878
  */
3872
3879
  export type CtwaAdRequestBody = {
3873
3880
  /**
@@ -3932,6 +3939,17 @@ export type CtwaAdRequestBody = {
3932
3939
  *
3933
3940
  */
3934
3941
  body?: string;
3942
+ /**
3943
+ * Link description, independent of `headline` and `body` (Meta's
3944
+ * `link_data.description`, `video_data.link_description` on video,
3945
+ * and the shared description of a `placementAssets` feed). Meta
3946
+ * shows it mainly on Facebook Feed placements, under the headline,
3947
+ * when there is room; Instagram, Stories, Reels and Messenger
3948
+ * placements do not display it. Also accepted per entry in
3949
+ * `creatives[]`. Not allowed with an existing post creative.
3950
+ *
3951
+ */
3952
+ description?: string;
3935
3953
  /**
3936
3954
  * Image asset for single-creative shape. Mutually exclusive
3937
3955
  * with `video` and with `creatives[]`. Required on the
@@ -4080,21 +4098,47 @@ export type CtwaAdRequestBody = {
4080
4098
  * Attach the creatives to this EXISTING messaging ad set instead of
4081
4099
  * building a campaign, so the ad set keeps its learning phase. It then
4082
4100
  * owns budget, targeting and schedule, so `budgetAmount`, `budgetType`,
4083
- * `endDate`, `objective`, `countries`, `interests`, `audienceId` and
4084
- * `campaignStatus` are rejected with a 400 alongside it. Its
4101
+ * `budgetLevel`, `startDate`, `endDate`, `objective`, `campaignStatus`,
4102
+ * `existingCampaignId`, the special ad category fields and every
4103
+ * targeting field except `ageMin`, `ageMax`, `placements` and
4104
+ * `advantageAudience` are rejected with a 400 alongside it. Its
4085
4105
  * `destination_type` must match the ad's destination.
4086
4106
  *
4087
4107
  */
4088
4108
  adSetId?: string;
4109
+ /**
4110
+ * Create the new messaging ad set (and its ads) under this EXISTING
4111
+ * Meta campaign instead of a new one, e.g. several audience ad sets
4112
+ * under one campaign. The campaign's objective must be
4113
+ * OUTCOME_ENGAGEMENT, OUTCOME_SALES or OUTCOME_LEADS (400 otherwise).
4114
+ * If the campaign has a campaign budget, omit `budgetAmount` and
4115
+ * `budgetType` (400 if sent); otherwise they are required and land
4116
+ * on the new ad set. `objective`, `campaignName`, `campaignStatus`,
4117
+ * `budgetLevel`, `specialAdCategories`, `specialAdCategoryCountry`
4118
+ * and `adSetId` are rejected alongside it. To add ads to an existing
4119
+ * ad set instead, use `adSetId`.
4120
+ *
4121
+ */
4122
+ existingCampaignId?: string;
4123
+ /**
4124
+ * Where the budget lives. `adset` (default) puts it on the new ad
4125
+ * set. `campaign` creates an Advantage campaign budget (CBO): the
4126
+ * budget and bid strategy sit on the campaign and the ad set
4127
+ * inherits them, same as POST /v1/ads/create. Not allowed with
4128
+ * `adSetId` or `existingCampaignId`.
4129
+ *
4130
+ */
4131
+ budgetLevel?: 'adset' | 'campaign';
4089
4132
  /**
4090
4133
  * Budget amount in the ad account's currency major units
4091
4134
  * (e.g. dollars for USD, not cents). Must be > 0.
4092
- * Required unless `adSetId` is set, where the ad set owns it.
4135
+ * Required unless `adSetId` is set (the ad set owns it) or
4136
+ * `existingCampaignId` names a campaign with a campaign budget.
4093
4137
  *
4094
4138
  */
4095
4139
  budgetAmount?: number;
4096
4140
  /**
4097
- * Required unless `adSetId` is set.
4141
+ * Required unless `adSetId` is set or `existingCampaignId` names a campaign with a campaign budget. `lifetime` requires `endDate`.
4098
4142
  */
4099
4143
  budgetType?: 'daily' | 'lifetime';
4100
4144
  /**
@@ -4108,7 +4152,18 @@ export type CtwaAdRequestBody = {
4108
4152
  */
4109
4153
  currency?: string;
4110
4154
  /**
4111
- * ISO 8601 datetime. Required when `budgetType` is `lifetime`.
4155
+ * When the ad set starts delivering. ISO 8601 date or date-time. A
4156
+ * value with an offset (`2027-01-15T10:00:00+01:00`, `...Z`) is used
4157
+ * as is; one without an offset (`2027-01-15T10:00:00`) is read in the
4158
+ * ad account's timezone, and a date-only value starts at 00:00 local.
4159
+ * Defaults to now.
4160
+ *
4161
+ */
4162
+ startDate?: string;
4163
+ /**
4164
+ * ISO 8601 date or date-time, read like `startDate`; a date-only
4165
+ * value ends at 23:59:59 local. Required when `budgetType` is
4166
+ * `lifetime`.
4112
4167
  *
4113
4168
  */
4114
4169
  endDate?: string;
@@ -4220,6 +4275,101 @@ export type CtwaAdRequestBody = {
4220
4275
  */
4221
4276
  devicePlatforms?: Array<('mobile' | 'desktop')>;
4222
4277
  };
4278
+ /**
4279
+ * Restrict the audience by gender (Meta `genders`). Stored on the ad and read back in `targeting.gender`.
4280
+ */
4281
+ gender?: 'all' | 'male' | 'female';
4282
+ /**
4283
+ * Audience languages (Meta `locales`). A bare ISO 639-1 code targets all regional variants ("en" = all English), a region-qualified code a specific one ("en_GB", "pt_BR"); unknown codes are rejected.
4284
+ */
4285
+ languages?: Array<(string)>;
4286
+ /**
4287
+ * Meta place keys (from GET /v1/ads/targeting/search).
4288
+ */
4289
+ places?: Array<{
4290
+ key: string;
4291
+ }>;
4292
+ /**
4293
+ * Meta neighborhood keys (from GET /v1/ads/targeting/search).
4294
+ */
4295
+ neighborhoods?: Array<{
4296
+ key: string;
4297
+ }>;
4298
+ /**
4299
+ * Geo to exclude, same shape as POST /v1/ads/create (countries, countryGroups, regions, cities, zips, places, neighborhoods, customLocations).
4300
+ */
4301
+ excludedLocations?: {
4302
+ [key: string]: unknown;
4303
+ };
4304
+ /**
4305
+ * Meta behavior ids. Each dimension is its own flexible_spec entry: OR within, AND across.
4306
+ */
4307
+ behaviors?: Array<{
4308
+ id: string;
4309
+ name?: string;
4310
+ }>;
4311
+ workPositions?: Array<{
4312
+ id: string;
4313
+ name?: string;
4314
+ }>;
4315
+ workEmployers?: Array<{
4316
+ id: string;
4317
+ name?: string;
4318
+ }>;
4319
+ workIndustries?: Array<{
4320
+ id: string;
4321
+ name?: string;
4322
+ }>;
4323
+ /**
4324
+ * Normalized household-income tier, same as POST /v1/ads/create. Incompatible with housing, employment and credit specialAdCategories.
4325
+ */
4326
+ incomeTier?: 'top_5' | 'top_10' | 'top_10_25' | 'top_25_50';
4327
+ /**
4328
+ * Meta `user_os`, e.g. ["iOS_ver_14.0_and_above"].
4329
+ */
4330
+ userOs?: Array<(string)>;
4331
+ /**
4332
+ * Meta `user_device`.
4333
+ */
4334
+ userDevice?: Array<(string)>;
4335
+ /**
4336
+ * Custom or lookalike audience ids to include.
4337
+ */
4338
+ audienceInclude?: Array<(string)>;
4339
+ /**
4340
+ * Custom or lookalike audience ids to exclude.
4341
+ */
4342
+ audienceExclude?: Array<(string)>;
4343
+ /**
4344
+ * ID of a saved_targeting audience (POST /v1/ads/audiences), expanded as the base targeting. Precedence: savedTargetingId, then `targeting`, then the flat fields.
4345
+ */
4346
+ savedTargetingId?: string;
4347
+ /**
4348
+ * Nested targeting object, same contract as POST /v1/ads/create and boost. Flat fields win per key.
4349
+ */
4350
+ targeting?: TargetingSpec;
4351
+ /**
4352
+ * Meta targeting spec sent as the BASE layer of the ad set's
4353
+ * `targeting`, exactly as POST /v1/ads/create does: use it for
4354
+ * anything the flat fields cannot express, such as a layered
4355
+ * `flexible_spec` (entries AND together, ids inside one entry OR).
4356
+ * Flat fields you also send are layered on top and win per key.
4357
+ * With rawTargeting present the US geo and `advantage_audience: 0`
4358
+ * defaults are not injected, so include `targeting_automation` in
4359
+ * it (or send `advantageAudience`), as Meta requires it on create.
4360
+ *
4361
+ */
4362
+ rawTargeting?: {
4363
+ [key: string]: unknown;
4364
+ };
4365
+ /**
4366
+ * Meta special ad categories on the new campaign.
4367
+ */
4368
+ specialAdCategories?: Array<('HOUSING' | 'EMPLOYMENT' | 'CREDIT' | 'ISSUES_ELECTIONS_POLITICS' | 'FINANCIAL_PRODUCTS_SERVICES' | 'ONLINE_GAMBLING_AND_GAMING')>;
4369
+ /**
4370
+ * Countries the special ad category applies to. Requires specialAdCategories.
4371
+ */
4372
+ specialAdCategoryCountry?: Array<(string)>;
4223
4373
  /**
4224
4374
  * Meta's Advantage+ audience expansion. `0` (default) keeps
4225
4375
  * targeting strict; `1` lets Meta expand beyond the supplied
@@ -4318,10 +4468,20 @@ export type CtwaAdRequestBody = {
4318
4468
  };
4319
4469
 
4320
4470
  /**
4321
- * Required unless `adSetId` is set.
4471
+ * Required unless `adSetId` is set or `existingCampaignId` names a campaign with a campaign budget. `lifetime` requires `endDate`.
4322
4472
  */
4323
4473
  export type budgetType = 'daily' | 'lifetime';
4324
4474
 
4475
+ /**
4476
+ * Restrict the audience by gender (Meta `genders`). Stored on the ad and read back in `targeting.gender`.
4477
+ */
4478
+ export type gender = 'all' | 'male' | 'female';
4479
+
4480
+ /**
4481
+ * Normalized household-income tier, same as POST /v1/ads/create. Incompatible with housing, employment and credit specialAdCategories.
4482
+ */
4483
+ export type incomeTier = 'top_5' | 'top_10' | 'top_10_25' | 'top_25_50';
4484
+
4325
4485
  /**
4326
4486
  * Meta's Advantage+ audience expansion. `0` (default) keeps
4327
4487
  * targeting strict; `1` lets Meta expand beyond the supplied
@@ -7638,7 +7798,7 @@ export type condition2 = 'new' | 'refurbished' | 'used';
7638
7798
 
7639
7799
  export type visibility = 'published' | 'staging';
7640
7800
 
7641
- export type gender = 'female' | 'male' | 'unisex';
7801
+ export type gender2 = 'female' | 'male' | 'unisex';
7642
7802
 
7643
7803
  /**
7644
7804
  * Meta Advantage+ creative enhancements. Map snake_case feature names to OPT_IN or OPT_OUT; Meta validates supported keys and unspecified features default to OPT_OUT. auto_promotion_tag is an Advantage+ enhancement, not the Ads Manager Promotion setting. The deprecated standard_enhancements bundle is rejected by Meta.
@@ -9936,21 +10096,6 @@ export type TargetingSpec = {
9936
10096
  audienceExclude?: Array<(string)>;
9937
10097
  };
9938
10098
 
9939
- /**
9940
- * Restrict by gender. 'all' (default) targets everyone. Applied on Meta, TikTok and Pinterest. Ignored on Google, LinkedIn and X.
9941
- */
9942
- export type gender2 = 'all' | 'male' | 'female';
9943
-
9944
- /**
9945
- * Normalized household-income tier (ZIP/percentile based). Meta and TikTok
9946
- * express all four. Google maps only `top_10` (its INCOME_RANGE_90_UP); other
9947
- * tiers on Google, and any income tier on LinkedIn / X / Pinterest, are rejected.
9948
- * On Meta, income/zip targeting requires the relevant `specialAdCategories` to be
9949
- * unset (housing/employment/credit ads cannot use it).
9950
- *
9951
- */
9952
- export type incomeTier = 'top_5' | 'top_10' | 'top_10_25' | 'top_25_50';
9953
-
9954
10099
  /**
9955
10100
  * Text, images (up to 10), videos (up to 10), and mixed media albums. Captions up to 1024 chars for media, 4096 for text-only.
9956
10101
  */