@botpress/webchat-client 0.4.0 → 0.6.0
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/.turbo/turbo-build.log +4 -4
- package/dist/index.d.ts +442 -367
- package/dist/webchat-client2.js +96 -95
- package/package.json +3 -3
- package/src/client/client.ts +25 -15
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Adds feedback to a [Message](#schema_message).
|
|
3
3
|
*/
|
|
4
|
-
declare const addMessageFeedback: <ThrowOnError extends boolean = false>(options: Options<AddMessageFeedbackData, ThrowOnError>) => RequestResult<{
|
|
5
|
-
|
|
4
|
+
declare const addMessageFeedback: <ThrowOnError extends boolean = false>(options: Options<AddMessageFeedbackData, ThrowOnError>) => RequestResult< {
|
|
5
|
+
[key: string]: never;
|
|
6
6
|
}, {
|
|
7
|
-
|
|
7
|
+
[key: string]: never;
|
|
8
8
|
}, ThrowOnError>;
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -61,10 +61,10 @@ export declare type AddMessageFeedbackResponses = {
|
|
|
61
61
|
/**
|
|
62
62
|
* Add a [Participant](#schema_user) to a [Conversation](#schema_conversation).
|
|
63
63
|
*/
|
|
64
|
-
declare const addParticipant: <ThrowOnError extends boolean = false>(options: Options<AddParticipantData, ThrowOnError>) => RequestResult<{
|
|
65
|
-
|
|
64
|
+
declare const addParticipant: <ThrowOnError extends boolean = false>(options: Options<AddParticipantData, ThrowOnError>) => RequestResult< {
|
|
65
|
+
participant: User;
|
|
66
66
|
}, {
|
|
67
|
-
|
|
67
|
+
participant: User;
|
|
68
68
|
}, ThrowOnError>;
|
|
69
69
|
|
|
70
70
|
/**
|
|
@@ -187,7 +187,7 @@ export declare type Client = {
|
|
|
187
187
|
deleteMessage: (params: MessageIdParam) => Promise<ClientTypes_2.DeleteMessageResponse>;
|
|
188
188
|
createFile: (params: ClientTypes_2.CreateFileBody) => Promise<ClientTypes_2.CreateFileResponse>;
|
|
189
189
|
getUser: () => Promise<ClientTypes_2.GetUserResponse>;
|
|
190
|
-
updateUser: (params: ClientTypes_2.
|
|
190
|
+
updateUser: (params: ClientTypes_2.UpdateUserBody) => Promise<ClientTypes_2.UpdateUserResponse>;
|
|
191
191
|
deleteUser: (params: UserIdParam) => Promise<ClientTypes_2.DeleteUserResponse>;
|
|
192
192
|
createEvent: (params: ClientTypes_2.CreateEventBody) => Promise<ClientTypes_2.CreateEventResponse>;
|
|
193
193
|
getEvent: (params: EventIdParam) => Promise<ClientTypes_2.GetEventResponse>;
|
|
@@ -513,6 +513,7 @@ export declare type Conversation = {
|
|
|
513
513
|
*/
|
|
514
514
|
payload: {
|
|
515
515
|
audioUrl: string;
|
|
516
|
+
fileId?: string;
|
|
516
517
|
type: 'audio';
|
|
517
518
|
} | {
|
|
518
519
|
title: string;
|
|
@@ -555,9 +556,11 @@ export declare type Conversation = {
|
|
|
555
556
|
} | {
|
|
556
557
|
fileUrl: string;
|
|
557
558
|
title?: string;
|
|
559
|
+
fileId?: string;
|
|
558
560
|
type: 'file';
|
|
559
561
|
} | {
|
|
560
562
|
imageUrl: string;
|
|
563
|
+
fileId?: string;
|
|
561
564
|
type: 'image';
|
|
562
565
|
} | {
|
|
563
566
|
latitude: number;
|
|
@@ -571,6 +574,7 @@ export declare type Conversation = {
|
|
|
571
574
|
type: 'text';
|
|
572
575
|
} | {
|
|
573
576
|
videoUrl: string;
|
|
577
|
+
fileId?: string;
|
|
574
578
|
type: 'video';
|
|
575
579
|
} | {
|
|
576
580
|
items: Array<{
|
|
@@ -588,22 +592,26 @@ export declare type Conversation = {
|
|
|
588
592
|
type: 'image';
|
|
589
593
|
payload: {
|
|
590
594
|
imageUrl: string;
|
|
595
|
+
fileId?: string;
|
|
591
596
|
};
|
|
592
597
|
} | {
|
|
593
598
|
type: 'audio';
|
|
594
599
|
payload: {
|
|
595
600
|
audioUrl: string;
|
|
601
|
+
fileId?: string;
|
|
596
602
|
};
|
|
597
603
|
} | {
|
|
598
604
|
type: 'video';
|
|
599
605
|
payload: {
|
|
600
606
|
videoUrl: string;
|
|
607
|
+
fileId?: string;
|
|
601
608
|
};
|
|
602
609
|
} | {
|
|
603
610
|
type: 'file';
|
|
604
611
|
payload: {
|
|
605
612
|
fileUrl: string;
|
|
606
613
|
title?: string;
|
|
614
|
+
fileId?: string;
|
|
607
615
|
};
|
|
608
616
|
} | {
|
|
609
617
|
type: 'location';
|
|
@@ -658,20 +666,26 @@ declare type ConversationIdParam = {
|
|
|
658
666
|
conversationId: string;
|
|
659
667
|
};
|
|
660
668
|
|
|
661
|
-
export declare const createClient: ({ userKey, clientId, apiUrl, customHeaders, }: {
|
|
669
|
+
export declare const createClient: ({ userKey, clientId, apiUrl, customHeaders, advancedOptions, }: {
|
|
662
670
|
userKey: string;
|
|
663
671
|
clientId: string;
|
|
664
672
|
apiUrl?: string;
|
|
665
673
|
customHeaders?: Record<string, string>;
|
|
674
|
+
advancedOptions?: {
|
|
675
|
+
eventSource?: (params: {
|
|
676
|
+
url: string;
|
|
677
|
+
headers: Record<string, string>;
|
|
678
|
+
}) => EventSourceLike;
|
|
679
|
+
};
|
|
666
680
|
}) => Client;
|
|
667
681
|
|
|
668
682
|
/**
|
|
669
683
|
* Creates a new [Conversation](#schema_conversation)
|
|
670
684
|
*/
|
|
671
|
-
declare const createConversation: <ThrowOnError extends boolean = false>(options: Options<CreateConversationData, ThrowOnError>) => RequestResult<{
|
|
672
|
-
|
|
685
|
+
declare const createConversation: <ThrowOnError extends boolean = false>(options: Options<CreateConversationData, ThrowOnError>) => RequestResult< {
|
|
686
|
+
conversation: Conversation;
|
|
673
687
|
}, {
|
|
674
|
-
|
|
688
|
+
conversation: Conversation;
|
|
675
689
|
}, ThrowOnError>;
|
|
676
690
|
|
|
677
691
|
/**
|
|
@@ -722,10 +736,10 @@ export declare type CreateConversationResponses = {
|
|
|
722
736
|
/**
|
|
723
737
|
* Creates a new [Event](#schema_event)
|
|
724
738
|
*/
|
|
725
|
-
declare const createEvent: <ThrowOnError extends boolean = false>(options: Options<CreateEventData, ThrowOnError>) => RequestResult<{
|
|
726
|
-
|
|
739
|
+
declare const createEvent: <ThrowOnError extends boolean = false>(options: Options<CreateEventData, ThrowOnError>) => RequestResult< {
|
|
740
|
+
event: Event_2;
|
|
727
741
|
}, {
|
|
728
|
-
|
|
742
|
+
event: Event_2;
|
|
729
743
|
}, ThrowOnError>;
|
|
730
744
|
|
|
731
745
|
/**
|
|
@@ -797,10 +811,10 @@ export declare type CreateEventResponses = {
|
|
|
797
811
|
/**
|
|
798
812
|
* Creates a new file and returns it's upload URL.
|
|
799
813
|
*/
|
|
800
|
-
declare const createFile: <ThrowOnError extends boolean = false>(options: Options<CreateFileData, ThrowOnError>) => RequestResult<{
|
|
801
|
-
|
|
814
|
+
declare const createFile: <ThrowOnError extends boolean = false>(options: Options<CreateFileData, ThrowOnError>) => RequestResult< {
|
|
815
|
+
file: File_2;
|
|
802
816
|
}, {
|
|
803
|
-
|
|
817
|
+
file: File_2;
|
|
804
818
|
}, ThrowOnError>;
|
|
805
819
|
|
|
806
820
|
/**
|
|
@@ -880,10 +894,10 @@ export declare type CreateFileResponses = {
|
|
|
880
894
|
/**
|
|
881
895
|
* Creates a new [Message](#schema_message)
|
|
882
896
|
*/
|
|
883
|
-
declare const createMessage: <ThrowOnError extends boolean = false>(options: Options<CreateMessageData, ThrowOnError>) => RequestResult<{
|
|
884
|
-
|
|
897
|
+
declare const createMessage: <ThrowOnError extends boolean = false>(options: Options<CreateMessageData, ThrowOnError>) => RequestResult< {
|
|
898
|
+
message: Message;
|
|
885
899
|
}, {
|
|
886
|
-
|
|
900
|
+
message: Message;
|
|
887
901
|
}, ThrowOnError>;
|
|
888
902
|
|
|
889
903
|
/**
|
|
@@ -895,6 +909,7 @@ export declare type CreateMessageBody = {
|
|
|
895
909
|
*/
|
|
896
910
|
payload: {
|
|
897
911
|
audioUrl: string;
|
|
912
|
+
fileId?: string;
|
|
898
913
|
type: 'audio';
|
|
899
914
|
} | {
|
|
900
915
|
title: string;
|
|
@@ -937,9 +952,11 @@ export declare type CreateMessageBody = {
|
|
|
937
952
|
} | {
|
|
938
953
|
fileUrl: string;
|
|
939
954
|
title?: string;
|
|
955
|
+
fileId?: string;
|
|
940
956
|
type: 'file';
|
|
941
957
|
} | {
|
|
942
958
|
imageUrl: string;
|
|
959
|
+
fileId?: string;
|
|
943
960
|
type: 'image';
|
|
944
961
|
} | {
|
|
945
962
|
latitude: number;
|
|
@@ -953,6 +970,7 @@ export declare type CreateMessageBody = {
|
|
|
953
970
|
type: 'text';
|
|
954
971
|
} | {
|
|
955
972
|
videoUrl: string;
|
|
973
|
+
fileId?: string;
|
|
956
974
|
type: 'video';
|
|
957
975
|
} | {
|
|
958
976
|
items: Array<{
|
|
@@ -970,22 +988,26 @@ export declare type CreateMessageBody = {
|
|
|
970
988
|
type: 'image';
|
|
971
989
|
payload: {
|
|
972
990
|
imageUrl: string;
|
|
991
|
+
fileId?: string;
|
|
973
992
|
};
|
|
974
993
|
} | {
|
|
975
994
|
type: 'audio';
|
|
976
995
|
payload: {
|
|
977
996
|
audioUrl: string;
|
|
997
|
+
fileId?: string;
|
|
978
998
|
};
|
|
979
999
|
} | {
|
|
980
1000
|
type: 'video';
|
|
981
1001
|
payload: {
|
|
982
1002
|
videoUrl: string;
|
|
1003
|
+
fileId?: string;
|
|
983
1004
|
};
|
|
984
1005
|
} | {
|
|
985
1006
|
type: 'file';
|
|
986
1007
|
payload: {
|
|
987
1008
|
fileUrl: string;
|
|
988
1009
|
title?: string;
|
|
1010
|
+
fileId?: string;
|
|
989
1011
|
};
|
|
990
1012
|
} | {
|
|
991
1013
|
type: 'location';
|
|
@@ -1071,12 +1093,12 @@ export declare const createUser: ({ clientId, apiUrl, adminSecret, customHeaders
|
|
|
1071
1093
|
/**
|
|
1072
1094
|
* Creates a new [User](#schema_user)
|
|
1073
1095
|
*/
|
|
1074
|
-
declare const createUser_2: <ThrowOnError extends boolean = false>(options?: Options<CreateUserData, ThrowOnError>) => RequestResult<{
|
|
1075
|
-
|
|
1076
|
-
|
|
1096
|
+
declare const createUser_2: <ThrowOnError extends boolean = false>(options?: Options<CreateUserData, ThrowOnError>) => RequestResult< {
|
|
1097
|
+
user: User;
|
|
1098
|
+
key: string;
|
|
1077
1099
|
}, {
|
|
1078
|
-
|
|
1079
|
-
|
|
1100
|
+
user: User;
|
|
1101
|
+
key: string;
|
|
1080
1102
|
}, ThrowOnError>;
|
|
1081
1103
|
|
|
1082
1104
|
/**
|
|
@@ -1092,9 +1114,9 @@ export declare type CreateUserBody = {
|
|
|
1092
1114
|
*/
|
|
1093
1115
|
pictureUrl?: string;
|
|
1094
1116
|
/**
|
|
1095
|
-
* User data
|
|
1117
|
+
* User data. An object or a signed JWT token
|
|
1096
1118
|
*/
|
|
1097
|
-
userData?: {};
|
|
1119
|
+
userData?: {} | string;
|
|
1098
1120
|
};
|
|
1099
1121
|
|
|
1100
1122
|
export declare type CreateUserData = {
|
|
@@ -1149,10 +1171,10 @@ declare type Custom = {
|
|
|
1149
1171
|
/**
|
|
1150
1172
|
* Permanently deletes a [Conversation](#schema_conversation). It cannot be undone. Also immediately deletes corresponding [Messages](#schema_message).
|
|
1151
1173
|
*/
|
|
1152
|
-
declare const deleteConversation: <ThrowOnError extends boolean = false>(options: Options<DeleteConversationData, ThrowOnError>) => RequestResult<{
|
|
1153
|
-
|
|
1174
|
+
declare const deleteConversation: <ThrowOnError extends boolean = false>(options: Options<DeleteConversationData, ThrowOnError>) => RequestResult< {
|
|
1175
|
+
[key: string]: never;
|
|
1154
1176
|
}, {
|
|
1155
|
-
|
|
1177
|
+
[key: string]: never;
|
|
1156
1178
|
}, ThrowOnError>;
|
|
1157
1179
|
|
|
1158
1180
|
export declare type DeleteConversationData = {
|
|
@@ -1198,10 +1220,10 @@ export declare type DeleteConversationResponses = {
|
|
|
1198
1220
|
/**
|
|
1199
1221
|
* Permanently deletes a [Message](#schema_message). It cannot be undone.
|
|
1200
1222
|
*/
|
|
1201
|
-
declare const deleteMessage: <ThrowOnError extends boolean = false>(options: Options<DeleteMessageData, ThrowOnError>) => RequestResult<{
|
|
1202
|
-
|
|
1223
|
+
declare const deleteMessage: <ThrowOnError extends boolean = false>(options: Options<DeleteMessageData, ThrowOnError>) => RequestResult< {
|
|
1224
|
+
[key: string]: never;
|
|
1203
1225
|
}, {
|
|
1204
|
-
|
|
1226
|
+
[key: string]: never;
|
|
1205
1227
|
}, ThrowOnError>;
|
|
1206
1228
|
|
|
1207
1229
|
export declare type DeleteMessageData = {
|
|
@@ -1247,10 +1269,10 @@ export declare type DeleteMessageResponses = {
|
|
|
1247
1269
|
/**
|
|
1248
1270
|
* Permanently deletes a [User](#schema_user). It cannot be undone.
|
|
1249
1271
|
*/
|
|
1250
|
-
declare const deleteUser: <ThrowOnError extends boolean = false>(options: Options<DeleteUserData, ThrowOnError>) => RequestResult<{
|
|
1251
|
-
|
|
1272
|
+
declare const deleteUser: <ThrowOnError extends boolean = false>(options: Options<DeleteUserData, ThrowOnError>) => RequestResult< {
|
|
1273
|
+
[key: string]: never;
|
|
1252
1274
|
}, {
|
|
1253
|
-
|
|
1275
|
+
[key: string]: never;
|
|
1254
1276
|
}, ThrowOnError>;
|
|
1255
1277
|
|
|
1256
1278
|
export declare type DeleteUserData = {
|
|
@@ -1341,6 +1363,11 @@ declare type EventMap = {
|
|
|
1341
1363
|
[E in Event_3 as E['type']]: E['data'];
|
|
1342
1364
|
};
|
|
1343
1365
|
|
|
1366
|
+
declare interface EventSourceLike {
|
|
1367
|
+
close(): void;
|
|
1368
|
+
addEventListener(event: string, handler: (event: any) => void): void;
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1344
1371
|
declare type File_2 = {
|
|
1345
1372
|
id: string;
|
|
1346
1373
|
botId: string;
|
|
@@ -1374,10 +1401,10 @@ export declare const generateUserKey: ({ adminSecret, expiresAt, userId, apiUrl,
|
|
|
1374
1401
|
/**
|
|
1375
1402
|
* Generates a new user authentication key. Can only be called by an administrator and when an admin key is configured.
|
|
1376
1403
|
*/
|
|
1377
|
-
declare const generateUserKey_2: <ThrowOnError extends boolean = false>(options?: Options<GenerateUserKeyData, ThrowOnError>) => RequestResult<{
|
|
1378
|
-
|
|
1404
|
+
declare const generateUserKey_2: <ThrowOnError extends boolean = false>(options?: Options<GenerateUserKeyData, ThrowOnError>) => RequestResult< {
|
|
1405
|
+
key: string;
|
|
1379
1406
|
}, {
|
|
1380
|
-
|
|
1407
|
+
key: string;
|
|
1381
1408
|
}, ThrowOnError>;
|
|
1382
1409
|
|
|
1383
1410
|
/**
|
|
@@ -1435,10 +1462,10 @@ export declare type GenerateUserKeyResponses = {
|
|
|
1435
1462
|
/**
|
|
1436
1463
|
* Retrieves the [Conversation](#schema_conversation) object for a valid identifier.
|
|
1437
1464
|
*/
|
|
1438
|
-
declare const getConversation: <ThrowOnError extends boolean = false>(options: Options<GetConversationData, ThrowOnError>) => RequestResult<{
|
|
1439
|
-
|
|
1465
|
+
declare const getConversation: <ThrowOnError extends boolean = false>(options: Options<GetConversationData, ThrowOnError>) => RequestResult< {
|
|
1466
|
+
conversation: Conversation;
|
|
1440
1467
|
}, {
|
|
1441
|
-
|
|
1468
|
+
conversation: Conversation;
|
|
1442
1469
|
}, ThrowOnError>;
|
|
1443
1470
|
|
|
1444
1471
|
export declare type GetConversationData = {
|
|
@@ -1484,10 +1511,10 @@ export declare type GetConversationResponses = {
|
|
|
1484
1511
|
/**
|
|
1485
1512
|
* Retrieves the [Event](#schema_event) object for a valid identifier.
|
|
1486
1513
|
*/
|
|
1487
|
-
declare const getEvent: <ThrowOnError extends boolean = false>(options: Options<GetEventData, ThrowOnError>) => RequestResult<{
|
|
1488
|
-
|
|
1514
|
+
declare const getEvent: <ThrowOnError extends boolean = false>(options: Options<GetEventData, ThrowOnError>) => RequestResult< {
|
|
1515
|
+
event: Event_2;
|
|
1489
1516
|
}, {
|
|
1490
|
-
|
|
1517
|
+
event: Event_2;
|
|
1491
1518
|
}, ThrowOnError>;
|
|
1492
1519
|
|
|
1493
1520
|
export declare type GetEventData = {
|
|
@@ -1533,10 +1560,10 @@ export declare type GetEventResponses = {
|
|
|
1533
1560
|
/**
|
|
1534
1561
|
* Retrieves the [Message](#schema_message) object for a valid identifier.
|
|
1535
1562
|
*/
|
|
1536
|
-
declare const getMessage: <ThrowOnError extends boolean = false>(options: Options<GetMessageData, ThrowOnError>) => RequestResult<{
|
|
1537
|
-
|
|
1563
|
+
declare const getMessage: <ThrowOnError extends boolean = false>(options: Options<GetMessageData, ThrowOnError>) => RequestResult< {
|
|
1564
|
+
message: Message;
|
|
1538
1565
|
}, {
|
|
1539
|
-
|
|
1566
|
+
message: Message;
|
|
1540
1567
|
}, ThrowOnError>;
|
|
1541
1568
|
|
|
1542
1569
|
export declare type GetMessageData = {
|
|
@@ -1582,10 +1609,10 @@ export declare type GetMessageResponses = {
|
|
|
1582
1609
|
/**
|
|
1583
1610
|
* Retrieves a [Participant](#schema_user) from a [Conversation](#schema_conversation).
|
|
1584
1611
|
*/
|
|
1585
|
-
declare const getParticipant: <ThrowOnError extends boolean = false>(options: Options<GetParticipantData, ThrowOnError>) => RequestResult<{
|
|
1586
|
-
|
|
1612
|
+
declare const getParticipant: <ThrowOnError extends boolean = false>(options: Options<GetParticipantData, ThrowOnError>) => RequestResult< {
|
|
1613
|
+
participant: User;
|
|
1587
1614
|
}, {
|
|
1588
|
-
|
|
1615
|
+
participant: User;
|
|
1589
1616
|
}, ThrowOnError>;
|
|
1590
1617
|
|
|
1591
1618
|
export declare type GetParticipantData = {
|
|
@@ -1635,10 +1662,10 @@ export declare type GetParticipantResponses = {
|
|
|
1635
1662
|
/**
|
|
1636
1663
|
* Retrieves the [User](#schema_user) object for a valid identifier.
|
|
1637
1664
|
*/
|
|
1638
|
-
declare const getUser: <ThrowOnError extends boolean = false>(options: Options<GetUserData, ThrowOnError>) => RequestResult<{
|
|
1639
|
-
|
|
1665
|
+
declare const getUser: <ThrowOnError extends boolean = false>(options: Options<GetUserData, ThrowOnError>) => RequestResult< {
|
|
1666
|
+
user: User;
|
|
1640
1667
|
}, {
|
|
1641
|
-
|
|
1668
|
+
user: User;
|
|
1642
1669
|
}, ThrowOnError>;
|
|
1643
1670
|
|
|
1644
1671
|
export declare type GetUserData = {
|
|
@@ -1699,10 +1726,10 @@ export declare const initialize: ({ conversationId, userToken, clientId, apiUrl,
|
|
|
1699
1726
|
/**
|
|
1700
1727
|
* Creates a SSE stream to receive messages and events. The first event will be a payload containing the conversation details.
|
|
1701
1728
|
*/
|
|
1702
|
-
declare const initializeConversation: <ThrowOnError extends boolean = false>(options?: Options<InitializeConversationData, ThrowOnError>) => RequestResult<{
|
|
1703
|
-
|
|
1729
|
+
declare const initializeConversation: <ThrowOnError extends boolean = false>(options?: Options<InitializeConversationData, ThrowOnError>) => RequestResult< {
|
|
1730
|
+
[key: string]: never;
|
|
1704
1731
|
}, {
|
|
1705
|
-
|
|
1732
|
+
[key: string]: never;
|
|
1706
1733
|
}, ThrowOnError>;
|
|
1707
1734
|
|
|
1708
1735
|
export declare type InitializeConversationData = {
|
|
@@ -1772,16 +1799,16 @@ declare class Interceptors<Interceptor> {
|
|
|
1772
1799
|
/**
|
|
1773
1800
|
* Retrieves the conversation's [Messages](#schema_message)
|
|
1774
1801
|
*/
|
|
1775
|
-
declare const listConversationMessages: <ThrowOnError extends boolean = false>(options: Options<ListConversationMessagesData, ThrowOnError>) => RequestResult<{
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1802
|
+
declare const listConversationMessages: <ThrowOnError extends boolean = false>(options: Options<ListConversationMessagesData, ThrowOnError>) => RequestResult< {
|
|
1803
|
+
messages: Array<Message>;
|
|
1804
|
+
meta: {
|
|
1805
|
+
nextToken?: string;
|
|
1806
|
+
};
|
|
1780
1807
|
}, {
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1808
|
+
messages: Array<Message>;
|
|
1809
|
+
meta: {
|
|
1810
|
+
nextToken?: string;
|
|
1811
|
+
};
|
|
1785
1812
|
}, ThrowOnError>;
|
|
1786
1813
|
|
|
1787
1814
|
export declare type ListConversationMessagesData = {
|
|
@@ -1844,276 +1871,292 @@ export declare type ListConversationMessagesResponses = {
|
|
|
1844
1871
|
/**
|
|
1845
1872
|
* Returns a list of [Conversation](#schema_conversation) objects
|
|
1846
1873
|
*/
|
|
1847
|
-
declare const listConversations: <ThrowOnError extends boolean = false>(options: Options<ListConversationsData, ThrowOnError>) => RequestResult<{
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1874
|
+
declare const listConversations: <ThrowOnError extends boolean = false>(options: Options<ListConversationsData, ThrowOnError>) => RequestResult< {
|
|
1875
|
+
conversations: Array<{
|
|
1876
|
+
id: string;
|
|
1877
|
+
createdAt: string;
|
|
1878
|
+
updatedAt: string;
|
|
1879
|
+
lastMessage?: {
|
|
1880
|
+
id: string;
|
|
1881
|
+
createdAt: string;
|
|
1882
|
+
payload: {
|
|
1883
|
+
audioUrl: string;
|
|
1884
|
+
fileId?: string;
|
|
1885
|
+
type: "audio";
|
|
1886
|
+
} | {
|
|
1887
|
+
title: string;
|
|
1888
|
+
subtitle?: string;
|
|
1889
|
+
imageUrl?: string;
|
|
1890
|
+
actions: Array<{
|
|
1891
|
+
action: "postback" | "url" | "say";
|
|
1892
|
+
label: string;
|
|
1893
|
+
value: string;
|
|
1894
|
+
}>;
|
|
1895
|
+
type: "card";
|
|
1896
|
+
} | {
|
|
1897
|
+
items: Array<{
|
|
1898
|
+
title: string;
|
|
1899
|
+
subtitle?: string;
|
|
1900
|
+
imageUrl?: string;
|
|
1901
|
+
actions: Array<{
|
|
1902
|
+
action: "postback" | "url" | "say";
|
|
1903
|
+
label: string;
|
|
1904
|
+
value: string;
|
|
1905
|
+
}>;
|
|
1906
|
+
}>;
|
|
1907
|
+
type: "carousel";
|
|
1908
|
+
} | {
|
|
1909
|
+
text: string;
|
|
1910
|
+
options: Array<{
|
|
1911
|
+
label: string;
|
|
1912
|
+
value: string;
|
|
1913
|
+
}>;
|
|
1914
|
+
disableFreeText?: boolean;
|
|
1915
|
+
type: "choice";
|
|
1916
|
+
} | {
|
|
1917
|
+
text: string;
|
|
1918
|
+
options: Array<{
|
|
1919
|
+
label: string;
|
|
1920
|
+
value: string;
|
|
1921
|
+
}>;
|
|
1922
|
+
disableFreeText?: boolean;
|
|
1923
|
+
type: "dropdown";
|
|
1924
|
+
} | {
|
|
1925
|
+
fileUrl: string;
|
|
1926
|
+
title?: string;
|
|
1927
|
+
fileId?: string;
|
|
1928
|
+
type: "file";
|
|
1929
|
+
} | {
|
|
1930
|
+
imageUrl: string;
|
|
1931
|
+
fileId?: string;
|
|
1932
|
+
type: "image";
|
|
1933
|
+
} | {
|
|
1934
|
+
latitude: number;
|
|
1935
|
+
longitude: number;
|
|
1936
|
+
address?: string;
|
|
1937
|
+
title?: string;
|
|
1938
|
+
type: "location";
|
|
1939
|
+
} | {
|
|
1940
|
+
text: string;
|
|
1941
|
+
value?: string;
|
|
1942
|
+
type: "text";
|
|
1943
|
+
} | {
|
|
1944
|
+
videoUrl: string;
|
|
1945
|
+
fileId?: string;
|
|
1946
|
+
type: "video";
|
|
1947
|
+
} | {
|
|
1948
|
+
items: Array<{
|
|
1949
|
+
type: "text";
|
|
1950
|
+
payload: {
|
|
1951
|
+
text: string;
|
|
1952
|
+
value?: string;
|
|
1953
|
+
};
|
|
1954
|
+
} | {
|
|
1955
|
+
type: "markdown";
|
|
1956
|
+
payload: {
|
|
1957
|
+
markdown: string;
|
|
1958
|
+
};
|
|
1959
|
+
} | {
|
|
1960
|
+
type: "image";
|
|
1961
|
+
payload: {
|
|
1962
|
+
imageUrl: string;
|
|
1963
|
+
fileId?: string;
|
|
1964
|
+
};
|
|
1965
|
+
} | {
|
|
1966
|
+
type: "audio";
|
|
1967
|
+
payload: {
|
|
1968
|
+
audioUrl: string;
|
|
1969
|
+
fileId?: string;
|
|
1970
|
+
};
|
|
1971
|
+
} | {
|
|
1972
|
+
type: "video";
|
|
1973
|
+
payload: {
|
|
1974
|
+
videoUrl: string;
|
|
1975
|
+
fileId?: string;
|
|
1976
|
+
};
|
|
1977
|
+
} | {
|
|
1978
|
+
type: "file";
|
|
1979
|
+
payload: {
|
|
1980
|
+
fileUrl: string;
|
|
1981
|
+
title?: string;
|
|
1982
|
+
fileId?: string;
|
|
1983
|
+
};
|
|
1984
|
+
} | {
|
|
1985
|
+
type: "location";
|
|
1986
|
+
payload: {
|
|
1987
|
+
latitude: number;
|
|
1988
|
+
longitude: number;
|
|
1989
|
+
address?: string;
|
|
1990
|
+
title?: string;
|
|
1991
|
+
};
|
|
1992
|
+
}>;
|
|
1993
|
+
type: "bloc";
|
|
1994
|
+
} | {
|
|
1995
|
+
markdown: string;
|
|
1996
|
+
type: "markdown";
|
|
1997
|
+
} | {
|
|
1998
|
+
url: string;
|
|
1999
|
+
name: string;
|
|
2000
|
+
data?: unknown;
|
|
2001
|
+
type: "custom";
|
|
2002
|
+
};
|
|
2003
|
+
userId: string;
|
|
2004
|
+
conversationId: string;
|
|
2005
|
+
metadata?: {};
|
|
2006
|
+
replyTo?: string;
|
|
2007
|
+
selectedBy?: string;
|
|
2008
|
+
feedback?: {
|
|
2009
|
+
value: "positive" | "negative";
|
|
2010
|
+
comment?: string;
|
|
2011
|
+
};
|
|
2012
|
+
};
|
|
2013
|
+
}>;
|
|
2014
|
+
meta: {
|
|
2015
|
+
nextToken?: string;
|
|
2016
|
+
};
|
|
1982
2017
|
}, {
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2018
|
+
conversations: Array<{
|
|
2019
|
+
id: string;
|
|
2020
|
+
createdAt: string;
|
|
2021
|
+
updatedAt: string;
|
|
2022
|
+
lastMessage?: {
|
|
2023
|
+
id: string;
|
|
2024
|
+
createdAt: string;
|
|
2025
|
+
payload: {
|
|
2026
|
+
audioUrl: string;
|
|
2027
|
+
fileId?: string;
|
|
2028
|
+
type: "audio";
|
|
2029
|
+
} | {
|
|
2030
|
+
title: string;
|
|
2031
|
+
subtitle?: string;
|
|
2032
|
+
imageUrl?: string;
|
|
2033
|
+
actions: Array<{
|
|
2034
|
+
action: "postback" | "url" | "say";
|
|
2035
|
+
label: string;
|
|
2036
|
+
value: string;
|
|
2037
|
+
}>;
|
|
2038
|
+
type: "card";
|
|
2039
|
+
} | {
|
|
2040
|
+
items: Array<{
|
|
2041
|
+
title: string;
|
|
2042
|
+
subtitle?: string;
|
|
2043
|
+
imageUrl?: string;
|
|
2044
|
+
actions: Array<{
|
|
2045
|
+
action: "postback" | "url" | "say";
|
|
2046
|
+
label: string;
|
|
2047
|
+
value: string;
|
|
2048
|
+
}>;
|
|
2049
|
+
}>;
|
|
2050
|
+
type: "carousel";
|
|
2051
|
+
} | {
|
|
2052
|
+
text: string;
|
|
2053
|
+
options: Array<{
|
|
2054
|
+
label: string;
|
|
2055
|
+
value: string;
|
|
2056
|
+
}>;
|
|
2057
|
+
disableFreeText?: boolean;
|
|
2058
|
+
type: "choice";
|
|
2059
|
+
} | {
|
|
2060
|
+
text: string;
|
|
2061
|
+
options: Array<{
|
|
2062
|
+
label: string;
|
|
2063
|
+
value: string;
|
|
2064
|
+
}>;
|
|
2065
|
+
disableFreeText?: boolean;
|
|
2066
|
+
type: "dropdown";
|
|
2067
|
+
} | {
|
|
2068
|
+
fileUrl: string;
|
|
2069
|
+
title?: string;
|
|
2070
|
+
fileId?: string;
|
|
2071
|
+
type: "file";
|
|
2072
|
+
} | {
|
|
2073
|
+
imageUrl: string;
|
|
2074
|
+
fileId?: string;
|
|
2075
|
+
type: "image";
|
|
2076
|
+
} | {
|
|
2077
|
+
latitude: number;
|
|
2078
|
+
longitude: number;
|
|
2079
|
+
address?: string;
|
|
2080
|
+
title?: string;
|
|
2081
|
+
type: "location";
|
|
2082
|
+
} | {
|
|
2083
|
+
text: string;
|
|
2084
|
+
value?: string;
|
|
2085
|
+
type: "text";
|
|
2086
|
+
} | {
|
|
2087
|
+
videoUrl: string;
|
|
2088
|
+
fileId?: string;
|
|
2089
|
+
type: "video";
|
|
2090
|
+
} | {
|
|
2091
|
+
items: Array<{
|
|
2092
|
+
type: "text";
|
|
2093
|
+
payload: {
|
|
2094
|
+
text: string;
|
|
2095
|
+
value?: string;
|
|
2096
|
+
};
|
|
2097
|
+
} | {
|
|
2098
|
+
type: "markdown";
|
|
2099
|
+
payload: {
|
|
2100
|
+
markdown: string;
|
|
2101
|
+
};
|
|
2102
|
+
} | {
|
|
2103
|
+
type: "image";
|
|
2104
|
+
payload: {
|
|
2105
|
+
imageUrl: string;
|
|
2106
|
+
fileId?: string;
|
|
2107
|
+
};
|
|
2108
|
+
} | {
|
|
2109
|
+
type: "audio";
|
|
2110
|
+
payload: {
|
|
2111
|
+
audioUrl: string;
|
|
2112
|
+
fileId?: string;
|
|
2113
|
+
};
|
|
2114
|
+
} | {
|
|
2115
|
+
type: "video";
|
|
2116
|
+
payload: {
|
|
2117
|
+
videoUrl: string;
|
|
2118
|
+
fileId?: string;
|
|
2119
|
+
};
|
|
2120
|
+
} | {
|
|
2121
|
+
type: "file";
|
|
2122
|
+
payload: {
|
|
2123
|
+
fileUrl: string;
|
|
2124
|
+
title?: string;
|
|
2125
|
+
fileId?: string;
|
|
2126
|
+
};
|
|
2127
|
+
} | {
|
|
2128
|
+
type: "location";
|
|
2129
|
+
payload: {
|
|
2130
|
+
latitude: number;
|
|
2131
|
+
longitude: number;
|
|
2132
|
+
address?: string;
|
|
2133
|
+
title?: string;
|
|
2134
|
+
};
|
|
2135
|
+
}>;
|
|
2136
|
+
type: "bloc";
|
|
2137
|
+
} | {
|
|
2138
|
+
markdown: string;
|
|
2139
|
+
type: "markdown";
|
|
2140
|
+
} | {
|
|
2141
|
+
url: string;
|
|
2142
|
+
name: string;
|
|
2143
|
+
data?: unknown;
|
|
2144
|
+
type: "custom";
|
|
2145
|
+
};
|
|
2146
|
+
userId: string;
|
|
2147
|
+
conversationId: string;
|
|
2148
|
+
metadata?: {};
|
|
2149
|
+
replyTo?: string;
|
|
2150
|
+
selectedBy?: string;
|
|
2151
|
+
feedback?: {
|
|
2152
|
+
value: "positive" | "negative";
|
|
2153
|
+
comment?: string;
|
|
2154
|
+
};
|
|
2155
|
+
};
|
|
2156
|
+
}>;
|
|
2157
|
+
meta: {
|
|
2158
|
+
nextToken?: string;
|
|
2159
|
+
};
|
|
2117
2160
|
}, ThrowOnError>;
|
|
2118
2161
|
|
|
2119
2162
|
export declare type ListConversationsData = {
|
|
@@ -2171,6 +2214,7 @@ export declare type ListConversationsErrors = {
|
|
|
2171
2214
|
*/
|
|
2172
2215
|
payload: {
|
|
2173
2216
|
audioUrl: string;
|
|
2217
|
+
fileId?: string;
|
|
2174
2218
|
type: 'audio';
|
|
2175
2219
|
} | {
|
|
2176
2220
|
title: string;
|
|
@@ -2213,9 +2257,11 @@ export declare type ListConversationsErrors = {
|
|
|
2213
2257
|
} | {
|
|
2214
2258
|
fileUrl: string;
|
|
2215
2259
|
title?: string;
|
|
2260
|
+
fileId?: string;
|
|
2216
2261
|
type: 'file';
|
|
2217
2262
|
} | {
|
|
2218
2263
|
imageUrl: string;
|
|
2264
|
+
fileId?: string;
|
|
2219
2265
|
type: 'image';
|
|
2220
2266
|
} | {
|
|
2221
2267
|
latitude: number;
|
|
@@ -2229,6 +2275,7 @@ export declare type ListConversationsErrors = {
|
|
|
2229
2275
|
type: 'text';
|
|
2230
2276
|
} | {
|
|
2231
2277
|
videoUrl: string;
|
|
2278
|
+
fileId?: string;
|
|
2232
2279
|
type: 'video';
|
|
2233
2280
|
} | {
|
|
2234
2281
|
items: Array<{
|
|
@@ -2246,22 +2293,26 @@ export declare type ListConversationsErrors = {
|
|
|
2246
2293
|
type: 'image';
|
|
2247
2294
|
payload: {
|
|
2248
2295
|
imageUrl: string;
|
|
2296
|
+
fileId?: string;
|
|
2249
2297
|
};
|
|
2250
2298
|
} | {
|
|
2251
2299
|
type: 'audio';
|
|
2252
2300
|
payload: {
|
|
2253
2301
|
audioUrl: string;
|
|
2302
|
+
fileId?: string;
|
|
2254
2303
|
};
|
|
2255
2304
|
} | {
|
|
2256
2305
|
type: 'video';
|
|
2257
2306
|
payload: {
|
|
2258
2307
|
videoUrl: string;
|
|
2308
|
+
fileId?: string;
|
|
2259
2309
|
};
|
|
2260
2310
|
} | {
|
|
2261
2311
|
type: 'file';
|
|
2262
2312
|
payload: {
|
|
2263
2313
|
fileUrl: string;
|
|
2264
2314
|
title?: string;
|
|
2315
|
+
fileId?: string;
|
|
2265
2316
|
};
|
|
2266
2317
|
} | {
|
|
2267
2318
|
type: 'location';
|
|
@@ -2357,6 +2408,7 @@ export declare type ListConversationsResponses = {
|
|
|
2357
2408
|
*/
|
|
2358
2409
|
payload: {
|
|
2359
2410
|
audioUrl: string;
|
|
2411
|
+
fileId?: string;
|
|
2360
2412
|
type: 'audio';
|
|
2361
2413
|
} | {
|
|
2362
2414
|
title: string;
|
|
@@ -2399,9 +2451,11 @@ export declare type ListConversationsResponses = {
|
|
|
2399
2451
|
} | {
|
|
2400
2452
|
fileUrl: string;
|
|
2401
2453
|
title?: string;
|
|
2454
|
+
fileId?: string;
|
|
2402
2455
|
type: 'file';
|
|
2403
2456
|
} | {
|
|
2404
2457
|
imageUrl: string;
|
|
2458
|
+
fileId?: string;
|
|
2405
2459
|
type: 'image';
|
|
2406
2460
|
} | {
|
|
2407
2461
|
latitude: number;
|
|
@@ -2415,6 +2469,7 @@ export declare type ListConversationsResponses = {
|
|
|
2415
2469
|
type: 'text';
|
|
2416
2470
|
} | {
|
|
2417
2471
|
videoUrl: string;
|
|
2472
|
+
fileId?: string;
|
|
2418
2473
|
type: 'video';
|
|
2419
2474
|
} | {
|
|
2420
2475
|
items: Array<{
|
|
@@ -2432,22 +2487,26 @@ export declare type ListConversationsResponses = {
|
|
|
2432
2487
|
type: 'image';
|
|
2433
2488
|
payload: {
|
|
2434
2489
|
imageUrl: string;
|
|
2490
|
+
fileId?: string;
|
|
2435
2491
|
};
|
|
2436
2492
|
} | {
|
|
2437
2493
|
type: 'audio';
|
|
2438
2494
|
payload: {
|
|
2439
2495
|
audioUrl: string;
|
|
2496
|
+
fileId?: string;
|
|
2440
2497
|
};
|
|
2441
2498
|
} | {
|
|
2442
2499
|
type: 'video';
|
|
2443
2500
|
payload: {
|
|
2444
2501
|
videoUrl: string;
|
|
2502
|
+
fileId?: string;
|
|
2445
2503
|
};
|
|
2446
2504
|
} | {
|
|
2447
2505
|
type: 'file';
|
|
2448
2506
|
payload: {
|
|
2449
2507
|
fileUrl: string;
|
|
2450
2508
|
title?: string;
|
|
2509
|
+
fileId?: string;
|
|
2451
2510
|
};
|
|
2452
2511
|
} | {
|
|
2453
2512
|
type: 'location';
|
|
@@ -2509,10 +2568,10 @@ export declare type ListConversationsResponses = {
|
|
|
2509
2568
|
/**
|
|
2510
2569
|
* Creates a SSE stream to receive messages and events from a conversation
|
|
2511
2570
|
*/
|
|
2512
|
-
declare const listenConversation: <ThrowOnError extends boolean = false>(options: Options<ListenConversationData, ThrowOnError>) => RequestResult<{
|
|
2513
|
-
|
|
2571
|
+
declare const listenConversation: <ThrowOnError extends boolean = false>(options: Options<ListenConversationData, ThrowOnError>) => RequestResult< {
|
|
2572
|
+
[key: string]: never;
|
|
2514
2573
|
}, {
|
|
2515
|
-
|
|
2574
|
+
[key: string]: never;
|
|
2516
2575
|
}, ThrowOnError>;
|
|
2517
2576
|
|
|
2518
2577
|
export declare type ListenConversationData = {
|
|
@@ -2558,16 +2617,16 @@ export declare type ListenConversationResponses = {
|
|
|
2558
2617
|
/**
|
|
2559
2618
|
* Retrieves a list of [Participants](#schema_user) for a given [Conversation](#schema_conversation).
|
|
2560
2619
|
*/
|
|
2561
|
-
declare const listParticipants: <ThrowOnError extends boolean = false>(options: Options<ListParticipantsData, ThrowOnError>) => RequestResult<{
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2620
|
+
declare const listParticipants: <ThrowOnError extends boolean = false>(options: Options<ListParticipantsData, ThrowOnError>) => RequestResult< {
|
|
2621
|
+
participants: Array<User>;
|
|
2622
|
+
meta: {
|
|
2623
|
+
nextToken?: string;
|
|
2624
|
+
};
|
|
2566
2625
|
}, {
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2626
|
+
participants: Array<User>;
|
|
2627
|
+
meta: {
|
|
2628
|
+
nextToken?: string;
|
|
2629
|
+
};
|
|
2571
2630
|
}, ThrowOnError>;
|
|
2572
2631
|
|
|
2573
2632
|
export declare type ListParticipantsData = {
|
|
@@ -2644,6 +2703,7 @@ export declare type Message = {
|
|
|
2644
2703
|
*/
|
|
2645
2704
|
payload: {
|
|
2646
2705
|
audioUrl: string;
|
|
2706
|
+
fileId?: string;
|
|
2647
2707
|
type: 'audio';
|
|
2648
2708
|
} | {
|
|
2649
2709
|
title: string;
|
|
@@ -2686,9 +2746,11 @@ export declare type Message = {
|
|
|
2686
2746
|
} | {
|
|
2687
2747
|
fileUrl: string;
|
|
2688
2748
|
title?: string;
|
|
2749
|
+
fileId?: string;
|
|
2689
2750
|
type: 'file';
|
|
2690
2751
|
} | {
|
|
2691
2752
|
imageUrl: string;
|
|
2753
|
+
fileId?: string;
|
|
2692
2754
|
type: 'image';
|
|
2693
2755
|
} | {
|
|
2694
2756
|
latitude: number;
|
|
@@ -2702,6 +2764,7 @@ export declare type Message = {
|
|
|
2702
2764
|
type: 'text';
|
|
2703
2765
|
} | {
|
|
2704
2766
|
videoUrl: string;
|
|
2767
|
+
fileId?: string;
|
|
2705
2768
|
type: 'video';
|
|
2706
2769
|
} | {
|
|
2707
2770
|
items: Array<{
|
|
@@ -2719,22 +2782,26 @@ export declare type Message = {
|
|
|
2719
2782
|
type: 'image';
|
|
2720
2783
|
payload: {
|
|
2721
2784
|
imageUrl: string;
|
|
2785
|
+
fileId?: string;
|
|
2722
2786
|
};
|
|
2723
2787
|
} | {
|
|
2724
2788
|
type: 'audio';
|
|
2725
2789
|
payload: {
|
|
2726
2790
|
audioUrl: string;
|
|
2791
|
+
fileId?: string;
|
|
2727
2792
|
};
|
|
2728
2793
|
} | {
|
|
2729
2794
|
type: 'video';
|
|
2730
2795
|
payload: {
|
|
2731
2796
|
videoUrl: string;
|
|
2797
|
+
fileId?: string;
|
|
2732
2798
|
};
|
|
2733
2799
|
} | {
|
|
2734
2800
|
type: 'file';
|
|
2735
2801
|
payload: {
|
|
2736
2802
|
fileUrl: string;
|
|
2737
2803
|
title?: string;
|
|
2804
|
+
fileId?: string;
|
|
2738
2805
|
};
|
|
2739
2806
|
} | {
|
|
2740
2807
|
type: 'location';
|
|
@@ -3444,10 +3511,10 @@ declare interface QuerySerializerOptions {
|
|
|
3444
3511
|
/**
|
|
3445
3512
|
* Removes feedback from a [Message](#schema_message).
|
|
3446
3513
|
*/
|
|
3447
|
-
declare const removeMessageFeedback: <ThrowOnError extends boolean = false>(options: Options<RemoveMessageFeedbackData, ThrowOnError>) => RequestResult<{
|
|
3448
|
-
|
|
3514
|
+
declare const removeMessageFeedback: <ThrowOnError extends boolean = false>(options: Options<RemoveMessageFeedbackData, ThrowOnError>) => RequestResult< {
|
|
3515
|
+
[key: string]: never;
|
|
3449
3516
|
}, {
|
|
3450
|
-
|
|
3517
|
+
[key: string]: never;
|
|
3451
3518
|
}, ThrowOnError>;
|
|
3452
3519
|
|
|
3453
3520
|
export declare type RemoveMessageFeedbackData = {
|
|
@@ -3493,10 +3560,10 @@ export declare type RemoveMessageFeedbackResponses = {
|
|
|
3493
3560
|
/**
|
|
3494
3561
|
* Remove a [Participant](#schema_user) from a [Conversation](#schema_conversation).
|
|
3495
3562
|
*/
|
|
3496
|
-
declare const removeParticipant: <ThrowOnError extends boolean = false>(options: Options<RemoveParticipantData, ThrowOnError>) => RequestResult<{
|
|
3497
|
-
|
|
3563
|
+
declare const removeParticipant: <ThrowOnError extends boolean = false>(options: Options<RemoveParticipantData, ThrowOnError>) => RequestResult< {
|
|
3564
|
+
[key: string]: never;
|
|
3498
3565
|
}, {
|
|
3499
|
-
|
|
3566
|
+
[key: string]: never;
|
|
3500
3567
|
}, ThrowOnError>;
|
|
3501
3568
|
|
|
3502
3569
|
export declare type RemoveParticipantData = {
|
|
@@ -3585,10 +3652,10 @@ declare type ResInterceptor<Res, Req, Options> = (response: Res, request: Req, o
|
|
|
3585
3652
|
/**
|
|
3586
3653
|
* Updates a [Message](#schema_message) sent by any user to mark it as already selected. A message can only be selected once.
|
|
3587
3654
|
*/
|
|
3588
|
-
declare const selectMessage: <ThrowOnError extends boolean = false>(options: Options<SelectMessageData, ThrowOnError>) => RequestResult<{
|
|
3589
|
-
|
|
3655
|
+
declare const selectMessage: <ThrowOnError extends boolean = false>(options: Options<SelectMessageData, ThrowOnError>) => RequestResult< {
|
|
3656
|
+
[key: string]: never;
|
|
3590
3657
|
}, {
|
|
3591
|
-
|
|
3658
|
+
[key: string]: never;
|
|
3592
3659
|
}, ThrowOnError>;
|
|
3593
3660
|
|
|
3594
3661
|
/**
|
|
@@ -3648,10 +3715,10 @@ export declare const sendPerfMetrics: (clientId: string, body: ClientTypes_2.Sen
|
|
|
3648
3715
|
/**
|
|
3649
3716
|
* Sends performance metrics to the server.
|
|
3650
3717
|
*/
|
|
3651
|
-
declare const sendPerfMetrics_2: <ThrowOnError extends boolean = false>(options?: Options<SendPerfMetricsData, ThrowOnError>) => RequestResult<{
|
|
3652
|
-
|
|
3718
|
+
declare const sendPerfMetrics_2: <ThrowOnError extends boolean = false>(options?: Options<SendPerfMetricsData, ThrowOnError>) => RequestResult< {
|
|
3719
|
+
[key: string]: never;
|
|
3653
3720
|
}, {
|
|
3654
|
-
|
|
3721
|
+
[key: string]: never;
|
|
3655
3722
|
}, ThrowOnError>;
|
|
3656
3723
|
|
|
3657
3724
|
/**
|
|
@@ -3728,10 +3795,10 @@ declare type TypingStopped = {
|
|
|
3728
3795
|
/**
|
|
3729
3796
|
* Updates a [Message](#schema_message). The bot won't be aware of the changes.
|
|
3730
3797
|
*/
|
|
3731
|
-
declare const updateMessage: <ThrowOnError extends boolean = false>(options: Options<UpdateMessageData, ThrowOnError>) => RequestResult<{
|
|
3732
|
-
|
|
3798
|
+
declare const updateMessage: <ThrowOnError extends boolean = false>(options: Options<UpdateMessageData, ThrowOnError>) => RequestResult< {
|
|
3799
|
+
message: Message;
|
|
3733
3800
|
}, {
|
|
3734
|
-
|
|
3801
|
+
message: Message;
|
|
3735
3802
|
}, ThrowOnError>;
|
|
3736
3803
|
|
|
3737
3804
|
/**
|
|
@@ -3743,6 +3810,7 @@ export declare type UpdateMessageBody = {
|
|
|
3743
3810
|
*/
|
|
3744
3811
|
payload?: {
|
|
3745
3812
|
audioUrl: string;
|
|
3813
|
+
fileId?: string;
|
|
3746
3814
|
type: 'audio';
|
|
3747
3815
|
} | {
|
|
3748
3816
|
title: string;
|
|
@@ -3785,9 +3853,11 @@ export declare type UpdateMessageBody = {
|
|
|
3785
3853
|
} | {
|
|
3786
3854
|
fileUrl: string;
|
|
3787
3855
|
title?: string;
|
|
3856
|
+
fileId?: string;
|
|
3788
3857
|
type: 'file';
|
|
3789
3858
|
} | {
|
|
3790
3859
|
imageUrl: string;
|
|
3860
|
+
fileId?: string;
|
|
3791
3861
|
type: 'image';
|
|
3792
3862
|
} | {
|
|
3793
3863
|
latitude: number;
|
|
@@ -3801,6 +3871,7 @@ export declare type UpdateMessageBody = {
|
|
|
3801
3871
|
type: 'text';
|
|
3802
3872
|
} | {
|
|
3803
3873
|
videoUrl: string;
|
|
3874
|
+
fileId?: string;
|
|
3804
3875
|
type: 'video';
|
|
3805
3876
|
} | {
|
|
3806
3877
|
items: Array<{
|
|
@@ -3818,22 +3889,26 @@ export declare type UpdateMessageBody = {
|
|
|
3818
3889
|
type: 'image';
|
|
3819
3890
|
payload: {
|
|
3820
3891
|
imageUrl: string;
|
|
3892
|
+
fileId?: string;
|
|
3821
3893
|
};
|
|
3822
3894
|
} | {
|
|
3823
3895
|
type: 'audio';
|
|
3824
3896
|
payload: {
|
|
3825
3897
|
audioUrl: string;
|
|
3898
|
+
fileId?: string;
|
|
3826
3899
|
};
|
|
3827
3900
|
} | {
|
|
3828
3901
|
type: 'video';
|
|
3829
3902
|
payload: {
|
|
3830
3903
|
videoUrl: string;
|
|
3904
|
+
fileId?: string;
|
|
3831
3905
|
};
|
|
3832
3906
|
} | {
|
|
3833
3907
|
type: 'file';
|
|
3834
3908
|
payload: {
|
|
3835
3909
|
fileUrl: string;
|
|
3836
3910
|
title?: string;
|
|
3911
|
+
fileId?: string;
|
|
3837
3912
|
};
|
|
3838
3913
|
} | {
|
|
3839
3914
|
type: 'location';
|
|
@@ -3906,10 +3981,10 @@ export declare type UpdateMessageResponses = {
|
|
|
3906
3981
|
/**
|
|
3907
3982
|
* Update [User](#schema_user)
|
|
3908
3983
|
*/
|
|
3909
|
-
declare const updateUser: <ThrowOnError extends boolean = false>(options: Options<UpdateUserData, ThrowOnError>) => RequestResult<{
|
|
3910
|
-
|
|
3984
|
+
declare const updateUser: <ThrowOnError extends boolean = false>(options: Options<UpdateUserData, ThrowOnError>) => RequestResult< {
|
|
3985
|
+
user: User;
|
|
3911
3986
|
}, {
|
|
3912
|
-
|
|
3987
|
+
user: User;
|
|
3913
3988
|
}, ThrowOnError>;
|
|
3914
3989
|
|
|
3915
3990
|
/**
|
|
@@ -3925,9 +4000,9 @@ export declare type UpdateUserBody = {
|
|
|
3925
4000
|
*/
|
|
3926
4001
|
pictureUrl?: string;
|
|
3927
4002
|
/**
|
|
3928
|
-
* User data
|
|
4003
|
+
* User data. An object or a signed JWT token
|
|
3929
4004
|
*/
|
|
3930
|
-
userData?: {} | null;
|
|
4005
|
+
userData?: {} | string | null;
|
|
3931
4006
|
};
|
|
3932
4007
|
|
|
3933
4008
|
export declare type UpdateUserData = {
|