@twilio/conversations 2.1.0-rc.0 → 2.1.0-rc.7
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.
- package/CHANGELOG.md +61 -0
- package/NOTICE.txt +679 -0
- package/builds/browser.js +675 -588
- package/builds/browser.js.map +1 -1
- package/builds/lib.d.ts +301 -122
- package/builds/lib.js +675 -588
- package/builds/lib.js.map +1 -1
- package/builds/twilio-conversations.js +853 -910
- package/builds/twilio-conversations.min.js +2 -14
- package/dist/aggregated-delivery-receipt.js +6 -1
- package/dist/aggregated-delivery-receipt.js.map +1 -1
- package/dist/client.js +165 -142
- package/dist/client.js.map +1 -1
- package/dist/command-executor.js +16 -14
- package/dist/command-executor.js.map +1 -1
- package/dist/configuration.js +14 -10
- package/dist/configuration.js.map +1 -1
- package/dist/conversation.js +212 -153
- package/dist/conversation.js.map +1 -1
- package/dist/data/conversations.js +82 -78
- package/dist/data/conversations.js.map +1 -1
- package/dist/data/messages.js +42 -38
- package/dist/data/messages.js.map +1 -1
- package/dist/data/participants.js +93 -75
- package/dist/data/participants.js.map +1 -1
- package/dist/data/users.js +24 -22
- package/dist/data/users.js.map +1 -1
- package/dist/detailed-delivery-receipt.js +1 -1
- package/dist/detailed-delivery-receipt.js.map +1 -1
- package/dist/interfaces/attributes.js +4 -4
- package/dist/interfaces/attributes.js.map +1 -1
- package/dist/interfaces/notification-types.js +5 -5
- package/dist/interfaces/notification-types.js.map +1 -1
- package/dist/logger.js +36 -15
- package/dist/logger.js.map +1 -1
- package/dist/media.js +21 -9
- package/dist/media.js.map +1 -1
- package/dist/message-builder.js +10 -9
- package/dist/message-builder.js.map +1 -1
- package/dist/message.js +131 -83
- package/dist/message.js.map +1 -1
- package/dist/packages/conversations/package.json.js +1 -1
- package/dist/participant.js +85 -51
- package/dist/participant.js.map +1 -1
- package/dist/push-notification.js.map +1 -1
- package/dist/rest-paginator.js +16 -6
- package/dist/rest-paginator.js.map +1 -1
- package/dist/services/network.js +18 -14
- package/dist/services/network.js.map +1 -1
- package/dist/services/typing-indicator.js +20 -17
- package/dist/services/typing-indicator.js.map +1 -1
- package/dist/unsent-message.js.map +1 -1
- package/dist/user.js +85 -59
- package/dist/user.js.map +1 -1
- package/dist/util/deferred.js +3 -1
- package/dist/util/deferred.js.map +1 -1
- package/dist/util/index.js +6 -6
- package/dist/util/index.js.map +1 -1
- package/docs/assets/js/search.js +1 -1
- package/docs/classes/AggregatedDeliveryReceipt.html +0 -117
- package/docs/classes/Client.html +24 -147
- package/docs/classes/Conversation.html +30 -147
- package/docs/classes/DetailedDeliveryReceipt.html +1 -118
- package/docs/classes/Media.html +0 -117
- package/docs/classes/Message.html +7 -124
- package/docs/classes/MessageBuilder.html +2 -119
- package/docs/classes/Participant.html +7 -124
- package/docs/classes/PushNotification.html +0 -117
- package/docs/classes/RestPaginator.html +0 -117
- package/docs/classes/UnsentMessage.html +0 -117
- package/docs/classes/User.html +7 -124
- package/docs/index.html +56 -0
- package/docs/interfaces/ClientOptions.html +0 -117
- package/docs/interfaces/ConversationBindings.html +0 -117
- package/docs/interfaces/ConversationEmailBinding.html +0 -117
- package/docs/interfaces/ConversationState.html +0 -117
- package/docs/interfaces/CreateConversationOptions.html +1 -118
- package/docs/interfaces/LastMessage.html +0 -117
- package/docs/interfaces/Paginator.html +0 -117
- package/docs/interfaces/ParticipantBindings.html +0 -117
- package/docs/interfaces/ParticipantEmailBinding.html +0 -117
- package/docs/interfaces/PushNotificationData.html +0 -117
- package/docs/interfaces/SendEmailOptions.html +0 -117
- package/docs/interfaces/SendMediaOptions.html +0 -117
- package/docs/modules.html +56 -0
- package/package.json +23 -17
package/builds/lib.d.ts
CHANGED
@@ -1,5 +1,6 @@
|
|
1
|
-
import { SyncClient } from "twilio-sync";
|
2
|
-
import {
|
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:
|
45
|
-
static setLevel(level:
|
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;
|
@@ -54,7 +55,7 @@ declare class Logger {
|
|
54
55
|
static warn(...args: any[]): void;
|
55
56
|
static error(...args: any[]): void;
|
56
57
|
}
|
57
|
-
interface
|
58
|
+
interface ConversationLimits {
|
58
59
|
mediaAttachmentsCountLimit: number;
|
59
60
|
mediaAttachmentSizeLimitInMb: number;
|
60
61
|
mediaAttachmentsTotalSizeLimitInMb: number;
|
@@ -77,7 +78,7 @@ declare class Configuration {
|
|
77
78
|
mediaSetService: string;
|
78
79
|
messagesReceipts: string;
|
79
80
|
};
|
80
|
-
readonly limits:
|
81
|
+
readonly limits: ConversationLimits;
|
81
82
|
readonly productId?: string;
|
82
83
|
readonly typingIndicatorTimeoutOverride?: number;
|
83
84
|
readonly typingIndicatorTimeoutDefault: number;
|
@@ -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:
|
94
|
+
constructor(options: ClientOptions, configurationResponse: ConfigurationResponse, logger: Logger);
|
94
95
|
}
|
95
96
|
interface CommandExecutorServices {
|
96
97
|
transport: Transport;
|
@@ -105,6 +106,20 @@ 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
|
+
/**
|
110
|
+
* Represents a JSON value.
|
111
|
+
*/
|
112
|
+
type JSONValue = null | string | number | boolean | JSONObject | JSONArray;
|
113
|
+
/**
|
114
|
+
* Represents a JSON object.
|
115
|
+
*/
|
116
|
+
type JSONObject = {
|
117
|
+
[x: string]: JSONValue;
|
118
|
+
};
|
119
|
+
/**
|
120
|
+
* Represents a JSON array.
|
121
|
+
*/
|
122
|
+
type JSONArray = JSONValue[];
|
108
123
|
type UserEvents = {
|
109
124
|
updated: (data: {
|
110
125
|
user: User;
|
@@ -180,25 +195,29 @@ declare class User extends ReplayEventEmitter<UserEvents> {
|
|
180
195
|
/**
|
181
196
|
* Custom attributes of the user.
|
182
197
|
*/
|
183
|
-
get attributes():
|
198
|
+
get attributes(): JSONValue;
|
184
199
|
/**
|
185
200
|
* Friendly name of the user, null if not set.
|
186
201
|
*/
|
187
|
-
get friendlyName(): string;
|
202
|
+
get friendlyName(): string | null;
|
188
203
|
/**
|
189
204
|
* Status of the real-time conversation connection of the user.
|
190
205
|
*/
|
191
|
-
get isOnline(): boolean;
|
206
|
+
get isOnline(): boolean | null;
|
192
207
|
/**
|
193
208
|
* User push notification registration status.
|
194
209
|
*/
|
195
|
-
get isNotifiable(): boolean;
|
210
|
+
get isNotifiable(): boolean | null;
|
196
211
|
/**
|
197
212
|
* True if this user is receiving real-time status updates.
|
198
213
|
*/
|
199
214
|
get isSubscribed(): boolean;
|
200
215
|
// Handles service updates
|
201
|
-
_update(key: string, value:
|
216
|
+
_update(key: string, value: {
|
217
|
+
value: string;
|
218
|
+
notifiable: boolean | null;
|
219
|
+
online: boolean | null;
|
220
|
+
}): Promise<void>;
|
202
221
|
// Fetch reachability info
|
203
222
|
private _updateReachabilityInfo;
|
204
223
|
// Fetch user
|
@@ -208,7 +227,7 @@ declare class User extends ReplayEventEmitter<UserEvents> {
|
|
208
227
|
* Edit user attributes.
|
209
228
|
* @param attributes New attributes.
|
210
229
|
*/
|
211
|
-
updateAttributes(attributes:
|
230
|
+
updateAttributes(attributes: JSONValue): Promise<User>;
|
212
231
|
/**
|
213
232
|
* Update the friendly name of the user.
|
214
233
|
* @param friendlyName New friendly name.
|
@@ -232,7 +251,7 @@ declare class Network {
|
|
232
251
|
private cleanupCache;
|
233
252
|
pokeTimer(): void;
|
234
253
|
private executeWithRetry;
|
235
|
-
get(url: string): Promise<
|
254
|
+
get<T>(url: string): Promise<TransportResult<T>>;
|
236
255
|
}
|
237
256
|
type UsersEvents = {
|
238
257
|
userUpdated: (data: {
|
@@ -264,7 +283,7 @@ declare class Users extends ReplayEventEmitter<UsersEvents> {
|
|
264
283
|
* if not - then subscribes and adds user to the FIFO stack
|
265
284
|
* @returns {Promise<User>} Fully initialized user
|
266
285
|
*/
|
267
|
-
getUser(identity
|
286
|
+
getUser(identity?: string, entityName?: string): Promise<User>;
|
268
287
|
/**
|
269
288
|
* @returns {Promise<Array<User>>} returns list of subscribed User objects {@see User}
|
270
289
|
*/
|
@@ -283,16 +302,16 @@ type ParticipantEvents = {
|
|
283
302
|
}) => void;
|
284
303
|
};
|
285
304
|
interface ParticipantDescriptor {
|
286
|
-
attributes?:
|
287
|
-
dateCreated:
|
288
|
-
dateUpdated:
|
305
|
+
attributes?: JSONValue;
|
306
|
+
dateCreated: Date | null;
|
307
|
+
dateUpdated: Date | null;
|
289
308
|
identity: string;
|
290
309
|
roleSid?: string;
|
291
|
-
lastConsumedMessageIndex: number;
|
310
|
+
lastConsumedMessageIndex: number | null;
|
292
311
|
lastConsumptionTimestamp: number;
|
293
312
|
type: ParticipantType;
|
294
313
|
userInfo: string;
|
295
|
-
bindings?:
|
314
|
+
bindings?: ParticipantBindings;
|
296
315
|
}
|
297
316
|
interface ParticipantServices {
|
298
317
|
users: Users;
|
@@ -351,19 +370,19 @@ declare class Participant extends ReplayEventEmitter<ParticipantEvents> {
|
|
351
370
|
/**
|
352
371
|
* Custom attributes of the participant.
|
353
372
|
*/
|
354
|
-
get attributes():
|
373
|
+
get attributes(): JSONValue;
|
355
374
|
/**
|
356
375
|
* Date this participant was created on.
|
357
376
|
*/
|
358
|
-
get dateCreated(): Date;
|
377
|
+
get dateCreated(): Date | null;
|
359
378
|
/**
|
360
379
|
* Date this participant was last updated on.
|
361
380
|
*/
|
362
|
-
get dateUpdated(): Date;
|
381
|
+
get dateUpdated(): Date | null;
|
363
382
|
/**
|
364
383
|
* Identity of the participant.
|
365
384
|
*/
|
366
|
-
get identity(): string;
|
385
|
+
get identity(): string | null;
|
367
386
|
/**
|
368
387
|
* Indicates whether the participant is currently typing.
|
369
388
|
*/
|
@@ -378,7 +397,7 @@ declare class Participant extends ReplayEventEmitter<ParticipantEvents> {
|
|
378
397
|
/**
|
379
398
|
* Date of the most recent read horizon update.
|
380
399
|
*/
|
381
|
-
get lastReadTimestamp(): Date;
|
400
|
+
get lastReadTimestamp(): Date | null;
|
382
401
|
get roleSid(): string;
|
383
402
|
/**
|
384
403
|
* Type of the participant.
|
@@ -451,7 +470,27 @@ declare class Participant extends ReplayEventEmitter<ParticipantEvents> {
|
|
451
470
|
* Update the attributes of the participant.
|
452
471
|
* @param attributes New attributes.
|
453
472
|
*/
|
454
|
-
updateAttributes(attributes:
|
473
|
+
updateAttributes(attributes: JSONValue): Promise<Participant>;
|
474
|
+
}
|
475
|
+
interface ParticipantResponse {
|
476
|
+
account_sid: string;
|
477
|
+
chat_service_sid: string;
|
478
|
+
conversation_sid: string;
|
479
|
+
role_sid: string;
|
480
|
+
sid: string;
|
481
|
+
attributes: string;
|
482
|
+
date_created: string;
|
483
|
+
date_updated: string;
|
484
|
+
identity: string | null;
|
485
|
+
messaging_binding: {
|
486
|
+
type: string;
|
487
|
+
address: string;
|
488
|
+
proxy_address: string;
|
489
|
+
} | null;
|
490
|
+
url: string;
|
491
|
+
links: {
|
492
|
+
conversation: string;
|
493
|
+
};
|
455
494
|
}
|
456
495
|
interface ParticipantBindingOptions {
|
457
496
|
email?: ParticipantEmailBinding;
|
@@ -466,7 +505,7 @@ type MediaCategory$0 = McsMediaCategory;
|
|
466
505
|
interface MediaState {
|
467
506
|
sid: string;
|
468
507
|
category: MediaCategory$0;
|
469
|
-
filename
|
508
|
+
filename: string | null;
|
470
509
|
contentType: string;
|
471
510
|
size: number;
|
472
511
|
}
|
@@ -491,7 +530,7 @@ declare class Media {
|
|
491
530
|
/**
|
492
531
|
* File name. Null if absent.
|
493
532
|
*/
|
494
|
-
get filename(): string;
|
533
|
+
get filename(): string | null;
|
495
534
|
/**
|
496
535
|
* Content type of the media.
|
497
536
|
*/
|
@@ -511,7 +550,7 @@ declare class Media {
|
|
511
550
|
* If the URL becomes expired, you need to request a new one.
|
512
551
|
* Each call to this function produces a new temporary URL.
|
513
552
|
*/
|
514
|
-
getContentTemporaryUrl(): Promise<string>;
|
553
|
+
getContentTemporaryUrl(): Promise<string | null>;
|
515
554
|
/**
|
516
555
|
* Returns cached direct content URL for the media.
|
517
556
|
*
|
@@ -521,7 +560,7 @@ declare class Media {
|
|
521
560
|
*
|
522
561
|
* @returns {Promise<String>}
|
523
562
|
*/
|
524
|
-
getCachedTemporaryUrl(): Promise<string>;
|
563
|
+
getCachedTemporaryUrl(): Promise<string | null>;
|
525
564
|
private _fetchMcsMedia;
|
526
565
|
}
|
527
566
|
/**
|
@@ -616,7 +655,7 @@ interface DetailedDeliveryReceiptDescriptor {
|
|
616
655
|
channel_message_sid: string;
|
617
656
|
participant_sid: string;
|
618
657
|
status: DeliveryStatus;
|
619
|
-
error_code:
|
658
|
+
error_code: string | null;
|
620
659
|
date_created: string;
|
621
660
|
date_updated: string;
|
622
661
|
}
|
@@ -652,7 +691,7 @@ declare class DetailedDeliveryReceipt {
|
|
652
691
|
* Numeric error code mapped from Status callback code. Information about the error codes can be found
|
653
692
|
* [here](https://www.twilio.com/docs/sms/api/message-resource#delivery-related-errors).
|
654
693
|
*/
|
655
|
-
errorCode:
|
694
|
+
errorCode: string | 0;
|
656
695
|
/**
|
657
696
|
* Date this delivery receipt was created on.
|
658
697
|
*/
|
@@ -694,6 +733,21 @@ interface MessageUpdatedEventArgs {
|
|
694
733
|
message: Message;
|
695
734
|
updateReasons: MessageUpdateReason[];
|
696
735
|
}
|
736
|
+
interface MessageData {
|
737
|
+
sid: string;
|
738
|
+
text?: string;
|
739
|
+
type?: MessageType;
|
740
|
+
author: string | null;
|
741
|
+
subject: string | null;
|
742
|
+
lastUpdatedBy?: string | null;
|
743
|
+
attributes?: JSONValue;
|
744
|
+
dateUpdated: string;
|
745
|
+
timestamp?: string;
|
746
|
+
medias?: Media[];
|
747
|
+
media?: Media;
|
748
|
+
memberSid?: string;
|
749
|
+
delivery?: AggregatedDeliveryDescriptor;
|
750
|
+
}
|
697
751
|
/**
|
698
752
|
* A message in a conversation.
|
699
753
|
*/
|
@@ -709,7 +763,7 @@ declare class Message extends ReplayEventEmitter<MessageEvents> {
|
|
709
763
|
/**
|
710
764
|
* @internal
|
711
765
|
*/
|
712
|
-
constructor(index: number, data:
|
766
|
+
constructor(index: number, data: MessageData, conversation: Conversation, links: MessageLinks, configuration: Configuration, services: MessageServices);
|
713
767
|
/**
|
714
768
|
* Fired when the properties or the body of the message has been updated.
|
715
769
|
*
|
@@ -726,7 +780,7 @@ declare class Message extends ReplayEventEmitter<MessageEvents> {
|
|
726
780
|
/**
|
727
781
|
* Name of the user that sent the message.
|
728
782
|
*/
|
729
|
-
get author(): string;
|
783
|
+
get author(): string | null;
|
730
784
|
/**
|
731
785
|
* Message subject. Used only in email conversations.
|
732
786
|
*/
|
@@ -734,11 +788,11 @@ declare class Message extends ReplayEventEmitter<MessageEvents> {
|
|
734
788
|
/**
|
735
789
|
* Body of the message.
|
736
790
|
*/
|
737
|
-
get body(): string;
|
791
|
+
get body(): string | null;
|
738
792
|
/**
|
739
793
|
* Date this message was last updated on.
|
740
794
|
*/
|
741
|
-
get dateUpdated(): Date;
|
795
|
+
get dateUpdated(): Date | null;
|
742
796
|
/**
|
743
797
|
* Index of the message in the conversation's messages list.
|
744
798
|
* By design of the Conversations system, the message indices may have arbitrary gaps between them,
|
@@ -754,15 +808,15 @@ declare class Message extends ReplayEventEmitter<MessageEvents> {
|
|
754
808
|
/**
|
755
809
|
* Identity of the last user that updated the message.
|
756
810
|
*/
|
757
|
-
get lastUpdatedBy(): string;
|
811
|
+
get lastUpdatedBy(): string | null;
|
758
812
|
/**
|
759
813
|
* Date this message was created on.
|
760
814
|
*/
|
761
|
-
get dateCreated(): Date;
|
815
|
+
get dateCreated(): Date | null;
|
762
816
|
/**
|
763
817
|
* Custom attributes of the message.
|
764
818
|
*/
|
765
|
-
get attributes():
|
819
|
+
get attributes(): JSONValue;
|
766
820
|
/**
|
767
821
|
* Type of the message.
|
768
822
|
*/
|
@@ -779,7 +833,7 @@ declare class Message extends ReplayEventEmitter<MessageEvents> {
|
|
779
833
|
/**
|
780
834
|
* The server-assigned unique identifier of the authoring participant.
|
781
835
|
*/
|
782
|
-
get participantSid(): string;
|
836
|
+
get participantSid(): string | null;
|
783
837
|
/**
|
784
838
|
* Aggregated information about the message delivery statuses across all participants of a conversation..
|
785
839
|
*/
|
@@ -825,12 +879,12 @@ declare class Message extends ReplayEventEmitter<MessageEvents> {
|
|
825
879
|
* Edit the message attributes.
|
826
880
|
* @param attributes New attributes.
|
827
881
|
*/
|
828
|
-
updateAttributes(attributes:
|
882
|
+
updateAttributes(attributes: JSONValue): Promise<Message>;
|
829
883
|
/**
|
830
884
|
* Get content URLs for all media attachments in the given set using single operation.
|
831
885
|
* @param contentSet Set of media attachments to query for content URL.
|
832
886
|
*/
|
833
|
-
attachTemporaryUrlsFor(contentSet: Media[]): Promise<Media[]>;
|
887
|
+
attachTemporaryUrlsFor(contentSet: Media[] | null): Promise<Media[]>;
|
834
888
|
private _getDetailedDeliveryReceiptsPaginator;
|
835
889
|
}
|
836
890
|
/**
|
@@ -912,9 +966,9 @@ declare class TypingIndicator {
|
|
912
966
|
declare class UnsentMessage {
|
913
967
|
private messagesEntity;
|
914
968
|
text?: string;
|
915
|
-
attributes:
|
969
|
+
attributes: JSONValue;
|
916
970
|
mediaContent: [MediaCategory, FormData | SendMediaOptions][];
|
917
|
-
emailOptions
|
971
|
+
emailOptions: SendEmailOptions;
|
918
972
|
/**
|
919
973
|
* @internal
|
920
974
|
*/
|
@@ -923,7 +977,154 @@ declare class UnsentMessage {
|
|
923
977
|
* Send the prepared message to the conversation.
|
924
978
|
* @returns Index of the new message in the conversation.
|
925
979
|
*/
|
926
|
-
send(): Promise<number>;
|
980
|
+
send(): Promise<number | null>;
|
981
|
+
}
|
982
|
+
/**
|
983
|
+
* Pagination helper class.
|
984
|
+
*/
|
985
|
+
declare class RestPaginator<T> implements Paginator<T> {
|
986
|
+
private state;
|
987
|
+
/**
|
988
|
+
* Indicates the existence of the next page.
|
989
|
+
*/
|
990
|
+
get hasNextPage(): boolean;
|
991
|
+
/**
|
992
|
+
* Indicates the existence of the previous page
|
993
|
+
*/
|
994
|
+
get hasPrevPage(): boolean;
|
995
|
+
/**
|
996
|
+
* Array of elements on the current page.
|
997
|
+
*/
|
998
|
+
get items(): T[];
|
999
|
+
/**
|
1000
|
+
* @internal
|
1001
|
+
*/
|
1002
|
+
constructor(items: any, source: any, prevToken: any, nextToken: any);
|
1003
|
+
/**
|
1004
|
+
* Request the next page. Does not modify the existing object.
|
1005
|
+
*/
|
1006
|
+
nextPage(): Promise<RestPaginator<T>>;
|
1007
|
+
/**
|
1008
|
+
* Request the previous page. Does not modify the existing object.
|
1009
|
+
*/
|
1010
|
+
prevPage(): Promise<RestPaginator<T>>;
|
1011
|
+
}
|
1012
|
+
/**
|
1013
|
+
* @classdesc Pagination helper class for Sync
|
1014
|
+
*
|
1015
|
+
* @property {Array} items Array of elements on current page
|
1016
|
+
* @property {boolean} hasNextPage
|
1017
|
+
* @property {boolean} hasPrevPage
|
1018
|
+
*/
|
1019
|
+
declare class SyncPaginator<T> implements Paginator<T> {
|
1020
|
+
private state;
|
1021
|
+
hasNextPage: boolean;
|
1022
|
+
hasPrevPage: boolean;
|
1023
|
+
get items(): T[];
|
1024
|
+
/**
|
1025
|
+
* @param {Array} items Array of element for current page
|
1026
|
+
* @param {Object} params
|
1027
|
+
*/
|
1028
|
+
constructor(items: any, pageSize: any, anchor: any, direction: any, source: any);
|
1029
|
+
nextPage(): Promise<RestPaginator<T>>;
|
1030
|
+
prevPage(): Promise<SyncPaginator<T> | RestPaginator<T>>;
|
1031
|
+
}
|
1032
|
+
interface MessageResponse {
|
1033
|
+
account_sid: string;
|
1034
|
+
chat_service_sid: string;
|
1035
|
+
conversation_sid: string;
|
1036
|
+
sid: string;
|
1037
|
+
index: number;
|
1038
|
+
attributes: string;
|
1039
|
+
author: string;
|
1040
|
+
participant_sid: string;
|
1041
|
+
body: string;
|
1042
|
+
subject: string;
|
1043
|
+
date_created: string;
|
1044
|
+
date_updated: string;
|
1045
|
+
url: string;
|
1046
|
+
media: {
|
1047
|
+
sid: string;
|
1048
|
+
size: string;
|
1049
|
+
content_type: string;
|
1050
|
+
filename: string;
|
1051
|
+
}[] | null;
|
1052
|
+
links: {
|
1053
|
+
conversation: string;
|
1054
|
+
messages_receipts: string;
|
1055
|
+
};
|
1056
|
+
}
|
1057
|
+
type MessagesEvents = {
|
1058
|
+
messageAdded: (message: Message) => void;
|
1059
|
+
messageRemoved: (message: Message) => void;
|
1060
|
+
messageUpdated: (data: {
|
1061
|
+
message: Message;
|
1062
|
+
updateReasons: MessageUpdateReason[];
|
1063
|
+
}) => void;
|
1064
|
+
};
|
1065
|
+
interface MessagesServices {
|
1066
|
+
mcsClient: McsClient;
|
1067
|
+
network: Network;
|
1068
|
+
syncClient: SyncClient;
|
1069
|
+
commandExecutor: CommandExecutor;
|
1070
|
+
}
|
1071
|
+
/**
|
1072
|
+
* Represents the collection of messages in a conversation
|
1073
|
+
*/
|
1074
|
+
declare class Messages extends ReplayEventEmitter<MessagesEvents> {
|
1075
|
+
readonly conversation: Conversation;
|
1076
|
+
private readonly configuration;
|
1077
|
+
private readonly services;
|
1078
|
+
private readonly messagesByIndex;
|
1079
|
+
private messagesListPromise;
|
1080
|
+
constructor(conversation: Conversation, configuration: Configuration, services: MessagesServices);
|
1081
|
+
/**
|
1082
|
+
* Subscribe to the Messages Event Stream
|
1083
|
+
* @param name - The name of Sync object for the Messages resource.
|
1084
|
+
*/
|
1085
|
+
subscribe(name: string): Promise<SyncList>;
|
1086
|
+
unsubscribe(): Promise<void>;
|
1087
|
+
/**
|
1088
|
+
* Send Message to the conversation, message could include both text and multiple media attachments.
|
1089
|
+
* @param message Message to post
|
1090
|
+
* @returns Returns a promise which can fail
|
1091
|
+
*/
|
1092
|
+
sendV2(message: UnsentMessage): Promise<MessageResponse>;
|
1093
|
+
/**
|
1094
|
+
* Send Message to the conversation
|
1095
|
+
* @param message Message to post
|
1096
|
+
* @param attributes Message attributes
|
1097
|
+
* @param emailOptions Options that modify E-mail integration behaviors.
|
1098
|
+
* @returns Returns promise which can fail
|
1099
|
+
*/
|
1100
|
+
send(message: null | string | FormData | SendMediaOptions, attributes?: JSONValue, emailOptions?: SendEmailOptions): Promise<MessageResponse>;
|
1101
|
+
/**
|
1102
|
+
* Send Media Message to the conversation
|
1103
|
+
* @param mediaContent Media content to post
|
1104
|
+
* @param attributes Message attributes
|
1105
|
+
* @param emailOptions Email options
|
1106
|
+
* @returns Returns promise which can fail
|
1107
|
+
*/
|
1108
|
+
sendMedia(mediaContent: FormData | SendMediaOptions, attributes?: JSONValue, emailOptions?: SendEmailOptions): Promise<MessageResponse>;
|
1109
|
+
/**
|
1110
|
+
* Returns messages from conversation using paginator interface
|
1111
|
+
* @param pageSize Number of messages to return in single chunk. By default it's 30.
|
1112
|
+
* @param anchor Most early message id which is already known, or 'end' by default
|
1113
|
+
* @param direction Pagination order 'backwards' or 'forward', 'forward' by default
|
1114
|
+
* @returns Last page of messages by default
|
1115
|
+
*/
|
1116
|
+
getMessages(pageSize: number | undefined, anchor: number | "end" | undefined, direction?: "forward" | "backwards"): Promise<SyncPaginator<Message>>;
|
1117
|
+
private _wrapPaginator;
|
1118
|
+
private _upsertMessage;
|
1119
|
+
/**
|
1120
|
+
* Returns last messages from conversation
|
1121
|
+
* @param {Number} [pageSize] Number of messages to return in single chunk. By default it's 30.
|
1122
|
+
* @param {String} [anchor] Most early message id which is already known, or 'end' by default
|
1123
|
+
* @param {String} [direction] Pagination order 'backwards' or 'forward', or 'forward' by default
|
1124
|
+
* @returns {Promise<SyncPaginator<Message>>} last page of messages by default
|
1125
|
+
* @private
|
1126
|
+
*/
|
1127
|
+
private _getMessages;
|
927
1128
|
}
|
928
1129
|
/**
|
929
1130
|
* Message builder. Allows the message to be built and sent via method chaining.
|
@@ -948,7 +1149,7 @@ declare class MessageBuilder {
|
|
948
1149
|
/**
|
949
1150
|
* @internal
|
950
1151
|
*/
|
951
|
-
constructor(limits:
|
1152
|
+
constructor(limits: ConversationLimits, messagesEntity: Messages);
|
952
1153
|
/**
|
953
1154
|
* Sets the message body.
|
954
1155
|
* @param text Contents of the body.
|
@@ -963,7 +1164,7 @@ declare class MessageBuilder {
|
|
963
1164
|
* Sets the message attributes.
|
964
1165
|
* @param attributes Message attributes.
|
965
1166
|
*/
|
966
|
-
setAttributes(attributes:
|
1167
|
+
setAttributes(attributes: JSONValue): MessageBuilder;
|
967
1168
|
/**
|
968
1169
|
* Set email body with given MIME-type.
|
969
1170
|
* @param mimeType Format of the body to set (text/plain or text/html).
|
@@ -1020,12 +1221,12 @@ interface ConversationDescriptor {
|
|
1020
1221
|
channel: string;
|
1021
1222
|
entityName: string;
|
1022
1223
|
uniqueName: string;
|
1023
|
-
attributes:
|
1224
|
+
attributes: JSONValue;
|
1024
1225
|
createdBy?: string;
|
1025
1226
|
friendlyName?: string;
|
1026
1227
|
lastConsumedMessageIndex: number;
|
1027
|
-
dateCreated:
|
1028
|
-
dateUpdated:
|
1228
|
+
dateCreated: Date | null;
|
1229
|
+
dateUpdated: Date | null;
|
1029
1230
|
notificationLevel?: NotificationLevel;
|
1030
1231
|
bindings?: ConversationBindings;
|
1031
1232
|
}
|
@@ -1073,6 +1274,7 @@ interface ConversationUpdatedEventArgs {
|
|
1073
1274
|
*/
|
1074
1275
|
interface ConversationBindings {
|
1075
1276
|
email?: ConversationEmailBinding;
|
1277
|
+
sms?: ConversationSmsBinding;
|
1076
1278
|
}
|
1077
1279
|
/**
|
1078
1280
|
* Binding for email conversation.
|
@@ -1081,6 +1283,9 @@ interface ConversationEmailBinding {
|
|
1081
1283
|
name?: string;
|
1082
1284
|
projected_address: string;
|
1083
1285
|
}
|
1286
|
+
interface ConversationSmsBinding {
|
1287
|
+
address?: string;
|
1288
|
+
}
|
1084
1289
|
/**
|
1085
1290
|
* Configuration for attaching a media file to a message.
|
1086
1291
|
* These options can be passed to {@link Conversation.sendMessage} and
|
@@ -1090,7 +1295,7 @@ interface SendMediaOptions {
|
|
1090
1295
|
/**
|
1091
1296
|
* Content type of media.
|
1092
1297
|
*/
|
1093
|
-
contentType: string;
|
1298
|
+
contentType: null | string;
|
1094
1299
|
/**
|
1095
1300
|
* Optional filename.
|
1096
1301
|
*/
|
@@ -1098,7 +1303,7 @@ interface SendMediaOptions {
|
|
1098
1303
|
/**
|
1099
1304
|
* Content to post.
|
1100
1305
|
*/
|
1101
|
-
media: string | Buffer | Blob;
|
1306
|
+
media: null | string | Buffer | Blob;
|
1102
1307
|
}
|
1103
1308
|
/**
|
1104
1309
|
* These options can be passed to {@link Conversation.sendMessage}.
|
@@ -1234,7 +1439,7 @@ declare class Conversation extends ReplayEventEmitter<ConversationEvents> {
|
|
1234
1439
|
/**
|
1235
1440
|
* Unique name of the conversation.
|
1236
1441
|
*/
|
1237
|
-
get uniqueName(): string;
|
1442
|
+
get uniqueName(): string | null;
|
1238
1443
|
/**
|
1239
1444
|
* Status of the conversation.
|
1240
1445
|
*/
|
@@ -1242,15 +1447,15 @@ declare class Conversation extends ReplayEventEmitter<ConversationEvents> {
|
|
1242
1447
|
/**
|
1243
1448
|
* Name of the conversation.
|
1244
1449
|
*/
|
1245
|
-
get friendlyName(): string;
|
1450
|
+
get friendlyName(): string | null;
|
1246
1451
|
/**
|
1247
1452
|
* Date this conversation was last updated on.
|
1248
1453
|
*/
|
1249
|
-
get dateUpdated():
|
1454
|
+
get dateUpdated(): Date | null;
|
1250
1455
|
/**
|
1251
1456
|
* Date this conversation was created on.
|
1252
1457
|
*/
|
1253
|
-
get dateCreated():
|
1458
|
+
get dateCreated(): Date | null;
|
1254
1459
|
/**
|
1255
1460
|
* Identity of the user that created this conversation.
|
1256
1461
|
*/
|
@@ -1258,7 +1463,7 @@ declare class Conversation extends ReplayEventEmitter<ConversationEvents> {
|
|
1258
1463
|
/**
|
1259
1464
|
* Custom attributes of the conversation.
|
1260
1465
|
*/
|
1261
|
-
get attributes():
|
1466
|
+
get attributes(): JSONValue;
|
1262
1467
|
/**
|
1263
1468
|
* Index of the last message the user has read in this conversation.
|
1264
1469
|
*/
|
@@ -1266,13 +1471,13 @@ declare class Conversation extends ReplayEventEmitter<ConversationEvents> {
|
|
1266
1471
|
/**
|
1267
1472
|
* Last message sent to this conversation.
|
1268
1473
|
*/
|
1269
|
-
get lastMessage(): LastMessage;
|
1474
|
+
get lastMessage(): LastMessage | undefined;
|
1270
1475
|
/**
|
1271
1476
|
* User notification level for this conversation.
|
1272
1477
|
*/
|
1273
1478
|
get notificationLevel(): NotificationLevel;
|
1274
1479
|
get bindings(): ConversationBindings;
|
1275
|
-
get limits():
|
1480
|
+
get limits(): ConversationLimits;
|
1276
1481
|
/**
|
1277
1482
|
* State of the conversation.
|
1278
1483
|
*/
|
@@ -1282,7 +1487,7 @@ declare class Conversation extends ReplayEventEmitter<ConversationEvents> {
|
|
1282
1487
|
* This or _subscribeStreams will need to be called before any events on conversation will fire.
|
1283
1488
|
* @internal
|
1284
1489
|
*/
|
1285
|
-
_subscribe(): Promise<
|
1490
|
+
_subscribe(): Promise<void | SyncDocument>;
|
1286
1491
|
/**
|
1287
1492
|
* Load the attributes of this conversation and instantiate its participants and messages.
|
1288
1493
|
* This or _subscribe will need to be called before any events on the conversation will fire.
|
@@ -1296,7 +1501,7 @@ declare class Conversation extends ReplayEventEmitter<ConversationEvents> {
|
|
1296
1501
|
*/
|
1297
1502
|
_unsubscribe(): Promise<[
|
1298
1503
|
void,
|
1299
|
-
|
1504
|
+
void
|
1300
1505
|
]>;
|
1301
1506
|
/**
|
1302
1507
|
* Set conversation status.
|
@@ -1324,7 +1529,7 @@ declare class Conversation extends ReplayEventEmitter<ConversationEvents> {
|
|
1324
1529
|
* @param identity Identity of the Client to add.
|
1325
1530
|
* @param attributes Attributes to be attached to the participant.
|
1326
1531
|
*/
|
1327
|
-
add(identity: string, attributes?:
|
1532
|
+
add(identity: string, attributes?: JSONValue): Promise<ParticipantResponse>;
|
1328
1533
|
/**
|
1329
1534
|
* Add a non-chat participant to the conversation.
|
1330
1535
|
* @param proxyAddress Proxy (Twilio) address of the participant.
|
@@ -1332,7 +1537,7 @@ declare class Conversation extends ReplayEventEmitter<ConversationEvents> {
|
|
1332
1537
|
* @param attributes Attributes to be attached to the participant.
|
1333
1538
|
* @param bindingOptions Options for adding email participants - name and CC/To level.
|
1334
1539
|
*/
|
1335
|
-
addNonChatParticipant(proxyAddress: string, address: string, attributes?:
|
1540
|
+
addNonChatParticipant(proxyAddress: string, address: string, attributes?: JSONValue, bindingOptions?: ParticipantBindingOptions): Promise<ParticipantResponse>;
|
1336
1541
|
/**
|
1337
1542
|
* Advance the conversation's last read message index to the current read horizon.
|
1338
1543
|
* Rejects if the user is not a participant of the conversation.
|
@@ -1348,7 +1553,7 @@ declare class Conversation extends ReplayEventEmitter<ConversationEvents> {
|
|
1348
1553
|
/**
|
1349
1554
|
* Get the custom attributes of this Conversation.
|
1350
1555
|
*/
|
1351
|
-
getAttributes(): Promise<
|
1556
|
+
getAttributes(): Promise<JSONValue>;
|
1352
1557
|
/**
|
1353
1558
|
* Returns messages from the conversation using the paginator interface.
|
1354
1559
|
* @param pageSize Number of messages to return in a single chunk. Default is 30.
|
@@ -1377,12 +1582,12 @@ declare class Conversation extends ReplayEventEmitter<ConversationEvents> {
|
|
1377
1582
|
* Get a participant by its SID.
|
1378
1583
|
* @param participantSid Participant SID.
|
1379
1584
|
*/
|
1380
|
-
getParticipantBySid(participantSid: string): Promise<Participant>;
|
1585
|
+
getParticipantBySid(participantSid: string): Promise<Participant | null>;
|
1381
1586
|
/**
|
1382
1587
|
* Get a participant by its identity.
|
1383
1588
|
* @param identity Participant identity.
|
1384
1589
|
*/
|
1385
|
-
getParticipantByIdentity(identity
|
1590
|
+
getParticipantByIdentity(identity?: string | null): Promise<Participant | null>;
|
1386
1591
|
/**
|
1387
1592
|
* Get the total message count in the conversation.
|
1388
1593
|
*
|
@@ -1423,6 +1628,8 @@ declare class Conversation extends ReplayEventEmitter<ConversationEvents> {
|
|
1423
1628
|
* argument, it will assume that the string is an identity or SID.
|
1424
1629
|
* @param participant Identity, SID or the participant object to remove.
|
1425
1630
|
*/
|
1631
|
+
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
1632
|
+
// @ts-ignore TODO: fix validateTypesAsync typing
|
1426
1633
|
removeParticipant(participant: string | Participant): Promise<void>;
|
1427
1634
|
/**
|
1428
1635
|
* Send a message to the conversation.
|
@@ -1432,7 +1639,7 @@ declare class Conversation extends ReplayEventEmitter<ConversationEvents> {
|
|
1432
1639
|
* @param emailOptions Email options for the message.
|
1433
1640
|
* @return Index of the new message.
|
1434
1641
|
*/
|
1435
|
-
sendMessage(message: string | FormData | SendMediaOptions
|
1642
|
+
sendMessage(message: null | string | FormData | SendMediaOptions, messageAttributes?: JSONValue, emailOptions?: SendEmailOptions): Promise<number>;
|
1436
1643
|
/**
|
1437
1644
|
* New interface to prepare for sending a message.
|
1438
1645
|
* Use instead of `sendMessage`.
|
@@ -1463,7 +1670,7 @@ declare class Conversation extends ReplayEventEmitter<ConversationEvents> {
|
|
1463
1670
|
* Update the attributes of the conversation.
|
1464
1671
|
* @param attributes New attributes.
|
1465
1672
|
*/
|
1466
|
-
updateAttributes(attributes:
|
1673
|
+
updateAttributes(attributes: JSONValue): Promise<Conversation>;
|
1467
1674
|
/**
|
1468
1675
|
* Update the friendly name of the conversation.
|
1469
1676
|
* @param friendlyName New friendly name.
|
@@ -1488,13 +1695,13 @@ type ConversationsDataSource = "sync" | "chat" | "rest";
|
|
1488
1695
|
*/
|
1489
1696
|
type PushNotificationType = "twilio.conversations.new_message" | "twilio.conversations.added_to_conversation" | "twilio.conversations.removed_from_conversation";
|
1490
1697
|
interface PushNotificationDescriptor {
|
1491
|
-
title: string;
|
1492
|
-
body: string;
|
1493
|
-
sound: string;
|
1494
|
-
badge: number;
|
1495
|
-
action: string;
|
1698
|
+
title: string | null;
|
1699
|
+
body: string | null;
|
1700
|
+
sound: string | null;
|
1701
|
+
badge: number | null;
|
1702
|
+
action: string | null;
|
1496
1703
|
type: PushNotificationType;
|
1497
|
-
data:
|
1704
|
+
data: Record<string, unknown>;
|
1498
1705
|
}
|
1499
1706
|
/**
|
1500
1707
|
* Additional data for a given push notification.
|
@@ -1520,23 +1727,23 @@ declare class PushNotification {
|
|
1520
1727
|
/**
|
1521
1728
|
* Title of the notification.
|
1522
1729
|
*/
|
1523
|
-
readonly title: string;
|
1730
|
+
readonly title: string | null;
|
1524
1731
|
/**
|
1525
1732
|
* Text of the notification.
|
1526
1733
|
*/
|
1527
|
-
readonly body: string;
|
1734
|
+
readonly body: string | null;
|
1528
1735
|
/**
|
1529
1736
|
* Sound of the notification.
|
1530
1737
|
*/
|
1531
|
-
readonly sound: string;
|
1738
|
+
readonly sound: string | null;
|
1532
1739
|
/**
|
1533
1740
|
* Number of the badge.
|
1534
1741
|
*/
|
1535
|
-
readonly badge: number;
|
1742
|
+
readonly badge: number | null;
|
1536
1743
|
/**
|
1537
1744
|
* Notification action (`click_action` in FCM terms and `category` in APN terms).
|
1538
1745
|
*/
|
1539
|
-
readonly action: string;
|
1746
|
+
readonly action: string | null;
|
1540
1747
|
/**
|
1541
1748
|
* Type of the notification.
|
1542
1749
|
*/
|
@@ -1612,7 +1819,7 @@ type State = "failed" | "initialized";
|
|
1612
1819
|
* * `'apn'`
|
1613
1820
|
*/
|
1614
1821
|
type NotificationsChannelType = ChannelType;
|
1615
|
-
type LogLevel = "trace" | "debug" | "info" | "warn" | "error" | "silent"
|
1822
|
+
type LogLevel = "trace" | "debug" | "info" | "warn" | "error" | "silent";
|
1616
1823
|
/**
|
1617
1824
|
* Conversations client options.
|
1618
1825
|
*/
|
@@ -1632,15 +1839,17 @@ interface ClientOptions {
|
|
1632
1839
|
httpCacheIntervalOverride?: string;
|
1633
1840
|
userInfosToSubscribeOverride?: number;
|
1634
1841
|
retryWhenThrottledOverride?: boolean;
|
1635
|
-
backoffConfigOverride?:
|
1636
|
-
Chat?:
|
1637
|
-
IPMessaging?:
|
1638
|
-
Sync?:
|
1639
|
-
Notification?:
|
1640
|
-
Twilsock?:
|
1641
|
-
clientMetadata?:
|
1842
|
+
backoffConfigOverride?: Record<string, unknown>;
|
1843
|
+
Chat?: ClientOptions;
|
1844
|
+
IPMessaging?: ClientOptions;
|
1845
|
+
Sync?: Record<string, unknown>;
|
1846
|
+
Notification?: Record<string, unknown>;
|
1847
|
+
Twilsock?: Record<string, unknown>;
|
1848
|
+
clientMetadata?: Record<string, unknown>;
|
1642
1849
|
initRegistrations?: InitRegistration[];
|
1643
1850
|
disableDeepClone?: boolean;
|
1851
|
+
typingUri?: string;
|
1852
|
+
apiUri?: string;
|
1644
1853
|
}
|
1645
1854
|
/**
|
1646
1855
|
* Options for {@link Client.createConversation}.
|
@@ -1649,7 +1858,7 @@ interface CreateConversationOptions {
|
|
1649
1858
|
/**
|
1650
1859
|
* Any custom attributes to attach to the conversation.
|
1651
1860
|
*/
|
1652
|
-
attributes?:
|
1861
|
+
attributes?: JSONValue;
|
1653
1862
|
/**
|
1654
1863
|
* A non-unique display name of the conversation.
|
1655
1864
|
*/
|
@@ -1696,7 +1905,7 @@ declare class Client extends ReplayEventEmitter<ClientEvents> {
|
|
1696
1905
|
* @param options Options to customize the Client
|
1697
1906
|
* @returns A not yet fully-initialized client.
|
1698
1907
|
*/
|
1699
|
-
constructor(fpaToken: string, options?: ClientOptions);
|
1908
|
+
constructor(fpaToken: string, options?: ClientOptions | null);
|
1700
1909
|
static populateInitRegistrations(reg: InitRegistration): void;
|
1701
1910
|
/**
|
1702
1911
|
* Fired when a conversation becomes visible to the client. The event is also triggered when the client creates a new conversation.
|
@@ -1904,7 +2113,7 @@ declare class Client extends ReplayEventEmitter<ClientEvents> {
|
|
1904
2113
|
* @param options Options to customize the client.
|
1905
2114
|
* @returns Returns a fully initialized client.
|
1906
2115
|
*/
|
1907
|
-
static create(token: string, options?: ClientOptions): Promise<Client>;
|
2116
|
+
static create(token: string, options?: ClientOptions | null): Promise<Client>;
|
1908
2117
|
/**
|
1909
2118
|
* Information of the logged-in user. Before client initialization, returns an
|
1910
2119
|
* uninitialized user. Will trigger a {@link Client.userUpdated} event after
|
@@ -1942,7 +2151,7 @@ declare class Client extends ReplayEventEmitter<ClientEvents> {
|
|
1942
2151
|
/**
|
1943
2152
|
* Get the current list of all the subscribed conversations.
|
1944
2153
|
*/
|
1945
|
-
getSubscribedConversations(
|
2154
|
+
getSubscribedConversations(): Promise<Paginator<Conversation>>;
|
1946
2155
|
/**
|
1947
2156
|
* Create a conversation on the server and subscribe to its events.
|
1948
2157
|
* The default is a conversation with an empty friendly name.
|
@@ -1996,36 +2205,6 @@ declare class Client extends ReplayEventEmitter<ClientEvents> {
|
|
1996
2205
|
*/
|
1997
2206
|
getSubscribedUsers(): Promise<Array<User>>;
|
1998
2207
|
}
|
1999
|
-
/**
|
2000
|
-
* Pagination helper class.
|
2001
|
-
*/
|
2002
|
-
declare class RestPaginator<T> implements Paginator<T> {
|
2003
|
-
private state;
|
2004
|
-
/**
|
2005
|
-
* Indicates the existence of the next page.
|
2006
|
-
*/
|
2007
|
-
get hasNextPage(): boolean;
|
2008
|
-
/**
|
2009
|
-
* Indicates the existence of the previous page
|
2010
|
-
*/
|
2011
|
-
get hasPrevPage(): boolean;
|
2012
|
-
/**
|
2013
|
-
* Array of elements on the current page.
|
2014
|
-
*/
|
2015
|
-
get items(): Array<T>;
|
2016
|
-
/**
|
2017
|
-
* @internal
|
2018
|
-
*/
|
2019
|
-
constructor(items: any, source: any, prevToken: any, nextToken: any);
|
2020
|
-
/**
|
2021
|
-
* Request the next page. Does not modify the existing object.
|
2022
|
-
*/
|
2023
|
-
nextPage(): Promise<RestPaginator<T>>;
|
2024
|
-
/**
|
2025
|
-
* Request the previous page. Does not modify the existing object.
|
2026
|
-
*/
|
2027
|
-
prevPage(): Promise<RestPaginator<T>>;
|
2028
|
-
}
|
2029
2208
|
declare class NotificationTypes {
|
2030
2209
|
static readonly TYPING_INDICATOR = "twilio.ipmsg.typing_indicator";
|
2031
2210
|
static readonly NEW_MESSAGE = "twilio.conversations.new_message";
|
@@ -2034,4 +2213,4 @@ declare class NotificationTypes {
|
|
2034
2213
|
static readonly REMOVED_FROM_CONVERSATION = "twilio.conversations.removed_from_conversation";
|
2035
2214
|
static readonly CONSUMPTION_UPDATE = "twilio.channel.consumption_update";
|
2036
2215
|
}
|
2037
|
-
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 };
|
2216
|
+
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, ConversationLimits, JSONValue, JSONObject, JSONArray };
|