crisp-api 7.1.0 → 7.3.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/CHANGELOG.md +13 -1
- package/EXAMPLES.md +10 -0
- package/LICENSE +1 -1
- package/README.md +17 -3
- package/lib/crisp.js +1 -2
- package/lib/resources/WebsiteConversation.js +14 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
Changelog
|
|
2
2
|
=========
|
|
3
3
|
|
|
4
|
-
## v7.0
|
|
4
|
+
## v7.3.0
|
|
5
|
+
|
|
6
|
+
### New Features
|
|
7
|
+
|
|
8
|
+
* Added the new `CrispClient.website.listConversationFiles` method.
|
|
9
|
+
|
|
10
|
+
## v7.2.0
|
|
11
|
+
|
|
12
|
+
### New Features
|
|
13
|
+
|
|
14
|
+
* Automated the package release process via GitHub Actions (ie. `npm publish`).
|
|
15
|
+
|
|
16
|
+
## v7.1.0
|
|
5
17
|
|
|
6
18
|
### New Features
|
|
7
19
|
|
package/EXAMPLES.md
CHANGED
|
@@ -292,6 +292,16 @@ CrispClient.website.listConversationEvents(websiteID, sessionID, pageNumber);
|
|
|
292
292
|
|
|
293
293
|
=========================
|
|
294
294
|
|
|
295
|
+
https://docs.crisp.chat/references/rest-api/v1/#list-conversation-files
|
|
296
|
+
|
|
297
|
+
var websiteID = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
|
|
298
|
+
var sessionID = "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881";
|
|
299
|
+
var pageNumber = 1;
|
|
300
|
+
|
|
301
|
+
CrispClient.website.listConversationFiles(websiteID, sessionID, pageNumber);
|
|
302
|
+
|
|
303
|
+
=========================
|
|
304
|
+
|
|
295
305
|
https://docs.crisp.chat/references/rest-api/v1/#get-conversation-state
|
|
296
306
|
|
|
297
307
|
var websiteID = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
|
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# Crisp API Wrapper
|
|
2
2
|
|
|
3
|
-
[](https://github.com/crisp-im/node-crisp-api/actions?query=workflow%3A%22Test+and+Build%22) [](https://github.com/crisp-im/node-crisp-api/actions?query=workflow%3A%22Test+and+Build%22) [](https://github.com/crisp-im/node-crisp-api/actions?query=workflow%3A%22Build+and+Release%22) [](https://www.npmjs.com/package/crisp-api) [](https://www.npmjs.com/package/crisp-api)
|
|
4
4
|
|
|
5
5
|
The Crisp API Node wrapper. Authenticate, send messages, fetch conversations, access your agent accounts from your JavaScript code.
|
|
6
6
|
|
|
7
|
-
Copyright
|
|
7
|
+
Copyright 2023 Crisp IM SAS. See LICENSE for copying information.
|
|
8
8
|
|
|
9
|
-
* **📝 Implements**: [REST API Reference (V1)](https://docs.crisp.chat/references/rest-api/v1/) at revision:
|
|
9
|
+
* **📝 Implements**: [REST API Reference (V1)](https://docs.crisp.chat/references/rest-api/v1/) at revision: 16/01/2023
|
|
10
10
|
* **😘 Maintainers**: [@baptistejamin](https://github.com/baptistejamin), [@eliottvincent](https://github.com/eliottvincent), [@valeriansaliou](https://github.com/valeriansaliou)
|
|
11
11
|
|
|
12
12
|
## Installation
|
|
@@ -566,6 +566,20 @@ All methods that you will most likely need when building a Crisp integration are
|
|
|
566
566
|
```
|
|
567
567
|
</details>
|
|
568
568
|
|
|
569
|
+
* **List Conversation Files** [`user`, `plugin`]: [Reference](https://docs.crisp.chat/references/rest-api/v1/#list-conversation-files)
|
|
570
|
+
* `CrispClient.website.listConversationFiles(websiteID, sessionID, pageNumber)`
|
|
571
|
+
* <details>
|
|
572
|
+
<summary>See Example</summary>
|
|
573
|
+
|
|
574
|
+
```javascript
|
|
575
|
+
var websiteID = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
|
|
576
|
+
var sessionID = "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881";
|
|
577
|
+
var pageNumber = 1;
|
|
578
|
+
|
|
579
|
+
CrispClient.website.listConversationFiles(websiteID, sessionID, pageNumber);
|
|
580
|
+
```
|
|
581
|
+
</details>
|
|
582
|
+
|
|
569
583
|
* **Get Conversation State** [`user`, `plugin`]: [Reference](https://docs.crisp.chat/references/rest-api/v1/#get-conversation-state)
|
|
570
584
|
* `CrispClient.website.getConversationState(websiteID, sessionID)`
|
|
571
585
|
* <details>
|
package/lib/crisp.js
CHANGED
|
@@ -998,8 +998,7 @@ Crisp.prototype = {
|
|
|
998
998
|
},
|
|
999
999
|
|
|
1000
1000
|
/**
|
|
1001
|
-
* Verifies an event string and checks that signatures match
|
|
1002
|
-
* Hooks, Widgets)
|
|
1001
|
+
* Verifies an event string and checks that signatures match
|
|
1003
1002
|
* @memberof Crisp
|
|
1004
1003
|
* @private
|
|
1005
1004
|
* @method verifyHook
|
|
@@ -432,6 +432,20 @@ function WebsiteConversation(service, crisp) {
|
|
|
432
432
|
);
|
|
433
433
|
};
|
|
434
434
|
|
|
435
|
+
/**
|
|
436
|
+
* List Conversation Files
|
|
437
|
+
* @memberof WebsiteConversation
|
|
438
|
+
* @method listConversationFiles
|
|
439
|
+
* @return Promise
|
|
440
|
+
*/
|
|
441
|
+
service.listConversationFiles = function(websiteID, sessionID, pageNumber) {
|
|
442
|
+
return crisp.get(
|
|
443
|
+
crisp._prepareRestUrl([
|
|
444
|
+
"website", websiteID, "conversation", sessionID, "files", pageNumber
|
|
445
|
+
])
|
|
446
|
+
);
|
|
447
|
+
};
|
|
448
|
+
|
|
435
449
|
/**
|
|
436
450
|
* Get Conversation State
|
|
437
451
|
* @memberof WebsiteConversation
|
package/package.json
CHANGED