@wildix/xbees-conversations-client 1.1.17 → 1.1.19

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.
@@ -855,12 +855,24 @@ export interface MessageAttachment {
855
855
  /**
856
856
  * @public
857
857
  */
858
- export type Element = Element.ActionsMember | Element.$UnknownMember;
858
+ export interface MessageTemplateConfig {
859
+ whatsapp?: TemplateWithParameters | undefined;
860
+ }
861
+ /**
862
+ * @public
863
+ */
864
+ export type Element = Element.ActionsMember | Element.TemplateMember | Element.$UnknownMember;
859
865
  /**
860
866
  * @public
861
867
  */
862
868
  export declare namespace Element {
869
+ interface TemplateMember {
870
+ template: MessageTemplateConfig;
871
+ actions?: never;
872
+ $unknown?: never;
873
+ }
863
874
  interface ActionsMember {
875
+ template?: never;
864
876
  actions: (ActionElement)[];
865
877
  $unknown?: never;
866
878
  }
@@ -868,10 +880,12 @@ export declare namespace Element {
868
880
  * @public
869
881
  */
870
882
  interface $UnknownMember {
883
+ template?: never;
871
884
  actions?: never;
872
885
  $unknown: [string, any];
873
886
  }
874
887
  interface Visitor<T> {
888
+ template: (value: MessageTemplateConfig) => T;
875
889
  actions: (value: (ActionElement)[]) => T;
876
890
  _: (name: string, value: any) => T;
877
891
  }
@@ -913,6 +927,34 @@ export interface MessageQuote {
913
927
  createdAt: string;
914
928
  updatedAt?: string | undefined;
915
929
  }
930
+ /**
931
+ * @public
932
+ * @enum
933
+ */
934
+ export declare const MessageSmsStatus: {
935
+ readonly DELIVERED: "delivered";
936
+ readonly ERROR: "error";
937
+ readonly SENT: "sent";
938
+ readonly TRYING: "trying";
939
+ };
940
+ /**
941
+ * @public
942
+ */
943
+ export type MessageSmsStatus = typeof MessageSmsStatus[keyof typeof MessageSmsStatus];
944
+ /**
945
+ * @public
946
+ * @enum
947
+ */
948
+ export declare const MessageWhatsAppStatus: {
949
+ readonly DELIVERED: "delivered";
950
+ readonly ERROR: "error";
951
+ readonly SENT: "sent";
952
+ readonly TRYING: "trying";
953
+ };
954
+ /**
955
+ * @public
956
+ */
957
+ export type MessageWhatsAppStatus = typeof MessageWhatsAppStatus[keyof typeof MessageWhatsAppStatus];
916
958
  /**
917
959
  * @public
918
960
  */
@@ -922,6 +964,10 @@ export interface InitialMessage {
922
964
  attachments?: (MessageAttachment)[] | undefined;
923
965
  quote?: MessageQuote | undefined;
924
966
  forward?: MessageForward | undefined;
967
+ whatsapp?: boolean | undefined;
968
+ whatsappStatus?: MessageWhatsAppStatus | undefined;
969
+ sms?: boolean | undefined;
970
+ smsStatus?: MessageSmsStatus | undefined;
925
971
  /**
926
972
  * The unique identifier of the message. If not provided, an ID will be auto-generated.
927
973
  * @public
@@ -942,6 +988,10 @@ export interface WelcomeMessage {
942
988
  attachments?: (MessageAttachment)[] | undefined;
943
989
  quote?: MessageQuote | undefined;
944
990
  forward?: MessageForward | undefined;
991
+ whatsapp?: boolean | undefined;
992
+ whatsappStatus?: MessageWhatsAppStatus | undefined;
993
+ sms?: boolean | undefined;
994
+ smsStatus?: MessageSmsStatus | undefined;
945
995
  /**
946
996
  * The unique identifier of the message. If not provided, an ID will be auto-generated.
947
997
  * @public
@@ -1204,20 +1254,6 @@ export interface Reaction {
1204
1254
  messageId?: string | undefined;
1205
1255
  user?: User | undefined;
1206
1256
  }
1207
- /**
1208
- * @public
1209
- * @enum
1210
- */
1211
- export declare const MessageSmsStatus: {
1212
- readonly DELIVERED: "delivered";
1213
- readonly ERROR: "error";
1214
- readonly SENT: "sent";
1215
- readonly TRYING: "trying";
1216
- };
1217
- /**
1218
- * @public
1219
- */
1220
- export type MessageSmsStatus = typeof MessageSmsStatus[keyof typeof MessageSmsStatus];
1221
1257
  /**
1222
1258
  * @public
1223
1259
  * @enum
@@ -1230,20 +1266,6 @@ export declare const MessageType: {
1230
1266
  * @public
1231
1267
  */
1232
1268
  export type MessageType = typeof MessageType[keyof typeof MessageType];
1233
- /**
1234
- * @public
1235
- * @enum
1236
- */
1237
- export declare const MessageWhatsAppStatus: {
1238
- readonly DELIVERED: "delivered";
1239
- readonly ERROR: "error";
1240
- readonly SENT: "sent";
1241
- readonly TRYING: "trying";
1242
- };
1243
- /**
1244
- * @public
1245
- */
1246
- export type MessageWhatsAppStatus = typeof MessageWhatsAppStatus[keyof typeof MessageWhatsAppStatus];
1247
1269
  /**
1248
1270
  * @public
1249
1271
  */
@@ -1253,14 +1275,14 @@ export interface Message {
1253
1275
  attachments?: (MessageAttachment)[] | undefined;
1254
1276
  quote?: MessageQuote | undefined;
1255
1277
  forward?: MessageForward | undefined;
1278
+ whatsapp?: boolean | undefined;
1279
+ whatsappStatus?: MessageWhatsAppStatus | undefined;
1280
+ sms?: boolean | undefined;
1281
+ smsStatus?: MessageSmsStatus | undefined;
1256
1282
  type: MessageType;
1257
1283
  giphy?: MessageGiphy | undefined;
1258
1284
  silent?: boolean | undefined;
1259
1285
  event?: string | undefined;
1260
- sms?: boolean | undefined;
1261
- smsStatus?: MessageSmsStatus | undefined;
1262
- whatsapp?: boolean | undefined;
1263
- whatsappStatus?: MessageWhatsAppStatus | undefined;
1264
1286
  messageId: string;
1265
1287
  channelId: string;
1266
1288
  user: User;
@@ -2440,6 +2462,10 @@ export interface PartialUpdateMessageSetInput {
2440
2462
  attachments?: (MessageAttachment)[] | undefined;
2441
2463
  quote?: MessageQuote | undefined;
2442
2464
  forward?: MessageForward | undefined;
2465
+ whatsapp?: boolean | undefined;
2466
+ whatsappStatus?: MessageWhatsAppStatus | undefined;
2467
+ sms?: boolean | undefined;
2468
+ smsStatus?: MessageSmsStatus | undefined;
2443
2469
  /**
2444
2470
  * A list of user IDs mentioned in the message.
2445
2471
  * @public
@@ -2456,7 +2482,11 @@ export declare const MessageUnsetFields: {
2456
2482
  readonly FORWARD: "forward";
2457
2483
  readonly MENTIONS: "mentions";
2458
2484
  readonly QUOTE: "quote";
2485
+ readonly SMS: "sms";
2486
+ readonly SMS_STATUS: "smsStatus";
2459
2487
  readonly TEXT: "text";
2488
+ readonly WHATSAPP: "whatsapp";
2489
+ readonly WHATSAPP_STATUS: "whatsappStatus";
2460
2490
  };
2461
2491
  /**
2462
2492
  * @public
@@ -2694,6 +2724,10 @@ export interface SendMessageInput {
2694
2724
  attachments?: (MessageAttachment)[] | undefined;
2695
2725
  quote?: MessageQuote | undefined;
2696
2726
  forward?: MessageForward | undefined;
2727
+ whatsapp?: boolean | undefined;
2728
+ whatsappStatus?: MessageWhatsAppStatus | undefined;
2729
+ sms?: boolean | undefined;
2730
+ smsStatus?: MessageSmsStatus | undefined;
2697
2731
  /**
2698
2732
  * The unique identifier of the message. If not provided, an ID will be auto-generated.
2699
2733
  * @public
@@ -2751,49 +2785,6 @@ export interface SendMessageReactionInput {
2751
2785
  */
2752
2786
  export interface SendMessageReactionOutput {
2753
2787
  }
2754
- /**
2755
- * @public
2756
- */
2757
- export interface WhatsAppTemplateConfig {
2758
- template: TemplateWithParameters;
2759
- }
2760
- /**
2761
- * @public
2762
- */
2763
- export interface SendTemplateMessageInput {
2764
- text?: string | undefined;
2765
- elements?: (Element)[] | undefined;
2766
- attachments?: (MessageAttachment)[] | undefined;
2767
- quote?: MessageQuote | undefined;
2768
- forward?: MessageForward | undefined;
2769
- /**
2770
- * The unique identifier of the message. If not provided, an ID will be auto-generated.
2771
- * @public
2772
- */
2773
- messageId?: string | undefined;
2774
- /**
2775
- * A list of user IDs mentioned in the message.
2776
- * @public
2777
- */
2778
- mentions?: (string)[] | undefined;
2779
- /**
2780
- * The unique identifier of the channel to which the template message is sent.
2781
- * @public
2782
- */
2783
- channelId: string;
2784
- /**
2785
- * The unique identifier of the user when a service token is used.
2786
- * @public
2787
- */
2788
- userId?: string | undefined;
2789
- whatsapp: WhatsAppTemplateConfig;
2790
- }
2791
- /**
2792
- * @public
2793
- */
2794
- export interface SendTemplateMessageOutput {
2795
- message: Message;
2796
- }
2797
2788
  /**
2798
2789
  * @public
2799
2790
  */
@@ -3104,6 +3095,10 @@ export interface UpdateMessageInput {
3104
3095
  attachments?: (MessageAttachment)[] | undefined;
3105
3096
  quote?: MessageQuote | undefined;
3106
3097
  forward?: MessageForward | undefined;
3098
+ whatsapp?: boolean | undefined;
3099
+ whatsappStatus?: MessageWhatsAppStatus | undefined;
3100
+ sms?: boolean | undefined;
3101
+ smsStatus?: MessageSmsStatus | undefined;
3107
3102
  /**
3108
3103
  * The unique identifier of the message to update.
3109
3104
  * @public
@@ -50,7 +50,6 @@ import { SendActionTriggerResultCommandInput, SendActionTriggerResultCommandOutp
50
50
  import { SendGiphyCommandInput, SendGiphyCommandOutput } from "../commands/SendGiphyCommand";
51
51
  import { SendMessageCommandInput, SendMessageCommandOutput } from "../commands/SendMessageCommand";
52
52
  import { SendMessageReactionCommandInput, SendMessageReactionCommandOutput } from "../commands/SendMessageReactionCommand";
53
- import { SendTemplateMessageCommandInput, SendTemplateMessageCommandOutput } from "../commands/SendTemplateMessageCommand";
54
53
  import { SendTypingStartCommandInput, SendTypingStartCommandOutput } from "../commands/SendTypingStartCommand";
55
54
  import { SendTypingStopCommandInput, SendTypingStopCommandOutput } from "../commands/SendTypingStopCommand";
56
55
  import { ShowChannelCommandInput, ShowChannelCommandOutput } from "../commands/ShowChannelCommand";
@@ -273,10 +272,6 @@ export declare const se_SendMessageCommand: (input: SendMessageCommandInput, con
273
272
  * serializeAws_restJson1SendMessageReactionCommand
274
273
  */
275
274
  export declare const se_SendMessageReactionCommand: (input: SendMessageReactionCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
276
- /**
277
- * serializeAws_restJson1SendTemplateMessageCommand
278
- */
279
- export declare const se_SendTemplateMessageCommand: (input: SendTemplateMessageCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
280
275
  /**
281
276
  * serializeAws_restJson1SendTypingStartCommand
282
277
  */
@@ -533,10 +528,6 @@ export declare const de_SendMessageCommand: (output: __HttpResponse, context: __
533
528
  * deserializeAws_restJson1SendMessageReactionCommand
534
529
  */
535
530
  export declare const de_SendMessageReactionCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<SendMessageReactionCommandOutput>;
536
- /**
537
- * deserializeAws_restJson1SendTemplateMessageCommand
538
- */
539
- export declare const de_SendTemplateMessageCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<SendTemplateMessageCommandOutput>;
540
531
  /**
541
532
  * deserializeAws_restJson1SendTypingStartCommand
542
533
  */
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.1.17",
4
+ "version": "1.1.19",
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",
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SendTemplateMessageCommand = exports.$Command = void 0;
4
- const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
5
- const middleware_serde_1 = require("@smithy/middleware-serde");
6
- const smithy_client_1 = require("@smithy/smithy-client");
7
- Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
- class SendTemplateMessageCommand extends smithy_client_1.Command.classBuilder()
9
- .m(function (Command, cs, config, o) {
10
- return [
11
- (0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
12
- ];
13
- })
14
- .s("Conversations", "SendTemplateMessage", {})
15
- .n("ConversationsClient", "SendTemplateMessageCommand")
16
- .f(void 0, void 0)
17
- .ser(Aws_restJson1_1.se_SendTemplateMessageCommand)
18
- .de(Aws_restJson1_1.de_SendTemplateMessageCommand)
19
- .build() {
20
- }
21
- exports.SendTemplateMessageCommand = SendTemplateMessageCommand;
@@ -1,17 +0,0 @@
1
- import { de_SendTemplateMessageCommand, se_SendTemplateMessageCommand, } from "../protocols/Aws_restJson1";
2
- import { getSerdePlugin } from "@smithy/middleware-serde";
3
- import { Command as $Command } from "@smithy/smithy-client";
4
- export { $Command };
5
- export class SendTemplateMessageCommand extends $Command.classBuilder()
6
- .m(function (Command, cs, config, o) {
7
- return [
8
- getSerdePlugin(config, this.serialize, this.deserialize),
9
- ];
10
- })
11
- .s("Conversations", "SendTemplateMessage", {})
12
- .n("ConversationsClient", "SendTemplateMessageCommand")
13
- .f(void 0, void 0)
14
- .ser(se_SendTemplateMessageCommand)
15
- .de(de_SendTemplateMessageCommand)
16
- .build() {
17
- }