@warriorteam/messenger-sdk 1.4.2 → 1.5.1

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.cts CHANGED
@@ -40,7 +40,7 @@ interface QuickReply$1 {
40
40
  payload?: string;
41
41
  image_url?: string;
42
42
  }
43
- interface Message$1 {
43
+ interface Message$2 {
44
44
  text?: string;
45
45
  attachment?: Attachment;
46
46
  quick_replies?: QuickReply$1[];
@@ -66,7 +66,7 @@ type MessagingType = 'RESPONSE' | 'UPDATE' | 'MESSAGE_TAG';
66
66
  interface SendMessageRequest {
67
67
  recipient: Recipient;
68
68
  messaging_type: MessagingType;
69
- message?: Message$1;
69
+ message?: Message$2;
70
70
  sender_action?: SenderAction;
71
71
  notification_type?: 'REGULAR' | 'SILENT_PUSH' | 'NO_PUSH';
72
72
  tag?: string;
@@ -317,6 +317,521 @@ declare class ProfileAPI {
317
317
  getProfilePicture(psid: string, options?: APIOptions): Promise<UserProfile>;
318
318
  }
319
319
 
320
+ /**
321
+ * Facebook Messenger Platform - Conversations API Types
322
+ *
323
+ * Type definitions for retrieving conversations and messages between users and Pages/Instagram Business accounts.
324
+ *
325
+ * @see https://developers.facebook.com/docs/messenger-platform/conversations
326
+ */
327
+ /**
328
+ * Platform type for conversations
329
+ */
330
+ type ConversationPlatform = 'instagram' | 'messenger';
331
+ /**
332
+ * Conversation folder types
333
+ */
334
+ type ConversationFolder = 'inbox' | 'pending' | 'spam';
335
+ /**
336
+ * Basic conversation information
337
+ */
338
+ interface Conversation {
339
+ /** The conversation ID */
340
+ id: string;
341
+ /** Timestamp of the most recent message (Unix timestamp) */
342
+ updated_time: string;
343
+ }
344
+ /**
345
+ * Participant in a conversation
346
+ */
347
+ interface ConversationParticipant {
348
+ /** Instagram-scoped ID or Page-scoped ID of a person, or Page ID, or Instagram Business Account ID */
349
+ id: string;
350
+ /** Email of the person or Page (Messenger only) */
351
+ email?: string;
352
+ /** Name of the person or Page (Messenger only) */
353
+ name?: string;
354
+ /** Instagram username of a person or your Instagram Business Account (Instagram only) */
355
+ username?: string;
356
+ }
357
+ /**
358
+ * Detailed conversation with messages and participants
359
+ */
360
+ interface ConversationDetail {
361
+ /** The conversation ID */
362
+ id: string;
363
+ /** Messages in the conversation */
364
+ messages?: {
365
+ data: MessageBasic[];
366
+ paging?: {
367
+ cursors?: {
368
+ before?: string;
369
+ after?: string;
370
+ };
371
+ next?: string;
372
+ previous?: string;
373
+ };
374
+ };
375
+ /** Participants in the conversation */
376
+ participants?: {
377
+ data: ConversationParticipant[];
378
+ };
379
+ /** Timestamp of the most recent message */
380
+ updated_time?: string;
381
+ }
382
+ /**
383
+ * Basic message information (ID and timestamp)
384
+ */
385
+ interface MessageBasic {
386
+ /** The message ID */
387
+ id: string;
388
+ /** When the message was created (ISO 8601 timestamp) */
389
+ created_time: string;
390
+ }
391
+ /**
392
+ * Message sender/recipient information
393
+ */
394
+ interface MessageParticipant {
395
+ /** Instagram-scoped ID or Page-scoped ID or Instagram Business Account ID */
396
+ id: string;
397
+ /** Email (Messenger only) */
398
+ email?: string;
399
+ /** Name (Messenger only) */
400
+ name?: string;
401
+ /** Instagram username (Instagram only) */
402
+ username?: string;
403
+ }
404
+ /**
405
+ * Message attachment types
406
+ */
407
+ type MessageAttachmentType = 'image' | 'video' | 'audio' | 'file';
408
+ /**
409
+ * Image data in attachment
410
+ */
411
+ interface ImageData {
412
+ /** Preview URL of the image */
413
+ preview_url?: string;
414
+ /** Full URL of the image */
415
+ url?: string;
416
+ /** Width in pixels */
417
+ width?: number;
418
+ /** Height in pixels */
419
+ height?: number;
420
+ /** Max width in pixels */
421
+ max_width?: number;
422
+ /** Max height in pixels */
423
+ max_height?: number;
424
+ /** URL of animated GIF preview */
425
+ animated_gif_preview_url?: string;
426
+ /** URL of animated GIF */
427
+ animated_gif_url?: string;
428
+ /** Whether to render as sticker */
429
+ render_as_sticker?: boolean;
430
+ }
431
+ /**
432
+ * Video data in attachment
433
+ */
434
+ interface VideoData {
435
+ /** URL of the video */
436
+ url?: string;
437
+ /** Width in pixels */
438
+ width?: number;
439
+ /** Height in pixels */
440
+ height?: number;
441
+ /** Preview URL */
442
+ preview_url?: string;
443
+ }
444
+ /**
445
+ * Generic template in attachment
446
+ */
447
+ interface GenericTemplate {
448
+ /** Call-to-action button */
449
+ cta?: {
450
+ title?: string;
451
+ type?: string;
452
+ url?: string;
453
+ };
454
+ /** Media URL */
455
+ media_url?: string;
456
+ /** Subtitle text */
457
+ subtitle?: string;
458
+ /** Title text */
459
+ title?: string;
460
+ }
461
+ /**
462
+ * Message attachment
463
+ */
464
+ interface MessageAttachment$1 {
465
+ /** Attachment ID */
466
+ id?: string;
467
+ /** File URL */
468
+ file_url?: string;
469
+ /** Image data */
470
+ image_data?: ImageData;
471
+ /** Video data */
472
+ video_data?: VideoData;
473
+ /** Generic template */
474
+ generic_template?: GenericTemplate;
475
+ /** File name */
476
+ name?: string;
477
+ }
478
+ /**
479
+ * Reaction to a message
480
+ */
481
+ interface MessageReaction {
482
+ /** Emoji reaction (e.g., "❤️", "😂", "👍") */
483
+ reaction: string;
484
+ /** Users who reacted with this emoji */
485
+ users: Array<{
486
+ id: string;
487
+ username?: string;
488
+ }>;
489
+ }
490
+ /**
491
+ * Reply information
492
+ */
493
+ interface ReplyInfo {
494
+ /** Message ID being replied to */
495
+ mid: string;
496
+ /** Whether this is a self-reply (reply to own message) */
497
+ is_self_reply?: boolean;
498
+ }
499
+ /**
500
+ * Story share/mention
501
+ */
502
+ interface StoryShare {
503
+ /** CDN URL of the story */
504
+ link: string;
505
+ /** Story ID */
506
+ id: string;
507
+ }
508
+ /**
509
+ * Product in a share
510
+ */
511
+ interface SharedProduct {
512
+ /** Product ID (0 if business can't see this product) */
513
+ id: string;
514
+ /** ID assigned by the retailer */
515
+ retailer_id?: string;
516
+ /** Product image URL */
517
+ image_url?: string;
518
+ /** Product name */
519
+ name?: string;
520
+ /** Product price */
521
+ price?: string;
522
+ }
523
+ /**
524
+ * Share template payload
525
+ */
526
+ interface ShareTemplatePayload {
527
+ product?: {
528
+ elements?: {
529
+ data: SharedProduct[];
530
+ };
531
+ };
532
+ }
533
+ /**
534
+ * Shared content
535
+ */
536
+ interface MessageShare {
537
+ /** Share template */
538
+ template?: {
539
+ payload?: ShareTemplatePayload;
540
+ };
541
+ }
542
+ /**
543
+ * Message tags
544
+ */
545
+ interface MessageTag {
546
+ /** Tag name (e.g., "inbox", "read", "source:chat") */
547
+ name: string;
548
+ }
549
+ /**
550
+ * Detailed message information
551
+ */
552
+ interface Message$1 {
553
+ /** The message ID */
554
+ id: string;
555
+ /** When the message was created */
556
+ created_time: string;
557
+ /** Sender information */
558
+ from?: MessageParticipant;
559
+ /** Recipient information */
560
+ to?: {
561
+ data: MessageParticipant[];
562
+ };
563
+ /** Text content of the message (empty if no text) */
564
+ message?: string;
565
+ /** Message attachments */
566
+ attachments?: {
567
+ data: MessageAttachment$1[];
568
+ };
569
+ /** Reactions to the message */
570
+ reactions?: {
571
+ data: MessageReaction[];
572
+ };
573
+ /** Shared content (posts, products, etc.) */
574
+ shares?: {
575
+ data: MessageShare[];
576
+ };
577
+ /** Story reply or mention */
578
+ story?: StoryShare;
579
+ /** Reply information */
580
+ reply_to?: ReplyInfo;
581
+ /** Message tags */
582
+ tags?: {
583
+ data: MessageTag[];
584
+ };
585
+ /** Whether the message contains unsupported content */
586
+ is_unsupported?: boolean;
587
+ }
588
+ /**
589
+ * Request parameters for listing conversations
590
+ */
591
+ interface ListConversationsParams {
592
+ /** Platform to filter by */
593
+ platform?: ConversationPlatform;
594
+ /** User ID to find conversations with specific user */
595
+ user_id?: string;
596
+ /** Folder to filter by */
597
+ folder?: ConversationFolder;
598
+ /** Number of conversations to return */
599
+ limit?: number;
600
+ /** Pagination cursor */
601
+ after?: string;
602
+ /** Pagination cursor */
603
+ before?: string;
604
+ }
605
+ /**
606
+ * Request parameters for getting conversation details
607
+ */
608
+ interface GetConversationParams {
609
+ /** Fields to retrieve (e.g., 'messages', 'participants') */
610
+ fields?: string[];
611
+ /** Number of messages to return */
612
+ limit?: number;
613
+ /** Pagination cursor */
614
+ after?: string;
615
+ /** Pagination cursor */
616
+ before?: string;
617
+ }
618
+ /**
619
+ * Request parameters for getting message details
620
+ */
621
+ interface GetMessageParams {
622
+ /** Fields to retrieve */
623
+ fields?: string[];
624
+ }
625
+ /**
626
+ * Response for listing conversations
627
+ */
628
+ interface ListConversationsResponse {
629
+ data: Conversation[];
630
+ paging?: {
631
+ cursors?: {
632
+ before?: string;
633
+ after?: string;
634
+ };
635
+ next?: string;
636
+ previous?: string;
637
+ };
638
+ }
639
+ /**
640
+ * Response for getting messages in a conversation
641
+ */
642
+ interface ListMessagesResponse {
643
+ data: MessageBasic[];
644
+ paging?: {
645
+ cursors?: {
646
+ before?: string;
647
+ after?: string;
648
+ };
649
+ next?: string;
650
+ previous?: string;
651
+ };
652
+ }
653
+
654
+ /**
655
+ * Conversations API Resource
656
+ *
657
+ * Handles retrieving conversations and messages between users and Pages/Instagram Business accounts.
658
+ *
659
+ * @see https://developers.facebook.com/docs/messenger-platform/conversations
660
+ */
661
+
662
+ /**
663
+ * Conversations API class for retrieving conversation and message data
664
+ *
665
+ * @example
666
+ * ```typescript
667
+ * const messenger = new Messenger({ accessToken: 'PAGE_TOKEN' });
668
+ *
669
+ * // List all conversations
670
+ * const conversations = await messenger.conversations.list('PAGE_ID', {
671
+ * platform: 'messenger'
672
+ * });
673
+ *
674
+ * // Get conversation details
675
+ * const conversation = await messenger.conversations.get('CONVERSATION_ID');
676
+ *
677
+ * // Get message details
678
+ * const message = await messenger.conversations.getMessage('MESSAGE_ID');
679
+ * ```
680
+ */
681
+ declare class ConversationsAPI {
682
+ private httpClient;
683
+ constructor(httpClient: HTTPClient);
684
+ /**
685
+ * Get a list of conversations for a Page or Instagram Business Account
686
+ *
687
+ * @param pageId - The Page ID or Instagram Business Account ID
688
+ * @param params - Optional parameters for filtering and pagination
689
+ * @param options - Optional request options (e.g., token override)
690
+ * @returns List of conversations
691
+ *
692
+ * @example
693
+ * ```typescript
694
+ * // List Messenger conversations
695
+ * const conversations = await messenger.conversations.list('PAGE_ID', {
696
+ * platform: 'messenger',
697
+ * limit: 25
698
+ * });
699
+ *
700
+ * // Find conversation with specific user
701
+ * const userConvos = await messenger.conversations.list('PAGE_ID', {
702
+ * platform: 'instagram',
703
+ * user_id: 'USER_INSTAGRAM_SCOPED_ID'
704
+ * });
705
+ *
706
+ * // Paginate through conversations
707
+ * const nextPage = await messenger.conversations.list('PAGE_ID', {
708
+ * platform: 'messenger',
709
+ * after: conversations.paging?.cursors?.after
710
+ * });
711
+ * ```
712
+ */
713
+ list(pageId: string, params?: ListConversationsParams, options?: APIOptions): Promise<ListConversationsResponse>;
714
+ /**
715
+ * Get details about a specific conversation
716
+ *
717
+ * @param conversationId - The conversation ID
718
+ * @param params - Optional parameters for fields and pagination
719
+ * @param options - Optional request options (e.g., token override)
720
+ * @returns Conversation details
721
+ *
722
+ * @example
723
+ * ```typescript
724
+ * // Get conversation with messages
725
+ * const conversation = await messenger.conversations.get('CONVERSATION_ID', {
726
+ * fields: ['messages', 'participants']
727
+ * });
728
+ *
729
+ * // Get only participants
730
+ * const participants = await messenger.conversations.get('CONVERSATION_ID', {
731
+ * fields: ['participants']
732
+ * });
733
+ * ```
734
+ */
735
+ get(conversationId: string, params?: GetConversationParams, options?: APIOptions): Promise<ConversationDetail>;
736
+ /**
737
+ * Get messages in a conversation
738
+ *
739
+ * @param conversationId - The conversation ID
740
+ * @param params - Optional parameters for pagination
741
+ * @param options - Optional request options (e.g., token override)
742
+ * @returns List of messages
743
+ *
744
+ * @example
745
+ * ```typescript
746
+ * // Get messages in a conversation
747
+ * const messages = await messenger.conversations.getMessages('CONVERSATION_ID', {
748
+ * limit: 20
749
+ * });
750
+ *
751
+ * // Paginate through messages
752
+ * const nextPage = await messenger.conversations.getMessages('CONVERSATION_ID', {
753
+ * after: messages.paging?.cursors?.after
754
+ * });
755
+ * ```
756
+ */
757
+ getMessages(conversationId: string, params?: {
758
+ limit?: number;
759
+ after?: string;
760
+ before?: string;
761
+ }, options?: APIOptions): Promise<ListMessagesResponse>;
762
+ /**
763
+ * Get details about a specific message
764
+ *
765
+ * Note: You can only retrieve details for the 20 most recent messages in a conversation.
766
+ * Older messages will return an error indicating the message was deleted.
767
+ *
768
+ * @param messageId - The message ID
769
+ * @param params - Optional parameters for fields to retrieve
770
+ * @param options - Optional request options (e.g., token override)
771
+ * @returns Message details
772
+ *
773
+ * @example
774
+ * ```typescript
775
+ * // Get full message details
776
+ * const message = await messenger.conversations.getMessage('MESSAGE_ID', {
777
+ * fields: ['id', 'created_time', 'from', 'to', 'message', 'attachments', 'reactions']
778
+ * });
779
+ *
780
+ * // Get basic message info
781
+ * const basicMessage = await messenger.conversations.getMessage('MESSAGE_ID');
782
+ * ```
783
+ */
784
+ getMessage(messageId: string, params?: GetMessageParams, options?: APIOptions): Promise<Message$1>;
785
+ /**
786
+ * Get the 20 most recent messages in a conversation with full details
787
+ *
788
+ * This is a convenience method that retrieves message IDs and then fetches
789
+ * full details for each message. Note that only the 20 most recent messages
790
+ * can have their details retrieved.
791
+ *
792
+ * @param conversationId - The conversation ID
793
+ * @param options - Optional request options (e.g., token override)
794
+ * @returns Array of detailed messages
795
+ *
796
+ * @example
797
+ * ```typescript
798
+ * // Get recent messages with full details
799
+ * const messages = await messenger.conversations.getRecentMessages('CONVERSATION_ID');
800
+ *
801
+ * for (const message of messages) {
802
+ * console.log(`${message.from?.username}: ${message.message}`);
803
+ * }
804
+ * ```
805
+ */
806
+ getRecentMessages(conversationId: string, options?: APIOptions): Promise<Message$1[]>;
807
+ /**
808
+ * Find a conversation between a Page and a specific user
809
+ *
810
+ * This is a convenience method that finds a conversation with a specific user.
811
+ *
812
+ * @param pageId - The Page ID or Instagram Business Account ID
813
+ * @param userId - The user's Instagram-scoped ID or Page-scoped ID
814
+ * @param platform - The platform ('instagram' or 'messenger')
815
+ * @param options - Optional request options (e.g., token override)
816
+ * @returns The conversation ID, or null if not found
817
+ *
818
+ * @example
819
+ * ```typescript
820
+ * // Find conversation with Instagram user
821
+ * const conversationId = await messenger.conversations.findByUser(
822
+ * 'PAGE_ID',
823
+ * 'USER_INSTAGRAM_SCOPED_ID',
824
+ * 'instagram'
825
+ * );
826
+ *
827
+ * if (conversationId) {
828
+ * const messages = await messenger.conversations.getRecentMessages(conversationId);
829
+ * }
830
+ * ```
831
+ */
832
+ findByUser(pageId: string, userId: string, platform: 'instagram' | 'messenger', options?: APIOptions): Promise<string | null>;
833
+ }
834
+
320
835
  interface MessengerConfig {
321
836
  accessToken?: string;
322
837
  version?: string;
@@ -330,6 +845,7 @@ declare class Messenger {
330
845
  readonly moderation: ModerationAPI;
331
846
  readonly templates: TemplatesAPI;
332
847
  readonly profile: ProfileAPI;
848
+ readonly conversations: ConversationsAPI;
333
849
  private readonly httpClient;
334
850
  constructor(config?: MessengerConfig);
335
851
  private validateConfig;
@@ -393,7 +909,10 @@ declare enum WebhookEventType {
393
909
  MESSAGE_REACTION = "reaction",
394
910
  MESSAGE_READ = "read",
395
911
  MESSAGING_FEEDBACK = "messaging_feedback",
396
- MESSAGING_POSTBACK = "postback"
912
+ MESSAGING_POSTBACK = "postback",
913
+ FEED = "feed",
914
+ VIDEOS = "videos",
915
+ LIVE_VIDEOS = "live_videos"
397
916
  }
398
917
  /**
399
918
  * Generic webhook entry structure.
@@ -417,6 +936,35 @@ interface WebhookPayload<T extends BaseWebhookEvent = BaseWebhookEvent> {
417
936
  /** Array of entry objects containing the actual events */
418
937
  entry: WebhookEntry<T>[];
419
938
  }
939
+ /**
940
+ * Generic webhook entry structure for Page webhooks (uses 'changes' instead of 'messaging').
941
+ * Represents a single entry in a Page webhook payload.
942
+ */
943
+ interface PageWebhookEntry<T = any> {
944
+ /** Unique ID of the page */
945
+ id: string;
946
+ /** Time of update (epoch time in milliseconds) */
947
+ time: number;
948
+ /** Array of change events */
949
+ changes: T[];
950
+ }
951
+ /**
952
+ * Generic webhook payload structure for Page webhooks.
953
+ * This is the top-level structure received from Facebook Page webhooks.
954
+ */
955
+ interface PageWebhookPayload<T = any> {
956
+ /** Always 'page' for Page webhooks */
957
+ object: 'page';
958
+ /** Array of entry objects containing the actual events */
959
+ entry: PageWebhookEntry<T>[];
960
+ }
961
+ /**
962
+ * Extract all events from a Page webhook payload (uses 'changes' array)
963
+ *
964
+ * @param payload - The Page webhook payload to extract events from
965
+ * @returns Array of Page webhook events
966
+ */
967
+ declare function extractPageEvents<T>(payload: PageWebhookPayload<T>): T[];
420
968
  /**
421
969
  * Common processing context for all webhook events
422
970
  */
@@ -1496,6 +2044,776 @@ declare function isValidQuestionId(questionId: string): boolean;
1496
2044
  */
1497
2045
  declare function isValidTextFeedback(textFeedback: string): boolean;
1498
2046
 
2047
+ /**
2048
+ * Facebook Page - Feed Webhook Types
2049
+ *
2050
+ * These types represent the webhook event structure for feed events.
2051
+ * Triggered when there are changes to a Page's feed, such as Posts, shares,
2052
+ * likes, comments, etc. Webhooks are not sent for Ad Posts, but are sent
2053
+ * for Comments on Ad Posts. Notifications for Page likes will only be sent
2054
+ * for Pages that have fewer than 10K likes.
2055
+ *
2056
+ * @see https://developers.facebook.com/docs/graph-api/webhooks/reference/page/#feed
2057
+ */
2058
+
2059
+ /**
2060
+ * Enumeration of item types in feed events
2061
+ */
2062
+ declare enum FeedItemType {
2063
+ ALBUM = "album",
2064
+ ADDRESS = "address",
2065
+ COMMENT = "comment",
2066
+ CONNECTION = "connection",
2067
+ COUPON = "coupon",
2068
+ EVENT = "event",
2069
+ EXPERIENCE = "experience",
2070
+ GROUP = "group",
2071
+ GROUP_MESSAGE = "group_message",
2072
+ INTEREST = "interest",
2073
+ LINK = "link",
2074
+ MENTION = "mention",
2075
+ MILESTONE = "milestone",
2076
+ NOTE = "note",
2077
+ PAGE = "page",
2078
+ PICTURE = "picture",
2079
+ PLATFORM_STORY = "platform-story",
2080
+ PHOTO = "photo",
2081
+ PHOTO_ALBUM = "photo-album",
2082
+ POST = "post",
2083
+ PROFILE = "profile",
2084
+ QUESTION = "question",
2085
+ RATING = "rating",
2086
+ REACTION = "reaction",
2087
+ RELATIONSHIP_STATUS = "relationship-status",
2088
+ SHARE = "share",
2089
+ STATUS = "status",
2090
+ STORY = "story",
2091
+ TIMELINE_COVER = "timeline cover",
2092
+ TAG = "tag",
2093
+ VIDEO = "video"
2094
+ }
2095
+ /**
2096
+ * Enumeration of action verbs in feed events
2097
+ */
2098
+ declare enum FeedActionVerb {
2099
+ ADD = "add",
2100
+ BLOCK = "block",
2101
+ EDIT = "edit",
2102
+ EDITED = "edited",
2103
+ DELETE = "delete",
2104
+ FOLLOW = "follow",
2105
+ HIDE = "hide",
2106
+ MUTE = "mute",
2107
+ REMOVE = "remove",
2108
+ UNBLOCK = "unblock",
2109
+ UNHIDE = "unhide",
2110
+ UPDATE = "update"
2111
+ }
2112
+ /**
2113
+ * Sender information in feed events
2114
+ */
2115
+ interface FeedSender {
2116
+ /** The ID of the sender */
2117
+ id: string;
2118
+ /** The name of the sender */
2119
+ name?: string;
2120
+ }
2121
+ /**
2122
+ * Page post additional information
2123
+ */
2124
+ interface FeedPagePost {
2125
+ /** Type of the post (e.g., photo, video) */
2126
+ type?: string;
2127
+ /** Status type (e.g., added_photos) */
2128
+ status_type?: string;
2129
+ /** Whether the post is published */
2130
+ is_published?: boolean;
2131
+ /** Timestamp of when the post was last updated */
2132
+ updated_time?: string;
2133
+ /** Permanent static URL to the post */
2134
+ permalink_url?: string;
2135
+ /** Promotion status (e.g., inactive, extendable) */
2136
+ promotion_status?: string;
2137
+ }
2138
+ /**
2139
+ * Feed event value data
2140
+ */
2141
+ interface FeedEventValue {
2142
+ /** Edited time (datetime) */
2143
+ edited_time?: string;
2144
+ /** The sender information */
2145
+ from?: FeedSender;
2146
+ /** Additional post content information */
2147
+ post?: FeedPagePost;
2148
+ /** Description of the type of a status update */
2149
+ status_type?: string;
2150
+ /** Whether a scheduled post was published */
2151
+ is_published?: boolean;
2152
+ /** The time the post was last updated */
2153
+ updated_time?: string;
2154
+ /** The permanent static URL to the post on facebook.com */
2155
+ permalink_url?: string;
2156
+ /** Whether the post is hidden or not */
2157
+ is_hidden?: boolean;
2158
+ /** The link to attached content */
2159
+ link?: string;
2160
+ /** The message that is part of the content */
2161
+ message?: string;
2162
+ /** The link to an attached photo */
2163
+ photo?: string;
2164
+ /** The IDs of the photos that were added to an album */
2165
+ photo_ids?: string[];
2166
+ /** The links to any attached photos */
2167
+ photos?: string[];
2168
+ /** The post ID */
2169
+ post_id?: string;
2170
+ /** The story—only logged for a milestone item */
2171
+ story?: string;
2172
+ /** The title—only logged for a milestone item */
2173
+ title?: string;
2174
+ /** The link to an attached video */
2175
+ video?: string;
2176
+ /** The code why the video is flagged */
2177
+ video_flag_reason?: number;
2178
+ /** The type of action taken */
2179
+ action?: string;
2180
+ /** The album ID */
2181
+ album_id?: string;
2182
+ /** The comment ID */
2183
+ comment_id?: string;
2184
+ /** The timestamp of when the object was created */
2185
+ created_time?: string;
2186
+ /** The ID of the event, if the feed post is an event creation story */
2187
+ event_id?: string;
2188
+ /** The type of item */
2189
+ item?: FeedItemType;
2190
+ /** The ID of the open graph object */
2191
+ open_graph_story_id?: string;
2192
+ /** The parent ID */
2193
+ parent_id?: string;
2194
+ /** The photo ID */
2195
+ photo_id?: string;
2196
+ /** The type of the user reaction */
2197
+ reaction_type?: string;
2198
+ /** Whether the post is published */
2199
+ published?: number;
2200
+ /** The recipient ID */
2201
+ recipient_id?: string;
2202
+ /** The share ID */
2203
+ share_id?: string;
2204
+ /** The type of action taken */
2205
+ verb?: FeedActionVerb;
2206
+ /** The video ID */
2207
+ video_id?: string;
2208
+ }
2209
+ /**
2210
+ * Main webhook event structure for feed events
2211
+ *
2212
+ * This event is triggered when there are changes to a Page's feed.
2213
+ * The webhook provides information about posts, comments, likes, shares, etc.
2214
+ *
2215
+ * @example Post created:
2216
+ * ```json
2217
+ * {
2218
+ * "field": "feed",
2219
+ * "value": {
2220
+ * "from": {
2221
+ * "id": "123456789",
2222
+ * "name": "Page Name"
2223
+ * },
2224
+ * "post_id": "123456789_987654321",
2225
+ * "verb": "add",
2226
+ * "item": "post",
2227
+ * "created_time": "1234567890",
2228
+ * "message": "Hello World!"
2229
+ * }
2230
+ * }
2231
+ * ```
2232
+ */
2233
+ interface FeedWebhookEvent {
2234
+ /** Name of the updated field */
2235
+ field: 'feed';
2236
+ /** The contents of the update */
2237
+ value: FeedEventValue;
2238
+ }
2239
+ /**
2240
+ * Complete webhook payload structure for feed events
2241
+ */
2242
+ interface FeedWebhookPayload extends PageWebhookPayload<FeedWebhookEvent> {
2243
+ }
2244
+ /**
2245
+ * Type guard to check if a webhook event is a feed event
2246
+ *
2247
+ * @param event - The webhook event to check
2248
+ * @returns True if the event is a feed event
2249
+ *
2250
+ * @example
2251
+ * ```typescript
2252
+ * if (isFeedEvent(event)) {
2253
+ * console.log(`Feed event: ${event.value.verb} ${event.value.item}`);
2254
+ * }
2255
+ * ```
2256
+ */
2257
+ declare function isFeedEvent(event: any): event is FeedWebhookEvent;
2258
+ /**
2259
+ * Type guard to check if a feed event is a post creation
2260
+ *
2261
+ * @param value - The feed event value to check
2262
+ * @returns True if the event is a post creation
2263
+ */
2264
+ declare function isPostCreated(value: FeedEventValue): boolean;
2265
+ /**
2266
+ * Type guard to check if a feed event is a comment
2267
+ *
2268
+ * @param value - The feed event value to check
2269
+ * @returns True if the event is a comment
2270
+ */
2271
+ declare function isComment(value: FeedEventValue): boolean;
2272
+ /**
2273
+ * Type guard to check if a feed event is a photo
2274
+ *
2275
+ * @param value - The feed event value to check
2276
+ * @returns True if the event is a photo
2277
+ */
2278
+ declare function isPhoto(value: FeedEventValue): boolean;
2279
+ /**
2280
+ * Type guard to check if a feed event is a video
2281
+ *
2282
+ * @param value - The feed event value to check
2283
+ * @returns True if the event is a video
2284
+ */
2285
+ declare function isVideo(value: FeedEventValue): boolean;
2286
+ /**
2287
+ * Type guard to check if a feed event is a reaction
2288
+ *
2289
+ * @param value - The feed event value to check
2290
+ * @returns True if the event is a reaction
2291
+ */
2292
+ declare function isReaction(value: FeedEventValue): boolean;
2293
+ /**
2294
+ * Type guard to check if a feed event has a message
2295
+ *
2296
+ * @param value - The feed event value to check
2297
+ * @returns True if the event has a message
2298
+ */
2299
+ declare function hasMessage(value: FeedEventValue): value is FeedEventValue & {
2300
+ message: string;
2301
+ };
2302
+ /**
2303
+ * Utility type for extracting just the feed event data
2304
+ */
2305
+ type FeedEventData = FeedEventValue;
2306
+ /**
2307
+ * Processing context for feed events
2308
+ */
2309
+ interface FeedProcessingContext {
2310
+ /** The page ID */
2311
+ pageId: string;
2312
+ /** When the event occurred */
2313
+ timestamp: number;
2314
+ /** Human-readable datetime for the event timestamp */
2315
+ eventDate: Date;
2316
+ /** The sender information */
2317
+ sender?: FeedSender;
2318
+ /** Post ID if available */
2319
+ postId?: string;
2320
+ /** Comment ID if available */
2321
+ commentId?: string;
2322
+ /** The action verb */
2323
+ verb?: FeedActionVerb;
2324
+ /** The item type */
2325
+ item?: FeedItemType;
2326
+ /** Message content if available */
2327
+ message?: string;
2328
+ /** Whether this is a post creation */
2329
+ isPostCreated: boolean;
2330
+ /** Whether this is a comment */
2331
+ isComment: boolean;
2332
+ /** Whether this is a photo */
2333
+ isPhoto: boolean;
2334
+ /** Whether this is a video */
2335
+ isVideo: boolean;
2336
+ /** Whether this is a reaction */
2337
+ isReaction: boolean;
2338
+ }
2339
+ /**
2340
+ * Helper function to extract processing context from a feed event
2341
+ *
2342
+ * @param pageId - The page ID from the webhook entry
2343
+ * @param timestamp - The timestamp from the webhook entry
2344
+ * @param event - The feed webhook event
2345
+ * @returns Simplified processing context
2346
+ *
2347
+ * @example
2348
+ * ```typescript
2349
+ * const context = extractFeedContext(entry.id, entry.time, event);
2350
+ * console.log(`Feed event: ${context.verb} ${context.item}`);
2351
+ * if (context.isPostCreated) {
2352
+ * console.log(`New post created: ${context.message}`);
2353
+ * }
2354
+ * ```
2355
+ */
2356
+ declare function extractFeedContext(pageId: string, timestamp: number, event: FeedWebhookEvent): FeedProcessingContext;
2357
+ /**
2358
+ * Helper function to extract all photos from a feed event
2359
+ *
2360
+ * @param value - The feed event value
2361
+ * @returns Array of photo URLs and IDs
2362
+ *
2363
+ * @example
2364
+ * ```typescript
2365
+ * const photos = extractPhotos(event.value);
2366
+ * console.log(`Found ${photos.length} photo(s)`);
2367
+ * ```
2368
+ */
2369
+ declare function extractPhotos(value: FeedEventValue): Array<{
2370
+ url?: string;
2371
+ id?: string;
2372
+ }>;
2373
+ /**
2374
+ * Constants related to feed events
2375
+ */
2376
+ declare const FEED_CONSTANTS: {
2377
+ /** Webhook field name */
2378
+ readonly FIELD_NAME: "feed";
2379
+ /** Maximum Page likes threshold for notifications */
2380
+ readonly MAX_PAGE_LIKES_FOR_NOTIFICATIONS: 10000;
2381
+ };
2382
+
2383
+ /**
2384
+ * Facebook Page - Videos Webhook Types
2385
+ *
2386
+ * These types represent the webhook event structure for video encoding events.
2387
+ * Triggered when there are changes to the encoding status of a video on a page.
2388
+ *
2389
+ * @see https://developers.facebook.com/docs/graph-api/webhooks/reference/page/#videos
2390
+ */
2391
+
2392
+ /**
2393
+ * Enumeration of video encoding statuses
2394
+ */
2395
+ declare enum VideoStatus {
2396
+ /** Video encoding is in progress */
2397
+ PROCESSING = "processing",
2398
+ /** Video encoding is complete and ready */
2399
+ READY = "ready",
2400
+ /** Video encoding failed */
2401
+ ERROR = "error"
2402
+ }
2403
+ /**
2404
+ * Video status information
2405
+ */
2406
+ interface VideoStatusInfo {
2407
+ /** Current status of the video encoding */
2408
+ video_status: VideoStatus;
2409
+ }
2410
+ /**
2411
+ * Video event value data
2412
+ */
2413
+ interface VideoEventValue {
2414
+ /** The ID of the video */
2415
+ id: string;
2416
+ /** Status information of the video encoding */
2417
+ status: VideoStatusInfo;
2418
+ }
2419
+ /**
2420
+ * Main webhook event structure for videos
2421
+ *
2422
+ * This event is triggered when there are changes to a video's encoding status.
2423
+ * The webhook provides information about the video processing state.
2424
+ *
2425
+ * @example Video processing:
2426
+ * ```json
2427
+ * {
2428
+ * "field": "videos",
2429
+ * "value": {
2430
+ * "id": "123456789",
2431
+ * "status": {
2432
+ * "video_status": "processing"
2433
+ * }
2434
+ * }
2435
+ * }
2436
+ * ```
2437
+ *
2438
+ * @example Video ready:
2439
+ * ```json
2440
+ * {
2441
+ * "field": "videos",
2442
+ * "value": {
2443
+ * "id": "123456789",
2444
+ * "status": {
2445
+ * "video_status": "ready"
2446
+ * }
2447
+ * }
2448
+ * }
2449
+ * ```
2450
+ *
2451
+ * @example Video error:
2452
+ * ```json
2453
+ * {
2454
+ * "field": "videos",
2455
+ * "value": {
2456
+ * "id": "123456789",
2457
+ * "status": {
2458
+ * "video_status": "error"
2459
+ * }
2460
+ * }
2461
+ * }
2462
+ * ```
2463
+ */
2464
+ interface VideoWebhookEvent {
2465
+ /** Name of the updated field */
2466
+ field: 'videos';
2467
+ /** The contents of the update */
2468
+ value: VideoEventValue;
2469
+ }
2470
+ /**
2471
+ * Complete webhook payload structure for video events
2472
+ */
2473
+ interface VideoWebhookPayload extends PageWebhookPayload<VideoWebhookEvent> {
2474
+ }
2475
+ /**
2476
+ * Type guard to check if a webhook event is a video event
2477
+ *
2478
+ * @param event - The webhook event to check
2479
+ * @returns True if the event is a video event
2480
+ *
2481
+ * @example
2482
+ * ```typescript
2483
+ * if (isVideoEvent(event)) {
2484
+ * console.log(`Video ${event.value.id} status: ${event.value.status.video_status}`);
2485
+ * }
2486
+ * ```
2487
+ */
2488
+ declare function isVideoEvent(event: any): event is VideoWebhookEvent;
2489
+ /**
2490
+ * Type guard to check if a video is processing
2491
+ *
2492
+ * @param value - The video event value to check
2493
+ * @returns True if the video is being processed
2494
+ */
2495
+ declare function isProcessing$1(value: VideoEventValue): boolean;
2496
+ /**
2497
+ * Type guard to check if a video is ready
2498
+ *
2499
+ * @param value - The video event value to check
2500
+ * @returns True if the video encoding is complete
2501
+ */
2502
+ declare function isReady(value: VideoEventValue): boolean;
2503
+ /**
2504
+ * Type guard to check if a video encoding failed
2505
+ *
2506
+ * @param value - The video event value to check
2507
+ * @returns True if the video encoding failed
2508
+ */
2509
+ declare function hasError(value: VideoEventValue): boolean;
2510
+ /**
2511
+ * Utility type for extracting just the video event data
2512
+ */
2513
+ type VideoEventData = VideoEventValue;
2514
+ /**
2515
+ * Processing context for video events
2516
+ */
2517
+ interface VideoProcessingContext {
2518
+ /** The page ID */
2519
+ pageId: string;
2520
+ /** When the event occurred */
2521
+ timestamp: number;
2522
+ /** Human-readable datetime for the event timestamp */
2523
+ eventDate: Date;
2524
+ /** The video ID */
2525
+ videoId: string;
2526
+ /** Current video status */
2527
+ status: VideoStatus;
2528
+ /** Whether the video is being processed */
2529
+ isProcessing: boolean;
2530
+ /** Whether the video is ready */
2531
+ isReady: boolean;
2532
+ /** Whether the video encoding failed */
2533
+ hasError: boolean;
2534
+ }
2535
+ /**
2536
+ * Helper function to extract processing context from a video event
2537
+ *
2538
+ * @param pageId - The page ID from the webhook entry
2539
+ * @param timestamp - The timestamp from the webhook entry
2540
+ * @param event - The video webhook event
2541
+ * @returns Simplified processing context
2542
+ *
2543
+ * @example
2544
+ * ```typescript
2545
+ * const context = extractVideoContext(entry.id, entry.time, event);
2546
+ * console.log(`Video ${context.videoId} is ${context.status}`);
2547
+ * if (context.isReady) {
2548
+ * console.log('Video is ready to play!');
2549
+ * } else if (context.hasError) {
2550
+ * console.log('Video encoding failed');
2551
+ * }
2552
+ * ```
2553
+ */
2554
+ declare function extractVideoContext(pageId: string, timestamp: number, event: VideoWebhookEvent): VideoProcessingContext;
2555
+ /**
2556
+ * Helper function to determine if a status change is a transition to ready
2557
+ *
2558
+ * @param fromStatus - The previous status
2559
+ * @param toStatus - The new status
2560
+ * @returns True if this represents completing encoding
2561
+ *
2562
+ * @example
2563
+ * ```typescript
2564
+ * if (isCompletingEncoding(previousStatus, event.value.status.video_status)) {
2565
+ * console.log('Video encoding just completed!');
2566
+ * }
2567
+ * ```
2568
+ */
2569
+ declare function isCompletingEncoding(fromStatus: VideoStatus | undefined, toStatus: VideoStatus): boolean;
2570
+ /**
2571
+ * Helper function to determine if a status change is a transition to error
2572
+ *
2573
+ * @param fromStatus - The previous status
2574
+ * @param toStatus - The new status
2575
+ * @returns True if this represents encoding failure
2576
+ *
2577
+ * @example
2578
+ * ```typescript
2579
+ * if (isEncodingFailed(previousStatus, event.value.status.video_status)) {
2580
+ * console.log('Video encoding failed');
2581
+ * }
2582
+ * ```
2583
+ */
2584
+ declare function isEncodingFailed(fromStatus: VideoStatus | undefined, toStatus: VideoStatus): boolean;
2585
+ /**
2586
+ * Constants related to video events
2587
+ */
2588
+ declare const VIDEO_CONSTANTS: {
2589
+ /** Webhook field name */
2590
+ readonly FIELD_NAME: "videos";
2591
+ /** All possible video statuses */
2592
+ readonly STATUSES: VideoStatus[];
2593
+ };
2594
+
2595
+ /**
2596
+ * Facebook Messenger Platform - Live Videos Webhook Types
2597
+ *
2598
+ * These types represent the webhook event structure for live video events.
2599
+ * Triggered when there are changes to a page's live video status, such as
2600
+ * when a live video starts, ends, or has status updates.
2601
+ *
2602
+ * @see https://developers.facebook.com/docs/graph-api/webhooks/reference/page/#live_videos
2603
+ */
2604
+
2605
+ /**
2606
+ * Enumeration of live video broadcast statuses
2607
+ * Based on Facebook Graph API BroadcastStatus enum
2608
+ *
2609
+ * @see https://developers.facebook.com/docs/graph-api/reference/live-video/
2610
+ */
2611
+ declare enum LiveVideoStatus {
2612
+ /** Live broadcast is currently streaming */
2613
+ LIVE = "LIVE",
2614
+ /** Live broadcast has stopped */
2615
+ LIVE_STOPPED = "LIVE_STOPPED",
2616
+ /** Live broadcast is currently being processed */
2617
+ PROCESSING = "PROCESSING",
2618
+ /** Scheduled broadcast was canceled */
2619
+ SCHEDULED_CANCELED = "SCHEDULED_CANCELED",
2620
+ /** Scheduled broadcast has expired */
2621
+ SCHEDULED_EXPIRED = "SCHEDULED_EXPIRED",
2622
+ /** Live broadcast is scheduled and published */
2623
+ SCHEDULED_LIVE = "SCHEDULED_LIVE",
2624
+ /** Live broadcast is scheduled but unpublished */
2625
+ SCHEDULED_UNPUBLISHED = "SCHEDULED_UNPUBLISHED",
2626
+ /** Live broadcast is unpublished */
2627
+ UNPUBLISHED = "UNPUBLISHED",
2628
+ /** Live broadcast video on demand (VOD) is ready */
2629
+ VOD = "VOD"
2630
+ }
2631
+ /**
2632
+ * Live video event value data
2633
+ */
2634
+ interface LiveVideoEventValue {
2635
+ /** The ID of the live video */
2636
+ id: string;
2637
+ /** Status of the live video (enum value directly) */
2638
+ status: LiveVideoStatus;
2639
+ }
2640
+ /**
2641
+ * Main webhook event structure for live videos
2642
+ *
2643
+ * This event is triggered when there are changes to a page's live video status.
2644
+ * The webhook provides information about the live video state changes.
2645
+ *
2646
+ * @example Live video started:
2647
+ * ```json
2648
+ * {
2649
+ * "field": "live_videos",
2650
+ * "value": {
2651
+ * "id": "123456789",
2652
+ * "status": "LIVE"
2653
+ * }
2654
+ * }
2655
+ * ```
2656
+ *
2657
+ * @example Live video ended:
2658
+ * ```json
2659
+ * {
2660
+ * "field": "live_videos",
2661
+ * "value": {
2662
+ * "id": "123456789",
2663
+ * "status": "LIVE_STOPPED"
2664
+ * }
2665
+ * }
2666
+ * ```
2667
+ */
2668
+ interface LiveVideoWebhookEvent {
2669
+ /** Name of the updated field */
2670
+ field: 'live_videos';
2671
+ /** The contents of the update */
2672
+ value: LiveVideoEventValue;
2673
+ }
2674
+ /**
2675
+ * Complete webhook payload structure for live video events
2676
+ */
2677
+ interface LiveVideoWebhookPayload extends PageWebhookPayload<LiveVideoWebhookEvent> {
2678
+ }
2679
+ /**
2680
+ * Type guard to check if a webhook event is a live video event
2681
+ *
2682
+ * @param event - The webhook event to check
2683
+ * @returns True if the event is a live video event
2684
+ *
2685
+ * @example
2686
+ * ```typescript
2687
+ * if (isLiveVideoEvent(event)) {
2688
+ * console.log(`Live video ${event.value.id} status: ${event.value.status}`);
2689
+ * }
2690
+ * ```
2691
+ */
2692
+ declare function isLiveVideoEvent(event: any): event is LiveVideoWebhookEvent;
2693
+ /**
2694
+ * Type guard to check if a live video is currently live
2695
+ *
2696
+ * @param value - The live video event value to check
2697
+ * @returns True if the live video is currently streaming
2698
+ */
2699
+ declare function isLive(value: LiveVideoEventValue): boolean;
2700
+ /**
2701
+ * Type guard to check if a live video is scheduled
2702
+ *
2703
+ * @param value - The live video event value to check
2704
+ * @returns True if the live video is scheduled
2705
+ */
2706
+ declare function isScheduled(value: LiveVideoEventValue): boolean;
2707
+ /**
2708
+ * Type guard to check if a live video is processing
2709
+ *
2710
+ * @param value - The live video event value to check
2711
+ * @returns True if the live video is being processed
2712
+ */
2713
+ declare function isProcessing(value: LiveVideoEventValue): boolean;
2714
+ /**
2715
+ * Type guard to check if a live video has ended
2716
+ *
2717
+ * @param value - The live video event value to check
2718
+ * @returns True if the live video has stopped, was cancelled, or expired
2719
+ */
2720
+ declare function hasEnded(value: LiveVideoEventValue): boolean;
2721
+ /**
2722
+ * Type guard to check if a live video VOD is ready
2723
+ *
2724
+ * @param value - The live video event value to check
2725
+ * @returns True if the video on demand is ready
2726
+ */
2727
+ declare function isVODReady(value: LiveVideoEventValue): boolean;
2728
+ /**
2729
+ * Utility type for extracting just the live video event data
2730
+ */
2731
+ type LiveVideoEventData = LiveVideoEventValue;
2732
+ /**
2733
+ * Processing context for live video events
2734
+ */
2735
+ interface LiveVideoProcessingContext {
2736
+ /** The page ID */
2737
+ pageId: string;
2738
+ /** When the event occurred */
2739
+ timestamp: number;
2740
+ /** Human-readable datetime for the event timestamp */
2741
+ eventDate: Date;
2742
+ /** The live video ID */
2743
+ videoId: string;
2744
+ /** Current video status */
2745
+ status: LiveVideoStatus;
2746
+ /** Whether the video is currently live */
2747
+ isLive: boolean;
2748
+ /** Whether the video is scheduled */
2749
+ isScheduled: boolean;
2750
+ /** Whether the video is being processed */
2751
+ isProcessing: boolean;
2752
+ /** Whether the video has ended */
2753
+ hasEnded: boolean;
2754
+ /** Whether the VOD is ready */
2755
+ isVODReady: boolean;
2756
+ }
2757
+ /**
2758
+ * Helper function to extract processing context from a live video event
2759
+ *
2760
+ * @param pageId - The page ID from the webhook entry
2761
+ * @param timestamp - The timestamp from the webhook entry
2762
+ * @param event - The live video webhook event
2763
+ * @returns Simplified processing context
2764
+ *
2765
+ * @example
2766
+ * ```typescript
2767
+ * const context = extractLiveVideoContext(entry.id, entry.time, event);
2768
+ * console.log(`Live video ${context.videoId} is ${context.status}`);
2769
+ * if (context.isLive) {
2770
+ * console.log('Stream is currently live!');
2771
+ * } else if (context.hasEnded) {
2772
+ * console.log('Stream has ended');
2773
+ * }
2774
+ * ```
2775
+ */
2776
+ declare function extractLiveVideoContext(pageId: string, timestamp: number, event: LiveVideoWebhookEvent): LiveVideoProcessingContext;
2777
+ /**
2778
+ * Helper function to determine if a status change is a transition to live
2779
+ *
2780
+ * @param fromStatus - The previous status
2781
+ * @param toStatus - The new status
2782
+ * @returns True if this represents going live
2783
+ *
2784
+ * @example
2785
+ * ```typescript
2786
+ * if (isGoingLive(previousStatus, event.value.status)) {
2787
+ * console.log('Video just went live!');
2788
+ * }
2789
+ * ```
2790
+ */
2791
+ declare function isGoingLive(fromStatus: LiveVideoStatus | undefined, toStatus: LiveVideoStatus): boolean;
2792
+ /**
2793
+ * Helper function to determine if a status change is a transition from live to ended
2794
+ *
2795
+ * @param fromStatus - The previous status
2796
+ * @param toStatus - The new status
2797
+ * @returns True if this represents ending a live stream
2798
+ *
2799
+ * @example
2800
+ * ```typescript
2801
+ * if (isEndingLive(previousStatus, event.value.status)) {
2802
+ * console.log('Live stream has ended');
2803
+ * }
2804
+ * ```
2805
+ */
2806
+ declare function isEndingLive(fromStatus: LiveVideoStatus | undefined, toStatus: LiveVideoStatus): boolean;
2807
+ /**
2808
+ * Constants related to live video events
2809
+ */
2810
+ declare const LIVE_VIDEO_CONSTANTS: {
2811
+ /** Webhook field name */
2812
+ readonly FIELD_NAME: "live_videos";
2813
+ /** All possible video statuses */
2814
+ readonly STATUSES: LiveVideoStatus[];
2815
+ };
2816
+
1499
2817
  /**
1500
2818
  * Facebook Messenger Platform - Messages Webhook Types
1501
2819
  *
@@ -2164,4 +3482,4 @@ declare const TEMPLATE_LIMITS: {
2164
3482
  readonly MEDIA_BUTTONS_MAX_COUNT: 3;
2165
3483
  };
2166
3484
 
2167
- export { ATTACHMENT_LIMITS, ATTACHMENT_MIME_TYPES, type AttachmentPayload, type AttachmentType$1 as AttachmentType, type AttachmentUploadRequest, type AttachmentUploadResponse, AttachmentsAPI, type Button, type ButtonTemplatePayload, CESDisplayOption, COMMON_POSTBACK_PAYLOADS, CSATDisplayOption, type DefaultAction, type ErrorResponse, type FallbackAttachmentPayload, type FeedbackFollowUp, type FeedbackQuestion, type FeedbackScreen, FeedbackType, FollowUpType, type GenericTemplateElement, type GenericTemplatePayload, type WebhookPayload as GenericWebhookPayload, type GetProfileRequest, MESSAGE_CONSTANTS, MESSAGE_EDIT_CONSTANTS, MESSAGE_LIMITS, MESSAGE_READS_CONSTANTS, MESSAGING_FEEDBACK_CONSTANTS, type MediaAttachmentPayload, type MediaTemplateElement, type MediaTemplatePayload, type Message$1 as Message, type MessageAttachment, type MessageCommand, type MessageEdit, type MessageEditProcessingContext, type WebhookRecipient as MessageEditRecipient, type WebhookSender as MessageEditSender, type MessageEditWebhookEvent, type MessageEditWebhookPayload, type MessageProcessingContext, MessageReactionAction, type MessageReactionData, type MessageReactionProcessingContext, type WebhookRecipient as MessageReactionRecipient, type WebhookSender as MessageReactionSender, type MessageReactionStats, MessageReactionType, type MessageReactionWebhookConfig, type MessageReactionWebhookEvent, type MessageReactionWebhookPayload, type MessageReadData, type MessageReadsProcessingContext, type MessageReadsWebhookEvent, type MessageReadsWebhookPayload, type WebhookRecipient as MessageRecipient, type MessageReferral, ReferralSource as MessageReferralSource, ReferralType as MessageReferralType, type WebhookSender as MessageSender, MessageValidationError, type MessageWebhookEvent, type MessageWebhookPayload, type MessagingFeedbackData, type MessagingFeedbackProcessingContext, type MessagingFeedbackWebhookEvent, type MessagingFeedbackWebhookPayload, type MessagingPostbackWebhookEvent, type MessagingPostbackWebhookPayload, type MessagingType, Messenger, MessengerAPIError, type MessengerConfig, MessengerConfigError, type MessengerError, MessengerNetworkError, MessengerTimeoutError, type MessengerWebhookEvent, type MessengerWebhookPayload, type ModerateConversationsRequest, type ModerateConversationsResponse, ModerationAPI, type ModerationAction, NPSDisplayOption, POSTBACK_CONSTANTS, type PostbackData, type PostbackEventData, type PostbackPayload, type PostbackProcessingContext, type WebhookRecipient as PostbackRecipient, type PostbackReferral, type WebhookSender as PostbackSender, type ProductTemplateElement, type ProductTemplatePayload, ProfileAPI, type ProfileField, type QuickReply$1 as QuickReply, type Recipient, type ReelAttachmentPayload, type ReferralSource$1 as ReferralSource, type ReferralType$1 as ReferralType, type ReplyTo, SendAPI, type SendMessageRequest, type SendMessageResponse, type SenderAction, type StickerAttachmentPayload, TEMPLATE_LIMITS, TemplateValidationError, TemplatesAPI, type UserId, type UserProfile, type WatermarkTimestamp, AttachmentType as WebhookAttachmentType, type WebhookEntry, type WebhookEventHandlers, WebhookEventType, type Message as WebhookMessage, type QuickReply as WebhookQuickReply, type WebhookSignatureVerificationResult, type WebhookVerificationParams, extractMessageContext, extractMessageEditContext, extractMessageReadsContext, extractMessagingFeedbackContext, extractPostbackContext, extractTextFeedback, extractWebhookEvents, getAttachmentUrls, getAttachmentsByType, getFeedbackScoresByType, getReadMessageCount, getReadMessages, getWebhookEventType, getWebhookPayloadEventTypes, hasAttachments, hasQuickReply, hasReferral, hasReferralData, isAttachmentType, isIdentifiedSender, isMessageEditEvent, isMessageEvent, isMessageRead, isMessageReadsEvent, isMessagingFeedbackEvent, isMessagingPostbackEvent, isReplyMessage, isTextMessage, isValidFeedbackScore, isValidQuestionId, isValidTextFeedback, processWebhookEvents, verifyWebhookSignature, verifyWebhookSubscription };
3485
+ export { ATTACHMENT_LIMITS, ATTACHMENT_MIME_TYPES, type AttachmentPayload, type AttachmentType$1 as AttachmentType, type AttachmentUploadRequest, type AttachmentUploadResponse, AttachmentsAPI, type Button, type ButtonTemplatePayload, CESDisplayOption, COMMON_POSTBACK_PAYLOADS, CSATDisplayOption, type Conversation, type ConversationDetail, type ConversationFolder, type Message$1 as ConversationMessage, type MessageAttachment$1 as ConversationMessageAttachment, type MessageReaction as ConversationMessageReaction, type ConversationParticipant, type ConversationPlatform, ConversationsAPI, type DefaultAction, type ErrorResponse, FEED_CONSTANTS, type FallbackAttachmentPayload, FeedActionVerb, type FeedEventData, type FeedEventValue, FeedItemType, type FeedPagePost, type FeedProcessingContext, type FeedSender, type FeedWebhookEvent, type FeedWebhookPayload, type FeedbackFollowUp, type FeedbackQuestion, type FeedbackScreen, FeedbackType, FollowUpType, type GenericTemplate, type GenericTemplateElement, type GenericTemplatePayload, type WebhookPayload as GenericWebhookPayload, type GetConversationParams, type GetMessageParams, type GetProfileRequest, type ImageData, LIVE_VIDEO_CONSTANTS, type ListConversationsParams, type ListConversationsResponse, type ListMessagesResponse, type LiveVideoEventData, type LiveVideoEventValue, type LiveVideoProcessingContext, LiveVideoStatus, type LiveVideoWebhookEvent, type LiveVideoWebhookPayload, MESSAGE_CONSTANTS, MESSAGE_EDIT_CONSTANTS, MESSAGE_LIMITS, MESSAGE_READS_CONSTANTS, MESSAGING_FEEDBACK_CONSTANTS, type MediaAttachmentPayload, type MediaTemplateElement, type MediaTemplatePayload, type Message$2 as Message, type MessageAttachment, type MessageAttachmentType, type MessageBasic, type MessageCommand, type MessageEdit, type MessageEditProcessingContext, type WebhookRecipient as MessageEditRecipient, type WebhookSender as MessageEditSender, type MessageEditWebhookEvent, type MessageEditWebhookPayload, type MessageParticipant, type MessageProcessingContext, MessageReactionAction, type MessageReactionData, type MessageReactionProcessingContext, type WebhookRecipient as MessageReactionRecipient, type WebhookSender as MessageReactionSender, type MessageReactionStats, MessageReactionType, type MessageReactionWebhookConfig, type MessageReactionWebhookEvent, type MessageReactionWebhookPayload, type MessageReadData, type MessageReadsProcessingContext, type MessageReadsWebhookEvent, type MessageReadsWebhookPayload, type WebhookRecipient as MessageRecipient, type MessageReferral, ReferralSource as MessageReferralSource, ReferralType as MessageReferralType, type WebhookSender as MessageSender, type MessageShare, type MessageTag, MessageValidationError, type MessageWebhookEvent, type MessageWebhookPayload, type MessagingFeedbackData, type MessagingFeedbackProcessingContext, type MessagingFeedbackWebhookEvent, type MessagingFeedbackWebhookPayload, type MessagingPostbackWebhookEvent, type MessagingPostbackWebhookPayload, type MessagingType, Messenger, MessengerAPIError, type MessengerConfig, MessengerConfigError, type MessengerError, MessengerNetworkError, MessengerTimeoutError, type MessengerWebhookEvent, type MessengerWebhookPayload, type ModerateConversationsRequest, type ModerateConversationsResponse, ModerationAPI, type ModerationAction, NPSDisplayOption, POSTBACK_CONSTANTS, type PageWebhookEntry, type PageWebhookPayload, type PostbackData, type PostbackEventData, type PostbackPayload, type PostbackProcessingContext, type WebhookRecipient as PostbackRecipient, type PostbackReferral, type WebhookSender as PostbackSender, type ProductTemplateElement, type ProductTemplatePayload, ProfileAPI, type ProfileField, type QuickReply$1 as QuickReply, type Recipient, type ReelAttachmentPayload, type ReferralSource$1 as ReferralSource, type ReferralType$1 as ReferralType, type ReplyInfo, type ReplyTo, SendAPI, type SendMessageRequest, type SendMessageResponse, type SenderAction, type ShareTemplatePayload, type SharedProduct, type StickerAttachmentPayload, type StoryShare, TEMPLATE_LIMITS, TemplateValidationError, TemplatesAPI, type UserId, type UserProfile, VIDEO_CONSTANTS, type VideoData, type VideoEventData, type VideoEventValue, type VideoProcessingContext, VideoStatus, type VideoStatusInfo, type VideoWebhookEvent, type VideoWebhookPayload, type WatermarkTimestamp, AttachmentType as WebhookAttachmentType, type WebhookEntry, type WebhookEventHandlers, WebhookEventType, type Message as WebhookMessage, type QuickReply as WebhookQuickReply, type WebhookSignatureVerificationResult, type WebhookVerificationParams, extractFeedContext, extractLiveVideoContext, extractMessageContext, extractMessageEditContext, extractMessageReadsContext, extractMessagingFeedbackContext, extractPageEvents, extractPhotos, extractPostbackContext, extractTextFeedback, extractVideoContext, extractWebhookEvents, getAttachmentUrls, getAttachmentsByType, getFeedbackScoresByType, getReadMessageCount, getReadMessages, getWebhookEventType, getWebhookPayloadEventTypes, hasAttachments, hasEnded, hasMessage, hasQuickReply, hasReferral, hasReferralData, isAttachmentType, isComment, isCompletingEncoding, isEncodingFailed, isEndingLive, isFeedEvent, isVideo as isFeedVideo, isGoingLive, isIdentifiedSender, isLive, isLiveVideoEvent, isProcessing as isLiveVideoProcessing, isMessageEditEvent, isMessageEvent, isMessageRead, isMessageReadsEvent, isMessagingFeedbackEvent, isMessagingPostbackEvent, isPhoto, isPostCreated, isReaction, isReplyMessage, isScheduled, isTextMessage, isVODReady, isValidFeedbackScore, isValidQuestionId, isValidTextFeedback, isVideoEvent, isProcessing$1 as isVideoProcessing, isReady as isVideoReady, processWebhookEvents, verifyWebhookSignature, verifyWebhookSubscription, hasError as videoHasError };