crisp-api 10.8.2 → 10.8.3
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/dist/crisp.js
CHANGED
|
@@ -87,6 +87,7 @@ export interface ConversationParticipants {
|
|
|
87
87
|
}
|
|
88
88
|
export interface ConversationParticipantsSave {
|
|
89
89
|
participants?: ConversationParticipant[];
|
|
90
|
+
user?: ConversationMessageUser;
|
|
90
91
|
}
|
|
91
92
|
export interface ConversationMeta {
|
|
92
93
|
nickname?: string;
|
|
@@ -585,7 +586,7 @@ declare class WebsiteConversation extends BaseResource {
|
|
|
585
586
|
/**
|
|
586
587
|
* Change Conversation State
|
|
587
588
|
*/
|
|
588
|
-
changeConversationState(websiteID: string, sessionID: string, state: ConversationState): Promise<any>;
|
|
589
|
+
changeConversationState(websiteID: string, sessionID: string, state: ConversationState, user?: ConversationMessageUser): Promise<any>;
|
|
589
590
|
/**
|
|
590
591
|
* Get Conversation Relations
|
|
591
592
|
*/
|
|
@@ -605,7 +606,7 @@ declare class WebsiteConversation extends BaseResource {
|
|
|
605
606
|
/**
|
|
606
607
|
* Block Incoming Messages For Conversation
|
|
607
608
|
*/
|
|
608
|
-
blockIncomingMessagesForConversation(websiteID: string, sessionID: string, blocked: boolean): Promise<any>;
|
|
609
|
+
blockIncomingMessagesForConversation(websiteID: string, sessionID: string, blocked: boolean, user?: ConversationMessageUser): Promise<any>;
|
|
609
610
|
/**
|
|
610
611
|
* Get Verify Status For Conversation
|
|
611
612
|
*/
|
|
@@ -653,7 +654,7 @@ declare class WebsiteConversation extends BaseResource {
|
|
|
653
654
|
/**
|
|
654
655
|
* Initiate New Call Session For Conversation
|
|
655
656
|
*/
|
|
656
|
-
initiateNewCallSessionForConversation(websiteID: string, sessionID: string, mode: string): Promise<any>;
|
|
657
|
+
initiateNewCallSessionForConversation(websiteID: string, sessionID: string, mode: string, user?: ConversationMessageUser): Promise<any>;
|
|
657
658
|
/**
|
|
658
659
|
* Get Ongoing Call Session For Conversation
|
|
659
660
|
*/
|
|
@@ -661,7 +662,7 @@ declare class WebsiteConversation extends BaseResource {
|
|
|
661
662
|
/**
|
|
662
663
|
* Abort Ongoing Call Session For Conversation
|
|
663
664
|
*/
|
|
664
|
-
abortOngoingCallSessionForConversation(websiteID: string, sessionID: string, callID: string): Promise<any>;
|
|
665
|
+
abortOngoingCallSessionForConversation(websiteID: string, sessionID: string, callID: string, user?: ConversationMessageUser): Promise<any>;
|
|
665
666
|
/**
|
|
666
667
|
* Transmit Signaling On Ongoing Call Session
|
|
667
668
|
*/
|
|
@@ -681,7 +682,7 @@ declare class WebsiteConversation extends BaseResource {
|
|
|
681
682
|
/**
|
|
682
683
|
* Schedule A Reminder For Conversation
|
|
683
684
|
*/
|
|
684
|
-
scheduleReminderForConversation(websiteID: string, sessionID: string, date: string, note: string): Promise<any>;
|
|
685
|
+
scheduleReminderForConversation(websiteID: string, sessionID: string, date: string, note: string, user?: ConversationMessageUser): Promise<any>;
|
|
685
686
|
/**
|
|
686
687
|
* Report Conversation
|
|
687
688
|
*/
|
|
@@ -334,11 +334,12 @@ class WebsiteConversation extends BaseResource_1.default {
|
|
|
334
334
|
/**
|
|
335
335
|
* Change Conversation State
|
|
336
336
|
*/
|
|
337
|
-
changeConversationState(websiteID, sessionID, state) {
|
|
337
|
+
changeConversationState(websiteID, sessionID, state, user) {
|
|
338
338
|
return this.crisp.patch(this.crisp.prepareRestUrl([
|
|
339
339
|
"website", websiteID, "conversation", sessionID, "state"
|
|
340
340
|
]), null, {
|
|
341
|
-
state: state
|
|
341
|
+
state: state,
|
|
342
|
+
user: user
|
|
342
343
|
});
|
|
343
344
|
}
|
|
344
345
|
;
|
|
@@ -381,11 +382,12 @@ class WebsiteConversation extends BaseResource_1.default {
|
|
|
381
382
|
/**
|
|
382
383
|
* Block Incoming Messages For Conversation
|
|
383
384
|
*/
|
|
384
|
-
blockIncomingMessagesForConversation(websiteID, sessionID, blocked) {
|
|
385
|
+
blockIncomingMessagesForConversation(websiteID, sessionID, blocked, user) {
|
|
385
386
|
return this.crisp.patch(this.crisp.prepareRestUrl([
|
|
386
387
|
"website", websiteID, "conversation", sessionID, "block"
|
|
387
388
|
]), null, {
|
|
388
|
-
blocked: (blocked || false)
|
|
389
|
+
blocked: (blocked || false),
|
|
390
|
+
user: user
|
|
389
391
|
});
|
|
390
392
|
}
|
|
391
393
|
;
|
|
@@ -505,11 +507,12 @@ class WebsiteConversation extends BaseResource_1.default {
|
|
|
505
507
|
/**
|
|
506
508
|
* Initiate New Call Session For Conversation
|
|
507
509
|
*/
|
|
508
|
-
initiateNewCallSessionForConversation(websiteID, sessionID, mode) {
|
|
510
|
+
initiateNewCallSessionForConversation(websiteID, sessionID, mode, user) {
|
|
509
511
|
return this.crisp.post(this.crisp.prepareRestUrl([
|
|
510
512
|
"website", websiteID, "conversation", sessionID, "call"
|
|
511
513
|
]), null, {
|
|
512
|
-
mode: (mode || "audio")
|
|
514
|
+
mode: (mode || "audio"),
|
|
515
|
+
user: user
|
|
513
516
|
});
|
|
514
517
|
}
|
|
515
518
|
;
|
|
@@ -525,10 +528,12 @@ class WebsiteConversation extends BaseResource_1.default {
|
|
|
525
528
|
/**
|
|
526
529
|
* Abort Ongoing Call Session For Conversation
|
|
527
530
|
*/
|
|
528
|
-
abortOngoingCallSessionForConversation(websiteID, sessionID, callID) {
|
|
531
|
+
abortOngoingCallSessionForConversation(websiteID, sessionID, callID, user) {
|
|
529
532
|
return this.crisp.delete(this.crisp.prepareRestUrl([
|
|
530
533
|
"website", websiteID, "conversation", sessionID, "call", callID
|
|
531
|
-
])
|
|
534
|
+
]), null, {
|
|
535
|
+
user: user
|
|
536
|
+
});
|
|
532
537
|
}
|
|
533
538
|
;
|
|
534
539
|
/**
|
|
@@ -591,12 +596,13 @@ class WebsiteConversation extends BaseResource_1.default {
|
|
|
591
596
|
/**
|
|
592
597
|
* Schedule A Reminder For Conversation
|
|
593
598
|
*/
|
|
594
|
-
scheduleReminderForConversation(websiteID, sessionID, date, note) {
|
|
599
|
+
scheduleReminderForConversation(websiteID, sessionID, date, note, user) {
|
|
595
600
|
return this.crisp.post(this.crisp.prepareRestUrl([
|
|
596
601
|
"website", websiteID, "conversation", sessionID, "reminder"
|
|
597
602
|
]), null, {
|
|
598
603
|
date: date,
|
|
599
|
-
note: note
|
|
604
|
+
note: note,
|
|
605
|
+
user: user
|
|
600
606
|
});
|
|
601
607
|
}
|
|
602
608
|
;
|
|
@@ -112,6 +112,7 @@ export interface ConversationParticipants {
|
|
|
112
112
|
|
|
113
113
|
export interface ConversationParticipantsSave {
|
|
114
114
|
participants?: ConversationParticipant[];
|
|
115
|
+
user?: ConversationMessageUser;
|
|
115
116
|
}
|
|
116
117
|
|
|
117
118
|
export interface ConversationMeta {
|
|
@@ -1057,7 +1058,8 @@ class WebsiteConversation extends BaseResource {
|
|
|
1057
1058
|
* Change Conversation State
|
|
1058
1059
|
*/
|
|
1059
1060
|
changeConversationState(
|
|
1060
|
-
websiteID: string, sessionID: string, state: ConversationState
|
|
1061
|
+
websiteID: string, sessionID: string, state: ConversationState,
|
|
1062
|
+
user?: ConversationMessageUser
|
|
1061
1063
|
) {
|
|
1062
1064
|
return this.crisp.patch(
|
|
1063
1065
|
this.crisp.prepareRestUrl([
|
|
@@ -1067,7 +1069,8 @@ class WebsiteConversation extends BaseResource {
|
|
|
1067
1069
|
null,
|
|
1068
1070
|
|
|
1069
1071
|
{
|
|
1070
|
-
state: state
|
|
1072
|
+
state: state,
|
|
1073
|
+
user: user
|
|
1071
1074
|
}
|
|
1072
1075
|
);
|
|
1073
1076
|
};
|
|
@@ -1130,7 +1133,8 @@ class WebsiteConversation extends BaseResource {
|
|
|
1130
1133
|
* Block Incoming Messages For Conversation
|
|
1131
1134
|
*/
|
|
1132
1135
|
blockIncomingMessagesForConversation(
|
|
1133
|
-
websiteID: string, sessionID: string, blocked: boolean
|
|
1136
|
+
websiteID: string, sessionID: string, blocked: boolean,
|
|
1137
|
+
user?: ConversationMessageUser
|
|
1134
1138
|
) {
|
|
1135
1139
|
return this.crisp.patch(
|
|
1136
1140
|
this.crisp.prepareRestUrl([
|
|
@@ -1140,7 +1144,8 @@ class WebsiteConversation extends BaseResource {
|
|
|
1140
1144
|
null,
|
|
1141
1145
|
|
|
1142
1146
|
{
|
|
1143
|
-
blocked: (blocked || false)
|
|
1147
|
+
blocked: (blocked || false),
|
|
1148
|
+
user: user
|
|
1144
1149
|
}
|
|
1145
1150
|
);
|
|
1146
1151
|
};
|
|
@@ -1334,7 +1339,8 @@ class WebsiteConversation extends BaseResource {
|
|
|
1334
1339
|
* Initiate New Call Session For Conversation
|
|
1335
1340
|
*/
|
|
1336
1341
|
initiateNewCallSessionForConversation(
|
|
1337
|
-
websiteID: string, sessionID: string, mode: string
|
|
1342
|
+
websiteID: string, sessionID: string, mode: string,
|
|
1343
|
+
user?: ConversationMessageUser
|
|
1338
1344
|
) {
|
|
1339
1345
|
return this.crisp.post(
|
|
1340
1346
|
this.crisp.prepareRestUrl([
|
|
@@ -1344,7 +1350,8 @@ class WebsiteConversation extends BaseResource {
|
|
|
1344
1350
|
null,
|
|
1345
1351
|
|
|
1346
1352
|
{
|
|
1347
|
-
mode: (mode || "audio")
|
|
1353
|
+
mode: (mode || "audio"),
|
|
1354
|
+
user: user
|
|
1348
1355
|
}
|
|
1349
1356
|
);
|
|
1350
1357
|
};
|
|
@@ -1366,12 +1373,19 @@ class WebsiteConversation extends BaseResource {
|
|
|
1366
1373
|
* Abort Ongoing Call Session For Conversation
|
|
1367
1374
|
*/
|
|
1368
1375
|
abortOngoingCallSessionForConversation(
|
|
1369
|
-
websiteID: string, sessionID: string, callID: string
|
|
1376
|
+
websiteID: string, sessionID: string, callID: string,
|
|
1377
|
+
user?: ConversationMessageUser
|
|
1370
1378
|
) {
|
|
1371
1379
|
return this.crisp.delete(
|
|
1372
1380
|
this.crisp.prepareRestUrl([
|
|
1373
1381
|
"website", websiteID, "conversation", sessionID, "call", callID
|
|
1374
|
-
])
|
|
1382
|
+
]),
|
|
1383
|
+
|
|
1384
|
+
null,
|
|
1385
|
+
|
|
1386
|
+
{
|
|
1387
|
+
user: user
|
|
1388
|
+
}
|
|
1375
1389
|
);
|
|
1376
1390
|
};
|
|
1377
1391
|
|
|
@@ -1469,7 +1483,8 @@ class WebsiteConversation extends BaseResource {
|
|
|
1469
1483
|
* Schedule A Reminder For Conversation
|
|
1470
1484
|
*/
|
|
1471
1485
|
scheduleReminderForConversation(
|
|
1472
|
-
websiteID: string, sessionID: string, date: string, note: string
|
|
1486
|
+
websiteID: string, sessionID: string, date: string, note: string,
|
|
1487
|
+
user?: ConversationMessageUser
|
|
1473
1488
|
) {
|
|
1474
1489
|
return this.crisp.post(
|
|
1475
1490
|
this.crisp.prepareRestUrl([
|
|
@@ -1480,7 +1495,8 @@ class WebsiteConversation extends BaseResource {
|
|
|
1480
1495
|
|
|
1481
1496
|
{
|
|
1482
1497
|
date: date,
|
|
1483
|
-
note: note
|
|
1498
|
+
note: note,
|
|
1499
|
+
user: user
|
|
1484
1500
|
}
|
|
1485
1501
|
);
|
|
1486
1502
|
};
|
package/package.json
CHANGED