@zernio/node 0.2.1483 → 0.2.1485

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
@@ -15357,6 +15357,10 @@ type Post = {
15357
15357
  * Queue ID if the post was scheduled via a specific queue
15358
15358
  */
15359
15359
  queueId?: string;
15360
+ /**
15361
+ * Profile the post is filed under. Set only on drafts that have no platforms.
15362
+ */
15363
+ profileId?: string;
15360
15364
  createdAt?: string;
15361
15365
  /**
15362
15366
  * Last change to the post or to any of its platforms (a publish, a failure, a resolved URL).
@@ -16719,6 +16723,13 @@ type SocialAccount = {
16719
16723
  *
16720
16724
  */
16721
16725
  enabled?: boolean;
16726
+ /**
16727
+ * Facebook accounts only (absent on every other platform). Whether this Facebook account syncs the Meta ads of the ad accounts it reaches, the way a `metaads` connection does.
16728
+ *
16729
+ * Off by default; set it with `PUT /v1/accounts/{accountId}`. Synced active ads count on the managed ads meter like ads from a Meta Ads connection.
16730
+ *
16731
+ */
16732
+ metaAdsSyncEnabled?: boolean;
16722
16733
  /**
16723
16734
  * End of the account's publishing cooldown. Compare it with the current time: a value in the past means the cooldown has ended (the field is cleared on the next successful publish); null means no cooldown since the last successful publish.
16724
16735
  *
@@ -19055,7 +19066,9 @@ type WebhookPayloadAccountDisconnected = {
19055
19066
  username: string;
19056
19067
  displayName?: string;
19057
19068
  /**
19058
- * Whether the disconnection was intentional (user action) or unintentional (token expired/revoked)
19069
+ * intentional: removed on purpose, for example with DELETE /v1/accounts/{accountId} or by a switch to the Free plan for the accounts over its limit. The account is deleted permanently 1 hour later unless the same account is reconnected within that hour.
19070
+ *
19071
+ * unintentional: the connection broke (token expired or revoked, access lost on the platform). The account stays in Zernio, inactive, until it is reconnected (keeping its accountId) or removed.
19059
19072
  */
19060
19073
  disconnectionType: 'intentional' | 'unintentional';
19061
19074
  /**
@@ -19070,7 +19083,9 @@ type WebhookPayloadAccountDisconnected = {
19070
19083
  };
19071
19084
  type event5 = 'account.disconnected';
19072
19085
  /**
19073
- * Whether the disconnection was intentional (user action) or unintentional (token expired/revoked)
19086
+ * intentional: removed on purpose, for example with DELETE /v1/accounts/{accountId} or by a switch to the Free plan for the accounts over its limit. The account is deleted permanently 1 hour later unless the same account is reconnected within that hour.
19087
+ *
19088
+ * unintentional: the connection broke (token expired or revoked, access lost on the platform). The account stays in Zernio, inactive, until it is reconnected (keeping its accountId) or removed.
19074
19089
  */
19075
19090
  type disconnectionType = 'intentional' | 'unintentional';
19076
19091
  /**
@@ -27995,7 +28010,7 @@ type ListPostsData = {
27995
28010
  page?: number;
27996
28011
  platform?: string;
27997
28012
  /**
27998
- * Filter posts to a specific profile (24-char hex ObjectId). Omit it, or send `all` or an empty value, to list posts across every profile.
28013
+ * Filter posts to a specific profile (24-char hex ObjectId), including drafts filed under it without platforms. Omit it, or send `all` or an empty value, to list posts across every profile.
27999
28014
  */
28000
28015
  profileId?: string;
28001
28016
  /**
@@ -28158,6 +28173,10 @@ type CreatePostData = {
28158
28173
  *
28159
28174
  */
28160
28175
  queueId?: string;
28176
+ /**
28177
+ * Files a draft with no platforms under this profile so it lists under ?profileId= and profile-scoped API keys. Ignored when platforms are set. When promoting the draft via PUT, send platforms, isDraft false and scheduledFor again.
28178
+ */
28179
+ profileId?: string;
28161
28180
  };
28162
28181
  headers?: {
28163
28182
  /**
@@ -28922,6 +28941,28 @@ type UpdateAccountData = {
28922
28941
  */
28923
28942
  inbox?: boolean;
28924
28943
  };
28944
+ /**
28945
+ * Facebook only (400 `invalid_field_value` on any other platform). Off by default for every Facebook account.
28946
+ *
28947
+ * `true` makes this account sync the Meta ads of the ad accounts it reaches, like a `metaads` connection.
28948
+ *
28949
+ * - The first sync starts at once (14 days, then 90 days of history in the background) and fires `account.ads.initial_sync_completed` for this `accountId` with `platform: metaads`.
28950
+ * - It then refreshes on the Meta Ads schedule.
28951
+ * - Each switch from `false` to `true` runs another initial sync and fires the webhook again. Sending `true` while it is on changes nothing.
28952
+ * - Needs `ads_management` and `ads_read` on the account (403 `reconnect_required` otherwise, with `details.requiredPermissions`).
28953
+ * - Needs ads access (403 `ads_addon_required`) and room in the managed ads allowance (403 `ads_allowance_exceeded`).
28954
+ * - While a `metaads` connection has this account as `parentAccountId`, that connection syncs the ads instead.
28955
+ *
28956
+ * Synced active ads count on the managed ads meter like ads from a Meta Ads
28957
+ * connection.
28958
+ *
28959
+ * `false` stops the sync. Ads already synced are kept, never deleted: they
28960
+ * stop updating and stop counting on the meter, and a `metaads` connection
28961
+ * of yours that reaches the same ad account takes them over. Posting, inbox
28962
+ * and comments on the account are not affected.
28963
+ *
28964
+ */
28965
+ metaAdsSyncEnabled?: boolean;
28925
28966
  };
28926
28967
  path: {
28927
28968
  accountId: string;
@@ -28940,8 +28981,12 @@ type UpdateAccountResponse = ({
28940
28981
  analytics?: boolean;
28941
28982
  inbox?: boolean;
28942
28983
  };
28984
+ /**
28985
+ * The resulting setting, returned only when the request body included `metaAdsSyncEnabled`.
28986
+ */
28987
+ metaAdsSyncEnabled?: boolean;
28943
28988
  });
28944
- type UpdateAccountError = (unknown | ErrorResponse | {
28989
+ type UpdateAccountError = (ErrorResponse | unknown | {
28945
28990
  error?: string;
28946
28991
  });
28947
28992
  type MoveAccountToProfileData = {
package/dist/index.d.ts CHANGED
@@ -15357,6 +15357,10 @@ type Post = {
15357
15357
  * Queue ID if the post was scheduled via a specific queue
15358
15358
  */
15359
15359
  queueId?: string;
15360
+ /**
15361
+ * Profile the post is filed under. Set only on drafts that have no platforms.
15362
+ */
15363
+ profileId?: string;
15360
15364
  createdAt?: string;
15361
15365
  /**
15362
15366
  * Last change to the post or to any of its platforms (a publish, a failure, a resolved URL).
@@ -16719,6 +16723,13 @@ type SocialAccount = {
16719
16723
  *
16720
16724
  */
16721
16725
  enabled?: boolean;
16726
+ /**
16727
+ * Facebook accounts only (absent on every other platform). Whether this Facebook account syncs the Meta ads of the ad accounts it reaches, the way a `metaads` connection does.
16728
+ *
16729
+ * Off by default; set it with `PUT /v1/accounts/{accountId}`. Synced active ads count on the managed ads meter like ads from a Meta Ads connection.
16730
+ *
16731
+ */
16732
+ metaAdsSyncEnabled?: boolean;
16722
16733
  /**
16723
16734
  * End of the account's publishing cooldown. Compare it with the current time: a value in the past means the cooldown has ended (the field is cleared on the next successful publish); null means no cooldown since the last successful publish.
16724
16735
  *
@@ -19055,7 +19066,9 @@ type WebhookPayloadAccountDisconnected = {
19055
19066
  username: string;
19056
19067
  displayName?: string;
19057
19068
  /**
19058
- * Whether the disconnection was intentional (user action) or unintentional (token expired/revoked)
19069
+ * intentional: removed on purpose, for example with DELETE /v1/accounts/{accountId} or by a switch to the Free plan for the accounts over its limit. The account is deleted permanently 1 hour later unless the same account is reconnected within that hour.
19070
+ *
19071
+ * unintentional: the connection broke (token expired or revoked, access lost on the platform). The account stays in Zernio, inactive, until it is reconnected (keeping its accountId) or removed.
19059
19072
  */
19060
19073
  disconnectionType: 'intentional' | 'unintentional';
19061
19074
  /**
@@ -19070,7 +19083,9 @@ type WebhookPayloadAccountDisconnected = {
19070
19083
  };
19071
19084
  type event5 = 'account.disconnected';
19072
19085
  /**
19073
- * Whether the disconnection was intentional (user action) or unintentional (token expired/revoked)
19086
+ * intentional: removed on purpose, for example with DELETE /v1/accounts/{accountId} or by a switch to the Free plan for the accounts over its limit. The account is deleted permanently 1 hour later unless the same account is reconnected within that hour.
19087
+ *
19088
+ * unintentional: the connection broke (token expired or revoked, access lost on the platform). The account stays in Zernio, inactive, until it is reconnected (keeping its accountId) or removed.
19074
19089
  */
19075
19090
  type disconnectionType = 'intentional' | 'unintentional';
19076
19091
  /**
@@ -27995,7 +28010,7 @@ type ListPostsData = {
27995
28010
  page?: number;
27996
28011
  platform?: string;
27997
28012
  /**
27998
- * Filter posts to a specific profile (24-char hex ObjectId). Omit it, or send `all` or an empty value, to list posts across every profile.
28013
+ * Filter posts to a specific profile (24-char hex ObjectId), including drafts filed under it without platforms. Omit it, or send `all` or an empty value, to list posts across every profile.
27999
28014
  */
28000
28015
  profileId?: string;
28001
28016
  /**
@@ -28158,6 +28173,10 @@ type CreatePostData = {
28158
28173
  *
28159
28174
  */
28160
28175
  queueId?: string;
28176
+ /**
28177
+ * Files a draft with no platforms under this profile so it lists under ?profileId= and profile-scoped API keys. Ignored when platforms are set. When promoting the draft via PUT, send platforms, isDraft false and scheduledFor again.
28178
+ */
28179
+ profileId?: string;
28161
28180
  };
28162
28181
  headers?: {
28163
28182
  /**
@@ -28922,6 +28941,28 @@ type UpdateAccountData = {
28922
28941
  */
28923
28942
  inbox?: boolean;
28924
28943
  };
28944
+ /**
28945
+ * Facebook only (400 `invalid_field_value` on any other platform). Off by default for every Facebook account.
28946
+ *
28947
+ * `true` makes this account sync the Meta ads of the ad accounts it reaches, like a `metaads` connection.
28948
+ *
28949
+ * - The first sync starts at once (14 days, then 90 days of history in the background) and fires `account.ads.initial_sync_completed` for this `accountId` with `platform: metaads`.
28950
+ * - It then refreshes on the Meta Ads schedule.
28951
+ * - Each switch from `false` to `true` runs another initial sync and fires the webhook again. Sending `true` while it is on changes nothing.
28952
+ * - Needs `ads_management` and `ads_read` on the account (403 `reconnect_required` otherwise, with `details.requiredPermissions`).
28953
+ * - Needs ads access (403 `ads_addon_required`) and room in the managed ads allowance (403 `ads_allowance_exceeded`).
28954
+ * - While a `metaads` connection has this account as `parentAccountId`, that connection syncs the ads instead.
28955
+ *
28956
+ * Synced active ads count on the managed ads meter like ads from a Meta Ads
28957
+ * connection.
28958
+ *
28959
+ * `false` stops the sync. Ads already synced are kept, never deleted: they
28960
+ * stop updating and stop counting on the meter, and a `metaads` connection
28961
+ * of yours that reaches the same ad account takes them over. Posting, inbox
28962
+ * and comments on the account are not affected.
28963
+ *
28964
+ */
28965
+ metaAdsSyncEnabled?: boolean;
28925
28966
  };
28926
28967
  path: {
28927
28968
  accountId: string;
@@ -28940,8 +28981,12 @@ type UpdateAccountResponse = ({
28940
28981
  analytics?: boolean;
28941
28982
  inbox?: boolean;
28942
28983
  };
28984
+ /**
28985
+ * The resulting setting, returned only when the request body included `metaAdsSyncEnabled`.
28986
+ */
28987
+ metaAdsSyncEnabled?: boolean;
28943
28988
  });
28944
- type UpdateAccountError = (unknown | ErrorResponse | {
28989
+ type UpdateAccountError = (ErrorResponse | unknown | {
28945
28990
  error?: string;
28946
28991
  });
28947
28992
  type MoveAccountToProfileData = {
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.1483",
39
+ version: "0.2.1485",
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.1483",
8
+ version: "0.2.1485",
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.1483",
3
+ "version": "0.2.1485",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -2265,6 +2265,10 @@ export const getFollowerStats = <ThrowOnError extends boolean = false>(options?:
2265
2265
  * - Publishing and deleting posts are always available regardless of these toggles.
2266
2266
  * - Setting `xCapabilities` on a non-X account returns 400.
2267
2267
  *
2268
+ * ### Meta ads sync
2269
+ *
2270
+ * For Facebook accounts, also accepts `metaAdsSyncEnabled` to sync the Meta ads of the ad accounts the account reaches without a Meta Ads connection. See the field for what turning it on and off does.
2271
+ *
2268
2272
  */
2269
2273
  export const updateAccount = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateAccountData, ThrowOnError>) => {
2270
2274
  return (options?.client ?? client).put<UpdateAccountResponse, UpdateAccountError, ThrowOnError>({
@@ -2292,7 +2296,11 @@ export const moveAccountToProfile = <ThrowOnError extends boolean = false>(optio
2292
2296
 
2293
2297
  /**
2294
2298
  * Disconnect account
2295
- * Disconnects and removes a connected account. Repeating the call for an account already disconnected returns 404, the account stays in its 1h grace window and the disconnect is not re-run.
2299
+ * Disconnects and removes a connected account, and fires account.disconnected with disconnectionType intentional.
2300
+ *
2301
+ * The account is kept for a 1h grace window. Reconnecting the same account within it restores it with the same accountId and its scheduled posts. After that it is deleted permanently.
2302
+ *
2303
+ * Repeating the call for an account already disconnected returns 404, the account stays in its 1h grace window and the disconnect is not re-run.
2296
2304
  */
2297
2305
  export const deleteAccount = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DeleteAccountData, ThrowOnError>) => {
2298
2306
  return (options?.client ?? client).delete<DeleteAccountResponse, DeleteAccountError, ThrowOnError>({
@@ -13645,6 +13645,10 @@ export type Post = {
13645
13645
  * Queue ID if the post was scheduled via a specific queue
13646
13646
  */
13647
13647
  queueId?: string;
13648
+ /**
13649
+ * Profile the post is filed under. Set only on drafts that have no platforms.
13650
+ */
13651
+ profileId?: string;
13648
13652
  createdAt?: string;
13649
13653
  /**
13650
13654
  * Last change to the post or to any of its platforms (a publish, a failure, a resolved URL).
@@ -15082,6 +15086,13 @@ export type SocialAccount = {
15082
15086
  *
15083
15087
  */
15084
15088
  enabled?: boolean;
15089
+ /**
15090
+ * Facebook accounts only (absent on every other platform). Whether this Facebook account syncs the Meta ads of the ad accounts it reaches, the way a `metaads` connection does.
15091
+ *
15092
+ * Off by default; set it with `PUT /v1/accounts/{accountId}`. Synced active ads count on the managed ads meter like ads from a Meta Ads connection.
15093
+ *
15094
+ */
15095
+ metaAdsSyncEnabled?: boolean;
15085
15096
  /**
15086
15097
  * End of the account's publishing cooldown. Compare it with the current time: a value in the past means the cooldown has ended (the field is cleared on the next successful publish); null means no cooldown since the last successful publish.
15087
15098
  *
@@ -17516,7 +17527,9 @@ export type WebhookPayloadAccountDisconnected = {
17516
17527
  username: string;
17517
17528
  displayName?: string;
17518
17529
  /**
17519
- * Whether the disconnection was intentional (user action) or unintentional (token expired/revoked)
17530
+ * intentional: removed on purpose, for example with DELETE /v1/accounts/{accountId} or by a switch to the Free plan for the accounts over its limit. The account is deleted permanently 1 hour later unless the same account is reconnected within that hour.
17531
+ *
17532
+ * unintentional: the connection broke (token expired or revoked, access lost on the platform). The account stays in Zernio, inactive, until it is reconnected (keeping its accountId) or removed.
17520
17533
  */
17521
17534
  disconnectionType: 'intentional' | 'unintentional';
17522
17535
  /**
@@ -17533,7 +17546,9 @@ export type WebhookPayloadAccountDisconnected = {
17533
17546
  export type event5 = 'account.disconnected';
17534
17547
 
17535
17548
  /**
17536
- * Whether the disconnection was intentional (user action) or unintentional (token expired/revoked)
17549
+ * intentional: removed on purpose, for example with DELETE /v1/accounts/{accountId} or by a switch to the Free plan for the accounts over its limit. The account is deleted permanently 1 hour later unless the same account is reconnected within that hour.
17550
+ *
17551
+ * unintentional: the connection broke (token expired or revoked, access lost on the platform). The account stays in Zernio, inactive, until it is reconnected (keeping its accountId) or removed.
17537
17552
  */
17538
17553
  export type disconnectionType = 'intentional' | 'unintentional';
17539
17554
 
@@ -26941,7 +26956,7 @@ export type ListPostsData = {
26941
26956
  page?: number;
26942
26957
  platform?: string;
26943
26958
  /**
26944
- * Filter posts to a specific profile (24-char hex ObjectId). Omit it, or send `all` or an empty value, to list posts across every profile.
26959
+ * Filter posts to a specific profile (24-char hex ObjectId), including drafts filed under it without platforms. Omit it, or send `all` or an empty value, to list posts across every profile.
26945
26960
  */
26946
26961
  profileId?: string;
26947
26962
  /**
@@ -27107,6 +27122,10 @@ export type CreatePostData = {
27107
27122
  *
27108
27123
  */
27109
27124
  queueId?: string;
27125
+ /**
27126
+ * Files a draft with no platforms under this profile so it lists under ?profileId= and profile-scoped API keys. Ignored when platforms are set. When promoting the draft via PUT, send platforms, isDraft false and scheduledFor again.
27127
+ */
27128
+ profileId?: string;
27110
27129
  };
27111
27130
  headers?: {
27112
27131
  /**
@@ -27936,6 +27955,28 @@ export type UpdateAccountData = {
27936
27955
  */
27937
27956
  inbox?: boolean;
27938
27957
  };
27958
+ /**
27959
+ * Facebook only (400 `invalid_field_value` on any other platform). Off by default for every Facebook account.
27960
+ *
27961
+ * `true` makes this account sync the Meta ads of the ad accounts it reaches, like a `metaads` connection.
27962
+ *
27963
+ * - The first sync starts at once (14 days, then 90 days of history in the background) and fires `account.ads.initial_sync_completed` for this `accountId` with `platform: metaads`.
27964
+ * - It then refreshes on the Meta Ads schedule.
27965
+ * - Each switch from `false` to `true` runs another initial sync and fires the webhook again. Sending `true` while it is on changes nothing.
27966
+ * - Needs `ads_management` and `ads_read` on the account (403 `reconnect_required` otherwise, with `details.requiredPermissions`).
27967
+ * - Needs ads access (403 `ads_addon_required`) and room in the managed ads allowance (403 `ads_allowance_exceeded`).
27968
+ * - While a `metaads` connection has this account as `parentAccountId`, that connection syncs the ads instead.
27969
+ *
27970
+ * Synced active ads count on the managed ads meter like ads from a Meta Ads
27971
+ * connection.
27972
+ *
27973
+ * `false` stops the sync. Ads already synced are kept, never deleted: they
27974
+ * stop updating and stop counting on the meter, and a `metaads` connection
27975
+ * of yours that reaches the same ad account takes them over. Posting, inbox
27976
+ * and comments on the account are not affected.
27977
+ *
27978
+ */
27979
+ metaAdsSyncEnabled?: boolean;
27939
27980
  };
27940
27981
  path: {
27941
27982
  accountId: string;
@@ -27955,9 +27996,13 @@ export type UpdateAccountResponse = ({
27955
27996
  analytics?: boolean;
27956
27997
  inbox?: boolean;
27957
27998
  };
27999
+ /**
28000
+ * The resulting setting, returned only when the request body included `metaAdsSyncEnabled`.
28001
+ */
28002
+ metaAdsSyncEnabled?: boolean;
27958
28003
  });
27959
28004
 
27960
- export type UpdateAccountError = (unknown | ErrorResponse | {
28005
+ export type UpdateAccountError = (ErrorResponse | unknown | {
27961
28006
  error?: string;
27962
28007
  });
27963
28008