@zernio/node 0.2.966 → 0.2.968

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
@@ -8854,6 +8854,9 @@ type MetaPageOwnership = {
8854
8854
  type MetaPagePartner = {
8855
8855
  businessId?: string;
8856
8856
  name?: string;
8857
+ /**
8858
+ * Tasks the partner holds, in the bare spelling the grant takes (ADVERTISE, ANALYZE, MANAGE, ...). Meta reads them back with a PROFILE_PLUS_ prefix, which is stripped here; partners granted in Business Settings may hold tasks beyond the six the grant accepts, such as MANAGE_LEADS or REVENUE.
8859
+ */
8857
8860
  permittedTasks?: Array<(string)>;
8858
8861
  };
8859
8862
  /**
@@ -18342,7 +18345,7 @@ type GetConnectUrlData = {
18342
18345
  */
18343
18346
  profileId: string;
18344
18347
  /**
18345
- * Your custom redirect URL after connection completes. MUST be an absolute http(s) URL or a custom app scheme for mobile deeplinks (e.g. myapp://callback); a relative path is rejected with 400 INVALID_REDIRECT_URL. Result params are appended with the URL API, so an existing query string is preserved. Standard mode appends connected={platform}&profileId=X&accountId=Y&username=Z. Headless mode appends OAuth data params for platforms requiring selection (e.g. LinkedIn orgs, Facebook pages). If no selection is needed, the account is created directly and the redirect includes accountId.
18348
+ * Your custom redirect URL after connection completes. MUST be an absolute http(s) URL or a custom app scheme for mobile deeplinks (e.g. myapp://callback); a relative path is rejected with 400 INVALID_REDIRECT_URL. X (twitter) caps the OAuth `state` at 500 characters and the redirect is carried inside it, so the URL-encoded `redirect_url` must be at most 258 characters for API callers (310 for dashboard sessions; in headless mode the appended `headless=true` counts toward it); a longer one is rejected with 400 INVALID_REDIRECT_URL. Result params are appended with the URL API, so an existing query string is preserved. Standard mode appends connected={platform}&profileId=X&accountId=Y&username=Z. Headless mode appends OAuth data params for platforms requiring selection (e.g. LinkedIn orgs, Facebook pages). If no selection is needed, the account is created directly and the redirect includes accountId.
18346
18349
  *
18347
18350
  * On failure, the browser is sent to the same redirect_url with `error` and `platform` appended.
18348
18351
  * `error` and `platform` are always present. `error_message`, `is_user_fixable`, `reason`,
@@ -21914,6 +21917,19 @@ type GrantBusinessPartnerData = {
21914
21917
  };
21915
21918
  };
21916
21919
  type GrantBusinessPartnerResponse = ({
21920
+ page?: MetaPageOwnership;
21921
+ partner?: {
21922
+ businessId?: string;
21923
+ /**
21924
+ * Tasks the partner currently holds.
21925
+ */
21926
+ permittedTasks?: Array<(string)>;
21927
+ };
21928
+ /**
21929
+ * Always true on this response.
21930
+ */
21931
+ alreadyShared?: boolean;
21932
+ } | {
21917
21933
  page?: MetaPageOwnership;
21918
21934
  partner?: {
21919
21935
  businessId?: string;
package/dist/index.d.ts CHANGED
@@ -8854,6 +8854,9 @@ type MetaPageOwnership = {
8854
8854
  type MetaPagePartner = {
8855
8855
  businessId?: string;
8856
8856
  name?: string;
8857
+ /**
8858
+ * Tasks the partner holds, in the bare spelling the grant takes (ADVERTISE, ANALYZE, MANAGE, ...). Meta reads them back with a PROFILE_PLUS_ prefix, which is stripped here; partners granted in Business Settings may hold tasks beyond the six the grant accepts, such as MANAGE_LEADS or REVENUE.
8859
+ */
8857
8860
  permittedTasks?: Array<(string)>;
8858
8861
  };
8859
8862
  /**
@@ -18342,7 +18345,7 @@ type GetConnectUrlData = {
18342
18345
  */
18343
18346
  profileId: string;
18344
18347
  /**
18345
- * Your custom redirect URL after connection completes. MUST be an absolute http(s) URL or a custom app scheme for mobile deeplinks (e.g. myapp://callback); a relative path is rejected with 400 INVALID_REDIRECT_URL. Result params are appended with the URL API, so an existing query string is preserved. Standard mode appends connected={platform}&profileId=X&accountId=Y&username=Z. Headless mode appends OAuth data params for platforms requiring selection (e.g. LinkedIn orgs, Facebook pages). If no selection is needed, the account is created directly and the redirect includes accountId.
18348
+ * Your custom redirect URL after connection completes. MUST be an absolute http(s) URL or a custom app scheme for mobile deeplinks (e.g. myapp://callback); a relative path is rejected with 400 INVALID_REDIRECT_URL. X (twitter) caps the OAuth `state` at 500 characters and the redirect is carried inside it, so the URL-encoded `redirect_url` must be at most 258 characters for API callers (310 for dashboard sessions; in headless mode the appended `headless=true` counts toward it); a longer one is rejected with 400 INVALID_REDIRECT_URL. Result params are appended with the URL API, so an existing query string is preserved. Standard mode appends connected={platform}&profileId=X&accountId=Y&username=Z. Headless mode appends OAuth data params for platforms requiring selection (e.g. LinkedIn orgs, Facebook pages). If no selection is needed, the account is created directly and the redirect includes accountId.
18346
18349
  *
18347
18350
  * On failure, the browser is sent to the same redirect_url with `error` and `platform` appended.
18348
18351
  * `error` and `platform` are always present. `error_message`, `is_user_fixable`, `reason`,
@@ -21914,6 +21917,19 @@ type GrantBusinessPartnerData = {
21914
21917
  };
21915
21918
  };
21916
21919
  type GrantBusinessPartnerResponse = ({
21920
+ page?: MetaPageOwnership;
21921
+ partner?: {
21922
+ businessId?: string;
21923
+ /**
21924
+ * Tasks the partner currently holds.
21925
+ */
21926
+ permittedTasks?: Array<(string)>;
21927
+ };
21928
+ /**
21929
+ * Always true on this response.
21930
+ */
21931
+ alreadyShared?: boolean;
21932
+ } | {
21917
21933
  page?: MetaPageOwnership;
21918
21934
  partner?: {
21919
21935
  businessId?: string;
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.966",
39
+ version: "0.2.968",
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.966",
8
+ version: "0.2.968",
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.966",
3
+ "version": "0.2.968",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -2632,8 +2632,10 @@ export const listBusinessPartners = <ThrowOnError extends boolean = false>(optio
2632
2632
  *
2633
2633
  * Meta only lets a user token share a Page that a business portfolio owns. A Page
2634
2634
  * outside any portfolio must first be claimed into one at business.facebook.com; this
2635
- * endpoint answers `422` until that is done. Granting to a portfolio that already has
2636
- * access replaces its task set, so the call is safe to repeat.
2635
+ * endpoint answers `422` until that is done. Meta refuses a second grant to a portfolio
2636
+ * that already has access instead of replacing its tasks, so that case answers `200`
2637
+ * with `alreadyShared: true` and the tasks the partner currently holds. To change a
2638
+ * partner's tasks, revoke and grant again.
2637
2639
  *
2638
2640
  * After the grant, the partner assigns its own people to the Page with
2639
2641
  * `POST /v1/ads/page-users`; Meta does not assign partner admins automatically.
@@ -7316,6 +7316,9 @@ export type MetaPageOwnership = {
7316
7316
  export type MetaPagePartner = {
7317
7317
  businessId?: string;
7318
7318
  name?: string;
7319
+ /**
7320
+ * Tasks the partner holds, in the bare spelling the grant takes (ADVERTISE, ANALYZE, MANAGE, ...). Meta reads them back with a PROFILE_PLUS_ prefix, which is stripped here; partners granted in Business Settings may hold tasks beyond the six the grant accepts, such as MANAGE_LEADS or REVENUE.
7321
+ */
7319
7322
  permittedTasks?: Array<(string)>;
7320
7323
  };
7321
7324
 
@@ -17311,7 +17314,7 @@ export type GetConnectUrlData = {
17311
17314
  */
17312
17315
  profileId: string;
17313
17316
  /**
17314
- * Your custom redirect URL after connection completes. MUST be an absolute http(s) URL or a custom app scheme for mobile deeplinks (e.g. myapp://callback); a relative path is rejected with 400 INVALID_REDIRECT_URL. Result params are appended with the URL API, so an existing query string is preserved. Standard mode appends connected={platform}&profileId=X&accountId=Y&username=Z. Headless mode appends OAuth data params for platforms requiring selection (e.g. LinkedIn orgs, Facebook pages). If no selection is needed, the account is created directly and the redirect includes accountId.
17317
+ * Your custom redirect URL after connection completes. MUST be an absolute http(s) URL or a custom app scheme for mobile deeplinks (e.g. myapp://callback); a relative path is rejected with 400 INVALID_REDIRECT_URL. X (twitter) caps the OAuth `state` at 500 characters and the redirect is carried inside it, so the URL-encoded `redirect_url` must be at most 258 characters for API callers (310 for dashboard sessions; in headless mode the appended `headless=true` counts toward it); a longer one is rejected with 400 INVALID_REDIRECT_URL. Result params are appended with the URL API, so an existing query string is preserved. Standard mode appends connected={platform}&profileId=X&accountId=Y&username=Z. Headless mode appends OAuth data params for platforms requiring selection (e.g. LinkedIn orgs, Facebook pages). If no selection is needed, the account is created directly and the redirect includes accountId.
17315
17318
  *
17316
17319
  * On failure, the browser is sent to the same redirect_url with `error` and `platform` appended.
17317
17320
  * `error` and `platform` are always present. `error_message`, `is_user_fixable`, `reason`,
@@ -21071,6 +21074,19 @@ export type GrantBusinessPartnerData = {
21071
21074
  };
21072
21075
 
21073
21076
  export type GrantBusinessPartnerResponse = ({
21077
+ page?: MetaPageOwnership;
21078
+ partner?: {
21079
+ businessId?: string;
21080
+ /**
21081
+ * Tasks the partner currently holds.
21082
+ */
21083
+ permittedTasks?: Array<(string)>;
21084
+ };
21085
+ /**
21086
+ * Always true on this response.
21087
+ */
21088
+ alreadyShared?: boolean;
21089
+ } | {
21074
21090
  page?: MetaPageOwnership;
21075
21091
  partner?: {
21076
21092
  businessId?: string;