Document

public struct Document
extension Document: Decodable

Data model that represents a Document entity

  • (Optional) Array containing the path of every composite document

    Declaration

    Swift

    public let compositeDocuments: [CompositeDocument]?
  • The document’s creation date.

    Declaration

    Swift

    public let creationDate: Date
  • id

    The document’s unique identifier.

    Declaration

    Swift

    public let id: String
  • The document’s file name.

    Declaration

    Swift

    public let name: String
  • The document’s origin.

    Declaration

    Swift

    public let origin: Origin
  • The number of pages.

    Declaration

    Swift

    public let pageCount: Int
  • The document’s pages.

    Declaration

    Swift

    public let pages: [Page]?
  • Links to related resources, such as extractions, document, processed, layout or pages.

    Declaration

    Swift

    public let links: Links
  • (Optional) Array containing the path of every partial document info

    Declaration

    Swift

    public let partialDocuments: [PartialDocumentInfo]?
  • The processing state of the document.

    Declaration

    Swift

    public let progress: Progress
  • The document’s source classification.

    Declaration

    Swift

    public let sourceClassification: SourceClassification
  • It’s the easiest way to initialize a Document if you are receiving a customized JSON structure from your proxy backend.

    Note

    Screen API with custom networking only.

    Declaration

    Swift

    public init(creationDate: Date,
                     id: String,
                     name: String,
                     links: Links,
                     sourceClassification: SourceClassification)

    Parameters

    creationDate

    The document’s creation date.

    id

    The document’s unique identifier.

    name

    The document’s file name.

    links

    Links to related resources, such as extractions, document, processed, layout or pages.

    sourceClassification

    The document’s source classification. We recommend to use scanned or composite.

  • The document’s layout, formed by an array of pages

    See more

    Declaration

    Swift

    public struct Layout
    extension Document.Layout: Decodable
  • A document’s page, consisting of an array of number and its page number

    See more

    Declaration

    Swift

    public struct Page
    extension Document.Page: Decodable
  • The possible states of documents. The availability of a document’s extractions, layout and preview images are depending on the document’s progress.

    See more

    Declaration

    Swift

    public enum Progress : String, Decodable
  • The origin of an uploaded document.

    See more

    Declaration

    Swift

    public enum Origin : String, Decodable
  • The possible source classifications of a document.

    See more

    Declaration

    Swift

    public enum SourceClassification : String, Decodable
  • The document types, used as a hint during the analysis.

    See more

    Declaration

    Swift

    public enum DocType : String, Codable
  • Links to related resources, such as extractions, document, processed or layout.

    See more

    Declaration

    Swift

    public struct Links
    extension Document.Links: Decodable
  • The V2 document’s type. Used when creating documents in multipage mode.

    See more

    Declaration

    Swift

    public enum TypeV2
  • The metadata contains any custom information regarding the upload (used later for reporting), creating HTTP headers with an specific format.

    See more

    Declaration

    Swift

    public struct Metadata
  • Declaration

    Swift

    public init(from decoder: Decoder) throws