crisp-api 5.0.4 → 5.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 +18 -0
- package/EXAMPLES.md +6 -0
- package/LICENSE +1 -1
- package/README.md +115 -36
- package/lib/crisp.js +2 -1
- package/lib/resources/BucketURL.js +1 -1
- package/lib/resources/MediaAnimation.js +1 -1
- package/lib/resources/PluginConnect.js +13 -1
- package/lib/resources/PluginSubscription.js +1 -1
- package/lib/resources/WebsiteAnalytics.js +1 -1
- package/lib/resources/WebsiteAvailability.js +1 -1
- package/lib/resources/WebsiteBase.js +1 -1
- package/lib/resources/WebsiteBatch.js +1 -1
- package/lib/resources/WebsiteCampaign.js +1 -1
- package/lib/resources/WebsiteConversation.js +1 -1
- package/lib/resources/WebsiteOperator.js +1 -1
- package/lib/resources/WebsitePeople.js +1 -1
- package/lib/resources/WebsiteSettings.js +1 -1
- package/lib/resources/WebsiteVerify.js +1 -1
- package/lib/resources/WebsiteVisitors.js +1 -1
- package/lib/services/Bucket.js +1 -1
- package/lib/services/Media.js +1 -1
- package/lib/services/Plugin.js +1 -1
- package/lib/services/Website.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
Changelog
|
|
2
2
|
=========
|
|
3
3
|
|
|
4
|
+
## v5.3.0
|
|
5
|
+
|
|
6
|
+
### New Features
|
|
7
|
+
|
|
8
|
+
* Added the new `CrispClient.plugin.getConnectEndpoints` method.
|
|
9
|
+
|
|
10
|
+
## v5.2.0
|
|
11
|
+
|
|
12
|
+
### Changes
|
|
13
|
+
|
|
14
|
+
* Upgraded Socket.IO from v2 to v4, meaning that `node-crisp-api` is now connecting to the RTM API over EIO protocol version 4 (versus EIO 3 before).
|
|
15
|
+
|
|
16
|
+
## v5.1.0
|
|
17
|
+
|
|
18
|
+
### New Features
|
|
19
|
+
|
|
20
|
+
* Added support for the `session:set_subject` RTM API event.
|
|
21
|
+
|
|
4
22
|
## v5.0.4
|
|
5
23
|
|
|
6
24
|
### Changes
|
package/EXAMPLES.md
CHANGED
|
@@ -1452,6 +1452,12 @@ CrispClient.plugin.listAllConnectWebsites(pageNumber, filterConfigured, dateSinc
|
|
|
1452
1452
|
|
|
1453
1453
|
=========================
|
|
1454
1454
|
|
|
1455
|
+
https://docs.crisp.chat/references/rest-api/v1/#get-connect-endpoints
|
|
1456
|
+
|
|
1457
|
+
CrispClient.plugin.getConnectEndpoints();
|
|
1458
|
+
|
|
1459
|
+
=========================
|
|
1460
|
+
|
|
1455
1461
|
https://docs.crisp.chat/references/rest-api/v1/#list-all-active-subscriptions
|
|
1456
1462
|
|
|
1457
1463
|
CrispClient.plugin.listAllActiveSubscriptions();
|
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
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 2022 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: 22/04/2022
|
|
10
10
|
* **😘 Maintainers**: [@baptistejamin](https://github.com/baptistejamin), [@eliottvincent](https://github.com/eliottvincent), [@valeriansaliou](https://github.com/valeriansaliou)
|
|
11
11
|
|
|
12
12
|
## Installation
|
|
@@ -90,9 +90,76 @@ All methods that you will most likely need when building a Crisp integration are
|
|
|
90
90
|
|
|
91
91
|
**⚠️ Note that, depending on your authentication token tier, which is either `user` or `plugin`, you may not be allowed to use all methods from the library. When in doubt, refer to the library method descriptions below. Most likely, you are using a `plugin` token.**
|
|
92
92
|
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
<details>
|
|
96
|
+
<summary>
|
|
97
|
+
<a href="#website">Website</a>
|
|
98
|
+
</summary>
|
|
99
|
+
<ul>
|
|
100
|
+
<li><a href="#website-conversations">Website Conversations</a></li>
|
|
101
|
+
<li><a href="#website-conversation">Website Conversation</a></li>
|
|
102
|
+
<li><a href="#website-people">Website People</a></li>
|
|
103
|
+
<li><a href="#website-operator">Website Operator</a></li>
|
|
104
|
+
<li><a href="#website-availability">Website Availability</a></li>
|
|
105
|
+
<li><a href="#website-analytics">Website Analytics</a></li>
|
|
106
|
+
<li><a href="#website-batch">Website Batch</a></li>
|
|
107
|
+
<li><a href="#website-verify">Website Verify</a></li>
|
|
108
|
+
<li><a href="#website-campaigns">Website Campaigns</a></li>
|
|
109
|
+
<li><a href="#website-campaign">Website Campaign</a></li>
|
|
110
|
+
</ul>
|
|
111
|
+
</details>
|
|
112
|
+
<details>
|
|
113
|
+
<summary>
|
|
114
|
+
<a href="#plugin">Plugin</a>
|
|
115
|
+
</summary>
|
|
116
|
+
<ul>
|
|
117
|
+
<li><a href="#plugin-connect">Plugin Connect</a></li>
|
|
118
|
+
<li><a href="#plugin-subscription">Plugin Subscription</a></li>
|
|
119
|
+
</ul>
|
|
120
|
+
</details>
|
|
121
|
+
<details>
|
|
122
|
+
<summary>
|
|
123
|
+
<a href="#media">Media</a>
|
|
124
|
+
</summary>
|
|
125
|
+
<ul>
|
|
126
|
+
<li><a href="#media-animation">Media Animation</a></li>
|
|
127
|
+
</ul>
|
|
128
|
+
</details>
|
|
129
|
+
<details>
|
|
130
|
+
<summary>
|
|
131
|
+
<a href="#bucket">Bucket</a>
|
|
132
|
+
</summary>
|
|
133
|
+
<ul>
|
|
134
|
+
<li><a href="#bucket-url">Bucket URL</a></li>
|
|
135
|
+
</ul>
|
|
136
|
+
</details>
|
|
137
|
+
<details>
|
|
138
|
+
<summary>
|
|
139
|
+
<a href="#plugin">RTM Events</a>
|
|
140
|
+
</summary>
|
|
141
|
+
<ul>
|
|
142
|
+
<li><a href="#session--reference">Session Events</a></li>
|
|
143
|
+
<li><a href="#message-events-reference">Message Events</a></li>
|
|
144
|
+
<li><a href="#people-events-reference">People Events</a></li>
|
|
145
|
+
<li><a href="#campaign-events-reference">Campaign Events</a></li>
|
|
146
|
+
<li><a href="#browsing-events-reference">Browsing Events</a></li>
|
|
147
|
+
<li><a href="#call-events-reference">Call Events</a></li>
|
|
148
|
+
<li><a href="#widget-events-reference">Widget Events</a></li>
|
|
149
|
+
<li><a href="#status-events-reference">Status Events</a></li>
|
|
150
|
+
<li><a href="#website-events-reference">Website Events</a></li>
|
|
151
|
+
<li><a href="#bucket-events-reference">Bucket Events</a></li>
|
|
152
|
+
<li><a href="#media-events-reference">Media Events</a></li>
|
|
153
|
+
<li><a href="#email-events-reference">Email Events</a></li>
|
|
154
|
+
<li><a href="#plugin-events-reference">Plugin Events</a></li>
|
|
155
|
+
</ul>
|
|
156
|
+
</details>
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
93
160
|
### Website
|
|
94
161
|
|
|
95
|
-
* **Website Conversations**
|
|
162
|
+
* #### **Website Conversations**
|
|
96
163
|
* **⭐ List Conversations** [`user`, `plugin`]: [Reference](https://docs.crisp.chat/references/rest-api/v1/#list-conversations)
|
|
97
164
|
* `CrispClient.website.listConversations(websiteID, pageNumber)`
|
|
98
165
|
* <details>
|
|
@@ -161,7 +228,7 @@ All methods that you will most likely need when building a Crisp integration are
|
|
|
161
228
|
</details>
|
|
162
229
|
|
|
163
230
|
|
|
164
|
-
* **Website Conversation**
|
|
231
|
+
* #### **Website Conversation**
|
|
165
232
|
* **⭐ Create A New Conversation** [`user`, `plugin`]: [Reference](https://docs.crisp.chat/references/rest-api/v1/#create-a-new-conversation)
|
|
166
233
|
* `CrispClient.website.createNewConversation(websiteID)`
|
|
167
234
|
* <details>
|
|
@@ -815,7 +882,7 @@ All methods that you will most likely need when building a Crisp integration are
|
|
|
815
882
|
</details>
|
|
816
883
|
|
|
817
884
|
|
|
818
|
-
* **Website People** _(these are your end-users)_
|
|
885
|
+
* ### **Website People** _(these are your end-users)_
|
|
819
886
|
* **Get People Statistics** [`user`, `plugin`]: [Reference](https://docs.crisp.chat/references/rest-api/v1/#get-people-statistics)
|
|
820
887
|
* `CrispClient.website.getPeopleStatistics(websiteID)`
|
|
821
888
|
* <details>
|
|
@@ -1200,7 +1267,7 @@ All methods that you will most likely need when building a Crisp integration are
|
|
|
1200
1267
|
|
|
1201
1268
|
_👉 Notice: The `peopleID` argument can be an email or the `peopleID`._
|
|
1202
1269
|
|
|
1203
|
-
* **Website Base**
|
|
1270
|
+
* #### **Website Base**
|
|
1204
1271
|
* **Check If Website Exists** [`user`, `plugin`]: [Reference](https://docs.crisp.chat/references/rest-api/v1/#check-if-website-exists)
|
|
1205
1272
|
* `CrispClient.website.checkWebsiteExists(domain)`
|
|
1206
1273
|
* <details>
|
|
@@ -1248,7 +1315,7 @@ _👉 Notice: The `peopleID` argument can be an email or the `peopleID`._
|
|
|
1248
1315
|
</details>
|
|
1249
1316
|
|
|
1250
1317
|
|
|
1251
|
-
* **Website Settings**
|
|
1318
|
+
* #### **Website Settings**
|
|
1252
1319
|
* **Get Website Settings** [`user`, `plugin`]: [Reference](https://docs.crisp.chat/references/rest-api/v1/#get-website-settings)
|
|
1253
1320
|
* `CrispClient.website.getWebsiteSettings(websiteID)`
|
|
1254
1321
|
* <details>
|
|
@@ -1339,7 +1406,7 @@ _👉 Notice: The `peopleID` argument can be an email or the `peopleID`._
|
|
|
1339
1406
|
</details>
|
|
1340
1407
|
|
|
1341
1408
|
|
|
1342
|
-
* **Website Operator**
|
|
1409
|
+
* #### **Website Operator**
|
|
1343
1410
|
* **List Website Operators** [`user`, `plugin`]: [Reference](https://docs.crisp.chat/references/rest-api/v1/#list-website-operators)
|
|
1344
1411
|
* `CrispClient.website.listWebsiteOperators(websiteID)`
|
|
1345
1412
|
* <details>
|
|
@@ -1457,7 +1524,7 @@ _👉 Notice: The `peopleID` argument can be an email or the `peopleID`._
|
|
|
1457
1524
|
</details>
|
|
1458
1525
|
|
|
1459
1526
|
|
|
1460
|
-
* **Website Visitors**
|
|
1527
|
+
* #### **Website Visitors**
|
|
1461
1528
|
* **Count Visitors** [`user`, `plugin`]: [Reference](https://docs.crisp.chat/references/rest-api/v1/#count-visitors)
|
|
1462
1529
|
* `CrispClient.website.countVisitors(websiteID)`
|
|
1463
1530
|
* <details>
|
|
@@ -1535,7 +1602,7 @@ _👉 Notice: The `peopleID` argument can be an email or the `peopleID`._
|
|
|
1535
1602
|
</details>
|
|
1536
1603
|
|
|
1537
1604
|
|
|
1538
|
-
* **Website Availability**
|
|
1605
|
+
* #### **Website Availability**
|
|
1539
1606
|
* **Get Website Availability Status** [`user`, `plugin`]: [Reference](https://docs.crisp.chat/references/rest-api/v1/#get-website-availability-status)
|
|
1540
1607
|
* `CrispClient.website.getWebsiteAvailabilityStatus(websiteID)`
|
|
1541
1608
|
* <details>
|
|
@@ -1561,7 +1628,7 @@ _👉 Notice: The `peopleID` argument can be an email or the `peopleID`._
|
|
|
1561
1628
|
</details>
|
|
1562
1629
|
|
|
1563
1630
|
|
|
1564
|
-
* **Website Analytics**
|
|
1631
|
+
* #### **Website Analytics**
|
|
1565
1632
|
* **Acquire Analytics Points** [`user`]: [Reference](https://docs.crisp.chat/references/rest-api/v1/#acquire-analytics-points)
|
|
1566
1633
|
* `CrispClient.website.acquireAnalyticsPoints(websiteID, pointType, pointMetric, dateFrom, dateTo, dateSplit, classifier, filterPrimary, filterSecondary, filterTertiary)`
|
|
1567
1634
|
* <details>
|
|
@@ -1601,7 +1668,7 @@ _👉 Notice: The `peopleID` argument can be an email or the `peopleID`._
|
|
|
1601
1668
|
</details>
|
|
1602
1669
|
|
|
1603
1670
|
|
|
1604
|
-
* **Website Batch**
|
|
1671
|
+
* #### **Website Batch**
|
|
1605
1672
|
* **Batch Resolve Conversations** [`user`]: [Reference](https://docs.crisp.chat/references/rest-api/v1/#batch-resolve-items)
|
|
1606
1673
|
* `CrispClient.website.batchResolveConversations(websiteID, sessions)`
|
|
1607
1674
|
* <details>
|
|
@@ -1661,7 +1728,7 @@ _👉 Notice: The `peopleID` argument can be an email or the `peopleID`._
|
|
|
1661
1728
|
</details>
|
|
1662
1729
|
|
|
1663
1730
|
|
|
1664
|
-
* **Website Verify**
|
|
1731
|
+
* #### **Website Verify**
|
|
1665
1732
|
* **Get Verify Settings** [`user`, `plugin`]: [Reference](https://docs.crisp.chat/references/rest-api/v1/#get-verify-settings)
|
|
1666
1733
|
* `CrispClient.website.getVerifySettings(websiteID)`
|
|
1667
1734
|
* <details>
|
|
@@ -1715,7 +1782,7 @@ _👉 Notice: The `peopleID` argument can be an email or the `peopleID`._
|
|
|
1715
1782
|
</details>
|
|
1716
1783
|
|
|
1717
1784
|
|
|
1718
|
-
* **Website Campaigns**
|
|
1785
|
+
* #### **Website Campaigns**
|
|
1719
1786
|
* **List Campaigns** [`user`]: [Reference](https://docs.crisp.chat/references/rest-api/v1/#list-campaigns)
|
|
1720
1787
|
* `CrispClient.website.listCampaigns(websiteID, pageNumber)`
|
|
1721
1788
|
* <details>
|
|
@@ -1845,7 +1912,7 @@ _👉 Notice: The `peopleID` argument can be an email or the `peopleID`._
|
|
|
1845
1912
|
</details>
|
|
1846
1913
|
|
|
1847
1914
|
|
|
1848
|
-
* **Website Campaign**
|
|
1915
|
+
* #### **Website Campaign**
|
|
1849
1916
|
* **Create A New Campaign** [`user`]: [Reference](https://docs.crisp.chat/references/rest-api/v1/#create-a-new-campaign)
|
|
1850
1917
|
* `CrispClient.website.createNewCampaign(websiteID, campaignType, campaignName)`
|
|
1851
1918
|
* <details>
|
|
@@ -2035,8 +2102,8 @@ _👉 Notice: The `peopleID` argument can be an email or the `peopleID`._
|
|
|
2035
2102
|
|
|
2036
2103
|
### Plugin
|
|
2037
2104
|
|
|
2038
|
-
* **Plugin Connect**
|
|
2039
|
-
* **⭐ Get Connect Account** [`
|
|
2105
|
+
* #### **Plugin Connect**
|
|
2106
|
+
* **⭐ Get Connect Account** [`plugin`]: [Reference](https://docs.crisp.chat/references/rest-api/v1/#get-connect-account)
|
|
2040
2107
|
* `CrispClient.plugin.getConnectAccount()`
|
|
2041
2108
|
* <details>
|
|
2042
2109
|
<summary>See Example</summary>
|
|
@@ -2046,7 +2113,7 @@ _👉 Notice: The `peopleID` argument can be an email or the `peopleID`._
|
|
|
2046
2113
|
```
|
|
2047
2114
|
</details>
|
|
2048
2115
|
|
|
2049
|
-
* **⭐ Check Connect Session Validity** [`
|
|
2116
|
+
* **⭐ Check Connect Session Validity** [`plugin`]: [Reference](https://docs.crisp.chat/references/rest-api/v1/#check-connect-session-validity)
|
|
2050
2117
|
* `CrispClient.plugin.checkConnectSessionValidity()`
|
|
2051
2118
|
* <details>
|
|
2052
2119
|
<summary>See Example</summary>
|
|
@@ -2056,20 +2123,30 @@ _👉 Notice: The `peopleID` argument can be an email or the `peopleID`._
|
|
|
2056
2123
|
```
|
|
2057
2124
|
</details>
|
|
2058
2125
|
|
|
2059
|
-
* **⭐ List All Connect Websites** [`
|
|
2126
|
+
* **⭐ List All Connect Websites** [`plugin`]: [Reference](https://docs.crisp.chat/references/rest-api/v1/#list-all-connect-websites)
|
|
2060
2127
|
* `CrispClient.plugin.listAllConnectWebsites(pageNumber, filterConfigured, dateSince)`
|
|
2061
2128
|
* <details>
|
|
2062
2129
|
<summary>See Example</summary>
|
|
2063
2130
|
|
|
2064
2131
|
```javascript
|
|
2065
2132
|
var pageNumber = 1;
|
|
2066
|
-
|
|
2133
|
+
|
|
2067
2134
|
CrispClient.plugin.listAllConnectWebsites(pageNumber, filterConfigured, dateSince);
|
|
2068
2135
|
```
|
|
2069
2136
|
</details>
|
|
2070
2137
|
|
|
2138
|
+
* **⭐ Get Connect Endpoints** [`plugin`]: [Reference](https://docs.crisp.chat/references/rest-api/v1/#get-connect-endpoints)
|
|
2139
|
+
* `CrispClient.plugin.getConnectEndpoints()`
|
|
2140
|
+
* <details>
|
|
2141
|
+
<summary>See Example</summary>
|
|
2142
|
+
|
|
2143
|
+
```javascript
|
|
2144
|
+
CrispClient.plugin.getConnectEndpoints();
|
|
2145
|
+
```
|
|
2146
|
+
</details>
|
|
2147
|
+
|
|
2071
2148
|
|
|
2072
|
-
* **Plugin Subscription**
|
|
2149
|
+
* #### **Plugin Subscription**
|
|
2073
2150
|
* **List All Active Subscriptions** [`user`]: [Reference](https://docs.crisp.chat/references/rest-api/v1/#list-all-active-subscriptions)
|
|
2074
2151
|
* `CrispClient.plugin.listAllActiveSubscriptions()`
|
|
2075
2152
|
* <details>
|
|
@@ -2228,7 +2305,7 @@ _👉 Notice: The `peopleID` argument can be an email or the `peopleID`._
|
|
|
2228
2305
|
|
|
2229
2306
|
### Media
|
|
2230
2307
|
|
|
2231
|
-
* **Media Animation**
|
|
2308
|
+
* #### **Media Animation**
|
|
2232
2309
|
* **List Animation Medias** [`user`]: [Reference](https://docs.crisp.chat/references/rest-api/v1/#list-animation-medias)
|
|
2233
2310
|
* `CrispClient.media.listAnimationMedias(pageNumber, listID, searchQuery)`
|
|
2234
2311
|
* <details>
|
|
@@ -2245,7 +2322,7 @@ _👉 Notice: The `peopleID` argument can be an email or the `peopleID`._
|
|
|
2245
2322
|
|
|
2246
2323
|
### Bucket
|
|
2247
2324
|
|
|
2248
|
-
* **Bucket URL**
|
|
2325
|
+
* #### **Bucket URL**
|
|
2249
2326
|
* **Generate Bucket URL** [`user`, `plugin`]: [Reference](https://docs.crisp.chat/references/rest-api/v1/#bucket-url)
|
|
2250
2327
|
* `CrispClient.bucket.generateBucketURL(data)`
|
|
2251
2328
|
* <details>
|
|
@@ -2265,7 +2342,7 @@ You won't receive any event if you don't explicitly subscribe to realtime events
|
|
|
2265
2342
|
|
|
2266
2343
|
Available events are listed below:
|
|
2267
2344
|
|
|
2268
|
-
* **Session Events**: [Reference](https://docs.crisp.chat/references/rtm-api/v1/#session-events)
|
|
2345
|
+
* #### **Session Events**: [Reference](https://docs.crisp.chat/references/rtm-api/v1/#session-events)
|
|
2269
2346
|
* **Session Update Availability** [`user`, `plugin`]:
|
|
2270
2347
|
* `session:update_availability`
|
|
2271
2348
|
* **Session Update Verify** [`user`, `plugin`]:
|
|
@@ -2278,6 +2355,8 @@ Available events are listed below:
|
|
|
2278
2355
|
* `session:set_phone`
|
|
2279
2356
|
* **Session Set Address** [`user`, `plugin`]:
|
|
2280
2357
|
* `session:set_address`
|
|
2358
|
+
* **Session Set Subject** [`user`, `plugin`]:
|
|
2359
|
+
* `session:set_subject`
|
|
2281
2360
|
* **Session Set Avatar** [`user`, `plugin`]:
|
|
2282
2361
|
* `session:set_avatar`
|
|
2283
2362
|
* **Session Set Nickname** [`user`, `plugin`]:
|
|
@@ -2321,7 +2400,7 @@ Available events are listed below:
|
|
|
2321
2400
|
* **Session Removed** [`user`, `plugin`]:
|
|
2322
2401
|
* `session:removed`
|
|
2323
2402
|
|
|
2324
|
-
* **Message Events**: [Reference](https://docs.crisp.chat/references/rtm-api/v1/#message-events)
|
|
2403
|
+
* #### **Message Events**: [Reference](https://docs.crisp.chat/references/rtm-api/v1/#message-events)
|
|
2325
2404
|
* **Message Updated** [`user`, `plugin`]:
|
|
2326
2405
|
* `message:updated`
|
|
2327
2406
|
* **Message Send** [`user`, `plugin`]:
|
|
@@ -2343,7 +2422,7 @@ Available events are listed below:
|
|
|
2343
2422
|
* **Message Notify Unread Received** [`user`, `plugin`]:
|
|
2344
2423
|
* `message:notify:unread:received`
|
|
2345
2424
|
|
|
2346
|
-
* **People Events**: [Reference](https://docs.crisp.chat/references/rtm-api/v1/#people-events)
|
|
2425
|
+
* #### **People Events**: [Reference](https://docs.crisp.chat/references/rtm-api/v1/#people-events)
|
|
2347
2426
|
* **People Profile Created** [`user`, `plugin`]:
|
|
2348
2427
|
* `people:profile:created`
|
|
2349
2428
|
* **People Profile Updated** [`user`, `plugin`]:
|
|
@@ -2359,7 +2438,7 @@ Available events are listed below:
|
|
|
2359
2438
|
* **People Import Done** [`user`]:
|
|
2360
2439
|
* `people:import:done`
|
|
2361
2440
|
|
|
2362
|
-
* **Campaign Events**: [Reference](https://docs.crisp.chat/references/rtm-api/v1/#campaign-events)
|
|
2441
|
+
* #### **Campaign Events**: [Reference](https://docs.crisp.chat/references/rtm-api/v1/#campaign-events)
|
|
2363
2442
|
* **Campaign Progress** [`user`]:
|
|
2364
2443
|
* `campaign:progress`
|
|
2365
2444
|
* **Campaign Dispatched** [`user`]:
|
|
@@ -2367,27 +2446,27 @@ Available events are listed below:
|
|
|
2367
2446
|
* **Campaign Running** [`user`]:
|
|
2368
2447
|
* `campaign:running`
|
|
2369
2448
|
|
|
2370
|
-
* **Browsing Events**: [Reference](https://docs.crisp.chat/references/rtm-api/v1/#browsing-events)
|
|
2449
|
+
* #### **Browsing Events**: [Reference](https://docs.crisp.chat/references/rtm-api/v1/#browsing-events)
|
|
2371
2450
|
* **Browsing Request Initiated** [`user`, `plugin`]:
|
|
2372
2451
|
* `browsing:request:initiated`
|
|
2373
2452
|
* **Browsing Request Rejected** [`user`, `plugin`]:
|
|
2374
2453
|
* `browsing:request:rejected`
|
|
2375
2454
|
|
|
2376
|
-
* **Call Events**: [Reference](https://docs.crisp.chat/references/rtm-api/v1/#call-events)
|
|
2455
|
+
* #### **Call Events**: [Reference](https://docs.crisp.chat/references/rtm-api/v1/#call-events)
|
|
2377
2456
|
* **Call Request Initiated** [`user`, `plugin`]:
|
|
2378
2457
|
* `call:request:initiated`
|
|
2379
2458
|
* **Call Request Rejected** [`user`, `plugin`]:
|
|
2380
2459
|
* `call:request:rejected`
|
|
2381
2460
|
|
|
2382
|
-
* **Widget Events**: [Reference](https://docs.crisp.chat/references/rtm-api/v1/#widget-events)
|
|
2461
|
+
* #### **Widget Events**: [Reference](https://docs.crisp.chat/references/rtm-api/v1/#widget-events)
|
|
2383
2462
|
* **Widget Action Processed** [`user`]:
|
|
2384
2463
|
* `widget:action:processed`
|
|
2385
2464
|
|
|
2386
|
-
* **Status Events**: [Reference](https://docs.crisp.chat/references/rtm-api/v1/#status-events)
|
|
2465
|
+
* #### **Status Events**: [Reference](https://docs.crisp.chat/references/rtm-api/v1/#status-events)
|
|
2387
2466
|
* **Status Health Changed** [`user`]:
|
|
2388
2467
|
* `status:health:changed`
|
|
2389
2468
|
|
|
2390
|
-
* **Website Events**: [Reference](https://docs.crisp.chat/references/rtm-api/v1/#website-events)
|
|
2469
|
+
* #### **Website Events**: [Reference](https://docs.crisp.chat/references/rtm-api/v1/#website-events)
|
|
2391
2470
|
* **Website Update Visitors Count** [`user`, `plugin`]:
|
|
2392
2471
|
* `website:update_visitors_count`
|
|
2393
2472
|
* **Website Update Operators Availability** [`user`, `plugin`]:
|
|
@@ -2395,7 +2474,7 @@ Available events are listed below:
|
|
|
2395
2474
|
* **Website Users Available** [`user`, `plugin`]:
|
|
2396
2475
|
* `website:users:available`
|
|
2397
2476
|
|
|
2398
|
-
* **Bucket Events**: [Reference](https://docs.crisp.chat/references/rtm-api/v1/#bucket-events)
|
|
2477
|
+
* #### **Bucket Events**: [Reference](https://docs.crisp.chat/references/rtm-api/v1/#bucket-events)
|
|
2399
2478
|
* **Bucket URL Upload Generated** [`user`, `plugin`]:
|
|
2400
2479
|
* `bucket:url:upload:generated`
|
|
2401
2480
|
* **Bucket URL Avatar Generated** [`user`, `plugin`]:
|
|
@@ -2411,17 +2490,17 @@ Available events are listed below:
|
|
|
2411
2490
|
* **Bucket URL Processing Generated** [`user`, `plugin`]:
|
|
2412
2491
|
* `bucket:url:processing:generated`
|
|
2413
2492
|
|
|
2414
|
-
* **Media Events**: [Reference](https://docs.crisp.chat/references/rtm-api/v1/#media-events)
|
|
2493
|
+
* #### **Media Events**: [Reference](https://docs.crisp.chat/references/rtm-api/v1/#media-events)
|
|
2415
2494
|
* **Media Animation Listed** [`user`]:
|
|
2416
2495
|
* `media:animation:listed`
|
|
2417
2496
|
|
|
2418
|
-
* **Email Events**: [Reference](https://docs.crisp.chat/references/rtm-api/v1/#email-events)
|
|
2497
|
+
* #### **Email Events**: [Reference](https://docs.crisp.chat/references/rtm-api/v1/#email-events)
|
|
2419
2498
|
* **Email Subscribe** [`user`, `plugin`]:
|
|
2420
2499
|
* `email:subscribe`
|
|
2421
2500
|
* **Email Track View** [`user`, `plugin`]:
|
|
2422
2501
|
* `email:track:view`
|
|
2423
2502
|
|
|
2424
|
-
* **Plugin Events**: [Reference](https://docs.crisp.chat/references/rtm-api/v1/#plugin-events)
|
|
2503
|
+
* #### **Plugin Events**: [Reference](https://docs.crisp.chat/references/rtm-api/v1/#plugin-events)
|
|
2425
2504
|
* **Plugin Channel** [`user`, `plugin`]:
|
|
2426
2505
|
* `plugin:channel`
|
|
2427
2506
|
* **Plugin Event** [`user`, `plugin`]:
|
package/lib/crisp.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* node-crisp-api
|
|
3
3
|
*
|
|
4
|
-
* Copyright
|
|
4
|
+
* Copyright 2022, Crisp IM SAS
|
|
5
5
|
* Author: Baptiste Jamin <baptiste@crisp.chat>
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -46,6 +46,7 @@ Crisp.DEFAULT_RTM_EVENTS = [
|
|
|
46
46
|
"session:set_email",
|
|
47
47
|
"session:set_phone",
|
|
48
48
|
"session:set_address",
|
|
49
|
+
"session:set_subject",
|
|
49
50
|
"session:set_avatar",
|
|
50
51
|
"session:set_nickname",
|
|
51
52
|
"session:set_data",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* node-crisp-api
|
|
3
3
|
*
|
|
4
|
-
* Copyright
|
|
4
|
+
* Copyright 2022, Crisp IM SAS
|
|
5
5
|
* Author: Baptiste Jamin <baptiste@crisp.chat>
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -69,6 +69,18 @@ function PluginConnect(service, crisp) {
|
|
|
69
69
|
_query
|
|
70
70
|
);
|
|
71
71
|
};
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Get Connect Endpoints
|
|
75
|
+
* @memberof PluginConnect
|
|
76
|
+
* @method getConnectEndpoints
|
|
77
|
+
* @return Promise
|
|
78
|
+
*/
|
|
79
|
+
service.getConnectEndpoints = function() {
|
|
80
|
+
return crisp.get(
|
|
81
|
+
crisp._prepareRestUrl(["plugin", "connect", "endpoints"]), {}
|
|
82
|
+
);
|
|
83
|
+
};
|
|
72
84
|
}
|
|
73
85
|
|
|
74
86
|
|
package/lib/services/Bucket.js
CHANGED
package/lib/services/Media.js
CHANGED
package/lib/services/Plugin.js
CHANGED
package/lib/services/Website.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "crisp-api",
|
|
3
3
|
"description": "Crisp API wrapper for Node - official, maintained by Crisp",
|
|
4
|
-
"version": "5.0
|
|
4
|
+
"version": "5.3.0",
|
|
5
5
|
"homepage": "https://github.com/crisp-im/node-crisp-api",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"typescript": "4.4.4"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"socket.io-client": "
|
|
39
|
+
"socket.io-client": "4.4.1",
|
|
40
40
|
"fbemitter": "3.0.0",
|
|
41
41
|
"got": "9.6.0",
|
|
42
42
|
"q": "2.0.3"
|