UNPKG

@softvision/webpdf-wsclient-typescript

Version:

A simplified and optimized API client library for the webPDF server

65 lines 2.47 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.LocalAuth = void 0; const index_1 = require("./../index"); class LocalAuth { constructor(data) { let allowAnonymousDefault = false; this.allowAnonymous = typeof (data === null || data === void 0 ? void 0 : data.allowAnonymous) !== "undefined" ? data === null || data === void 0 ? void 0 : data.allowAnonymous : allowAnonymousDefault; let apiEnabledDefault = false; this.apiEnabled = typeof (data === null || data === void 0 ? void 0 : data.apiEnabled) !== "undefined" ? data === null || data === void 0 ? void 0 : data.apiEnabled : apiEnabledDefault; let enabledDefault = false; this.enabled = typeof (data === null || data === void 0 ? void 0 : data.enabled) !== "undefined" ? data === null || data === void 0 ? void 0 : data.enabled : enabledDefault; this.timeout = index_1.PortalAuthTimeout.fromJson(data === null || data === void 0 ? void 0 : data.timeout); let userStorageDefault = "unknown"; this.userStorage = typeof (data === null || data === void 0 ? void 0 : data.userStorage) !== "undefined" ? data === null || data === void 0 ? void 0 : data.userStorage : userStorageDefault; } static getAllowAnonymousDefault() { return false; } static getAllowAnonymousDescription() { return ""; } static getApiEnabledDefault() { return false; } static getApiEnabledDescription() { return ""; } static getEnabledDefault() { return false; } static getEnabledDescription() { return ""; } static getTimeoutDescription() { return ""; } static getUserStorageDefault() { return "unknown"; } static getUserStorageDescription() { return ""; } static fromJson(data) { if (data === undefined || data === null) { return data; } return new LocalAuth(data); } toJson() { var _a; return { 'allowAnonymous': this.allowAnonymous, 'apiEnabled': this.apiEnabled, 'enabled': this.enabled, 'timeout': (_a = this.timeout) === null || _a === void 0 ? void 0 : _a.toJson(), 'userStorage': this.userStorage, }; } clone() { return LocalAuth.fromJson(this.toJson()); } } exports.LocalAuth = LocalAuth; //# sourceMappingURL=LocalAuth.js.map