@zernio/node 0.2.699 → 0.2.701

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
@@ -4253,7 +4253,7 @@ type ErrorResponse = {
4253
4253
  [key: string]: unknown;
4254
4254
  };
4255
4255
  /**
4256
- * Additional structured context (e.g. field-level validation errors).
4256
+ * Additional structured context (e.g. field-level validation errors), for example `privateReplyConsumed` on the private-reply endpoint's 400 when the comment's single reply is already spent.
4257
4257
  */
4258
4258
  details?: {
4259
4259
  [key: string]: unknown;
@@ -5857,6 +5857,14 @@ type MetaAdsPlatformData = {
5857
5857
  * Decimal ROAS multiplier (2.0 = 2.0x). Required when bidStrategy is LOWEST_COST_WITH_MIN_ROAS; sending it without bidStrategy is a 400.
5858
5858
  */
5859
5859
  roasAverageFloor?: number;
5860
+ /**
5861
+ * Meta daily_min_spend_target on the ad set being created: the least it should spend per day, in whole currency units. It reserves a share of a CAMPAIGN budget, so it requires budgetLevel campaign or an existingCampaignId whose campaign has the budget (Advantage campaign budget / CBO); with an ad-set budget it is a 400, because Meta rejects a spend limit on an ad set that owns its budget. A target, not a guarantee. Mutually exclusive with lifetimeMinSpendTarget: the flavour must match the campaign budget type. Rejected with 400 on POST /v1/ads/boost and in adSetId attach mode: use PUT /v1/ads/ad-sets/{adSetId} for an ad set that already exists.
5862
+ */
5863
+ dailyMinSpendTarget?: number;
5864
+ /**
5865
+ * Meta lifetime_min_spend_target: the lifetime-budget flavour of dailyMinSpendTarget, in whole currency units. Same rules and same rejections.
5866
+ */
5867
+ lifetimeMinSpendTarget?: number;
5860
5868
  };
5861
5869
  type Money = {
5862
5870
  /**
@@ -13304,6 +13312,15 @@ type GetAllAccountsHealthResponse = ({
13304
13312
  tokenExpiresAt?: string;
13305
13313
  needsReconnect?: boolean;
13306
13314
  issues?: Array<(string)>;
13315
+ /**
13316
+ * Observed from Meta's own error subcodes on our own sends (2534122, 1893063, 2534029), not a live probe. Set on the first refused send and cleared when a later send succeeds, so it lags reality by one send in each direction.
13317
+ */
13318
+ messagingRestriction?: {
13319
+ subcode?: number;
13320
+ message?: string;
13321
+ firstSeenAt?: string;
13322
+ lastSeenAt?: string;
13323
+ } | null;
13307
13324
  }>;
13308
13325
  });
13309
13326
  type GetAllAccountsHealthError = (ErrorResponse | {
@@ -13389,6 +13406,15 @@ type GetAccountHealthResponse = ({
13389
13406
  * Actionable recommendations to fix issues
13390
13407
  */
13391
13408
  recommendations?: Array<(string)>;
13409
+ /**
13410
+ * Observed from Meta's own error subcodes on our own sends (2534122, 1893063, 2534029), not a live probe. Set on the first refused send and cleared when a later send succeeds, so it lags reality by one send in each direction.
13411
+ */
13412
+ messagingRestriction?: {
13413
+ subcode?: number;
13414
+ message?: string;
13415
+ firstSeenAt?: string;
13416
+ lastSeenAt?: string;
13417
+ } | null;
13392
13418
  /**
13393
13419
  * WhatsApp accounts only. Live probe of the Meta link behind the channel, performed at request time (the same read as GET /v1/whatsapp/number-info).
13394
13420
  */
@@ -21601,10 +21627,7 @@ type SendPrivateReplyToCommentResponse = ({
21601
21627
  commentId?: string;
21602
21628
  platform?: 'instagram' | 'facebook';
21603
21629
  });
21604
- type SendPrivateReplyToCommentError = ({
21605
- error?: string;
21606
- code?: 'PLATFORM_LIMITATION';
21607
- } | {
21630
+ type SendPrivateReplyToCommentError = (ErrorResponse | {
21608
21631
  error?: string;
21609
21632
  } | unknown);
21610
21633
  type RetweetPostData = {
@@ -30359,6 +30382,27 @@ type UpdateAdSetData = {
30359
30382
  * Ad set end_time (ISO 8601).
30360
30383
  */
30361
30384
  endDate?: string;
30385
+ /**
30386
+ * Meta `daily_min_spend_target`: the least this ad set should spend per day, in whole
30387
+ * currency units of the ad account. It reserves a share of a CAMPAIGN budget for one ad
30388
+ * set, so it requires a campaign using Advantage campaign budget (CBO). On an ad set
30389
+ * that owns its budget (ABO) this returns 409 — move the budget to the campaign with
30390
+ * `PUT /v1/ads/campaigns/{campaignId}` first. Meta treats it as a target, not a
30391
+ * guarantee, and rejects the combined minimum of a campaign's ad sets going over the
30392
+ * campaign budget.
30393
+ * Mutually exclusive with `lifetimeMinSpendTarget` (400): the flavour must match the
30394
+ * campaign budget type, a daily budget takes a daily target.
30395
+ * Read it back with `GET /v1/ads/ad-sets/{adSetId}?fields=daily_min_spend_target`.
30396
+ *
30397
+ */
30398
+ dailyMinSpendTarget?: number;
30399
+ /**
30400
+ * Meta `lifetime_min_spend_target`: the lifetime-budget flavour of
30401
+ * `dailyMinSpendTarget`, in whole currency units. Send this one when the campaign
30402
+ * budget is a lifetime budget. Same rules and same rejections.
30403
+ *
30404
+ */
30405
+ lifetimeMinSpendTarget?: number;
30362
30406
  /**
30363
30407
  * Meta ad-set promoted_object, forwarded verbatim (same shape as /v1/ads/create). Unknown keys are rejected with 400.
30364
30408
  */
@@ -33568,6 +33612,9 @@ type CreateStandaloneAdData = {
33568
33612
  * Sending the bid fields in BOTH places returns a 400
33569
33613
  * (`mutually_exclusive_fields`), and sending any of them in
33570
33614
  * `adSetId` attach mode is a 400 too (the ad set already has its bid).
33615
+ * `dailyMinSpendTarget` / `lifetimeMinSpendTarget` set the new ad set's
33616
+ * minimum spend and live here only; they are rejected in `adSetId` attach
33617
+ * mode as well.
33571
33618
  *
33572
33619
  */
33573
33620
  platformSpecificData?: (LinkedInAdsPlatformData | MetaAdsPlatformData);
package/dist/index.d.ts CHANGED
@@ -4253,7 +4253,7 @@ type ErrorResponse = {
4253
4253
  [key: string]: unknown;
4254
4254
  };
4255
4255
  /**
4256
- * Additional structured context (e.g. field-level validation errors).
4256
+ * Additional structured context (e.g. field-level validation errors), for example `privateReplyConsumed` on the private-reply endpoint's 400 when the comment's single reply is already spent.
4257
4257
  */
4258
4258
  details?: {
4259
4259
  [key: string]: unknown;
@@ -5857,6 +5857,14 @@ type MetaAdsPlatformData = {
5857
5857
  * Decimal ROAS multiplier (2.0 = 2.0x). Required when bidStrategy is LOWEST_COST_WITH_MIN_ROAS; sending it without bidStrategy is a 400.
5858
5858
  */
5859
5859
  roasAverageFloor?: number;
5860
+ /**
5861
+ * Meta daily_min_spend_target on the ad set being created: the least it should spend per day, in whole currency units. It reserves a share of a CAMPAIGN budget, so it requires budgetLevel campaign or an existingCampaignId whose campaign has the budget (Advantage campaign budget / CBO); with an ad-set budget it is a 400, because Meta rejects a spend limit on an ad set that owns its budget. A target, not a guarantee. Mutually exclusive with lifetimeMinSpendTarget: the flavour must match the campaign budget type. Rejected with 400 on POST /v1/ads/boost and in adSetId attach mode: use PUT /v1/ads/ad-sets/{adSetId} for an ad set that already exists.
5862
+ */
5863
+ dailyMinSpendTarget?: number;
5864
+ /**
5865
+ * Meta lifetime_min_spend_target: the lifetime-budget flavour of dailyMinSpendTarget, in whole currency units. Same rules and same rejections.
5866
+ */
5867
+ lifetimeMinSpendTarget?: number;
5860
5868
  };
5861
5869
  type Money = {
5862
5870
  /**
@@ -13304,6 +13312,15 @@ type GetAllAccountsHealthResponse = ({
13304
13312
  tokenExpiresAt?: string;
13305
13313
  needsReconnect?: boolean;
13306
13314
  issues?: Array<(string)>;
13315
+ /**
13316
+ * Observed from Meta's own error subcodes on our own sends (2534122, 1893063, 2534029), not a live probe. Set on the first refused send and cleared when a later send succeeds, so it lags reality by one send in each direction.
13317
+ */
13318
+ messagingRestriction?: {
13319
+ subcode?: number;
13320
+ message?: string;
13321
+ firstSeenAt?: string;
13322
+ lastSeenAt?: string;
13323
+ } | null;
13307
13324
  }>;
13308
13325
  });
13309
13326
  type GetAllAccountsHealthError = (ErrorResponse | {
@@ -13389,6 +13406,15 @@ type GetAccountHealthResponse = ({
13389
13406
  * Actionable recommendations to fix issues
13390
13407
  */
13391
13408
  recommendations?: Array<(string)>;
13409
+ /**
13410
+ * Observed from Meta's own error subcodes on our own sends (2534122, 1893063, 2534029), not a live probe. Set on the first refused send and cleared when a later send succeeds, so it lags reality by one send in each direction.
13411
+ */
13412
+ messagingRestriction?: {
13413
+ subcode?: number;
13414
+ message?: string;
13415
+ firstSeenAt?: string;
13416
+ lastSeenAt?: string;
13417
+ } | null;
13392
13418
  /**
13393
13419
  * WhatsApp accounts only. Live probe of the Meta link behind the channel, performed at request time (the same read as GET /v1/whatsapp/number-info).
13394
13420
  */
@@ -21601,10 +21627,7 @@ type SendPrivateReplyToCommentResponse = ({
21601
21627
  commentId?: string;
21602
21628
  platform?: 'instagram' | 'facebook';
21603
21629
  });
21604
- type SendPrivateReplyToCommentError = ({
21605
- error?: string;
21606
- code?: 'PLATFORM_LIMITATION';
21607
- } | {
21630
+ type SendPrivateReplyToCommentError = (ErrorResponse | {
21608
21631
  error?: string;
21609
21632
  } | unknown);
21610
21633
  type RetweetPostData = {
@@ -30359,6 +30382,27 @@ type UpdateAdSetData = {
30359
30382
  * Ad set end_time (ISO 8601).
30360
30383
  */
30361
30384
  endDate?: string;
30385
+ /**
30386
+ * Meta `daily_min_spend_target`: the least this ad set should spend per day, in whole
30387
+ * currency units of the ad account. It reserves a share of a CAMPAIGN budget for one ad
30388
+ * set, so it requires a campaign using Advantage campaign budget (CBO). On an ad set
30389
+ * that owns its budget (ABO) this returns 409 — move the budget to the campaign with
30390
+ * `PUT /v1/ads/campaigns/{campaignId}` first. Meta treats it as a target, not a
30391
+ * guarantee, and rejects the combined minimum of a campaign's ad sets going over the
30392
+ * campaign budget.
30393
+ * Mutually exclusive with `lifetimeMinSpendTarget` (400): the flavour must match the
30394
+ * campaign budget type, a daily budget takes a daily target.
30395
+ * Read it back with `GET /v1/ads/ad-sets/{adSetId}?fields=daily_min_spend_target`.
30396
+ *
30397
+ */
30398
+ dailyMinSpendTarget?: number;
30399
+ /**
30400
+ * Meta `lifetime_min_spend_target`: the lifetime-budget flavour of
30401
+ * `dailyMinSpendTarget`, in whole currency units. Send this one when the campaign
30402
+ * budget is a lifetime budget. Same rules and same rejections.
30403
+ *
30404
+ */
30405
+ lifetimeMinSpendTarget?: number;
30362
30406
  /**
30363
30407
  * Meta ad-set promoted_object, forwarded verbatim (same shape as /v1/ads/create). Unknown keys are rejected with 400.
30364
30408
  */
@@ -33568,6 +33612,9 @@ type CreateStandaloneAdData = {
33568
33612
  * Sending the bid fields in BOTH places returns a 400
33569
33613
  * (`mutually_exclusive_fields`), and sending any of them in
33570
33614
  * `adSetId` attach mode is a 400 too (the ad set already has its bid).
33615
+ * `dailyMinSpendTarget` / `lifetimeMinSpendTarget` set the new ad set's
33616
+ * minimum spend and live here only; they are rejected in `adSetId` attach
33617
+ * mode as well.
33571
33618
  *
33572
33619
  */
33573
33620
  platformSpecificData?: (LinkedInAdsPlatformData | MetaAdsPlatformData);
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.699",
39
+ version: "0.2.701",
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.699",
8
+ version: "0.2.701",
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.699",
3
+ "version": "0.2.701",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -4167,7 +4167,9 @@ export const unlikePost = <ThrowOnError extends boolean = false>(options: Option
4167
4167
  * cards and attachments to commenters who do not follow the account (Meta code 2, subcode
4168
4168
  * 1545133, returned here as a non-retryable 400 that says so), and the failed call still
4169
4169
  * consumes the comment's single private reply. To reach non-followers send plain text and
4170
- * add buttons once they reply. `quickReplies` and `buttons` are mutually exclusive.
4170
+ * add buttons once they reply. `quickReplies` and `buttons` are mutually exclusive. When
4171
+ * the comment's single private reply is spent (by this call or an earlier one) the 400
4172
+ * carries `details.privateReplyConsumed: true`; never retry it.
4171
4173
  *
4172
4174
  */
4173
4175
  export const sendPrivateReplyToComment = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<SendPrivateReplyToCommentData, ThrowOnError>) => {
@@ -3004,7 +3004,7 @@ export type ErrorResponse = {
3004
3004
  [key: string]: unknown;
3005
3005
  };
3006
3006
  /**
3007
- * Additional structured context (e.g. field-level validation errors).
3007
+ * Additional structured context (e.g. field-level validation errors), for example `privateReplyConsumed` on the private-reply endpoint's 400 when the comment's single reply is already spent.
3008
3008
  */
3009
3009
  details?: {
3010
3010
  [key: string]: unknown;
@@ -4668,6 +4668,14 @@ export type MetaAdsPlatformData = {
4668
4668
  * Decimal ROAS multiplier (2.0 = 2.0x). Required when bidStrategy is LOWEST_COST_WITH_MIN_ROAS; sending it without bidStrategy is a 400.
4669
4669
  */
4670
4670
  roasAverageFloor?: number;
4671
+ /**
4672
+ * Meta daily_min_spend_target on the ad set being created: the least it should spend per day, in whole currency units. It reserves a share of a CAMPAIGN budget, so it requires budgetLevel campaign or an existingCampaignId whose campaign has the budget (Advantage campaign budget / CBO); with an ad-set budget it is a 400, because Meta rejects a spend limit on an ad set that owns its budget. A target, not a guarantee. Mutually exclusive with lifetimeMinSpendTarget: the flavour must match the campaign budget type. Rejected with 400 on POST /v1/ads/boost and in adSetId attach mode: use PUT /v1/ads/ad-sets/{adSetId} for an ad set that already exists.
4673
+ */
4674
+ dailyMinSpendTarget?: number;
4675
+ /**
4676
+ * Meta lifetime_min_spend_target: the lifetime-budget flavour of dailyMinSpendTarget, in whole currency units. Same rules and same rejections.
4677
+ */
4678
+ lifetimeMinSpendTarget?: number;
4671
4679
  };
4672
4680
 
4673
4681
  export type Money = {
@@ -12528,6 +12536,15 @@ export type GetAllAccountsHealthResponse = ({
12528
12536
  tokenExpiresAt?: string;
12529
12537
  needsReconnect?: boolean;
12530
12538
  issues?: Array<(string)>;
12539
+ /**
12540
+ * Observed from Meta's own error subcodes on our own sends (2534122, 1893063, 2534029), not a live probe. Set on the first refused send and cleared when a later send succeeds, so it lags reality by one send in each direction.
12541
+ */
12542
+ messagingRestriction?: {
12543
+ subcode?: number;
12544
+ message?: string;
12545
+ firstSeenAt?: string;
12546
+ lastSeenAt?: string;
12547
+ } | null;
12531
12548
  }>;
12532
12549
  });
12533
12550
 
@@ -12619,6 +12636,15 @@ export type GetAccountHealthResponse = ({
12619
12636
  * Actionable recommendations to fix issues
12620
12637
  */
12621
12638
  recommendations?: Array<(string)>;
12639
+ /**
12640
+ * Observed from Meta's own error subcodes on our own sends (2534122, 1893063, 2534029), not a live probe. Set on the first refused send and cleared when a later send succeeds, so it lags reality by one send in each direction.
12641
+ */
12642
+ messagingRestriction?: {
12643
+ subcode?: number;
12644
+ message?: string;
12645
+ firstSeenAt?: string;
12646
+ lastSeenAt?: string;
12647
+ } | null;
12622
12648
  /**
12623
12649
  * WhatsApp accounts only. Live probe of the Meta link behind the channel, performed at request time (the same read as GET /v1/whatsapp/number-info).
12624
12650
  */
@@ -21353,10 +21379,7 @@ export type SendPrivateReplyToCommentResponse = ({
21353
21379
  platform?: 'instagram' | 'facebook';
21354
21380
  });
21355
21381
 
21356
- export type SendPrivateReplyToCommentError = ({
21357
- error?: string;
21358
- code?: 'PLATFORM_LIMITATION';
21359
- } | {
21382
+ export type SendPrivateReplyToCommentError = (ErrorResponse | {
21360
21383
  error?: string;
21361
21384
  } | unknown);
21362
21385
 
@@ -30818,6 +30841,27 @@ export type UpdateAdSetData = {
30818
30841
  * Ad set end_time (ISO 8601).
30819
30842
  */
30820
30843
  endDate?: string;
30844
+ /**
30845
+ * Meta `daily_min_spend_target`: the least this ad set should spend per day, in whole
30846
+ * currency units of the ad account. It reserves a share of a CAMPAIGN budget for one ad
30847
+ * set, so it requires a campaign using Advantage campaign budget (CBO). On an ad set
30848
+ * that owns its budget (ABO) this returns 409 — move the budget to the campaign with
30849
+ * `PUT /v1/ads/campaigns/{campaignId}` first. Meta treats it as a target, not a
30850
+ * guarantee, and rejects the combined minimum of a campaign's ad sets going over the
30851
+ * campaign budget.
30852
+ * Mutually exclusive with `lifetimeMinSpendTarget` (400): the flavour must match the
30853
+ * campaign budget type, a daily budget takes a daily target.
30854
+ * Read it back with `GET /v1/ads/ad-sets/{adSetId}?fields=daily_min_spend_target`.
30855
+ *
30856
+ */
30857
+ dailyMinSpendTarget?: number;
30858
+ /**
30859
+ * Meta `lifetime_min_spend_target`: the lifetime-budget flavour of
30860
+ * `dailyMinSpendTarget`, in whole currency units. Send this one when the campaign
30861
+ * budget is a lifetime budget. Same rules and same rejections.
30862
+ *
30863
+ */
30864
+ lifetimeMinSpendTarget?: number;
30821
30865
  /**
30822
30866
  * Meta ad-set promoted_object, forwarded verbatim (same shape as /v1/ads/create). Unknown keys are rejected with 400.
30823
30867
  */
@@ -34177,6 +34221,9 @@ export type CreateStandaloneAdData = {
34177
34221
  * Sending the bid fields in BOTH places returns a 400
34178
34222
  * (`mutually_exclusive_fields`), and sending any of them in
34179
34223
  * `adSetId` attach mode is a 400 too (the ad set already has its bid).
34224
+ * `dailyMinSpendTarget` / `lifetimeMinSpendTarget` set the new ad set's
34225
+ * minimum spend and live here only; they are rejected in `adSetId` attach
34226
+ * mode as well.
34180
34227
  *
34181
34228
  */
34182
34229
  platformSpecificData?: (LinkedInAdsPlatformData | MetaAdsPlatformData);