@wildix/xbees-conversations-client 4.1.0 → 4.2.0-messaging.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.
Files changed (43) hide show
  1. package/dist-cjs/Conversations.js +4 -4
  2. package/dist-cjs/commands/{GetMessengerChannelIdCommand.js → GetMessagingChannelIdCommand.js} +6 -6
  3. package/dist-cjs/commands/{GetOrCreateMessengerChannelCommand.js → GetOrCreateMessagingChannelCommand.js} +6 -6
  4. package/dist-cjs/commands/index.js +2 -2
  5. package/dist-cjs/models/enums.js +9 -4
  6. package/dist-cjs/schemas/schemas_0.js +47 -47
  7. package/dist-es/Conversations.js +4 -4
  8. package/dist-es/commands/{GetMessengerChannelIdCommand.js → GetMessagingChannelIdCommand.js} +5 -5
  9. package/dist-es/commands/{GetOrCreateMessengerChannelCommand.js → GetOrCreateMessagingChannelCommand.js} +5 -5
  10. package/dist-es/commands/index.js +2 -2
  11. package/dist-es/models/enums.js +8 -3
  12. package/dist-es/schemas/schemas_0.js +45 -45
  13. package/dist-types/Conversations.d.ts +10 -10
  14. package/dist-types/ConversationsClient.d.ts +4 -4
  15. package/dist-types/commands/CreateGroupChannelCommand.d.ts +8 -8
  16. package/dist-types/commands/CreateKiteChannelCommand.d.ts +8 -8
  17. package/dist-types/commands/DescribeEventCommand.d.ts +30 -30
  18. package/dist-types/commands/GetChannelCommand.d.ts +4 -4
  19. package/dist-types/commands/GetMessageCommand.d.ts +2 -2
  20. package/dist-types/commands/GetMessagingChannelIdCommand.d.ts +84 -0
  21. package/dist-types/commands/GetOrCreateDirectChannelCommand.d.ts +4 -4
  22. package/dist-types/commands/{GetOrCreateMessengerChannelCommand.d.ts → GetOrCreateMessagingChannelCommand.d.ts} +28 -27
  23. package/dist-types/commands/GetOrCreateSmsChannelCommand.d.ts +4 -4
  24. package/dist-types/commands/GetOrCreateTelephonyChannelCommand.d.ts +4 -4
  25. package/dist-types/commands/GetOrCreateWhatsAppChannelCommand.d.ts +4 -4
  26. package/dist-types/commands/JoinChannelCommand.d.ts +4 -4
  27. package/dist-types/commands/ListChannelsCommand.d.ts +4 -4
  28. package/dist-types/commands/ListMessagesCommand.d.ts +2 -2
  29. package/dist-types/commands/ListPinnedMessagesCommand.d.ts +2 -2
  30. package/dist-types/commands/PartialUpdateChannelCommand.d.ts +9 -9
  31. package/dist-types/commands/PartialUpdateMessageCommand.d.ts +4 -4
  32. package/dist-types/commands/QueryChannelsCommand.d.ts +4 -4
  33. package/dist-types/commands/SendGiphyCommand.d.ts +2 -2
  34. package/dist-types/commands/SendMessageCommand.d.ts +4 -4
  35. package/dist-types/commands/SendSystemMessageCommand.d.ts +2 -2
  36. package/dist-types/commands/UpdateChannelCommand.d.ts +8 -8
  37. package/dist-types/commands/UpdateMessageCommand.d.ts +4 -4
  38. package/dist-types/commands/index.d.ts +2 -2
  39. package/dist-types/models/enums.d.ts +18 -5
  40. package/dist-types/models/models_0.d.ts +150 -52
  41. package/dist-types/schemas/schemas_0.d.ts +6 -6
  42. package/package.json +2 -2
  43. package/dist-types/commands/GetMessengerChannelIdCommand.d.ts +0 -83
@@ -1,4 +1,4 @@
1
- import type { ActionTriggerStatus, AssignChannelVariant, ButtonVariant, ChannelAccess, ChannelContextEventAttendeeStatus, ChannelContextSource, ChannelMemberRole, ChannelMessengerStatus, ChannelType, ChannelWhatsAppStatus, ConversationFileCategory, GroupChannelCreationEventType, GroupChannelUnsetOptions, MessageMessengerStatus, MessageSmsStatus, MessageType, MessageUnsetFields, MessageWhatsAppStatus, ReactionType, WebhookEventType } from "./enums";
1
+ import type { ActionTriggerStatus, AssignChannelVariant, ButtonVariant, ChannelAccess, ChannelContextEventAttendeeStatus, ChannelContextSource, ChannelMemberRole, ChannelMessagingStatus, ChannelType, ChannelWhatsAppStatus, ConversationFileCategory, GroupChannelCreationEventType, GroupChannelUnsetOptions, MessageMessagingStatus, MessageSmsStatus, MessageType, MessageUnsetFields, MessageWhatsAppStatus, MessagingChannel, ReactionType, WebhookEventType } from "./enums";
2
2
  /**
3
3
  * @public
4
4
  */
@@ -107,19 +107,27 @@ export interface Channel {
107
107
  mms?: boolean | undefined;
108
108
  whatsapp?: boolean | undefined;
109
109
  whatsappStatus?: ChannelWhatsAppStatus | undefined;
110
- messenger?: boolean | undefined;
110
+ /**
111
+ * A customer messaging channel that reaches x-bees through classound and is not SMS or WhatsApp. One discriminator instead of a boolean per channel, so a new channel adds a member here and not a set of channel fields. RCS is listed but not accepted yet: whether an RCS conversation is a telephony channel is still open, so conversations refuses it until its ticket decides.
112
+ * @public
113
+ */
114
+ messagingChannel?: MessagingChannel | undefined;
111
115
  /**
112
116
  * Set when classound refused a reply because the person's messaging window is closed (a 409 on the send). Unset by the next inbound message, which is the only thing that reopens the window.
113
117
  * @public
114
118
  */
115
- messengerStatus?: ChannelMessengerStatus | undefined;
116
- messengerPageId?: string | undefined;
117
- messengerReplyUntil?: number | undefined;
119
+ messagingStatus?: ChannelMessagingStatus | undefined;
120
+ messagingSenderId?: string | undefined;
121
+ messagingReplyUntil?: number | undefined;
118
122
  broadcast?: boolean | undefined;
119
123
  external?: boolean | undefined;
120
124
  autoRecord?: boolean | undefined;
121
125
  transcriptionLanguage?: string | undefined;
122
126
  wizyGuestViewOnly?: boolean | undefined;
127
+ /**
128
+ * Direct-channel ids are the 8-4-4-4-8 slices of the two member ids. An `a_` member id puts `_` in a slice, so the pattern allows it.
129
+ * @public
130
+ */
123
131
  channelId: string;
124
132
  channelType: ChannelType;
125
133
  memberCount: number;
@@ -300,6 +308,10 @@ export interface MessageForward {
300
308
  forwardEmail?: string | undefined;
301
309
  forwardName?: string | undefined;
302
310
  messageId: string;
311
+ /**
312
+ * Direct-channel ids are the 8-4-4-4-8 slices of the two member ids. An `a_` member id puts `_` in a slice, so the pattern allows it.
313
+ * @public
314
+ */
303
315
  channelId: string;
304
316
  }
305
317
  /**
@@ -326,6 +338,10 @@ export interface Reaction {
326
338
  */
327
339
  export interface MessageQuote {
328
340
  messageId: string;
341
+ /**
342
+ * Direct-channel ids are the 8-4-4-4-8 slices of the two member ids. An `a_` member id puts `_` in a slice, so the pattern allows it.
343
+ * @public
344
+ */
329
345
  channelId: string;
330
346
  user: User;
331
347
  text?: string | undefined;
@@ -347,12 +363,16 @@ export interface Message {
347
363
  forward?: MessageForward | undefined;
348
364
  whatsapp?: boolean | undefined;
349
365
  whatsappStatus?: MessageWhatsAppStatus | undefined;
350
- messenger?: boolean | undefined;
351
366
  /**
352
- * The delivery state of a Facebook Messenger message an agent sent, the same four states as WhatsApp. TRYING, SENT and ERROR are written by kite around the send; DELIVERED and a late ERROR arrive through the MESSENGER.STATUS stream event. A READ report is recorded as DELIVERED, as the WhatsApp producer does one hop earlier.
367
+ * A customer messaging channel that reaches x-bees through classound and is not SMS or WhatsApp. One discriminator instead of a boolean per channel, so a new channel adds a member here and not a set of channel fields. RCS is listed but not accepted yet: whether an RCS conversation is a telephony channel is still open, so conversations refuses it until its ticket decides.
353
368
  * @public
354
369
  */
355
- messengerStatus?: MessageMessengerStatus | undefined;
370
+ messagingChannel?: MessagingChannel | undefined;
371
+ /**
372
+ * The delivery state of a message an agent sent over a customer messaging channel (see MessagingChannel), the same four states as WhatsApp. TRYING, SENT and ERROR are written by kite around the send; DELIVERED and a late ERROR arrive through the channel's status stream event (MESSENGER.STATUS today). A READ report is recorded as DELIVERED, as the WhatsApp producer does one hop earlier.
373
+ * @public
374
+ */
375
+ messagingStatus?: MessageMessagingStatus | undefined;
356
376
  sms?: boolean | undefined;
357
377
  smsStatus?: MessageSmsStatus | undefined;
358
378
  markdown?: boolean | undefined;
@@ -361,6 +381,10 @@ export interface Message {
361
381
  silent?: boolean | undefined;
362
382
  event?: string | undefined;
363
383
  messageId: string;
384
+ /**
385
+ * Direct-channel ids are the 8-4-4-4-8 slices of the two member ids. An `a_` member id puts `_` in a slice, so the pattern allows it.
386
+ * @public
387
+ */
364
388
  channelId: string;
365
389
  user: User;
366
390
  edit?: boolean | undefined;
@@ -386,7 +410,7 @@ export interface UserToInvite {
386
410
  */
387
411
  email?: string | undefined;
388
412
  /**
389
- * The phone number of the invited user. This phone number is used to create or find the user if an email address is not provided. On Facebook Messenger it is not a phone number at all: the caller passes the Page Scoped ID, so the identity key stays the one the supplier reports. UserPhone allows up to 17 digits and a Page Scoped ID is 17, so there is no headroom left.
413
+ * The phone number of the invited user. This phone number is used to create or find the user if an email address is not provided. On a customer messaging channel (see MessagingChannel) it is not a phone number at all: the caller passes the channel's own customer id, the Page Scoped ID on Messenger, so the identity key stays the one the supplier reports. UserPhone allows up to 17 digits and a Page Scoped ID is 17, so there is no headroom left, and the Instagram scoped id has to be checked against the same limit.
390
414
  * @public
391
415
  */
392
416
  phone?: string | undefined;
@@ -622,6 +646,10 @@ export declare namespace AssignChannelServiceRequest {
622
646
  * @public
623
647
  */
624
648
  export interface AssignChannelInput {
649
+ /**
650
+ * Direct-channel ids are the 8-4-4-4-8 slices of the two member ids. An `a_` member id puts `_` in a slice, so the pattern allows it.
651
+ * @public
652
+ */
625
653
  channelId: string;
626
654
  /**
627
655
  * The unique identifier of the user when a service token is used.
@@ -763,25 +791,25 @@ export interface CreateGroupChannelInput {
763
791
  */
764
792
  whatsapp?: boolean | undefined;
765
793
  /**
766
- * Indicates if the channel supports Facebook Messenger. Default is false.
794
+ * The customer messaging channel this conversation runs over. Set when the channel is created and never changed. Absent on every other channel.
767
795
  * @public
768
796
  */
769
- messenger?: boolean | undefined;
797
+ messagingChannel?: MessagingChannel | undefined;
770
798
  /**
771
- * The Messenger reply state of the channel: WINDOW_CLOSED after classound refused a reply, absent while a reply can be sent.
799
+ * The reply state of the channel: WINDOW_CLOSED after classound refused a reply, absent while a reply can be sent.
772
800
  * @public
773
801
  */
774
- messengerStatus?: ChannelMessengerStatus | undefined;
802
+ messagingStatus?: ChannelMessagingStatus | undefined;
775
803
  /**
776
- * The Facebook Page ID the conversation runs through. Written by kite from the inbound event, because the channel id hashes the page's linked service and not the page, and a reply has to name the page it is sent from.
804
+ * The business side of the conversation: the Facebook Page ID on Messenger, the Instagram account ID on Instagram. Written by kite from the inbound event, because the channel id hashes the sender's linked service and not the sender, and a reply has to name the sender it is sent from.
777
805
  * @public
778
806
  */
779
- messengerPageId?: string | undefined;
807
+ messagingSenderId?: string | undefined;
780
808
  /**
781
- * Epoch seconds until which a reply still reaches the person: Meta's 7 day HUMAN_AGENT deadline, restarted by each inbound message. classound applies the tag itself, so this is the one deadline a client has to show. 0 means the deadline is not known, which is what the inbound event carries when the session row was gone before it could be read back; it does not mean the window has closed, so a client reads the window as closed on `messengerReplyUntil > 0 && now > messengerReplyUntil` and shows nothing at 0.
809
+ * Epoch seconds until which a reply still reaches the person. On Messenger and Instagram this is Meta's 7 day HUMAN_AGENT deadline, restarted by each inbound message; classound applies the tag itself, so this is the one deadline a client has to show. 0 means the deadline is not known, which is what the inbound event carries when the session row was gone before it could be read back; it does not mean the window has closed, so a client reads the window as closed on `messagingReplyUntil > 0 && now > messagingReplyUntil` and shows nothing at 0. Absent on a channel with no reply window.
782
810
  * @public
783
811
  */
784
- messengerReplyUntil?: number | undefined;
812
+ messagingReplyUntil?: number | undefined;
785
813
  /**
786
814
  * The unique identifier of the assignee.
787
815
  * @public
@@ -872,12 +900,16 @@ export interface InitialMessage {
872
900
  forward?: MessageForward | undefined;
873
901
  whatsapp?: boolean | undefined;
874
902
  whatsappStatus?: MessageWhatsAppStatus | undefined;
875
- messenger?: boolean | undefined;
876
903
  /**
877
- * The delivery state of a Facebook Messenger message an agent sent, the same four states as WhatsApp. TRYING, SENT and ERROR are written by kite around the send; DELIVERED and a late ERROR arrive through the MESSENGER.STATUS stream event. A READ report is recorded as DELIVERED, as the WhatsApp producer does one hop earlier.
904
+ * A customer messaging channel that reaches x-bees through classound and is not SMS or WhatsApp. One discriminator instead of a boolean per channel, so a new channel adds a member here and not a set of channel fields. RCS is listed but not accepted yet: whether an RCS conversation is a telephony channel is still open, so conversations refuses it until its ticket decides.
878
905
  * @public
879
906
  */
880
- messengerStatus?: MessageMessengerStatus | undefined;
907
+ messagingChannel?: MessagingChannel | undefined;
908
+ /**
909
+ * The delivery state of a message an agent sent over a customer messaging channel (see MessagingChannel), the same four states as WhatsApp. TRYING, SENT and ERROR are written by kite around the send; DELIVERED and a late ERROR arrive through the channel's status stream event (MESSENGER.STATUS today). A READ report is recorded as DELIVERED, as the WhatsApp producer does one hop earlier.
910
+ * @public
911
+ */
912
+ messagingStatus?: MessageMessagingStatus | undefined;
881
913
  sms?: boolean | undefined;
882
914
  smsStatus?: MessageSmsStatus | undefined;
883
915
  markdown?: boolean | undefined;
@@ -903,12 +935,16 @@ export interface WelcomeMessage {
903
935
  forward?: MessageForward | undefined;
904
936
  whatsapp?: boolean | undefined;
905
937
  whatsappStatus?: MessageWhatsAppStatus | undefined;
906
- messenger?: boolean | undefined;
907
938
  /**
908
- * The delivery state of a Facebook Messenger message an agent sent, the same four states as WhatsApp. TRYING, SENT and ERROR are written by kite around the send; DELIVERED and a late ERROR arrive through the MESSENGER.STATUS stream event. A READ report is recorded as DELIVERED, as the WhatsApp producer does one hop earlier.
939
+ * A customer messaging channel that reaches x-bees through classound and is not SMS or WhatsApp. One discriminator instead of a boolean per channel, so a new channel adds a member here and not a set of channel fields. RCS is listed but not accepted yet: whether an RCS conversation is a telephony channel is still open, so conversations refuses it until its ticket decides.
940
+ * @public
941
+ */
942
+ messagingChannel?: MessagingChannel | undefined;
943
+ /**
944
+ * The delivery state of a message an agent sent over a customer messaging channel (see MessagingChannel), the same four states as WhatsApp. TRYING, SENT and ERROR are written by kite around the send; DELIVERED and a late ERROR arrive through the channel's status stream event (MESSENGER.STATUS today). A READ report is recorded as DELIVERED, as the WhatsApp producer does one hop earlier.
909
945
  * @public
910
946
  */
911
- messengerStatus?: MessageMessengerStatus | undefined;
947
+ messagingStatus?: MessageMessagingStatus | undefined;
912
948
  sms?: boolean | undefined;
913
949
  smsStatus?: MessageSmsStatus | undefined;
914
950
  markdown?: boolean | undefined;
@@ -1367,6 +1403,10 @@ export interface GetDirectChannelIdInput {
1367
1403
  * @public
1368
1404
  */
1369
1405
  export interface GetDirectChannelIdOutput {
1406
+ /**
1407
+ * Direct-channel ids are the 8-4-4-4-8 slices of the two member ids. An `a_` member id puts `_` in a slice, so the pattern allows it.
1408
+ * @public
1409
+ */
1370
1410
  channelId: string;
1371
1411
  }
1372
1412
  /**
@@ -1423,6 +1463,10 @@ export interface GetInboxStateInput {
1423
1463
  * @public
1424
1464
  */
1425
1465
  export interface InboxPinnedChannel {
1466
+ /**
1467
+ * Direct-channel ids are the 8-4-4-4-8 slices of the two member ids. An `a_` member id puts `_` in a slice, so the pattern allows it.
1468
+ * @public
1469
+ */
1426
1470
  channelId: string;
1427
1471
  pinnedAt: string;
1428
1472
  }
@@ -1430,6 +1474,10 @@ export interface InboxPinnedChannel {
1430
1474
  * @public
1431
1475
  */
1432
1476
  export interface InboxTaggedChannel {
1477
+ /**
1478
+ * Direct-channel ids are the 8-4-4-4-8 slices of the two member ids. An `a_` member id puts `_` in a slice, so the pattern allows it.
1479
+ * @public
1480
+ */
1433
1481
  channelId: string;
1434
1482
  tagId: string;
1435
1483
  }
@@ -1437,6 +1485,10 @@ export interface InboxTaggedChannel {
1437
1485
  * @public
1438
1486
  */
1439
1487
  export interface InboxUnreadChannel {
1488
+ /**
1489
+ * Direct-channel ids are the 8-4-4-4-8 slices of the two member ids. An `a_` member id puts `_` in a slice, so the pattern allows it.
1490
+ * @public
1491
+ */
1440
1492
  channelId: string;
1441
1493
  /**
1442
1494
  * A date when unread indicator was set by the user.
@@ -1484,7 +1536,7 @@ export interface GetMessageOutput {
1484
1536
  /**
1485
1537
  * @public
1486
1538
  */
1487
- export interface GetMessengerChannelIdInput {
1539
+ export interface GetMessagingChannelIdInput {
1488
1540
  /**
1489
1541
  * The unique identifier of the user when a service token is used. Required if used PBX or S2S token.
1490
1542
  * @public
@@ -1505,11 +1557,20 @@ export interface GetMessengerChannelIdInput {
1505
1557
  * @public
1506
1558
  */
1507
1559
  recipientNumber?: string | undefined;
1560
+ /**
1561
+ * The customer messaging channel the conversation runs over.
1562
+ * @public
1563
+ */
1564
+ channel: MessagingChannel;
1508
1565
  }
1509
1566
  /**
1510
1567
  * @public
1511
1568
  */
1512
- export interface GetMessengerChannelIdOutput {
1569
+ export interface GetMessagingChannelIdOutput {
1570
+ /**
1571
+ * Direct-channel ids are the 8-4-4-4-8 slices of the two member ids. An `a_` member id puts `_` in a slice, so the pattern allows it.
1572
+ * @public
1573
+ */
1513
1574
  channelId: string;
1514
1575
  }
1515
1576
  /**
@@ -1541,7 +1602,7 @@ export interface GetOrCreateDirectChannelOutput {
1541
1602
  /**
1542
1603
  * @public
1543
1604
  */
1544
- export interface GetOrCreateMessengerChannelInput {
1605
+ export interface GetOrCreateMessagingChannelInput {
1545
1606
  /**
1546
1607
  * The unique identifier of the user when a service token is used. Required if used PBX or S2S token.
1547
1608
  * @public
@@ -1562,6 +1623,11 @@ export interface GetOrCreateMessengerChannelInput {
1562
1623
  * @public
1563
1624
  */
1564
1625
  recipientNumber?: string | undefined;
1626
+ /**
1627
+ * The customer messaging channel the conversation runs over.
1628
+ * @public
1629
+ */
1630
+ channel: MessagingChannel;
1565
1631
  /**
1566
1632
  * Indicates if the channel is outgoing. It's prevents applying routing settings for the channel. This parameter will be reset to false after 48 hours. Default is false.
1567
1633
  * @public
@@ -1571,7 +1637,7 @@ export interface GetOrCreateMessengerChannelInput {
1571
1637
  /**
1572
1638
  * @public
1573
1639
  */
1574
- export interface GetOrCreateMessengerChannelOutput {
1640
+ export interface GetOrCreateMessagingChannelOutput {
1575
1641
  channel: Channel;
1576
1642
  }
1577
1643
  /**
@@ -1706,6 +1772,10 @@ export interface GetSmsChannelIdInput {
1706
1772
  * @public
1707
1773
  */
1708
1774
  export interface GetSmsChannelIdOutput {
1775
+ /**
1776
+ * Direct-channel ids are the 8-4-4-4-8 slices of the two member ids. An `a_` member id puts `_` in a slice, so the pattern allows it.
1777
+ * @public
1778
+ */
1709
1779
  channelId: string;
1710
1780
  }
1711
1781
  /**
@@ -1737,6 +1807,10 @@ export interface GetTelephonyChannelIdInput {
1737
1807
  * @public
1738
1808
  */
1739
1809
  export interface GetTelephonyChannelIdOutput {
1810
+ /**
1811
+ * Direct-channel ids are the 8-4-4-4-8 slices of the two member ids. An `a_` member id puts `_` in a slice, so the pattern allows it.
1812
+ * @public
1813
+ */
1740
1814
  channelId: string;
1741
1815
  }
1742
1816
  /**
@@ -1819,6 +1893,10 @@ export interface GetWhatsAppChannelIdInput {
1819
1893
  * @public
1820
1894
  */
1821
1895
  export interface GetWhatsAppChannelIdOutput {
1896
+ /**
1897
+ * Direct-channel ids are the 8-4-4-4-8 slices of the two member ids. An `a_` member id puts `_` in a slice, so the pattern allows it.
1898
+ * @public
1899
+ */
1822
1900
  channelId: string;
1823
1901
  }
1824
1902
  /**
@@ -2254,25 +2332,25 @@ export interface PartialUpdateChannelSetOptions {
2254
2332
  */
2255
2333
  whatsapp?: boolean | undefined;
2256
2334
  /**
2257
- * Indicates if the channel supports Facebook Messenger. Default is false.
2335
+ * The customer messaging channel this conversation runs over. Set when the channel is created and never changed. Absent on every other channel.
2258
2336
  * @public
2259
2337
  */
2260
- messenger?: boolean | undefined;
2338
+ messagingChannel?: MessagingChannel | undefined;
2261
2339
  /**
2262
- * The Messenger reply state of the channel: WINDOW_CLOSED after classound refused a reply, absent while a reply can be sent.
2340
+ * The reply state of the channel: WINDOW_CLOSED after classound refused a reply, absent while a reply can be sent.
2263
2341
  * @public
2264
2342
  */
2265
- messengerStatus?: ChannelMessengerStatus | undefined;
2343
+ messagingStatus?: ChannelMessagingStatus | undefined;
2266
2344
  /**
2267
- * The Facebook Page ID the conversation runs through. Written by kite from the inbound event, because the channel id hashes the page's linked service and not the page, and a reply has to name the page it is sent from.
2345
+ * The business side of the conversation: the Facebook Page ID on Messenger, the Instagram account ID on Instagram. Written by kite from the inbound event, because the channel id hashes the sender's linked service and not the sender, and a reply has to name the sender it is sent from.
2268
2346
  * @public
2269
2347
  */
2270
- messengerPageId?: string | undefined;
2348
+ messagingSenderId?: string | undefined;
2271
2349
  /**
2272
- * Epoch seconds until which a reply still reaches the person: Meta's 7 day HUMAN_AGENT deadline, restarted by each inbound message. classound applies the tag itself, so this is the one deadline a client has to show. 0 means the deadline is not known, which is what the inbound event carries when the session row was gone before it could be read back; it does not mean the window has closed, so a client reads the window as closed on `messengerReplyUntil > 0 && now > messengerReplyUntil` and shows nothing at 0.
2350
+ * Epoch seconds until which a reply still reaches the person. On Messenger and Instagram this is Meta's 7 day HUMAN_AGENT deadline, restarted by each inbound message; classound applies the tag itself, so this is the one deadline a client has to show. 0 means the deadline is not known, which is what the inbound event carries when the session row was gone before it could be read back; it does not mean the window has closed, so a client reads the window as closed on `messagingReplyUntil > 0 && now > messagingReplyUntil` and shows nothing at 0. Absent on a channel with no reply window.
2273
2351
  * @public
2274
2352
  */
2275
- messengerReplyUntil?: number | undefined;
2353
+ messagingReplyUntil?: number | undefined;
2276
2354
  /**
2277
2355
  * The unique identifier of the assignee.
2278
2356
  * @public
@@ -2335,12 +2413,16 @@ export interface PartialUpdateMessageSetInput {
2335
2413
  forward?: MessageForward | undefined;
2336
2414
  whatsapp?: boolean | undefined;
2337
2415
  whatsappStatus?: MessageWhatsAppStatus | undefined;
2338
- messenger?: boolean | undefined;
2339
2416
  /**
2340
- * The delivery state of a Facebook Messenger message an agent sent, the same four states as WhatsApp. TRYING, SENT and ERROR are written by kite around the send; DELIVERED and a late ERROR arrive through the MESSENGER.STATUS stream event. A READ report is recorded as DELIVERED, as the WhatsApp producer does one hop earlier.
2417
+ * A customer messaging channel that reaches x-bees through classound and is not SMS or WhatsApp. One discriminator instead of a boolean per channel, so a new channel adds a member here and not a set of channel fields. RCS is listed but not accepted yet: whether an RCS conversation is a telephony channel is still open, so conversations refuses it until its ticket decides.
2341
2418
  * @public
2342
2419
  */
2343
- messengerStatus?: MessageMessengerStatus | undefined;
2420
+ messagingChannel?: MessagingChannel | undefined;
2421
+ /**
2422
+ * The delivery state of a message an agent sent over a customer messaging channel (see MessagingChannel), the same four states as WhatsApp. TRYING, SENT and ERROR are written by kite around the send; DELIVERED and a late ERROR arrive through the channel's status stream event (MESSENGER.STATUS today). A READ report is recorded as DELIVERED, as the WhatsApp producer does one hop earlier.
2423
+ * @public
2424
+ */
2425
+ messagingStatus?: MessageMessagingStatus | undefined;
2344
2426
  sms?: boolean | undefined;
2345
2427
  smsStatus?: MessageSmsStatus | undefined;
2346
2428
  markdown?: boolean | undefined;
@@ -2420,6 +2502,10 @@ export interface PinChannelOutput {
2420
2502
  * @public
2421
2503
  */
2422
2504
  export interface PinMessageInput {
2505
+ /**
2506
+ * Direct-channel ids are the 8-4-4-4-8 slices of the two member ids. An `a_` member id puts `_` in a slice, so the pattern allows it.
2507
+ * @public
2508
+ */
2423
2509
  channelId: string;
2424
2510
  /**
2425
2511
  * The unique identifier of the message which should be pinned.
@@ -2562,12 +2648,16 @@ export interface SendMessageInput {
2562
2648
  forward?: MessageForward | undefined;
2563
2649
  whatsapp?: boolean | undefined;
2564
2650
  whatsappStatus?: MessageWhatsAppStatus | undefined;
2565
- messenger?: boolean | undefined;
2566
2651
  /**
2567
- * The delivery state of a Facebook Messenger message an agent sent, the same four states as WhatsApp. TRYING, SENT and ERROR are written by kite around the send; DELIVERED and a late ERROR arrive through the MESSENGER.STATUS stream event. A READ report is recorded as DELIVERED, as the WhatsApp producer does one hop earlier.
2652
+ * A customer messaging channel that reaches x-bees through classound and is not SMS or WhatsApp. One discriminator instead of a boolean per channel, so a new channel adds a member here and not a set of channel fields. RCS is listed but not accepted yet: whether an RCS conversation is a telephony channel is still open, so conversations refuses it until its ticket decides.
2568
2653
  * @public
2569
2654
  */
2570
- messengerStatus?: MessageMessengerStatus | undefined;
2655
+ messagingChannel?: MessagingChannel | undefined;
2656
+ /**
2657
+ * The delivery state of a message an agent sent over a customer messaging channel (see MessagingChannel), the same four states as WhatsApp. TRYING, SENT and ERROR are written by kite around the send; DELIVERED and a late ERROR arrive through the channel's status stream event (MESSENGER.STATUS today). A READ report is recorded as DELIVERED, as the WhatsApp producer does one hop earlier.
2658
+ * @public
2659
+ */
2660
+ messagingStatus?: MessageMessagingStatus | undefined;
2571
2661
  sms?: boolean | undefined;
2572
2662
  smsStatus?: MessageSmsStatus | undefined;
2573
2663
  markdown?: boolean | undefined;
@@ -2850,6 +2940,10 @@ export interface UnpinChannelOutput {
2850
2940
  * @public
2851
2941
  */
2852
2942
  export interface UnpinMessageInput {
2943
+ /**
2944
+ * Direct-channel ids are the 8-4-4-4-8 slices of the two member ids. An `a_` member id puts `_` in a slice, so the pattern allows it.
2945
+ * @public
2946
+ */
2853
2947
  channelId: string;
2854
2948
  /**
2855
2949
  * The unique identifier of the message which should be unpinned.
@@ -2957,25 +3051,25 @@ export interface UpdateChannelInput {
2957
3051
  */
2958
3052
  whatsapp?: boolean | undefined;
2959
3053
  /**
2960
- * Indicates if the channel supports Facebook Messenger. Default is false.
3054
+ * The customer messaging channel this conversation runs over. Set when the channel is created and never changed. Absent on every other channel.
2961
3055
  * @public
2962
3056
  */
2963
- messenger?: boolean | undefined;
3057
+ messagingChannel?: MessagingChannel | undefined;
2964
3058
  /**
2965
- * The Messenger reply state of the channel: WINDOW_CLOSED after classound refused a reply, absent while a reply can be sent.
3059
+ * The reply state of the channel: WINDOW_CLOSED after classound refused a reply, absent while a reply can be sent.
2966
3060
  * @public
2967
3061
  */
2968
- messengerStatus?: ChannelMessengerStatus | undefined;
3062
+ messagingStatus?: ChannelMessagingStatus | undefined;
2969
3063
  /**
2970
- * The Facebook Page ID the conversation runs through. Written by kite from the inbound event, because the channel id hashes the page's linked service and not the page, and a reply has to name the page it is sent from.
3064
+ * The business side of the conversation: the Facebook Page ID on Messenger, the Instagram account ID on Instagram. Written by kite from the inbound event, because the channel id hashes the sender's linked service and not the sender, and a reply has to name the sender it is sent from.
2971
3065
  * @public
2972
3066
  */
2973
- messengerPageId?: string | undefined;
3067
+ messagingSenderId?: string | undefined;
2974
3068
  /**
2975
- * Epoch seconds until which a reply still reaches the person: Meta's 7 day HUMAN_AGENT deadline, restarted by each inbound message. classound applies the tag itself, so this is the one deadline a client has to show. 0 means the deadline is not known, which is what the inbound event carries when the session row was gone before it could be read back; it does not mean the window has closed, so a client reads the window as closed on `messengerReplyUntil > 0 && now > messengerReplyUntil` and shows nothing at 0.
3069
+ * Epoch seconds until which a reply still reaches the person. On Messenger and Instagram this is Meta's 7 day HUMAN_AGENT deadline, restarted by each inbound message; classound applies the tag itself, so this is the one deadline a client has to show. 0 means the deadline is not known, which is what the inbound event carries when the session row was gone before it could be read back; it does not mean the window has closed, so a client reads the window as closed on `messagingReplyUntil > 0 && now > messagingReplyUntil` and shows nothing at 0. Absent on a channel with no reply window.
2976
3070
  * @public
2977
3071
  */
2978
- messengerReplyUntil?: number | undefined;
3072
+ messagingReplyUntil?: number | undefined;
2979
3073
  /**
2980
3074
  * The unique identifier of the assignee.
2981
3075
  * @public
@@ -3049,12 +3143,16 @@ export interface UpdateMessageInput {
3049
3143
  forward?: MessageForward | undefined;
3050
3144
  whatsapp?: boolean | undefined;
3051
3145
  whatsappStatus?: MessageWhatsAppStatus | undefined;
3052
- messenger?: boolean | undefined;
3053
3146
  /**
3054
- * The delivery state of a Facebook Messenger message an agent sent, the same four states as WhatsApp. TRYING, SENT and ERROR are written by kite around the send; DELIVERED and a late ERROR arrive through the MESSENGER.STATUS stream event. A READ report is recorded as DELIVERED, as the WhatsApp producer does one hop earlier.
3147
+ * A customer messaging channel that reaches x-bees through classound and is not SMS or WhatsApp. One discriminator instead of a boolean per channel, so a new channel adds a member here and not a set of channel fields. RCS is listed but not accepted yet: whether an RCS conversation is a telephony channel is still open, so conversations refuses it until its ticket decides.
3148
+ * @public
3149
+ */
3150
+ messagingChannel?: MessagingChannel | undefined;
3151
+ /**
3152
+ * The delivery state of a message an agent sent over a customer messaging channel (see MessagingChannel), the same four states as WhatsApp. TRYING, SENT and ERROR are written by kite around the send; DELIVERED and a late ERROR arrive through the channel's status stream event (MESSENGER.STATUS today). A READ report is recorded as DELIVERED, as the WhatsApp producer does one hop earlier.
3055
3153
  * @public
3056
3154
  */
3057
- messengerStatus?: MessageMessengerStatus | undefined;
3155
+ messagingStatus?: MessageMessagingStatus | undefined;
3058
3156
  sms?: boolean | undefined;
3059
3157
  smsStatus?: MessageSmsStatus | undefined;
3060
3158
  markdown?: boolean | undefined;
@@ -80,12 +80,12 @@ export declare var GetInboxStateInput$: StaticStructureSchema;
80
80
  export declare var GetInboxStateOutput$: StaticStructureSchema;
81
81
  export declare var GetMessageInput$: StaticStructureSchema;
82
82
  export declare var GetMessageOutput$: StaticStructureSchema;
83
- export declare var GetMessengerChannelIdInput$: StaticStructureSchema;
84
- export declare var GetMessengerChannelIdOutput$: StaticStructureSchema;
83
+ export declare var GetMessagingChannelIdInput$: StaticStructureSchema;
84
+ export declare var GetMessagingChannelIdOutput$: StaticStructureSchema;
85
85
  export declare var GetOrCreateDirectChannelInput$: StaticStructureSchema;
86
86
  export declare var GetOrCreateDirectChannelOutput$: StaticStructureSchema;
87
- export declare var GetOrCreateMessengerChannelInput$: StaticStructureSchema;
88
- export declare var GetOrCreateMessengerChannelOutput$: StaticStructureSchema;
87
+ export declare var GetOrCreateMessagingChannelInput$: StaticStructureSchema;
88
+ export declare var GetOrCreateMessagingChannelOutput$: StaticStructureSchema;
89
89
  export declare var GetOrCreateSmsChannelInput$: StaticStructureSchema;
90
90
  export declare var GetOrCreateSmsChannelOutput$: StaticStructureSchema;
91
91
  export declare var GetOrCreateTelephonyChannelInput$: StaticStructureSchema;
@@ -242,9 +242,9 @@ export declare var GetDirectChannelId$: StaticOperationSchema;
242
242
  export declare var GetFilePresignedDownloadUrl$: StaticOperationSchema;
243
243
  export declare var GetInboxState$: StaticOperationSchema;
244
244
  export declare var GetMessage$: StaticOperationSchema;
245
- export declare var GetMessengerChannelId$: StaticOperationSchema;
245
+ export declare var GetMessagingChannelId$: StaticOperationSchema;
246
246
  export declare var GetOrCreateDirectChannel$: StaticOperationSchema;
247
- export declare var GetOrCreateMessengerChannel$: StaticOperationSchema;
247
+ export declare var GetOrCreateMessagingChannel$: StaticOperationSchema;
248
248
  export declare var GetOrCreateSmsChannel$: StaticOperationSchema;
249
249
  export declare var GetOrCreateTelephonyChannel$: StaticOperationSchema;
250
250
  export declare var GetOrCreateWhatsAppChannel$: StaticOperationSchema;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wildix/xbees-conversations-client",
3
3
  "description": "@wildix/xbees-conversations-client client",
4
- "version": "4.1.0",
4
+ "version": "4.2.0-messaging.1",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -56,4 +56,4 @@
56
56
  "browser": {
57
57
  "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser"
58
58
  }
59
- }
59
+ }
@@ -1,83 +0,0 @@
1
- import { Command as $Command } from "@smithy/core/client";
2
- import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
- import type { ConversationsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConversationsClient";
4
- import type { GetMessengerChannelIdInput, GetMessengerChannelIdOutput } from "../models/models_0";
5
- /**
6
- * @public
7
- */
8
- export type { __MetadataBearer };
9
- export { $Command };
10
- /**
11
- * @public
12
- *
13
- * The input for {@link GetMessengerChannelIdCommand}.
14
- */
15
- export interface GetMessengerChannelIdCommandInput extends GetMessengerChannelIdInput {
16
- }
17
- /**
18
- * @public
19
- *
20
- * The output of {@link GetMessengerChannelIdCommand}.
21
- */
22
- export interface GetMessengerChannelIdCommandOutput extends GetMessengerChannelIdOutput, __MetadataBearer {
23
- }
24
- declare const GetMessengerChannelIdCommand_base: {
25
- new (input: GetMessengerChannelIdCommandInput): import("@smithy/core/client").CommandImpl<GetMessengerChannelIdCommandInput, GetMessengerChannelIdCommandOutput, ConversationsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
- new (input: GetMessengerChannelIdCommandInput): import("@smithy/core/client").CommandImpl<GetMessengerChannelIdCommandInput, GetMessengerChannelIdCommandOutput, ConversationsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
- getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
28
- };
29
- /**
30
- * Gets the channel ID of an existing or non-existing Facebook Messenger channel. The person is named by recipientId, the x-bees user invited for them; recipientNumber names the same person directly. On this channel either value resolves to a Page Scoped ID, an opaque Meta identifier and not a phone number.
31
- * @example
32
- * Use a bare-bones client and the command you need to make an API call.
33
- * ```javascript
34
- * import { ConversationsClient, GetMessengerChannelIdCommand } from "@wildix/xbees-conversations-client"; // ES Modules import
35
- * // const { ConversationsClient, GetMessengerChannelIdCommand } = require("@wildix/xbees-conversations-client"); // CommonJS import
36
- * // import type { ConversationsClientConfig } from "@wildix/xbees-conversations-client";
37
- * const config = {}; // type is ConversationsClientConfig
38
- * const client = new ConversationsClient(config);
39
- * const input = { // GetMessengerChannelIdInput
40
- * userId: "STRING_VALUE",
41
- * serviceUri: "STRING_VALUE", // required
42
- * recipientId: "STRING_VALUE",
43
- * recipientNumber: "STRING_VALUE",
44
- * };
45
- * const command = new GetMessengerChannelIdCommand(input);
46
- * const response = await client.send(command);
47
- * // { // GetMessengerChannelIdOutput
48
- * // channelId: "STRING_VALUE", // required
49
- * // };
50
- *
51
- * ```
52
- *
53
- * @param GetMessengerChannelIdCommandInput - {@link GetMessengerChannelIdCommandInput}
54
- * @returns {@link GetMessengerChannelIdCommandOutput}
55
- * @see {@link GetMessengerChannelIdCommandInput} for command's `input` shape.
56
- * @see {@link GetMessengerChannelIdCommandOutput} for command's `response` shape.
57
- * @see {@link ConversationsClientResolvedConfig | config} for ConversationsClient's `config` shape.
58
- *
59
- * @throws {@link ForbiddenException} (client fault)
60
- *
61
- * @throws {@link ValidationException} (client fault)
62
- *
63
- * @throws {@link RateLimitExceededException} (client fault)
64
- *
65
- * @throws {@link ConversationsSyntheticServiceException}
66
- * <p>Base exception class for all service exceptions from Conversations service.</p>
67
- *
68
- *
69
- * @public
70
- */
71
- export declare class GetMessengerChannelIdCommand extends GetMessengerChannelIdCommand_base {
72
- /** @internal type navigation helper, not in runtime. */
73
- protected static __types: {
74
- api: {
75
- input: GetMessengerChannelIdInput;
76
- output: GetMessengerChannelIdOutput;
77
- };
78
- sdk: {
79
- input: GetMessengerChannelIdCommandInput;
80
- output: GetMessengerChannelIdCommandOutput;
81
- };
82
- };
83
- }