crisp-api
Version:
Crisp API wrapper for Node - official, maintained by Crisp
57 lines (56 loc) • 1.84 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 WebsiteVerify Resource
*/
class WebsiteVerify extends BaseResource_1.default {
/**
* Get Verify Settings
*/
getVerifySettings(websiteID) {
return this.crisp.get(this.crisp.prepareRestUrl(["website", websiteID, "verify", "settings"]));
}
;
/**
* Update Verify Settings
*/
updateVerifySettings(websiteID, settings) {
return this.crisp.patch(this.crisp.prepareRestUrl(["website", websiteID, "verify", "settings"]), null, settings);
}
;
/**
* Get Verify Key
*/
getVerifyKey(websiteID) {
return this.crisp.get(this.crisp.prepareRestUrl(["website", websiteID, "verify", "key"]));
}
;
/**
* Roll Verify Key
*/
rollVerifyKey(websiteID) {
return this.crisp.post(this.crisp.prepareRestUrl(["website", websiteID, "verify", "key"]), null, null);
}
;
}
/**************************************************************************
* EXPORTS
***************************************************************************/
exports.default = WebsiteVerify;