@softvision/webpdf-wsclient-typescript
Version:
A simplified and optimized API client library for the webPDF server
129 lines • 5.12 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.AddBarcode = void 0;
const index_1 = require("./../index");
class AddBarcode {
constructor(data) {
this.aztec = (data.aztec || []).map(index_1.AztecBarcode.fromJson);
this.codabar = (data.codabar || []).map(index_1.CodabarBarcode.fromJson);
this.code128 = (data.code128 || []).map(index_1.Code128Barcode.fromJson);
this.code39 = (data.code39 || []).map(index_1.Code39Barcode.fromJson);
this.datamatrix = (data.datamatrix || []).map(index_1.DataMatrixBarcode.fromJson);
this.ean13 = (data.ean13 || []).map(index_1.Ean13Barcode.fromJson);
this.ean8 = (data.ean8 || []).map(index_1.Ean8Barcode.fromJson);
this.itf = (data.itf || []).map(index_1.ItfBarcode.fromJson);
let outputFormatDefault = "pdf";
this.outputFormat = typeof (data === null || data === void 0 ? void 0 : data.outputFormat) !== "undefined" ? data === null || data === void 0 ? void 0 : data.outputFormat : outputFormatDefault;
this.pdf417 = (data.pdf417 || []).map(index_1.Pdf417Barcode.fromJson);
this.qrcode = (data.qrcode || []).map(index_1.QrBarcode.fromJson);
this.qrswiss = (data.qrswiss || []).map(index_1.QrSwissPaymentBarcode.fromJson);
this.upca = (data.upca || []).map(index_1.UpcaBarcode.fromJson);
}
static getAztecDefault() {
return [];
}
static getAztecDescription() {
return "";
}
static getCodabarDefault() {
return [];
}
static getCodabarDescription() {
return "";
}
static getCode128Default() {
return [];
}
static getCode128Description() {
return "";
}
static getCode39Default() {
return [];
}
static getCode39Description() {
return "";
}
static getDatamatrixDefault() {
return [];
}
static getDatamatrixDescription() {
return "";
}
static getEan13Default() {
return [];
}
static getEan13Description() {
return "";
}
static getEan8Default() {
return [];
}
static getEan8Description() {
return "";
}
static getItfDefault() {
return [];
}
static getItfDescription() {
return "";
}
static getOutputFormatDefault() {
return "pdf";
}
static getOutputFormatDescription() {
return "Defines the output format for the barcode generation. The resulting document will be created by this webservice, where selected image formats will completly ignore a possibly given PDF source document and will only contain the barcode image.\n\n**Important:** This parameter is for internal use only. Please only set this value to anything other than \"pdf\", if you are really sure that you need to do so.";
}
static getPdf417Default() {
return [];
}
static getPdf417Description() {
return "";
}
static getQrcodeDefault() {
return [];
}
static getQrcodeDescription() {
return "";
}
static getQrswissDefault() {
return [];
}
static getQrswissDescription() {
return "";
}
static getUpcaDefault() {
return [];
}
static getUpcaDescription() {
return "";
}
static fromJson(data) {
if (data === undefined || data === null) {
return data;
}
return new AddBarcode(data);
}
toJson() {
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
return {
'aztec': (_a = this.aztec) === null || _a === void 0 ? void 0 : _a.map((data) => data.toJson()),
'codabar': (_b = this.codabar) === null || _b === void 0 ? void 0 : _b.map((data) => data.toJson()),
'code128': (_c = this.code128) === null || _c === void 0 ? void 0 : _c.map((data) => data.toJson()),
'code39': (_d = this.code39) === null || _d === void 0 ? void 0 : _d.map((data) => data.toJson()),
'datamatrix': (_e = this.datamatrix) === null || _e === void 0 ? void 0 : _e.map((data) => data.toJson()),
'ean13': (_f = this.ean13) === null || _f === void 0 ? void 0 : _f.map((data) => data.toJson()),
'ean8': (_g = this.ean8) === null || _g === void 0 ? void 0 : _g.map((data) => data.toJson()),
'itf': (_h = this.itf) === null || _h === void 0 ? void 0 : _h.map((data) => data.toJson()),
'outputFormat': this.outputFormat,
'pdf417': (_j = this.pdf417) === null || _j === void 0 ? void 0 : _j.map((data) => data.toJson()),
'qrcode': (_k = this.qrcode) === null || _k === void 0 ? void 0 : _k.map((data) => data.toJson()),
'qrswiss': (_l = this.qrswiss) === null || _l === void 0 ? void 0 : _l.map((data) => data.toJson()),
'upca': (_m = this.upca) === null || _m === void 0 ? void 0 : _m.map((data) => data.toJson()),
};
}
clone() {
return AddBarcode.fromJson(this.toJson());
}
}
exports.AddBarcode = AddBarcode;
//# sourceMappingURL=AddBarcode.js.map