DefaultDocumentService
public final class DefaultDocumentService : DefaultDocumentServiceProtocolThe default document service. By default interacts with the APIDomain.default api.
- 
                  
                  Undocumented DeclarationSwift public var apiDomain: APIDomain
- 
                  
                  Creates a partial document from a given image Dataor a composite document for given partial documents.DeclarationSwift public func createDocument(fileName: String?, docType: Document.DocType?, type: Document.TypeV2, metadata: Document.Metadata?, completion: @escaping CompletionResult<Document>)ParametersfileNameThe document’s filename docTypeThe document’s docType typeThe V2 document’s type. It could be either partial or composite type. metadataThe document’s metadata completionA completion callback, returning the created document on success 
- 
                  
                  Deletes a document DeclarationSwift public func delete(_ document: Document, completion: @escaping CompletionResult<String>)ParametersdocumentDocument to be deleted completionA completion callback 
- 
                  
                  Fetches the user documents, with the possibility to retrieve them paginated DeclarationSwift public func documents(limit: Int?, offset: Int?, completion: @escaping CompletionResult<[Document]>)ParameterslimitLimit of documents to retrieve offsetDocument’s offset completionA completion callback, returning the document list on success 
- 
                  
                  Retrieves a document for a given document id DeclarationSwift public func fetchDocument(with id: String, completion: @escaping CompletionResult<Document>)ParametersidThe document’s unique identifier completionA completion callback, returning the requested document on success 
- 
                  
                  Retrieves the extractions for a given document. DeclarationSwift public func extractions(for document: Document, cancellationToken: CancellationToken, completion: @escaping CompletionResult<ExtractionResult>)ParametersdocumentDocument to get the extractions for cancellationTokenToken use to stopped the analysis when a user cancels it completionA completion callback, returning the extraction list on success 
- 
                  
                  Retrieves the layout of a given document DeclarationSwift public func layout(for document: Document, completion: @escaping CompletionResult<Document.Layout>)ParametersidThe document’s unique identifier completionA completion callback, returning the requested document layout on success 
- 
                  
                  Retrieves the pages of a given document DeclarationSwift public func pages(in document: Document, completion: @escaping CompletionResult<[Document.Page]>)ParametersidThe document’s unique identifier completionA completion callback, returning the requested document layout on success 
- 
                  
                  Retrieves the page preview of a document for a given page and size DeclarationSwift public func pagePreview(for document: Document, pageNumber: Int, size: Document.Page.Size, completion: @escaping CompletionResult<Data>)ParametersdocumentDocument to get the preview for pageNumberThe document’s page number sizeThe document’s page size completionA completion callback, returning the requested page preview on success 
- 
                  
                  Submits the analysis feedback for a given document. DeclarationSwift public func submitFeedback(for document: Document, with extractions: [Extraction], completion: @escaping CompletionResult<Void>)ParametersdocumentThe document for which feedback should be sent extractionsThe document’s updated extractions completionA completion callback 
 
    
         View on GitHub
            View on GitHub
           DefaultDocumentService Class Reference
      DefaultDocumentService Class Reference