crisp-api 10.10.3 → 10.10.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/EXAMPLES.md +2 -0
- package/README.md +3 -1
- package/dist/crisp.d.ts +8 -2
- package/dist/crisp.js +2 -2
- package/dist/events/Events.d.ts +597 -0
- package/dist/events/Events.js +8 -0
- package/dist/resources/WebsiteConversation.d.ts +1 -1
- package/dist/resources/WebsiteConversation.js +9 -1
- package/lib/crisp.ts +20 -0
- package/lib/events/Events.ts +789 -0
- package/lib/resources/WebsiteConversation.ts +12 -1
- package/package.json +1 -1
|
@@ -759,7 +759,8 @@ class WebsiteConversation extends BaseResource {
|
|
|
759
759
|
* Get Messages In Conversation
|
|
760
760
|
*/
|
|
761
761
|
getMessagesInConversation(
|
|
762
|
-
websiteID: string, sessionID: string, timestampBefore?: string|number
|
|
762
|
+
websiteID: string, sessionID: string, timestampBefore?: string|number,
|
|
763
|
+
timestampAfter?: string|number, timestampAround?: string|number
|
|
763
764
|
): Promise<ConversationMessage[]> {
|
|
764
765
|
// Generate query
|
|
765
766
|
let query = {};
|
|
@@ -769,6 +770,16 @@ class WebsiteConversation extends BaseResource {
|
|
|
769
770
|
query.timestamp_before = String(timestampBefore);
|
|
770
771
|
}
|
|
771
772
|
|
|
773
|
+
if (timestampAfter) {
|
|
774
|
+
// @ts-ignore
|
|
775
|
+
query.timestamp_after = String(timestampAfter);
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
if (timestampAround) {
|
|
779
|
+
// @ts-ignore
|
|
780
|
+
query.timestamp_around = String(timestampAround);
|
|
781
|
+
}
|
|
782
|
+
|
|
772
783
|
return this.crisp.get(
|
|
773
784
|
this.crisp.prepareRestUrl([
|
|
774
785
|
"website", websiteID, "conversation", sessionID, "messages"
|
package/package.json
CHANGED