Skip to content

Commit

Permalink
Update specs (verify becomes an object with keys: method={password|to…
Browse files Browse the repository at this point in the history
…ken},secret)
  • Loading branch information
valeriansaliou committed Oct 17, 2024
1 parent 5b38b53 commit 9127bc5
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 9 deletions.
16 changes: 13 additions & 3 deletions EXAMPLES.md
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,10 @@ https://docs.crisp.chat/references/rest-api/v1/#delete-helpdesk

var websiteID = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";

var verify = "MySuperSecurePassword";
var verify = {
"method": "password",
"secret": "MySuperSecurePassword";
};

CrispClient.website.deleteHelpdesk(websiteID, verify);

Expand Down Expand Up @@ -1581,7 +1584,10 @@ https://docs.crisp.chat/references/rest-api/v1/#delete-a-website

var websiteID = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";

var verify = "MySuperSecurePassword";
var verify = {
"method": "password",
"secret": "MySuperSecurePassword";
};

CrispClient.website.deleteWebsite(websiteID, verify);

Expand Down Expand Up @@ -1736,7 +1742,11 @@ var websiteID = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";

var email = "[email protected]";
var role = "member";
var verify = "MySuperSecurePassword";

var verify = {
"method": "password",
"secret": "MySuperSecurePassword";
};

CrispClient.website.inviteWebsiteOperator(websiteID, email, role, verify);

Expand Down
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1457,7 +1457,10 @@ _👉 Notice: The `peopleID` argument can be an email or the `peopleID`._
```javascript
var websiteID = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
var verify = "MySuperSecurePassword";
var verify = {
"method": "password",
"secret": "MySuperSecurePassword";
};
CrispClient.website.deleteHelpdesk(websiteID, verify);
```
Expand Down Expand Up @@ -2309,7 +2312,10 @@ _👉 Notice: The `peopleID` argument can be an email or the `peopleID`._
```javascript
var websiteID = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
var verify = "MySuperSecurePassword";
var verify = {
"method": "password",
"secret": "MySuperSecurePassword";
};
CrispClient.website.deleteWebsite(websiteID, verify);
```
Expand Down Expand Up @@ -2504,7 +2510,11 @@ _👉 Notice: The `peopleID` argument can be an email or the `peopleID`._
var email = "[email protected]";
var role = "member";
var verify = "MySuperSecurePassword";
var verify = {
"method": "password",
"secret": "MySuperSecurePassword";
};
CrispClient.website.inviteWebsiteOperator(websiteID, email, role, verify);
```
Expand Down
2 changes: 1 addition & 1 deletion lib/resources/WebsiteBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function WebsiteBase(service, crisp) {
* @public
* @method deleteWebsite
* @param {string} websiteID
* @param {string} verify
* @param {object} verify
* @return {Promise}
*/
service.deleteWebsite = function(websiteID, verify) {
Expand Down
2 changes: 1 addition & 1 deletion lib/resources/WebsiteHelpdesk.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ function WebsiteHelpdesk(service, crisp) {
* @public
* @method deleteHelpdesk
* @param {string} websiteID
* @param {string} verify
* @param {object} verify
* @return {Promise}
*/
service.deleteHelpdesk = function(websiteID, verify) {
Expand Down
2 changes: 1 addition & 1 deletion lib/resources/WebsiteOperator.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ function WebsiteOperator(service, crisp) {
* @param {string} websiteID
* @param {string} email
* @param {string} role
* @param {string} verify
* @param {object} verify
* @return {Promise}
*/
service.inviteWebsiteOperator = function(websiteID, email, role, verify) {
Expand Down

0 comments on commit 9127bc5

Please sign in to comment.