crisp-api
Version:
Crisp API wrapper for Node - official, maintained by Crisp
77 lines (76 loc) • 2.51 kB
JavaScript
"use strict";
/*
* This file is part of node-crisp-api
*
* Copyright (c) 2025 Crisp IM SAS
* All rights belong to Crisp IM SAS
*/
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
/**************************************************************************
* IMPORTS
***************************************************************************/
// PROJECT: RESOURCES
const BaseResource_1 = __importDefault(require("./BaseResource"));
/**************************************************************************
* CLASSES
***************************************************************************/
/**
* Crisp WebsiteBatch Resource
*/
class WebsiteBatch extends BaseResource_1.default {
/**
* Batch Resolve Conversations
*/
batchResolveConversations(websiteID, operation) {
return this.crisp.patch(this.crisp.prepareRestUrl(["website", websiteID, "batch", "resolve"]), null, operation);
}
;
/**
* Batch Read Conversations
* @memberof WebsiteBatch
* @public
* @method batchReadConversations
* @param {string} websiteID
* @param {object} operation
* @return {Promise}
*/
batchReadConversations(websiteID, operation) {
return this.crisp.patch(this.crisp.prepareRestUrl(["website", websiteID, "batch", "read"]), null, operation);
}
;
/**
* Batch Remove Conversations
* @memberof WebsiteBatch
* @public
* @method batchRemoveConversations
* @param {string} websiteID
* @param {object} operation
* @return {Promise}
*/
batchRemoveConversations(websiteID, operation) {
return this.crisp.patch(this.crisp.prepareRestUrl(["website", websiteID, "batch", "remove"]), null, operation);
}
;
/**
* Batch Remove People
* @memberof WebsiteBatch
* @public
* @method batchRemovePeople
* @param {string} websiteID
* @param {object} people
* @return {Promise}
*/
batchRemovePeople(websiteID, people) {
return this.crisp.patch(this.crisp.prepareRestUrl(["website", websiteID, "batch", "remove"]), null, {
people: people
});
}
;
}
/**************************************************************************
* EXPORTS
***************************************************************************/
exports.default = WebsiteBatch;