UNPKG

@c8y/client

Version:

Client application programming interface to access the Cumulocity IoT-Platform REST services.

47 lines 1.49 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TenantSecurityOptionsService = void 0; const index_js_1 = require("../core/index.js"); /** * @description * This service allows to get tenant security option. */ class TenantSecurityOptionsService extends index_js_1.Service { constructor() { super(...arguments); this.baseUrl = 'tenant'; this.listUrl = 'security-options'; this.category = 'password'; this.propertyName = 'options'; } /** * Get a specific tenant's security option. * * @param {ITenantSecurityOption} Tenant's security option object with key value. * * @returns Returns promise object that is resolved with the ITenantSecurityOption wrapped by IResult. * * **Example** * ```typescript * * const option: ITenantSecurityOption = { * key: 'limit.validity' * }; * * (async () => { * const {data, res} = await tenantSecurityOptionsService.detail(option); * })(); * ``` */ async detail(tenantSecurityOption) { return super.detail(tenantSecurityOption); } getDetailUrl(tenantSecurityOption) { return `${this.listUrl}/${this.category}/${tenantSecurityOption.key}`; } onBeforeCreate(obj) { return obj; } } exports.TenantSecurityOptionsService = TenantSecurityOptionsService; //# sourceMappingURL=TenantSecurityOptionsService.js.map