@wildix/xbees-conversations-client 1.1.15 → 1.1.17

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 (33) hide show
  1. package/dist-cjs/Conversations.js +14 -0
  2. package/dist-cjs/commands/GetOrCreateSmsChannelCommand.js +21 -0
  3. package/dist-cjs/commands/GetOrCreateTelephonyChannelCommand.js +21 -0
  4. package/dist-cjs/commands/GetOrCreateWhatsAppChannelCommand.js +21 -0
  5. package/dist-cjs/commands/GetSmsChannelIdCommand.js +21 -0
  6. package/dist-cjs/commands/GetTelephonyChannelIdCommand.js +21 -0
  7. package/dist-cjs/commands/GetWhatsAppChannelIdCommand.js +21 -0
  8. package/dist-cjs/commands/SendTemplateMessageCommand.js +21 -0
  9. package/dist-cjs/commands/index.js +7 -0
  10. package/dist-cjs/protocols/Aws_restJson1.js +265 -3
  11. package/dist-es/Conversations.js +14 -0
  12. package/dist-es/commands/GetOrCreateSmsChannelCommand.js +17 -0
  13. package/dist-es/commands/GetOrCreateTelephonyChannelCommand.js +17 -0
  14. package/dist-es/commands/GetOrCreateWhatsAppChannelCommand.js +17 -0
  15. package/dist-es/commands/GetSmsChannelIdCommand.js +17 -0
  16. package/dist-es/commands/GetTelephonyChannelIdCommand.js +17 -0
  17. package/dist-es/commands/GetWhatsAppChannelIdCommand.js +17 -0
  18. package/dist-es/commands/SendTemplateMessageCommand.js +17 -0
  19. package/dist-es/commands/index.js +7 -0
  20. package/dist-es/protocols/Aws_restJson1.js +248 -0
  21. package/dist-types/Conversations.d.ts +49 -0
  22. package/dist-types/ConversationsClient.d.ts +9 -2
  23. package/dist-types/commands/GetOrCreateSmsChannelCommand.d.ts +151 -0
  24. package/dist-types/commands/GetOrCreateTelephonyChannelCommand.d.ts +151 -0
  25. package/dist-types/commands/GetOrCreateWhatsAppChannelCommand.d.ts +151 -0
  26. package/dist-types/commands/GetSmsChannelIdCommand.d.ts +81 -0
  27. package/dist-types/commands/GetTelephonyChannelIdCommand.d.ts +81 -0
  28. package/dist-types/commands/GetWhatsAppChannelIdCommand.d.ts +81 -0
  29. package/dist-types/commands/SendTemplateMessageCommand.d.ts +365 -0
  30. package/dist-types/commands/index.d.ts +7 -0
  31. package/dist-types/models/models_0.d.ts +243 -0
  32. package/dist-types/protocols/Aws_restJson1.d.ts +63 -0
  33. package/package.json +1 -1
@@ -53,6 +53,20 @@ export declare class RateLimitExceededException extends __BaseException {
53
53
  */
54
54
  constructor(opts: __ExceptionOptionType<RateLimitExceededException, __BaseException>);
55
55
  }
56
+ /**
57
+ * @public
58
+ */
59
+ export interface TemplateParameter {
60
+ name: string;
61
+ value: string;
62
+ }
63
+ /**
64
+ * @public
65
+ */
66
+ export interface TemplateWithParameters {
67
+ name: string;
68
+ parameters: (TemplateParameter)[];
69
+ }
56
70
  /**
57
71
  * @public
58
72
  * @enum
@@ -1705,6 +1719,161 @@ export interface GetOrCreateDirectChannelInput {
1705
1719
  export interface GetOrCreateDirectChannelOutput {
1706
1720
  channel: Channel;
1707
1721
  }
1722
+ /**
1723
+ * @public
1724
+ */
1725
+ export interface GetOrCreateSmsChannelInput {
1726
+ /**
1727
+ * The unique identifier of the user when a service token is used. Required if used PBX or S2S token.
1728
+ * @public
1729
+ */
1730
+ userId?: string | undefined;
1731
+ /**
1732
+ * The unique identifier of the telephony channel.
1733
+ * @public
1734
+ */
1735
+ serviceUri: string;
1736
+ /**
1737
+ * The unique identifier of the recipient. Required if recipientNumber is not provided.
1738
+ * @public
1739
+ */
1740
+ recipientId?: string | undefined;
1741
+ /**
1742
+ * The unique identifier of the recipient. Required if recipientId is not provided.
1743
+ * @public
1744
+ */
1745
+ recipientNumber?: string | undefined;
1746
+ }
1747
+ /**
1748
+ * @public
1749
+ */
1750
+ export interface GetOrCreateSmsChannelOutput {
1751
+ channel: Channel;
1752
+ }
1753
+ /**
1754
+ * @public
1755
+ */
1756
+ export interface GetOrCreateTelephonyChannelInput {
1757
+ /**
1758
+ * The unique identifier of the user when a service token is used. Required if used PBX or S2S token.
1759
+ * @public
1760
+ */
1761
+ userId?: string | undefined;
1762
+ /**
1763
+ * The unique identifier of the telephony channel.
1764
+ * @public
1765
+ */
1766
+ serviceUri: string;
1767
+ /**
1768
+ * The unique identifier of the recipient. Required if recipientNumber is not provided.
1769
+ * @public
1770
+ */
1771
+ recipientId?: string | undefined;
1772
+ /**
1773
+ * The unique identifier of the recipient. Required if recipientId is not provided.
1774
+ * @public
1775
+ */
1776
+ recipientNumber?: string | undefined;
1777
+ }
1778
+ /**
1779
+ * @public
1780
+ */
1781
+ export interface GetOrCreateTelephonyChannelOutput {
1782
+ channel: Channel;
1783
+ }
1784
+ /**
1785
+ * @public
1786
+ */
1787
+ export interface GetOrCreateWhatsAppChannelInput {
1788
+ /**
1789
+ * The unique identifier of the user when a service token is used. Required if used PBX or S2S token.
1790
+ * @public
1791
+ */
1792
+ userId?: string | undefined;
1793
+ /**
1794
+ * The unique identifier of the telephony channel.
1795
+ * @public
1796
+ */
1797
+ serviceUri: string;
1798
+ /**
1799
+ * The unique identifier of the recipient. Required if recipientNumber is not provided.
1800
+ * @public
1801
+ */
1802
+ recipientId?: string | undefined;
1803
+ /**
1804
+ * The unique identifier of the recipient. Required if recipientId is not provided.
1805
+ * @public
1806
+ */
1807
+ recipientNumber?: string | undefined;
1808
+ }
1809
+ /**
1810
+ * @public
1811
+ */
1812
+ export interface GetOrCreateWhatsAppChannelOutput {
1813
+ channel: Channel;
1814
+ }
1815
+ /**
1816
+ * @public
1817
+ */
1818
+ export interface GetSmsChannelIdInput {
1819
+ /**
1820
+ * The unique identifier of the user when a service token is used. Required if used PBX or S2S token.
1821
+ * @public
1822
+ */
1823
+ userId?: string | undefined;
1824
+ /**
1825
+ * The unique identifier of the telephony channel.
1826
+ * @public
1827
+ */
1828
+ serviceUri: string;
1829
+ /**
1830
+ * The unique identifier of the recipient. Required if recipientNumber is not provided.
1831
+ * @public
1832
+ */
1833
+ recipientId?: string | undefined;
1834
+ /**
1835
+ * The unique identifier of the recipient. Required if recipientId is not provided.
1836
+ * @public
1837
+ */
1838
+ recipientNumber?: string | undefined;
1839
+ }
1840
+ /**
1841
+ * @public
1842
+ */
1843
+ export interface GetSmsChannelIdOutput {
1844
+ channelId: string;
1845
+ }
1846
+ /**
1847
+ * @public
1848
+ */
1849
+ export interface GetTelephonyChannelIdInput {
1850
+ /**
1851
+ * The unique identifier of the user when a service token is used. Required if used PBX or S2S token.
1852
+ * @public
1853
+ */
1854
+ userId?: string | undefined;
1855
+ /**
1856
+ * The unique identifier of the telephony channel.
1857
+ * @public
1858
+ */
1859
+ serviceUri: string;
1860
+ /**
1861
+ * The unique identifier of the recipient. Required if recipientNumber is not provided.
1862
+ * @public
1863
+ */
1864
+ recipientId?: string | undefined;
1865
+ /**
1866
+ * The unique identifier of the recipient. Required if recipientId is not provided.
1867
+ * @public
1868
+ */
1869
+ recipientNumber?: string | undefined;
1870
+ }
1871
+ /**
1872
+ * @public
1873
+ */
1874
+ export interface GetTelephonyChannelIdOutput {
1875
+ channelId: string;
1876
+ }
1708
1877
  /**
1709
1878
  * @public
1710
1879
  */
@@ -1751,6 +1920,37 @@ export interface GetUploadedFileInfoInput {
1751
1920
  export interface GetUploadedFileInfoOutput {
1752
1921
  file: MessageAttachment;
1753
1922
  }
1923
+ /**
1924
+ * @public
1925
+ */
1926
+ export interface GetWhatsAppChannelIdInput {
1927
+ /**
1928
+ * The unique identifier of the user when a service token is used. Required if used PBX or S2S token.
1929
+ * @public
1930
+ */
1931
+ userId?: string | undefined;
1932
+ /**
1933
+ * The unique identifier of the telephony channel.
1934
+ * @public
1935
+ */
1936
+ serviceUri: string;
1937
+ /**
1938
+ * The unique identifier of the recipient. Required if recipientNumber is not provided.
1939
+ * @public
1940
+ */
1941
+ recipientId?: string | undefined;
1942
+ /**
1943
+ * The unique identifier of the recipient. Required if recipientId is not provided.
1944
+ * @public
1945
+ */
1946
+ recipientNumber?: string | undefined;
1947
+ }
1948
+ /**
1949
+ * @public
1950
+ */
1951
+ export interface GetWhatsAppChannelIdOutput {
1952
+ channelId: string;
1953
+ }
1754
1954
  /**
1755
1955
  * @public
1756
1956
  */
@@ -2551,6 +2751,49 @@ export interface SendMessageReactionInput {
2551
2751
  */
2552
2752
  export interface SendMessageReactionOutput {
2553
2753
  }
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
+ }
2554
2797
  /**
2555
2798
  * @public
2556
2799
  */
@@ -18,8 +18,14 @@ import { GetFilePresignedDownloadUrlCommandInput, GetFilePresignedDownloadUrlCom
18
18
  import { GetInboxStateCommandInput, GetInboxStateCommandOutput } from "../commands/GetInboxStateCommand";
19
19
  import { GetMessageCommandInput, GetMessageCommandOutput } from "../commands/GetMessageCommand";
20
20
  import { GetOrCreateDirectChannelCommandInput, GetOrCreateDirectChannelCommandOutput } from "../commands/GetOrCreateDirectChannelCommand";
21
+ import { GetOrCreateSmsChannelCommandInput, GetOrCreateSmsChannelCommandOutput } from "../commands/GetOrCreateSmsChannelCommand";
22
+ import { GetOrCreateTelephonyChannelCommandInput, GetOrCreateTelephonyChannelCommandOutput } from "../commands/GetOrCreateTelephonyChannelCommand";
23
+ import { GetOrCreateWhatsAppChannelCommandInput, GetOrCreateWhatsAppChannelCommandOutput } from "../commands/GetOrCreateWhatsAppChannelCommand";
24
+ import { GetSmsChannelIdCommandInput, GetSmsChannelIdCommandOutput } from "../commands/GetSmsChannelIdCommand";
25
+ import { GetTelephonyChannelIdCommandInput, GetTelephonyChannelIdCommandOutput } from "../commands/GetTelephonyChannelIdCommand";
21
26
  import { GetTokenCommandInput, GetTokenCommandOutput } from "../commands/GetTokenCommand";
22
27
  import { GetUploadedFileInfoCommandInput, GetUploadedFileInfoCommandOutput } from "../commands/GetUploadedFileInfoCommand";
28
+ import { GetWhatsAppChannelIdCommandInput, GetWhatsAppChannelIdCommandOutput } from "../commands/GetWhatsAppChannelIdCommand";
23
29
  import { HideChannelCommandInput, HideChannelCommandOutput } from "../commands/HideChannelCommand";
24
30
  import { InviteCommandInput, InviteCommandOutput } from "../commands/InviteCommand";
25
31
  import { JoinChannelCommandInput, JoinChannelCommandOutput } from "../commands/JoinChannelCommand";
@@ -44,6 +50,7 @@ import { SendActionTriggerResultCommandInput, SendActionTriggerResultCommandOutp
44
50
  import { SendGiphyCommandInput, SendGiphyCommandOutput } from "../commands/SendGiphyCommand";
45
51
  import { SendMessageCommandInput, SendMessageCommandOutput } from "../commands/SendMessageCommand";
46
52
  import { SendMessageReactionCommandInput, SendMessageReactionCommandOutput } from "../commands/SendMessageReactionCommand";
53
+ import { SendTemplateMessageCommandInput, SendTemplateMessageCommandOutput } from "../commands/SendTemplateMessageCommand";
47
54
  import { SendTypingStartCommandInput, SendTypingStartCommandOutput } from "../commands/SendTypingStartCommand";
48
55
  import { SendTypingStopCommandInput, SendTypingStopCommandOutput } from "../commands/SendTypingStopCommand";
49
56
  import { ShowChannelCommandInput, ShowChannelCommandOutput } from "../commands/ShowChannelCommand";
@@ -138,6 +145,26 @@ export declare const se_GetMessageCommand: (input: GetMessageCommandInput, conte
138
145
  * serializeAws_restJson1GetOrCreateDirectChannelCommand
139
146
  */
140
147
  export declare const se_GetOrCreateDirectChannelCommand: (input: GetOrCreateDirectChannelCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
148
+ /**
149
+ * serializeAws_restJson1GetOrCreateSmsChannelCommand
150
+ */
151
+ export declare const se_GetOrCreateSmsChannelCommand: (input: GetOrCreateSmsChannelCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
152
+ /**
153
+ * serializeAws_restJson1GetOrCreateTelephonyChannelCommand
154
+ */
155
+ export declare const se_GetOrCreateTelephonyChannelCommand: (input: GetOrCreateTelephonyChannelCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
156
+ /**
157
+ * serializeAws_restJson1GetOrCreateWhatsAppChannelCommand
158
+ */
159
+ export declare const se_GetOrCreateWhatsAppChannelCommand: (input: GetOrCreateWhatsAppChannelCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
160
+ /**
161
+ * serializeAws_restJson1GetSmsChannelIdCommand
162
+ */
163
+ export declare const se_GetSmsChannelIdCommand: (input: GetSmsChannelIdCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
164
+ /**
165
+ * serializeAws_restJson1GetTelephonyChannelIdCommand
166
+ */
167
+ export declare const se_GetTelephonyChannelIdCommand: (input: GetTelephonyChannelIdCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
141
168
  /**
142
169
  * serializeAws_restJson1GetTokenCommand
143
170
  */
@@ -146,6 +173,10 @@ export declare const se_GetTokenCommand: (input: GetTokenCommandInput, context:
146
173
  * serializeAws_restJson1GetUploadedFileInfoCommand
147
174
  */
148
175
  export declare const se_GetUploadedFileInfoCommand: (input: GetUploadedFileInfoCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
176
+ /**
177
+ * serializeAws_restJson1GetWhatsAppChannelIdCommand
178
+ */
179
+ export declare const se_GetWhatsAppChannelIdCommand: (input: GetWhatsAppChannelIdCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
149
180
  /**
150
181
  * serializeAws_restJson1HideChannelCommand
151
182
  */
@@ -242,6 +273,10 @@ export declare const se_SendMessageCommand: (input: SendMessageCommandInput, con
242
273
  * serializeAws_restJson1SendMessageReactionCommand
243
274
  */
244
275
  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>;
245
280
  /**
246
281
  * serializeAws_restJson1SendTypingStartCommand
247
282
  */
@@ -370,6 +405,26 @@ export declare const de_GetMessageCommand: (output: __HttpResponse, context: __S
370
405
  * deserializeAws_restJson1GetOrCreateDirectChannelCommand
371
406
  */
372
407
  export declare const de_GetOrCreateDirectChannelCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetOrCreateDirectChannelCommandOutput>;
408
+ /**
409
+ * deserializeAws_restJson1GetOrCreateSmsChannelCommand
410
+ */
411
+ export declare const de_GetOrCreateSmsChannelCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetOrCreateSmsChannelCommandOutput>;
412
+ /**
413
+ * deserializeAws_restJson1GetOrCreateTelephonyChannelCommand
414
+ */
415
+ export declare const de_GetOrCreateTelephonyChannelCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetOrCreateTelephonyChannelCommandOutput>;
416
+ /**
417
+ * deserializeAws_restJson1GetOrCreateWhatsAppChannelCommand
418
+ */
419
+ export declare const de_GetOrCreateWhatsAppChannelCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetOrCreateWhatsAppChannelCommandOutput>;
420
+ /**
421
+ * deserializeAws_restJson1GetSmsChannelIdCommand
422
+ */
423
+ export declare const de_GetSmsChannelIdCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetSmsChannelIdCommandOutput>;
424
+ /**
425
+ * deserializeAws_restJson1GetTelephonyChannelIdCommand
426
+ */
427
+ export declare const de_GetTelephonyChannelIdCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetTelephonyChannelIdCommandOutput>;
373
428
  /**
374
429
  * deserializeAws_restJson1GetTokenCommand
375
430
  */
@@ -378,6 +433,10 @@ export declare const de_GetTokenCommand: (output: __HttpResponse, context: __Ser
378
433
  * deserializeAws_restJson1GetUploadedFileInfoCommand
379
434
  */
380
435
  export declare const de_GetUploadedFileInfoCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetUploadedFileInfoCommandOutput>;
436
+ /**
437
+ * deserializeAws_restJson1GetWhatsAppChannelIdCommand
438
+ */
439
+ export declare const de_GetWhatsAppChannelIdCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetWhatsAppChannelIdCommandOutput>;
381
440
  /**
382
441
  * deserializeAws_restJson1HideChannelCommand
383
442
  */
@@ -474,6 +533,10 @@ export declare const de_SendMessageCommand: (output: __HttpResponse, context: __
474
533
  * deserializeAws_restJson1SendMessageReactionCommand
475
534
  */
476
535
  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>;
477
540
  /**
478
541
  * deserializeAws_restJson1SendTypingStartCommand
479
542
  */
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.15",
4
+ "version": "1.1.17",
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",