Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions Source/SwiftyDropbox/Shared/Generated/FilesRoutes.swift
Original file line number Diff line number Diff line change
Expand Up @@ -738,16 +738,15 @@ public class FilesRoutes: DropboxTransportClientOwning {
/// maximum temporary upload link duration is 4 hours. Upon consumption or expiration, a new link will have to
/// be generated. Multiple links may exist for a specific upload path at any given time. The POST request on
/// the temporary upload link must have its Content-Type set to "application/octet-stream". Example temporary
/// upload link consumption request: curl -X POST https://content.dropboxapi.com/apitul/1/bNi2uIYF51cVBND
/// --header "Content-Type: application/octet-stream" --data-binary @local_file.txt A successful temporary
/// upload link consumption request returns the content hash of the uploaded data in JSON format. Example
/// successful temporary upload link consumption response: {"content-hash":
/// "599d71033d700ac892a0e48fa61b125d2f5994"} An unsuccessful temporary upload link consumption request returns
/// any of the following status codes: HTTP 400 Bad Request: Content-Type is not one of
/// application/octet-stream and text/plain or request is invalid. HTTP 409 Conflict: The temporary upload link
/// does not exist or is currently unavailable, the upload failed, or another error happened. HTTP 410 Gone: The
/// temporary upload link is expired or consumed. Example unsuccessful temporary upload link consumption
/// response: Temporary upload link has been recently consumed.
/// upload link consumption request: curl -X POST <temporary_upload_link_url> --header "Content-Type:
/// application/octet-stream" --data-binary @local_file.txt A successful temporary upload link consumption
/// request returns the content hash of the uploaded data in JSON format. Example successful temporary upload
/// link consumption response: {"content-hash": "599d71033d700ac892a0e48fa61b125d2f5994"} An unsuccessful
/// temporary upload link consumption request returns any of the following status codes: HTTP 400 Bad Request:
/// Content-Type is not one of application/octet-stream and text/plain or request is invalid. HTTP 409 Conflict:
/// The temporary upload link does not exist or is currently unavailable, the upload failed, or another error
/// happened. HTTP 410 Gone: The temporary upload link is expired or consumed. Example unsuccessful temporary
/// upload link consumption response: Temporary upload link has been recently consumed.
///
/// - scope: files.content.write
///
Expand Down
637 changes: 637 additions & 0 deletions Source/SwiftyDropbox/Shared/Generated/Riviera.swift

Large diffs are not rendered by default.

78 changes: 78 additions & 0 deletions Source/SwiftyDropbox/Shared/Generated/RivieraAppAuthRoutes.swift
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,84 @@ public class RivieraAppAuthRoutes: DropboxTransportClientOwning {
return client.request(route, serverArgs: serverArgs)
}

/// Asynchronous OCR (optical character recognition) text extraction for images and PDFs, including scanned /
/// non-text PDFs. Supported formats: - Image formats: .bmp, .gif, .heic, .jpeg, .jpg, .png, .tif, .tiff, .webp.
/// - PDF format: .pdf. Unsupported formats return an `unsupported_format_error`. For the `url` variant only
/// Dropbox shared links are supported; external URLs return `unsupported_format_error`. Text-based PDFs already
/// carry a text layer, so OCR is not run against them and the result is empty; use `get_text_async` to read the
/// embedded text layer of such a PDF. The result carries the extracted words as plain text, plus the same
/// content as hOCR with per-word coordinates.
///
/// - scope: files.content.read
///
/// - parameter fileIdOrUrl: Identifier of the file to run OCR on. Callers must set exactly one of the `FileIdOrUrl`
/// variants. OCR is supported for image files and PDFs, including scanned / non-text PDFs; see the route
/// description for the supported formats. Requests against unsupported formats return
/// `unsupported_format_error`. NOTE: for the `url` variant, only Dropbox shared links (www.dropbox.com) are
/// supported. External (non-Dropbox) URLs are not supported and return `unsupported_format_error`; import the
/// file into Dropbox and reference it by `file_id` or `path` instead.
///
/// - returns: Through the response callback, the caller will receive a `Async.LaunchResultBase` object on success
/// or a `Void` object on failure.
@discardableResult public func getOcrAsync(fileIdOrUrl: Riviera.FileIdOrUrl? = nil) -> RpcRequest<Async.LaunchResultBaseSerializer, VoidSerializer> {
let route = Riviera.getOcrAsync
let serverArgs = Riviera.GetOcrArgs(fileIdOrUrl: fileIdOrUrl)
return client.request(route, serverArgs: serverArgs)
}

/// Returns the status or result of specified get_ocr_async task.
///
/// - scope: files.content.read
///
/// - parameter asyncJobId: Id of the asynchronous job. This is the value of a response returned from the method
/// that launched the job.
///
/// - returns: Through the response callback, the caller will receive a `Riviera.GetOcrAsyncCheckResult` object on
/// success or a `Async.PollError` object on failure.
@discardableResult public func getOcrAsyncCheck(asyncJobId: String) -> RpcRequest<Riviera.GetOcrAsyncCheckResultSerializer, Async.PollErrorSerializer> {
let route = Riviera.getOcrAsyncCheck
let serverArgs = Async.PollArg(asyncJobId: asyncJobId)
return client.request(route, serverArgs: serverArgs)
}

/// Asynchronous plain-text extraction from documents. Supported formats include: - Word processing: .doc, .docx,
/// .docm, .rtf. - Presentations: .ppt, .pptx, .pptm. - Spreadsheets: .xls, .xlsx, .xlsm. - PDF: .pdf. - Dropbox
/// document types: .paper, .papert, .binder, .gdoc, .gsheet, .gslides. - Plain text / subtitles: .txt, .vtt.
/// Unsupported formats return an `unsupported_format_error`. For the `url` variant only Dropbox shared links
/// are supported; external URLs return `unsupported_format_error`.
///
/// - scope: files.content.read
///
/// - parameter fileIdOrUrl: Identifier of the document to extract text from. Callers must set exactly one of the
/// `FileIdOrUrl` variants. Text extraction is supported for common document formats (Word, PowerPoint, Excel,
/// PDF, RTF, and Dropbox document types); see the route description for the supported formats. Requests against
/// unsupported formats return `unsupported_format_error`. NOTE: for the `url` variant, only Dropbox shared
/// links (www.dropbox.com) are supported. External (non-Dropbox) URLs are not supported and return
/// `unsupported_format_error`; import the file into Dropbox and reference it by `file_id` or `path` instead.
///
/// - returns: Through the response callback, the caller will receive a `Async.LaunchResultBase` object on success
/// or a `Void` object on failure.
@discardableResult public func getTextAsync(fileIdOrUrl: Riviera.FileIdOrUrl? = nil) -> RpcRequest<Async.LaunchResultBaseSerializer, VoidSerializer> {
let route = Riviera.getTextAsync
let serverArgs = Riviera.GetTextArgs(fileIdOrUrl: fileIdOrUrl)
return client.request(route, serverArgs: serverArgs)
}

/// Returns the status or result of specified get_text_async task.
///
/// - scope: files.content.read
///
/// - parameter asyncJobId: Id of the asynchronous job. This is the value of a response returned from the method
/// that launched the job.
///
/// - returns: Through the response callback, the caller will receive a `Riviera.GetTextAsyncCheckResult` object on
/// success or a `Async.PollError` object on failure.
@discardableResult public func getTextAsyncCheck(asyncJobId: String) -> RpcRequest<Riviera.GetTextAsyncCheckResultSerializer, Async.PollErrorSerializer> {
let route = Riviera.getTextAsyncCheck
let serverArgs = Async.PollArg(asyncJobId: asyncJobId)
return client.request(route, serverArgs: serverArgs)
}

/// Asynchronous transcript generation for audio and video files. Supported audio formats: .aac, .aif, .aiff, .flac,
/// .m4a, .m4r, .mp3, .oga, .ogg, .wav, .wma. Supported video formats: .3gp, .3gpp, .3gpp2, .asf, .avi, .dv,
/// .flv, .m2t, .m2ts, .m4v, .mkv, .mov, .mp4, .mpeg, .mpg, .mts, .mxf, .oggtheora, .ogv, .rm, .ts, .vob, .webm,
Expand Down
78 changes: 78 additions & 0 deletions Source/SwiftyDropbox/Shared/Generated/RivieraRoutes.swift
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,84 @@ public class RivieraRoutes: DropboxTransportClientOwning {
return client.request(route, serverArgs: serverArgs)
}

/// Asynchronous OCR (optical character recognition) text extraction for images and PDFs, including scanned /
/// non-text PDFs. Supported formats: - Image formats: .bmp, .gif, .heic, .jpeg, .jpg, .png, .tif, .tiff, .webp.
/// - PDF format: .pdf. Unsupported formats return an `unsupported_format_error`. For the `url` variant only
/// Dropbox shared links are supported; external URLs return `unsupported_format_error`. Text-based PDFs already
/// carry a text layer, so OCR is not run against them and the result is empty; use `get_text_async` to read the
/// embedded text layer of such a PDF. The result carries the extracted words as plain text, plus the same
/// content as hOCR with per-word coordinates.
///
/// - scope: files.content.read
///
/// - parameter fileIdOrUrl: Identifier of the file to run OCR on. Callers must set exactly one of the `FileIdOrUrl`
/// variants. OCR is supported for image files and PDFs, including scanned / non-text PDFs; see the route
/// description for the supported formats. Requests against unsupported formats return
/// `unsupported_format_error`. NOTE: for the `url` variant, only Dropbox shared links (www.dropbox.com) are
/// supported. External (non-Dropbox) URLs are not supported and return `unsupported_format_error`; import the
/// file into Dropbox and reference it by `file_id` or `path` instead.
///
/// - returns: Through the response callback, the caller will receive a `Async.LaunchResultBase` object on success
/// or a `Void` object on failure.
@discardableResult public func getOcrAsync(fileIdOrUrl: Riviera.FileIdOrUrl? = nil) -> RpcRequest<Async.LaunchResultBaseSerializer, VoidSerializer> {
let route = Riviera.getOcrAsync
let serverArgs = Riviera.GetOcrArgs(fileIdOrUrl: fileIdOrUrl)
return client.request(route, serverArgs: serverArgs)
}

/// Returns the status or result of specified get_ocr_async task.
///
/// - scope: files.content.read
///
/// - parameter asyncJobId: Id of the asynchronous job. This is the value of a response returned from the method
/// that launched the job.
///
/// - returns: Through the response callback, the caller will receive a `Riviera.GetOcrAsyncCheckResult` object on
/// success or a `Async.PollError` object on failure.
@discardableResult public func getOcrAsyncCheck(asyncJobId: String) -> RpcRequest<Riviera.GetOcrAsyncCheckResultSerializer, Async.PollErrorSerializer> {
let route = Riviera.getOcrAsyncCheck
let serverArgs = Async.PollArg(asyncJobId: asyncJobId)
return client.request(route, serverArgs: serverArgs)
}

/// Asynchronous plain-text extraction from documents. Supported formats include: - Word processing: .doc, .docx,
/// .docm, .rtf. - Presentations: .ppt, .pptx, .pptm. - Spreadsheets: .xls, .xlsx, .xlsm. - PDF: .pdf. - Dropbox
/// document types: .paper, .papert, .binder, .gdoc, .gsheet, .gslides. - Plain text / subtitles: .txt, .vtt.
/// Unsupported formats return an `unsupported_format_error`. For the `url` variant only Dropbox shared links
/// are supported; external URLs return `unsupported_format_error`.
///
/// - scope: files.content.read
///
/// - parameter fileIdOrUrl: Identifier of the document to extract text from. Callers must set exactly one of the
/// `FileIdOrUrl` variants. Text extraction is supported for common document formats (Word, PowerPoint, Excel,
/// PDF, RTF, and Dropbox document types); see the route description for the supported formats. Requests against
/// unsupported formats return `unsupported_format_error`. NOTE: for the `url` variant, only Dropbox shared
/// links (www.dropbox.com) are supported. External (non-Dropbox) URLs are not supported and return
/// `unsupported_format_error`; import the file into Dropbox and reference it by `file_id` or `path` instead.
///
/// - returns: Through the response callback, the caller will receive a `Async.LaunchResultBase` object on success
/// or a `Void` object on failure.
@discardableResult public func getTextAsync(fileIdOrUrl: Riviera.FileIdOrUrl? = nil) -> RpcRequest<Async.LaunchResultBaseSerializer, VoidSerializer> {
let route = Riviera.getTextAsync
let serverArgs = Riviera.GetTextArgs(fileIdOrUrl: fileIdOrUrl)
return client.request(route, serverArgs: serverArgs)
}

/// Returns the status or result of specified get_text_async task.
///
/// - scope: files.content.read
///
/// - parameter asyncJobId: Id of the asynchronous job. This is the value of a response returned from the method
/// that launched the job.
///
/// - returns: Through the response callback, the caller will receive a `Riviera.GetTextAsyncCheckResult` object on
/// success or a `Async.PollError` object on failure.
@discardableResult public func getTextAsyncCheck(asyncJobId: String) -> RpcRequest<Riviera.GetTextAsyncCheckResultSerializer, Async.PollErrorSerializer> {
let route = Riviera.getTextAsyncCheck
let serverArgs = Async.PollArg(asyncJobId: asyncJobId)
return client.request(route, serverArgs: serverArgs)
}

/// Asynchronous transcript generation for audio and video files. Supported audio formats: .aac, .aif, .aiff, .flac,
/// .m4a, .m4r, .mp3, .oga, .ogg, .wav, .wma. Supported video formats: .3gp, .3gpp, .3gpp2, .asf, .avi, .dv,
/// .flv, .m2t, .m2ts, .m4v, .mkv, .mov, .mp4, .mpeg, .mpg, .mts, .mxf, .oggtheora, .ogv, .rm, .ts, .vob, .webm,
Expand Down
Loading
Loading