@zernio/node 0.2.1820 → 0.2.1822

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
@@ -8265,9 +8265,11 @@ type AutomationTemplateInput = {
8265
8265
  */
8266
8266
  key: string;
8267
8267
  /**
8268
- * What the value is. `ad_account`: `{ accountId, adAccountId }`. `profile`: a profile id. `social_accounts`: an array of social account ids. `notify_destination`: an array of `{ accountId, to?, channelId? }`. `number`, `money` (in the ad account's currency) and `percent`: a number within the bounds below. `choice`: one of `options[].value`.
8268
+ * What the value is. `ad_account`: `{ accountId, adAccountId }`. `profile`: a profile id. `social_account`: one social account id of that profile (a comment to DM or a sequence).
8269
+ *
8270
+ * `social_accounts`: an array of social account ids. `notify_destination`: an array of `{ accountId, to?, channelId? }`. `number`, `money` (in the ad account's currency) and `percent`: a number within the bounds below. `choice`: one of `options[].value`.
8269
8271
  */
8270
- type: 'ad_account' | 'profile' | 'social_accounts' | 'notify_destination' | 'number' | 'money' | 'percent' | 'choice';
8272
+ type: 'ad_account' | 'profile' | 'social_account' | 'social_accounts' | 'notify_destination' | 'number' | 'money' | 'percent' | 'choice';
8271
8273
  label: string;
8272
8274
  /**
8273
8275
  * True when an install may leave it out. A field that points at a left-out input is dropped.
@@ -8296,9 +8298,11 @@ type AutomationTemplateInput = {
8296
8298
  }>;
8297
8299
  };
8298
8300
  /**
8299
- * What the value is. `ad_account`: `{ accountId, adAccountId }`. `profile`: a profile id. `social_accounts`: an array of social account ids. `notify_destination`: an array of `{ accountId, to?, channelId? }`. `number`, `money` (in the ad account's currency) and `percent`: a number within the bounds below. `choice`: one of `options[].value`.
8301
+ * What the value is. `ad_account`: `{ accountId, adAccountId }`. `profile`: a profile id. `social_account`: one social account id of that profile (a comment to DM or a sequence).
8302
+ *
8303
+ * `social_accounts`: an array of social account ids. `notify_destination`: an array of `{ accountId, to?, channelId? }`. `number`, `money` (in the ad account's currency) and `percent`: a number within the bounds below. `choice`: one of `options[].value`.
8300
8304
  */
8301
- type type9 = 'ad_account' | 'profile' | 'social_accounts' | 'notify_destination' | 'number' | 'money' | 'percent' | 'choice';
8305
+ type type9 = 'ad_account' | 'profile' | 'social_account' | 'social_accounts' | 'notify_destination' | 'number' | 'money' | 'percent' | 'choice';
8302
8306
  type AutomationTemplateInstallation = {
8303
8307
  templateId: string;
8304
8308
  templateVersion: number;
@@ -42053,7 +42057,62 @@ type ConnectAdsResponse = (({
42053
42057
  authUrl?: string;
42054
42058
  state?: string;
42055
42059
  }));
42056
- type ConnectAdsError = (unknown | ErrorResponse);
42060
+ type ConnectAdsError = (unknown | ErrorResponse | {
42061
+ /**
42062
+ * Human-readable error message suitable for end-user display.
42063
+ */
42064
+ error: string;
42065
+ /**
42066
+ * Machine-readable error code. Stable across versions.
42067
+ */
42068
+ code: 'PAYMENT_REQUIRED';
42069
+ /**
42070
+ * Discriminator for which gate fired.
42071
+ */
42072
+ reason: 'free_tier_exceeded' | 'twitter_passthrough' | 'enterprise_required' | 'card_verification_required';
42073
+ /**
42074
+ * Link to the relevant documentation page.
42075
+ */
42076
+ documentation_url?: string;
42077
+ /**
42078
+ * Deep-link to send the end-user to. For
42079
+ * `free_tier_exceeded` and `twitter_passthrough` this opens
42080
+ * the add-payment-method drawer on the Zernio billing page.
42081
+ * For `enterprise_required` this is the Zernio enterprise
42082
+ * contact page.
42083
+ *
42084
+ */
42085
+ dashboard_url?: string;
42086
+ /**
42087
+ * Structured context for SDK clients that want to render their own UX. Keys vary by `reason`.
42088
+ */
42089
+ details?: {
42090
+ /**
42091
+ * How many accounts the free tier allows. Only set when reason=free_tier_exceeded.
42092
+ */
42093
+ free_tier_account_limit?: number;
42094
+ /**
42095
+ * How many accounts the team currently has connected. Set when reason=free_tier_exceeded or reason=enterprise_required.
42096
+ */
42097
+ current_account_count?: number;
42098
+ /**
42099
+ * Whether the team currently has a card on file in Stripe. Set when reason=free_tier_exceeded or reason=twitter_passthrough.
42100
+ */
42101
+ has_payment_method?: boolean;
42102
+ /**
42103
+ * One-time card verification charge in USD cents, credited to usage. Only set when reason=card_verification_required.
42104
+ */
42105
+ verification_amount_cents?: number;
42106
+ /**
42107
+ * The negotiated connected-account cap from the
42108
+ * team's enterprise contract. Self-service teams
42109
+ * have no cap and never receive this reason. Only
42110
+ * set when reason=enterprise_required.
42111
+ *
42112
+ */
42113
+ effective_account_limit?: number;
42114
+ };
42115
+ });
42057
42116
  type CompleteMetaAdsBusinessLoginData = {
42058
42117
  query: {
42059
42118
  /**
package/dist/index.d.ts CHANGED
@@ -8265,9 +8265,11 @@ type AutomationTemplateInput = {
8265
8265
  */
8266
8266
  key: string;
8267
8267
  /**
8268
- * What the value is. `ad_account`: `{ accountId, adAccountId }`. `profile`: a profile id. `social_accounts`: an array of social account ids. `notify_destination`: an array of `{ accountId, to?, channelId? }`. `number`, `money` (in the ad account's currency) and `percent`: a number within the bounds below. `choice`: one of `options[].value`.
8268
+ * What the value is. `ad_account`: `{ accountId, adAccountId }`. `profile`: a profile id. `social_account`: one social account id of that profile (a comment to DM or a sequence).
8269
+ *
8270
+ * `social_accounts`: an array of social account ids. `notify_destination`: an array of `{ accountId, to?, channelId? }`. `number`, `money` (in the ad account's currency) and `percent`: a number within the bounds below. `choice`: one of `options[].value`.
8269
8271
  */
8270
- type: 'ad_account' | 'profile' | 'social_accounts' | 'notify_destination' | 'number' | 'money' | 'percent' | 'choice';
8272
+ type: 'ad_account' | 'profile' | 'social_account' | 'social_accounts' | 'notify_destination' | 'number' | 'money' | 'percent' | 'choice';
8271
8273
  label: string;
8272
8274
  /**
8273
8275
  * True when an install may leave it out. A field that points at a left-out input is dropped.
@@ -8296,9 +8298,11 @@ type AutomationTemplateInput = {
8296
8298
  }>;
8297
8299
  };
8298
8300
  /**
8299
- * What the value is. `ad_account`: `{ accountId, adAccountId }`. `profile`: a profile id. `social_accounts`: an array of social account ids. `notify_destination`: an array of `{ accountId, to?, channelId? }`. `number`, `money` (in the ad account's currency) and `percent`: a number within the bounds below. `choice`: one of `options[].value`.
8301
+ * What the value is. `ad_account`: `{ accountId, adAccountId }`. `profile`: a profile id. `social_account`: one social account id of that profile (a comment to DM or a sequence).
8302
+ *
8303
+ * `social_accounts`: an array of social account ids. `notify_destination`: an array of `{ accountId, to?, channelId? }`. `number`, `money` (in the ad account's currency) and `percent`: a number within the bounds below. `choice`: one of `options[].value`.
8300
8304
  */
8301
- type type9 = 'ad_account' | 'profile' | 'social_accounts' | 'notify_destination' | 'number' | 'money' | 'percent' | 'choice';
8305
+ type type9 = 'ad_account' | 'profile' | 'social_account' | 'social_accounts' | 'notify_destination' | 'number' | 'money' | 'percent' | 'choice';
8302
8306
  type AutomationTemplateInstallation = {
8303
8307
  templateId: string;
8304
8308
  templateVersion: number;
@@ -42053,7 +42057,62 @@ type ConnectAdsResponse = (({
42053
42057
  authUrl?: string;
42054
42058
  state?: string;
42055
42059
  }));
42056
- type ConnectAdsError = (unknown | ErrorResponse);
42060
+ type ConnectAdsError = (unknown | ErrorResponse | {
42061
+ /**
42062
+ * Human-readable error message suitable for end-user display.
42063
+ */
42064
+ error: string;
42065
+ /**
42066
+ * Machine-readable error code. Stable across versions.
42067
+ */
42068
+ code: 'PAYMENT_REQUIRED';
42069
+ /**
42070
+ * Discriminator for which gate fired.
42071
+ */
42072
+ reason: 'free_tier_exceeded' | 'twitter_passthrough' | 'enterprise_required' | 'card_verification_required';
42073
+ /**
42074
+ * Link to the relevant documentation page.
42075
+ */
42076
+ documentation_url?: string;
42077
+ /**
42078
+ * Deep-link to send the end-user to. For
42079
+ * `free_tier_exceeded` and `twitter_passthrough` this opens
42080
+ * the add-payment-method drawer on the Zernio billing page.
42081
+ * For `enterprise_required` this is the Zernio enterprise
42082
+ * contact page.
42083
+ *
42084
+ */
42085
+ dashboard_url?: string;
42086
+ /**
42087
+ * Structured context for SDK clients that want to render their own UX. Keys vary by `reason`.
42088
+ */
42089
+ details?: {
42090
+ /**
42091
+ * How many accounts the free tier allows. Only set when reason=free_tier_exceeded.
42092
+ */
42093
+ free_tier_account_limit?: number;
42094
+ /**
42095
+ * How many accounts the team currently has connected. Set when reason=free_tier_exceeded or reason=enterprise_required.
42096
+ */
42097
+ current_account_count?: number;
42098
+ /**
42099
+ * Whether the team currently has a card on file in Stripe. Set when reason=free_tier_exceeded or reason=twitter_passthrough.
42100
+ */
42101
+ has_payment_method?: boolean;
42102
+ /**
42103
+ * One-time card verification charge in USD cents, credited to usage. Only set when reason=card_verification_required.
42104
+ */
42105
+ verification_amount_cents?: number;
42106
+ /**
42107
+ * The negotiated connected-account cap from the
42108
+ * team's enterprise contract. Self-service teams
42109
+ * have no cap and never receive this reason. Only
42110
+ * set when reason=enterprise_required.
42111
+ *
42112
+ */
42113
+ effective_account_limit?: number;
42114
+ };
42115
+ });
42057
42116
  type CompleteMetaAdsBusinessLoginData = {
42058
42117
  query: {
42059
42118
  /**
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.1820",
39
+ version: "0.2.1822",
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.1820",
8
+ version: "0.2.1822",
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.1820",
3
+ "version": "0.2.1822",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -15228,7 +15228,9 @@ export const installSharedAutomationTemplate = <ThrowOnError extends boolean = f
15228
15228
 
15229
15229
  /**
15230
15230
  * Get a Zernio automation template
15231
- * Returns one of Zernio's ready-made ad rule templates in the same shape as your own. Each threshold and budget or bid amount is an input with the template's own value as its default, so an install can change it or leave it.
15231
+ * Returns one of Zernio's ready-made templates in the same shape as your own: an ad rule (like `stop_losers`), a comment to DM (`comment-keyword-dm`, `comment-keyword-dm-follow-gate`) or a sequence (`sequence-welcome-series`, `sequence-nurture`).
15232
+ *
15233
+ * In an ad rule, each threshold and budget or bid amount is an input with the template's own value as its default, so an install can change it or leave it. A comment to DM or a sequence asks for a profile and one account of it.
15232
15234
  *
15233
15235
  */
15234
15236
  export const getZernioAutomationTemplate = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetZernioAutomationTemplateData, ThrowOnError>) => {
@@ -5831,9 +5831,11 @@ export type AutomationTemplateInput = {
5831
5831
  */
5832
5832
  key: string;
5833
5833
  /**
5834
- * What the value is. `ad_account`: `{ accountId, adAccountId }`. `profile`: a profile id. `social_accounts`: an array of social account ids. `notify_destination`: an array of `{ accountId, to?, channelId? }`. `number`, `money` (in the ad account's currency) and `percent`: a number within the bounds below. `choice`: one of `options[].value`.
5834
+ * What the value is. `ad_account`: `{ accountId, adAccountId }`. `profile`: a profile id. `social_account`: one social account id of that profile (a comment to DM or a sequence).
5835
+ *
5836
+ * `social_accounts`: an array of social account ids. `notify_destination`: an array of `{ accountId, to?, channelId? }`. `number`, `money` (in the ad account's currency) and `percent`: a number within the bounds below. `choice`: one of `options[].value`.
5835
5837
  */
5836
- type: 'ad_account' | 'profile' | 'social_accounts' | 'notify_destination' | 'number' | 'money' | 'percent' | 'choice';
5838
+ type: 'ad_account' | 'profile' | 'social_account' | 'social_accounts' | 'notify_destination' | 'number' | 'money' | 'percent' | 'choice';
5837
5839
  label: string;
5838
5840
  /**
5839
5841
  * True when an install may leave it out. A field that points at a left-out input is dropped.
@@ -5863,9 +5865,11 @@ export type AutomationTemplateInput = {
5863
5865
  };
5864
5866
 
5865
5867
  /**
5866
- * What the value is. `ad_account`: `{ accountId, adAccountId }`. `profile`: a profile id. `social_accounts`: an array of social account ids. `notify_destination`: an array of `{ accountId, to?, channelId? }`. `number`, `money` (in the ad account's currency) and `percent`: a number within the bounds below. `choice`: one of `options[].value`.
5868
+ * What the value is. `ad_account`: `{ accountId, adAccountId }`. `profile`: a profile id. `social_account`: one social account id of that profile (a comment to DM or a sequence).
5869
+ *
5870
+ * `social_accounts`: an array of social account ids. `notify_destination`: an array of `{ accountId, to?, channelId? }`. `number`, `money` (in the ad account's currency) and `percent`: a number within the bounds below. `choice`: one of `options[].value`.
5867
5871
  */
5868
- export type type9 = 'ad_account' | 'profile' | 'social_accounts' | 'notify_destination' | 'number' | 'money' | 'percent' | 'choice';
5872
+ export type type9 = 'ad_account' | 'profile' | 'social_account' | 'social_accounts' | 'notify_destination' | 'number' | 'money' | 'percent' | 'choice';
5869
5873
 
5870
5874
  export type AutomationTemplateInstallation = {
5871
5875
  templateId: string;
@@ -41302,7 +41306,62 @@ export type ConnectAdsResponse = (({
41302
41306
  state?: string;
41303
41307
  }));
41304
41308
 
41305
- export type ConnectAdsError = (unknown | ErrorResponse);
41309
+ export type ConnectAdsError = (unknown | ErrorResponse | {
41310
+ /**
41311
+ * Human-readable error message suitable for end-user display.
41312
+ */
41313
+ error: string;
41314
+ /**
41315
+ * Machine-readable error code. Stable across versions.
41316
+ */
41317
+ code: 'PAYMENT_REQUIRED';
41318
+ /**
41319
+ * Discriminator for which gate fired.
41320
+ */
41321
+ reason: 'free_tier_exceeded' | 'twitter_passthrough' | 'enterprise_required' | 'card_verification_required';
41322
+ /**
41323
+ * Link to the relevant documentation page.
41324
+ */
41325
+ documentation_url?: string;
41326
+ /**
41327
+ * Deep-link to send the end-user to. For
41328
+ * `free_tier_exceeded` and `twitter_passthrough` this opens
41329
+ * the add-payment-method drawer on the Zernio billing page.
41330
+ * For `enterprise_required` this is the Zernio enterprise
41331
+ * contact page.
41332
+ *
41333
+ */
41334
+ dashboard_url?: string;
41335
+ /**
41336
+ * Structured context for SDK clients that want to render their own UX. Keys vary by `reason`.
41337
+ */
41338
+ details?: {
41339
+ /**
41340
+ * How many accounts the free tier allows. Only set when reason=free_tier_exceeded.
41341
+ */
41342
+ free_tier_account_limit?: number;
41343
+ /**
41344
+ * How many accounts the team currently has connected. Set when reason=free_tier_exceeded or reason=enterprise_required.
41345
+ */
41346
+ current_account_count?: number;
41347
+ /**
41348
+ * Whether the team currently has a card on file in Stripe. Set when reason=free_tier_exceeded or reason=twitter_passthrough.
41349
+ */
41350
+ has_payment_method?: boolean;
41351
+ /**
41352
+ * One-time card verification charge in USD cents, credited to usage. Only set when reason=card_verification_required.
41353
+ */
41354
+ verification_amount_cents?: number;
41355
+ /**
41356
+ * The negotiated connected-account cap from the
41357
+ * team's enterprise contract. Self-service teams
41358
+ * have no cap and never receive this reason. Only
41359
+ * set when reason=enterprise_required.
41360
+ *
41361
+ */
41362
+ effective_account_limit?: number;
41363
+ };
41364
+ });
41306
41365
 
41307
41366
  export type CompleteMetaAdsBusinessLoginData = {
41308
41367
  query: {