UNPKG

@softvision/webpdf-wsclient-typescript

Version:

A simplified and optimized API client library for the webPDF server

121 lines 6.15 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SignatureIdentifier = void 0; class SignatureIdentifier { constructor(data) { let showCommonNameDefault = true; this.showCommonName = typeof (data === null || data === void 0 ? void 0 : data.showCommonName) !== "undefined" ? data === null || data === void 0 ? void 0 : data.showCommonName : showCommonNameDefault; let showCountryDefault = true; this.showCountry = typeof (data === null || data === void 0 ? void 0 : data.showCountry) !== "undefined" ? data === null || data === void 0 ? void 0 : data.showCountry : showCountryDefault; let showDateDefault = true; this.showDate = typeof (data === null || data === void 0 ? void 0 : data.showDate) !== "undefined" ? data === null || data === void 0 ? void 0 : data.showDate : showDateDefault; let showLocalDefault = true; this.showLocal = typeof (data === null || data === void 0 ? void 0 : data.showLocal) !== "undefined" ? data === null || data === void 0 ? void 0 : data.showLocal : showLocalDefault; let showMailDefault = true; this.showMail = typeof (data === null || data === void 0 ? void 0 : data.showMail) !== "undefined" ? data === null || data === void 0 ? void 0 : data.showMail : showMailDefault; let showNameDefault = true; this.showName = typeof (data === null || data === void 0 ? void 0 : data.showName) !== "undefined" ? data === null || data === void 0 ? void 0 : data.showName : showNameDefault; let showOrganisationNameDefault = true; this.showOrganisationName = typeof (data === null || data === void 0 ? void 0 : data.showOrganisationName) !== "undefined" ? data === null || data === void 0 ? void 0 : data.showOrganisationName : showOrganisationNameDefault; let showOrganisationUnitDefault = true; this.showOrganisationUnit = typeof (data === null || data === void 0 ? void 0 : data.showOrganisationUnit) !== "undefined" ? data === null || data === void 0 ? void 0 : data.showOrganisationUnit : showOrganisationUnitDefault; let showSignedByDefault = true; this.showSignedBy = typeof (data === null || data === void 0 ? void 0 : data.showSignedBy) !== "undefined" ? data === null || data === void 0 ? void 0 : data.showSignedBy : showSignedByDefault; let showStateDefault = true; this.showState = typeof (data === null || data === void 0 ? void 0 : data.showState) !== "undefined" ? data === null || data === void 0 ? void 0 : data.showState : showStateDefault; let textSignedByDefault = ""; this.textSignedBy = typeof (data === null || data === void 0 ? void 0 : data.textSignedBy) !== "undefined" ? data === null || data === void 0 ? void 0 : data.textSignedBy : textSignedByDefault; } static getShowCommonNameDefault() { return true; } static getShowCommonNameDescription() { return "Displays or hides the common name (CN) part of the certificate."; } static getShowCountryDefault() { return true; } static getShowCountryDescription() { return "Displays or hides the (ISO valid) country code (C) of the country in which the certificate holder is located."; } static getShowDateDefault() { return true; } static getShowDateDescription() { return "Displays or hides the signature time."; } static getShowLocalDefault() { return true; } static getShowLocalDescription() { return "Displays or hides the location\/city (L) where the certificate holder is located."; } static getShowMailDefault() { return true; } static getShowMailDescription() { return "Displays or hides the email address (E) at which the certificate holder can be contacted."; } static getShowNameDefault() { return true; } static getShowNameDescription() { return "Displays or hides the signature `name`. (If `name` has not been set, the common name (CN) part of the certificate is displayed instead.)"; } static getShowOrganisationNameDefault() { return true; } static getShowOrganisationNameDescription() { return "Displays or hides the certificate holder's organization\/company (O)."; } static getShowOrganisationUnitDefault() { return true; } static getShowOrganisationUnitDescription() { return "Displays or hides the certificate owner's suborganization\/department (OU)."; } static getShowSignedByDefault() { return true; } static getShowSignedByDescription() { return "Displays or hides the text `Digitally signed by`. Can be overridden by the value of `textSignedBy`."; } static getShowStateDefault() { return true; } static getShowStateDescription() { return "Displays or hides the state (S) in which the certificate holder is located."; } static getTextSignedByDefault() { return ""; } static getTextSignedByDescription() { return "Text that is displayed when the `showSignedBy` option is enabled. If not set, then the text `Digitally signed by` is used as default."; } static fromJson(data) { if (data === undefined || data === null) { return data; } return new SignatureIdentifier(data); } toJson() { return { 'showCommonName': this.showCommonName, 'showCountry': this.showCountry, 'showDate': this.showDate, 'showLocal': this.showLocal, 'showMail': this.showMail, 'showName': this.showName, 'showOrganisationName': this.showOrganisationName, 'showOrganisationUnit': this.showOrganisationUnit, 'showSignedBy': this.showSignedBy, 'showState': this.showState, 'textSignedBy': this.textSignedBy, }; } clone() { return SignatureIdentifier.fromJson(this.toJson()); } } exports.SignatureIdentifier = SignatureIdentifier; //# sourceMappingURL=SignatureIdentifier.js.map