@wildix/xbees-conversations-client 1.0.53 → 1.0.54

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 (58) hide show
  1. package/dist-cjs/Conversations.js +2 -0
  2. package/dist-cjs/ConversationsClient.js +7 -2
  3. package/dist-cjs/commands/CreateKiteChannelCommand.js +21 -0
  4. package/dist-cjs/commands/index.js +1 -0
  5. package/dist-cjs/models/models_0.js +52 -22
  6. package/dist-cjs/protocols/Aws_restJson1.js +81 -7
  7. package/dist-es/Conversations.js +2 -0
  8. package/dist-es/ConversationsClient.js +7 -2
  9. package/dist-es/commands/CreateKiteChannelCommand.js +17 -0
  10. package/dist-es/commands/index.js +1 -0
  11. package/dist-es/models/models_0.js +48 -20
  12. package/dist-es/protocols/Aws_restJson1.js +78 -6
  13. package/dist-types/Conversations.d.ts +7 -0
  14. package/dist-types/ConversationsClient.d.ts +6 -4
  15. package/dist-types/commands/AddChannelMemberCommand.d.ts +1 -1
  16. package/dist-types/commands/AddChannelMembersCommand.d.ts +1 -1
  17. package/dist-types/commands/CreateGroupChannelCommand.d.ts +1 -1
  18. package/dist-types/commands/CreateKiteChannelCommand.d.ts +300 -0
  19. package/dist-types/commands/DeleteChannelCommand.d.ts +1 -1
  20. package/dist-types/commands/DeleteChannelMemberCommand.d.ts +1 -1
  21. package/dist-types/commands/DeleteMessageCommand.d.ts +1 -1
  22. package/dist-types/commands/DeleteMessageReactionCommand.d.ts +1 -1
  23. package/dist-types/commands/DescribeEventCommand.d.ts +31 -1
  24. package/dist-types/commands/GetChannelCommand.d.ts +1 -1
  25. package/dist-types/commands/GetChannelMemberCommand.d.ts +1 -1
  26. package/dist-types/commands/GetDirectChannelIdCommand.d.ts +1 -1
  27. package/dist-types/commands/GetFilePresignedDownloadUrlCommand.d.ts +1 -1
  28. package/dist-types/commands/GetMessageCommand.d.ts +7 -1
  29. package/dist-types/commands/GetOrCreateDirectChannelCommand.d.ts +1 -1
  30. package/dist-types/commands/GetUploadedFileInfoCommand.d.ts +1 -1
  31. package/dist-types/commands/HideChannelCommand.d.ts +1 -1
  32. package/dist-types/commands/InviteCommand.d.ts +1 -1
  33. package/dist-types/commands/JoinChannelCommand.d.ts +1 -1
  34. package/dist-types/commands/LeaveChannelCommand.d.ts +1 -1
  35. package/dist-types/commands/ListChannelMembersCommand.d.ts +1 -1
  36. package/dist-types/commands/ListChannelsCommand.d.ts +1 -1
  37. package/dist-types/commands/ListMessageReactionsCommand.d.ts +1 -1
  38. package/dist-types/commands/ListMessagesCommand.d.ts +7 -1
  39. package/dist-types/commands/MarkReadCommand.d.ts +1 -1
  40. package/dist-types/commands/PartialUpdateChannelCommand.d.ts +1 -1
  41. package/dist-types/commands/PartialUpdateMessageCommand.d.ts +13 -1
  42. package/dist-types/commands/ScheduleExternalFlagAdjustmentJobCommand.d.ts +1 -1
  43. package/dist-types/commands/SendGiphyCommand.d.ts +7 -1
  44. package/dist-types/commands/SendMessageCommand.d.ts +13 -1
  45. package/dist-types/commands/SendMessageReactionCommand.d.ts +1 -1
  46. package/dist-types/commands/SendTypingStartCommand.d.ts +1 -1
  47. package/dist-types/commands/SendTypingStopCommand.d.ts +1 -1
  48. package/dist-types/commands/ShowChannelCommand.d.ts +1 -1
  49. package/dist-types/commands/UpdateChannelCommand.d.ts +1 -1
  50. package/dist-types/commands/UpdateMessageCommand.d.ts +13 -1
  51. package/dist-types/commands/UploadFileCommand.d.ts +1 -1
  52. package/dist-types/commands/index.d.ts +1 -0
  53. package/dist-types/models/models_0.d.ts +252 -95
  54. package/dist-types/protocols/Aws_restJson1.d.ts +9 -0
  55. package/dist-types/runtimeConfig.browser.d.ts +1 -0
  56. package/dist-types/runtimeConfig.d.ts +1 -0
  57. package/dist-types/runtimeConfig.native.d.ts +1 -0
  58. package/package.json +1 -1
@@ -25,8 +25,8 @@ export declare class ForbiddenException extends __BaseException {
25
25
  /**
26
26
  * @public
27
27
  */
28
- export declare class LimitExceededException extends __BaseException {
29
- readonly name: "LimitExceededException";
28
+ export declare class RateLimitExceededException extends __BaseException {
29
+ readonly name: "RateLimitExceededException";
30
30
  readonly $fault: "client";
31
31
  /**
32
32
  * Displays the applicable rate limits for the current request.
@@ -51,7 +51,7 @@ export declare class LimitExceededException extends __BaseException {
51
51
  /**
52
52
  * @internal
53
53
  */
54
- constructor(opts: __ExceptionOptionType<LimitExceededException, __BaseException>);
54
+ constructor(opts: __ExceptionOptionType<RateLimitExceededException, __BaseException>);
55
55
  }
56
56
  /**
57
57
  * @public
@@ -429,6 +429,234 @@ export interface CreateGroupChannelInput {
429
429
  export interface CreateGroupChannelOutput {
430
430
  channel: Channel;
431
431
  }
432
+ /**
433
+ * @public
434
+ */
435
+ export interface MessageAttachment {
436
+ id: string;
437
+ /**
438
+ * This *is* documentation about the field. Describe here what fsId and how to get it.
439
+ * @public
440
+ */
441
+ fsId: string;
442
+ mime?: string;
443
+ name: string;
444
+ size: number;
445
+ width?: number;
446
+ height?: number;
447
+ thumbnail?: string;
448
+ }
449
+ /**
450
+ * @public
451
+ */
452
+ export interface MessageForward {
453
+ forwardCompany?: string;
454
+ forwardDate: string;
455
+ forwardEmail?: string;
456
+ forwardName?: string;
457
+ }
458
+ /**
459
+ * @public
460
+ */
461
+ export interface MessageGiphy {
462
+ id: string;
463
+ size: string;
464
+ url: string;
465
+ height: string;
466
+ width: string;
467
+ }
468
+ /**
469
+ * @public
470
+ */
471
+ export interface MessagePredefinedReply {
472
+ /**
473
+ * Text that will be sent to the user; clicking the text will trigger sending this message.
474
+ * @public
475
+ */
476
+ text: string;
477
+ /**
478
+ * Label that will appear on the reply button; if no label is provided, the text will be used.
479
+ * @public
480
+ */
481
+ label?: string;
482
+ }
483
+ /**
484
+ * @public
485
+ */
486
+ export interface MessageQuote {
487
+ messageId: string;
488
+ channelId: string;
489
+ user: User;
490
+ text?: string;
491
+ attachments?: (MessageAttachment)[];
492
+ forward?: MessageForward;
493
+ mentions?: (User)[];
494
+ giphy?: MessageGiphy;
495
+ createdAt: string;
496
+ updatedAt?: string;
497
+ }
498
+ /**
499
+ * @public
500
+ * @enum
501
+ */
502
+ export declare const MessageSmsStatus: {
503
+ readonly DELIVERED: "delivered";
504
+ readonly ERROR: "error";
505
+ readonly SENT: "sent";
506
+ readonly TRYING: "trying";
507
+ };
508
+ /**
509
+ * @public
510
+ */
511
+ export type MessageSmsStatus = typeof MessageSmsStatus[keyof typeof MessageSmsStatus];
512
+ /**
513
+ * @public
514
+ * @enum
515
+ */
516
+ export declare const MessageType: {
517
+ readonly REGULAR: "regular";
518
+ readonly SYSTEM: "system";
519
+ };
520
+ /**
521
+ * @public
522
+ */
523
+ export type MessageType = typeof MessageType[keyof typeof MessageType];
524
+ /**
525
+ * @public
526
+ * @enum
527
+ */
528
+ export declare const MessageWhatsAppStatus: {
529
+ readonly DELIVERED: "delivered";
530
+ readonly ERROR: "error";
531
+ readonly SENT: "sent";
532
+ readonly TRYING: "trying";
533
+ };
534
+ /**
535
+ * @public
536
+ */
537
+ export type MessageWhatsAppStatus = typeof MessageWhatsAppStatus[keyof typeof MessageWhatsAppStatus];
538
+ /**
539
+ * @public
540
+ */
541
+ export interface InitialMessage {
542
+ text?: string;
543
+ attachments?: (MessageAttachment)[];
544
+ quote?: MessageQuote;
545
+ forward?: MessageForward;
546
+ /**
547
+ * A list of predefined replies will be visible to the user receiving the message. Once the user clicks on a reply, the system will automatically send the specified message to the conversation. You can specify up to 10 replies, which will only be visible if the message is the last one in the conversation.
548
+ * @public
549
+ */
550
+ predefinedReplies?: (MessagePredefinedReply)[];
551
+ type: MessageType;
552
+ giphy?: MessageGiphy;
553
+ silent?: boolean;
554
+ event?: string;
555
+ sms?: boolean;
556
+ smsStatus?: MessageSmsStatus;
557
+ whatsapp?: boolean;
558
+ whatsappStatus?: MessageWhatsAppStatus;
559
+ messageId: string;
560
+ }
561
+ /**
562
+ * @public
563
+ */
564
+ export interface WelcomeMessage {
565
+ text?: string;
566
+ attachments?: (MessageAttachment)[];
567
+ quote?: MessageQuote;
568
+ forward?: MessageForward;
569
+ /**
570
+ * A list of predefined replies will be visible to the user receiving the message. Once the user clicks on a reply, the system will automatically send the specified message to the conversation. You can specify up to 10 replies, which will only be visible if the message is the last one in the conversation.
571
+ * @public
572
+ */
573
+ predefinedReplies?: (MessagePredefinedReply)[];
574
+ type: MessageType;
575
+ giphy?: MessageGiphy;
576
+ silent?: boolean;
577
+ event?: string;
578
+ sms?: boolean;
579
+ smsStatus?: MessageSmsStatus;
580
+ whatsapp?: boolean;
581
+ whatsappStatus?: MessageWhatsAppStatus;
582
+ messageId: string;
583
+ user: User;
584
+ }
585
+ /**
586
+ * @public
587
+ */
588
+ export interface CreateKiteChannelInput {
589
+ /**
590
+ * The unique identifier of the user when a service token is used.
591
+ * @public
592
+ */
593
+ userId?: string;
594
+ /**
595
+ * The unique identifier for the new group channel. If not provided, the system will generate one.
596
+ * @public
597
+ */
598
+ channelId?: string;
599
+ /**
600
+ * The unique identifier of the Kite widget or email of the agent (example: 36cv69ao or vadim.ruban@wildix.com).
601
+ * @public
602
+ */
603
+ targetId: string;
604
+ /**
605
+ * The unique identifier of the route for time-based configuration.
606
+ * @public
607
+ */
608
+ targetRouteId?: string;
609
+ /**
610
+ * A list of welcome messages is created during channel creation to preserve the same state as the client has on the interface. If welcomeMessages or initialMessage are not specified, the system will generate a 'conversation was created' system message.
611
+ * @public
612
+ */
613
+ welcomeMessages?: (WelcomeMessage)[];
614
+ /**
615
+ * A message to be added to the conversation for the user. If welcomeMessages or initialMessage are not specified, the system will generate a 'conversation was created' system message.
616
+ * @public
617
+ */
618
+ initialMessage?: InitialMessage;
619
+ }
620
+ /**
621
+ * @public
622
+ */
623
+ export interface CreateKiteChannelOutput {
624
+ channel: Channel;
625
+ }
626
+ /**
627
+ * @public
628
+ * @enum
629
+ */
630
+ export declare const TargetNotEligibleReason: {
631
+ readonly NO_LICENSE: "no_license";
632
+ };
633
+ /**
634
+ * @public
635
+ */
636
+ export type TargetNotEligibleReason = typeof TargetNotEligibleReason[keyof typeof TargetNotEligibleReason];
637
+ /**
638
+ * @public
639
+ */
640
+ export declare class TargetNotEligibleException extends __BaseException {
641
+ readonly name: "TargetNotEligibleException";
642
+ readonly $fault: "client";
643
+ reason?: TargetNotEligibleReason;
644
+ /**
645
+ * @internal
646
+ */
647
+ constructor(opts: __ExceptionOptionType<TargetNotEligibleException, __BaseException>);
648
+ }
649
+ /**
650
+ * @public
651
+ */
652
+ export declare class TargetNotFoundException extends __BaseException {
653
+ readonly name: "TargetNotFoundException";
654
+ readonly $fault: "client";
655
+ /**
656
+ * @internal
657
+ */
658
+ constructor(opts: __ExceptionOptionType<TargetNotFoundException, __BaseException>);
659
+ }
432
660
  /**
433
661
  * @public
434
662
  */
@@ -658,42 +886,6 @@ export interface WebhookChatMemberRemovedEvent {
658
886
  botId?: string;
659
887
  data: WebhookChatMemberAddedOrRemovedEventData;
660
888
  }
661
- /**
662
- * @public
663
- */
664
- export interface MessageAttachment {
665
- id: string;
666
- /**
667
- * This *is* documentation about the field. Describe here what fsId and how to get it.
668
- * @public
669
- */
670
- fsId: string;
671
- mime?: string;
672
- name: string;
673
- size: number;
674
- width?: number;
675
- height?: number;
676
- thumbnail?: string;
677
- }
678
- /**
679
- * @public
680
- */
681
- export interface MessageForward {
682
- forwardCompany?: string;
683
- forwardDate: string;
684
- forwardEmail?: string;
685
- forwardName?: string;
686
- }
687
- /**
688
- * @public
689
- */
690
- export interface MessageGiphy {
691
- id: string;
692
- size: string;
693
- url: string;
694
- height: string;
695
- width: string;
696
- }
697
889
  /**
698
890
  * @public
699
891
  */
@@ -703,61 +895,6 @@ export interface Reaction {
703
895
  messageId?: string;
704
896
  user?: User;
705
897
  }
706
- /**
707
- * @public
708
- */
709
- export interface MessageQuote {
710
- messageId: string;
711
- channelId: string;
712
- user: User;
713
- text?: string;
714
- attachments?: (MessageAttachment)[];
715
- forward?: MessageForward;
716
- mentions?: (User)[];
717
- giphy?: MessageGiphy;
718
- createdAt: string;
719
- updatedAt?: string;
720
- }
721
- /**
722
- * @public
723
- * @enum
724
- */
725
- export declare const MessageSmsStatus: {
726
- readonly DELIVERED: "delivered";
727
- readonly ERROR: "error";
728
- readonly SENT: "sent";
729
- readonly TRYING: "trying";
730
- };
731
- /**
732
- * @public
733
- */
734
- export type MessageSmsStatus = typeof MessageSmsStatus[keyof typeof MessageSmsStatus];
735
- /**
736
- * @public
737
- * @enum
738
- */
739
- export declare const MessageType: {
740
- readonly REGULAR: "regular";
741
- readonly SYSTEM: "system";
742
- };
743
- /**
744
- * @public
745
- */
746
- export type MessageType = typeof MessageType[keyof typeof MessageType];
747
- /**
748
- * @public
749
- * @enum
750
- */
751
- export declare const MessageWhatsAppStatus: {
752
- readonly DELIVERED: "delivered";
753
- readonly ERROR: "error";
754
- readonly SENT: "sent";
755
- readonly TRYING: "trying";
756
- };
757
- /**
758
- * @public
759
- */
760
- export type MessageWhatsAppStatus = typeof MessageWhatsAppStatus[keyof typeof MessageWhatsAppStatus];
761
898
  /**
762
899
  * @public
763
900
  */
@@ -766,6 +903,11 @@ export interface Message {
766
903
  attachments?: (MessageAttachment)[];
767
904
  quote?: MessageQuote;
768
905
  forward?: MessageForward;
906
+ /**
907
+ * A list of predefined replies will be visible to the user receiving the message. Once the user clicks on a reply, the system will automatically send the specified message to the conversation. You can specify up to 10 replies, which will only be visible if the message is the last one in the conversation.
908
+ * @public
909
+ */
910
+ predefinedReplies?: (MessagePredefinedReply)[];
769
911
  type: MessageType;
770
912
  giphy?: MessageGiphy;
771
913
  silent?: boolean;
@@ -1209,7 +1351,7 @@ export interface ListChannelsInput {
1209
1351
  */
1210
1352
  userId?: string;
1211
1353
  /**
1212
- * The maximum number of channels to return. The value must be between 1 and 50.
1354
+ * The maximum number of channels to return. The value must be between 1 and 30.
1213
1355
  * @public
1214
1356
  */
1215
1357
  limit?: number;
@@ -1409,6 +1551,11 @@ export interface PartialUpdateMessageSetInput {
1409
1551
  attachments?: (MessageAttachment)[];
1410
1552
  quote?: MessageQuote;
1411
1553
  forward?: MessageForward;
1554
+ /**
1555
+ * A list of predefined replies will be visible to the user receiving the message. Once the user clicks on a reply, the system will automatically send the specified message to the conversation. You can specify up to 10 replies, which will only be visible if the message is the last one in the conversation.
1556
+ * @public
1557
+ */
1558
+ predefinedReplies?: (MessagePredefinedReply)[];
1412
1559
  }
1413
1560
  /**
1414
1561
  * @public
@@ -1525,6 +1672,11 @@ export interface SendMessageInput {
1525
1672
  attachments?: (MessageAttachment)[];
1526
1673
  quote?: MessageQuote;
1527
1674
  forward?: MessageForward;
1675
+ /**
1676
+ * A list of predefined replies will be visible to the user receiving the message. Once the user clicks on a reply, the system will automatically send the specified message to the conversation. You can specify up to 10 replies, which will only be visible if the message is the last one in the conversation.
1677
+ * @public
1678
+ */
1679
+ predefinedReplies?: (MessagePredefinedReply)[];
1528
1680
  /**
1529
1681
  * The unique identifier of the channel to which the message is sent.
1530
1682
  * @public
@@ -1706,6 +1858,11 @@ export interface UpdateMessageInput {
1706
1858
  attachments?: (MessageAttachment)[];
1707
1859
  quote?: MessageQuote;
1708
1860
  forward?: MessageForward;
1861
+ /**
1862
+ * A list of predefined replies will be visible to the user receiving the message. Once the user clicks on a reply, the system will automatically send the specified message to the conversation. You can specify up to 10 replies, which will only be visible if the message is the last one in the conversation.
1863
+ * @public
1864
+ */
1865
+ predefinedReplies?: (MessagePredefinedReply)[];
1709
1866
  /**
1710
1867
  * The unique identifier of the channel containing the message.
1711
1868
  * @public
@@ -1,6 +1,7 @@
1
1
  import { AddChannelMemberCommandInput, AddChannelMemberCommandOutput } from "../commands/AddChannelMemberCommand";
2
2
  import { AddChannelMembersCommandInput, AddChannelMembersCommandOutput } from "../commands/AddChannelMembersCommand";
3
3
  import { CreateGroupChannelCommandInput, CreateGroupChannelCommandOutput } from "../commands/CreateGroupChannelCommand";
4
+ import { CreateKiteChannelCommandInput, CreateKiteChannelCommandOutput } from "../commands/CreateKiteChannelCommand";
4
5
  import { DeleteChannelCommandInput, DeleteChannelCommandOutput } from "../commands/DeleteChannelCommand";
5
6
  import { DeleteChannelMemberCommandInput, DeleteChannelMemberCommandOutput } from "../commands/DeleteChannelMemberCommand";
6
7
  import { DeleteMessageCommandInput, DeleteMessageCommandOutput } from "../commands/DeleteMessageCommand";
@@ -48,6 +49,10 @@ export declare const se_AddChannelMembersCommand: (input: AddChannelMembersComma
48
49
  * serializeAws_restJson1CreateGroupChannelCommand
49
50
  */
50
51
  export declare const se_CreateGroupChannelCommand: (input: CreateGroupChannelCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
52
+ /**
53
+ * serializeAws_restJson1CreateKiteChannelCommand
54
+ */
55
+ export declare const se_CreateKiteChannelCommand: (input: CreateKiteChannelCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
51
56
  /**
52
57
  * serializeAws_restJson1DeleteChannelCommand
53
58
  */
@@ -192,6 +197,10 @@ export declare const de_AddChannelMembersCommand: (output: __HttpResponse, conte
192
197
  * deserializeAws_restJson1CreateGroupChannelCommand
193
198
  */
194
199
  export declare const de_CreateGroupChannelCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<CreateGroupChannelCommandOutput>;
200
+ /**
201
+ * deserializeAws_restJson1CreateKiteChannelCommand
202
+ */
203
+ export declare const de_CreateKiteChannelCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<CreateKiteChannelCommandOutput>;
195
204
  /**
196
205
  * deserializeAws_restJson1DeleteChannelCommand
197
206
  */
@@ -25,4 +25,5 @@ export declare const getRuntimeConfig: (config: ConversationsClientConfig) => {
25
25
  logger: import("@smithy/types").Logger;
26
26
  extensions: import("./runtimeExtensions").RuntimeExtension[];
27
27
  customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
28
+ retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined;
28
29
  };
@@ -25,4 +25,5 @@ export declare const getRuntimeConfig: (config: ConversationsClientConfig) => {
25
25
  logger: import("@smithy/types").Logger;
26
26
  extensions: import("./runtimeExtensions").RuntimeExtension[];
27
27
  customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
28
+ retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined;
28
29
  };
@@ -24,4 +24,5 @@ export declare const getRuntimeConfig: (config: ConversationsClientConfig) => {
24
24
  extensions: import("./runtimeExtensions").RuntimeExtension[];
25
25
  defaultsMode: import("@smithy/smithy-client").DefaultsMode | import("@smithy/types").Provider<import("@smithy/smithy-client").DefaultsMode>;
26
26
  customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
27
+ retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined;
27
28
  };
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.53",
4
+ "version": "1.0.54",
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",