crisp-api 7.2.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 CHANGED
@@ -1,6 +1,12 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ ## v7.3.0
5
+
6
+ ### New Features
7
+
8
+ * Added the new `CrispClient.website.listConversationFiles` method.
9
+
4
10
  ## v7.2.0
5
11
 
6
12
  ### New Features
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
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2022 Crisp
3
+ Copyright (c) 2023 Crisp
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # Crisp API Wrapper
2
2
 
3
- [![Test and Build](https://github.com/crisp-im/node-crisp-api/workflows/Test%20and%20Build/badge.svg?branch=master)](https://github.com/crisp-im/node-crisp-api/actions?query=workflow%3A%22Test+and+Build%22) [![Build and Release](https://github.com/crisp-im/node-crisp-api/workflows/Build%20and%20Release/badge.svg)](https://github.com/crisp-im/node-crisp-api/actions?query=workflow%3A%22Build+and+Release%22) [![NPM](https://img.shields.io/npm/v/crisp-api.svg)](https://www.npmjs.com/package/crisp-api) [![Downloads](https://img.shields.io/npm/dt/crisp-api.svg)](https://www.npmjs.com/package/crisp-api)
3
+ [![Test and Build](https://github.com/crisp-im/node-crisp-api/workflows/Test%20and%20Build/badge.svg?branch=master)](https://github.com/crisp-im/node-crisp-api/actions?query=workflow%3A%22Test+and+Build%22) [![Build and Release](https://github.com/crisp-im/node-crisp-api/workflows/Build%20and%20Release/badge.svg)](https://github.com/crisp-im/node-crisp-api/actions?query=workflow%3A%22Build+and+Release%22) [![Version](https://img.shields.io/npm/v/crisp-api.svg)](https://www.npmjs.com/package/crisp-api) [![Downloads](https://img.shields.io/npm/dt/crisp-api.svg)](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 2022 Crisp IM SAS. See LICENSE for copying information.
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: 29/07/2022
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>
@@ -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
@@ -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": "7.2.0",
4
+ "version": "7.3.0",
5
5
  "homepage": "https://github.com/crisp-im/node-crisp-api",
6
6
  "license": "MIT",
7
7
  "author": {