@getlatedev/node 0.2.907 → 0.2.909

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
@@ -16918,7 +16918,7 @@ type GetConnectUrlData = {
16918
16918
  * After your framework decodes the query string once, run one more decodeURIComponent (or
16919
16919
  * equivalent) and then JSON.parse it. `tempToken` and `connect_token` are plain values.
16920
16920
  *
16921
- * `missing_google_permissions` (YouTube and Google Business) means the user unchecked one or more
16921
+ * `missing_google_permissions` (YouTube, Google Business and Google Ads) means the user unchecked one or more
16922
16922
  * permissions on Google's consent screen. It always comes with `is_user_fixable=true`. When Google
16923
16923
  * reported the granted scopes, `missing_scopes` is also present: a comma-separated list of the
16924
16924
  * requested Google scopes that were not granted. Ask the user to connect again and keep every
package/dist/index.d.ts CHANGED
@@ -16918,7 +16918,7 @@ type GetConnectUrlData = {
16918
16918
  * After your framework decodes the query string once, run one more decodeURIComponent (or
16919
16919
  * equivalent) and then JSON.parse it. `tempToken` and `connect_token` are plain values.
16920
16920
  *
16921
- * `missing_google_permissions` (YouTube and Google Business) means the user unchecked one or more
16921
+ * `missing_google_permissions` (YouTube, Google Business and Google Ads) means the user unchecked one or more
16922
16922
  * permissions on Google's consent screen. It always comes with `is_user_fixable=true`. When Google
16923
16923
  * reported the granted scopes, `missing_scopes` is also present: a comma-separated list of the
16924
16924
  * requested Google scopes that were not granted. Ask the user to connect again and keep every
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: "@getlatedev/node",
39
- version: "0.2.907",
39
+ version: "0.2.909",
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: "@getlatedev/node",
8
- version: "0.2.907",
8
+ version: "0.2.909",
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": "@getlatedev/node",
3
- "version": "0.2.907",
3
+ "version": "0.2.909",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -1704,8 +1704,22 @@ export const handleOAuthCallback = <ThrowOnError extends boolean = false>(option
1704
1704
  * - twitter (X Ads): accountId is REQUIRED. There's no ads-only mode, because tweets need to be authored by a real X user.
1705
1705
  *
1706
1706
  * **Standalone platforms (googleads).** Starts the Google Ads OAuth flow and creates a
1707
- * standalone ads SocialAccount (googleads) with no parent. If the account already exists,
1708
- * returns alreadyConnected: true.
1707
+ * standalone ads SocialAccount (googleads) with no parent. If the account already exists and
1708
+ * has at least one discovered Google Ads customer account, returns alreadyConnected: true.
1709
+ * When the existing connection has zero customer accounts (metadata.googleAdsCustomerIds is
1710
+ * empty) or is flagged needsReconnection, it returns an authUrl instead; completing it
1711
+ * reconnects the same account (same accountId) and re-runs ad account discovery. Discovery
1712
+ * includes the client accounts under every manager (MCC) the Google user can reach, and
1713
+ * includes Google Ads test accounts, which Google always reports with status CLOSED. When
1714
+ * discovery finds no usable customer account, the callback saves nothing and redirects with
1715
+ * `error=google_ads_no_ad_accounts`, `platform=googleads` and an `error_message` naming each
1716
+ * customer the Google user can reach and why it was left out (for example
1717
+ * CUSTOMER_NOT_ENABLED). Sign in with a Google user that has access to the ad account or to
1718
+ * its manager account. When the user unticks the Google Ads permission on Google's consent
1719
+ * screen, the callback saves nothing and redirects with `error=missing_google_permissions`,
1720
+ * `platform=googleads`, `is_user_fixable=true` and `missing_scopes`. An existing connection
1721
+ * whose token lacks that permission is flagged needsReconnection, and the health endpoints
1722
+ * report "Google Ads permission not granted"; this endpoint then returns an authUrl for it.
1709
1723
  *
1710
1724
  * Ads accounts appear as regular SocialAccount documents with ads platform values (e.g., metaads, tiktokads) in GET /v1/accounts.
1711
1725
  *
@@ -15959,7 +15959,7 @@ export type GetConnectUrlData = {
15959
15959
  * After your framework decodes the query string once, run one more decodeURIComponent (or
15960
15960
  * equivalent) and then JSON.parse it. `tempToken` and `connect_token` are plain values.
15961
15961
  *
15962
- * `missing_google_permissions` (YouTube and Google Business) means the user unchecked one or more
15962
+ * `missing_google_permissions` (YouTube, Google Business and Google Ads) means the user unchecked one or more
15963
15963
  * permissions on Google's consent screen. It always comes with `is_user_fixable=true`. When Google
15964
15964
  * reported the granted scopes, `missing_scopes` is also present: a comma-separated list of the
15965
15965
  * requested Google scopes that were not granted. Ask the user to connect again and keep every