@zernio/node 0.2.1029 → 0.2.1031

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
@@ -8386,7 +8386,7 @@ type InboxWebhookMessage = {
8386
8386
  */
8387
8387
  parentBusinessScopedUserId?: string;
8388
8388
  /**
8389
- * WhatsApp only. User's WhatsApp username (e.g. `@jane`). Not a
8389
+ * WhatsApp only. User's WhatsApp username (e.g. `jane.shop`). Not a
8390
8390
  * stable identifier, because users can change it. Useful for display, not
8391
8391
  * recommended as an identity anchor.
8392
8392
  *
@@ -13981,7 +13981,7 @@ type WebhookPayloadMessage = {
13981
13981
  */
13982
13982
  parentBusinessScopedUserId?: string;
13983
13983
  /**
13984
- * WhatsApp only. User's WhatsApp username (e.g. `@jane`). Not a
13984
+ * WhatsApp only. User's WhatsApp username (e.g. `jane.shop`). Not a
13985
13985
  * stable identifier, because users can change it. Useful for display,
13986
13986
  * not recommended as an identity anchor.
13987
13987
  *
@@ -19963,6 +19963,10 @@ type GetConnectUrlData = {
19963
19963
  * Your Zernio profile ID (get from /v1/profiles). For WhatsApp, a Zernio-provisioned number can only be connected on the profile it was provisioned to; connecting from any other profile is rejected with a 409.
19964
19964
  */
19965
19965
  profileId: string;
19966
+ /**
19967
+ * Refresh this existing account (a Zernio account id of the same platform on this profile; otherwise 400). The OAuth callback and the selection endpoints (select-page, select-organization, select-board, select-location, Instagram and Snapchat selection) refuse, with `reconnect_account_mismatch`, a login that would write to a different account of the platform on this profile instead of this one. While a profile holds one account per platform the login still replaces this account as before. In headless mode the marker travels in the redirect_url we hand you, so pass that URL back unchanged to the selection endpoint. On X it counts toward the OAuth state limit described under redirect_url.
19968
+ */
19969
+ reconnectAccountId?: string;
19966
19970
  /**
19967
19971
  * 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.
19968
19972
  *
@@ -19971,7 +19975,7 @@ type GetConnectUrlData = {
19971
19975
  * `dashboard_url`, `missing_scopes`, `error_reason` and the `platform_error*` params are
19972
19976
  * conditional and must be treated as optional. Your own query params are kept on every
19973
19977
  * redirect, but ours overwrite a param of yours with the same name. On an error redirect the
19974
- * internal `headless`, `adsConnect` and `adsScope` markers we add during the flow are removed.
19978
+ * internal `headless`, `adsConnect`, `adsScope` and `reconnectAccountId` markers we add during the flow are removed.
19975
19979
  *
19976
19980
  * Correlation (every redirect from an OAuth callback, success and failure, and the
19977
19981
  * `redirect_url` returned by the selection endpoints such as POST /v1/connect/facebook/select-page):
@@ -26070,6 +26074,14 @@ type ListInboxConversationsResponse = ({
26070
26074
  * X verified badge type. Only present for X conversations.
26071
26075
  */
26072
26076
  participantVerifiedType?: ('blue' | 'government' | 'business' | 'none') | null;
26077
+ /**
26078
+ * WhatsApp only. Meta business-scoped user ID (BSUID), the stable identity anchor; present when Meta has sent it for this participant.
26079
+ */
26080
+ businessScopedUserId?: string;
26081
+ /**
26082
+ * WhatsApp only. The participant's WhatsApp username (e.g. `jane.shop`, no leading @). Not a stable identifier, because users can change it: useful for display, not recommended as an identity anchor. Captured from inbound messages, so older threads fill in on their next inbound.
26083
+ */
26084
+ whatsappUsername?: string;
26073
26085
  lastMessage?: string;
26074
26086
  updatedTime?: string;
26075
26087
  status?: 'active' | 'archived';
@@ -26566,6 +26578,14 @@ type GetInboxConversationResponse = ({
26566
26578
  * X verified badge type. Only present for X conversations.
26567
26579
  */
26568
26580
  participantVerifiedType?: ('blue' | 'government' | 'business' | 'none') | null;
26581
+ /**
26582
+ * WhatsApp only. Meta business-scoped user ID (BSUID), the stable identity anchor; present when Meta has sent it for this participant.
26583
+ */
26584
+ businessScopedUserId?: string;
26585
+ /**
26586
+ * WhatsApp only. The participant's WhatsApp username (e.g. `jane.shop`, no leading @). Not a stable identifier, because users can change it: useful for display, not recommended as an identity anchor. Captured from inbound messages, so older threads fill in on their next inbound.
26587
+ */
26588
+ whatsappUsername?: string;
26569
26589
  lastMessage?: string;
26570
26590
  lastMessageAt?: string;
26571
26591
  updatedTime?: string;
package/dist/index.d.ts CHANGED
@@ -8386,7 +8386,7 @@ type InboxWebhookMessage = {
8386
8386
  */
8387
8387
  parentBusinessScopedUserId?: string;
8388
8388
  /**
8389
- * WhatsApp only. User's WhatsApp username (e.g. `@jane`). Not a
8389
+ * WhatsApp only. User's WhatsApp username (e.g. `jane.shop`). Not a
8390
8390
  * stable identifier, because users can change it. Useful for display, not
8391
8391
  * recommended as an identity anchor.
8392
8392
  *
@@ -13981,7 +13981,7 @@ type WebhookPayloadMessage = {
13981
13981
  */
13982
13982
  parentBusinessScopedUserId?: string;
13983
13983
  /**
13984
- * WhatsApp only. User's WhatsApp username (e.g. `@jane`). Not a
13984
+ * WhatsApp only. User's WhatsApp username (e.g. `jane.shop`). Not a
13985
13985
  * stable identifier, because users can change it. Useful for display,
13986
13986
  * not recommended as an identity anchor.
13987
13987
  *
@@ -19963,6 +19963,10 @@ type GetConnectUrlData = {
19963
19963
  * Your Zernio profile ID (get from /v1/profiles). For WhatsApp, a Zernio-provisioned number can only be connected on the profile it was provisioned to; connecting from any other profile is rejected with a 409.
19964
19964
  */
19965
19965
  profileId: string;
19966
+ /**
19967
+ * Refresh this existing account (a Zernio account id of the same platform on this profile; otherwise 400). The OAuth callback and the selection endpoints (select-page, select-organization, select-board, select-location, Instagram and Snapchat selection) refuse, with `reconnect_account_mismatch`, a login that would write to a different account of the platform on this profile instead of this one. While a profile holds one account per platform the login still replaces this account as before. In headless mode the marker travels in the redirect_url we hand you, so pass that URL back unchanged to the selection endpoint. On X it counts toward the OAuth state limit described under redirect_url.
19968
+ */
19969
+ reconnectAccountId?: string;
19966
19970
  /**
19967
19971
  * 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.
19968
19972
  *
@@ -19971,7 +19975,7 @@ type GetConnectUrlData = {
19971
19975
  * `dashboard_url`, `missing_scopes`, `error_reason` and the `platform_error*` params are
19972
19976
  * conditional and must be treated as optional. Your own query params are kept on every
19973
19977
  * redirect, but ours overwrite a param of yours with the same name. On an error redirect the
19974
- * internal `headless`, `adsConnect` and `adsScope` markers we add during the flow are removed.
19978
+ * internal `headless`, `adsConnect`, `adsScope` and `reconnectAccountId` markers we add during the flow are removed.
19975
19979
  *
19976
19980
  * Correlation (every redirect from an OAuth callback, success and failure, and the
19977
19981
  * `redirect_url` returned by the selection endpoints such as POST /v1/connect/facebook/select-page):
@@ -26070,6 +26074,14 @@ type ListInboxConversationsResponse = ({
26070
26074
  * X verified badge type. Only present for X conversations.
26071
26075
  */
26072
26076
  participantVerifiedType?: ('blue' | 'government' | 'business' | 'none') | null;
26077
+ /**
26078
+ * WhatsApp only. Meta business-scoped user ID (BSUID), the stable identity anchor; present when Meta has sent it for this participant.
26079
+ */
26080
+ businessScopedUserId?: string;
26081
+ /**
26082
+ * WhatsApp only. The participant's WhatsApp username (e.g. `jane.shop`, no leading @). Not a stable identifier, because users can change it: useful for display, not recommended as an identity anchor. Captured from inbound messages, so older threads fill in on their next inbound.
26083
+ */
26084
+ whatsappUsername?: string;
26073
26085
  lastMessage?: string;
26074
26086
  updatedTime?: string;
26075
26087
  status?: 'active' | 'archived';
@@ -26566,6 +26578,14 @@ type GetInboxConversationResponse = ({
26566
26578
  * X verified badge type. Only present for X conversations.
26567
26579
  */
26568
26580
  participantVerifiedType?: ('blue' | 'government' | 'business' | 'none') | null;
26581
+ /**
26582
+ * WhatsApp only. Meta business-scoped user ID (BSUID), the stable identity anchor; present when Meta has sent it for this participant.
26583
+ */
26584
+ businessScopedUserId?: string;
26585
+ /**
26586
+ * WhatsApp only. The participant's WhatsApp username (e.g. `jane.shop`, no leading @). Not a stable identifier, because users can change it: useful for display, not recommended as an identity anchor. Captured from inbound messages, so older threads fill in on their next inbound.
26587
+ */
26588
+ whatsappUsername?: string;
26569
26589
  lastMessage?: string;
26570
26590
  lastMessageAt?: string;
26571
26591
  updatedTime?: 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.1029",
39
+ version: "0.2.1031",
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.1029",
8
+ version: "0.2.1031",
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.1029",
3
+ "version": "0.2.1031",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -6710,7 +6710,7 @@ export type InboxWebhookMessage = {
6710
6710
  */
6711
6711
  parentBusinessScopedUserId?: string;
6712
6712
  /**
6713
- * WhatsApp only. User's WhatsApp username (e.g. `@jane`). Not a
6713
+ * WhatsApp only. User's WhatsApp username (e.g. `jane.shop`). Not a
6714
6714
  * stable identifier, because users can change it. Useful for display, not
6715
6715
  * recommended as an identity anchor.
6716
6716
  *
@@ -12557,7 +12557,7 @@ export type WebhookPayloadMessage = {
12557
12557
  */
12558
12558
  parentBusinessScopedUserId?: string;
12559
12559
  /**
12560
- * WhatsApp only. User's WhatsApp username (e.g. `@jane`). Not a
12560
+ * WhatsApp only. User's WhatsApp username (e.g. `jane.shop`). Not a
12561
12561
  * stable identifier, because users can change it. Useful for display,
12562
12562
  * not recommended as an identity anchor.
12563
12563
  *
@@ -18891,6 +18891,10 @@ export type GetConnectUrlData = {
18891
18891
  * Your Zernio profile ID (get from /v1/profiles). For WhatsApp, a Zernio-provisioned number can only be connected on the profile it was provisioned to; connecting from any other profile is rejected with a 409.
18892
18892
  */
18893
18893
  profileId: string;
18894
+ /**
18895
+ * Refresh this existing account (a Zernio account id of the same platform on this profile; otherwise 400). The OAuth callback and the selection endpoints (select-page, select-organization, select-board, select-location, Instagram and Snapchat selection) refuse, with `reconnect_account_mismatch`, a login that would write to a different account of the platform on this profile instead of this one. While a profile holds one account per platform the login still replaces this account as before. In headless mode the marker travels in the redirect_url we hand you, so pass that URL back unchanged to the selection endpoint. On X it counts toward the OAuth state limit described under redirect_url.
18896
+ */
18897
+ reconnectAccountId?: string;
18894
18898
  /**
18895
18899
  * 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.
18896
18900
  *
@@ -18899,7 +18903,7 @@ export type GetConnectUrlData = {
18899
18903
  * `dashboard_url`, `missing_scopes`, `error_reason` and the `platform_error*` params are
18900
18904
  * conditional and must be treated as optional. Your own query params are kept on every
18901
18905
  * redirect, but ours overwrite a param of yours with the same name. On an error redirect the
18902
- * internal `headless`, `adsConnect` and `adsScope` markers we add during the flow are removed.
18906
+ * internal `headless`, `adsConnect`, `adsScope` and `reconnectAccountId` markers we add during the flow are removed.
18903
18907
  *
18904
18908
  * Correlation (every redirect from an OAuth callback, success and failure, and the
18905
18909
  * `redirect_url` returned by the selection endpoints such as POST /v1/connect/facebook/select-page):
@@ -25410,6 +25414,14 @@ export type ListInboxConversationsResponse = ({
25410
25414
  * X verified badge type. Only present for X conversations.
25411
25415
  */
25412
25416
  participantVerifiedType?: ('blue' | 'government' | 'business' | 'none') | null;
25417
+ /**
25418
+ * WhatsApp only. Meta business-scoped user ID (BSUID), the stable identity anchor; present when Meta has sent it for this participant.
25419
+ */
25420
+ businessScopedUserId?: string;
25421
+ /**
25422
+ * WhatsApp only. The participant's WhatsApp username (e.g. `jane.shop`, no leading @). Not a stable identifier, because users can change it: useful for display, not recommended as an identity anchor. Captured from inbound messages, so older threads fill in on their next inbound.
25423
+ */
25424
+ whatsappUsername?: string;
25413
25425
  lastMessage?: string;
25414
25426
  updatedTime?: string;
25415
25427
  status?: 'active' | 'archived';
@@ -25915,6 +25927,14 @@ export type GetInboxConversationResponse = ({
25915
25927
  * X verified badge type. Only present for X conversations.
25916
25928
  */
25917
25929
  participantVerifiedType?: ('blue' | 'government' | 'business' | 'none') | null;
25930
+ /**
25931
+ * WhatsApp only. Meta business-scoped user ID (BSUID), the stable identity anchor; present when Meta has sent it for this participant.
25932
+ */
25933
+ businessScopedUserId?: string;
25934
+ /**
25935
+ * WhatsApp only. The participant's WhatsApp username (e.g. `jane.shop`, no leading @). Not a stable identifier, because users can change it: useful for display, not recommended as an identity anchor. Captured from inbound messages, so older threads fill in on their next inbound.
25936
+ */
25937
+ whatsappUsername?: string;
25918
25938
  lastMessage?: string;
25919
25939
  lastMessageAt?: string;
25920
25940
  updatedTime?: string;