crisp-api 10.1.0 → 10.2.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 CHANGED
@@ -1,6 +1,12 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ ## v10.2.0
5
+
6
+ ### New Features
7
+
8
+ * Added the new `CrispClient.plugin.getPluginAttestProvenance` method.
9
+
4
10
  ## v10.1.0
5
11
 
6
12
  ### New Features
package/EXAMPLES.md CHANGED
@@ -2358,6 +2358,39 @@ CrispClient.plugin.updateSubscriptionSettings(websiteID, pluginID, settings);
2358
2358
 
2359
2359
  =========================
2360
2360
 
2361
+ https://docs.crisp.chat/references/rest-api/v1/#get-plugin-usage-bills
2362
+
2363
+ var websiteID = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
2364
+ var pluginID = "c64f3595-adee-425a-8d3a-89d47f7ed6bb";
2365
+
2366
+ CrispClient.plugin.getPluginUsageBills(websiteID, pluginID);
2367
+
2368
+ =========================
2369
+
2370
+ https://docs.crisp.chat/references/rest-api/v1/#report-plugin-usage-to-bill
2371
+
2372
+ var websiteID = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
2373
+ var pluginID = "c64f3595-adee-425a-8d3a-89d47f7ed6bb";
2374
+
2375
+ var usage = {
2376
+ "name": "Paid messages sent",
2377
+ "units": 250,
2378
+ "price": 0.10
2379
+ };
2380
+
2381
+ CrispClient.plugin.reportPluginUsageToBill(websiteID, pluginID, usage);
2382
+
2383
+ =========================
2384
+
2385
+ https://docs.crisp.chat/references/rest-api/v1/#get-plugin-attest-provenance
2386
+
2387
+ var websiteID = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
2388
+ var pluginID = "c64f3595-adee-425a-8d3a-89d47f7ed6bb";
2389
+
2390
+ CrispClient.plugin.getPluginAttestProvenance(websiteID, pluginID);
2391
+
2392
+ =========================
2393
+
2361
2394
  https://docs.crisp.chat/references/rest-api/v1/#forward-plugin-payload-to-channel
2362
2395
 
2363
2396
  var websiteID = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
package/README.md CHANGED
@@ -3404,6 +3404,19 @@ _👉 Notice: The `peopleID` argument can be an email or the `peopleID`._
3404
3404
  ```
3405
3405
  </details>
3406
3406
 
3407
+ * **Get Plugin Attest Provenance** [`user`, `plugin`]: [Reference](https://docs.crisp.chat/references/rest-api/v1/#get-plugin-attest-provenance)
3408
+ * `CrispClient.plugin.getPluginAttestProvenance(websiteID, pluginID)`
3409
+ * <details>
3410
+ <summary>See Example</summary>
3411
+
3412
+ ```javascript
3413
+ var websiteID = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
3414
+ var pluginID = "c64f3595-adee-425a-8d3a-89d47f7ed6bb";
3415
+
3416
+ CrispClient.plugin.getPluginAttestProvenance(websiteID, pluginID);
3417
+ ```
3418
+ </details>
3419
+
3407
3420
  * **Forward Plugin Payload To Channel** [`user`, `plugin`]: [Reference](https://docs.crisp.chat/references/rest-api/v1/#forward-plugin-payload-to-channel)
3408
3421
  * `CrispClient.plugin.forwardPluginPayloadToChannel(websiteID, pluginID, payload)`
3409
3422
  * <details>
package/dist/crisp.js CHANGED
@@ -45,7 +45,7 @@ const AVAILABLE_RTM_MODES = [
45
45
  "websockets",
46
46
  "webhooks"
47
47
  ];
48
- const VERSION = "10.1.0";
48
+ const VERSION = "10.2.0";
49
49
  // Base configuration
50
50
  const DEFAULT_REQUEST_TIMEOUT = 10000;
51
51
  const DEFAULT_SOCKET_TIMEOUT = 10000;
@@ -97,6 +97,10 @@ declare class PluginSubscriptionService extends BaseResource {
97
97
  * Report Plugin Usage To Bill
98
98
  */
99
99
  reportPluginUsageToBill(websiteID: string, pluginID: string, usage: object): Promise<any>;
100
+ /**
101
+ * Get Plugin Attest Provenance
102
+ */
103
+ getPluginAttestProvenance(websiteID: string, pluginID: string): Promise<any>;
100
104
  /**
101
105
  * Forward Plugin Payload To Channel
102
106
  */
@@ -105,6 +105,15 @@ class PluginSubscriptionService extends BaseResource_1.default {
105
105
  ]), null, usage);
106
106
  }
107
107
  ;
108
+ /**
109
+ * Get Plugin Attest Provenance
110
+ */
111
+ getPluginAttestProvenance(websiteID, pluginID) {
112
+ return this.crisp.get(this.crisp.prepareRestUrl([
113
+ "plugins", "subscription", websiteID, pluginID, "attest", "provenance"
114
+ ]));
115
+ }
116
+ ;
108
117
  /**
109
118
  * Forward Plugin Payload To Channel
110
119
  */
@@ -198,6 +198,17 @@ class PluginSubscriptionService extends BaseResource {
198
198
  );
199
199
  };
200
200
 
201
+ /**
202
+ * Get Plugin Attest Provenance
203
+ */
204
+ getPluginAttestProvenance(websiteID: string, pluginID: string) {
205
+ return this.crisp.get(
206
+ this.crisp.prepareRestUrl([
207
+ "plugins", "subscription", websiteID, pluginID, "attest", "provenance"
208
+ ])
209
+ );
210
+ };
211
+
201
212
  /**
202
213
  * Forward Plugin Payload To Channel
203
214
  */
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": "10.1.0",
4
+ "version": "10.2.0",
5
5
  "homepage": "https://github.com/crisp-im/node-crisp-api",
6
6
  "license": "MIT",
7
7
  "author": {