@zernio/node 0.2.672 → 0.2.674

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
@@ -6500,7 +6500,8 @@ type SocialAccount = {
6500
6500
  /**
6501
6501
  * Whether the user explicitly activated this account. false means the account was
6502
6502
  * created as a side effect (e.g., posting account auto-created when user connected
6503
- * ads first). Posting UI and scheduler ignore accounts with enabled: false.
6503
+ * ads first). Such accounts are hidden from this list, cannot be posted to
6504
+ * (`ACCOUNT_NOT_ENABLED_FOR_POSTING`), and are not billed as connected accounts.
6504
6505
  *
6505
6506
  */
6506
6507
  enabled?: boolean;
@@ -12270,7 +12271,7 @@ type CreatePostError = ({
12270
12271
  /**
12271
12272
  * Stable machine-readable cause. Absent for ownership failures.
12272
12273
  */
12273
- code?: 'ACCOUNT_DISCONNECTED' | 'PROFILE_OVER_LIMIT';
12274
+ code?: 'ACCOUNT_DISCONNECTED' | 'ACCOUNT_NOT_ENABLED_FOR_POSTING' | 'PROFILE_OVER_LIMIT';
12274
12275
  } | {
12275
12276
  error?: string;
12276
12277
  details?: {
@@ -15731,7 +15732,57 @@ type ConnectOpenAiAdsCredentialsResponse = ({
15731
15732
  adAccountName?: string;
15732
15733
  redirectUrl?: string;
15733
15734
  });
15734
- type ConnectOpenAiAdsCredentialsError = (ErrorResponse | unknown);
15735
+ type ConnectOpenAiAdsCredentialsError = (ErrorResponse | unknown | {
15736
+ /**
15737
+ * Human-readable error message suitable for end-user display.
15738
+ */
15739
+ error: string;
15740
+ /**
15741
+ * Machine-readable error code. Stable across versions.
15742
+ */
15743
+ code: 'PAYMENT_REQUIRED';
15744
+ /**
15745
+ * Discriminator for which gate fired.
15746
+ */
15747
+ reason: 'free_tier_exceeded' | 'twitter_passthrough' | 'enterprise_required';
15748
+ /**
15749
+ * Link to the relevant documentation page.
15750
+ */
15751
+ documentation_url?: string;
15752
+ /**
15753
+ * Deep-link to send the end-user to. For
15754
+ * `free_tier_exceeded` and `twitter_passthrough` this is
15755
+ * the Zernio billing tab. For `enterprise_required` this
15756
+ * is the Zernio enterprise contact page.
15757
+ *
15758
+ */
15759
+ dashboard_url?: string;
15760
+ /**
15761
+ * Structured context for SDK clients that want to render their own UX. Keys vary by `reason`.
15762
+ */
15763
+ details?: {
15764
+ /**
15765
+ * How many accounts the free tier allows. Only set when reason=free_tier_exceeded.
15766
+ */
15767
+ free_tier_account_limit?: number;
15768
+ /**
15769
+ * How many accounts the team currently has connected. Set when reason=free_tier_exceeded or reason=enterprise_required.
15770
+ */
15771
+ current_account_count?: number;
15772
+ /**
15773
+ * Whether the team currently has a card on file in Stripe. Set when reason=free_tier_exceeded or reason=twitter_passthrough.
15774
+ */
15775
+ has_payment_method?: boolean;
15776
+ /**
15777
+ * The negotiated connected-account cap from the
15778
+ * team's enterprise contract. Self-service teams
15779
+ * have no cap and never receive this reason. Only
15780
+ * set when reason=enterprise_required.
15781
+ *
15782
+ */
15783
+ effective_account_limit?: number;
15784
+ };
15785
+ });
15735
15786
  type ConnectWhatsAppCredentialsData = {
15736
15787
  body: {
15737
15788
  /**
@@ -20476,7 +20527,7 @@ type ListInboxCommentsResponse = ({
20476
20527
  platform?: string;
20477
20528
  error?: string;
20478
20529
  /**
20479
- * Error code if available
20530
+ * Error code if available (e.g. TOKEN_EXPIRED, or X_INBOX_NOT_ENABLED for an X account whose owner has not enabled X inbox)
20480
20531
  */
20481
20532
  code?: (string) | null;
20482
20533
  /**
package/dist/index.d.ts CHANGED
@@ -6500,7 +6500,8 @@ type SocialAccount = {
6500
6500
  /**
6501
6501
  * Whether the user explicitly activated this account. false means the account was
6502
6502
  * created as a side effect (e.g., posting account auto-created when user connected
6503
- * ads first). Posting UI and scheduler ignore accounts with enabled: false.
6503
+ * ads first). Such accounts are hidden from this list, cannot be posted to
6504
+ * (`ACCOUNT_NOT_ENABLED_FOR_POSTING`), and are not billed as connected accounts.
6504
6505
  *
6505
6506
  */
6506
6507
  enabled?: boolean;
@@ -12270,7 +12271,7 @@ type CreatePostError = ({
12270
12271
  /**
12271
12272
  * Stable machine-readable cause. Absent for ownership failures.
12272
12273
  */
12273
- code?: 'ACCOUNT_DISCONNECTED' | 'PROFILE_OVER_LIMIT';
12274
+ code?: 'ACCOUNT_DISCONNECTED' | 'ACCOUNT_NOT_ENABLED_FOR_POSTING' | 'PROFILE_OVER_LIMIT';
12274
12275
  } | {
12275
12276
  error?: string;
12276
12277
  details?: {
@@ -15731,7 +15732,57 @@ type ConnectOpenAiAdsCredentialsResponse = ({
15731
15732
  adAccountName?: string;
15732
15733
  redirectUrl?: string;
15733
15734
  });
15734
- type ConnectOpenAiAdsCredentialsError = (ErrorResponse | unknown);
15735
+ type ConnectOpenAiAdsCredentialsError = (ErrorResponse | unknown | {
15736
+ /**
15737
+ * Human-readable error message suitable for end-user display.
15738
+ */
15739
+ error: string;
15740
+ /**
15741
+ * Machine-readable error code. Stable across versions.
15742
+ */
15743
+ code: 'PAYMENT_REQUIRED';
15744
+ /**
15745
+ * Discriminator for which gate fired.
15746
+ */
15747
+ reason: 'free_tier_exceeded' | 'twitter_passthrough' | 'enterprise_required';
15748
+ /**
15749
+ * Link to the relevant documentation page.
15750
+ */
15751
+ documentation_url?: string;
15752
+ /**
15753
+ * Deep-link to send the end-user to. For
15754
+ * `free_tier_exceeded` and `twitter_passthrough` this is
15755
+ * the Zernio billing tab. For `enterprise_required` this
15756
+ * is the Zernio enterprise contact page.
15757
+ *
15758
+ */
15759
+ dashboard_url?: string;
15760
+ /**
15761
+ * Structured context for SDK clients that want to render their own UX. Keys vary by `reason`.
15762
+ */
15763
+ details?: {
15764
+ /**
15765
+ * How many accounts the free tier allows. Only set when reason=free_tier_exceeded.
15766
+ */
15767
+ free_tier_account_limit?: number;
15768
+ /**
15769
+ * How many accounts the team currently has connected. Set when reason=free_tier_exceeded or reason=enterprise_required.
15770
+ */
15771
+ current_account_count?: number;
15772
+ /**
15773
+ * Whether the team currently has a card on file in Stripe. Set when reason=free_tier_exceeded or reason=twitter_passthrough.
15774
+ */
15775
+ has_payment_method?: boolean;
15776
+ /**
15777
+ * The negotiated connected-account cap from the
15778
+ * team's enterprise contract. Self-service teams
15779
+ * have no cap and never receive this reason. Only
15780
+ * set when reason=enterprise_required.
15781
+ *
15782
+ */
15783
+ effective_account_limit?: number;
15784
+ };
15785
+ });
15735
15786
  type ConnectWhatsAppCredentialsData = {
15736
15787
  body: {
15737
15788
  /**
@@ -20476,7 +20527,7 @@ type ListInboxCommentsResponse = ({
20476
20527
  platform?: string;
20477
20528
  error?: string;
20478
20529
  /**
20479
- * Error code if available
20530
+ * Error code if available (e.g. TOKEN_EXPIRED, or X_INBOX_NOT_ENABLED for an X account whose owner has not enabled X inbox)
20480
20531
  */
20481
20532
  code?: (string) | null;
20482
20533
  /**
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.672",
39
+ version: "0.2.674",
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.672",
8
+ version: "0.2.674",
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.672",
3
+ "version": "0.2.674",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -5363,7 +5363,8 @@ export type SocialAccount = {
5363
5363
  /**
5364
5364
  * Whether the user explicitly activated this account. false means the account was
5365
5365
  * created as a side effect (e.g., posting account auto-created when user connected
5366
- * ads first). Posting UI and scheduler ignore accounts with enabled: false.
5366
+ * ads first). Such accounts are hidden from this list, cannot be posted to
5367
+ * (`ACCOUNT_NOT_ENABLED_FOR_POSTING`), and are not billed as connected accounts.
5367
5368
  *
5368
5369
  */
5369
5370
  enabled?: boolean;
@@ -11427,7 +11428,7 @@ export type CreatePostError = ({
11427
11428
  /**
11428
11429
  * Stable machine-readable cause. Absent for ownership failures.
11429
11430
  */
11430
- code?: 'ACCOUNT_DISCONNECTED' | 'PROFILE_OVER_LIMIT';
11431
+ code?: 'ACCOUNT_DISCONNECTED' | 'ACCOUNT_NOT_ENABLED_FOR_POSTING' | 'PROFILE_OVER_LIMIT';
11431
11432
  } | {
11432
11433
  error?: string;
11433
11434
  details?: {
@@ -15124,7 +15125,57 @@ export type ConnectOpenAiAdsCredentialsResponse = ({
15124
15125
  redirectUrl?: string;
15125
15126
  });
15126
15127
 
15127
- export type ConnectOpenAiAdsCredentialsError = (ErrorResponse | unknown);
15128
+ export type ConnectOpenAiAdsCredentialsError = (ErrorResponse | unknown | {
15129
+ /**
15130
+ * Human-readable error message suitable for end-user display.
15131
+ */
15132
+ error: string;
15133
+ /**
15134
+ * Machine-readable error code. Stable across versions.
15135
+ */
15136
+ code: 'PAYMENT_REQUIRED';
15137
+ /**
15138
+ * Discriminator for which gate fired.
15139
+ */
15140
+ reason: 'free_tier_exceeded' | 'twitter_passthrough' | 'enterprise_required';
15141
+ /**
15142
+ * Link to the relevant documentation page.
15143
+ */
15144
+ documentation_url?: string;
15145
+ /**
15146
+ * Deep-link to send the end-user to. For
15147
+ * `free_tier_exceeded` and `twitter_passthrough` this is
15148
+ * the Zernio billing tab. For `enterprise_required` this
15149
+ * is the Zernio enterprise contact page.
15150
+ *
15151
+ */
15152
+ dashboard_url?: string;
15153
+ /**
15154
+ * Structured context for SDK clients that want to render their own UX. Keys vary by `reason`.
15155
+ */
15156
+ details?: {
15157
+ /**
15158
+ * How many accounts the free tier allows. Only set when reason=free_tier_exceeded.
15159
+ */
15160
+ free_tier_account_limit?: number;
15161
+ /**
15162
+ * How many accounts the team currently has connected. Set when reason=free_tier_exceeded or reason=enterprise_required.
15163
+ */
15164
+ current_account_count?: number;
15165
+ /**
15166
+ * Whether the team currently has a card on file in Stripe. Set when reason=free_tier_exceeded or reason=twitter_passthrough.
15167
+ */
15168
+ has_payment_method?: boolean;
15169
+ /**
15170
+ * The negotiated connected-account cap from the
15171
+ * team's enterprise contract. Self-service teams
15172
+ * have no cap and never receive this reason. Only
15173
+ * set when reason=enterprise_required.
15174
+ *
15175
+ */
15176
+ effective_account_limit?: number;
15177
+ };
15178
+ });
15128
15179
 
15129
15180
  export type ConnectWhatsAppCredentialsData = {
15130
15181
  body: {
@@ -20185,7 +20236,7 @@ export type ListInboxCommentsResponse = ({
20185
20236
  platform?: string;
20186
20237
  error?: string;
20187
20238
  /**
20188
- * Error code if available
20239
+ * Error code if available (e.g. TOKEN_EXPIRED, or X_INBOX_NOT_ENABLED for an X account whose owner has not enabled X inbox)
20189
20240
  */
20190
20241
  code?: (string) | null;
20191
20242
  /**