UNPKG

@c8y/client

Version:

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

49 lines 1.51 kB
import { __awaiter } from "tslib"; import { Service } from '../core/index.js'; /** * @description * This service allows to get tenant security option. */ export class TenantSecurityOptionsService extends 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); * })(); * ``` */ detail(tenantSecurityOption) { const _super = Object.create(null, { detail: { get: () => super.detail } }); return __awaiter(this, void 0, void 0, function* () { return _super.detail.call(this, tenantSecurityOption); }); } getDetailUrl(tenantSecurityOption) { return `${this.listUrl}/${this.category}/${tenantSecurityOption.key}`; } onBeforeCreate(obj) { return obj; } } //# sourceMappingURL=TenantSecurityOptionsService.js.map