UNPKG

groupdocs-parser-cloud

Version:
2,181 lines (2,180 loc) 45.3 kB
"use strict"; /* * The MIT License (MIT) * * Copyright (c) Aspose Pty Ltd * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.ContainerOptions = exports.BarcodesOptions = exports.TextStyle = exports.TextResult = exports.TextPage = exports.TemplateResult = exports.TemplateOptions = exports.Template = exports.TableLayout = exports.Table = exports.StorageFile = exports.StorageExist = exports.Size = exports.Rectangle = exports.Point = exports.ParserOptions = exports.ParseResult = exports.PageTextArea = exports.PageTableAreaCell = exports.PageTableArea = exports.PageArea = exports.Page = exports.ObjectExist = exports.ModelError = exports.InfoResult = exports.ImagesResult = exports.ImagePage = exports.Image = exports.FormattedTextOptions = exports.FormatsResult = exports.Format = exports.FilesUploadResult = exports.FilesList = exports.FileVersions = exports.FileType = exports.FileInfo = exports.FieldPosition = exports.FieldData = exports.Field = exports.ErrorDetails = exports.DiscUsage = exports.DetectorParameters = exports.CreateTemplateOptions = exports.Coordinates = exports.ContainerResult = exports.ContainerItemInfo = exports.ContainerItem = exports.BarcodesResult = exports.BarcodePage = exports.Barcode = void 0; exports.GetTemplateRequest = exports.DeleteTemplateRequest = exports.CreateTemplateRequest = exports.StorageExistsRequest = exports.ObjectExistsRequest = exports.GetFileVersionsRequest = exports.GetDiscUsageRequest = exports.TextRequest = exports.ParseRequest = exports.ImagesRequest = exports.BarcodesRequest = exports.GetInfoRequest = exports.ContainerRequest = exports.MoveFolderRequest = exports.GetFilesListRequest = exports.DeleteFolderRequest = exports.CreateFolderRequest = exports.CopyFolderRequest = exports.UploadFileRequest = exports.MoveFileRequest = exports.DownloadFileRequest = exports.DeleteFileRequest = exports.CopyFileRequest = exports.typeMap = exports.enumsMap = exports.TextOptions = exports.ParseOptions = exports.InfoOptions = exports.ImagesOptions = exports.FileVersion = void 0; /** * Represents an barcode. */ class Barcode { /** * Returns attribute type map */ static getAttributeTypeMap() { return Barcode.attributeTypeMap; } constructor(init) { Object.assign(this, init); } } exports.Barcode = Barcode; /** * Attribute type map */ Barcode.attributeTypeMap = [ { name: "codeTypeName", baseName: "codeTypeName", type: "string", }, { name: "page", baseName: "page", type: "BarcodePage", }, { name: "rectangle", baseName: "rectangle", type: "Rectangle", }, { name: "value", baseName: "value", type: "string", }, { name: "downloadUrl", baseName: "downloadUrl", type: "string", } ]; class BarcodePage { /** * Returns attribute type map */ static getAttributeTypeMap() { return BarcodePage.attributeTypeMap; } constructor(init) { Object.assign(this, init); } } exports.BarcodePage = BarcodePage; /** * Attribute type map */ BarcodePage.attributeTypeMap = [ { name: "index", baseName: "index", type: "number", }, { name: "size", baseName: "size", type: "Size", } ]; class BarcodesResult { /** * Returns attribute type map */ static getAttributeTypeMap() { return BarcodesResult.attributeTypeMap; } constructor(init) { Object.assign(this, init); } } exports.BarcodesResult = BarcodesResult; /** * Attribute type map */ BarcodesResult.attributeTypeMap = [ { name: "barcodes", baseName: "barcodes", type: "Array<Barcode>", } ]; /** * Represents a container item like Zip archive entity, email attachment, PDF Portfolio item and so on. */ class ContainerItem { /** * Returns attribute type map */ static getAttributeTypeMap() { return ContainerItem.attributeTypeMap; } constructor(init) { Object.assign(this, init); } } exports.ContainerItem = ContainerItem; /** * Attribute type map */ ContainerItem.attributeTypeMap = [ { name: "name", baseName: "name", type: "string", }, { name: "filePath", baseName: "filePath", type: "string", }, { name: "directory", baseName: "directory", type: "string", }, { name: "metadata", baseName: "metadata", type: "{ [key: string]: string; }", } ]; /** * Container item info. */ class ContainerItemInfo { /** * Returns attribute type map */ static getAttributeTypeMap() { return ContainerItemInfo.attributeTypeMap; } constructor(init) { Object.assign(this, init); } } exports.ContainerItemInfo = ContainerItemInfo; /** * Attribute type map */ ContainerItemInfo.attributeTypeMap = [ { name: "relativePath", baseName: "relativePath", type: "string", }, { name: "password", baseName: "password", type: "string", } ]; /** * Container result. */ class ContainerResult { /** * Returns attribute type map */ static getAttributeTypeMap() { return ContainerResult.attributeTypeMap; } constructor(init) { Object.assign(this, init); } } exports.ContainerResult = ContainerResult; /** * Attribute type map */ ContainerResult.attributeTypeMap = [ { name: "containerItems", baseName: "containerItems", type: "Array<ContainerItem>", } ]; /** * Class for rectangle coordinates. */ class Coordinates { /** * Returns attribute type map */ static getAttributeTypeMap() { return Coordinates.attributeTypeMap; } constructor(init) { Object.assign(this, init); } } exports.Coordinates = Coordinates; /** * Attribute type map */ Coordinates.attributeTypeMap = [ { name: "top", baseName: "top", type: "number", }, { name: "bottom", baseName: "bottom", type: "number", }, { name: "left", baseName: "left", type: "number", }, { name: "right", baseName: "right", type: "number", } ]; /** * Template methods options. */ class CreateTemplateOptions { /** * Returns attribute type map */ static getAttributeTypeMap() { return CreateTemplateOptions.attributeTypeMap; } constructor(init) { Object.assign(this, init); } } exports.CreateTemplateOptions = CreateTemplateOptions; /** * Attribute type map */ CreateTemplateOptions.attributeTypeMap = [ { name: "template", baseName: "template", type: "Template", }, { name: "templatePath", baseName: "templatePath", type: "string", }, { name: "storageName", baseName: "storageName", type: "string", } ]; /** * Provides parameters for the table detection algorithms. */ class DetectorParameters { /** * Returns attribute type map */ static getAttributeTypeMap() { return DetectorParameters.attributeTypeMap; } constructor(init) { Object.assign(this, init); } } exports.DetectorParameters = DetectorParameters; /** * Attribute type map */ DetectorParameters.attributeTypeMap = [ { name: "minRowCount", baseName: "minRowCount", type: "number", }, { name: "minColumnCount", baseName: "minColumnCount", type: "number", }, { name: "minVerticalSpace", baseName: "minVerticalSpace", type: "number", }, { name: "hasMergedCells", baseName: "hasMergedCells", type: "boolean", }, { name: "rectangle", baseName: "rectangle", type: "Rectangle", }, { name: "verticalSeparators", baseName: "verticalSeparators", type: "Array<number>", } ]; /** * Class for disc space information. */ class DiscUsage { /** * Returns attribute type map */ static getAttributeTypeMap() { return DiscUsage.attributeTypeMap; } constructor(init) { Object.assign(this, init); } } exports.DiscUsage = DiscUsage; /** * Attribute type map */ DiscUsage.attributeTypeMap = [ { name: "usedSize", baseName: "usedSize", type: "number", }, { name: "totalSize", baseName: "totalSize", type: "number", } ]; /** * The error details */ class ErrorDetails { /** * Returns attribute type map */ static getAttributeTypeMap() { return ErrorDetails.attributeTypeMap; } constructor(init) { Object.assign(this, init); } } exports.ErrorDetails = ErrorDetails; /** * Attribute type map */ ErrorDetails.attributeTypeMap = [ { name: "requestId", baseName: "requestId", type: "string", }, { name: "date", baseName: "date", type: "Date", } ]; /** * Field of document template */ class Field { /** * Returns attribute type map */ static getAttributeTypeMap() { return Field.attributeTypeMap; } constructor(init) { Object.assign(this, init); } } exports.Field = Field; /** * Attribute type map */ Field.attributeTypeMap = [ { name: "fieldName", baseName: "fieldName", type: "string", }, { name: "pageIndex", baseName: "pageIndex", type: "number", }, { name: "fieldPosition", baseName: "fieldPosition", type: "FieldPosition", } ]; /** * Class for document field data. */ class FieldData { /** * Returns attribute type map */ static getAttributeTypeMap() { return FieldData.attributeTypeMap; } constructor(init) { Object.assign(this, init); } } exports.FieldData = FieldData; /** * Attribute type map */ FieldData.attributeTypeMap = [ { name: "name", baseName: "name", type: "string", }, { name: "pageIndex", baseName: "pageIndex", type: "number", }, { name: "pageArea", baseName: "pageArea", type: "PageArea", }, { name: "linkedField", baseName: "linkedField", type: "FieldData", } ]; /** * Field position class. */ class FieldPosition { /** * Returns attribute type map */ static getAttributeTypeMap() { return FieldPosition.attributeTypeMap; } constructor(init) { Object.assign(this, init); } } exports.FieldPosition = FieldPosition; /** * Attribute type map */ FieldPosition.attributeTypeMap = [ { name: "fieldPositionType", baseName: "fieldPositionType", type: "string", }, { name: "rectangle", baseName: "rectangle", type: "Rectangle", }, { name: "regex", baseName: "regex", type: "string", }, { name: "matchCase", baseName: "matchCase", type: "boolean", }, { name: "linkedFieldName", baseName: "linkedFieldName", type: "string", }, { name: "isLeftLinked", baseName: "isLeftLinked", type: "boolean", }, { name: "isRightLinked", baseName: "isRightLinked", type: "boolean", }, { name: "isTopLinked", baseName: "isTopLinked", type: "boolean", }, { name: "isBottomLinked", baseName: "isBottomLinked", type: "boolean", }, { name: "searchArea", baseName: "searchArea", type: "Size", }, { name: "autoScale", baseName: "autoScale", type: "boolean", } ]; /** * File info */ class FileInfo { /** * Returns attribute type map */ static getAttributeTypeMap() { return FileInfo.attributeTypeMap; } constructor(init) { Object.assign(this, init); } } exports.FileInfo = FileInfo; /** * Attribute type map */ FileInfo.attributeTypeMap = [ { name: "filePath", baseName: "filePath", type: "string", }, { name: "storageName", baseName: "storageName", type: "string", }, { name: "password", baseName: "password", type: "string", } ]; /** * Represents the file type. */ class FileType { /** * Returns attribute type map */ static getAttributeTypeMap() { return FileType.attributeTypeMap; } constructor(init) { Object.assign(this, init); } } exports.FileType = FileType; /** * Attribute type map */ FileType.attributeTypeMap = [ { name: "fileFormat", baseName: "fileFormat", type: "string", }, { name: "extension", baseName: "extension", type: "string", } ]; /** * File versions FileVersion. */ class FileVersions { /** * Returns attribute type map */ static getAttributeTypeMap() { return FileVersions.attributeTypeMap; } constructor(init) { Object.assign(this, init); } } exports.FileVersions = FileVersions; /** * Attribute type map */ FileVersions.attributeTypeMap = [ { name: "value", baseName: "value", type: "Array<FileVersion>", } ]; /** * Files list */ class FilesList { /** * Returns attribute type map */ static getAttributeTypeMap() { return FilesList.attributeTypeMap; } constructor(init) { Object.assign(this, init); } } exports.FilesList = FilesList; /** * Attribute type map */ FilesList.attributeTypeMap = [ { name: "value", baseName: "value", type: "Array<StorageFile>", } ]; /** * File upload result */ class FilesUploadResult { /** * Returns attribute type map */ static getAttributeTypeMap() { return FilesUploadResult.attributeTypeMap; } constructor(init) { Object.assign(this, init); } } exports.FilesUploadResult = FilesUploadResult; /** * Attribute type map */ FilesUploadResult.attributeTypeMap = [ { name: "uploaded", baseName: "uploaded", type: "Array<string>", }, { name: "errors", baseName: "errors", type: "Array<Error>", } ]; /** * File-format */ class Format { /** * Returns attribute type map */ static getAttributeTypeMap() { return Format.attributeTypeMap; } constructor(init) { Object.assign(this, init); } } exports.Format = Format; /** * Attribute type map */ Format.attributeTypeMap = [ { name: "extension", baseName: "extension", type: "string", }, { name: "fileFormat", baseName: "fileFormat", type: "string", } ]; /** * Describes object which contains list of supported file formats. */ class FormatsResult { /** * Returns attribute type map */ static getAttributeTypeMap() { return FormatsResult.attributeTypeMap; } constructor(init) { Object.assign(this, init); } } exports.FormatsResult = FormatsResult; /** * Attribute type map */ FormatsResult.attributeTypeMap = [ { name: "formats", baseName: "formats", type: "Array<Format>", } ]; /** * Provides the options which are used for formatted text extraction. */ class FormattedTextOptions { /** * Returns attribute type map */ static getAttributeTypeMap() { return FormattedTextOptions.attributeTypeMap; } constructor(init) { Object.assign(this, init); } } exports.FormattedTextOptions = FormattedTextOptions; /** * Attribute type map */ FormattedTextOptions.attributeTypeMap = [ { name: "mode", baseName: "mode", type: "string", } ]; /** * Represents an image. */ class Image { /** * Returns attribute type map */ static getAttributeTypeMap() { return Image.attributeTypeMap; } constructor(init) { Object.assign(this, init); } } exports.Image = Image; /** * Attribute type map */ Image.attributeTypeMap = [ { name: "path", baseName: "path", type: "string", }, { name: "downloadUrl", baseName: "downloadUrl", type: "string", }, { name: "pageIndex", baseName: "pageIndex", type: "number", }, { name: "rotation", baseName: "rotation", type: "number", }, { name: "fileFormat", baseName: "fileFormat", type: "string", }, { name: "rectangle", baseName: "rectangle", type: "Rectangle", } ]; /** * Represents page object with image collection. */ class ImagePage { /** * Returns attribute type map */ static getAttributeTypeMap() { return ImagePage.attributeTypeMap; } constructor(init) { Object.assign(this, init); } } exports.ImagePage = ImagePage; /** * Attribute type map */ ImagePage.attributeTypeMap = [ { name: "pageIndex", baseName: "pageIndex", type: "number", }, { name: "images", baseName: "images", type: "Array<Image>", } ]; /** * Images result. */ class ImagesResult { /** * Returns attribute type map */ static getAttributeTypeMap() { return ImagesResult.attributeTypeMap; } constructor(init) { Object.assign(this, init); } } exports.ImagesResult = ImagesResult; /** * Attribute type map */ ImagesResult.attributeTypeMap = [ { name: "images", baseName: "images", type: "Array<Image>", }, { name: "pages", baseName: "pages", type: "Array<ImagePage>", } ]; /** * Info result. */ class InfoResult { /** * Returns attribute type map */ static getAttributeTypeMap() { return InfoResult.attributeTypeMap; } constructor(init) { Object.assign(this, init); } } exports.InfoResult = InfoResult; /** * Attribute type map */ InfoResult.attributeTypeMap = [ { name: "fileType", baseName: "fileType", type: "FileType", }, { name: "size", baseName: "size", type: "number", }, { name: "pageCount", baseName: "pageCount", type: "number", }, { name: "encoding", baseName: "encoding", type: "string", } ]; /** * Error */ class ModelError { /** * Returns attribute type map */ static getAttributeTypeMap() { return ModelError.attributeTypeMap; } constructor(init) { Object.assign(this, init); } } exports.ModelError = ModelError; /** * Attribute type map */ ModelError.attributeTypeMap = [ { name: "code", baseName: "code", type: "string", }, { name: "message", baseName: "message", type: "string", }, { name: "description", baseName: "description", type: "string", }, { name: "innerError", baseName: "innerError", type: "ErrorDetails", } ]; /** * Object exists */ class ObjectExist { /** * Returns attribute type map */ static getAttributeTypeMap() { return ObjectExist.attributeTypeMap; } constructor(init) { Object.assign(this, init); } } exports.ObjectExist = ObjectExist; /** * Attribute type map */ ObjectExist.attributeTypeMap = [ { name: "exists", baseName: "exists", type: "boolean", }, { name: "isFolder", baseName: "isFolder", type: "boolean", } ]; /** * The document page information such as page index and page size. */ class Page { /** * Returns attribute type map */ static getAttributeTypeMap() { return Page.attributeTypeMap; } constructor(init) { Object.assign(this, init); } } exports.Page = Page; /** * Attribute type map */ Page.attributeTypeMap = [ { name: "index", baseName: "index", type: "number", }, { name: "size", baseName: "size", type: "Size", } ]; /** * Class for document page area. */ class PageArea { /** * Returns attribute type map */ static getAttributeTypeMap() { return PageArea.attributeTypeMap; } constructor(init) { Object.assign(this, init); } } exports.PageArea = PageArea; /** * Attribute type map */ PageArea.attributeTypeMap = [ { name: "rectangle", baseName: "rectangle", type: "Rectangle", }, { name: "page", baseName: "page", type: "Page", }, { name: "pageTextArea", baseName: "pageTextArea", type: "PageTextArea", }, { name: "pageTableArea", baseName: "pageTableArea", type: "PageTableArea", } ]; /** * Represents a table page area which is used to represent a table in the parsing by template functionality. */ class PageTableArea { /** * Returns attribute type map */ static getAttributeTypeMap() { return PageTableArea.attributeTypeMap; } constructor(init) { Object.assign(this, init); } } exports.PageTableArea = PageTableArea; /** * Attribute type map */ PageTableArea.attributeTypeMap = [ { name: "rowCount", baseName: "rowCount", type: "number", }, { name: "columnCount", baseName: "columnCount", type: "number", }, { name: "pageTableAreaCells", baseName: "pageTableAreaCells", type: "Array<PageTableAreaCell>", } ]; /** * Represents a table cell. */ class PageTableAreaCell { /** * Returns attribute type map */ static getAttributeTypeMap() { return PageTableAreaCell.attributeTypeMap; } constructor(init) { Object.assign(this, init); } } exports.PageTableAreaCell = PageTableAreaCell; /** * Attribute type map */ PageTableAreaCell.attributeTypeMap = [ { name: "columnIndex", baseName: "columnIndex", type: "number", }, { name: "columnSpan", baseName: "columnSpan", type: "number", }, { name: "pageArea", baseName: "pageArea", type: "PageArea", }, { name: "rowIndex", baseName: "rowIndex", type: "number", }, { name: "rowSpan", baseName: "rowSpan", type: "number", } ]; /** * Represents a page text area which is used to represent a text value in the parsing by template functionality. */ class PageTextArea { /** * Returns attribute type map */ static getAttributeTypeMap() { return PageTextArea.attributeTypeMap; } constructor(init) { Object.assign(this, init); } } exports.PageTextArea = PageTextArea; /** * Attribute type map */ PageTextArea.attributeTypeMap = [ { name: "text", baseName: "text", type: "string", }, { name: "baseLine", baseName: "baseLine", type: "number", }, { name: "areas", baseName: "areas", type: "Array<PageTextArea>", }, { name: "textStyle", baseName: "textStyle", type: "TextStyle", } ]; /** * Parse result. */ class ParseResult { /** * Returns attribute type map */ static getAttributeTypeMap() { return ParseResult.attributeTypeMap; } constructor(init) { Object.assign(this, init); } } exports.ParseResult = ParseResult; /** * Attribute type map */ ParseResult.attributeTypeMap = [ { name: "count", baseName: "count", type: "number", }, { name: "fieldsData", baseName: "fieldsData", type: "Array<FieldData>", } ]; /** * Base options class. */ class ParserOptions { /** * Returns attribute type map */ static getAttributeTypeMap() { return ParserOptions.attributeTypeMap; } constructor(init) { Object.assign(this, init); } } exports.ParserOptions = ParserOptions; /** * Attribute type map */ ParserOptions.attributeTypeMap = [ { name: "fileInfo", baseName: "fileInfo", type: "FileInfo", }, { name: "containerItemInfo", baseName: "containerItemInfo", type: "ContainerItemInfo", } ]; /** * Class for rectangle position model. */ class Point { /** * Returns attribute type map */ static getAttributeTypeMap() { return Point.attributeTypeMap; } constructor(init) { Object.assign(this, init); } } exports.Point = Point; /** * Attribute type map */ Point.attributeTypeMap = [ { name: "x", baseName: "x", type: "number", }, { name: "y", baseName: "y", type: "number", } ]; /** * Rectangular area on the page. */ class Rectangle { /** * Returns attribute type map */ static getAttributeTypeMap() { return Rectangle.attributeTypeMap; } constructor(init) { Object.assign(this, init); } } exports.Rectangle = Rectangle; /** * Attribute type map */ Rectangle.attributeTypeMap = [ { name: "position", baseName: "position", type: "Point", }, { name: "size", baseName: "size", type: "Size", }, { name: "coordinates", baseName: "coordinates", type: "Coordinates", } ]; /** * Represents a size of rectangular area. */ class Size { /** * Returns attribute type map */ static getAttributeTypeMap() { return Size.attributeTypeMap; } constructor(init) { Object.assign(this, init); } } exports.Size = Size; /** * Attribute type map */ Size.attributeTypeMap = [ { name: "height", baseName: "height", type: "number", }, { name: "width", baseName: "width", type: "number", } ]; /** * Storage exists */ class StorageExist { /** * Returns attribute type map */ static getAttributeTypeMap() { return StorageExist.attributeTypeMap; } constructor(init) { Object.assign(this, init); } } exports.StorageExist = StorageExist; /** * Attribute type map */ StorageExist.attributeTypeMap = [ { name: "exists", baseName: "exists", type: "boolean", } ]; /** * File or folder information */ class StorageFile { /** * Returns attribute type map */ static getAttributeTypeMap() { return StorageFile.attributeTypeMap; } constructor(init) { Object.assign(this, init); } } exports.StorageFile = StorageFile; /** * Attribute type map */ StorageFile.attributeTypeMap = [ { name: "name", baseName: "name", type: "string", }, { name: "isFolder", baseName: "isFolder", type: "boolean", }, { name: "modifiedDate", baseName: "modifiedDate", type: "Date", }, { name: "size", baseName: "size", type: "number", }, { name: "path", baseName: "path", type: "string", } ]; /** * Document template table */ class Table { /** * Returns attribute type map */ static getAttributeTypeMap() { return Table.attributeTypeMap; } constructor(init) { Object.assign(this, init); } } exports.Table = Table; /** * Attribute type map */ Table.attributeTypeMap = [ { name: "tableName", baseName: "tableName", type: "string", }, { name: "pageIndex", baseName: "pageIndex", type: "number", }, { name: "detectorParameters", baseName: "detectorParameters", type: "DetectorParameters", }, { name: "tableLayout", baseName: "tableLayout", type: "TableLayout", } ]; /** * Provides the template table layout which is used by Table to define table position. */ class TableLayout { /** * Returns attribute type map */ static getAttributeTypeMap() { return TableLayout.attributeTypeMap; } constructor(init) { Object.assign(this, init); } } exports.TableLayout = TableLayout; /** * Attribute type map */ TableLayout.attributeTypeMap = [ { name: "verticalSeparators", baseName: "verticalSeparators", type: "Array<number>", }, { name: "horizontalSeparators", baseName: "horizontalSeparators", type: "Array<number>", } ]; /** * User-generated template to extract metadata from the document. */ class Template { /** * Returns attribute type map */ static getAttributeTypeMap() { return Template.attributeTypeMap; } constructor(init) { Object.assign(this, init); } } exports.Template = Template; /** * Attribute type map */ Template.attributeTypeMap = [ { name: "fields", baseName: "fields", type: "Array<Field>", }, { name: "tables", baseName: "tables", type: "Array<Table>", } ]; /** * Template methods options. */ class TemplateOptions { /** * Returns attribute type map */ static getAttributeTypeMap() { return TemplateOptions.attributeTypeMap; } constructor(init) { Object.assign(this, init); } } exports.TemplateOptions = TemplateOptions; /** * Attribute type map */ TemplateOptions.attributeTypeMap = [ { name: "templatePath", baseName: "templatePath", type: "string", }, { name: "storageName", baseName: "storageName", type: "string", } ]; /** * Document template result. */ class TemplateResult { /** * Returns attribute type map */ static getAttributeTypeMap() { return TemplateResult.attributeTypeMap; } constructor(init) { Object.assign(this, init); } } exports.TemplateResult = TemplateResult; /** * Attribute type map */ TemplateResult.attributeTypeMap = [ { name: "url", baseName: "url", type: "string", }, { name: "templatePath", baseName: "templatePath", type: "string", } ]; /** * Extracted text page class. */ class TextPage { /** * Returns attribute type map */ static getAttributeTypeMap() { return TextPage.attributeTypeMap; } constructor(init) { Object.assign(this, init); } } exports.TextPage = TextPage; /** * Attribute type map */ TextPage.attributeTypeMap = [ { name: "pageIndex", baseName: "pageIndex", type: "number", }, { name: "text", baseName: "text", type: "string", } ]; /** * The result od text extraction. */ class TextResult { /** * Returns attribute type map */ static getAttributeTypeMap() { return TextResult.attributeTypeMap; } constructor(init) { Object.assign(this, init); } } exports.TextResult = TextResult; /** * Attribute type map */ TextResult.attributeTypeMap = [ { name: "pages", baseName: "pages", type: "Array<TextPage>", }, { name: "text", baseName: "text", type: "string", } ]; /** * The text style such as font size, font name an so on. */ class TextStyle { /** * Returns attribute type map */ static getAttributeTypeMap() { return TextStyle.attributeTypeMap; } constructor(init) { Object.assign(this, init); } } exports.TextStyle = TextStyle; /** * Attribute type map */ TextStyle.attributeTypeMap = [ { name: "fontName", baseName: "fontName", type: "string", }, { name: "fontSize", baseName: "fontSize", type: "number", }, { name: "isBold", baseName: "isBold", type: "boolean", }, { name: "isItalic", baseName: "isItalic", type: "boolean", }, { name: "name", baseName: "name", type: "string", } ]; /** * Barcode options. */ class BarcodesOptions extends ParserOptions { /** * Returns attribute type map */ static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(BarcodesOptions.attributeTypeMap); } constructor(init) { super(init); Object.assign(this, init); } } exports.BarcodesOptions = BarcodesOptions; /** * Attribute type map */ BarcodesOptions.attributeTypeMap = [ { name: "outputPath", baseName: "outputPath", type: "string", }, { name: "startPageNumber", baseName: "startPageNumber", type: "number", }, { name: "countPagesToExtract", baseName: "countPagesToExtract", type: "number", } ]; /** * Container options. */ class ContainerOptions extends ParserOptions { /** * Returns attribute type map */ static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(ContainerOptions.attributeTypeMap); } constructor(init) { super(init); Object.assign(this, init); } } exports.ContainerOptions = ContainerOptions; /** * Attribute type map */ ContainerOptions.attributeTypeMap = []; /** * File Version */ class FileVersion extends StorageFile { /** * Returns attribute type map */ static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(FileVersion.attributeTypeMap); } constructor(init) { super(init); Object.assign(this, init); } } exports.FileVersion = FileVersion; /** * Attribute type map */ FileVersion.attributeTypeMap = [ { name: "versionId", baseName: "versionId", type: "string", }, { name: "isLatest", baseName: "isLatest", type: "boolean", } ]; /** * Image options. */ class ImagesOptions extends ParserOptions { /** * Returns attribute type map */ static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(ImagesOptions.attributeTypeMap); } constructor(init) { super(init); Object.assign(this, init); } } exports.ImagesOptions = ImagesOptions; /** * Attribute type map */ ImagesOptions.attributeTypeMap = [ { name: "outputPath", baseName: "outputPath", type: "string", }, { name: "startPageNumber", baseName: "startPageNumber", type: "number", }, { name: "countPagesToExtract", baseName: "countPagesToExtract", type: "number", } ]; /** * Info options */ class InfoOptions extends ParserOptions { /** * Returns attribute type map */ static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(InfoOptions.attributeTypeMap); } constructor(init) { super(init); Object.assign(this, init); } } exports.InfoOptions = InfoOptions; /** * Attribute type map */ InfoOptions.attributeTypeMap = []; /** * Parse options. */ class ParseOptions extends ParserOptions { /** * Returns attribute type map */ static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(ParseOptions.attributeTypeMap); } constructor(init) { super(init); Object.assign(this, init); } } exports.ParseOptions = ParseOptions; /** * Attribute type map */ ParseOptions.attributeTypeMap = [ { name: "template", baseName: "template", type: "Template", }, { name: "templatePath", baseName: "templatePath", type: "string", } ]; /** * Extract options. */ class TextOptions extends ParserOptions { /** * Returns attribute type map */ static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(TextOptions.attributeTypeMap); } constructor(init) { super(init); Object.assign(this, init); } } exports.TextOptions = TextOptions; /** * Attribute type map */ TextOptions.attributeTypeMap = [ { name: "formattedTextOptions", baseName: "formattedTextOptions", type: "FormattedTextOptions", }, { name: "startPageNumber", baseName: "startPageNumber", type: "number", }, { name: "countPagesToExtract", baseName: "countPagesToExtract", type: "number", } ]; const enumsMap = {}; exports.enumsMap = enumsMap; const typeMap = { Barcode, BarcodePage, BarcodesResult, ContainerItem, ContainerItemInfo, ContainerResult, Coordinates, CreateTemplateOptions, DetectorParameters, DiscUsage, ErrorDetails, Field, FieldData, FieldPosition, FileInfo, FileType, FileVersions, FilesList, FilesUploadResult, Format, FormatsResult, FormattedTextOptions, Image, ImagePage, ImagesResult, InfoResult, ModelError, ObjectExist, Page, PageArea, PageTableArea, PageTableAreaCell, PageTextArea, ParseResult, ParserOptions, Point, Rectangle, Size, StorageExist, StorageFile, Table, TableLayout, Template, TemplateOptions, TemplateResult, TextPage, TextResult, TextStyle, BarcodesOptions, ContainerOptions, FileVersion, ImagesOptions, InfoOptions, ParseOptions, TextOptions, }; exports.typeMap = typeMap; /** * Request model for CopyFile operation. */ class CopyFileRequest { constructor(srcPath, destPath, srcStorageName, destStorageName, versionId) { this.srcPath = srcPath; this.destPath = destPath; this.srcStorageName = srcStorageName; this.destStorageName = destStorageName; this.versionId = versionId; } } exports.CopyFileRequest = CopyFileRequest; /** * Request model for DeleteFile operation. */ class DeleteFileRequest { constructor(path, storageName, versionId) { this.path = path; this.storageName = storageName; this.versionId = versionId; } } exports.DeleteFileRequest = DeleteFileRequest; /** * Request model for DownloadFile operation. */ class DownloadFileRequest { constructor(path, storageName, versionId) { this.path = path; this.storageName = storageName; this.versionId = versionId; } } exports.DownloadFileRequest = DownloadFileRequest; /** * Request model for MoveFile operation. */ class MoveFileRequest { constructor(srcPath, destPath, srcStorageName, destStorageName, versionId) { this.srcPath = srcPath; this.destPath = destPath; this.srcStorageName = srcStorageName; this.destStorageName = destStorageName; this.versionId = versionId; } } exports.MoveFileRequest = MoveFileRequest; /** * Request model for UploadFile operation. */ class UploadFileRequest { constructor(path, file, storageName) { this.path = path; this.file = file; this.storageName = storageName; } } exports.UploadFileRequest = UploadFileRequest; /** * Request model for CopyFolder operation. */ class CopyFolderRequest { constructor(srcPath, destPath, srcStorageName, destStorageName) { this.srcPath = srcPath; this.destPath = destPath; this.srcStorageName = srcStorageName; this.destStorageName = destStorageName; } } exports.CopyFolderRequest = CopyFolderRequest; /** * Request model for CreateFolder operation. */ class CreateFolderRequest { constructor(path, storageName) { this.path = path; this.storageName = storageName; } } exports.CreateFolderRequest = CreateFolderRequest; /** * Request model for DeleteFolder operation. */ class DeleteFolderRequest { constructor(path, storageName, recursive) { this.path = path; this.storageName = storageName; this.recursive = recursive; } } exports.DeleteFolderRequest = DeleteFolderRequest; /** * Request model for GetFilesList operation. */ class GetFilesListRequest { constructor(path, storageName) { this.path = path; this.storageName = storageName; } } exports.GetFilesListRequest = GetFilesListRequest; /** * Request model for MoveFolder operation. */ class MoveFolderRequest { constructor(srcPath, destPath, srcStorageName, destStorageName) { this.srcPath = srcPath; this.destPath = destPath; this.srcStorageName = srcStorageName; this.destStorageName = destStorageName; } } exports.MoveFolderRequest = MoveFolderRequest; /** * Request model for Container operation. */ class ContainerRequest { constructor(options) { this.options = options; } } exports.ContainerRequest = ContainerRequest; /** * Request model for GetInfo operation. */ class GetInfoRequest { constructor(options) { this.options = options; } } exports.GetInfoRequest = GetInfoRequest; /** * Request model for Barcodes operation. */ class BarcodesRequest { constructor(options) { this.options = options; } } exports.BarcodesRequest = BarcodesRequest; /** * Request model for Images operation. */ class ImagesRequest { constructor(options) { this.options = options; } } exports.ImagesRequest = ImagesRequest; /** * Request model for Parse operation. */ class ParseRequest { constructor(options) { this.options = options; } } exports.ParseRequest = ParseRequest; /** * Request model for Text operation. */ class TextRequest { constructor(options) { this.options = options; } } exports.TextRequest = TextRequest; /** * Request model for GetDiscUsage operation. */ class GetDiscUsageRequest { constructor(storageName) { this.storageName = storageName; } } exports.GetDiscUsageRequest = GetDiscUsageRequest; /** * Request model for GetFileVersions operation. */ class GetFileVersionsRequest { constructor(path, storageName) { this.path = path; this.storageName = storageName; } } exports.GetFileVersionsRequest = GetFileVersionsRequest; /** * Request model for ObjectExists operation. */ class ObjectExistsRequest { constructor(path, storageName, versionId) { this.path = path; this.storageName = storageName; this.versionId = versionId; } } exports.ObjectExistsRequest = ObjectExistsRequest; /** * Request model for StorageExists operation. */ class StorageExistsRequest { constructor(storageName) { this.storageName = storageName; } } exports.StorageExistsRequest = StorageExistsRequest; /** * Request model for CreateTemplate operation. */ class CreateTemplateRequest { constructor(options) { this.options = options; } } exports.CreateTemplateRequest = CreateTemplateRequest; /** * Request model for DeleteTemplate operation. */ class DeleteTemplateRequest { constructor(options) { this.options = options; } } exports.DeleteTemplateRequest = DeleteTemplateRequest; /** * Request model for GetTemplate operation. */ class GetTemplateRequest { constructor(options) { this.options = options; } } exports.GetTemplateRequest = GetTemplateRequest;