Skip to content

Commit

Permalink
feat(GiniBankAPILibrary): DefaultDocumentService update documentation…
Browse files Browse the repository at this point in the history
… and refactor methods to multiline params

PP-932
  • Loading branch information
mrkulik committed Dec 9, 2024
1 parent c7e954c commit e5863a0
Showing 1 changed file with 21 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,10 @@ public final class DefaultDocumentService: DefaultDocumentServiceProtocol {
public func submitFeedback(for document: Document,
with extractions: [Extraction],
completion: @escaping CompletionResult<Void>) {
submitFeedback(resourceHandler: sessionManager.data, for: document.id, with: extractions, completion: completion)
submitFeedback(resourceHandler: sessionManager.data,
for: document.id,
with: extractions,
completion: completion)
}

/**
Expand All @@ -252,26 +255,33 @@ public final class DefaultDocumentService: DefaultDocumentServiceProtocol {
with extractions: [Extraction],
and compoundExtractions: [String: [[Extraction]]],
completion: @escaping CompletionResult<Void>) {
submitFeedback(resourceHandler: sessionManager.data, for: document.id, with: extractions, and: compoundExtractions, completion: completion)
submitFeedback(resourceHandler: sessionManager.data,
for: document.id,
with: extractions,
and: compoundExtractions,
completion: completion)
}

/**
* Submits the analysis feedback for a given document.
* Submits the analysis feedback for a given document id.
*
* - Parameter documentId: The documentId for which feedback should be sent
* - Parameter documentId: The ID of the document for which feedback should be sent.
* - Parameter extractions: The document's updated extractions
* - Parameter completion: A completion callback
*/
public func submitFeedback(for documentId: String,
with extractions: [Extraction],
completion: @escaping CompletionResult<Void>) {
submitFeedback(resourceHandler: sessionManager.data, for: documentId, with: extractions, completion: completion)
submitFeedback(resourceHandler: sessionManager.data,
for: documentId,
with: extractions,
completion: completion)
}

/**
* Submits the analysis feedback with compound extractions (e.g., "line items") for a given document.
*
* - Parameter documentId: The documentId for which feedback should be sent
* - Parameter documentId: The ID of the document for which feedback should be sent.
* - Parameter extractions: The document's updated extractions
* - Parameter compoundExtractions: The document's updated compound extractions
* - Parameter completion: A completion callback
Expand All @@ -280,7 +290,11 @@ public final class DefaultDocumentService: DefaultDocumentServiceProtocol {
with extractions: [Extraction],
and compoundExtractions: [String: [[Extraction]]],
completion: @escaping CompletionResult<Void>) {
submitFeedback(resourceHandler: sessionManager.data, for: documentId, with: extractions, and: compoundExtractions, completion: completion)
submitFeedback(resourceHandler: sessionManager.data,
for: documentId,
with: extractions,
and: compoundExtractions,
completion: completion)
}

/**
Expand Down

0 comments on commit e5863a0

Please sign in to comment.