@getlatedev/node 0.1.15 → 0.1.17

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.
@@ -1779,6 +1779,27 @@ export type WebhookPayloadMessage = {
1779
1779
  name?: string;
1780
1780
  username?: string;
1781
1781
  picture?: string;
1782
+ /**
1783
+ * Instagram profile data for the sender. Only present for Instagram conversations.
1784
+ */
1785
+ instagramProfile?: {
1786
+ /**
1787
+ * Whether the sender follows your Instagram business account
1788
+ */
1789
+ isFollower?: (boolean) | null;
1790
+ /**
1791
+ * Whether your Instagram business account follows the sender
1792
+ */
1793
+ isFollowing?: (boolean) | null;
1794
+ /**
1795
+ * The sender's follower count on Instagram
1796
+ */
1797
+ followerCount?: (number) | null;
1798
+ /**
1799
+ * Whether the sender is a verified Instagram user
1800
+ */
1801
+ isVerified?: (boolean) | null;
1802
+ } | null;
1782
1803
  };
1783
1804
  sentAt?: string;
1784
1805
  isRead?: boolean;
@@ -1801,6 +1822,27 @@ export type WebhookPayloadMessage = {
1801
1822
  username?: string;
1802
1823
  displayName?: string;
1803
1824
  };
1825
+ /**
1826
+ * Interactive message metadata (present when message is a quick reply tap, postback button tap, or inline keyboard callback)
1827
+ */
1828
+ metadata?: {
1829
+ /**
1830
+ * Payload from a quick reply tap (Meta platforms)
1831
+ */
1832
+ quickReplyPayload?: string;
1833
+ /**
1834
+ * Payload from a postback button tap (Meta platforms)
1835
+ */
1836
+ postbackPayload?: string;
1837
+ /**
1838
+ * Title of the tapped postback button (Meta platforms)
1839
+ */
1840
+ postbackTitle?: string;
1841
+ /**
1842
+ * Callback data from an inline keyboard button tap (Telegram)
1843
+ */
1844
+ callbackData?: string;
1845
+ } | null;
1804
1846
  timestamp?: string;
1805
1847
  };
1806
1848
 
@@ -5341,6 +5383,31 @@ export type ListInboxConversationsResponse = ({
5341
5383
  * Direct link to open the conversation on the platform (if available)
5342
5384
  */
5343
5385
  url?: (string) | null;
5386
+ /**
5387
+ * Instagram profile data for the participant. Only present for Instagram conversations.
5388
+ */
5389
+ instagramProfile?: {
5390
+ /**
5391
+ * Whether the participant follows your Instagram business account
5392
+ */
5393
+ isFollower?: (boolean) | null;
5394
+ /**
5395
+ * Whether your Instagram business account follows the participant
5396
+ */
5397
+ isFollowing?: (boolean) | null;
5398
+ /**
5399
+ * The participant's follower count on Instagram
5400
+ */
5401
+ followerCount?: (number) | null;
5402
+ /**
5403
+ * Whether the participant is a verified Instagram user
5404
+ */
5405
+ isVerified?: (boolean) | null;
5406
+ /**
5407
+ * When this profile data was last fetched from Instagram
5408
+ */
5409
+ fetchedAt?: (string) | null;
5410
+ } | null;
5344
5411
  }>;
5345
5412
  pagination?: {
5346
5413
  hasMore?: boolean;
@@ -5402,6 +5469,31 @@ export type GetInboxConversationResponse = ({
5402
5469
  id?: string;
5403
5470
  name?: string;
5404
5471
  }>;
5472
+ /**
5473
+ * Instagram profile data for the participant. Only present for Instagram conversations.
5474
+ */
5475
+ instagramProfile?: {
5476
+ /**
5477
+ * Whether the participant follows your Instagram business account
5478
+ */
5479
+ isFollower?: (boolean) | null;
5480
+ /**
5481
+ * Whether your Instagram business account follows the participant
5482
+ */
5483
+ isFollowing?: (boolean) | null;
5484
+ /**
5485
+ * The participant's follower count on Instagram
5486
+ */
5487
+ followerCount?: (number) | null;
5488
+ /**
5489
+ * Whether the participant is a verified Instagram user
5490
+ */
5491
+ isVerified?: (boolean) | null;
5492
+ /**
5493
+ * When this profile data was last fetched from Instagram
5494
+ */
5495
+ fetchedAt?: (string) | null;
5496
+ } | null;
5405
5497
  };
5406
5498
  });
5407
5499
 
@@ -5503,7 +5595,120 @@ export type SendInboxMessageData = {
5503
5595
  /**
5504
5596
  * Message text
5505
5597
  */
5506
- message: string;
5598
+ message?: string;
5599
+ /**
5600
+ * Quick reply buttons. Mutually exclusive with buttons. Max 13 items.
5601
+ */
5602
+ quickReplies?: Array<{
5603
+ /**
5604
+ * Button label (max 20 chars)
5605
+ */
5606
+ title: string;
5607
+ /**
5608
+ * Payload sent back on tap
5609
+ */
5610
+ payload: string;
5611
+ /**
5612
+ * Optional icon URL (Meta only)
5613
+ */
5614
+ imageUrl?: string;
5615
+ }>;
5616
+ /**
5617
+ * Action buttons. Mutually exclusive with quickReplies. Max 3 items.
5618
+ */
5619
+ buttons?: Array<{
5620
+ /**
5621
+ * Button type. phone is Facebook only.
5622
+ */
5623
+ type: 'url' | 'postback' | 'phone';
5624
+ /**
5625
+ * Button label (max 20 chars)
5626
+ */
5627
+ title: string;
5628
+ /**
5629
+ * URL for url-type buttons
5630
+ */
5631
+ url?: string;
5632
+ /**
5633
+ * Payload for postback-type buttons
5634
+ */
5635
+ payload?: string;
5636
+ /**
5637
+ * Phone number for phone-type buttons (Facebook only)
5638
+ */
5639
+ phone?: string;
5640
+ }>;
5641
+ /**
5642
+ * Generic template for carousels (Instagram/Facebook only, ignored on Telegram).
5643
+ */
5644
+ template?: {
5645
+ /**
5646
+ * Template type
5647
+ */
5648
+ type?: 'generic';
5649
+ elements?: Array<{
5650
+ /**
5651
+ * Element title (max 80 chars)
5652
+ */
5653
+ title: string;
5654
+ /**
5655
+ * Element subtitle
5656
+ */
5657
+ subtitle?: string;
5658
+ /**
5659
+ * Element image URL
5660
+ */
5661
+ imageUrl?: string;
5662
+ buttons?: Array<{
5663
+ type?: 'url' | 'postback';
5664
+ title?: string;
5665
+ url?: string;
5666
+ payload?: string;
5667
+ }>;
5668
+ }>;
5669
+ };
5670
+ /**
5671
+ * Telegram-native keyboard markup. Ignored on other platforms.
5672
+ */
5673
+ replyMarkup?: {
5674
+ /**
5675
+ * Keyboard type
5676
+ */
5677
+ type?: 'inline_keyboard' | 'reply_keyboard';
5678
+ /**
5679
+ * Array of rows, each row is an array of buttons
5680
+ */
5681
+ keyboard?: Array<Array<{
5682
+ /**
5683
+ * Button text
5684
+ */
5685
+ text?: string;
5686
+ /**
5687
+ * Callback data (inline_keyboard only
5688
+ */
5689
+ callbackData?: string;
5690
+ /**
5691
+ * URL to open (inline_keyboard only)
5692
+ */
5693
+ url?: string;
5694
+ }>>;
5695
+ /**
5696
+ * Hide keyboard after use (reply_keyboard only)
5697
+ */
5698
+ oneTime?: boolean;
5699
+ };
5700
+ /**
5701
+ * Facebook messaging type. Required when using messageTag.
5702
+ */
5703
+ messagingType?: 'RESPONSE' | 'UPDATE' | 'MESSAGE_TAG';
5704
+ /**
5705
+ * Facebook message tag for messaging outside 24h window. Requires messagingType MESSAGE_TAG. Instagram only supports HUMAN_AGENT.
5706
+ */
5707
+ messageTag?: 'CONFIRMED_EVENT_UPDATE' | 'POST_PURCHASE_UPDATE' | 'ACCOUNT_UPDATE' | 'HUMAN_AGENT';
5708
+ /**
5709
+ * Platform message ID to reply to (Telegram only).
5710
+ */
5711
+ replyTo?: string;
5507
5712
  };
5508
5713
  path: {
5509
5714
  /**
@@ -5542,6 +5747,198 @@ export type SendInboxMessageError = ({
5542
5747
  error?: string;
5543
5748
  } | unknown);
5544
5749
 
5750
+ export type EditInboxMessageData = {
5751
+ body: {
5752
+ /**
5753
+ * Social account ID
5754
+ */
5755
+ accountId: string;
5756
+ /**
5757
+ * New message text
5758
+ */
5759
+ text?: string;
5760
+ /**
5761
+ * New inline keyboard markup
5762
+ */
5763
+ replyMarkup?: {
5764
+ type?: 'inline_keyboard';
5765
+ keyboard?: Array<Array<{
5766
+ text?: string;
5767
+ callbackData?: string;
5768
+ url?: string;
5769
+ }>>;
5770
+ };
5771
+ };
5772
+ path: {
5773
+ /**
5774
+ * The conversation ID
5775
+ */
5776
+ conversationId: string;
5777
+ /**
5778
+ * The Telegram message ID to edit
5779
+ */
5780
+ messageId: string;
5781
+ };
5782
+ };
5783
+
5784
+ export type EditInboxMessageResponse = ({
5785
+ success?: boolean;
5786
+ data?: {
5787
+ messageId?: number;
5788
+ };
5789
+ });
5790
+
5791
+ export type EditInboxMessageError = (unknown | {
5792
+ error?: string;
5793
+ });
5794
+
5795
+ export type GetMessengerMenuData = {
5796
+ path: {
5797
+ accountId: string;
5798
+ };
5799
+ };
5800
+
5801
+ export type GetMessengerMenuResponse = ({
5802
+ data?: Array<{
5803
+ [key: string]: unknown;
5804
+ }>;
5805
+ });
5806
+
5807
+ export type GetMessengerMenuError = (unknown | {
5808
+ error?: string;
5809
+ });
5810
+
5811
+ export type SetMessengerMenuData = {
5812
+ body: {
5813
+ /**
5814
+ * Persistent menu configuration array (Meta format)
5815
+ */
5816
+ persistent_menu: Array<{
5817
+ [key: string]: unknown;
5818
+ }>;
5819
+ };
5820
+ path: {
5821
+ accountId: string;
5822
+ };
5823
+ };
5824
+
5825
+ export type SetMessengerMenuResponse = (unknown);
5826
+
5827
+ export type SetMessengerMenuError = (unknown | {
5828
+ error?: string;
5829
+ });
5830
+
5831
+ export type DeleteMessengerMenuData = {
5832
+ path: {
5833
+ accountId: string;
5834
+ };
5835
+ };
5836
+
5837
+ export type DeleteMessengerMenuResponse = (unknown);
5838
+
5839
+ export type DeleteMessengerMenuError = ({
5840
+ error?: string;
5841
+ });
5842
+
5843
+ export type GetInstagramIceBreakersData = {
5844
+ path: {
5845
+ accountId: string;
5846
+ };
5847
+ };
5848
+
5849
+ export type GetInstagramIceBreakersResponse = ({
5850
+ data?: Array<{
5851
+ [key: string]: unknown;
5852
+ }>;
5853
+ });
5854
+
5855
+ export type GetInstagramIceBreakersError = (unknown | {
5856
+ error?: string;
5857
+ });
5858
+
5859
+ export type SetInstagramIceBreakersData = {
5860
+ body: {
5861
+ ice_breakers: Array<{
5862
+ question: string;
5863
+ payload: string;
5864
+ }>;
5865
+ };
5866
+ path: {
5867
+ accountId: string;
5868
+ };
5869
+ };
5870
+
5871
+ export type SetInstagramIceBreakersResponse = (unknown);
5872
+
5873
+ export type SetInstagramIceBreakersError = (unknown | {
5874
+ error?: string;
5875
+ });
5876
+
5877
+ export type DeleteInstagramIceBreakersData = {
5878
+ path: {
5879
+ accountId: string;
5880
+ };
5881
+ };
5882
+
5883
+ export type DeleteInstagramIceBreakersResponse = (unknown);
5884
+
5885
+ export type DeleteInstagramIceBreakersError = ({
5886
+ error?: string;
5887
+ });
5888
+
5889
+ export type GetTelegramCommandsData = {
5890
+ path: {
5891
+ accountId: string;
5892
+ };
5893
+ };
5894
+
5895
+ export type GetTelegramCommandsResponse = ({
5896
+ data?: Array<{
5897
+ command?: string;
5898
+ description?: string;
5899
+ }>;
5900
+ });
5901
+
5902
+ export type GetTelegramCommandsError = (unknown | {
5903
+ error?: string;
5904
+ });
5905
+
5906
+ export type SetTelegramCommandsData = {
5907
+ body: {
5908
+ commands: Array<{
5909
+ /**
5910
+ * Bot command without leading slash
5911
+ */
5912
+ command: string;
5913
+ /**
5914
+ * Command description
5915
+ */
5916
+ description: string;
5917
+ }>;
5918
+ };
5919
+ path: {
5920
+ accountId: string;
5921
+ };
5922
+ };
5923
+
5924
+ export type SetTelegramCommandsResponse = (unknown);
5925
+
5926
+ export type SetTelegramCommandsError = (unknown | {
5927
+ error?: string;
5928
+ });
5929
+
5930
+ export type DeleteTelegramCommandsData = {
5931
+ path: {
5932
+ accountId: string;
5933
+ };
5934
+ };
5935
+
5936
+ export type DeleteTelegramCommandsResponse = (unknown);
5937
+
5938
+ export type DeleteTelegramCommandsError = ({
5939
+ error?: string;
5940
+ });
5941
+
5545
5942
  export type ListInboxCommentsData = {
5546
5943
  query?: {
5547
5944
  /**