@zernio/node 0.2.42 → 0.2.44

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
@@ -198,7 +198,7 @@ declare class Zernio {
198
198
  selectFacebookPage: <ThrowOnError extends boolean = false>(options: _hey_api_client_fetch.OptionsLegacyParser<SelectFacebookPageData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<SelectFacebookPageResponse, unknown, ThrowOnError>;
199
199
  };
200
200
  googleBusiness: {
201
- listGoogleBusinessLocations: <ThrowOnError extends boolean = false>(options: _hey_api_client_fetch.OptionsLegacyParser<ListGoogleBusinessLocationsData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<ListGoogleBusinessLocationsResponse, unknown, ThrowOnError>;
201
+ listGoogleBusinessLocations: <ThrowOnError extends boolean = false>(options?: _hey_api_client_fetch.OptionsLegacyParser<ListGoogleBusinessLocationsData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<ListGoogleBusinessLocationsResponse, unknown, ThrowOnError>;
202
202
  selectGoogleBusinessLocation: <ThrowOnError extends boolean = false>(options: _hey_api_client_fetch.OptionsLegacyParser<SelectGoogleBusinessLocationData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<SelectGoogleBusinessLocationResponse, unknown, ThrowOnError>;
203
203
  };
204
204
  linkedin: {
@@ -4699,15 +4699,19 @@ type SelectFacebookPageError = (unknown | {
4699
4699
  error?: string;
4700
4700
  });
4701
4701
  type ListGoogleBusinessLocationsData = {
4702
- query: {
4702
+ query?: {
4703
4703
  /**
4704
- * Profile ID from your connection flow
4704
+ * Token from the OAuth callback redirect. Preferred over tempToken because it preserves server-side token storage. One of pendingDataToken or tempToken is required.
4705
4705
  */
4706
- profileId: string;
4706
+ pendingDataToken?: string;
4707
4707
  /**
4708
- * Temporary Google access token from the OAuth callback redirect
4708
+ * Profile ID from your connection flow. Required for auth validation when provided.
4709
4709
  */
4710
- tempToken: string;
4710
+ profileId?: string;
4711
+ /**
4712
+ * Legacy. Direct Google access token. Use pendingDataToken instead when available.
4713
+ */
4714
+ tempToken?: string;
4711
4715
  };
4712
4716
  };
4713
4717
  type ListGoogleBusinessLocationsResponse = ({
@@ -4752,28 +4756,9 @@ type SelectGoogleBusinessLocationData = {
4752
4756
  */
4753
4757
  locationId: string;
4754
4758
  /**
4755
- * Temporary Google access token from OAuth
4756
- */
4757
- tempToken: string;
4758
- /**
4759
- * Decoded user profile from the OAuth callback. Contains the refresh token. Always include this field.
4759
+ * Token from the OAuth callback redirect (pendingDataToken query param). Tokens and profile data are retrieved server-side from this token.
4760
4760
  */
4761
- userProfile?: {
4762
- id?: string;
4763
- name?: string;
4764
- /**
4765
- * Google refresh token for long-lived access
4766
- */
4767
- refreshToken?: string;
4768
- /**
4769
- * Token expiration time in seconds
4770
- */
4771
- tokenExpiresIn?: number;
4772
- /**
4773
- * Granted OAuth scopes
4774
- */
4775
- scope?: string;
4776
- };
4761
+ pendingDataToken: string;
4777
4762
  /**
4778
4763
  * Optional custom redirect URL to return to after selection
4779
4764
  */
package/dist/index.d.ts CHANGED
@@ -198,7 +198,7 @@ declare class Zernio {
198
198
  selectFacebookPage: <ThrowOnError extends boolean = false>(options: _hey_api_client_fetch.OptionsLegacyParser<SelectFacebookPageData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<SelectFacebookPageResponse, unknown, ThrowOnError>;
199
199
  };
200
200
  googleBusiness: {
201
- listGoogleBusinessLocations: <ThrowOnError extends boolean = false>(options: _hey_api_client_fetch.OptionsLegacyParser<ListGoogleBusinessLocationsData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<ListGoogleBusinessLocationsResponse, unknown, ThrowOnError>;
201
+ listGoogleBusinessLocations: <ThrowOnError extends boolean = false>(options?: _hey_api_client_fetch.OptionsLegacyParser<ListGoogleBusinessLocationsData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<ListGoogleBusinessLocationsResponse, unknown, ThrowOnError>;
202
202
  selectGoogleBusinessLocation: <ThrowOnError extends boolean = false>(options: _hey_api_client_fetch.OptionsLegacyParser<SelectGoogleBusinessLocationData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<SelectGoogleBusinessLocationResponse, unknown, ThrowOnError>;
203
203
  };
204
204
  linkedin: {
@@ -4699,15 +4699,19 @@ type SelectFacebookPageError = (unknown | {
4699
4699
  error?: string;
4700
4700
  });
4701
4701
  type ListGoogleBusinessLocationsData = {
4702
- query: {
4702
+ query?: {
4703
4703
  /**
4704
- * Profile ID from your connection flow
4704
+ * Token from the OAuth callback redirect. Preferred over tempToken because it preserves server-side token storage. One of pendingDataToken or tempToken is required.
4705
4705
  */
4706
- profileId: string;
4706
+ pendingDataToken?: string;
4707
4707
  /**
4708
- * Temporary Google access token from the OAuth callback redirect
4708
+ * Profile ID from your connection flow. Required for auth validation when provided.
4709
4709
  */
4710
- tempToken: string;
4710
+ profileId?: string;
4711
+ /**
4712
+ * Legacy. Direct Google access token. Use pendingDataToken instead when available.
4713
+ */
4714
+ tempToken?: string;
4711
4715
  };
4712
4716
  };
4713
4717
  type ListGoogleBusinessLocationsResponse = ({
@@ -4752,28 +4756,9 @@ type SelectGoogleBusinessLocationData = {
4752
4756
  */
4753
4757
  locationId: string;
4754
4758
  /**
4755
- * Temporary Google access token from OAuth
4756
- */
4757
- tempToken: string;
4758
- /**
4759
- * Decoded user profile from the OAuth callback. Contains the refresh token. Always include this field.
4759
+ * Token from the OAuth callback redirect (pendingDataToken query param). Tokens and profile data are retrieved server-side from this token.
4760
4760
  */
4761
- userProfile?: {
4762
- id?: string;
4763
- name?: string;
4764
- /**
4765
- * Google refresh token for long-lived access
4766
- */
4767
- refreshToken?: string;
4768
- /**
4769
- * Token expiration time in seconds
4770
- */
4771
- tokenExpiresIn?: number;
4772
- /**
4773
- * Granted OAuth scopes
4774
- */
4775
- scope?: string;
4776
- };
4761
+ pendingDataToken: string;
4777
4762
  /**
4778
4763
  * Optional custom redirect URL to return to after selection
4779
4764
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zernio/node",
3
- "version": "0.2.42",
3
+ "version": "0.2.44",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -719,9 +719,10 @@ export const selectFacebookPage = <ThrowOnError extends boolean = false>(options
719
719
 
720
720
  /**
721
721
  * List GBP locations
722
- * For headless flows. Returns the list of GBP locations the user can manage. Use X-Connect-Token if connecting via API key.
722
+ * For headless flows. Returns the list of GBP locations the user can manage. Use pendingDataToken (from the OAuth callback redirect) to list locations without consuming the token, so it remains available for select-location. Use X-Connect-Token header if connecting via API key.
723
+ *
723
724
  */
724
- export const listGoogleBusinessLocations = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ListGoogleBusinessLocationsData, ThrowOnError>) => {
725
+ export const listGoogleBusinessLocations = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<ListGoogleBusinessLocationsData, ThrowOnError>) => {
725
726
  return (options?.client ?? client).get<ListGoogleBusinessLocationsResponse, ListGoogleBusinessLocationsError, ThrowOnError>({
726
727
  ...options,
727
728
  url: '/v1/connect/googlebusiness/locations'
@@ -730,7 +731,8 @@ export const listGoogleBusinessLocations = <ThrowOnError extends boolean = false
730
731
 
731
732
  /**
732
733
  * Select GBP location
733
- * Complete the headless flow by saving the user's selected GBP location. Include userProfile from the OAuth redirect (contains refresh token). Use X-Connect-Token if connecting via API key.
734
+ * Complete the headless GBP flow by saving the user's selected location. The pendingDataToken is returned in your redirect URL after OAuth completes (step=select_location). Tokens and profile data are stored server-side, so only the pendingDataToken is needed here. Use X-Connect-Token header if connecting via API key.
735
+ *
734
736
  */
735
737
  export const selectGoogleBusinessLocation = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<SelectGoogleBusinessLocationData, ThrowOnError>) => {
736
738
  return (options?.client ?? client).post<SelectGoogleBusinessLocationResponse, SelectGoogleBusinessLocationError, ThrowOnError>({
@@ -1145,9 +1147,10 @@ export const updateLinkedInOrganization = <ThrowOnError extends boolean = false>
1145
1147
  * **Important:** The `mentions` array field in POST /v1/posts is stored for reference only and does NOT trigger @mentions on LinkedIn. You must embed the mention format directly in the content text.
1146
1148
  *
1147
1149
  * **Requirements:**
1148
- * - Person mentions require the LinkedIn account to be admin of at least one organization.
1149
- * - Organization mentions (e.g. @Microsoft) work without this requirement.
1150
+ * - **Person mentions** require the LinkedIn account to be admin of at least one organization. This is a LinkedIn API limitation: the only endpoints that resolve profile URLs to member URNs (`vanityUrl`, `peopleTypeahead`) are scoped to organization followers. There is no public LinkedIn API to resolve a vanity URL without organization context.
1151
+ * - **Organization mentions** (e.g. @Microsoft) work without this requirement.
1150
1152
  * - For person mentions to be clickable, the `displayName` parameter must exactly match the name shown on their LinkedIn profile.
1153
+ * - Person mentions DO work when published from personal profiles (the URN just needs to be valid). The limitation is only in the resolution step (URL to URN), not in publishing.
1151
1154
  *
1152
1155
  */
1153
1156
  export const getLinkedInMentions = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetLinkedInMentionsData, ThrowOnError>) => {
@@ -4418,15 +4418,19 @@ export type SelectFacebookPageError = (unknown | {
4418
4418
  });
4419
4419
 
4420
4420
  export type ListGoogleBusinessLocationsData = {
4421
- query: {
4421
+ query?: {
4422
4422
  /**
4423
- * Profile ID from your connection flow
4423
+ * Token from the OAuth callback redirect. Preferred over tempToken because it preserves server-side token storage. One of pendingDataToken or tempToken is required.
4424
4424
  */
4425
- profileId: string;
4425
+ pendingDataToken?: string;
4426
4426
  /**
4427
- * Temporary Google access token from the OAuth callback redirect
4427
+ * Profile ID from your connection flow. Required for auth validation when provided.
4428
4428
  */
4429
- tempToken: string;
4429
+ profileId?: string;
4430
+ /**
4431
+ * Legacy. Direct Google access token. Use pendingDataToken instead when available.
4432
+ */
4433
+ tempToken?: string;
4430
4434
  };
4431
4435
  };
4432
4436
 
@@ -4474,28 +4478,9 @@ export type SelectGoogleBusinessLocationData = {
4474
4478
  */
4475
4479
  locationId: string;
4476
4480
  /**
4477
- * Temporary Google access token from OAuth
4478
- */
4479
- tempToken: string;
4480
- /**
4481
- * Decoded user profile from the OAuth callback. Contains the refresh token. Always include this field.
4481
+ * Token from the OAuth callback redirect (pendingDataToken query param). Tokens and profile data are retrieved server-side from this token.
4482
4482
  */
4483
- userProfile?: {
4484
- id?: string;
4485
- name?: string;
4486
- /**
4487
- * Google refresh token for long-lived access
4488
- */
4489
- refreshToken?: string;
4490
- /**
4491
- * Token expiration time in seconds
4492
- */
4493
- tokenExpiresIn?: number;
4494
- /**
4495
- * Granted OAuth scopes
4496
- */
4497
- scope?: string;
4498
- };
4483
+ pendingDataToken: string;
4499
4484
  /**
4500
4485
  * Optional custom redirect URL to return to after selection
4501
4486
  */