UNPKG

browser-sdk

Version:

javascript SDK for the lightelligence-platform

50 lines (40 loc) 1.2 kB
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _apiService = _interopRequireDefault(require("../tools/apiService")); /** * Methods for client operations */ class Client { /** * Create a new client for your current tenant. * As stated in the Client model, the client secret will only be * returned upon client creation, and you will never be able to * get it again. Store it safe and secure. * @param {object} client * @returns {Promise} */ static createClient(client) { return _apiService.default.call('/clients', 'POST', client); } /** * Get the client for the supplied clientId * @param {string} clientId * @returns {Promise} */ static getClient(clientId) { return _apiService.default.call("/clients/".concat(clientId)); } /** * Delete the client for the supplied clientId * @param {string} clientId * @returns {Promise} */ static deleteClient(clientId) { return _apiService.default.call("/clients/".concat(clientId), 'DELETE'); } } exports.default = Client;