@wildix/xbees-conversations-client 1.0.44 → 1.0.46

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 (30) hide show
  1. package/dist-cjs/Conversations.js +2 -0
  2. package/dist-cjs/commands/DescribeEventCommand.js +21 -0
  3. package/dist-cjs/commands/index.js +1 -0
  4. package/dist-cjs/models/models_0.js +21 -19
  5. package/dist-cjs/protocols/Aws_restJson1.js +39 -2
  6. package/dist-es/Conversations.js +2 -0
  7. package/dist-es/commands/DescribeEventCommand.js +17 -0
  8. package/dist-es/commands/index.js +1 -0
  9. package/dist-es/models/models_0.js +20 -18
  10. package/dist-es/protocols/Aws_restJson1.js +35 -0
  11. package/dist-types/Conversations.d.ts +8 -0
  12. package/dist-types/ConversationsClient.d.ts +3 -2
  13. package/dist-types/commands/CreateGroupChannelCommand.d.ts +0 -2
  14. package/dist-types/commands/DescribeEventCommand.d.ts +845 -0
  15. package/dist-types/commands/GetChannelCommand.d.ts +0 -2
  16. package/dist-types/commands/GetMessageCommand.d.ts +0 -2
  17. package/dist-types/commands/GetOrCreateDirectChannelCommand.d.ts +0 -2
  18. package/dist-types/commands/JoinChannelCommand.d.ts +0 -2
  19. package/dist-types/commands/ListChannelsCommand.d.ts +0 -2
  20. package/dist-types/commands/ListMessagesCommand.d.ts +0 -2
  21. package/dist-types/commands/PartialUpdateChannelCommand.d.ts +0 -2
  22. package/dist-types/commands/PartialUpdateMessageCommand.d.ts +0 -2
  23. package/dist-types/commands/SendGiphyCommand.d.ts +0 -2
  24. package/dist-types/commands/SendMessageCommand.d.ts +0 -2
  25. package/dist-types/commands/UpdateChannelCommand.d.ts +0 -2
  26. package/dist-types/commands/UpdateMessageCommand.d.ts +0 -2
  27. package/dist-types/commands/index.d.ts +1 -0
  28. package/dist-types/models/models_0.d.ts +240 -83
  29. package/dist-types/protocols/Aws_restJson1.d.ts +9 -0
  30. package/package.json +1 -1
@@ -97,8 +97,6 @@ declare const GetChannelCommand_base: {
97
97
  * // telephony: true || false,
98
98
  * // sms: true || false,
99
99
  * // mms: true || false,
100
- * // whatsapp: true || false,
101
- * // whatsappStatus: "24h_channel_closed",
102
100
  * // broadcast: true || false,
103
101
  * // external: true || false,
104
102
  * // channelId: "STRING_VALUE", // required
@@ -143,8 +143,6 @@ declare const GetMessageCommand_base: {
143
143
  * // event: "STRING_VALUE",
144
144
  * // sms: true || false,
145
145
  * // smsStatus: "sent" || "delivered" || "trying" || "error",
146
- * // whatsapp: true || false,
147
- * // whatsappStatus: "trying" || "sent" || "delivered" || "error",
148
146
  * // messageId: "STRING_VALUE", // required
149
147
  * // channelId: "STRING_VALUE", // required
150
148
  * // user: "<User>", // required
@@ -104,8 +104,6 @@ declare const GetOrCreateDirectChannelCommand_base: {
104
104
  * // telephony: true || false,
105
105
  * // sms: true || false,
106
106
  * // mms: true || false,
107
- * // whatsapp: true || false,
108
- * // whatsappStatus: "24h_channel_closed",
109
107
  * // broadcast: true || false,
110
108
  * // external: true || false,
111
109
  * // channelId: "STRING_VALUE", // required
@@ -99,8 +99,6 @@ declare const JoinChannelCommand_base: {
99
99
  * // telephony: true || false,
100
100
  * // sms: true || false,
101
101
  * // mms: true || false,
102
- * // whatsapp: true || false,
103
- * // whatsappStatus: "24h_channel_closed",
104
102
  * // broadcast: true || false,
105
103
  * // external: true || false,
106
104
  * // channelId: "STRING_VALUE", // required
@@ -100,8 +100,6 @@ declare const ListChannelsCommand_base: {
100
100
  * // telephony: true || false,
101
101
  * // sms: true || false,
102
102
  * // mms: true || false,
103
- * // whatsapp: true || false,
104
- * // whatsappStatus: "24h_channel_closed",
105
103
  * // broadcast: true || false,
106
104
  * // external: true || false,
107
105
  * // channelId: "STRING_VALUE", // required
@@ -145,8 +145,6 @@ declare const ListMessagesCommand_base: {
145
145
  * // event: "STRING_VALUE",
146
146
  * // sms: true || false,
147
147
  * // smsStatus: "sent" || "delivered" || "trying" || "error",
148
- * // whatsapp: true || false,
149
- * // whatsappStatus: "trying" || "sent" || "delivered" || "error",
150
148
  * // messageId: "STRING_VALUE", // required
151
149
  * // channelId: "STRING_VALUE", // required
152
150
  * // user: "<User>", // required
@@ -110,8 +110,6 @@ declare const PartialUpdateChannelCommand_base: {
110
110
  * // telephony: true || false,
111
111
  * // sms: true || false,
112
112
  * // mms: true || false,
113
- * // whatsapp: true || false,
114
- * // whatsappStatus: "24h_channel_closed",
115
113
  * // broadcast: true || false,
116
114
  * // external: true || false,
117
115
  * // channelId: "STRING_VALUE", // required
@@ -237,8 +237,6 @@ declare const PartialUpdateMessageCommand_base: {
237
237
  * // event: "STRING_VALUE",
238
238
  * // sms: true || false,
239
239
  * // smsStatus: "sent" || "delivered" || "trying" || "error",
240
- * // whatsapp: true || false,
241
- * // whatsappStatus: "trying" || "sent" || "delivered" || "error",
242
240
  * // messageId: "STRING_VALUE", // required
243
241
  * // channelId: "STRING_VALUE", // required
244
242
  * // user: "<User>", // required
@@ -151,8 +151,6 @@ declare const SendGiphyCommand_base: {
151
151
  * // event: "STRING_VALUE",
152
152
  * // sms: true || false,
153
153
  * // smsStatus: "sent" || "delivered" || "trying" || "error",
154
- * // whatsapp: true || false,
155
- * // whatsappStatus: "trying" || "sent" || "delivered" || "error",
156
154
  * // messageId: "STRING_VALUE", // required
157
155
  * // channelId: "STRING_VALUE", // required
158
156
  * // user: "<User>", // required
@@ -236,8 +236,6 @@ declare const SendMessageCommand_base: {
236
236
  * // event: "STRING_VALUE",
237
237
  * // sms: true || false,
238
238
  * // smsStatus: "sent" || "delivered" || "trying" || "error",
239
- * // whatsapp: true || false,
240
- * // whatsappStatus: "trying" || "sent" || "delivered" || "error",
241
239
  * // messageId: "STRING_VALUE", // required
242
240
  * // channelId: "STRING_VALUE", // required
243
241
  * // user: "<User>", // required
@@ -105,8 +105,6 @@ declare const UpdateChannelCommand_base: {
105
105
  * // telephony: true || false,
106
106
  * // sms: true || false,
107
107
  * // mms: true || false,
108
- * // whatsapp: true || false,
109
- * // whatsappStatus: "24h_channel_closed",
110
108
  * // broadcast: true || false,
111
109
  * // external: true || false,
112
110
  * // channelId: "STRING_VALUE", // required
@@ -235,8 +235,6 @@ declare const UpdateMessageCommand_base: {
235
235
  * // event: "STRING_VALUE",
236
236
  * // sms: true || false,
237
237
  * // smsStatus: "sent" || "delivered" || "trying" || "error",
238
- * // whatsapp: true || false,
239
- * // whatsappStatus: "trying" || "sent" || "delivered" || "error",
240
238
  * // messageId: "STRING_VALUE", // required
241
239
  * // channelId: "STRING_VALUE", // required
242
240
  * // user: "<User>", // required
@@ -5,6 +5,7 @@ export * from "./DeleteChannelCommand";
5
5
  export * from "./DeleteChannelMemberCommand";
6
6
  export * from "./DeleteMessageCommand";
7
7
  export * from "./DeleteMessageReactionCommand";
8
+ export * from "./DescribeEventCommand";
8
9
  export * from "./GetChannelCommand";
9
10
  export * from "./GetChannelMemberCommand";
10
11
  export * from "./GetDirectChannelIdCommand";
@@ -236,17 +236,6 @@ export interface ChannelContext {
236
236
  target?: string;
237
237
  events?: (ChannelContextEvent)[];
238
238
  }
239
- /**
240
- * @public
241
- * @enum
242
- */
243
- export declare const ChannelWhatsAppStatus: {
244
- readonly CHANNEL_CLOSED: "24h_channel_closed";
245
- };
246
- /**
247
- * @public
248
- */
249
- export type ChannelWhatsAppStatus = typeof ChannelWhatsAppStatus[keyof typeof ChannelWhatsAppStatus];
250
239
  /**
251
240
  * @public
252
241
  */
@@ -279,8 +268,6 @@ export interface Channel {
279
268
  telephony?: boolean;
280
269
  sms?: boolean;
281
270
  mms?: boolean;
282
- whatsapp?: boolean;
283
- whatsappStatus?: ChannelWhatsAppStatus;
284
271
  broadcast?: boolean;
285
272
  external?: boolean;
286
273
  channelId: string;
@@ -462,91 +449,90 @@ export interface DeleteMessageReactionOutput {
462
449
  /**
463
450
  * @public
464
451
  */
465
- export interface GetChannelInput {
466
- channelId: string;
452
+ export interface DescribeEventInput {
467
453
  }
468
454
  /**
469
455
  * @public
470
456
  */
471
- export interface GetChannelOutput {
457
+ export interface WebhookChatChannelCreatedOrUpdatedEventData {
472
458
  channel: Channel;
459
+ members: (ChannelMember)[];
460
+ users: (User)[];
473
461
  }
474
462
  /**
475
463
  * @public
464
+ * @enum
476
465
  */
477
- export interface GetChannelMemberInput {
478
- channelId: string;
479
- memberId: string;
480
- }
466
+ export declare const WebhookEventType: {
467
+ readonly CHANNEL_CREATED: "chat:channel:created";
468
+ readonly CHANNEL_UPDATED: "chat:channel:updated";
469
+ readonly MEMBER_ADDED: "chat:member:added";
470
+ readonly MEMBER_REMOVED: "chat:member:removed";
471
+ readonly MESSAGE_DELETED: "chat:message:deleted";
472
+ readonly MESSAGE_NEW: "chat:message:new";
473
+ readonly MESSAGE_UPDATED: "chat:message:updated";
474
+ readonly REACTION_DELETED: "chat:reaction:deleted";
475
+ readonly REACTION_NEW: "chat:reaction:new";
476
+ };
481
477
  /**
482
478
  * @public
483
479
  */
484
- export interface GetChannelMemberOutput {
485
- member: ChannelMember;
486
- user: User;
487
- }
480
+ export type WebhookEventType = typeof WebhookEventType[keyof typeof WebhookEventType];
488
481
  /**
489
482
  * @public
490
483
  */
491
- export interface GetDirectChannelIdInput {
492
- userId?: string;
493
- memberId?: string;
494
- memberToInvite?: UserToInvite;
495
- }
496
- /**
497
- * @public
498
- */
499
- export interface GetDirectChannelIdOutput {
500
- channelId: string;
484
+ export interface WebhookChatChannelCreatedEvent {
485
+ id: string;
486
+ company: string;
487
+ type: WebhookEventType;
488
+ time: number;
489
+ integrationId?: string;
490
+ botId?: string;
491
+ data: WebhookChatChannelCreatedOrUpdatedEventData;
501
492
  }
502
493
  /**
503
494
  * @public
504
495
  */
505
- export declare class FileNotFoundException extends __BaseException {
506
- readonly name: "FileNotFoundException";
507
- readonly $fault: "client";
508
- /**
509
- * @internal
510
- */
511
- constructor(opts: __ExceptionOptionType<FileNotFoundException, __BaseException>);
496
+ export interface WebhookChatChannelUpdatedEvent {
497
+ id: string;
498
+ company: string;
499
+ type: WebhookEventType;
500
+ time: number;
501
+ integrationId?: string;
502
+ botId?: string;
503
+ data: WebhookChatChannelCreatedOrUpdatedEventData;
512
504
  }
513
505
  /**
514
506
  * @public
515
507
  */
516
- export interface GetFilePresignedDownloadUrlInput {
517
- /**
518
- * Channel Id.
519
- * @public
520
- */
521
- channelId: string;
522
- /**
523
- * Message Id.
524
- * @public
525
- */
526
- messageId: string;
527
- fileId: string;
528
- /**
529
- * File category. Channel files or conference recordings. Default: channels.
530
- * @public
531
- */
532
- category?: ConversationFileCategory;
508
+ export interface WebhookChatMemberAddedOrRemovedEventData {
509
+ channel: Channel;
510
+ member: ChannelMember;
511
+ user: User;
533
512
  }
534
513
  /**
535
514
  * @public
536
515
  */
537
- export interface GetFilePresignedDownloadUrlOutput {
538
- /**
539
- * Presigned URL for download file.
540
- * @public
541
- */
542
- presignedDownloadUrl: string;
516
+ export interface WebhookChatMemberAddedEvent {
517
+ id: string;
518
+ company: string;
519
+ type: WebhookEventType;
520
+ time: number;
521
+ integrationId?: string;
522
+ botId?: string;
523
+ data: WebhookChatMemberAddedOrRemovedEventData;
543
524
  }
544
525
  /**
545
526
  * @public
546
527
  */
547
- export interface GetMessageInput {
548
- channelId: string;
549
- messageId: string;
528
+ export interface WebhookChatMemberRemovedEvent {
529
+ id: string;
530
+ company: string;
531
+ type: WebhookEventType;
532
+ time: number;
533
+ integrationId?: string;
534
+ botId?: string;
535
+ data: WebhookChatMemberAddedOrRemovedEventData;
550
536
  }
551
537
  /**
552
538
  * @public
@@ -633,20 +619,6 @@ export declare const MessageType: {
633
619
  * @public
634
620
  */
635
621
  export type MessageType = typeof MessageType[keyof typeof MessageType];
636
- /**
637
- * @public
638
- * @enum
639
- */
640
- export declare const MessageWhatsAppStatus: {
641
- readonly DELIVERED: "delivered";
642
- readonly ERROR: "error";
643
- readonly SENT: "sent";
644
- readonly TRYING: "trying";
645
- };
646
- /**
647
- * @public
648
- */
649
- export type MessageWhatsAppStatus = typeof MessageWhatsAppStatus[keyof typeof MessageWhatsAppStatus];
650
622
  /**
651
623
  * @public
652
624
  */
@@ -661,8 +633,6 @@ export interface Message {
661
633
  event?: string;
662
634
  sms?: boolean;
663
635
  smsStatus?: MessageSmsStatus;
664
- whatsapp?: boolean;
665
- whatsappStatus?: MessageWhatsAppStatus;
666
636
  messageId: string;
667
637
  channelId: string;
668
638
  user: User;
@@ -673,6 +643,193 @@ export interface Message {
673
643
  createdAt: string;
674
644
  updatedAt?: string;
675
645
  }
646
+ /**
647
+ * @public
648
+ */
649
+ export interface WebhookChatMessageUpdatedOrDeletedEventData {
650
+ channel: Channel;
651
+ message: Message;
652
+ }
653
+ /**
654
+ * @public
655
+ */
656
+ export interface WebhookChatMessageDeletedEvent {
657
+ id: string;
658
+ company: string;
659
+ type: WebhookEventType;
660
+ time: number;
661
+ integrationId?: string;
662
+ botId?: string;
663
+ data: WebhookChatMessageUpdatedOrDeletedEventData;
664
+ }
665
+ /**
666
+ * @public
667
+ */
668
+ export interface WebhookChatMessageNewEventData {
669
+ channel: Channel;
670
+ members: (ChannelMember)[];
671
+ users: (User)[];
672
+ message: Message;
673
+ }
674
+ /**
675
+ * @public
676
+ */
677
+ export interface WebhookChatMessageNewEvent {
678
+ id: string;
679
+ company: string;
680
+ type: WebhookEventType;
681
+ time: number;
682
+ integrationId?: string;
683
+ botId?: string;
684
+ data: WebhookChatMessageNewEventData;
685
+ }
686
+ /**
687
+ * @public
688
+ */
689
+ export interface WebhookChatMessageUpdatedEvent {
690
+ id: string;
691
+ company: string;
692
+ type: WebhookEventType;
693
+ time: number;
694
+ integrationId?: string;
695
+ botId?: string;
696
+ data: WebhookChatMessageUpdatedOrDeletedEventData;
697
+ }
698
+ /**
699
+ * @public
700
+ */
701
+ export interface WebhookChatReactionNewOrDeletedEventData {
702
+ channel: Channel;
703
+ message: Message;
704
+ reaction: Reaction;
705
+ }
706
+ /**
707
+ * @public
708
+ */
709
+ export interface WebhookChatReactionDeletedEvent {
710
+ id: string;
711
+ company: string;
712
+ type: WebhookEventType;
713
+ time: number;
714
+ integrationId?: string;
715
+ botId?: string;
716
+ data: WebhookChatReactionNewOrDeletedEventData;
717
+ }
718
+ /**
719
+ * @public
720
+ */
721
+ export interface WebhookChatReactionNewEvent {
722
+ id: string;
723
+ company: string;
724
+ type: WebhookEventType;
725
+ time: number;
726
+ integrationId?: string;
727
+ botId?: string;
728
+ data: WebhookChatReactionNewOrDeletedEventData;
729
+ }
730
+ /**
731
+ * @public
732
+ */
733
+ export interface DescribeEventOutput {
734
+ WebhookChatChannelCreatedEvent?: WebhookChatChannelCreatedEvent;
735
+ WebhookChatChannelUpdatedEvent?: WebhookChatChannelUpdatedEvent;
736
+ WebhookChatMemberAddedEvent?: WebhookChatMemberAddedEvent;
737
+ WebhookChatMemberRemovedEvent?: WebhookChatMemberRemovedEvent;
738
+ WebhookChatMessageNewEvent?: WebhookChatMessageNewEvent;
739
+ WebhookChatMessageUpdatedEvent?: WebhookChatMessageUpdatedEvent;
740
+ WebhookChatMessageDeletedEvent?: WebhookChatMessageDeletedEvent;
741
+ WebhookChatReactionNewEvent?: WebhookChatReactionNewEvent;
742
+ WebhookChatReactionDeletedEvent?: WebhookChatReactionDeletedEvent;
743
+ }
744
+ /**
745
+ * @public
746
+ */
747
+ export interface GetChannelInput {
748
+ channelId: string;
749
+ }
750
+ /**
751
+ * @public
752
+ */
753
+ export interface GetChannelOutput {
754
+ channel: Channel;
755
+ }
756
+ /**
757
+ * @public
758
+ */
759
+ export interface GetChannelMemberInput {
760
+ channelId: string;
761
+ memberId: string;
762
+ }
763
+ /**
764
+ * @public
765
+ */
766
+ export interface GetChannelMemberOutput {
767
+ member: ChannelMember;
768
+ user: User;
769
+ }
770
+ /**
771
+ * @public
772
+ */
773
+ export interface GetDirectChannelIdInput {
774
+ userId?: string;
775
+ memberId?: string;
776
+ memberToInvite?: UserToInvite;
777
+ }
778
+ /**
779
+ * @public
780
+ */
781
+ export interface GetDirectChannelIdOutput {
782
+ channelId: string;
783
+ }
784
+ /**
785
+ * @public
786
+ */
787
+ export declare class FileNotFoundException extends __BaseException {
788
+ readonly name: "FileNotFoundException";
789
+ readonly $fault: "client";
790
+ /**
791
+ * @internal
792
+ */
793
+ constructor(opts: __ExceptionOptionType<FileNotFoundException, __BaseException>);
794
+ }
795
+ /**
796
+ * @public
797
+ */
798
+ export interface GetFilePresignedDownloadUrlInput {
799
+ /**
800
+ * Channel Id.
801
+ * @public
802
+ */
803
+ channelId: string;
804
+ /**
805
+ * Message Id.
806
+ * @public
807
+ */
808
+ messageId: string;
809
+ fileId: string;
810
+ /**
811
+ * File category. Channel files or conference recordings. Default: channels.
812
+ * @public
813
+ */
814
+ category?: ConversationFileCategory;
815
+ }
816
+ /**
817
+ * @public
818
+ */
819
+ export interface GetFilePresignedDownloadUrlOutput {
820
+ /**
821
+ * Presigned URL for download file.
822
+ * @public
823
+ */
824
+ presignedDownloadUrl: string;
825
+ }
826
+ /**
827
+ * @public
828
+ */
829
+ export interface GetMessageInput {
830
+ channelId: string;
831
+ messageId: string;
832
+ }
676
833
  /**
677
834
  * @public
678
835
  */
@@ -5,6 +5,7 @@ import { DeleteChannelCommandInput, DeleteChannelCommandOutput } from "../comman
5
5
  import { DeleteChannelMemberCommandInput, DeleteChannelMemberCommandOutput } from "../commands/DeleteChannelMemberCommand";
6
6
  import { DeleteMessageCommandInput, DeleteMessageCommandOutput } from "../commands/DeleteMessageCommand";
7
7
  import { DeleteMessageReactionCommandInput, DeleteMessageReactionCommandOutput } from "../commands/DeleteMessageReactionCommand";
8
+ import { DescribeEventCommandInput, DescribeEventCommandOutput } from "../commands/DescribeEventCommand";
8
9
  import { GetChannelCommandInput, GetChannelCommandOutput } from "../commands/GetChannelCommand";
9
10
  import { GetChannelMemberCommandInput, GetChannelMemberCommandOutput } from "../commands/GetChannelMemberCommand";
10
11
  import { GetDirectChannelIdCommandInput, GetDirectChannelIdCommandOutput } from "../commands/GetDirectChannelIdCommand";
@@ -63,6 +64,10 @@ export declare const se_DeleteMessageCommand: (input: DeleteMessageCommandInput,
63
64
  * serializeAws_restJson1DeleteMessageReactionCommand
64
65
  */
65
66
  export declare const se_DeleteMessageReactionCommand: (input: DeleteMessageReactionCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
67
+ /**
68
+ * serializeAws_restJson1DescribeEventCommand
69
+ */
70
+ export declare const se_DescribeEventCommand: (input: DescribeEventCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
66
71
  /**
67
72
  * serializeAws_restJson1GetChannelCommand
68
73
  */
@@ -203,6 +208,10 @@ export declare const de_DeleteMessageCommand: (output: __HttpResponse, context:
203
208
  * deserializeAws_restJson1DeleteMessageReactionCommand
204
209
  */
205
210
  export declare const de_DeleteMessageReactionCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<DeleteMessageReactionCommandOutput>;
211
+ /**
212
+ * deserializeAws_restJson1DescribeEventCommand
213
+ */
214
+ export declare const de_DescribeEventCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<DescribeEventCommandOutput>;
206
215
  /**
207
216
  * deserializeAws_restJson1GetChannelCommand
208
217
  */
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": "1.0.44",
4
+ "version": "1.0.46",
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",