@zernio/node 0.2.645 → 0.2.647

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
@@ -8449,8 +8449,8 @@ type WebhookPayloadMessage = {
8449
8449
  /**
8450
8450
  * platformMessageId of the message this one is a quote-reply to.
8451
8451
  * WhatsApp (`context.id`), Instagram and Facebook Messenger
8452
- * (`reply_to.mid`). On `message.sent` echoes (operator replied
8453
- * from the native app) this is the only metadata field populated.
8452
+ * (`reply_to.mid`). Outgoing quote-replies carry the same field on
8453
+ * `message.sent`; see WebhookPayloadMessageSent.metadata.
8454
8454
  *
8455
8455
  */
8456
8456
  quotedMessageId?: string;
@@ -8880,7 +8880,10 @@ type WebhookPayloadMessageSent = {
8880
8880
  * Internal conversation ID
8881
8881
  */
8882
8882
  conversationId: string;
8883
- platform: 'instagram' | 'facebook' | 'telegram' | 'whatsapp';
8883
+ /**
8884
+ * Every platform whose outgoing messages Zernio observes. sms is absent on purpose: its carrier receipts update delivery status and never raise message.sent.
8885
+ */
8886
+ platform: 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'twitter' | 'reddit' | 'bluesky' | 'slack';
8884
8887
  /**
8885
8888
  * Platform's message ID
8886
8889
  */
@@ -8934,13 +8937,38 @@ type WebhookPayloadMessageSent = {
8934
8937
  };
8935
8938
  conversation: InboxWebhookConversation;
8936
8939
  account: InboxWebhookAccount;
8940
+ /**
8941
+ * Platform-specific context for the sent message. The key is present only when the send carried some context, and absent otherwise: it is never null and never an empty object.
8942
+ */
8943
+ metadata?: {
8944
+ /**
8945
+ * platformMessageId of the message this send is a quote-reply to.
8946
+ * Set when the reply was sent through Zernio with `replyTo` on the
8947
+ * inbox send API (WhatsApp and Telegram), and when the operator
8948
+ * replied from the native WhatsApp Business, Instagram or Messenger
8949
+ * app. WhatsApp API sends carry it on the event fired from the
8950
+ * delivery status, so it arrives on the same `message.sent` as any
8951
+ * other WhatsApp send.
8952
+ *
8953
+ */
8954
+ quotedMessageId?: string;
8955
+ /**
8956
+ * Slack only. Parent thread ts of the sent message. Pass it back as
8957
+ * `replyTo` on the inbox send API to keep replying inside the thread.
8958
+ *
8959
+ */
8960
+ threadTs?: string;
8961
+ };
8937
8962
  /**
8938
8963
  * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
8939
8964
  */
8940
8965
  timestamp: string;
8941
8966
  };
8942
8967
  type event17 = 'message.sent';
8943
- type platform11 = 'instagram' | 'facebook' | 'telegram' | 'whatsapp';
8968
+ /**
8969
+ * Every platform whose outgoing messages Zernio observes. sms is absent on purpose: its carrier receipts update delivery status and never raise message.sent.
8970
+ */
8971
+ type platform11 = 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'twitter' | 'reddit' | 'bluesky' | 'slack';
8944
8972
  /**
8945
8973
  * WhatsApp send origin. whatsapp_business_app when sent from the WhatsApp Business phone app on a Coexistence number; cloud_api when sent through Zernio (dashboard, API, or broadcasts). Absent on non-WhatsApp platforms. This is not the inbox metadata.source lineage field.
8946
8974
  */
@@ -12387,6 +12415,10 @@ type ListUsersResponse = ({
12387
12415
  isRoot?: boolean;
12388
12416
  profileAccess?: Array<(string)>;
12389
12417
  createdAt?: string;
12418
+ /**
12419
+ * Last sign-in, stamped at most once an hour, so it is accurate to within an hour rather than to the exact session. Omitted for members with no recorded sign-in since the field shipped, which does not mean they never signed in.
12420
+ */
12421
+ lastLoginAt?: string;
12390
12422
  }>;
12391
12423
  });
12392
12424
  type ListUsersError = ({
@@ -19718,13 +19750,21 @@ type AddMessageReactionData = {
19718
19750
  */
19719
19751
  conversationId: string;
19720
19752
  /**
19721
- * The platform message ID to react to
19753
+ * The platform message ID (as returned by GET /messages) or the Zernio message ID (as returned by the reaction webhook)
19722
19754
  */
19723
19755
  messageId: string;
19724
19756
  };
19725
19757
  };
19726
19758
  type AddMessageReactionResponse = ({
19727
19759
  success?: boolean;
19760
+ /**
19761
+ * The Zernio message ID the reaction was resolved against
19762
+ */
19763
+ messageId?: string;
19764
+ /**
19765
+ * The platform message ID the reaction was sent for
19766
+ */
19767
+ platformMessageId?: string;
19728
19768
  });
19729
19769
  type AddMessageReactionError = (unknown | {
19730
19770
  error?: string;
@@ -19736,7 +19776,7 @@ type RemoveMessageReactionData = {
19736
19776
  */
19737
19777
  conversationId: string;
19738
19778
  /**
19739
- * The platform message ID
19779
+ * The platform message ID (as returned by GET /messages) or the Zernio message ID (as returned by the reaction webhook)
19740
19780
  */
19741
19781
  messageId: string;
19742
19782
  };
@@ -19749,6 +19789,14 @@ type RemoveMessageReactionData = {
19749
19789
  };
19750
19790
  type RemoveMessageReactionResponse = ({
19751
19791
  success?: boolean;
19792
+ /**
19793
+ * The Zernio message ID the removal was resolved against
19794
+ */
19795
+ messageId?: string;
19796
+ /**
19797
+ * The platform message ID the removal was sent for
19798
+ */
19799
+ platformMessageId?: string;
19752
19800
  });
19753
19801
  type RemoveMessageReactionError = (unknown | {
19754
19802
  error?: string;
@@ -32548,10 +32596,18 @@ type CreateLeadFormData = {
32548
32596
  thankYouButtonText?: string;
32549
32597
  thankYouButtonType?: string;
32550
32598
  thankYouWebsiteUrl?: string;
32599
+ /**
32600
+ * Adds a 'Continue in Messenger' option to the thank-you page (Meta thank_you_page.enable_messenger), so the lead can carry on chatting with the Page. Set thankYouButtonType to MESSAGE_BUSINESS or P2B_MESSENGER to make the chat the primary button.
32601
+ */
32602
+ thankYouEnableMessenger?: boolean;
32551
32603
  /**
32552
32604
  * Set true for a higher-intent form (adds a review step before submit).
32553
32605
  */
32554
32606
  isOptimizedForQuality?: boolean;
32607
+ /**
32608
+ * Requires the lead to verify their phone number over SMS before the form submits (Meta is_phone_sms_verify_enabled). Only meaningful on a form with a PHONE question. Meta can restrict this parameter to apps holding a capability: when it does, the create fails with a 422 naming platformSpecificData.isPhoneSmsVerifyEnabled, and the toggle then has to be set in Meta's form builder.
32609
+ */
32610
+ isPhoneSmsVerifyEnabled?: boolean;
32555
32611
  blockDisplayForNonTargetedViewer?: boolean;
32556
32612
  questionPageCustomHeadline?: string;
32557
32613
  contextCard?: {
package/dist/index.d.ts CHANGED
@@ -8449,8 +8449,8 @@ type WebhookPayloadMessage = {
8449
8449
  /**
8450
8450
  * platformMessageId of the message this one is a quote-reply to.
8451
8451
  * WhatsApp (`context.id`), Instagram and Facebook Messenger
8452
- * (`reply_to.mid`). On `message.sent` echoes (operator replied
8453
- * from the native app) this is the only metadata field populated.
8452
+ * (`reply_to.mid`). Outgoing quote-replies carry the same field on
8453
+ * `message.sent`; see WebhookPayloadMessageSent.metadata.
8454
8454
  *
8455
8455
  */
8456
8456
  quotedMessageId?: string;
@@ -8880,7 +8880,10 @@ type WebhookPayloadMessageSent = {
8880
8880
  * Internal conversation ID
8881
8881
  */
8882
8882
  conversationId: string;
8883
- platform: 'instagram' | 'facebook' | 'telegram' | 'whatsapp';
8883
+ /**
8884
+ * Every platform whose outgoing messages Zernio observes. sms is absent on purpose: its carrier receipts update delivery status and never raise message.sent.
8885
+ */
8886
+ platform: 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'twitter' | 'reddit' | 'bluesky' | 'slack';
8884
8887
  /**
8885
8888
  * Platform's message ID
8886
8889
  */
@@ -8934,13 +8937,38 @@ type WebhookPayloadMessageSent = {
8934
8937
  };
8935
8938
  conversation: InboxWebhookConversation;
8936
8939
  account: InboxWebhookAccount;
8940
+ /**
8941
+ * Platform-specific context for the sent message. The key is present only when the send carried some context, and absent otherwise: it is never null and never an empty object.
8942
+ */
8943
+ metadata?: {
8944
+ /**
8945
+ * platformMessageId of the message this send is a quote-reply to.
8946
+ * Set when the reply was sent through Zernio with `replyTo` on the
8947
+ * inbox send API (WhatsApp and Telegram), and when the operator
8948
+ * replied from the native WhatsApp Business, Instagram or Messenger
8949
+ * app. WhatsApp API sends carry it on the event fired from the
8950
+ * delivery status, so it arrives on the same `message.sent` as any
8951
+ * other WhatsApp send.
8952
+ *
8953
+ */
8954
+ quotedMessageId?: string;
8955
+ /**
8956
+ * Slack only. Parent thread ts of the sent message. Pass it back as
8957
+ * `replyTo` on the inbox send API to keep replying inside the thread.
8958
+ *
8959
+ */
8960
+ threadTs?: string;
8961
+ };
8937
8962
  /**
8938
8963
  * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
8939
8964
  */
8940
8965
  timestamp: string;
8941
8966
  };
8942
8967
  type event17 = 'message.sent';
8943
- type platform11 = 'instagram' | 'facebook' | 'telegram' | 'whatsapp';
8968
+ /**
8969
+ * Every platform whose outgoing messages Zernio observes. sms is absent on purpose: its carrier receipts update delivery status and never raise message.sent.
8970
+ */
8971
+ type platform11 = 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'twitter' | 'reddit' | 'bluesky' | 'slack';
8944
8972
  /**
8945
8973
  * WhatsApp send origin. whatsapp_business_app when sent from the WhatsApp Business phone app on a Coexistence number; cloud_api when sent through Zernio (dashboard, API, or broadcasts). Absent on non-WhatsApp platforms. This is not the inbox metadata.source lineage field.
8946
8974
  */
@@ -12387,6 +12415,10 @@ type ListUsersResponse = ({
12387
12415
  isRoot?: boolean;
12388
12416
  profileAccess?: Array<(string)>;
12389
12417
  createdAt?: string;
12418
+ /**
12419
+ * Last sign-in, stamped at most once an hour, so it is accurate to within an hour rather than to the exact session. Omitted for members with no recorded sign-in since the field shipped, which does not mean they never signed in.
12420
+ */
12421
+ lastLoginAt?: string;
12390
12422
  }>;
12391
12423
  });
12392
12424
  type ListUsersError = ({
@@ -19718,13 +19750,21 @@ type AddMessageReactionData = {
19718
19750
  */
19719
19751
  conversationId: string;
19720
19752
  /**
19721
- * The platform message ID to react to
19753
+ * The platform message ID (as returned by GET /messages) or the Zernio message ID (as returned by the reaction webhook)
19722
19754
  */
19723
19755
  messageId: string;
19724
19756
  };
19725
19757
  };
19726
19758
  type AddMessageReactionResponse = ({
19727
19759
  success?: boolean;
19760
+ /**
19761
+ * The Zernio message ID the reaction was resolved against
19762
+ */
19763
+ messageId?: string;
19764
+ /**
19765
+ * The platform message ID the reaction was sent for
19766
+ */
19767
+ platformMessageId?: string;
19728
19768
  });
19729
19769
  type AddMessageReactionError = (unknown | {
19730
19770
  error?: string;
@@ -19736,7 +19776,7 @@ type RemoveMessageReactionData = {
19736
19776
  */
19737
19777
  conversationId: string;
19738
19778
  /**
19739
- * The platform message ID
19779
+ * The platform message ID (as returned by GET /messages) or the Zernio message ID (as returned by the reaction webhook)
19740
19780
  */
19741
19781
  messageId: string;
19742
19782
  };
@@ -19749,6 +19789,14 @@ type RemoveMessageReactionData = {
19749
19789
  };
19750
19790
  type RemoveMessageReactionResponse = ({
19751
19791
  success?: boolean;
19792
+ /**
19793
+ * The Zernio message ID the removal was resolved against
19794
+ */
19795
+ messageId?: string;
19796
+ /**
19797
+ * The platform message ID the removal was sent for
19798
+ */
19799
+ platformMessageId?: string;
19752
19800
  });
19753
19801
  type RemoveMessageReactionError = (unknown | {
19754
19802
  error?: string;
@@ -32548,10 +32596,18 @@ type CreateLeadFormData = {
32548
32596
  thankYouButtonText?: string;
32549
32597
  thankYouButtonType?: string;
32550
32598
  thankYouWebsiteUrl?: string;
32599
+ /**
32600
+ * Adds a 'Continue in Messenger' option to the thank-you page (Meta thank_you_page.enable_messenger), so the lead can carry on chatting with the Page. Set thankYouButtonType to MESSAGE_BUSINESS or P2B_MESSENGER to make the chat the primary button.
32601
+ */
32602
+ thankYouEnableMessenger?: boolean;
32551
32603
  /**
32552
32604
  * Set true for a higher-intent form (adds a review step before submit).
32553
32605
  */
32554
32606
  isOptimizedForQuality?: boolean;
32607
+ /**
32608
+ * Requires the lead to verify their phone number over SMS before the form submits (Meta is_phone_sms_verify_enabled). Only meaningful on a form with a PHONE question. Meta can restrict this parameter to apps holding a capability: when it does, the create fails with a 422 naming platformSpecificData.isPhoneSmsVerifyEnabled, and the toggle then has to be set in Meta's form builder.
32609
+ */
32610
+ isPhoneSmsVerifyEnabled?: boolean;
32555
32611
  blockDisplayForNonTargetedViewer?: boolean;
32556
32612
  questionPageCustomHeadline?: string;
32557
32613
  contextCard?: {
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.645",
39
+ version: "0.2.647",
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.645",
8
+ version: "0.2.647",
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.645",
3
+ "version": "0.2.647",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -7398,8 +7398,8 @@ export type WebhookPayloadMessage = {
7398
7398
  /**
7399
7399
  * platformMessageId of the message this one is a quote-reply to.
7400
7400
  * WhatsApp (`context.id`), Instagram and Facebook Messenger
7401
- * (`reply_to.mid`). On `message.sent` echoes (operator replied
7402
- * from the native app) this is the only metadata field populated.
7401
+ * (`reply_to.mid`). Outgoing quote-replies carry the same field on
7402
+ * `message.sent`; see WebhookPayloadMessageSent.metadata.
7403
7403
  *
7404
7404
  */
7405
7405
  quotedMessageId?: string;
@@ -7839,7 +7839,10 @@ export type WebhookPayloadMessageSent = {
7839
7839
  * Internal conversation ID
7840
7840
  */
7841
7841
  conversationId: string;
7842
- platform: 'instagram' | 'facebook' | 'telegram' | 'whatsapp';
7842
+ /**
7843
+ * Every platform whose outgoing messages Zernio observes. sms is absent on purpose: its carrier receipts update delivery status and never raise message.sent.
7844
+ */
7845
+ platform: 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'twitter' | 'reddit' | 'bluesky' | 'slack';
7843
7846
  /**
7844
7847
  * Platform's message ID
7845
7848
  */
@@ -7893,6 +7896,28 @@ export type WebhookPayloadMessageSent = {
7893
7896
  };
7894
7897
  conversation: InboxWebhookConversation;
7895
7898
  account: InboxWebhookAccount;
7899
+ /**
7900
+ * Platform-specific context for the sent message. The key is present only when the send carried some context, and absent otherwise: it is never null and never an empty object.
7901
+ */
7902
+ metadata?: {
7903
+ /**
7904
+ * platformMessageId of the message this send is a quote-reply to.
7905
+ * Set when the reply was sent through Zernio with `replyTo` on the
7906
+ * inbox send API (WhatsApp and Telegram), and when the operator
7907
+ * replied from the native WhatsApp Business, Instagram or Messenger
7908
+ * app. WhatsApp API sends carry it on the event fired from the
7909
+ * delivery status, so it arrives on the same `message.sent` as any
7910
+ * other WhatsApp send.
7911
+ *
7912
+ */
7913
+ quotedMessageId?: string;
7914
+ /**
7915
+ * Slack only. Parent thread ts of the sent message. Pass it back as
7916
+ * `replyTo` on the inbox send API to keep replying inside the thread.
7917
+ *
7918
+ */
7919
+ threadTs?: string;
7920
+ };
7896
7921
  /**
7897
7922
  * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
7898
7923
  */
@@ -7901,7 +7926,10 @@ export type WebhookPayloadMessageSent = {
7901
7926
 
7902
7927
  export type event17 = 'message.sent';
7903
7928
 
7904
- export type platform11 = 'instagram' | 'facebook' | 'telegram' | 'whatsapp';
7929
+ /**
7930
+ * Every platform whose outgoing messages Zernio observes. sms is absent on purpose: its carrier receipts update delivery status and never raise message.sent.
7931
+ */
7932
+ export type platform11 = 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'twitter' | 'reddit' | 'bluesky' | 'slack';
7905
7933
 
7906
7934
  /**
7907
7935
  * WhatsApp send origin. whatsapp_business_app when sent from the WhatsApp Business phone app on a Coexistence number; cloud_api when sent through Zernio (dashboard, API, or broadcasts). Absent on non-WhatsApp platforms. This is not the inbox metadata.source lineage field.
@@ -11578,6 +11606,10 @@ export type ListUsersResponse = ({
11578
11606
  isRoot?: boolean;
11579
11607
  profileAccess?: Array<(string)>;
11580
11608
  createdAt?: string;
11609
+ /**
11610
+ * Last sign-in, stamped at most once an hour, so it is accurate to within an hour rather than to the exact session. Omitted for members with no recorded sign-in since the field shipped, which does not mean they never signed in.
11611
+ */
11612
+ lastLoginAt?: string;
11581
11613
  }>;
11582
11614
  });
11583
11615
 
@@ -19387,7 +19419,7 @@ export type AddMessageReactionData = {
19387
19419
  */
19388
19420
  conversationId: string;
19389
19421
  /**
19390
- * The platform message ID to react to
19422
+ * The platform message ID (as returned by GET /messages) or the Zernio message ID (as returned by the reaction webhook)
19391
19423
  */
19392
19424
  messageId: string;
19393
19425
  };
@@ -19395,6 +19427,14 @@ export type AddMessageReactionData = {
19395
19427
 
19396
19428
  export type AddMessageReactionResponse = ({
19397
19429
  success?: boolean;
19430
+ /**
19431
+ * The Zernio message ID the reaction was resolved against
19432
+ */
19433
+ messageId?: string;
19434
+ /**
19435
+ * The platform message ID the reaction was sent for
19436
+ */
19437
+ platformMessageId?: string;
19398
19438
  });
19399
19439
 
19400
19440
  export type AddMessageReactionError = (unknown | {
@@ -19408,7 +19448,7 @@ export type RemoveMessageReactionData = {
19408
19448
  */
19409
19449
  conversationId: string;
19410
19450
  /**
19411
- * The platform message ID
19451
+ * The platform message ID (as returned by GET /messages) or the Zernio message ID (as returned by the reaction webhook)
19412
19452
  */
19413
19453
  messageId: string;
19414
19454
  };
@@ -19422,6 +19462,14 @@ export type RemoveMessageReactionData = {
19422
19462
 
19423
19463
  export type RemoveMessageReactionResponse = ({
19424
19464
  success?: boolean;
19465
+ /**
19466
+ * The Zernio message ID the removal was resolved against
19467
+ */
19468
+ messageId?: string;
19469
+ /**
19470
+ * The platform message ID the removal was sent for
19471
+ */
19472
+ platformMessageId?: string;
19425
19473
  });
19426
19474
 
19427
19475
  export type RemoveMessageReactionError = (unknown | {
@@ -33131,10 +33179,18 @@ export type CreateLeadFormData = {
33131
33179
  thankYouButtonText?: string;
33132
33180
  thankYouButtonType?: string;
33133
33181
  thankYouWebsiteUrl?: string;
33182
+ /**
33183
+ * Adds a 'Continue in Messenger' option to the thank-you page (Meta thank_you_page.enable_messenger), so the lead can carry on chatting with the Page. Set thankYouButtonType to MESSAGE_BUSINESS or P2B_MESSENGER to make the chat the primary button.
33184
+ */
33185
+ thankYouEnableMessenger?: boolean;
33134
33186
  /**
33135
33187
  * Set true for a higher-intent form (adds a review step before submit).
33136
33188
  */
33137
33189
  isOptimizedForQuality?: boolean;
33190
+ /**
33191
+ * Requires the lead to verify their phone number over SMS before the form submits (Meta is_phone_sms_verify_enabled). Only meaningful on a form with a PHONE question. Meta can restrict this parameter to apps holding a capability: when it does, the create fails with a 422 naming platformSpecificData.isPhoneSmsVerifyEnabled, and the toggle then has to be set in Meta's form builder.
33192
+ */
33193
+ isPhoneSmsVerifyEnabled?: boolean;
33138
33194
  blockDisplayForNonTargetedViewer?: boolean;
33139
33195
  questionPageCustomHeadline?: string;
33140
33196
  contextCard?: {