crisp-api 8.3.0 → 8.3.2

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 CHANGED
@@ -1,6 +1,18 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ ## v8.3.2
5
+
6
+ ### New Features
7
+
8
+ * Added the new `CrispClient.website.resolveHelpdeskLocaleArticlePage` method.
9
+
10
+ ## v8.3.1
11
+
12
+ ### New Features
13
+
14
+ * Added the new `CrispClient.plugin.getPluginUsageBills` method.
15
+
4
16
  ## v8.3.0
5
17
 
6
18
  ### New Features
package/EXAMPLES.md CHANGED
@@ -1053,6 +1053,17 @@ CrispClient.website.deleteHelpdeskLocaleArticle(websiteID, locale, articleId);
1053
1053
 
1054
1054
  =========================
1055
1055
 
1056
+ https://docs.crisp.chat/references/rest-api/v1/#resolve-helpdesk-locale-article-page
1057
+
1058
+ var websiteID = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
1059
+
1060
+ var locale = "en";
1061
+ var articleId = "fd036d68-c619-4c63-9deb-e2ce91733dd6";
1062
+
1063
+ CrispClient.website.resolveHelpdeskLocaleArticlePage(websiteID, locale, articleId);
1064
+
1065
+ =========================
1066
+
1056
1067
  https://docs.crisp.chat/references/rest-api/v1/#resolve-helpdesk-locale-article-category
1057
1068
 
1058
1069
  var websiteID = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
package/README.md CHANGED
@@ -6,7 +6,7 @@ The Crisp API Node wrapper. Authenticate, send messages, fetch conversations, ac
6
6
 
7
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: 17/07/2023
9
+ * **📝 Implements**: [REST API Reference (V1)](https://docs.crisp.chat/references/rest-api/v1/) at revision: 10/04/2024
10
10
  * **😘 Maintainers**: [@baptistejamin](https://github.com/baptistejamin), [@eliottvincent](https://github.com/eliottvincent), [@valeriansaliou](https://github.com/valeriansaliou)
11
11
 
12
12
  ## Installation
@@ -1596,6 +1596,21 @@ _👉 Notice: The `peopleID` argument can be an email or the `peopleID`._
1596
1596
  ```
1597
1597
  </details>
1598
1598
 
1599
+ * **Resolve Helpdesk Locale Article Page** [`user`, `plugin`]: [Reference](https://docs.crisp.chat/references/rest-api/v1/#resolve-helpdesk-locale-article-page)
1600
+ * `CrispClient.website.resolveHelpdeskLocaleArticlePage(websiteID, locale, articleId)`
1601
+ * <details>
1602
+ <summary>See Example</summary>
1603
+
1604
+ ```javascript
1605
+ var websiteID = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
1606
+
1607
+ var locale = "en";
1608
+ var articleId = "fd036d68-c619-4c63-9deb-e2ce91733dd6";
1609
+
1610
+ CrispClient.website.resolveHelpdeskLocaleArticlePage(websiteID, locale, articleId);
1611
+ ```
1612
+ </details>
1613
+
1599
1614
  * **Resolve Helpdesk Locale Article Category** [`user`, `plugin`]: [Reference](https://docs.crisp.chat/references/rest-api/v1/#resolve-helpdesk-locale-article-category)
1600
1615
  * `CrispClient.website.resolveHelpdeskLocaleArticleCategory(websiteID, locale, articleId)`
1601
1616
  * <details>
@@ -3206,6 +3221,19 @@ _👉 Notice: The `peopleID` argument can be an email or the `peopleID`._
3206
3221
  ```
3207
3222
  </details>
3208
3223
 
3224
+ * **Get Plugin Usage Bills** [`user`, `plugin`]: [Reference](https://docs.crisp.chat/references/rest-api/v1/#get-plugin-usage-bills)
3225
+ * `CrispClient.plugin.getPluginUsageBills(websiteID, pluginID)`
3226
+ * <details>
3227
+ <summary>See Example</summary>
3228
+
3229
+ ```javascript
3230
+ var websiteID = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
3231
+ var pluginID = "c64f3595-adee-425a-8d3a-89d47f7ed6bb";
3232
+
3233
+ CrispClient.plugin.getPluginUsageBills(websiteID, pluginID);
3234
+ ```
3235
+ </details>
3236
+
3209
3237
  * **Report Plugin Usage To Bill** [`plugin`]: [Reference](https://docs.crisp.chat/references/rest-api/v1/#report-plugin-usage-to-bill)
3210
3238
  * `CrispClient.plugin.reportPluginUsageToBill(websiteID, pluginID, usage)`
3211
3239
  * <details>
@@ -150,6 +150,23 @@ function PluginSubscription(service, crisp) {
150
150
  );
151
151
  };
152
152
 
153
+ /**
154
+ * Get Plugin Usage Bills
155
+ * @memberof PluginSubscription
156
+ * @public
157
+ * @method getPluginUsageBills
158
+ * @param {string} websiteID
159
+ * @param {string} pluginID
160
+ * @return {Promise}
161
+ */
162
+ service.getPluginUsageBills = function(websiteID, pluginID) {
163
+ return crisp.get(
164
+ crisp._prepareRestUrl([
165
+ "plugins", "subscription", websiteID, pluginID, "bill", "usage"
166
+ ])
167
+ );
168
+ };
169
+
153
170
  /**
154
171
  * Report Plugin Usage To Bill
155
172
  * @memberof PluginSubscription
@@ -328,6 +328,27 @@ function WebsiteHelpdesk(service, crisp) {
328
328
  );
329
329
  };
330
330
 
331
+ /**
332
+ * Resolve Helpdesk Locale Article Page
333
+ * @memberof WebsiteConversation
334
+ * @public
335
+ * @method resolveHelpdeskLocaleArticlePage
336
+ * @param {string} websiteID
337
+ * @param {string} locale
338
+ * @param {string} articleId
339
+ * @return {Promise}
340
+ */
341
+ service.resolveHelpdeskLocaleArticlePage = function(
342
+ websiteID, locale, articleId
343
+ ) {
344
+ return crisp.get(
345
+ crisp._prepareRestUrl([
346
+ "website", websiteID, "helpdesk", "locale", locale, "article",
347
+ articleId, "page"
348
+ ])
349
+ );
350
+ };
351
+
331
352
  /**
332
353
  * Resolve Helpdesk Locale Article Category
333
354
  * @memberof WebsiteConversation
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": "8.3.0",
4
+ "version": "8.3.2",
5
5
  "homepage": "https://github.com/crisp-im/node-crisp-api",
6
6
  "license": "MIT",
7
7
  "author": {