@twilio/conversations 2.0.1-rc.9 → 2.1.0-rc.5

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 (88) hide show
  1. package/CHANGELOG.md +74 -0
  2. package/NOTICE.txt +679 -0
  3. package/builds/browser.js +892 -619
  4. package/builds/browser.js.map +1 -1
  5. package/builds/lib.d.ts +371 -124
  6. package/builds/lib.js +892 -619
  7. package/builds/lib.js.map +1 -1
  8. package/builds/twilio-conversations.js +1067 -939
  9. package/builds/twilio-conversations.min.js +2 -14
  10. package/dist/aggregated-delivery-receipt.js +6 -1
  11. package/dist/aggregated-delivery-receipt.js.map +1 -1
  12. package/dist/client.js +165 -142
  13. package/dist/client.js.map +1 -1
  14. package/dist/command-executor.js +16 -14
  15. package/dist/command-executor.js.map +1 -1
  16. package/dist/configuration.js +14 -10
  17. package/dist/configuration.js.map +1 -1
  18. package/dist/conversation.js +232 -159
  19. package/dist/conversation.js.map +1 -1
  20. package/dist/data/conversations.js +82 -78
  21. package/dist/data/conversations.js.map +1 -1
  22. package/dist/data/messages.js +43 -39
  23. package/dist/data/messages.js.map +1 -1
  24. package/dist/data/participants.js +100 -78
  25. package/dist/data/participants.js.map +1 -1
  26. package/dist/data/users.js +24 -22
  27. package/dist/data/users.js.map +1 -1
  28. package/dist/detailed-delivery-receipt.js +1 -1
  29. package/dist/detailed-delivery-receipt.js.map +1 -1
  30. package/dist/index.js +1 -0
  31. package/dist/index.js.map +1 -1
  32. package/dist/interfaces/attributes.js +147 -0
  33. package/dist/interfaces/attributes.js.map +1 -0
  34. package/dist/interfaces/notification-types.js +5 -5
  35. package/dist/interfaces/notification-types.js.map +1 -1
  36. package/dist/logger.js +36 -15
  37. package/dist/logger.js.map +1 -1
  38. package/dist/media.js +21 -9
  39. package/dist/media.js.map +1 -1
  40. package/dist/message-builder.js +56 -3
  41. package/dist/message-builder.js.map +1 -1
  42. package/dist/message.js +158 -78
  43. package/dist/message.js.map +1 -1
  44. package/dist/packages/conversations/package.json.js +1 -1
  45. package/dist/participant.js +101 -50
  46. package/dist/participant.js.map +1 -1
  47. package/dist/push-notification.js.map +1 -1
  48. package/dist/rest-paginator.js +16 -6
  49. package/dist/rest-paginator.js.map +1 -1
  50. package/dist/services/network.js +18 -14
  51. package/dist/services/network.js.map +1 -1
  52. package/dist/services/typing-indicator.js +20 -17
  53. package/dist/services/typing-indicator.js.map +1 -1
  54. package/dist/unsent-message.js.map +1 -1
  55. package/dist/user.js +87 -60
  56. package/dist/user.js.map +1 -1
  57. package/dist/util/deferred.js +3 -1
  58. package/dist/util/deferred.js.map +1 -1
  59. package/dist/util/index.js +6 -6
  60. package/dist/util/index.js.map +1 -1
  61. package/docs/assets/js/search.js +1 -1
  62. package/docs/classes/AggregatedDeliveryReceipt.html +15 -0
  63. package/docs/classes/Client.html +39 -30
  64. package/docs/classes/Conversation.html +52 -30
  65. package/docs/classes/DetailedDeliveryReceipt.html +16 -1
  66. package/docs/classes/Media.html +15 -0
  67. package/docs/classes/Message.html +88 -7
  68. package/docs/classes/MessageBuilder.html +93 -2
  69. package/docs/classes/Participant.html +52 -8
  70. package/docs/classes/PushNotification.html +15 -0
  71. package/docs/classes/RestPaginator.html +15 -0
  72. package/docs/classes/UnsentMessage.html +15 -0
  73. package/docs/classes/User.html +22 -7
  74. package/docs/index.html +37 -3
  75. package/docs/interfaces/ClientOptions.html +15 -0
  76. package/docs/interfaces/ConversationBindings.html +3118 -0
  77. package/docs/interfaces/ConversationEmailBinding.html +3118 -0
  78. package/docs/interfaces/ConversationState.html +15 -0
  79. package/docs/interfaces/CreateConversationOptions.html +16 -1
  80. package/docs/interfaces/LastMessage.html +15 -0
  81. package/docs/interfaces/Paginator.html +15 -0
  82. package/docs/interfaces/ParticipantBindings.html +3118 -0
  83. package/docs/interfaces/ParticipantEmailBinding.html +3118 -0
  84. package/docs/interfaces/PushNotificationData.html +15 -0
  85. package/docs/interfaces/SendEmailOptions.html +15 -0
  86. package/docs/interfaces/SendMediaOptions.html +15 -0
  87. package/docs/modules.html +37 -3
  88. package/package.json +24 -18
package/builds/lib.d.ts CHANGED
@@ -1,5 +1,6 @@
1
- import { SyncClient } from "twilio-sync";
2
- import { Transport, TwilsockClient, InitRegistration } from "twilsock";
1
+ import { SyncClient, SyncDocument, SyncList } from "twilio-sync";
2
+ import { LogLevelDesc } from "loglevel";
3
+ import { Transport, TwilsockClient, InitRegistration, TransportResult } from "twilsock";
3
4
  import { ConnectionState as TwilsockConnectionState } from "twilsock";
4
5
  import { ReplayEventEmitter } from "@twilio/replay-event-emitter";
5
6
  import { ChannelType, Notifications } from "@twilio/notifications";
@@ -41,8 +42,8 @@ declare class Logger {
41
42
  private prefix;
42
43
  private constructor();
43
44
  static scope(prefix: string): Logger;
44
- setLevel(level: any): void;
45
- static setLevel(level: any): void;
45
+ setLevel(level: LogLevelDesc): void;
46
+ static setLevel(level: LogLevelDesc): void;
46
47
  trace(...args: any[]): void;
47
48
  debug(...args: any[]): void;
48
49
  info(...args: any[]): void;
@@ -90,7 +91,7 @@ declare class Configuration {
90
91
  readonly userIdentity: string;
91
92
  readonly userInfo: string;
92
93
  readonly myConversations: string;
93
- constructor(options: Record<string, any>, configurationResponse: ConfigurationResponse, logger: Logger);
94
+ constructor(options: ClientOptions, configurationResponse: ConfigurationResponse, logger: Logger);
94
95
  }
95
96
  interface CommandExecutorServices {
96
97
  transport: Transport;
@@ -105,6 +106,11 @@ declare class CommandExecutor {
105
106
  fetchResource<REQ = void, RESP = void>(url: string, requestBody?: REQ): Promise<RESP>;
106
107
  mutateResource<REQ = void, RESP = void>(method: "post" | "delete", url: string, requestBody?: REQ): Promise<RESP>;
107
108
  }
109
+ type JSONValue = null | string | number | boolean | JSONObject | JSONArray;
110
+ type JSONObject = {
111
+ [x: string]: JSONValue;
112
+ };
113
+ type JSONArray = JSONValue[];
108
114
  type UserEvents = {
109
115
  updated: (data: {
110
116
  user: User;
@@ -180,25 +186,29 @@ declare class User extends ReplayEventEmitter<UserEvents> {
180
186
  /**
181
187
  * Custom attributes of the user.
182
188
  */
183
- get attributes(): any;
189
+ get attributes(): JSONValue;
184
190
  /**
185
191
  * Friendly name of the user, null if not set.
186
192
  */
187
- get friendlyName(): string;
193
+ get friendlyName(): string | null;
188
194
  /**
189
195
  * Status of the real-time conversation connection of the user.
190
196
  */
191
- get isOnline(): boolean;
197
+ get isOnline(): boolean | null;
192
198
  /**
193
199
  * User push notification registration status.
194
200
  */
195
- get isNotifiable(): boolean;
201
+ get isNotifiable(): boolean | null;
196
202
  /**
197
203
  * True if this user is receiving real-time status updates.
198
204
  */
199
205
  get isSubscribed(): boolean;
200
206
  // Handles service updates
201
- _update(key: string, value: any): Promise<void>;
207
+ _update(key: string, value: {
208
+ value: string;
209
+ notifiable: boolean | null;
210
+ online: boolean | null;
211
+ }): Promise<void>;
202
212
  // Fetch reachability info
203
213
  private _updateReachabilityInfo;
204
214
  // Fetch user
@@ -208,7 +218,7 @@ declare class User extends ReplayEventEmitter<UserEvents> {
208
218
  * Edit user attributes.
209
219
  * @param attributes New attributes.
210
220
  */
211
- updateAttributes(attributes: any): Promise<User>;
221
+ updateAttributes(attributes: JSONValue): Promise<User>;
212
222
  /**
213
223
  * Update the friendly name of the user.
214
224
  * @param friendlyName New friendly name.
@@ -232,7 +242,7 @@ declare class Network {
232
242
  private cleanupCache;
233
243
  pokeTimer(): void;
234
244
  private executeWithRetry;
235
- get(url: string): Promise<any>;
245
+ get<T>(url: string): Promise<TransportResult<T>>;
236
246
  }
237
247
  type UsersEvents = {
238
248
  userUpdated: (data: {
@@ -264,7 +274,7 @@ declare class Users extends ReplayEventEmitter<UsersEvents> {
264
274
  * if not - then subscribes and adds user to the FIFO stack
265
275
  * @returns {Promise<User>} Fully initialized user
266
276
  */
267
- getUser(identity: string, entityName?: string): Promise<User>;
277
+ getUser(identity?: string, entityName?: string): Promise<User>;
268
278
  /**
269
279
  * @returns {Promise<Array<User>>} returns list of subscribed User objects {@see User}
270
280
  */
@@ -283,15 +293,16 @@ type ParticipantEvents = {
283
293
  }) => void;
284
294
  };
285
295
  interface ParticipantDescriptor {
286
- attributes?: Object;
287
- dateCreated: any;
288
- dateUpdated: any;
296
+ attributes?: JSONValue;
297
+ dateCreated: Date | null;
298
+ dateUpdated: Date | null;
289
299
  identity: string;
290
300
  roleSid?: string;
291
- lastConsumedMessageIndex: number;
301
+ lastConsumedMessageIndex: number | null;
292
302
  lastConsumptionTimestamp: number;
293
303
  type: ParticipantType;
294
304
  userInfo: string;
305
+ bindings?: ParticipantBindings;
295
306
  }
296
307
  interface ParticipantServices {
297
308
  users: Users;
@@ -303,15 +314,35 @@ interface ParticipantLinks {
303
314
  /**
304
315
  * The reason for the `updated` event being emitted by a participant.
305
316
  */
306
- type ParticipantUpdateReason = "attributes" | "dateCreated" | "dateUpdated" | "roleSid" | "lastReadMessageIndex" | "lastReadTimestamp";
317
+ type ParticipantUpdateReason = "attributes" | "dateCreated" | "dateUpdated" | "roleSid" | "lastReadMessageIndex" | "lastReadTimestamp" | "bindings";
307
318
  /**
308
319
  * Type of a participant.
309
320
  */
310
- type ParticipantType = "chat" | "sms" | "whatsapp";
321
+ type ParticipantType = "chat" | "sms" | "whatsapp" | "email";
311
322
  interface ParticipantUpdatedEventArgs {
312
323
  participant: Participant;
313
324
  updateReasons: ParticipantUpdateReason[];
314
325
  }
326
+ /**
327
+ * Bindings for conversation participant.
328
+ */
329
+ interface ParticipantBindings {
330
+ email?: ParticipantEmailBinding;
331
+ }
332
+ /**
333
+ * Email participation level.
334
+ * to = to/from
335
+ * cc = cc
336
+ */
337
+ type ParticipantEmailLevel = "to" | "cc";
338
+ /**
339
+ * Bindings for email participant.
340
+ */
341
+ interface ParticipantEmailBinding {
342
+ name: string;
343
+ address: string;
344
+ level: ParticipantEmailLevel;
345
+ }
315
346
  /**
316
347
  * A participant represents a remote client in a conversation.
317
348
  */
@@ -330,19 +361,19 @@ declare class Participant extends ReplayEventEmitter<ParticipantEvents> {
330
361
  /**
331
362
  * Custom attributes of the participant.
332
363
  */
333
- get attributes(): Object;
364
+ get attributes(): JSONValue;
334
365
  /**
335
366
  * Date this participant was created on.
336
367
  */
337
- get dateCreated(): Date;
368
+ get dateCreated(): Date | null;
338
369
  /**
339
370
  * Date this participant was last updated on.
340
371
  */
341
- get dateUpdated(): Date;
372
+ get dateUpdated(): Date | null;
342
373
  /**
343
374
  * Identity of the participant.
344
375
  */
345
- get identity(): string;
376
+ get identity(): string | null;
346
377
  /**
347
378
  * Indicates whether the participant is currently typing.
348
379
  */
@@ -357,12 +388,22 @@ declare class Participant extends ReplayEventEmitter<ParticipantEvents> {
357
388
  /**
358
389
  * Date of the most recent read horizon update.
359
390
  */
360
- get lastReadTimestamp(): Date;
391
+ get lastReadTimestamp(): Date | null;
361
392
  get roleSid(): string;
362
393
  /**
363
- * Message type of the participant.
394
+ * Type of the participant.
364
395
  */
365
396
  get type(): ParticipantType;
397
+ /**
398
+ * Get the bindings mapping for the current participant.
399
+ * Available binding depends on the participant type.
400
+ * You could access it as `participant.bindings.sms?.address` or
401
+ * using the type dynamically `participant.bindings[participant.type]`
402
+ * just be aware that the binding information has different structure for
403
+ * each participant type.
404
+ * See also {ParticipantEmailBinding}, the only available currently binding descriptor.
405
+ */
406
+ get bindings(): ParticipantBindings;
366
407
  /**
367
408
  * @internal
368
409
  */
@@ -420,7 +461,30 @@ declare class Participant extends ReplayEventEmitter<ParticipantEvents> {
420
461
  * Update the attributes of the participant.
421
462
  * @param attributes New attributes.
422
463
  */
423
- updateAttributes(attributes: any): Promise<Participant>;
464
+ updateAttributes(attributes: JSONValue): Promise<Participant>;
465
+ }
466
+ interface ParticipantResponse {
467
+ account_sid: string;
468
+ chat_service_sid: string;
469
+ conversation_sid: string;
470
+ role_sid: string;
471
+ sid: string;
472
+ attributes: string;
473
+ date_created: string;
474
+ date_updated: string;
475
+ identity: string | null;
476
+ messaging_binding: {
477
+ type: string;
478
+ address: string;
479
+ proxy_address: string;
480
+ } | null;
481
+ url: string;
482
+ links: {
483
+ conversation: string;
484
+ };
485
+ }
486
+ interface ParticipantBindingOptions {
487
+ email?: ParticipantEmailBinding;
424
488
  }
425
489
  /**
426
490
  * Category of media. Possible values are as follows:
@@ -432,7 +496,7 @@ type MediaCategory$0 = McsMediaCategory;
432
496
  interface MediaState {
433
497
  sid: string;
434
498
  category: MediaCategory$0;
435
- filename?: string;
499
+ filename: string | null;
436
500
  contentType: string;
437
501
  size: number;
438
502
  }
@@ -457,7 +521,7 @@ declare class Media {
457
521
  /**
458
522
  * File name. Null if absent.
459
523
  */
460
- get filename(): string;
524
+ get filename(): string | null;
461
525
  /**
462
526
  * Content type of the media.
463
527
  */
@@ -477,7 +541,7 @@ declare class Media {
477
541
  * If the URL becomes expired, you need to request a new one.
478
542
  * Each call to this function produces a new temporary URL.
479
543
  */
480
- getContentTemporaryUrl(): Promise<string>;
544
+ getContentTemporaryUrl(): Promise<string | null>;
481
545
  /**
482
546
  * Returns cached direct content URL for the media.
483
547
  *
@@ -487,7 +551,7 @@ declare class Media {
487
551
  *
488
552
  * @returns {Promise<String>}
489
553
  */
490
- getCachedTemporaryUrl(): Promise<string>;
554
+ getCachedTemporaryUrl(): Promise<string | null>;
491
555
  private _fetchMcsMedia;
492
556
  }
493
557
  /**
@@ -582,7 +646,7 @@ interface DetailedDeliveryReceiptDescriptor {
582
646
  channel_message_sid: string;
583
647
  participant_sid: string;
584
648
  status: DeliveryStatus;
585
- error_code: number | null;
649
+ error_code: string | null;
586
650
  date_created: string;
587
651
  date_updated: string;
588
652
  }
@@ -618,7 +682,7 @@ declare class DetailedDeliveryReceipt {
618
682
  * Numeric error code mapped from Status callback code. Information about the error codes can be found
619
683
  * [here](https://www.twilio.com/docs/sms/api/message-resource#delivery-related-errors).
620
684
  */
621
- errorCode: number | null;
685
+ errorCode: string | 0;
622
686
  /**
623
687
  * Date this delivery receipt was created on.
624
688
  */
@@ -660,6 +724,21 @@ interface MessageUpdatedEventArgs {
660
724
  message: Message;
661
725
  updateReasons: MessageUpdateReason[];
662
726
  }
727
+ interface MessageData {
728
+ sid: string;
729
+ text?: string;
730
+ type?: MessageType;
731
+ author: string | null;
732
+ subject: string | null;
733
+ lastUpdatedBy?: string | null;
734
+ attributes?: JSONValue;
735
+ dateUpdated: string;
736
+ timestamp?: string;
737
+ medias?: Media[];
738
+ media?: Media;
739
+ memberSid?: string;
740
+ delivery?: AggregatedDeliveryDescriptor;
741
+ }
663
742
  /**
664
743
  * A message in a conversation.
665
744
  */
@@ -675,7 +754,7 @@ declare class Message extends ReplayEventEmitter<MessageEvents> {
675
754
  /**
676
755
  * @internal
677
756
  */
678
- constructor(index: number, data: any, conversation: Conversation, links: MessageLinks, configuration: Configuration, services: MessageServices);
757
+ constructor(index: number, data: MessageData, conversation: Conversation, links: MessageLinks, configuration: Configuration, services: MessageServices);
679
758
  /**
680
759
  * Fired when the properties or the body of the message has been updated.
681
760
  *
@@ -692,7 +771,7 @@ declare class Message extends ReplayEventEmitter<MessageEvents> {
692
771
  /**
693
772
  * Name of the user that sent the message.
694
773
  */
695
- get author(): string;
774
+ get author(): string | null;
696
775
  /**
697
776
  * Message subject. Used only in email conversations.
698
777
  */
@@ -700,11 +779,11 @@ declare class Message extends ReplayEventEmitter<MessageEvents> {
700
779
  /**
701
780
  * Body of the message.
702
781
  */
703
- get body(): string;
782
+ get body(): string | null;
704
783
  /**
705
784
  * Date this message was last updated on.
706
785
  */
707
- get dateUpdated(): Date;
786
+ get dateUpdated(): Date | null;
708
787
  /**
709
788
  * Index of the message in the conversation's messages list.
710
789
  * By design of the Conversations system, the message indices may have arbitrary gaps between them,
@@ -720,24 +799,24 @@ declare class Message extends ReplayEventEmitter<MessageEvents> {
720
799
  /**
721
800
  * Identity of the last user that updated the message.
722
801
  */
723
- get lastUpdatedBy(): string;
802
+ get lastUpdatedBy(): string | null;
724
803
  /**
725
804
  * Date this message was created on.
726
805
  */
727
- get dateCreated(): Date;
806
+ get dateCreated(): Date | null;
728
807
  /**
729
808
  * Custom attributes of the message.
730
809
  */
731
- get attributes(): Object;
810
+ get attributes(): JSONValue;
732
811
  /**
733
- * Push notification type of the message.
812
+ * Type of the message.
734
813
  */
735
814
  get type(): MessageType;
736
815
  /**
737
- * One of the attached media.
816
+ * One of the attached media (if present).
738
817
  * @deprecated Use attachedMedia instead. Note that the latter is now an array.
739
818
  */
740
- get media(): Media;
819
+ get media(): Media | null;
741
820
  /**
742
821
  * Return all media attachments, except email body/history attachments, without temporary urls.
743
822
  */
@@ -757,6 +836,18 @@ declare class Message extends ReplayEventEmitter<MessageEvents> {
757
836
  * @returns Array of media descriptors matching given categories.
758
837
  */
759
838
  getMediaByCategory(categories: Array<MediaCategory>): Array<Media> | null;
839
+ /**
840
+ * Get a media descriptor for an email body attachment of a provided type.
841
+ * Allowed body types are returned in the Conversation.limits().emailBodiesAllowedMimeTypes array.
842
+ * @param type Type of email body to request, defaults to `text/plain`.
843
+ */
844
+ getEmailBody(type?: string): Media | null;
845
+ /**
846
+ * Get a media descriptor for an email history attachment of a provided type.
847
+ * Allowed body types are returned in the Conversation.limits().emailHistoriesAllowedMimeTypes array.
848
+ * @param type Type of email history to request, defaults to `text/plain`.
849
+ */
850
+ getEmailHistory(type?: string): Media | null;
760
851
  _update(data: any): void;
761
852
  /**
762
853
  * Get the participant who is the author of the message.
@@ -779,12 +870,12 @@ declare class Message extends ReplayEventEmitter<MessageEvents> {
779
870
  * Edit the message attributes.
780
871
  * @param attributes New attributes.
781
872
  */
782
- updateAttributes(attributes: any): Promise<Message>;
873
+ updateAttributes(attributes: JSONValue): Promise<Message>;
783
874
  /**
784
875
  * Get content URLs for all media attachments in the given set using single operation.
785
876
  * @param contentSet Set of media attachments to query for content URL.
786
877
  */
787
- attachTemporaryUrlsFor(contentSet: Media[]): Promise<Media[]>;
878
+ attachTemporaryUrlsFor(contentSet: Media[] | null): Promise<Media[]>;
788
879
  private _getDetailedDeliveryReceiptsPaginator;
789
880
  }
790
881
  /**
@@ -866,9 +957,9 @@ declare class TypingIndicator {
866
957
  declare class UnsentMessage {
867
958
  private messagesEntity;
868
959
  text?: string;
869
- attributes: any;
960
+ attributes: JSONValue;
870
961
  mediaContent: [MediaCategory, FormData | SendMediaOptions][];
871
- emailOptions?: SendEmailOptions;
962
+ emailOptions: SendEmailOptions;
872
963
  /**
873
964
  * @internal
874
965
  */
@@ -877,7 +968,154 @@ declare class UnsentMessage {
877
968
  * Send the prepared message to the conversation.
878
969
  * @returns Index of the new message in the conversation.
879
970
  */
880
- send(): Promise<number>;
971
+ send(): Promise<number | null>;
972
+ }
973
+ /**
974
+ * Pagination helper class.
975
+ */
976
+ declare class RestPaginator<T> implements Paginator<T> {
977
+ private state;
978
+ /**
979
+ * Indicates the existence of the next page.
980
+ */
981
+ get hasNextPage(): boolean;
982
+ /**
983
+ * Indicates the existence of the previous page
984
+ */
985
+ get hasPrevPage(): boolean;
986
+ /**
987
+ * Array of elements on the current page.
988
+ */
989
+ get items(): T[];
990
+ /**
991
+ * @internal
992
+ */
993
+ constructor(items: any, source: any, prevToken: any, nextToken: any);
994
+ /**
995
+ * Request the next page. Does not modify the existing object.
996
+ */
997
+ nextPage(): Promise<RestPaginator<T>>;
998
+ /**
999
+ * Request the previous page. Does not modify the existing object.
1000
+ */
1001
+ prevPage(): Promise<RestPaginator<T>>;
1002
+ }
1003
+ /**
1004
+ * @classdesc Pagination helper class for Sync
1005
+ *
1006
+ * @property {Array} items Array of elements on current page
1007
+ * @property {boolean} hasNextPage
1008
+ * @property {boolean} hasPrevPage
1009
+ */
1010
+ declare class SyncPaginator<T> implements Paginator<T> {
1011
+ private state;
1012
+ hasNextPage: boolean;
1013
+ hasPrevPage: boolean;
1014
+ get items(): T[];
1015
+ /**
1016
+ * @param {Array} items Array of element for current page
1017
+ * @param {Object} params
1018
+ */
1019
+ constructor(items: any, pageSize: any, anchor: any, direction: any, source: any);
1020
+ nextPage(): Promise<RestPaginator<T>>;
1021
+ prevPage(): Promise<SyncPaginator<T> | RestPaginator<T>>;
1022
+ }
1023
+ interface MessageResponse {
1024
+ account_sid: string;
1025
+ chat_service_sid: string;
1026
+ conversation_sid: string;
1027
+ sid: string;
1028
+ index: number;
1029
+ attributes: string;
1030
+ author: string;
1031
+ participant_sid: string;
1032
+ body: string;
1033
+ subject: string;
1034
+ date_created: string;
1035
+ date_updated: string;
1036
+ url: string;
1037
+ media: {
1038
+ sid: string;
1039
+ size: string;
1040
+ content_type: string;
1041
+ filename: string;
1042
+ }[] | null;
1043
+ links: {
1044
+ conversation: string;
1045
+ messages_receipts: string;
1046
+ };
1047
+ }
1048
+ type MessagesEvents = {
1049
+ messageAdded: (message: Message) => void;
1050
+ messageRemoved: (message: Message) => void;
1051
+ messageUpdated: (data: {
1052
+ message: Message;
1053
+ updateReasons: MessageUpdateReason[];
1054
+ }) => void;
1055
+ };
1056
+ interface MessagesServices {
1057
+ mcsClient: McsClient;
1058
+ network: Network;
1059
+ syncClient: SyncClient;
1060
+ commandExecutor: CommandExecutor;
1061
+ }
1062
+ /**
1063
+ * Represents the collection of messages in a conversation
1064
+ */
1065
+ declare class Messages extends ReplayEventEmitter<MessagesEvents> {
1066
+ readonly conversation: Conversation;
1067
+ private readonly configuration;
1068
+ private readonly services;
1069
+ private readonly messagesByIndex;
1070
+ private messagesListPromise;
1071
+ constructor(conversation: Conversation, configuration: Configuration, services: MessagesServices);
1072
+ /**
1073
+ * Subscribe to the Messages Event Stream
1074
+ * @param name - The name of Sync object for the Messages resource.
1075
+ */
1076
+ subscribe(name: string): Promise<SyncList>;
1077
+ unsubscribe(): Promise<void>;
1078
+ /**
1079
+ * Send Message to the conversation, message could include both text and multiple media attachments.
1080
+ * @param message Message to post
1081
+ * @returns Returns a promise which can fail
1082
+ */
1083
+ sendV2(message: UnsentMessage): Promise<MessageResponse>;
1084
+ /**
1085
+ * Send Message to the conversation
1086
+ * @param message Message to post
1087
+ * @param attributes Message attributes
1088
+ * @param emailOptions Options that modify E-mail integration behaviors.
1089
+ * @returns Returns promise which can fail
1090
+ */
1091
+ send(message: null | string | FormData | SendMediaOptions, attributes?: JSONValue, emailOptions?: SendEmailOptions): Promise<MessageResponse>;
1092
+ /**
1093
+ * Send Media Message to the conversation
1094
+ * @param mediaContent Media content to post
1095
+ * @param attributes Message attributes
1096
+ * @param emailOptions Email options
1097
+ * @returns Returns promise which can fail
1098
+ */
1099
+ sendMedia(mediaContent: FormData | SendMediaOptions, attributes?: JSONValue, emailOptions?: SendEmailOptions): Promise<MessageResponse>;
1100
+ /**
1101
+ * Returns messages from conversation using paginator interface
1102
+ * @param pageSize Number of messages to return in single chunk. By default it's 30.
1103
+ * @param anchor Most early message id which is already known, or 'end' by default
1104
+ * @param direction Pagination order 'backwards' or 'forward', 'forward' by default
1105
+ * @returns Last page of messages by default
1106
+ */
1107
+ getMessages(pageSize: number | undefined, anchor: number | "end" | undefined, direction?: "forward" | "backwards"): Promise<SyncPaginator<Message>>;
1108
+ private _wrapPaginator;
1109
+ private _upsertMessage;
1110
+ /**
1111
+ * Returns last messages from conversation
1112
+ * @param {Number} [pageSize] Number of messages to return in single chunk. By default it's 30.
1113
+ * @param {String} [anchor] Most early message id which is already known, or 'end' by default
1114
+ * @param {String} [direction] Pagination order 'backwards' or 'forward', or 'forward' by default
1115
+ * @returns {Promise<SyncPaginator<Message>>} last page of messages by default
1116
+ * @private
1117
+ */
1118
+ private _getMessages;
881
1119
  }
882
1120
  /**
883
1121
  * Message builder. Allows the message to be built and sent via method chaining.
@@ -897,10 +1135,12 @@ declare class UnsentMessage {
897
1135
  declare class MessageBuilder {
898
1136
  private readonly limits;
899
1137
  private readonly message;
1138
+ private emailBodies;
1139
+ private emailHistories;
900
1140
  /**
901
1141
  * @internal
902
1142
  */
903
- constructor(limits: Limits, messagesEntity: any);
1143
+ constructor(limits: Limits, messagesEntity: Messages);
904
1144
  /**
905
1145
  * Sets the message body.
906
1146
  * @param text Contents of the body.
@@ -915,7 +1155,19 @@ declare class MessageBuilder {
915
1155
  * Sets the message attributes.
916
1156
  * @param attributes Message attributes.
917
1157
  */
918
- setAttributes(attributes: any): MessageBuilder;
1158
+ setAttributes(attributes: JSONValue): MessageBuilder;
1159
+ /**
1160
+ * Set email body with given MIME-type.
1161
+ * @param mimeType Format of the body to set (text/plain or text/html).
1162
+ * @param body Body payload in selected format.
1163
+ */
1164
+ setEmailBody(mimeType: string, body: FormData | SendMediaOptions): MessageBuilder;
1165
+ /**
1166
+ * Set email history with given MIME-type.
1167
+ * @param mimeType Format of the history to set (text/plain or text/html).
1168
+ * @param history History payload in selected format.
1169
+ */
1170
+ setEmailHistory(mimeType: string, history: FormData | SendMediaOptions): MessageBuilder;
919
1171
  /**
920
1172
  * Adds media to the message.
921
1173
  * @param payload Media to add.
@@ -960,13 +1212,14 @@ interface ConversationDescriptor {
960
1212
  channel: string;
961
1213
  entityName: string;
962
1214
  uniqueName: string;
963
- attributes: any;
1215
+ attributes: JSONValue;
964
1216
  createdBy?: string;
965
1217
  friendlyName?: string;
966
1218
  lastConsumedMessageIndex: number;
967
- dateCreated: any;
968
- dateUpdated: any;
1219
+ dateCreated: Date | null;
1220
+ dateUpdated: Date | null;
969
1221
  notificationLevel?: NotificationLevel;
1222
+ bindings?: ConversationBindings;
970
1223
  }
971
1224
  interface ConversationLinks {
972
1225
  self: string;
@@ -976,7 +1229,7 @@ interface ConversationLinks {
976
1229
  /**
977
1230
  * The reason for the `updated` event being emitted by a conversation.
978
1231
  */
979
- type ConversationUpdateReason = "attributes" | "createdBy" | "dateCreated" | "dateUpdated" | "friendlyName" | "lastReadMessageIndex" | "state" | "status" | "uniqueName" | "lastMessage" | "notificationLevel";
1232
+ type ConversationUpdateReason = "attributes" | "createdBy" | "dateCreated" | "dateUpdated" | "friendlyName" | "lastReadMessageIndex" | "state" | "status" | "uniqueName" | "lastMessage" | "notificationLevel" | "bindings";
980
1233
  /**
981
1234
  * The status of the conversation, relative to the client: whether
982
1235
  * the conversation has been `joined` or the client is
@@ -1007,6 +1260,23 @@ interface ConversationUpdatedEventArgs {
1007
1260
  conversation: Conversation;
1008
1261
  updateReasons: ConversationUpdateReason[];
1009
1262
  }
1263
+ /**
1264
+ * Binding for email conversation.
1265
+ */
1266
+ interface ConversationBindings {
1267
+ email?: ConversationEmailBinding;
1268
+ sms?: ConversationSmsBinding;
1269
+ }
1270
+ /**
1271
+ * Binding for email conversation.
1272
+ */
1273
+ interface ConversationEmailBinding {
1274
+ name?: string;
1275
+ projected_address: string;
1276
+ }
1277
+ interface ConversationSmsBinding {
1278
+ address?: string;
1279
+ }
1010
1280
  /**
1011
1281
  * Configuration for attaching a media file to a message.
1012
1282
  * These options can be passed to {@link Conversation.sendMessage} and
@@ -1016,7 +1286,7 @@ interface SendMediaOptions {
1016
1286
  /**
1017
1287
  * Content type of media.
1018
1288
  */
1019
- contentType: string;
1289
+ contentType: null | string;
1020
1290
  /**
1021
1291
  * Optional filename.
1022
1292
  */
@@ -1024,7 +1294,7 @@ interface SendMediaOptions {
1024
1294
  /**
1025
1295
  * Content to post.
1026
1296
  */
1027
- media: string | Buffer | Blob;
1297
+ media: null | string | Buffer | Blob;
1028
1298
  }
1029
1299
  /**
1030
1300
  * These options can be passed to {@link Conversation.sendMessage}.
@@ -1160,7 +1430,7 @@ declare class Conversation extends ReplayEventEmitter<ConversationEvents> {
1160
1430
  /**
1161
1431
  * Unique name of the conversation.
1162
1432
  */
1163
- get uniqueName(): string;
1433
+ get uniqueName(): string | null;
1164
1434
  /**
1165
1435
  * Status of the conversation.
1166
1436
  */
@@ -1168,15 +1438,15 @@ declare class Conversation extends ReplayEventEmitter<ConversationEvents> {
1168
1438
  /**
1169
1439
  * Name of the conversation.
1170
1440
  */
1171
- get friendlyName(): string;
1441
+ get friendlyName(): string | null;
1172
1442
  /**
1173
1443
  * Date this conversation was last updated on.
1174
1444
  */
1175
- get dateUpdated(): any;
1445
+ get dateUpdated(): Date | null;
1176
1446
  /**
1177
1447
  * Date this conversation was created on.
1178
1448
  */
1179
- get dateCreated(): any;
1449
+ get dateCreated(): Date | null;
1180
1450
  /**
1181
1451
  * Identity of the user that created this conversation.
1182
1452
  */
@@ -1184,7 +1454,7 @@ declare class Conversation extends ReplayEventEmitter<ConversationEvents> {
1184
1454
  /**
1185
1455
  * Custom attributes of the conversation.
1186
1456
  */
1187
- get attributes(): any;
1457
+ get attributes(): JSONValue;
1188
1458
  /**
1189
1459
  * Index of the last message the user has read in this conversation.
1190
1460
  */
@@ -1192,11 +1462,12 @@ declare class Conversation extends ReplayEventEmitter<ConversationEvents> {
1192
1462
  /**
1193
1463
  * Last message sent to this conversation.
1194
1464
  */
1195
- get lastMessage(): LastMessage;
1465
+ get lastMessage(): LastMessage | undefined;
1196
1466
  /**
1197
1467
  * User notification level for this conversation.
1198
1468
  */
1199
1469
  get notificationLevel(): NotificationLevel;
1470
+ get bindings(): ConversationBindings;
1200
1471
  get limits(): Limits;
1201
1472
  /**
1202
1473
  * State of the conversation.
@@ -1207,7 +1478,7 @@ declare class Conversation extends ReplayEventEmitter<ConversationEvents> {
1207
1478
  * This or _subscribeStreams will need to be called before any events on conversation will fire.
1208
1479
  * @internal
1209
1480
  */
1210
- _subscribe(): Promise<any>;
1481
+ _subscribe(): Promise<void | SyncDocument>;
1211
1482
  /**
1212
1483
  * Load the attributes of this conversation and instantiate its participants and messages.
1213
1484
  * This or _subscribe will need to be called before any events on the conversation will fire.
@@ -1221,7 +1492,7 @@ declare class Conversation extends ReplayEventEmitter<ConversationEvents> {
1221
1492
  */
1222
1493
  _unsubscribe(): Promise<[
1223
1494
  void,
1224
- any
1495
+ void
1225
1496
  ]>;
1226
1497
  /**
1227
1498
  * Set conversation status.
@@ -1249,14 +1520,15 @@ declare class Conversation extends ReplayEventEmitter<ConversationEvents> {
1249
1520
  * @param identity Identity of the Client to add.
1250
1521
  * @param attributes Attributes to be attached to the participant.
1251
1522
  */
1252
- add(identity: string, attributes?: any): Promise<void>;
1523
+ add(identity: string, attributes?: JSONValue): Promise<ParticipantResponse>;
1253
1524
  /**
1254
1525
  * Add a non-chat participant to the conversation.
1255
1526
  * @param proxyAddress Proxy (Twilio) address of the participant.
1256
1527
  * @param address User address of the participant.
1257
1528
  * @param attributes Attributes to be attached to the participant.
1529
+ * @param bindingOptions Options for adding email participants - name and CC/To level.
1258
1530
  */
1259
- addNonChatParticipant(proxyAddress: string, address: string, attributes?: any): Promise<void>;
1531
+ addNonChatParticipant(proxyAddress: string, address: string, attributes?: JSONValue, bindingOptions?: ParticipantBindingOptions): Promise<ParticipantResponse>;
1260
1532
  /**
1261
1533
  * Advance the conversation's last read message index to the current read horizon.
1262
1534
  * Rejects if the user is not a participant of the conversation.
@@ -1272,7 +1544,7 @@ declare class Conversation extends ReplayEventEmitter<ConversationEvents> {
1272
1544
  /**
1273
1545
  * Get the custom attributes of this Conversation.
1274
1546
  */
1275
- getAttributes(): Promise<any>;
1547
+ getAttributes(): Promise<JSONValue>;
1276
1548
  /**
1277
1549
  * Returns messages from the conversation using the paginator interface.
1278
1550
  * @param pageSize Number of messages to return in a single chunk. Default is 30.
@@ -1301,12 +1573,12 @@ declare class Conversation extends ReplayEventEmitter<ConversationEvents> {
1301
1573
  * Get a participant by its SID.
1302
1574
  * @param participantSid Participant SID.
1303
1575
  */
1304
- getParticipantBySid(participantSid: string): Promise<Participant>;
1576
+ getParticipantBySid(participantSid: string): Promise<Participant | null>;
1305
1577
  /**
1306
1578
  * Get a participant by its identity.
1307
1579
  * @param identity Participant identity.
1308
1580
  */
1309
- getParticipantByIdentity(identity: string): Promise<Participant>;
1581
+ getParticipantByIdentity(identity?: string | null): Promise<Participant | null>;
1310
1582
  /**
1311
1583
  * Get the total message count in the conversation.
1312
1584
  *
@@ -1347,6 +1619,8 @@ declare class Conversation extends ReplayEventEmitter<ConversationEvents> {
1347
1619
  * argument, it will assume that the string is an identity or SID.
1348
1620
  * @param participant Identity, SID or the participant object to remove.
1349
1621
  */
1622
+ /* eslint-disable @typescript-eslint/ban-ts-comment */
1623
+ // @ts-ignore TODO: fix validateTypesAsync typing
1350
1624
  removeParticipant(participant: string | Participant): Promise<void>;
1351
1625
  /**
1352
1626
  * Send a message to the conversation.
@@ -1356,10 +1630,11 @@ declare class Conversation extends ReplayEventEmitter<ConversationEvents> {
1356
1630
  * @param emailOptions Email options for the message.
1357
1631
  * @return Index of the new message.
1358
1632
  */
1359
- sendMessage(message: string | FormData | SendMediaOptions | null, messageAttributes?: any, emailOptions?: SendEmailOptions): Promise<number>;
1633
+ sendMessage(message: null | string | FormData | SendMediaOptions, messageAttributes?: JSONValue, emailOptions?: SendEmailOptions): Promise<number>;
1360
1634
  /**
1361
1635
  * New interface to prepare for sending a message.
1362
1636
  * Use instead of `sendMessage`.
1637
+ * @return A MessageBuilder to help set all message sending options.
1363
1638
  */
1364
1639
  prepareMessage(): MessageBuilder;
1365
1640
  /**
@@ -1386,7 +1661,7 @@ declare class Conversation extends ReplayEventEmitter<ConversationEvents> {
1386
1661
  * Update the attributes of the conversation.
1387
1662
  * @param attributes New attributes.
1388
1663
  */
1389
- updateAttributes(attributes: any): Promise<Conversation>;
1664
+ updateAttributes(attributes: JSONValue): Promise<Conversation>;
1390
1665
  /**
1391
1666
  * Update the friendly name of the conversation.
1392
1667
  * @param friendlyName New friendly name.
@@ -1411,13 +1686,13 @@ type ConversationsDataSource = "sync" | "chat" | "rest";
1411
1686
  */
1412
1687
  type PushNotificationType = "twilio.conversations.new_message" | "twilio.conversations.added_to_conversation" | "twilio.conversations.removed_from_conversation";
1413
1688
  interface PushNotificationDescriptor {
1414
- title: string;
1415
- body: string;
1416
- sound: string;
1417
- badge: number;
1418
- action: string;
1689
+ title: string | null;
1690
+ body: string | null;
1691
+ sound: string | null;
1692
+ badge: number | null;
1693
+ action: string | null;
1419
1694
  type: PushNotificationType;
1420
- data: Object;
1695
+ data: Record<string, unknown>;
1421
1696
  }
1422
1697
  /**
1423
1698
  * Additional data for a given push notification.
@@ -1443,23 +1718,23 @@ declare class PushNotification {
1443
1718
  /**
1444
1719
  * Title of the notification.
1445
1720
  */
1446
- readonly title: string;
1721
+ readonly title: string | null;
1447
1722
  /**
1448
1723
  * Text of the notification.
1449
1724
  */
1450
- readonly body: string;
1725
+ readonly body: string | null;
1451
1726
  /**
1452
1727
  * Sound of the notification.
1453
1728
  */
1454
- readonly sound: string;
1729
+ readonly sound: string | null;
1455
1730
  /**
1456
1731
  * Number of the badge.
1457
1732
  */
1458
- readonly badge: number;
1733
+ readonly badge: number | null;
1459
1734
  /**
1460
1735
  * Notification action (`click_action` in FCM terms and `category` in APN terms).
1461
1736
  */
1462
- readonly action: string;
1737
+ readonly action: string | null;
1463
1738
  /**
1464
1739
  * Type of the notification.
1465
1740
  */
@@ -1535,7 +1810,7 @@ type State = "failed" | "initialized";
1535
1810
  * * `'apn'`
1536
1811
  */
1537
1812
  type NotificationsChannelType = ChannelType;
1538
- type LogLevel = "trace" | "debug" | "info" | "warn" | "error" | "silent" | null;
1813
+ type LogLevel = "trace" | "debug" | "info" | "warn" | "error" | "silent";
1539
1814
  /**
1540
1815
  * Conversations client options.
1541
1816
  */
@@ -1555,15 +1830,17 @@ interface ClientOptions {
1555
1830
  httpCacheIntervalOverride?: string;
1556
1831
  userInfosToSubscribeOverride?: number;
1557
1832
  retryWhenThrottledOverride?: boolean;
1558
- backoffConfigOverride?: any;
1559
- Chat?: any;
1560
- IPMessaging?: any;
1561
- Sync?: any;
1562
- Notification?: any;
1563
- Twilsock?: any;
1564
- clientMetadata?: any;
1833
+ backoffConfigOverride?: Record<string, unknown>;
1834
+ Chat?: ClientOptions;
1835
+ IPMessaging?: ClientOptions;
1836
+ Sync?: Record<string, unknown>;
1837
+ Notification?: Record<string, unknown>;
1838
+ Twilsock?: Record<string, unknown>;
1839
+ clientMetadata?: Record<string, unknown>;
1565
1840
  initRegistrations?: InitRegistration[];
1566
1841
  disableDeepClone?: boolean;
1842
+ typingUri?: string;
1843
+ apiUri?: string;
1567
1844
  }
1568
1845
  /**
1569
1846
  * Options for {@link Client.createConversation}.
@@ -1572,7 +1849,7 @@ interface CreateConversationOptions {
1572
1849
  /**
1573
1850
  * Any custom attributes to attach to the conversation.
1574
1851
  */
1575
- attributes?: any;
1852
+ attributes?: JSONValue;
1576
1853
  /**
1577
1854
  * A non-unique display name of the conversation.
1578
1855
  */
@@ -1619,7 +1896,7 @@ declare class Client extends ReplayEventEmitter<ClientEvents> {
1619
1896
  * @param options Options to customize the Client
1620
1897
  * @returns A not yet fully-initialized client.
1621
1898
  */
1622
- constructor(fpaToken: string, options?: ClientOptions);
1899
+ constructor(fpaToken: string, options?: ClientOptions | null);
1623
1900
  static populateInitRegistrations(reg: InitRegistration): void;
1624
1901
  /**
1625
1902
  * Fired when a conversation becomes visible to the client. The event is also triggered when the client creates a new conversation.
@@ -1827,7 +2104,7 @@ declare class Client extends ReplayEventEmitter<ClientEvents> {
1827
2104
  * @param options Options to customize the client.
1828
2105
  * @returns Returns a fully initialized client.
1829
2106
  */
1830
- static create(token: string, options?: ClientOptions): Promise<Client>;
2107
+ static create(token: string, options?: ClientOptions | null): Promise<Client>;
1831
2108
  /**
1832
2109
  * Information of the logged-in user. Before client initialization, returns an
1833
2110
  * uninitialized user. Will trigger a {@link Client.userUpdated} event after
@@ -1865,7 +2142,7 @@ declare class Client extends ReplayEventEmitter<ClientEvents> {
1865
2142
  /**
1866
2143
  * Get the current list of all the subscribed conversations.
1867
2144
  */
1868
- getSubscribedConversations(args?: any): Promise<Paginator<Conversation>>;
2145
+ getSubscribedConversations(): Promise<Paginator<Conversation>>;
1869
2146
  /**
1870
2147
  * Create a conversation on the server and subscribe to its events.
1871
2148
  * The default is a conversation with an empty friendly name.
@@ -1919,36 +2196,6 @@ declare class Client extends ReplayEventEmitter<ClientEvents> {
1919
2196
  */
1920
2197
  getSubscribedUsers(): Promise<Array<User>>;
1921
2198
  }
1922
- /**
1923
- * Pagination helper class.
1924
- */
1925
- declare class RestPaginator<T> implements Paginator<T> {
1926
- private state;
1927
- /**
1928
- * Indicates the existence of the next page.
1929
- */
1930
- get hasNextPage(): boolean;
1931
- /**
1932
- * Indicates the existence of the previous page
1933
- */
1934
- get hasPrevPage(): boolean;
1935
- /**
1936
- * Array of elements on the current page.
1937
- */
1938
- get items(): Array<T>;
1939
- /**
1940
- * @internal
1941
- */
1942
- constructor(items: any, source: any, prevToken: any, nextToken: any);
1943
- /**
1944
- * Request the next page. Does not modify the existing object.
1945
- */
1946
- nextPage(): Promise<RestPaginator<T>>;
1947
- /**
1948
- * Request the previous page. Does not modify the existing object.
1949
- */
1950
- prevPage(): Promise<RestPaginator<T>>;
1951
- }
1952
2199
  declare class NotificationTypes {
1953
2200
  static readonly TYPING_INDICATOR = "twilio.ipmsg.typing_indicator";
1954
2201
  static readonly NEW_MESSAGE = "twilio.conversations.new_message";
@@ -1957,4 +2204,4 @@ declare class NotificationTypes {
1957
2204
  static readonly REMOVED_FROM_CONVERSATION = "twilio.conversations.removed_from_conversation";
1958
2205
  static readonly CONSUMPTION_UPDATE = "twilio.channel.consumption_update";
1959
2206
  }
1960
- export { Conversation, ConversationUpdateReason, ConversationStatus, NotificationLevel, ConversationState, ConversationUpdatedEventArgs, SendMediaOptions, SendEmailOptions, LastMessage, Participant, ParticipantUpdateReason, ParticipantType, ParticipantUpdatedEventArgs, Message, MessageUpdateReason, MessageType, MessageUpdatedEventArgs, Media, MediaCategory$0 as MediaCategory, AggregatedDeliveryReceipt, DeliveryAmount, DetailedDeliveryReceipt, DeliveryStatus, RestPaginator, MessageBuilder, UnsentMessage, Paginator, User, UserUpdateReason, UserUpdatedEventArgs, PushNotification, PushNotificationType, PushNotificationDescriptor, PushNotificationData, NotificationTypes, Client, State, ConnectionState, NotificationsChannelType, ClientOptions, CreateConversationOptions };
2207
+ export { Conversation, ConversationBindings, ConversationEmailBinding, ConversationUpdateReason, ConversationStatus, NotificationLevel, ConversationState, ConversationUpdatedEventArgs, SendMediaOptions, SendEmailOptions, LastMessage, Participant, ParticipantUpdateReason, ParticipantType, ParticipantUpdatedEventArgs, ParticipantBindings, ParticipantEmailBinding, ParticipantEmailLevel, Message, MessageUpdateReason, MessageType, MessageUpdatedEventArgs, Media, MediaCategory$0 as MediaCategory, AggregatedDeliveryReceipt, DeliveryAmount, DetailedDeliveryReceipt, DeliveryStatus, RestPaginator, MessageBuilder, UnsentMessage, Paginator, ParticipantBindingOptions, User, UserUpdateReason, UserUpdatedEventArgs, PushNotification, PushNotificationType, PushNotificationDescriptor, PushNotificationData, NotificationTypes, Client, State, ConnectionState, NotificationsChannelType, ClientOptions, CreateConversationOptions };