docspace-api-sdk 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/AUTHORS.md +3 -0
- data/CHANGELOG.md +50 -0
- data/LICENSE +201 -0
- data/README.md +5310 -0
- data/lib/docspace-api-sdk/api/AI/agents-api.rb +605 -0
- data/lib/docspace-api-sdk/api/AI/ai-api.rb +517 -0
- data/lib/docspace-api-sdk/api/AI/assignments-api.rb +573 -0
- data/lib/docspace-api-sdk/api/AI/attachments-api.rb +585 -0
- data/lib/docspace-api-sdk/api/AI/context-api.rb +233 -0
- data/lib/docspace-api-sdk/api/AI/editor-tools-api.rb +156 -0
- data/lib/docspace-api-sdk/api/AI/export-api.rb +97 -0
- data/lib/docspace-api-sdk/api/AI/open-ai-passthrough-api.rb +179 -0
- data/lib/docspace-api-sdk/api/AI/preferences-api.rb +555 -0
- data/lib/docspace-api-sdk/api/AI/profiles-api.rb +568 -0
- data/lib/docspace-api-sdk/api/AI/prompts-api.rb +899 -0
- data/lib/docspace-api-sdk/api/AI/settings-api.rb +473 -0
- data/lib/docspace-api-sdk/api/AI/threads-api.rb +1005 -0
- data/lib/docspace-api-sdk/api/AI/tools-api.rb +923 -0
- data/lib/docspace-api-sdk/api/AI/vectorization-api.rb +97 -0
- data/lib/docspace-api-sdk/api/AI/web-search-api.rb +571 -0
- data/lib/docspace-api-sdk/api/ApiKeys/api-keys-api.rb +411 -0
- data/lib/docspace-api-sdk/api/Apps/apps-api.rb +368 -0
- data/lib/docspace-api-sdk/api/Authentication/authentication-api.rb +481 -0
- data/lib/docspace-api-sdk/api/Backup/backup-api.rb +916 -0
- data/lib/docspace-api-sdk/api/Capabilities/capabilities-api.rb +86 -0
- data/lib/docspace-api-sdk/api/Docs/docs-api.rb +159 -0
- data/lib/docspace-api-sdk/api/Files/files-api.rb +3705 -0
- data/lib/docspace-api-sdk/api/Files/folders-api.rb +2611 -0
- data/lib/docspace-api-sdk/api/Files/metadata-api.rb +1465 -0
- data/lib/docspace-api-sdk/api/Files/operations-api.rb +1722 -0
- data/lib/docspace-api-sdk/api/Files/quota-api.rb +159 -0
- data/lib/docspace-api-sdk/api/Files/settings-api.rb +1973 -0
- data/lib/docspace-api-sdk/api/Files/sharing-api.rb +1126 -0
- data/lib/docspace-api-sdk/api/Files/third-party-integration-api.rb +522 -0
- data/lib/docspace-api-sdk/api/Group/group-api.rb +830 -0
- data/lib/docspace-api-sdk/api/Group/search-api.rb +282 -0
- data/lib/docspace-api-sdk/api/Migration/migration-api.rb +519 -0
- data/lib/docspace-api-sdk/api/OAuth20/authorization-api.rb +262 -0
- data/lib/docspace-api-sdk/api/OAuth20/client-management-api.rb +582 -0
- data/lib/docspace-api-sdk/api/OAuth20/client-querying-api.rb +467 -0
- data/lib/docspace-api-sdk/api/OAuth20/discovery-api.rb +84 -0
- data/lib/docspace-api-sdk/api/OAuth20/scope-management-api.rb +86 -0
- data/lib/docspace-api-sdk/api/People/email-api.rb +169 -0
- data/lib/docspace-api-sdk/api/People/guests-api.rb +159 -0
- data/lib/docspace-api-sdk/api/People/password-api.rb +169 -0
- data/lib/docspace-api-sdk/api/People/photos-api.rb +389 -0
- data/lib/docspace-api-sdk/api/People/profiles-api.rb +986 -0
- data/lib/docspace-api-sdk/api/People/quota-api.rb +159 -0
- data/lib/docspace-api-sdk/api/People/search-api.rb +1150 -0
- data/lib/docspace-api-sdk/api/People/theme-api.rb +152 -0
- data/lib/docspace-api-sdk/api/People/third-party-accounts-api.rb +292 -0
- data/lib/docspace-api-sdk/api/People/user-data-api.rb +663 -0
- data/lib/docspace-api-sdk/api/People/user-status-api.rb +273 -0
- data/lib/docspace-api-sdk/api/People/user-type-api.rb +300 -0
- data/lib/docspace-api-sdk/api/Portal/guests-api.rb +92 -0
- data/lib/docspace-api-sdk/api/Portal/payment-api.rb +2571 -0
- data/lib/docspace-api-sdk/api/Portal/quota-api.rb +328 -0
- data/lib/docspace-api-sdk/api/Portal/settings-api.rb +502 -0
- data/lib/docspace-api-sdk/api/Portal/users-api.rb +611 -0
- data/lib/docspace-api-sdk/api/Rooms/groups-api.rb +442 -0
- data/lib/docspace-api-sdk/api/Rooms/privacy-room-api.rb +348 -0
- data/lib/docspace-api-sdk/api/Rooms/rooms-api.rb +3121 -0
- data/lib/docspace-api-sdk/api/Security/access-to-dev-tools-api.rb +93 -0
- data/lib/docspace-api-sdk/api/Security/active-connections-api.rb +334 -0
- data/lib/docspace-api-sdk/api/Security/audit-trail-data-api.rb +618 -0
- data/lib/docspace-api-sdk/api/Security/banners-visibility-api.rb +93 -0
- data/lib/docspace-api-sdk/api/Security/csp-api.rb +152 -0
- data/lib/docspace-api-sdk/api/Security/firebase-api.rb +159 -0
- data/lib/docspace-api-sdk/api/Security/login-history-api.rb +357 -0
- data/lib/docspace-api-sdk/api/Security/o-auth2-api.rb +86 -0
- data/lib/docspace-api-sdk/api/Security/smtp-settings-api.rb +329 -0
- data/lib/docspace-api-sdk/api/Settings/access-to-dev-tools-api.rb +86 -0
- data/lib/docspace-api-sdk/api/Settings/authorization-api.rb +218 -0
- data/lib/docspace-api-sdk/api/Settings/banners-visibility-api.rb +86 -0
- data/lib/docspace-api-sdk/api/Settings/common-settings-api.rb +1398 -0
- data/lib/docspace-api-sdk/api/Settings/cookies-api.rb +152 -0
- data/lib/docspace-api-sdk/api/Settings/docs-cloud-api.rb +771 -0
- data/lib/docspace-api-sdk/api/Settings/encryption-api.rb +211 -0
- data/lib/docspace-api-sdk/api/Settings/greeting-settings-api.rb +270 -0
- data/lib/docspace-api-sdk/api/Settings/ip-restrictions-api.rb +277 -0
- data/lib/docspace-api-sdk/api/Settings/license-api.rb +275 -0
- data/lib/docspace-api-sdk/api/Settings/login-settings-api.rb +211 -0
- data/lib/docspace-api-sdk/api/Settings/messages-api.rb +225 -0
- data/lib/docspace-api-sdk/api/Settings/notifications-api.rb +342 -0
- data/lib/docspace-api-sdk/api/Settings/owner-api.rb +159 -0
- data/lib/docspace-api-sdk/api/Settings/quota-api.rb +284 -0
- data/lib/docspace-api-sdk/api/Settings/rebranding-api.rb +1112 -0
- data/lib/docspace-api-sdk/api/Settings/security-api.rb +674 -0
- data/lib/docspace-api-sdk/api/Settings/sso-api.rb +329 -0
- data/lib/docspace-api-sdk/api/Settings/statistics-api.rb +92 -0
- data/lib/docspace-api-sdk/api/Settings/storage-api.rb +575 -0
- data/lib/docspace-api-sdk/api/Settings/telegram-api.rb +204 -0
- data/lib/docspace-api-sdk/api/Settings/tfa-settings-api.rb +586 -0
- data/lib/docspace-api-sdk/api/Settings/webhooks-api.rb +636 -0
- data/lib/docspace-api-sdk/api/Settings/webplugins-api.rb +422 -0
- data/lib/docspace-api-sdk/api/ThirdParty/third-party-api.rb +92 -0
- data/lib/docspace-api-sdk/api-client.rb +407 -0
- data/lib/docspace-api-sdk/api-error.rb +63 -0
- data/lib/docspace-api-sdk/api-model-base.rb +91 -0
- data/lib/docspace-api-sdk/configuration.rb +367 -0
- data/lib/docspace-api-sdk/models/access-request-key-dto.rb +173 -0
- data/lib/docspace-api-sdk/models/account-entry-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/account-entry-dto.rb +108 -0
- data/lib/docspace-api-sdk/models/account-info-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/account-info-dto.rb +195 -0
- data/lib/docspace-api-sdk/models/account-login-type.rb +44 -0
- data/lib/docspace-api-sdk/models/account-search-area.rb +44 -0
- data/lib/docspace-api-sdk/models/ace-short-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/ace-short-dto.rb +174 -0
- data/lib/docspace-api-sdk/models/action-link-action-request.rb +212 -0
- data/lib/docspace-api-sdk/models/action-link-request.rb +152 -0
- data/lib/docspace-api-sdk/models/action-type.rb +61 -0
- data/lib/docspace-api-sdk/models/active-connections-dto.rb +182 -0
- data/lib/docspace-api-sdk/models/active-connections-item-dto.rb +309 -0
- data/lib/docspace-api-sdk/models/active-connections-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/active-service-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/active-service-dto.rb +207 -0
- data/lib/docspace-api-sdk/models/additional-resources-dto.rb +212 -0
- data/lib/docspace-api-sdk/models/additional-resources-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/additional-white-label-settings-dto.rb +331 -0
- data/lib/docspace-api-sdk/models/additional-white-label-settings-request-dto.rb +152 -0
- data/lib/docspace-api-sdk/models/additional-white-label-settings-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/admin-message-base-settings-request-dto.rb +190 -0
- data/lib/docspace-api-sdk/models/admin-message-settings-request-dto.rb +270 -0
- data/lib/docspace-api-sdk/models/ai-action-args-prompt.rb +218 -0
- data/lib/docspace-api-sdk/models/ai-action-args.rb +204 -0
- data/lib/docspace-api-sdk/models/ai-action-type.rb +51 -0
- data/lib/docspace-api-sdk/models/ai-agent-new-items-dto.rb +184 -0
- data/lib/docspace-api-sdk/models/ai-agents-create-request.rb +329 -0
- data/lib/docspace-api-sdk/models/ai-agents-delete-request.rb +151 -0
- data/lib/docspace-api-sdk/models/ai-agents-get200-response-all-of-response.rb +151 -0
- data/lib/docspace-api-sdk/models/ai-agents-get200-response.rb +199 -0
- data/lib/docspace-api-sdk/models/ai-agents-reset-quota-request.rb +170 -0
- data/lib/docspace-api-sdk/models/ai-agents-update-quota-request-room-ids-inner.rb +107 -0
- data/lib/docspace-api-sdk/models/ai-agents-update-quota-request.rb +197 -0
- data/lib/docspace-api-sdk/models/ai-agents-update-request.rb +283 -0
- data/lib/docspace-api-sdk/models/ai-api-date-time.rb +162 -0
- data/lib/docspace-api-sdk/models/ai-approve-tool-call-request.rb +301 -0
- data/lib/docspace-api-sdk/models/ai-assignment-mutation-result.rb +179 -0
- data/lib/docspace-api-sdk/models/ai-assignments-assign-request.rb +217 -0
- data/lib/docspace-api-sdk/models/ai-assignments-cascade-profile-delete-request.rb +168 -0
- data/lib/docspace-api-sdk/models/ai-attachment-form-keys-inner.rb +193 -0
- data/lib/docspace-api-sdk/models/ai-attachment.rb +388 -0
- data/lib/docspace-api-sdk/models/ai-attachments-link-to-message-request.rb +224 -0
- data/lib/docspace-api-sdk/models/ai-attachments-save-file-request-input.rb +233 -0
- data/lib/docspace-api-sdk/models/ai-attachments-save-file-request.rb +177 -0
- data/lib/docspace-api-sdk/models/ai-attachments-save-files-many-request.rb +178 -0
- data/lib/docspace-api-sdk/models/ai-builtin-provider-type.rb +58 -0
- data/lib/docspace-api-sdk/models/ai-bulk-assignment-result-errors-inner.rb +215 -0
- data/lib/docspace-api-sdk/models/ai-bulk-assignment-result.rb +181 -0
- data/lib/docspace-api-sdk/models/ai-chat-event.rb +273 -0
- data/lib/docspace-api-sdk/models/ai-chat-price-dto.rb +195 -0
- data/lib/docspace-api-sdk/models/ai-chat-settings-dto.rb +153 -0
- data/lib/docspace-api-sdk/models/ai-chat-tool-permission-mode.rb +44 -0
- data/lib/docspace-api-sdk/models/ai-chat-tool-prefs-scope.rb +43 -0
- data/lib/docspace-api-sdk/models/ai-config-dto.rb +152 -0
- data/lib/docspace-api-sdk/models/ai-create-profile-input.rb +374 -0
- data/lib/docspace-api-sdk/models/ai-create-prompt-input.rb +207 -0
- data/lib/docspace-api-sdk/models/ai-distributed-task-status.rb +46 -0
- data/lib/docspace-api-sdk/models/ai-editor-tools-call-request.rb +190 -0
- data/lib/docspace-api-sdk/models/ai-editor-tools-call200-response.rb +168 -0
- data/lib/docspace-api-sdk/models/ai-editor-tools-list200-response-tools-inner.rb +251 -0
- data/lib/docspace-api-sdk/models/ai-editor-tools-list200-response.rb +170 -0
- data/lib/docspace-api-sdk/models/ai-embedding-price-dto.rb +152 -0
- data/lib/docspace-api-sdk/models/ai-embedding-provider-type.rb +45 -0
- data/lib/docspace-api-sdk/models/ai-employee-dto.rb +249 -0
- data/lib/docspace-api-sdk/models/ai-entry-pricing-dto-ai-chat-price-dto.rb +234 -0
- data/lib/docspace-api-sdk/models/ai-entry-pricing-dto-ai-embedding-price-dto.rb +234 -0
- data/lib/docspace-api-sdk/models/ai-entry-pricing-dto-ai-image-price-dto.rb +234 -0
- data/lib/docspace-api-sdk/models/ai-entry-pricing-dto-decimal.rb +234 -0
- data/lib/docspace-api-sdk/models/ai-error-code.rb +45 -0
- data/lib/docspace-api-sdk/models/ai-error-data.rb +230 -0
- data/lib/docspace-api-sdk/models/ai-error-response.rb +169 -0
- data/lib/docspace-api-sdk/models/ai-export-text-to-docx-request-folder-id.rb +107 -0
- data/lib/docspace-api-sdk/models/ai-export-text-to-docx-request.rb +221 -0
- data/lib/docspace-api-sdk/models/ai-export-text-to-docx202-response.rb +168 -0
- data/lib/docspace-api-sdk/models/ai-file-entry-base-dto.rb +391 -0
- data/lib/docspace-api-sdk/models/ai-file-entry-dto-all-of-available-share-rights.rb +197 -0
- data/lib/docspace-api-sdk/models/ai-file-entry-dto-all-of-security.rb +565 -0
- data/lib/docspace-api-sdk/models/ai-file-entry-dto-all-of-share-settings.rb +187 -0
- data/lib/docspace-api-sdk/models/ai-file-entry-dto.rb +562 -0
- data/lib/docspace-api-sdk/models/ai-file-entry-type.rb +43 -0
- data/lib/docspace-api-sdk/models/ai-file-operation-dto.rb +331 -0
- data/lib/docspace-api-sdk/models/ai-file-operation-type.rb +50 -0
- data/lib/docspace-api-sdk/models/ai-file-operation-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/ai-file-share.rb +53 -0
- data/lib/docspace-api-sdk/models/ai-folder-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/ai-folder-content-dto.rb +247 -0
- data/lib/docspace-api-sdk/models/ai-folder-content-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/ai-folder-dto.rb +838 -0
- data/lib/docspace-api-sdk/models/ai-folder-mutation-result.rb +189 -0
- data/lib/docspace-api-sdk/models/ai-folder-type.rb +72 -0
- data/lib/docspace-api-sdk/models/ai-folder-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/ai-image-price-dto.rb +172 -0
- data/lib/docspace-api-sdk/models/ai-import-error.rb +247 -0
- data/lib/docspace-api-sdk/models/ai-import-mode.rb +43 -0
- data/lib/docspace-api-sdk/models/ai-import-result-imported.rb +194 -0
- data/lib/docspace-api-sdk/models/ai-import-result.rb +190 -0
- data/lib/docspace-api-sdk/models/ai-logo-cover-dto.rb +168 -0
- data/lib/docspace-api-sdk/models/ai-logo-dto.rb +215 -0
- data/lib/docspace-api-sdk/models/ai-mcp-item.rb +263 -0
- data/lib/docspace-api-sdk/models/ai-metadata-match-dto.rb +186 -0
- data/lib/docspace-api-sdk/models/ai-model.rb +263 -0
- data/lib/docspace-api-sdk/models/ai-new-items-agent-new-items-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/ai-new-items-dto-agent-new-items-dto.rb +184 -0
- data/lib/docspace-api-sdk/models/ai-open-ai-chat-completion-chunk.rb +303 -0
- data/lib/docspace-api-sdk/models/ai-open-ai-choice-delta.rb +209 -0
- data/lib/docspace-api-sdk/models/ai-open-ai-chunk-choice.rb +231 -0
- data/lib/docspace-api-sdk/models/ai-open-ai-finish-reason.rb +45 -0
- data/lib/docspace-api-sdk/models/ai-open-ai-stream-chunk.rb +107 -0
- data/lib/docspace-api-sdk/models/ai-open-ai-stream-error-error.rb +218 -0
- data/lib/docspace-api-sdk/models/ai-open-ai-stream-error.rb +168 -0
- data/lib/docspace-api-sdk/models/ai-open-ai-tool-call-delta-function.rb +160 -0
- data/lib/docspace-api-sdk/models/ai-open-ai-tool-call-delta.rb +232 -0
- data/lib/docspace-api-sdk/models/ai-open-or-create-result.rb +225 -0
- data/lib/docspace-api-sdk/models/ai-openai-chat-completions403-response-error.rb +217 -0
- data/lib/docspace-api-sdk/models/ai-openai-chat-completions403-response.rb +167 -0
- data/lib/docspace-api-sdk/models/ai-openai-images-generations403-response-error.rb +217 -0
- data/lib/docspace-api-sdk/models/ai-openai-images-generations403-response.rb +167 -0
- data/lib/docspace-api-sdk/models/ai-preferences-set-deep-mode-request.rb +177 -0
- data/lib/docspace-api-sdk/models/ai-preferences-set-reasoning-level-request.rb +199 -0
- data/lib/docspace-api-sdk/models/ai-preferences-set-tool-permission-mode-request.rb +199 -0
- data/lib/docspace-api-sdk/models/ai-price-currency-dto.rb +168 -0
- data/lib/docspace-api-sdk/models/ai-prices-dto.rb +229 -0
- data/lib/docspace-api-sdk/models/ai-prices-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/ai-profile-mutation-result.rb +189 -0
- data/lib/docspace-api-sdk/models/ai-profile.rb +411 -0
- data/lib/docspace-api-sdk/models/ai-profiles-create400-response.rb +106 -0
- data/lib/docspace-api-sdk/models/ai-profiles-get-by-id200-response.rb +388 -0
- data/lib/docspace-api-sdk/models/ai-profiles-list-provider-models-request.rb +205 -0
- data/lib/docspace-api-sdk/models/ai-profiles-list-provider-models400-response-any-of.rb +195 -0
- data/lib/docspace-api-sdk/models/ai-profiles-list-provider-models400-response.rb +106 -0
- data/lib/docspace-api-sdk/models/ai-profiles-test-connection200-response-any-of.rb +150 -0
- data/lib/docspace-api-sdk/models/ai-profiles-test-connection200-response.rb +106 -0
- data/lib/docspace-api-sdk/models/ai-prompt-bundle.rb +251 -0
- data/lib/docspace-api-sdk/models/ai-prompt-folder.rb +250 -0
- data/lib/docspace-api-sdk/models/ai-prompt-mutation-result.rb +189 -0
- data/lib/docspace-api-sdk/models/ai-prompt.rb +287 -0
- data/lib/docspace-api-sdk/models/ai-prompts-import-bundle-request-options.rb +173 -0
- data/lib/docspace-api-sdk/models/ai-prompts-import-bundle-request.rb +177 -0
- data/lib/docspace-api-sdk/models/ai-prompts-move-request.rb +181 -0
- data/lib/docspace-api-sdk/models/ai-prompts-rename-folder-request.rb +195 -0
- data/lib/docspace-api-sdk/models/ai-prompts-update-request-updates.rb +170 -0
- data/lib/docspace-api-sdk/models/ai-prompts-update-request.rb +194 -0
- data/lib/docspace-api-sdk/models/ai-provider-type.rb +107 -0
- data/lib/docspace-api-sdk/models/ai-provider.rb +233 -0
- data/lib/docspace-api-sdk/models/ai-reasoning-depth.rb +45 -0
- data/lib/docspace-api-sdk/models/ai-reasoning-level.rb +46 -0
- data/lib/docspace-api-sdk/models/ai-reasoning-support.rb +257 -0
- data/lib/docspace-api-sdk/models/ai-regenerate-stream-request.rb +198 -0
- data/lib/docspace-api-sdk/models/ai-resolved-assignment.rb +196 -0
- data/lib/docspace-api-sdk/models/ai-room-data-lifetime-dto.rb +230 -0
- data/lib/docspace-api-sdk/models/ai-room-data-lifetime-period.rb +44 -0
- data/lib/docspace-api-sdk/models/ai-room-type.rb +47 -0
- data/lib/docspace-api-sdk/models/ai-send-custom-request.rb +231 -0
- data/lib/docspace-api-sdk/models/ai-send-request.rb +237 -0
- data/lib/docspace-api-sdk/models/ai-send-stream-body.rb +209 -0
- data/lib/docspace-api-sdk/models/ai-settings-dto.rb +238 -0
- data/lib/docspace-api-sdk/models/ai-settings-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/ai-success-response.rb +169 -0
- data/lib/docspace-api-sdk/models/ai-thread-message-like-content-any-of-inner.rb +176 -0
- data/lib/docspace-api-sdk/models/ai-thread-message-like-content.rb +107 -0
- data/lib/docspace-api-sdk/models/ai-thread-message-like-status.rb +168 -0
- data/lib/docspace-api-sdk/models/ai-thread-message-like.rb +270 -0
- data/lib/docspace-api-sdk/models/ai-thread.rb +219 -0
- data/lib/docspace-api-sdk/models/ai-threads-append-user-message-request.rb +203 -0
- data/lib/docspace-api-sdk/models/ai-threads-append-user-message200-response.rb +168 -0
- data/lib/docspace-api-sdk/models/ai-threads-create-request.rb +188 -0
- data/lib/docspace-api-sdk/models/ai-threads-open-or-create-request-entity-meta.rb +160 -0
- data/lib/docspace-api-sdk/models/ai-threads-open-or-create-request.rb +249 -0
- data/lib/docspace-api-sdk/models/ai-threads-regenerate-title-request.rb +203 -0
- data/lib/docspace-api-sdk/models/ai-threads-regenerate-title200-response.rb +168 -0
- data/lib/docspace-api-sdk/models/ai-threads-rename-request.rb +194 -0
- data/lib/docspace-api-sdk/models/ai-threads-touch-request.rb +176 -0
- data/lib/docspace-api-sdk/models/ai-threads-update-message-request.rb +194 -0
- data/lib/docspace-api-sdk/models/ai-tool-annotations.rb +187 -0
- data/lib/docspace-api-sdk/models/ai-tool-call-data.rb +280 -0
- data/lib/docspace-api-sdk/models/ai-tool-permission-mode.rb +44 -0
- data/lib/docspace-api-sdk/models/ai-tools-add-custom-server-request.rb +204 -0
- data/lib/docspace-api-sdk/models/ai-tools-bulk-result-errors-inner.rb +193 -0
- data/lib/docspace-api-sdk/models/ai-tools-bulk-result.rb +181 -0
- data/lib/docspace-api-sdk/models/ai-tools-list-system-tools200-response.rb +228 -0
- data/lib/docspace-api-sdk/models/ai-tools-mutation-result.rb +179 -0
- data/lib/docspace-api-sdk/models/ai-tools-remove-custom-server-request.rb +176 -0
- data/lib/docspace-api-sdk/models/ai-tools-replace-all-custom-servers-request.rb +179 -0
- data/lib/docspace-api-sdk/models/ai-tools-set-allow-always-request.rb +229 -0
- data/lib/docspace-api-sdk/models/ai-tools-set-disabled-request.rb +237 -0
- data/lib/docspace-api-sdk/models/ai-tools-update-custom-server-request.rb +203 -0
- data/lib/docspace-api-sdk/models/ai-user-settings-dto.rb +184 -0
- data/lib/docspace-api-sdk/models/ai-user-settings-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/ai-vectorization-settings-dto.rb +184 -0
- data/lib/docspace-api-sdk/models/ai-vectorization-settings-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/ai-vectorization-start-task-request.rb +170 -0
- data/lib/docspace-api-sdk/models/ai-vectorization-start-task200-response.rb +222 -0
- data/lib/docspace-api-sdk/models/ai-watermark-additions.rb +46 -0
- data/lib/docspace-api-sdk/models/ai-watermark-dto.rb +321 -0
- data/lib/docspace-api-sdk/models/ai-web-search-config.rb +211 -0
- data/lib/docspace-api-sdk/models/ai-web-search-configure-request.rb +176 -0
- data/lib/docspace-api-sdk/models/ai-web-search-configure400-response.rb +106 -0
- data/lib/docspace-api-sdk/models/ai-web-search-mutation-result.rb +189 -0
- data/lib/docspace-api-sdk/models/ai-web-search-set-active-config-request.rb +176 -0
- data/lib/docspace-api-sdk/models/amazon-s3-region-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/amazon-s3-region-dto.rb +208 -0
- data/lib/docspace-api-sdk/models/anonymous-config-dto.rb +169 -0
- data/lib/docspace-api-sdk/models/api-date-time.rb +162 -0
- data/lib/docspace-api-sdk/models/api-key-response-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/api-key-response-dto.rb +288 -0
- data/lib/docspace-api-sdk/models/api-key-response-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/app-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/app-dto.rb +173 -0
- data/lib/docspace-api-sdk/models/app-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/apply-filter-option.rb +44 -0
- data/lib/docspace-api-sdk/models/archive-room-request.rb +152 -0
- data/lib/docspace-api-sdk/models/array-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/assign-metadata-templates.rb +199 -0
- data/lib/docspace-api-sdk/models/audit-event-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/audit-event-dto.rb +359 -0
- data/lib/docspace-api-sdk/models/audit-report-format.rb +43 -0
- data/lib/docspace-api-sdk/models/audit-trail-action-dto.rb +175 -0
- data/lib/docspace-api-sdk/models/audit-trail-module-dto.rb +166 -0
- data/lib/docspace-api-sdk/models/audit-trail-product-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/audit-trail-product-dto.rb +166 -0
- data/lib/docspace-api-sdk/models/audit-trail-types-dto.rb +207 -0
- data/lib/docspace-api-sdk/models/audit-trail-types-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/auth-key-dto.rb +249 -0
- data/lib/docspace-api-sdk/models/auth-key-request.rb +249 -0
- data/lib/docspace-api-sdk/models/auth-request-dto.rb +293 -0
- data/lib/docspace-api-sdk/models/auth-service-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/auth-service-dto.rb +219 -0
- data/lib/docspace-api-sdk/models/auth-with-code-request-dto.rb +302 -0
- data/lib/docspace-api-sdk/models/authentication-token-dto.rb +216 -0
- data/lib/docspace-api-sdk/models/authentication-token-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/auto-clean-up-data-dto.rb +184 -0
- data/lib/docspace-api-sdk/models/auto-clean-up-data-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/auto-cleanup-request-dto.rb +184 -0
- data/lib/docspace-api-sdk/models/backup-cron-request.rb +195 -0
- data/lib/docspace-api-sdk/models/backup-history-record-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/backup-history-record-dto.rb +285 -0
- data/lib/docspace-api-sdk/models/backup-period.rb +44 -0
- data/lib/docspace-api-sdk/models/backup-progress-dto.rb +258 -0
- data/lib/docspace-api-sdk/models/backup-progress-enum.rb +44 -0
- data/lib/docspace-api-sdk/models/backup-progress-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/backup-service-state-dto.rb +152 -0
- data/lib/docspace-api-sdk/models/backup-service-state-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/backup-storage-type.rb +47 -0
- data/lib/docspace-api-sdk/models/backups-count-result-dto.rb +162 -0
- data/lib/docspace-api-sdk/models/backups-count-result-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/balance-dto.rb +207 -0
- data/lib/docspace-api-sdk/models/balance-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/base-batch-request-dto-all-of-file-ids.rb +106 -0
- data/lib/docspace-api-sdk/models/base-batch-request-dto-all-of-folder-ids.rb +106 -0
- data/lib/docspace-api-sdk/models/base-batch-request-dto.rb +185 -0
- data/lib/docspace-api-sdk/models/batch-request-dto-all-of-dest-folder-id.rb +108 -0
- data/lib/docspace-api-sdk/models/batch-request-dto-all-of-file-ids.rb +106 -0
- data/lib/docspace-api-sdk/models/batch-request-dto-all-of-folder-ids.rb +106 -0
- data/lib/docspace-api-sdk/models/batch-request-dto.rb +256 -0
- data/lib/docspace-api-sdk/models/batch-tags-request-dto.rb +171 -0
- data/lib/docspace-api-sdk/models/boolean-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/capabilities-dto.rb +275 -0
- data/lib/docspace-api-sdk/models/capabilities-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/change-client-activation-request.rb +169 -0
- data/lib/docspace-api-sdk/models/change-email-request.rb +188 -0
- data/lib/docspace-api-sdk/models/change-history-request.rb +179 -0
- data/lib/docspace-api-sdk/models/change-owner-request-dto.rb +195 -0
- data/lib/docspace-api-sdk/models/change-password-request.rb +164 -0
- data/lib/docspace-api-sdk/models/change-wallet-service-state-request-dto.rb +184 -0
- data/lib/docspace-api-sdk/models/chat-settings-dto.rb +153 -0
- data/lib/docspace-api-sdk/models/chat-settings.rb +184 -0
- data/lib/docspace-api-sdk/models/check-confirm-request-dto.rb +250 -0
- data/lib/docspace-api-sdk/models/check-conversion-request-dto.rb +214 -0
- data/lib/docspace-api-sdk/models/check-dest-folder-dto.rb +187 -0
- data/lib/docspace-api-sdk/models/check-dest-folder-result.rb +44 -0
- data/lib/docspace-api-sdk/models/check-dest-folder-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/check-doc-service-url-request-dto.rb +210 -0
- data/lib/docspace-api-sdk/models/check-fill-form-draft-request.rb +200 -0
- data/lib/docspace-api-sdk/models/check-move-or-copy-batch-items-dest-folder-id-parameter.rb +108 -0
- data/lib/docspace-api-sdk/models/check-move-or-copy-batch-items-folder-ids-parameter-inner.rb +106 -0
- data/lib/docspace-api-sdk/models/check-upload-request.rb +155 -0
- data/lib/docspace-api-sdk/models/chunked-upload-session-dto.rb +207 -0
- data/lib/docspace-api-sdk/models/chunked-upload-session-result-dto.rb +162 -0
- data/lib/docspace-api-sdk/models/chunked-upload-session-result-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/chunked-upload-session-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/client-info-response.rb +306 -0
- data/lib/docspace-api-sdk/models/client-response.rb +402 -0
- data/lib/docspace-api-sdk/models/client-secret-response.rb +152 -0
- data/lib/docspace-api-sdk/models/co-editing-config-dto.rb +194 -0
- data/lib/docspace-api-sdk/models/co-editing-config-mode.rb +43 -0
- data/lib/docspace-api-sdk/models/color-theme-colors-dto.rb +164 -0
- data/lib/docspace-api-sdk/models/color-theme-colors-request-dto.rb +164 -0
- data/lib/docspace-api-sdk/models/company-white-label-settings-dto.rb +288 -0
- data/lib/docspace-api-sdk/models/company-white-label-settings-request-dto.rb +152 -0
- data/lib/docspace-api-sdk/models/company-white-label-settings-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/configuration-dto.rb +394 -0
- data/lib/docspace-api-sdk/models/configuration-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/confirm-data.rb +175 -0
- data/lib/docspace-api-sdk/models/confirm-dto.rb +234 -0
- data/lib/docspace-api-sdk/models/confirm-type.rb +61 -0
- data/lib/docspace-api-sdk/models/confirm-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/connection-test-result-dto.rb +163 -0
- data/lib/docspace-api-sdk/models/connection-test-result-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/contact.rb +164 -0
- data/lib/docspace-api-sdk/models/conversation-result-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/conversation-result-dto.rb +274 -0
- data/lib/docspace-api-sdk/models/convert-document-layout-request.rb +175 -0
- data/lib/docspace-api-sdk/models/convert-document-renderer-request.rb +153 -0
- data/lib/docspace-api-sdk/models/convert-file-request-dto.rb +287 -0
- data/lib/docspace-api-sdk/models/convert-pdf-request.rb +152 -0
- data/lib/docspace-api-sdk/models/convert-spreadsheet-layout-request.rb +239 -0
- data/lib/docspace-api-sdk/models/convert-spreadsheet-margins-request.rb +186 -0
- data/lib/docspace-api-sdk/models/convert-spreadsheet-page-size-request.rb +164 -0
- data/lib/docspace-api-sdk/models/convert-thumbnail-request.rb +186 -0
- data/lib/docspace-api-sdk/models/cookie-settings-dto.rb +196 -0
- data/lib/docspace-api-sdk/models/cookie-settings-request-dto.rb +162 -0
- data/lib/docspace-api-sdk/models/cookie-settings-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/copy-as-request-dest-folder-id.rb +108 -0
- data/lib/docspace-api-sdk/models/copy-as-request.rb +212 -0
- data/lib/docspace-api-sdk/models/cover-request-dto.rb +181 -0
- data/lib/docspace-api-sdk/models/covers-result-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/covers-result-dto.rb +168 -0
- data/lib/docspace-api-sdk/models/create-api-key-request-dto.rb +235 -0
- data/lib/docspace-api-sdk/models/create-backup-schedule-request-dto.rb +218 -0
- data/lib/docspace-api-sdk/models/create-client-request.rb +612 -0
- data/lib/docspace-api-sdk/models/create-file-request-template-id.rb +108 -0
- data/lib/docspace-api-sdk/models/create-file-request.rb +208 -0
- data/lib/docspace-api-sdk/models/create-folder-request.rb +179 -0
- data/lib/docspace-api-sdk/models/create-metadata-template-request-dto.rb +178 -0
- data/lib/docspace-api-sdk/models/create-room-from-template-dto.rb +373 -0
- data/lib/docspace-api-sdk/models/create-room-request-dto.rb +422 -0
- data/lib/docspace-api-sdk/models/create-tag-request-dto.rb +179 -0
- data/lib/docspace-api-sdk/models/create-text-or-html-file-request.rb +200 -0
- data/lib/docspace-api-sdk/models/create-third-party-room-request.rb +289 -0
- data/lib/docspace-api-sdk/models/create-webhooks-config-request-dto.rb +345 -0
- data/lib/docspace-api-sdk/models/cron-params-dto.rb +194 -0
- data/lib/docspace-api-sdk/models/csp-dto.rb +170 -0
- data/lib/docspace-api-sdk/models/csp-request-dto.rb +155 -0
- data/lib/docspace-api-sdk/models/csp-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/currencies-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/currencies-dto.rb +175 -0
- data/lib/docspace-api-sdk/models/current-license-info.rb +196 -0
- data/lib/docspace-api-sdk/models/custom-color-theme-dto.rb +183 -0
- data/lib/docspace-api-sdk/models/custom-color-theme-request-dto.rb +183 -0
- data/lib/docspace-api-sdk/models/custom-color-themes-settings-dto.rb +175 -0
- data/lib/docspace-api-sdk/models/custom-color-themes-settings-request-dto.rb +163 -0
- data/lib/docspace-api-sdk/models/custom-color-themes-settings-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/custom-field-request.rb +166 -0
- data/lib/docspace-api-sdk/models/custom-field-value-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/custom-field-value-dto.rb +164 -0
- data/lib/docspace-api-sdk/models/custom-filter-request.rb +152 -0
- data/lib/docspace-api-sdk/models/customer-config-dto.rb +208 -0
- data/lib/docspace-api-sdk/models/customer-info-dto.rb +227 -0
- data/lib/docspace-api-sdk/models/customer-info-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/customer-monthly-usage-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/customer-monthly-usage-dto.rb +193 -0
- data/lib/docspace-api-sdk/models/customer-monthly-usage-report-request-dto.rb +164 -0
- data/lib/docspace-api-sdk/models/customer-operations-report-request-dto.rb +273 -0
- data/lib/docspace-api-sdk/models/customer-service-usage-dto.rb +236 -0
- data/lib/docspace-api-sdk/models/customer-service-usage-report-dto.rb +205 -0
- data/lib/docspace-api-sdk/models/customer-service-usage-report-request-dto.rb +253 -0
- data/lib/docspace-api-sdk/models/customer-service-usage-report-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/customization-config-dto.rb +263 -0
- data/lib/docspace-api-sdk/models/dark-theme-settings-dto.rb +184 -0
- data/lib/docspace-api-sdk/models/dark-theme-settings-request-dto.rb +191 -0
- data/lib/docspace-api-sdk/models/dark-theme-settings-type.rb +44 -0
- data/lib/docspace-api-sdk/models/dark-theme-settings-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/date-to-auto-clean-up.rb +47 -0
- data/lib/docspace-api-sdk/models/deep-link-configuration-request-dto.rb +152 -0
- data/lib/docspace-api-sdk/models/deep-link-dto.rb +181 -0
- data/lib/docspace-api-sdk/models/deep-link-handling-mode.rb +44 -0
- data/lib/docspace-api-sdk/models/deep-link-settings-request-dto.rb +184 -0
- data/lib/docspace-api-sdk/models/default-product-request-dto.rb +191 -0
- data/lib/docspace-api-sdk/models/default-template-item-dto.rb +210 -0
- data/lib/docspace-api-sdk/models/default-template-settings-dto.rb +157 -0
- data/lib/docspace-api-sdk/models/default-template-settings-request-dto-selected-file.rb +108 -0
- data/lib/docspace-api-sdk/models/default-template-settings-request-dto.rb +181 -0
- data/lib/docspace-api-sdk/models/default-template-settings-reset-request-dto.rb +155 -0
- data/lib/docspace-api-sdk/models/default-template-settings-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/delete-batch-request-dto-all-of-file-ids.rb +106 -0
- data/lib/docspace-api-sdk/models/delete-batch-request-dto-all-of-folder-ids.rb +106 -0
- data/lib/docspace-api-sdk/models/delete-batch-request-dto.rb +205 -0
- data/lib/docspace-api-sdk/models/delete-file-request.rb +162 -0
- data/lib/docspace-api-sdk/models/delete-folder-request.rb +162 -0
- data/lib/docspace-api-sdk/models/delete-room-request.rb +152 -0
- data/lib/docspace-api-sdk/models/delete-version-batch-request-dto.rb +211 -0
- data/lib/docspace-api-sdk/models/discount-category-dto.rb +183 -0
- data/lib/docspace-api-sdk/models/display-request-dto.rb +152 -0
- data/lib/docspace-api-sdk/models/distributed-task-status.rb +46 -0
- data/lib/docspace-api-sdk/models/dns-settings-request-dto.rb +163 -0
- data/lib/docspace-api-sdk/models/doc-service-url-dto.rb +287 -0
- data/lib/docspace-api-sdk/models/doc-service-url-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/docs-cloud-config-dto.rb +217 -0
- data/lib/docspace-api-sdk/models/docs-cloud-config-request-dto.rb +217 -0
- data/lib/docspace-api-sdk/models/docs-cloud-config-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/docs-cloud-dev-pack-request-dto.rb +180 -0
- data/lib/docspace-api-sdk/models/docs-cloud-ip-filter-config-dto.rb +155 -0
- data/lib/docspace-api-sdk/models/docs-cloud-ip-filter-config-request.rb +155 -0
- data/lib/docspace-api-sdk/models/docs-cloud-ip-filter-rule-dto.rb +187 -0
- data/lib/docspace-api-sdk/models/docs-cloud-ip-filter-rule-request.rb +187 -0
- data/lib/docspace-api-sdk/models/docs-cloud-license-info-dto.rb +172 -0
- data/lib/docspace-api-sdk/models/docs-cloud-payment-dto.rb +224 -0
- data/lib/docspace-api-sdk/models/docs-cloud-quota-dto.rb +168 -0
- data/lib/docspace-api-sdk/models/docs-cloud-quota-user-dto.rb +164 -0
- data/lib/docspace-api-sdk/models/docs-cloud-quota-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/docs-cloud-security-config-dto.rb +212 -0
- data/lib/docspace-api-sdk/models/docs-cloud-security-config-request.rb +212 -0
- data/lib/docspace-api-sdk/models/docs-cloud-server-config-dto.rb +190 -0
- data/lib/docspace-api-sdk/models/docs-cloud-server-config-request.rb +190 -0
- data/lib/docspace-api-sdk/models/docs-cloud-server-info-dto.rb +174 -0
- data/lib/docspace-api-sdk/models/docs-cloud-stats-dto.rb +172 -0
- data/lib/docspace-api-sdk/models/docs-cloud-tenant-dto.rb +257 -0
- data/lib/docspace-api-sdk/models/docs-cloud-tenant-info-dto.rb +182 -0
- data/lib/docspace-api-sdk/models/docs-cloud-tenant-info-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/docs-cloud-tenant-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/docs-cloud-usage-dto.rb +162 -0
- data/lib/docspace-api-sdk/models/docs-cloud-usage-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/docs-cloud-user-stats-dto.rb +192 -0
- data/lib/docspace-api-sdk/models/docs-cloud-users-limit-dto.rb +162 -0
- data/lib/docspace-api-sdk/models/docs-cloud-wopi-config-dto.rb +152 -0
- data/lib/docspace-api-sdk/models/docs-cloud-wopi-config-request.rb +152 -0
- data/lib/docspace-api-sdk/models/document-builder-task-dto.rb +309 -0
- data/lib/docspace-api-sdk/models/document-builder-task-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/document-config-dto.rb +268 -0
- data/lib/docspace-api-sdk/models/document-options-dto.rb +152 -0
- data/lib/docspace-api-sdk/models/domain-name-rules-dto.rb +173 -0
- data/lib/docspace-api-sdk/models/double-nullable-wrapper.rb +195 -0
- data/lib/docspace-api-sdk/models/double-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/download-request-dto-all-of-file-ids.rb +106 -0
- data/lib/docspace-api-sdk/models/download-request-dto-all-of-folder-ids.rb +106 -0
- data/lib/docspace-api-sdk/models/download-request-dto.rb +198 -0
- data/lib/docspace-api-sdk/models/download-request-item-dto-key.rb +108 -0
- data/lib/docspace-api-sdk/models/download-request-item-dto.rb +192 -0
- data/lib/docspace-api-sdk/models/draft-location.rb +184 -0
- data/lib/docspace-api-sdk/models/duplicate-request-dto-all-of-file-ids.rb +106 -0
- data/lib/docspace-api-sdk/models/duplicate-request-dto-all-of-folder-ids.rb +106 -0
- data/lib/docspace-api-sdk/models/duplicate-request-dto.rb +185 -0
- data/lib/docspace-api-sdk/models/edit-history-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/edit-history-author-dto.rb +166 -0
- data/lib/docspace-api-sdk/models/edit-history-changes-dto.rb +173 -0
- data/lib/docspace-api-sdk/models/edit-history-data-dto.rb +240 -0
- data/lib/docspace-api-sdk/models/edit-history-data-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/edit-history-dto.rb +238 -0
- data/lib/docspace-api-sdk/models/edit-history-url-dto.rb +175 -0
- data/lib/docspace-api-sdk/models/editor-configuration-dto.rb +289 -0
- data/lib/docspace-api-sdk/models/editor-tool-call-parameters-dto.rb +109 -0
- data/lib/docspace-api-sdk/models/editor-tool-call-state-dto.rb +182 -0
- data/lib/docspace-api-sdk/models/editor-type.rb +44 -0
- data/lib/docspace-api-sdk/models/email-activation-settings-dto.rb +162 -0
- data/lib/docspace-api-sdk/models/email-activation-settings-request-dto.rb +162 -0
- data/lib/docspace-api-sdk/models/email-activation-settings-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/email-invitation-dto.rb +168 -0
- data/lib/docspace-api-sdk/models/email-member-request-dto.rb +230 -0
- data/lib/docspace-api-sdk/models/embedded-config-dto.rb +197 -0
- data/lib/docspace-api-sdk/models/employee-activation-status.rb +45 -0
- data/lib/docspace-api-sdk/models/employee-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/employee-dto.rb +249 -0
- data/lib/docspace-api-sdk/models/employee-full-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/employee-full-dto.rb +637 -0
- data/lib/docspace-api-sdk/models/employee-full-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/employee-status.rb +46 -0
- data/lib/docspace-api-sdk/models/employee-type.rb +46 -0
- data/lib/docspace-api-sdk/models/employee-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/enabled-module-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/enabled-module-dto.rb +164 -0
- data/lib/docspace-api-sdk/models/encryption-key-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/encryption-key-dto.rb +205 -0
- data/lib/docspace-api-sdk/models/encryption-key-request-dto.rb +174 -0
- data/lib/docspace-api-sdk/models/encryption-settings-dto.rb +195 -0
- data/lib/docspace-api-sdk/models/encryption-settings-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/encryption-status.rb +45 -0
- data/lib/docspace-api-sdk/models/entity-quota-dto.rb +173 -0
- data/lib/docspace-api-sdk/models/entity-quota-settings-dto.rb +189 -0
- data/lib/docspace-api-sdk/models/entity-quota-settings-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/entry-field-dto.rb +228 -0
- data/lib/docspace-api-sdk/models/entry-metadata-dto.rb +168 -0
- data/lib/docspace-api-sdk/models/entry-metadata-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/entry-template-dto.rb +228 -0
- data/lib/docspace-api-sdk/models/entry-type.rb +49 -0
- data/lib/docspace-api-sdk/models/error-api-response-error.rb +182 -0
- data/lib/docspace-api-sdk/models/error-api-response.rb +171 -0
- data/lib/docspace-api-sdk/models/exchange-token200-response.rb +181 -0
- data/lib/docspace-api-sdk/models/external-database-connection-request-dto.rb +260 -0
- data/lib/docspace-api-sdk/models/external-database-type.rb +43 -0
- data/lib/docspace-api-sdk/models/external-db-sync-form-result-dto.rb +184 -0
- data/lib/docspace-api-sdk/models/external-db-sync-task-dto.rb +284 -0
- data/lib/docspace-api-sdk/models/external-db-sync-task-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/external-resource-dto.rb +165 -0
- data/lib/docspace-api-sdk/models/external-resources-dto.rb +242 -0
- data/lib/docspace-api-sdk/models/external-share-dto.rb +384 -0
- data/lib/docspace-api-sdk/models/external-share-request-param.rb +153 -0
- data/lib/docspace-api-sdk/models/external-share-status.rb +47 -0
- data/lib/docspace-api-sdk/models/external-share-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/external-sharing-settings-dto.rb +192 -0
- data/lib/docspace-api-sdk/models/external-sharing-settings-request-dto.rb +192 -0
- data/lib/docspace-api-sdk/models/external-sharing-settings-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/feature-used-dto.rb +165 -0
- data/lib/docspace-api-sdk/models/feedback-config-dto.rb +163 -0
- data/lib/docspace-api-sdk/models/field-error.rb +172 -0
- data/lib/docspace-api-sdk/models/file-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/file-conflict-resolve-type.rb +44 -0
- data/lib/docspace-api-sdk/models/file-dto-all-of-view-accessibility.rb +232 -0
- data/lib/docspace-api-sdk/models/file-dto.rb +927 -0
- data/lib/docspace-api-sdk/models/file-encryption-info-dto.rb +168 -0
- data/lib/docspace-api-sdk/models/file-encryption-info-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/file-entry-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/file-entry-base-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/file-entry-base-dto.rb +391 -0
- data/lib/docspace-api-sdk/models/file-entry-base-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/file-entry-dto.rb +562 -0
- data/lib/docspace-api-sdk/models/file-entry-type.rb +43 -0
- data/lib/docspace-api-sdk/models/file-keys-dto.rb +203 -0
- data/lib/docspace-api-sdk/models/file-link-dto.rb +179 -0
- data/lib/docspace-api-sdk/models/file-link-request.rb +294 -0
- data/lib/docspace-api-sdk/models/file-link-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/file-operation-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/file-operation-dto.rb +331 -0
- data/lib/docspace-api-sdk/models/file-operation-request-base-dto.rb +152 -0
- data/lib/docspace-api-sdk/models/file-operation-type.rb +50 -0
- data/lib/docspace-api-sdk/models/file-operation-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/file-reference-data-dto.rb +185 -0
- data/lib/docspace-api-sdk/models/file-reference-dto.rb +229 -0
- data/lib/docspace-api-sdk/models/file-reference-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/file-share-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/file-share-dto.rb +430 -0
- data/lib/docspace-api-sdk/models/file-share-link.rb +303 -0
- data/lib/docspace-api-sdk/models/file-share-params.rb +220 -0
- data/lib/docspace-api-sdk/models/file-share-response-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/file-share-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/file-share.rb +53 -0
- data/lib/docspace-api-sdk/models/file-status.rb +51 -0
- data/lib/docspace-api-sdk/models/file-type.rb +51 -0
- data/lib/docspace-api-sdk/models/file-upload-result-dto.rb +173 -0
- data/lib/docspace-api-sdk/models/file-upload-result-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/file-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/files-settings-dto-internal-formats.rb +232 -0
- data/lib/docspace-api-sdk/models/files-settings-dto.rb +892 -0
- data/lib/docspace-api-sdk/models/files-settings-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/files-statistics-folder.rb +163 -0
- data/lib/docspace-api-sdk/models/files-statistics-result-dto.rb +202 -0
- data/lib/docspace-api-sdk/models/files-statistics-result-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/filling-form-result-dto.rb +236 -0
- data/lib/docspace-api-sdk/models/filling-form-result-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/filter-type.rb +62 -0
- data/lib/docspace-api-sdk/models/finish-dto.rb +169 -0
- data/lib/docspace-api-sdk/models/firebase-device-dto.rb +205 -0
- data/lib/docspace-api-sdk/models/firebase-device-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/firebase-dto.rb +246 -0
- data/lib/docspace-api-sdk/models/firebase-request-dto.rb +163 -0
- data/lib/docspace-api-sdk/models/folder-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/folder-content-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/folder-content-dto.rb +247 -0
- data/lib/docspace-api-sdk/models/folder-content-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/folder-dto.rb +838 -0
- data/lib/docspace-api-sdk/models/folder-link-request.rb +294 -0
- data/lib/docspace-api-sdk/models/folder-metadata-search.rb +328 -0
- data/lib/docspace-api-sdk/models/folder-type.rb +72 -0
- data/lib/docspace-api-sdk/models/folder-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/form-filling-manage-action.rb +45 -0
- data/lib/docspace-api-sdk/models/form-filling-status.rb +47 -0
- data/lib/docspace-api-sdk/models/form-gallery-dto.rb +233 -0
- data/lib/docspace-api-sdk/models/form-metadata-dto.rb +188 -0
- data/lib/docspace-api-sdk/models/form-results-dto.rb +165 -0
- data/lib/docspace-api-sdk/models/form-role-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/form-role-dto.rb +284 -0
- data/lib/docspace-api-sdk/models/form-role-request.rb +224 -0
- data/lib/docspace-api-sdk/models/form-submissions-dto.rb +168 -0
- data/lib/docspace-api-sdk/models/form-submissions-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/forms-item-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/forms-item-data-dto.rb +186 -0
- data/lib/docspace-api-sdk/models/forms-item-dto.rb +164 -0
- data/lib/docspace-api-sdk/models/generate-docx-tool-call-parameters-dto.rb +155 -0
- data/lib/docspace-api-sdk/models/generate-form-tool-call-parameters-dto.rb +155 -0
- data/lib/docspace-api-sdk/models/generate-presentation-tool-call-parameters-dto.rb +175 -0
- data/lib/docspace-api-sdk/models/get-portal-prices200-response-links-inner.rb +161 -0
- data/lib/docspace-api-sdk/models/get-portal-prices200-response.rb +196 -0
- data/lib/docspace-api-sdk/models/get-reference-data-dto.rb +200 -0
- data/lib/docspace-api-sdk/models/goback-config-dto.rb +153 -0
- data/lib/docspace-api-sdk/models/greeting-settings-request-dto.rb +179 -0
- data/lib/docspace-api-sdk/models/group-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/group-dto.rb +302 -0
- data/lib/docspace-api-sdk/models/group-member-security-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/group-member-security-dto.rb +309 -0
- data/lib/docspace-api-sdk/models/group-request-dto.rb +202 -0
- data/lib/docspace-api-sdk/models/group-summary-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/group-summary-dto.rb +204 -0
- data/lib/docspace-api-sdk/models/group-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/hide-confirm-convert-request-dto.rb +152 -0
- data/lib/docspace-api-sdk/models/history-action-dto.rb +185 -0
- data/lib/docspace-api-sdk/models/history-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/history-data-dto.rb +153 -0
- data/lib/docspace-api-sdk/models/history-dto.rb +273 -0
- data/lib/docspace-api-sdk/models/i-compress-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/icon-request.rb +153 -0
- data/lib/docspace-api-sdk/models/image-size-dto.rb +162 -0
- data/lib/docspace-api-sdk/models/importable-api-entity.rb +152 -0
- data/lib/docspace-api-sdk/models/info-config-dto.rb +231 -0
- data/lib/docspace-api-sdk/models/int32-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/int64-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/invitation-link-create-request-dto.rb +237 -0
- data/lib/docspace-api-sdk/models/invitation-link-delete-request-dto.rb +169 -0
- data/lib/docspace-api-sdk/models/invitation-link-dto.rb +253 -0
- data/lib/docspace-api-sdk/models/invitation-link-update-request-dto.rb +215 -0
- data/lib/docspace-api-sdk/models/invitation-link-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/invite-users-request-dto.rb +182 -0
- data/lib/docspace-api-sdk/models/ip-restriction-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/ip-restriction-dto.rb +185 -0
- data/lib/docspace-api-sdk/models/ip-restriction-entry-dto.rb +165 -0
- data/lib/docspace-api-sdk/models/ip-restrictions-dto.rb +168 -0
- data/lib/docspace-api-sdk/models/ip-restrictions-settings-dto.rb +162 -0
- data/lib/docspace-api-sdk/models/ip-restrictions-settings-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/ip-restrictions-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/is-default-white-label-logos-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/is-default-white-label-logos-dto.rb +182 -0
- data/lib/docspace-api-sdk/models/is-default-white-label-logos-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/item-key-value-pair-boolean-string-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/item-key-value-pair-boolean-string.rb +163 -0
- data/lib/docspace-api-sdk/models/item-key-value-pair-object-object.rb +162 -0
- data/lib/docspace-api-sdk/models/item-key-value-pair-string-boolean.rb +163 -0
- data/lib/docspace-api-sdk/models/item-key-value-pair-string-logo-request-dto.rb +163 -0
- data/lib/docspace-api-sdk/models/item-key-value-pair-string-string.rb +164 -0
- data/lib/docspace-api-sdk/models/json-value-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/licensor-details-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/licensor-details-dto.rb +347 -0
- data/lib/docspace-api-sdk/models/licensor-details-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/link-account-request-dto.rb +153 -0
- data/lib/docspace-api-sdk/models/link-type.rb +43 -0
- data/lib/docspace-api-sdk/models/location-type.rb +49 -0
- data/lib/docspace-api-sdk/models/lock-file-request.rb +152 -0
- data/lib/docspace-api-sdk/models/login-event-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/login-event-dto.rb +303 -0
- data/lib/docspace-api-sdk/models/login-provider.rb +56 -0
- data/lib/docspace-api-sdk/models/login-settings-dto.rb +250 -0
- data/lib/docspace-api-sdk/models/login-settings-request-dto.rb +256 -0
- data/lib/docspace-api-sdk/models/login-settings-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/logo-config-dto.rb +207 -0
- data/lib/docspace-api-sdk/models/logo-cover-dto.rb +168 -0
- data/lib/docspace-api-sdk/models/logo-dto.rb +215 -0
- data/lib/docspace-api-sdk/models/logo-request-dto.rb +164 -0
- data/lib/docspace-api-sdk/models/logo-request.rb +330 -0
- data/lib/docspace-api-sdk/models/mail-domain-settings-request-dto.rb +233 -0
- data/lib/docspace-api-sdk/models/manage-form-filling-dto.rb +201 -0
- data/lib/docspace-api-sdk/models/member-request-dto.rb +424 -0
- data/lib/docspace-api-sdk/models/members-request.rb +155 -0
- data/lib/docspace-api-sdk/models/mention-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/mention-dto.rb +206 -0
- data/lib/docspace-api-sdk/models/mention-message-request.rb +200 -0
- data/lib/docspace-api-sdk/models/message-action.rb +403 -0
- data/lib/docspace-api-sdk/models/metadata-conflict-resolve-type.rb +43 -0
- data/lib/docspace-api-sdk/models/metadata-field-dto.rb +228 -0
- data/lib/docspace-api-sdk/models/metadata-field-option-dto.rb +163 -0
- data/lib/docspace-api-sdk/models/metadata-field-option-request.rb +164 -0
- data/lib/docspace-api-sdk/models/metadata-field-request.rb +209 -0
- data/lib/docspace-api-sdk/models/metadata-field-type.rb +46 -0
- data/lib/docspace-api-sdk/models/metadata-field-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/metadata-filter-condition-request.rb +220 -0
- data/lib/docspace-api-sdk/models/metadata-match-dto.rb +186 -0
- data/lib/docspace-api-sdk/models/metadata-operation-dto.rb +197 -0
- data/lib/docspace-api-sdk/models/metadata-operation-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/metadata-template-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/metadata-template-dto.rb +226 -0
- data/lib/docspace-api-sdk/models/metadata-template-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/metadata-value-dto.rb +187 -0
- data/lib/docspace-api-sdk/models/metadata-value-request.rb +215 -0
- data/lib/docspace-api-sdk/models/migrating-api-files.rb +172 -0
- data/lib/docspace-api-sdk/models/migrating-api-group.rb +194 -0
- data/lib/docspace-api-sdk/models/migrating-api-user.rb +256 -0
- data/lib/docspace-api-sdk/models/migration-api-info.rb +335 -0
- data/lib/docspace-api-sdk/models/migration-status-dto.rb +183 -0
- data/lib/docspace-api-sdk/models/migration-status-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/mobile-phone-activation-status.rb +43 -0
- data/lib/docspace-api-sdk/models/mobile-request-dto.rb +153 -0
- data/lib/docspace-api-sdk/models/model-module.rb +239 -0
- data/lib/docspace-api-sdk/models/module-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/multi-size-logo-cover-dto.rb +184 -0
- data/lib/docspace-api-sdk/models/new-items-dto-file-entry-base-dto.rb +184 -0
- data/lib/docspace-api-sdk/models/new-items-dto-room-new-items-dto.rb +184 -0
- data/lib/docspace-api-sdk/models/new-items-file-entry-base-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/new-items-room-new-items-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/notification-channel-dto.rb +182 -0
- data/lib/docspace-api-sdk/models/notification-channel-status-dto.rb +155 -0
- data/lib/docspace-api-sdk/models/notification-channel-status-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/notification-settings-dto.rb +184 -0
- data/lib/docspace-api-sdk/models/notification-settings-request-dto.rb +201 -0
- data/lib/docspace-api-sdk/models/notification-settings-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/notification-type.rb +45 -0
- data/lib/docspace-api-sdk/models/object-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/operation-dto.rb +345 -0
- data/lib/docspace-api-sdk/models/operation-order-type.rb +43 -0
- data/lib/docspace-api-sdk/models/operation-status.rb +45 -0
- data/lib/docspace-api-sdk/models/operation-token-usage-dto.rb +212 -0
- data/lib/docspace-api-sdk/models/operation-type.rb +61 -0
- data/lib/docspace-api-sdk/models/order-by-dto.rb +184 -0
- data/lib/docspace-api-sdk/models/order-request-dto.rb +180 -0
- data/lib/docspace-api-sdk/models/orders-item-request-dto.rb +263 -0
- data/lib/docspace-api-sdk/models/orders-request-dto.rb +157 -0
- data/lib/docspace-api-sdk/models/owner-change-instructions-dto.rb +163 -0
- data/lib/docspace-api-sdk/models/owner-change-instructions-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/owner-id-settings-request-dto.rb +169 -0
- data/lib/docspace-api-sdk/models/pageable-client-info-response.rb +184 -0
- data/lib/docspace-api-sdk/models/pageable-client-response.rb +184 -0
- data/lib/docspace-api-sdk/models/pageable-modification-response.rb +172 -0
- data/lib/docspace-api-sdk/models/pageable-response.rb +182 -0
- data/lib/docspace-api-sdk/models/password-hash-settings-dto.rb +173 -0
- data/lib/docspace-api-sdk/models/password-settings-dto.rb +302 -0
- data/lib/docspace-api-sdk/models/password-settings-request-dto.rb +199 -0
- data/lib/docspace-api-sdk/models/password-settings-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/payment-calculation-dto.rb +183 -0
- data/lib/docspace-api-sdk/models/payment-calculation-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/payment-method-status.rb +44 -0
- data/lib/docspace-api-sdk/models/payment-settings-dto.rb +260 -0
- data/lib/docspace-api-sdk/models/payment-settings-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/payment-url-request-dto.rb +279 -0
- data/lib/docspace-api-sdk/models/payments.rb +43 -0
- data/lib/docspace-api-sdk/models/permissions-config-dto.rb +242 -0
- data/lib/docspace-api-sdk/models/plugins-config-dto.rb +155 -0
- data/lib/docspace-api-sdk/models/plugins-dto.rb +172 -0
- data/lib/docspace-api-sdk/models/portal-user-dto.rb +496 -0
- data/lib/docspace-api-sdk/models/portal-user-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/price-dto.rb +175 -0
- data/lib/docspace-api-sdk/models/price-status.rb +44 -0
- data/lib/docspace-api-sdk/models/price-time-unit.rb +48 -0
- data/lib/docspace-api-sdk/models/problem-detail.rb +216 -0
- data/lib/docspace-api-sdk/models/product-administrator-dto.rb +223 -0
- data/lib/docspace-api-sdk/models/product-administrator-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/product-quantity-type.rb +45 -0
- data/lib/docspace-api-sdk/models/product-type.rb +45 -0
- data/lib/docspace-api-sdk/models/provider-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/provider-dto.rb +216 -0
- data/lib/docspace-api-sdk/models/provider-filter.rb +51 -0
- data/lib/docspace-api-sdk/models/quantity-request-dto.rb +189 -0
- data/lib/docspace-api-sdk/models/quota-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/quota-dto.rb +354 -0
- data/lib/docspace-api-sdk/models/quota-filter.rb +44 -0
- data/lib/docspace-api-sdk/models/quota-scope.rb +44 -0
- data/lib/docspace-api-sdk/models/quota-settings-request-dto-default-quota.rb +108 -0
- data/lib/docspace-api-sdk/models/quota-settings-request-dto.rb +178 -0
- data/lib/docspace-api-sdk/models/quota-state.rb +43 -0
- data/lib/docspace-api-sdk/models/quota-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/recaptcha-type.rb +45 -0
- data/lib/docspace-api-sdk/models/recent-config-dto.rb +175 -0
- data/lib/docspace-api-sdk/models/reg-status.rb +44 -0
- data/lib/docspace-api-sdk/models/report-dto.rb +205 -0
- data/lib/docspace-api-sdk/models/report-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/request-location.rb +44 -0
- data/lib/docspace-api-sdk/models/restricted-ai-models-dto.rb +157 -0
- data/lib/docspace-api-sdk/models/restricted-ai-models-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/review-config-dto.rb +153 -0
- data/lib/docspace-api-sdk/models/room-data-lifetime-dto.rb +230 -0
- data/lib/docspace-api-sdk/models/room-data-lifetime-period.rb +44 -0
- data/lib/docspace-api-sdk/models/room-from-template-status-dto.rb +236 -0
- data/lib/docspace-api-sdk/models/room-from-template-status-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/room-group-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/room-group-dto.rb +238 -0
- data/lib/docspace-api-sdk/models/room-group-request-dto.rb +293 -0
- data/lib/docspace-api-sdk/models/room-group-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/room-invitation-request.rb +197 -0
- data/lib/docspace-api-sdk/models/room-invitation.rb +220 -0
- data/lib/docspace-api-sdk/models/room-link-request.rb +339 -0
- data/lib/docspace-api-sdk/models/room-new-items-dto.rb +165 -0
- data/lib/docspace-api-sdk/models/room-privacy-filter.rb +44 -0
- data/lib/docspace-api-sdk/models/room-security-dto.rb +198 -0
- data/lib/docspace-api-sdk/models/room-security-error.rb +43 -0
- data/lib/docspace-api-sdk/models/room-security-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/room-template-dto.rb +364 -0
- data/lib/docspace-api-sdk/models/room-template-status-dto.rb +234 -0
- data/lib/docspace-api-sdk/models/room-template-status-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/room-type.rb +47 -0
- data/lib/docspace-api-sdk/models/rooms-metadata-search-request-dto.rb +330 -0
- data/lib/docspace-api-sdk/models/rooms-notification-settings-dto.rb +155 -0
- data/lib/docspace-api-sdk/models/rooms-notification-settings-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/rooms-notifications-settings-request-dto.rb +162 -0
- data/lib/docspace-api-sdk/models/run-builder-script-output-request.rb +175 -0
- data/lib/docspace-api-sdk/models/run-builder-script-request-dto-argument.rb +108 -0
- data/lib/docspace-api-sdk/models/run-builder-script-request-dto.rb +211 -0
- data/lib/docspace-api-sdk/models/sales-request-dto.rb +277 -0
- data/lib/docspace-api-sdk/models/save-additional-resources-request.rb +212 -0
- data/lib/docspace-api-sdk/models/save-as-pdf-request.rb +182 -0
- data/lib/docspace-api-sdk/models/save-auth-keys-request-dto.rb +219 -0
- data/lib/docspace-api-sdk/models/save-company-info-request.rb +347 -0
- data/lib/docspace-api-sdk/models/save-form-role-mapping-dto.rb +184 -0
- data/lib/docspace-api-sdk/models/schedule-dto.rb +312 -0
- data/lib/docspace-api-sdk/models/schedule-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/scope-response.rb +172 -0
- data/lib/docspace-api-sdk/models/search-area.rb +51 -0
- data/lib/docspace-api-sdk/models/security-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/security-dto.rb +199 -0
- data/lib/docspace-api-sdk/models/security-info-request-dto.rb +226 -0
- data/lib/docspace-api-sdk/models/security-info-simple-request-dto.rb +200 -0
- data/lib/docspace-api-sdk/models/security-request-dto.rb +206 -0
- data/lib/docspace-api-sdk/models/service-price-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/service-price-dto.rb +296 -0
- data/lib/docspace-api-sdk/models/session-request.rb +206 -0
- data/lib/docspace-api-sdk/models/set-app-enabled-request.rb +169 -0
- data/lib/docspace-api-sdk/models/set-app-settings-request.rb +152 -0
- data/lib/docspace-api-sdk/models/set-audit-lifetime-settings-request.rb +172 -0
- data/lib/docspace-api-sdk/models/set-custom-fields.rb +171 -0
- data/lib/docspace-api-sdk/models/set-manager-request.rb +169 -0
- data/lib/docspace-api-sdk/models/set-metadata-values.rb +171 -0
- data/lib/docspace-api-sdk/models/set-public-dto.rb +197 -0
- data/lib/docspace-api-sdk/models/set-restricted-ai-models-request-dto.rb +171 -0
- data/lib/docspace-api-sdk/models/set-wallet-top-up-settings-request.rb +269 -0
- data/lib/docspace-api-sdk/models/settings-dto.rb +684 -0
- data/lib/docspace-api-sdk/models/settings-request-dto.rb +152 -0
- data/lib/docspace-api-sdk/models/settings-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/share-filter-type.rb +49 -0
- data/lib/docspace-api-sdk/models/signup-account-request-dto.rb +211 -0
- data/lib/docspace-api-sdk/models/smtp-operation-status-dto.rb +195 -0
- data/lib/docspace-api-sdk/models/smtp-operation-status-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/smtp-settings-dto.rb +368 -0
- data/lib/docspace-api-sdk/models/smtp-settings-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/socket-settings-dto.rb +153 -0
- data/lib/docspace-api-sdk/models/socket-settings-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/sort-order.rb +43 -0
- data/lib/docspace-api-sdk/models/sorted-by-type.rb +54 -0
- data/lib/docspace-api-sdk/models/sso-binding-type-dto.rb +164 -0
- data/lib/docspace-api-sdk/models/sso-certificate-dto.rb +216 -0
- data/lib/docspace-api-sdk/models/sso-encrypt-algorithm-type-dto.rb +175 -0
- data/lib/docspace-api-sdk/models/sso-field-mapping-dto.rb +208 -0
- data/lib/docspace-api-sdk/models/sso-idp-certificate-action-type-dto.rb +175 -0
- data/lib/docspace-api-sdk/models/sso-idp-certificate-advanced-dto.rb +204 -0
- data/lib/docspace-api-sdk/models/sso-idp-settings-dto.rb +208 -0
- data/lib/docspace-api-sdk/models/sso-name-id-format-type-dto.rb +252 -0
- data/lib/docspace-api-sdk/models/sso-settings-constants-dto.rb +202 -0
- data/lib/docspace-api-sdk/models/sso-settings-constants-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/sso-settings-dto.rb +270 -0
- data/lib/docspace-api-sdk/models/sso-settings-request-dto.rb +155 -0
- data/lib/docspace-api-sdk/models/sso-settings-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/sso-signing-algorithm-type-dto.rb +175 -0
- data/lib/docspace-api-sdk/models/sso-sp-certificate-action-type-dto.rb +175 -0
- data/lib/docspace-api-sdk/models/sso-sp-certificate-advanced-dto.rb +215 -0
- data/lib/docspace-api-sdk/models/start-backup-request-dto.rb +197 -0
- data/lib/docspace-api-sdk/models/start-backup-restore-request-dto.rb +220 -0
- data/lib/docspace-api-sdk/models/start-edit-request.rb +152 -0
- data/lib/docspace-api-sdk/models/start-filling-form.rb +153 -0
- data/lib/docspace-api-sdk/models/start-filling-mode.rb +45 -0
- data/lib/docspace-api-sdk/models/start-reassign-request-dto.rb +206 -0
- data/lib/docspace-api-sdk/models/start-update-user-type-dto.rb +195 -0
- data/lib/docspace-api-sdk/models/storage-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/storage-dto.rb +235 -0
- data/lib/docspace-api-sdk/models/storage-encryption-request-dto.rb +152 -0
- data/lib/docspace-api-sdk/models/storage-filter.rb +44 -0
- data/lib/docspace-api-sdk/models/storage-request-dto.rb +168 -0
- data/lib/docspace-api-sdk/models/storage-settings-dto.rb +175 -0
- data/lib/docspace-api-sdk/models/storage-settings-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/string-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/string-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/studio-default-page-settings-dto.rb +184 -0
- data/lib/docspace-api-sdk/models/studio-default-page-settings-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/sub-account-dto.rb +163 -0
- data/lib/docspace-api-sdk/models/subject-type.rb +46 -0
- data/lib/docspace-api-sdk/models/submit-form-dto.rb +163 -0
- data/lib/docspace-api-sdk/models/subscription-balance-dto.rb +234 -0
- data/lib/docspace-api-sdk/models/subscription-balance-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/tariff-dto.rb +271 -0
- data/lib/docspace-api-sdk/models/tariff-quota-dto.rb +246 -0
- data/lib/docspace-api-sdk/models/tariff-state.rb +45 -0
- data/lib/docspace-api-sdk/models/tariff-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/task-progress-response-dto.rb +269 -0
- data/lib/docspace-api-sdk/models/task-progress-response-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/telegram-status-dto.rb +202 -0
- data/lib/docspace-api-sdk/models/telegram-status-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/templates-config-dto.rb +175 -0
- data/lib/docspace-api-sdk/models/templates-request-dto.rb +155 -0
- data/lib/docspace-api-sdk/models/tenant-ai-access-settings-dto.rb +162 -0
- data/lib/docspace-api-sdk/models/tenant-ai-access-settings-request-dto.rb +152 -0
- data/lib/docspace-api-sdk/models/tenant-ai-access-settings-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/tenant-audit-settings-dto.rb +172 -0
- data/lib/docspace-api-sdk/models/tenant-audit-settings-request-dto.rb +152 -0
- data/lib/docspace-api-sdk/models/tenant-audit-settings-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/tenant-banner-settings-dto.rb +162 -0
- data/lib/docspace-api-sdk/models/tenant-banner-settings-request-dto.rb +152 -0
- data/lib/docspace-api-sdk/models/tenant-banner-settings-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/tenant-deep-link-settings-dto.rb +184 -0
- data/lib/docspace-api-sdk/models/tenant-deep-link-settings-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/tenant-dev-tools-access-settings-dto.rb +162 -0
- data/lib/docspace-api-sdk/models/tenant-dev-tools-access-settings-request-dto.rb +152 -0
- data/lib/docspace-api-sdk/models/tenant-dev-tools-access-settings-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/tenant-dto.rb +418 -0
- data/lib/docspace-api-sdk/models/tenant-industry.rb +58 -0
- data/lib/docspace-api-sdk/models/tenant-quota-dto.rb +610 -0
- data/lib/docspace-api-sdk/models/tenant-quota-feature-dto.rb +217 -0
- data/lib/docspace-api-sdk/models/tenant-quota-settings-dto.rb +183 -0
- data/lib/docspace-api-sdk/models/tenant-quota-settings-request-dto.rb +179 -0
- data/lib/docspace-api-sdk/models/tenant-quota-settings-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/tenant-quota-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/tenant-status.rb +49 -0
- data/lib/docspace-api-sdk/models/tenant-trusted-domains-type.rb +44 -0
- data/lib/docspace-api-sdk/models/tenant-user-invitation-settings-dto.rb +196 -0
- data/lib/docspace-api-sdk/models/tenant-user-invitation-settings-request-dto.rb +162 -0
- data/lib/docspace-api-sdk/models/tenant-user-invitation-settings-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/tenant-wallet-service-settings-dto.rb +187 -0
- data/lib/docspace-api-sdk/models/tenant-wallet-service-settings-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/tenant-wallet-service.rb +48 -0
- data/lib/docspace-api-sdk/models/tenant-wallet-settings-dto.rb +213 -0
- data/lib/docspace-api-sdk/models/tenant-wallet-settings-request-dto.rb +152 -0
- data/lib/docspace-api-sdk/models/tenant-wallet-settings-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/tenant-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/terminate-request-dto.rb +169 -0
- data/lib/docspace-api-sdk/models/tfa-app-code-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/tfa-app-code-dto.rb +163 -0
- data/lib/docspace-api-sdk/models/tfa-confirm-data-dto.rb +175 -0
- data/lib/docspace-api-sdk/models/tfa-confirm-data-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/tfa-request-dto.rb +223 -0
- data/lib/docspace-api-sdk/models/tfa-settings-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/tfa-settings-dto.rb +261 -0
- data/lib/docspace-api-sdk/models/tfa-setup-code-dto.rb +175 -0
- data/lib/docspace-api-sdk/models/tfa-setup-code-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/tfa-type.rb +44 -0
- data/lib/docspace-api-sdk/models/tfa-validate-request-dto.rb +165 -0
- data/lib/docspace-api-sdk/models/third-party-account-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/third-party-account-dto.rb +195 -0
- data/lib/docspace-api-sdk/models/third-party-backup-request-dto.rb +208 -0
- data/lib/docspace-api-sdk/models/third-party-check-conversion-request-dto.rb +215 -0
- data/lib/docspace-api-sdk/models/third-party-chunked-upload-session-dto.rb +207 -0
- data/lib/docspace-api-sdk/models/third-party-chunked-upload-session-result-dto.rb +162 -0
- data/lib/docspace-api-sdk/models/third-party-chunked-upload-session-result-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/third-party-chunked-upload-session-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/third-party-configuration-dto.rb +394 -0
- data/lib/docspace-api-sdk/models/third-party-configuration-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/third-party-draft-location.rb +186 -0
- data/lib/docspace-api-sdk/models/third-party-file-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/third-party-file-dto.rb +928 -0
- data/lib/docspace-api-sdk/models/third-party-file-entry-dto.rb +566 -0
- data/lib/docspace-api-sdk/models/third-party-file-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/third-party-folder-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/third-party-folder-content-dto.rb +247 -0
- data/lib/docspace-api-sdk/models/third-party-folder-content-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/third-party-folder-dto.rb +839 -0
- data/lib/docspace-api-sdk/models/third-party-folder-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/third-party-request-dto.rb +223 -0
- data/lib/docspace-api-sdk/models/third-party-save-as-pdf-request.rb +168 -0
- data/lib/docspace-api-sdk/models/third-party-upload-session-response-dto.rb +216 -0
- data/lib/docspace-api-sdk/models/third-party-upload-session-response-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/thumbnail.rb +46 -0
- data/lib/docspace-api-sdk/models/thumbnails-data-dto.rb +208 -0
- data/lib/docspace-api-sdk/models/thumbnails-data-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/thumbnails-request.rb +193 -0
- data/lib/docspace-api-sdk/models/time-bound-dto.rb +163 -0
- data/lib/docspace-api-sdk/models/timezone-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/timezone-dto.rb +168 -0
- data/lib/docspace-api-sdk/models/token-diagnostics-dto.rb +166 -0
- data/lib/docspace-api-sdk/models/token-diagnostics-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/top-up-deposit-request-dto.rb +215 -0
- data/lib/docspace-api-sdk/models/transaction-info-dto.rb +173 -0
- data/lib/docspace-api-sdk/models/turn-on-admin-message-settings-request-dto.rb +152 -0
- data/lib/docspace-api-sdk/models/upcoming-payment-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/upcoming-payment-dto.rb +236 -0
- data/lib/docspace-api-sdk/models/update-api-key-request.rb +212 -0
- data/lib/docspace-api-sdk/models/update-client-request.rb +424 -0
- data/lib/docspace-api-sdk/models/update-comment-request.rb +222 -0
- data/lib/docspace-api-sdk/models/update-file-request.rb +187 -0
- data/lib/docspace-api-sdk/models/update-folder-metadata-template-request.rb +184 -0
- data/lib/docspace-api-sdk/models/update-group-request.rb +213 -0
- data/lib/docspace-api-sdk/models/update-member-culture-request.rb +187 -0
- data/lib/docspace-api-sdk/models/update-member-request-dto.rb +350 -0
- data/lib/docspace-api-sdk/models/update-members-quota-request-dto-quota.rb +108 -0
- data/lib/docspace-api-sdk/models/update-members-quota-request-dto.rb +164 -0
- data/lib/docspace-api-sdk/models/update-members-request-dto.rb +165 -0
- data/lib/docspace-api-sdk/models/update-metadata-field-request.rb +209 -0
- data/lib/docspace-api-sdk/models/update-metadata-template.rb +164 -0
- data/lib/docspace-api-sdk/models/update-photo-member-request.rb +153 -0
- data/lib/docspace-api-sdk/models/update-room-group-request.rb +203 -0
- data/lib/docspace-api-sdk/models/update-room-request.rb +348 -0
- data/lib/docspace-api-sdk/models/update-rooms-quota-request-dto.rb +165 -0
- data/lib/docspace-api-sdk/models/update-rooms-room-ids-request-dto.rb +155 -0
- data/lib/docspace-api-sdk/models/update-tag-request-dto.rb +216 -0
- data/lib/docspace-api-sdk/models/update-webhooks-config-request-dto.rb +385 -0
- data/lib/docspace-api-sdk/models/upload-result-dto.rb +173 -0
- data/lib/docspace-api-sdk/models/upload-result-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/upload-session-response-dto.rb +214 -0
- data/lib/docspace-api-sdk/models/upload-session-response-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/usage-space-stat-item-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/usage-space-stat-item-dto.rb +196 -0
- data/lib/docspace-api-sdk/models/user-config-dto.rb +199 -0
- data/lib/docspace-api-sdk/models/user-exists-response-dto.rb +201 -0
- data/lib/docspace-api-sdk/models/user-exists-response-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/user-invitation-request-dto.rb +210 -0
- data/lib/docspace-api-sdk/models/user-invitation.rb +165 -0
- data/lib/docspace-api-sdk/models/validation-error-response.rb +174 -0
- data/lib/docspace-api-sdk/models/validation-result.rb +48 -0
- data/lib/docspace-api-sdk/models/vectorization-status.rb +44 -0
- data/lib/docspace-api-sdk/models/wallet-quantity-request-dto.rb +221 -0
- data/lib/docspace-api-sdk/models/wallet-service-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/wallet-service-dto.rb +397 -0
- data/lib/docspace-api-sdk/models/wallet-service-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/watermark-additions.rb +46 -0
- data/lib/docspace-api-sdk/models/watermark-dto.rb +321 -0
- data/lib/docspace-api-sdk/models/watermark-on-draw-dto.rb +219 -0
- data/lib/docspace-api-sdk/models/watermark-paragraph-dto.rb +165 -0
- data/lib/docspace-api-sdk/models/watermark-request-dto.rb +271 -0
- data/lib/docspace-api-sdk/models/watermark-text-run-dto.rb +177 -0
- data/lib/docspace-api-sdk/models/web-item-security-request-dto.rb +178 -0
- data/lib/docspace-api-sdk/models/web-items-security-request-dto.rb +155 -0
- data/lib/docspace-api-sdk/models/web-plugin-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/web-plugin-dto.rb +452 -0
- data/lib/docspace-api-sdk/models/web-plugin-request.rb +189 -0
- data/lib/docspace-api-sdk/models/web-plugin-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/webhook-group-status.rb +47 -0
- data/lib/docspace-api-sdk/models/webhook-retry-request-dto.rb +155 -0
- data/lib/docspace-api-sdk/models/webhook-trigger-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/webhook-trigger-dto.rb +173 -0
- data/lib/docspace-api-sdk/models/webhook-trigger.rb +73 -0
- data/lib/docspace-api-sdk/models/webhooks-config-dto.rb +329 -0
- data/lib/docspace-api-sdk/models/webhooks-config-with-status-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/webhooks-config-with-status-dto.rb +162 -0
- data/lib/docspace-api-sdk/models/webhooks-config-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/webhooks-log-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/webhooks-log-dto.rb +309 -0
- data/lib/docspace-api-sdk/models/webhooks-log-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/white-label-item-array-wrapper.rb +196 -0
- data/lib/docspace-api-sdk/models/white-label-item-dto.rb +205 -0
- data/lib/docspace-api-sdk/models/white-label-item-path-dto.rb +164 -0
- data/lib/docspace-api-sdk/models/white-label-item-size-dto.rb +252 -0
- data/lib/docspace-api-sdk/models/white-label-logo-type.rb +57 -0
- data/lib/docspace-api-sdk/models/white-label-request-dto.rb +190 -0
- data/lib/docspace-api-sdk/models/wizard-request-dto.rb +211 -0
- data/lib/docspace-api-sdk/models/wizard-settings-dto.rb +162 -0
- data/lib/docspace-api-sdk/models/wizard-settings-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/models/xlsx-report-response-dto.rb +172 -0
- data/lib/docspace-api-sdk/models/xlsx-report-response-wrapper.rb +194 -0
- data/lib/docspace-api-sdk/version.rb +20 -0
- data/lib/docspace-api-sdk.rb +1153 -0
- metadata +1208 -0
|
@@ -0,0 +1,3705 @@
|
|
|
1
|
+
# (c) Copyright Ascensio System SIA 2026
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
require 'cgi'
|
|
17
|
+
|
|
18
|
+
module DocspaceApiSdk
|
|
19
|
+
module Files
|
|
20
|
+
class FilesApi
|
|
21
|
+
attr_accessor :api_client
|
|
22
|
+
|
|
23
|
+
def initialize(api_client = ApiClient.default)
|
|
24
|
+
@api_client = api_client
|
|
25
|
+
end
|
|
26
|
+
# Add a file to Recent
|
|
27
|
+
# Stamps the file as just used by the calling account and puts it at the top of that account's Recent section, then answers with the file as it stands now. The list is personal: no other member sees the change, and the file itself is untouched. Read access is enough, so a room member with view-only rights and an invited guest may call it, and a visitor who reaches the file through an external link is recorded against that link. A caller without read access is refused with 403, and an identifier that resolves to nothing answers 404. Repeating the call is safe: the file keeps a single entry and only moves back to the top. The section holds the 1000 newest entries of an account and drops the oldest beyond that on its own; folders never enter it, and an encrypted file of a private room is answered normally but never recorded. Read the section back with `GET api/2.0/files/recent` and drop entries with `DELETE api/2.0/files/recent`; whether it is offered among the sections of `GET api/2.0/files/@root` is decided by `PUT api/2.0/files/displayrecent`.
|
|
28
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/add-file-to-recent/
|
|
29
|
+
# @param file_id [Integer, String] The file the operation addresses. Take the identifier from a listing such as `GET api/2.0/files/{folderId}`: a file stored on the portal is numbered, while a file in a connected third-party account is named by an opaque string.
|
|
30
|
+
# @param [Hash] opts the optional parameters
|
|
31
|
+
# @return [FileWrapper, ThirdPartyFileWrapper]
|
|
32
|
+
def add_file_to_recent(file_id, opts = {})
|
|
33
|
+
data, _status_code, _headers = add_file_to_recent_with_http_info(file_id, opts)
|
|
34
|
+
data
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Add a file to Recent
|
|
38
|
+
# Stamps the file as just used by the calling account and puts it at the top of that account's Recent section, then answers with the file as it stands now. The list is personal: no other member sees the change, and the file itself is untouched. Read access is enough, so a room member with view-only rights and an invited guest may call it, and a visitor who reaches the file through an external link is recorded against that link. A caller without read access is refused with 403, and an identifier that resolves to nothing answers 404. Repeating the call is safe: the file keeps a single entry and only moves back to the top. The section holds the 1000 newest entries of an account and drops the oldest beyond that on its own; folders never enter it, and an encrypted file of a private room is answered normally but never recorded. Read the section back with `GET api/2.0/files/recent` and drop entries with `DELETE api/2.0/files/recent`; whether it is offered among the sections of `GET api/2.0/files/@root` is decided by `PUT api/2.0/files/displayrecent`.
|
|
39
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/add-file-to-recent/
|
|
40
|
+
# @param file_id [Integer, String] The file the operation addresses. Take the identifier from a listing such as `GET api/2.0/files/{folderId}`: a file stored on the portal is numbered, while a file in a connected third-party account is named by an opaque string.
|
|
41
|
+
# @param [Hash] opts the optional parameters
|
|
42
|
+
# @return [Array<(FileWrapper, ThirdPartyFileWrapper, Integer, Hash)>] FileWrapper, ThirdPartyFileWrapper data, response status code and response headers
|
|
43
|
+
def add_file_to_recent_with_http_info(file_id, opts = {})
|
|
44
|
+
if @api_client.config.debugging
|
|
45
|
+
@api_client.config.logger.debug 'Calling API: Files::FilesApi.add_file_to_recent ...'
|
|
46
|
+
end
|
|
47
|
+
# verify the required parameter 'file_id' is set
|
|
48
|
+
if @api_client.config.client_side_validation && file_id.nil?
|
|
49
|
+
fail ArgumentError, "Missing the required parameter 'file_id' when calling Files::FilesApi.add_file_to_recent"
|
|
50
|
+
end
|
|
51
|
+
# resource path
|
|
52
|
+
local_var_path = '/api/2.0/files/file/{fileId}/recent'.sub('{' + 'fileId' + '}', CGI.escape(file_id.to_s))
|
|
53
|
+
|
|
54
|
+
# query parameters
|
|
55
|
+
query_params = opts[:query_params] || {}
|
|
56
|
+
|
|
57
|
+
# header parameters
|
|
58
|
+
header_params = opts[:header_params] || {}
|
|
59
|
+
# HTTP header 'Accept' (if needed)
|
|
60
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
61
|
+
|
|
62
|
+
# form parameters
|
|
63
|
+
form_params = opts[:form_params] || {}
|
|
64
|
+
|
|
65
|
+
# http body (model)
|
|
66
|
+
post_body = opts[:debug_body]
|
|
67
|
+
|
|
68
|
+
# return_type
|
|
69
|
+
return_type = opts[:debug_return_type] || (file_id.is_a?(String) ? 'ThirdPartyFileWrapper' : 'FileWrapper')
|
|
70
|
+
|
|
71
|
+
# auth_names
|
|
72
|
+
auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2', 'ApiKeyBearer', 'asc_auth_key', 'Bearer', 'OpenId']
|
|
73
|
+
|
|
74
|
+
new_options = opts.merge(
|
|
75
|
+
:operation => :"Files::FilesApi.add_file_to_recent",
|
|
76
|
+
:header_params => header_params,
|
|
77
|
+
:query_params => query_params,
|
|
78
|
+
:form_params => form_params,
|
|
79
|
+
:body => post_body,
|
|
80
|
+
:auth_names => auth_names,
|
|
81
|
+
:return_type => return_type
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
85
|
+
if @api_client.config.debugging
|
|
86
|
+
@api_client.config.logger.debug "API called: Files::FilesApi#add_file_to_recent\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
87
|
+
end
|
|
88
|
+
return data, status_code, headers
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Add template files
|
|
92
|
+
# Adds the listed files to the personal template list of the calling account, the set the portal offers when a new document is started from an existing one. The list belongs to the account and no other member sees it. Every authenticated member type may manage their own list, a guest is refused, and read access to each file is required. Only formats the portal treats as template documents survive: the accepted extensions arrive in `extsWebTemplate` of `GET api/2.0/files/settings`, and a file of any other format is dropped silently. Only numeric ids are accepted, so a file on a connected third-party account cannot become a template. The answer is `true` whenever the request was understood, which an empty list, an id that does not exist and an unreadable file all achieve, so it confirms nothing about what was added; no operation of this document reads the list back. Repeating the call is safe. Use `DELETE api/2.0/files/templates` to drop a file again.
|
|
93
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/add-templates/
|
|
94
|
+
# @param [Hash] opts the optional parameters
|
|
95
|
+
# @option opts [TemplatesRequestDto] :templates_request_dto
|
|
96
|
+
# @return [BooleanWrapper]
|
|
97
|
+
def add_templates(opts = {})
|
|
98
|
+
data, _status_code, _headers = add_templates_with_http_info(opts)
|
|
99
|
+
data
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Add template files
|
|
103
|
+
# Adds the listed files to the personal template list of the calling account, the set the portal offers when a new document is started from an existing one. The list belongs to the account and no other member sees it. Every authenticated member type may manage their own list, a guest is refused, and read access to each file is required. Only formats the portal treats as template documents survive: the accepted extensions arrive in `extsWebTemplate` of `GET api/2.0/files/settings`, and a file of any other format is dropped silently. Only numeric ids are accepted, so a file on a connected third-party account cannot become a template. The answer is `true` whenever the request was understood, which an empty list, an id that does not exist and an unreadable file all achieve, so it confirms nothing about what was added; no operation of this document reads the list back. Repeating the call is safe. Use `DELETE api/2.0/files/templates` to drop a file again.
|
|
104
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/add-templates/
|
|
105
|
+
# @param [Hash] opts the optional parameters
|
|
106
|
+
# @option opts [TemplatesRequestDto] :templates_request_dto
|
|
107
|
+
# @return [Array<(BooleanWrapper, Integer, Hash)>] BooleanWrapper data, response status code and response headers
|
|
108
|
+
def add_templates_with_http_info(opts = {})
|
|
109
|
+
if @api_client.config.debugging
|
|
110
|
+
@api_client.config.logger.debug 'Calling API: Files::FilesApi.add_templates ...'
|
|
111
|
+
end
|
|
112
|
+
# resource path
|
|
113
|
+
local_var_path = '/api/2.0/files/templates'
|
|
114
|
+
|
|
115
|
+
# query parameters
|
|
116
|
+
query_params = opts[:query_params] || {}
|
|
117
|
+
|
|
118
|
+
# header parameters
|
|
119
|
+
header_params = opts[:header_params] || {}
|
|
120
|
+
# HTTP header 'Accept' (if needed)
|
|
121
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
122
|
+
# HTTP header 'Content-Type'
|
|
123
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
124
|
+
if !content_type.nil?
|
|
125
|
+
header_params['Content-Type'] = content_type
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# form parameters
|
|
129
|
+
form_params = opts[:form_params] || {}
|
|
130
|
+
|
|
131
|
+
# http body (model)
|
|
132
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'templates_request_dto'])
|
|
133
|
+
|
|
134
|
+
# return_type
|
|
135
|
+
return_type = opts[:debug_return_type] || 'BooleanWrapper'
|
|
136
|
+
|
|
137
|
+
# auth_names
|
|
138
|
+
auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2', 'ApiKeyBearer', 'asc_auth_key', 'Bearer', 'OpenId']
|
|
139
|
+
|
|
140
|
+
new_options = opts.merge(
|
|
141
|
+
:operation => :"Files::FilesApi.add_templates",
|
|
142
|
+
:header_params => header_params,
|
|
143
|
+
:query_params => query_params,
|
|
144
|
+
:form_params => form_params,
|
|
145
|
+
:body => post_body,
|
|
146
|
+
:auth_names => auth_names,
|
|
147
|
+
:return_type => return_type
|
|
148
|
+
)
|
|
149
|
+
|
|
150
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
151
|
+
if @api_client.config.debugging
|
|
152
|
+
@api_client.config.logger.debug "API called: Files::FilesApi#add_templates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
153
|
+
end
|
|
154
|
+
return data, status_code, headers
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
# Change version history
|
|
158
|
+
# Closes or reopens a revision group in the version history of a file and answers with every stored version of that file, newest first. With `continueVersion=false` the named version is completed: its content is stored again as a fresh version that opens a new revision group, so the editing that follows no longer extends the previous one. With `continueVersion=true` the last revision group is folded back into the group before it, so the next save continues that revision instead of becoming a version of its own; a file that has only one group is left as it is. A `version` of 0 means the current version. The caller needs the right to edit the history of the file, which the room admin, a DocSpace admin acting as room manager and a member with content-creator rights have; plain editing access is refused with 403, as are a guest and a member without access to the room. The call is mutating and not idempotent. A file that is locked, lies in Trash, is open in an editing session or is kept in a connected third-party storage is refused.
|
|
159
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/change-version-history/
|
|
160
|
+
# @param file_id [Integer, String] The file whose version history is changed.
|
|
161
|
+
# @param change_history_request [ChangeHistoryRequest] The change to make to the revision group.
|
|
162
|
+
# @param [Hash] opts the optional parameters
|
|
163
|
+
# @return [FileArrayWrapper, ThirdPartyFileArrayWrapper]
|
|
164
|
+
def change_version_history(file_id, change_history_request, opts = {})
|
|
165
|
+
data, _status_code, _headers = change_version_history_with_http_info(file_id, change_history_request, opts)
|
|
166
|
+
data
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
# Change version history
|
|
170
|
+
# Closes or reopens a revision group in the version history of a file and answers with every stored version of that file, newest first. With `continueVersion=false` the named version is completed: its content is stored again as a fresh version that opens a new revision group, so the editing that follows no longer extends the previous one. With `continueVersion=true` the last revision group is folded back into the group before it, so the next save continues that revision instead of becoming a version of its own; a file that has only one group is left as it is. A `version` of 0 means the current version. The caller needs the right to edit the history of the file, which the room admin, a DocSpace admin acting as room manager and a member with content-creator rights have; plain editing access is refused with 403, as are a guest and a member without access to the room. The call is mutating and not idempotent. A file that is locked, lies in Trash, is open in an editing session or is kept in a connected third-party storage is refused.
|
|
171
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/change-version-history/
|
|
172
|
+
# @param file_id [Integer, String] The file whose version history is changed.
|
|
173
|
+
# @param change_history_request [ChangeHistoryRequest] The change to make to the revision group.
|
|
174
|
+
# @param [Hash] opts the optional parameters
|
|
175
|
+
# @return [Array<(FileArrayWrapper, ThirdPartyFileArrayWrapper, Integer, Hash)>] FileArrayWrapper, ThirdPartyFileArrayWrapper data, response status code and response headers
|
|
176
|
+
def change_version_history_with_http_info(file_id, change_history_request, opts = {})
|
|
177
|
+
if @api_client.config.debugging
|
|
178
|
+
@api_client.config.logger.debug 'Calling API: Files::FilesApi.change_version_history ...'
|
|
179
|
+
end
|
|
180
|
+
# verify the required parameter 'file_id' is set
|
|
181
|
+
if @api_client.config.client_side_validation && file_id.nil?
|
|
182
|
+
fail ArgumentError, "Missing the required parameter 'file_id' when calling Files::FilesApi.change_version_history"
|
|
183
|
+
end
|
|
184
|
+
# verify the required parameter 'change_history_request' is set
|
|
185
|
+
if @api_client.config.client_side_validation && change_history_request.nil?
|
|
186
|
+
fail ArgumentError, "Missing the required parameter 'change_history_request' when calling Files::FilesApi.change_version_history"
|
|
187
|
+
end
|
|
188
|
+
# resource path
|
|
189
|
+
local_var_path = '/api/2.0/files/file/{fileId}/history'.sub('{' + 'fileId' + '}', CGI.escape(file_id.to_s))
|
|
190
|
+
|
|
191
|
+
# query parameters
|
|
192
|
+
query_params = opts[:query_params] || {}
|
|
193
|
+
|
|
194
|
+
# header parameters
|
|
195
|
+
header_params = opts[:header_params] || {}
|
|
196
|
+
# HTTP header 'Accept' (if needed)
|
|
197
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
198
|
+
# HTTP header 'Content-Type'
|
|
199
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
200
|
+
if !content_type.nil?
|
|
201
|
+
header_params['Content-Type'] = content_type
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
# form parameters
|
|
205
|
+
form_params = opts[:form_params] || {}
|
|
206
|
+
|
|
207
|
+
# http body (model)
|
|
208
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(change_history_request)
|
|
209
|
+
|
|
210
|
+
# return_type
|
|
211
|
+
return_type = opts[:debug_return_type] || (file_id.is_a?(String) ? 'ThirdPartyFileArrayWrapper' : 'FileArrayWrapper')
|
|
212
|
+
|
|
213
|
+
# auth_names
|
|
214
|
+
auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2', 'ApiKeyBearer', 'asc_auth_key', 'Bearer', 'OpenId']
|
|
215
|
+
|
|
216
|
+
new_options = opts.merge(
|
|
217
|
+
:operation => :"Files::FilesApi.change_version_history",
|
|
218
|
+
:header_params => header_params,
|
|
219
|
+
:query_params => query_params,
|
|
220
|
+
:form_params => form_params,
|
|
221
|
+
:body => post_body,
|
|
222
|
+
:auth_names => auth_names,
|
|
223
|
+
:return_type => return_type
|
|
224
|
+
)
|
|
225
|
+
|
|
226
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
227
|
+
if @api_client.config.debugging
|
|
228
|
+
@api_client.config.logger.debug "API called: Files::FilesApi#change_version_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
229
|
+
end
|
|
230
|
+
return data, status_code, headers
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
# Open a form draft for filling
|
|
234
|
+
# Resolves the editor address the caller must open to fill out the given PDF form, and provisions the personal draft that filling needs. The form has to live in a form-filling room and filling has to be started for it with `PUT api/2.0/files/file/{fileId}/manageformfilling`; a caller who may edit the form, a form whose filling has not started, and a request naming `view` or `embedded` as the action are all sent straight to the form itself. Read access to the form is enough to get an address, fill-forms access is what puts the caller into the filling flow, and a holder of an external link may call it without signing in, while a caller with neither a session nor a link key is rejected. In the filling case the call is not read-only: it copies the form into the room's in-progress folder under the caller's name, clears the new-item badge, closes the editing session of the original, and answers with the address of that copy. A repeated call reuses that copy, and a call naming an existing draft adds a discard notice when that draft is no longer valid. The answer is one URL string that may carry a `#message/...` fragment the editor renders as a notice. For the full editor configuration use `GET api/2.0/files/file/{fileId}/openedit`. A form the caller cannot open is refused with 403, and one that does not exist is answered as missing.
|
|
235
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/check-fill-form-draft/
|
|
236
|
+
# @param file_id [Integer, String] The identifier of the PDF form to open, as it is returned by a room listing such as `GET api/2.0/files/{folderId}`. The identifier of an already created draft is accepted here as well.
|
|
237
|
+
# @param check_fill_form_draft_request [CheckFillFormDraftRequest] The revision of the form to open and what the caller intends to do with it.
|
|
238
|
+
# @param [Hash] opts the optional parameters
|
|
239
|
+
# @return [StringWrapper]
|
|
240
|
+
def check_fill_form_draft(file_id, check_fill_form_draft_request, opts = {})
|
|
241
|
+
data, _status_code, _headers = check_fill_form_draft_with_http_info(file_id, check_fill_form_draft_request, opts)
|
|
242
|
+
data
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
# Open a form draft for filling
|
|
246
|
+
# Resolves the editor address the caller must open to fill out the given PDF form, and provisions the personal draft that filling needs. The form has to live in a form-filling room and filling has to be started for it with `PUT api/2.0/files/file/{fileId}/manageformfilling`; a caller who may edit the form, a form whose filling has not started, and a request naming `view` or `embedded` as the action are all sent straight to the form itself. Read access to the form is enough to get an address, fill-forms access is what puts the caller into the filling flow, and a holder of an external link may call it without signing in, while a caller with neither a session nor a link key is rejected. In the filling case the call is not read-only: it copies the form into the room's in-progress folder under the caller's name, clears the new-item badge, closes the editing session of the original, and answers with the address of that copy. A repeated call reuses that copy, and a call naming an existing draft adds a discard notice when that draft is no longer valid. The answer is one URL string that may carry a `#message/...` fragment the editor renders as a notice. For the full editor configuration use `GET api/2.0/files/file/{fileId}/openedit`. A form the caller cannot open is refused with 403, and one that does not exist is answered as missing.
|
|
247
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/check-fill-form-draft/
|
|
248
|
+
# @param file_id [Integer, String] The identifier of the PDF form to open, as it is returned by a room listing such as `GET api/2.0/files/{folderId}`. The identifier of an already created draft is accepted here as well.
|
|
249
|
+
# @param check_fill_form_draft_request [CheckFillFormDraftRequest] The revision of the form to open and what the caller intends to do with it.
|
|
250
|
+
# @param [Hash] opts the optional parameters
|
|
251
|
+
# @return [Array<(StringWrapper, Integer, Hash)>] StringWrapper data, response status code and response headers
|
|
252
|
+
def check_fill_form_draft_with_http_info(file_id, check_fill_form_draft_request, opts = {})
|
|
253
|
+
if @api_client.config.debugging
|
|
254
|
+
@api_client.config.logger.debug 'Calling API: Files::FilesApi.check_fill_form_draft ...'
|
|
255
|
+
end
|
|
256
|
+
# verify the required parameter 'file_id' is set
|
|
257
|
+
if @api_client.config.client_side_validation && file_id.nil?
|
|
258
|
+
fail ArgumentError, "Missing the required parameter 'file_id' when calling Files::FilesApi.check_fill_form_draft"
|
|
259
|
+
end
|
|
260
|
+
# verify the required parameter 'check_fill_form_draft_request' is set
|
|
261
|
+
if @api_client.config.client_side_validation && check_fill_form_draft_request.nil?
|
|
262
|
+
fail ArgumentError, "Missing the required parameter 'check_fill_form_draft_request' when calling Files::FilesApi.check_fill_form_draft"
|
|
263
|
+
end
|
|
264
|
+
# resource path
|
|
265
|
+
local_var_path = '/api/2.0/files/masterform/{fileId}/checkfillformdraft'.sub('{' + 'fileId' + '}', CGI.escape(file_id.to_s))
|
|
266
|
+
|
|
267
|
+
# query parameters
|
|
268
|
+
query_params = opts[:query_params] || {}
|
|
269
|
+
|
|
270
|
+
# header parameters
|
|
271
|
+
header_params = opts[:header_params] || {}
|
|
272
|
+
# HTTP header 'Accept' (if needed)
|
|
273
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
274
|
+
# HTTP header 'Content-Type'
|
|
275
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
276
|
+
if !content_type.nil?
|
|
277
|
+
header_params['Content-Type'] = content_type
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
# form parameters
|
|
281
|
+
form_params = opts[:form_params] || {}
|
|
282
|
+
|
|
283
|
+
# http body (model)
|
|
284
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(check_fill_form_draft_request)
|
|
285
|
+
|
|
286
|
+
# return_type
|
|
287
|
+
return_type = opts[:debug_return_type] || 'StringWrapper'
|
|
288
|
+
|
|
289
|
+
# auth_names
|
|
290
|
+
auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2', 'ApiKeyBearer', 'asc_auth_key', 'Bearer', 'OpenId']
|
|
291
|
+
|
|
292
|
+
new_options = opts.merge(
|
|
293
|
+
:operation => :"Files::FilesApi.check_fill_form_draft",
|
|
294
|
+
:header_params => header_params,
|
|
295
|
+
:query_params => query_params,
|
|
296
|
+
:form_params => form_params,
|
|
297
|
+
:body => post_body,
|
|
298
|
+
:auth_names => auth_names,
|
|
299
|
+
:return_type => return_type
|
|
300
|
+
)
|
|
301
|
+
|
|
302
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
303
|
+
if @api_client.config.debugging
|
|
304
|
+
@api_client.config.logger.debug "API called: Files::FilesApi#check_fill_form_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
305
|
+
end
|
|
306
|
+
return data, status_code, headers
|
|
307
|
+
end
|
|
308
|
+
|
|
309
|
+
# Copy a file
|
|
310
|
+
# Copies one file into another folder under a new title, converting its content when the new title names a different format, and answers with the copy that was created. The extension of `destTitle` decides what happens: the same extension as the source copies the bytes as they are, a different one has the document service convert them first, and `toForm=true` converts a document into a PDF form. `password` unlocks a source file that is protected by one. `destFolderId` is read as a number for a folder inside the portal and as a string for a folder in a connected third-party storage; anything else is answered with an empty body and nothing is copied. The caller needs read access to the source file and the right to create files in the destination folder, and is otherwise refused with 403; a missing file or folder is answered with 404, and a format that cannot be converted with 400. The call is mutating and not idempotent - each call adds another copy. To copy many items at once, and without converting, use `PUT api/2.0/files/fileops/copy`.
|
|
311
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/copy-file-as/
|
|
312
|
+
# @param file_id [Integer, String] The file to copy.
|
|
313
|
+
# @param copy_as_request [CopyAsRequest] The title, the destination and the conversion options of the copy.
|
|
314
|
+
# @param [Hash] opts the optional parameters
|
|
315
|
+
# @return [FileEntryBaseWrapper]
|
|
316
|
+
def copy_file_as(file_id, copy_as_request, opts = {})
|
|
317
|
+
data, _status_code, _headers = copy_file_as_with_http_info(file_id, copy_as_request, opts)
|
|
318
|
+
data
|
|
319
|
+
end
|
|
320
|
+
|
|
321
|
+
# Copy a file
|
|
322
|
+
# Copies one file into another folder under a new title, converting its content when the new title names a different format, and answers with the copy that was created. The extension of `destTitle` decides what happens: the same extension as the source copies the bytes as they are, a different one has the document service convert them first, and `toForm=true` converts a document into a PDF form. `password` unlocks a source file that is protected by one. `destFolderId` is read as a number for a folder inside the portal and as a string for a folder in a connected third-party storage; anything else is answered with an empty body and nothing is copied. The caller needs read access to the source file and the right to create files in the destination folder, and is otherwise refused with 403; a missing file or folder is answered with 404, and a format that cannot be converted with 400. The call is mutating and not idempotent - each call adds another copy. To copy many items at once, and without converting, use `PUT api/2.0/files/fileops/copy`.
|
|
323
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/copy-file-as/
|
|
324
|
+
# @param file_id [Integer, String] The file to copy.
|
|
325
|
+
# @param copy_as_request [CopyAsRequest] The title, the destination and the conversion options of the copy.
|
|
326
|
+
# @param [Hash] opts the optional parameters
|
|
327
|
+
# @return [Array<(FileEntryBaseWrapper, Integer, Hash)>] FileEntryBaseWrapper data, response status code and response headers
|
|
328
|
+
def copy_file_as_with_http_info(file_id, copy_as_request, opts = {})
|
|
329
|
+
if @api_client.config.debugging
|
|
330
|
+
@api_client.config.logger.debug 'Calling API: Files::FilesApi.copy_file_as ...'
|
|
331
|
+
end
|
|
332
|
+
# verify the required parameter 'file_id' is set
|
|
333
|
+
if @api_client.config.client_side_validation && file_id.nil?
|
|
334
|
+
fail ArgumentError, "Missing the required parameter 'file_id' when calling Files::FilesApi.copy_file_as"
|
|
335
|
+
end
|
|
336
|
+
# verify the required parameter 'copy_as_request' is set
|
|
337
|
+
if @api_client.config.client_side_validation && copy_as_request.nil?
|
|
338
|
+
fail ArgumentError, "Missing the required parameter 'copy_as_request' when calling Files::FilesApi.copy_file_as"
|
|
339
|
+
end
|
|
340
|
+
# resource path
|
|
341
|
+
local_var_path = '/api/2.0/files/file/{fileId}/copyas'.sub('{' + 'fileId' + '}', CGI.escape(file_id.to_s))
|
|
342
|
+
|
|
343
|
+
# query parameters
|
|
344
|
+
query_params = opts[:query_params] || {}
|
|
345
|
+
|
|
346
|
+
# header parameters
|
|
347
|
+
header_params = opts[:header_params] || {}
|
|
348
|
+
# HTTP header 'Accept' (if needed)
|
|
349
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
350
|
+
# HTTP header 'Content-Type'
|
|
351
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
352
|
+
if !content_type.nil?
|
|
353
|
+
header_params['Content-Type'] = content_type
|
|
354
|
+
end
|
|
355
|
+
|
|
356
|
+
# form parameters
|
|
357
|
+
form_params = opts[:form_params] || {}
|
|
358
|
+
|
|
359
|
+
# http body (model)
|
|
360
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(copy_as_request)
|
|
361
|
+
|
|
362
|
+
# return_type
|
|
363
|
+
return_type = opts[:debug_return_type] || 'FileEntryBaseWrapper'
|
|
364
|
+
|
|
365
|
+
# auth_names
|
|
366
|
+
auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2', 'ApiKeyBearer', 'asc_auth_key', 'Bearer', 'OpenId']
|
|
367
|
+
|
|
368
|
+
new_options = opts.merge(
|
|
369
|
+
:operation => :"Files::FilesApi.copy_file_as",
|
|
370
|
+
:header_params => header_params,
|
|
371
|
+
:query_params => query_params,
|
|
372
|
+
:form_params => form_params,
|
|
373
|
+
:body => post_body,
|
|
374
|
+
:auth_names => auth_names,
|
|
375
|
+
:return_type => return_type
|
|
376
|
+
)
|
|
377
|
+
|
|
378
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
379
|
+
if @api_client.config.debugging
|
|
380
|
+
@api_client.config.logger.debug "API called: Files::FilesApi#copy_file_as\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
381
|
+
end
|
|
382
|
+
return data, status_code, headers
|
|
383
|
+
end
|
|
384
|
+
|
|
385
|
+
# Create the editing session
|
|
386
|
+
# Opens a chunked session that replaces the content of an existing file, which is how WebDAV clients save over a document. The answer carries the session id the later calls quote, the address of the standalone chunk handler, the expiry and the reserved size, and nothing is written until the parts reach `POST api/2.0/files/{folderId}/session/{sessionId}/upload` and the session is closed with `PUT api/2.0/files/{folderId}/session/{sessionId}/finalize`, where `folderId` is the folder the file lives in. Unlike an upload into a folder, the finished content does not become a new version: it overwrites the current one, and the file loses its encrypted flag and its stored conversion result in the process. The caller must be allowed to edit the file, as the owner, a room manager and a member invited with editing rights are; a reader and a guest get 403. A file that does not exist is answered as missing, and a payload above the portal limit for chunked uploads is refused before the session is created.
|
|
387
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/create-edit-session/
|
|
388
|
+
# @param file_id [Integer, String] The file whose content the session will replace; take the id from a folder listing or from the file itself.
|
|
389
|
+
# @param [Hash] opts the optional parameters
|
|
390
|
+
# @option opts [Integer] :file_size The number of bytes the new content will take. It is checked against the portal limit for chunked uploads before the session opens, and a session left at 0 takes the whole content in a single part.
|
|
391
|
+
# @return [ChunkedUploadSessionResultWrapper, ThirdPartyChunkedUploadSessionResultWrapper]
|
|
392
|
+
def create_edit_session(file_id, opts = {})
|
|
393
|
+
data, _status_code, _headers = create_edit_session_with_http_info(file_id, opts)
|
|
394
|
+
data
|
|
395
|
+
end
|
|
396
|
+
|
|
397
|
+
# Create the editing session
|
|
398
|
+
# Opens a chunked session that replaces the content of an existing file, which is how WebDAV clients save over a document. The answer carries the session id the later calls quote, the address of the standalone chunk handler, the expiry and the reserved size, and nothing is written until the parts reach `POST api/2.0/files/{folderId}/session/{sessionId}/upload` and the session is closed with `PUT api/2.0/files/{folderId}/session/{sessionId}/finalize`, where `folderId` is the folder the file lives in. Unlike an upload into a folder, the finished content does not become a new version: it overwrites the current one, and the file loses its encrypted flag and its stored conversion result in the process. The caller must be allowed to edit the file, as the owner, a room manager and a member invited with editing rights are; a reader and a guest get 403. A file that does not exist is answered as missing, and a payload above the portal limit for chunked uploads is refused before the session is created.
|
|
399
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/create-edit-session/
|
|
400
|
+
# @param file_id [Integer, String] The file whose content the session will replace; take the id from a folder listing or from the file itself.
|
|
401
|
+
# @param [Hash] opts the optional parameters
|
|
402
|
+
# @option opts [Integer] :file_size The number of bytes the new content will take. It is checked against the portal limit for chunked uploads before the session opens, and a session left at 0 takes the whole content in a single part.
|
|
403
|
+
# @return [Array<(ChunkedUploadSessionResultWrapper, ThirdPartyChunkedUploadSessionResultWrapper, Integer, Hash)>] ChunkedUploadSessionResultWrapper, ThirdPartyChunkedUploadSessionResultWrapper data, response status code and response headers
|
|
404
|
+
def create_edit_session_with_http_info(file_id, opts = {})
|
|
405
|
+
if @api_client.config.debugging
|
|
406
|
+
@api_client.config.logger.debug 'Calling API: Files::FilesApi.create_edit_session ...'
|
|
407
|
+
end
|
|
408
|
+
# verify the required parameter 'file_id' is set
|
|
409
|
+
if @api_client.config.client_side_validation && file_id.nil?
|
|
410
|
+
fail ArgumentError, "Missing the required parameter 'file_id' when calling Files::FilesApi.create_edit_session"
|
|
411
|
+
end
|
|
412
|
+
# resource path
|
|
413
|
+
local_var_path = '/api/2.0/files/file/{fileId}/edit_session'.sub('{' + 'fileId' + '}', CGI.escape(file_id.to_s))
|
|
414
|
+
|
|
415
|
+
# query parameters
|
|
416
|
+
query_params = opts[:query_params] || {}
|
|
417
|
+
query_params[:'fileSize'] = opts[:'file_size'] if !opts[:'file_size'].nil?
|
|
418
|
+
|
|
419
|
+
# header parameters
|
|
420
|
+
header_params = opts[:header_params] || {}
|
|
421
|
+
# HTTP header 'Accept' (if needed)
|
|
422
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
423
|
+
|
|
424
|
+
# form parameters
|
|
425
|
+
form_params = opts[:form_params] || {}
|
|
426
|
+
|
|
427
|
+
# http body (model)
|
|
428
|
+
post_body = opts[:debug_body]
|
|
429
|
+
|
|
430
|
+
# return_type
|
|
431
|
+
return_type = opts[:debug_return_type] || (file_id.is_a?(String) ? 'ThirdPartyChunkedUploadSessionResultWrapper' : 'ChunkedUploadSessionResultWrapper')
|
|
432
|
+
|
|
433
|
+
# auth_names
|
|
434
|
+
auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2', 'ApiKeyBearer', 'asc_auth_key', 'Bearer', 'OpenId']
|
|
435
|
+
|
|
436
|
+
new_options = opts.merge(
|
|
437
|
+
:operation => :"Files::FilesApi.create_edit_session",
|
|
438
|
+
:header_params => header_params,
|
|
439
|
+
:query_params => query_params,
|
|
440
|
+
:form_params => form_params,
|
|
441
|
+
:body => post_body,
|
|
442
|
+
:auth_names => auth_names,
|
|
443
|
+
:return_type => return_type
|
|
444
|
+
)
|
|
445
|
+
|
|
446
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
447
|
+
if @api_client.config.debugging
|
|
448
|
+
@api_client.config.logger.debug "API called: Files::FilesApi#create_edit_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
449
|
+
end
|
|
450
|
+
return data, status_code, headers
|
|
451
|
+
end
|
|
452
|
+
|
|
453
|
+
# Create a file
|
|
454
|
+
# Creates a file in the folder named in the route and answers with the stored file. The extension in the title decides the format: an extension of a known text, spreadsheet or presentation format is rewritten to the portal's own DOCX, XLSX or PPTX, a title with no extension at all gets DOCX added, while an unknown extension and the few formats the portal keeps as they are stay untouched; `enableExternalExt=true` stores the title verbatim and skips that rewriting. The content comes from one of three sources, tried in this order: `formId` copies a ready form out of the form gallery, `templateId` copies an existing file the caller can read - a number for a file in the portal, a string for one in a connected third-party storage - and with neither of them the portal's blank template for that format and the caller's language is used. The caller needs the right to create files in the folder, and the room roots, Archive and the template sections are refused even to an admin. The call is mutating and not idempotent. To create the file in the caller's own section use `POST api/2.0/files/@my/file`.
|
|
455
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/create-file/
|
|
456
|
+
# @param folder_id [Integer, String] The folder the file is created in.
|
|
457
|
+
# @param create_file_request [CreateFileRequest] The title of the new file and the source of its content.
|
|
458
|
+
# @param [Hash] opts the optional parameters
|
|
459
|
+
# @return [FileWrapper, ThirdPartyFileWrapper]
|
|
460
|
+
def create_file(folder_id, create_file_request, opts = {})
|
|
461
|
+
data, _status_code, _headers = create_file_with_http_info(folder_id, create_file_request, opts)
|
|
462
|
+
data
|
|
463
|
+
end
|
|
464
|
+
|
|
465
|
+
# Create a file
|
|
466
|
+
# Creates a file in the folder named in the route and answers with the stored file. The extension in the title decides the format: an extension of a known text, spreadsheet or presentation format is rewritten to the portal's own DOCX, XLSX or PPTX, a title with no extension at all gets DOCX added, while an unknown extension and the few formats the portal keeps as they are stay untouched; `enableExternalExt=true` stores the title verbatim and skips that rewriting. The content comes from one of three sources, tried in this order: `formId` copies a ready form out of the form gallery, `templateId` copies an existing file the caller can read - a number for a file in the portal, a string for one in a connected third-party storage - and with neither of them the portal's blank template for that format and the caller's language is used. The caller needs the right to create files in the folder, and the room roots, Archive and the template sections are refused even to an admin. The call is mutating and not idempotent. To create the file in the caller's own section use `POST api/2.0/files/@my/file`.
|
|
467
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/create-file/
|
|
468
|
+
# @param folder_id [Integer, String] The folder the file is created in.
|
|
469
|
+
# @param create_file_request [CreateFileRequest] The title of the new file and the source of its content.
|
|
470
|
+
# @param [Hash] opts the optional parameters
|
|
471
|
+
# @return [Array<(FileWrapper, ThirdPartyFileWrapper, Integer, Hash)>] FileWrapper, ThirdPartyFileWrapper data, response status code and response headers
|
|
472
|
+
def create_file_with_http_info(folder_id, create_file_request, opts = {})
|
|
473
|
+
if @api_client.config.debugging
|
|
474
|
+
@api_client.config.logger.debug 'Calling API: Files::FilesApi.create_file ...'
|
|
475
|
+
end
|
|
476
|
+
# verify the required parameter 'folder_id' is set
|
|
477
|
+
if @api_client.config.client_side_validation && folder_id.nil?
|
|
478
|
+
fail ArgumentError, "Missing the required parameter 'folder_id' when calling Files::FilesApi.create_file"
|
|
479
|
+
end
|
|
480
|
+
# verify the required parameter 'create_file_request' is set
|
|
481
|
+
if @api_client.config.client_side_validation && create_file_request.nil?
|
|
482
|
+
fail ArgumentError, "Missing the required parameter 'create_file_request' when calling Files::FilesApi.create_file"
|
|
483
|
+
end
|
|
484
|
+
# resource path
|
|
485
|
+
local_var_path = '/api/2.0/files/{folderId}/file'.sub('{' + 'folderId' + '}', CGI.escape(folder_id.to_s))
|
|
486
|
+
|
|
487
|
+
# query parameters
|
|
488
|
+
query_params = opts[:query_params] || {}
|
|
489
|
+
|
|
490
|
+
# header parameters
|
|
491
|
+
header_params = opts[:header_params] || {}
|
|
492
|
+
# HTTP header 'Accept' (if needed)
|
|
493
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
494
|
+
# HTTP header 'Content-Type'
|
|
495
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
496
|
+
if !content_type.nil?
|
|
497
|
+
header_params['Content-Type'] = content_type
|
|
498
|
+
end
|
|
499
|
+
|
|
500
|
+
# form parameters
|
|
501
|
+
form_params = opts[:form_params] || {}
|
|
502
|
+
|
|
503
|
+
# http body (model)
|
|
504
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_file_request)
|
|
505
|
+
|
|
506
|
+
# return_type
|
|
507
|
+
return_type = opts[:debug_return_type] || (folder_id.is_a?(String) ? 'ThirdPartyFileWrapper' : 'FileWrapper')
|
|
508
|
+
|
|
509
|
+
# auth_names
|
|
510
|
+
auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2', 'ApiKeyBearer', 'asc_auth_key', 'Bearer', 'OpenId']
|
|
511
|
+
|
|
512
|
+
new_options = opts.merge(
|
|
513
|
+
:operation => :"Files::FilesApi.create_file",
|
|
514
|
+
:header_params => header_params,
|
|
515
|
+
:query_params => query_params,
|
|
516
|
+
:form_params => form_params,
|
|
517
|
+
:body => post_body,
|
|
518
|
+
:auth_names => auth_names,
|
|
519
|
+
:return_type => return_type
|
|
520
|
+
)
|
|
521
|
+
|
|
522
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
523
|
+
if @api_client.config.debugging
|
|
524
|
+
@api_client.config.logger.debug "API called: Files::FilesApi#create_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
525
|
+
end
|
|
526
|
+
return data, status_code, headers
|
|
527
|
+
end
|
|
528
|
+
|
|
529
|
+
# Create a file in My documents
|
|
530
|
+
# Creates a file in the caller's own My documents section and answers with the stored file. The extension in the title decides the format: an extension of a known text, spreadsheet or presentation format is rewritten to the portal's own DOCX, XLSX or PPTX, a title with no extension at all gets DOCX added, while an unknown extension and the few formats the portal keeps as they are stay untouched; `enableExternalExt=true` stores the title verbatim and skips that rewriting. The content comes from one of three sources, tried in this order: `formId` copies a ready form out of the form gallery, `templateId` copies an existing file the caller can read - a number for a file in the portal, a string for one in a connected third-party storage - and with neither of them the portal's blank template for that format and the caller's language is used. The call is mutating and not idempotent: each call adds another file. A guest has no My documents section of their own, so a guest cannot use this operation at all, and a template the caller cannot read is refused. To create a file in a room or any other folder use `POST api/2.0/files/{folderId}/file`.
|
|
531
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/create-file-in-my-documents/
|
|
532
|
+
# @param [Hash] opts the optional parameters
|
|
533
|
+
# @option opts [CreateFileRequest] :create_file_request
|
|
534
|
+
# @return [FileWrapper]
|
|
535
|
+
def create_file_in_my_documents(opts = {})
|
|
536
|
+
data, _status_code, _headers = create_file_in_my_documents_with_http_info(opts)
|
|
537
|
+
data
|
|
538
|
+
end
|
|
539
|
+
|
|
540
|
+
# Create a file in My documents
|
|
541
|
+
# Creates a file in the caller's own My documents section and answers with the stored file. The extension in the title decides the format: an extension of a known text, spreadsheet or presentation format is rewritten to the portal's own DOCX, XLSX or PPTX, a title with no extension at all gets DOCX added, while an unknown extension and the few formats the portal keeps as they are stay untouched; `enableExternalExt=true` stores the title verbatim and skips that rewriting. The content comes from one of three sources, tried in this order: `formId` copies a ready form out of the form gallery, `templateId` copies an existing file the caller can read - a number for a file in the portal, a string for one in a connected third-party storage - and with neither of them the portal's blank template for that format and the caller's language is used. The call is mutating and not idempotent: each call adds another file. A guest has no My documents section of their own, so a guest cannot use this operation at all, and a template the caller cannot read is refused. To create a file in a room or any other folder use `POST api/2.0/files/{folderId}/file`.
|
|
542
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/create-file-in-my-documents/
|
|
543
|
+
# @param [Hash] opts the optional parameters
|
|
544
|
+
# @option opts [CreateFileRequest] :create_file_request
|
|
545
|
+
# @return [Array<(FileWrapper, Integer, Hash)>] FileWrapper data, response status code and response headers
|
|
546
|
+
def create_file_in_my_documents_with_http_info(opts = {})
|
|
547
|
+
if @api_client.config.debugging
|
|
548
|
+
@api_client.config.logger.debug 'Calling API: Files::FilesApi.create_file_in_my_documents ...'
|
|
549
|
+
end
|
|
550
|
+
# resource path
|
|
551
|
+
local_var_path = '/api/2.0/files/@my/file'
|
|
552
|
+
|
|
553
|
+
# query parameters
|
|
554
|
+
query_params = opts[:query_params] || {}
|
|
555
|
+
|
|
556
|
+
# header parameters
|
|
557
|
+
header_params = opts[:header_params] || {}
|
|
558
|
+
# HTTP header 'Accept' (if needed)
|
|
559
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
560
|
+
# HTTP header 'Content-Type'
|
|
561
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
562
|
+
if !content_type.nil?
|
|
563
|
+
header_params['Content-Type'] = content_type
|
|
564
|
+
end
|
|
565
|
+
|
|
566
|
+
# form parameters
|
|
567
|
+
form_params = opts[:form_params] || {}
|
|
568
|
+
|
|
569
|
+
# http body (model)
|
|
570
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_file_request'])
|
|
571
|
+
|
|
572
|
+
# return_type
|
|
573
|
+
return_type = opts[:debug_return_type] || 'FileWrapper'
|
|
574
|
+
|
|
575
|
+
# auth_names
|
|
576
|
+
auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2', 'ApiKeyBearer', 'asc_auth_key', 'Bearer', 'OpenId']
|
|
577
|
+
|
|
578
|
+
new_options = opts.merge(
|
|
579
|
+
:operation => :"Files::FilesApi.create_file_in_my_documents",
|
|
580
|
+
:header_params => header_params,
|
|
581
|
+
:query_params => query_params,
|
|
582
|
+
:form_params => form_params,
|
|
583
|
+
:body => post_body,
|
|
584
|
+
:auth_names => auth_names,
|
|
585
|
+
:return_type => return_type
|
|
586
|
+
)
|
|
587
|
+
|
|
588
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
589
|
+
if @api_client.config.debugging
|
|
590
|
+
@api_client.config.logger.debug "API called: Files::FilesApi#create_file_in_my_documents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
591
|
+
end
|
|
592
|
+
return data, status_code, headers
|
|
593
|
+
end
|
|
594
|
+
|
|
595
|
+
# Create the file primary external link
|
|
596
|
+
# Answers with the primary external link of a file, creating it on the first call and returning the one that already exists afterwards, so the operation is idempotent in effect: a second call with other parameters does not reconfigure the existing link, and changing one is the business of `PUT api/2.0/files/file/{id}/links`. The parameters therefore only shape the link at the moment it is born - `access` its rights, `expirationDate` its lifetime, which for a file in a personal section is unlimited here rather than the default of a few days, `internal` whether only signed-in members may follow it, `denyDownload` whether the content may only be viewed, and `password` a secret to be asked for. A PDF form gets the rights it needs for filling out whatever was asked for, and a form in a form-filling room is answered with the link of the room instead. The caller needs the right to share the file and is otherwise refused with 403; a link that was deliberately revoked is not recreated but answered with 404. Read the address from `sharedTo.shareLink`.
|
|
597
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/create-file-primary-external-link/
|
|
598
|
+
# @param id [Integer, String] The file the link points at.
|
|
599
|
+
# @param file_link_request [FileLinkRequest] The settings of the link. They are applied in full, so a field left out is reset rather than kept.
|
|
600
|
+
# @param [Hash] opts the optional parameters
|
|
601
|
+
# @return [FileShareWrapper]
|
|
602
|
+
def create_file_primary_external_link(id, file_link_request, opts = {})
|
|
603
|
+
data, _status_code, _headers = create_file_primary_external_link_with_http_info(id, file_link_request, opts)
|
|
604
|
+
data
|
|
605
|
+
end
|
|
606
|
+
|
|
607
|
+
# Create the file primary external link
|
|
608
|
+
# Answers with the primary external link of a file, creating it on the first call and returning the one that already exists afterwards, so the operation is idempotent in effect: a second call with other parameters does not reconfigure the existing link, and changing one is the business of `PUT api/2.0/files/file/{id}/links`. The parameters therefore only shape the link at the moment it is born - `access` its rights, `expirationDate` its lifetime, which for a file in a personal section is unlimited here rather than the default of a few days, `internal` whether only signed-in members may follow it, `denyDownload` whether the content may only be viewed, and `password` a secret to be asked for. A PDF form gets the rights it needs for filling out whatever was asked for, and a form in a form-filling room is answered with the link of the room instead. The caller needs the right to share the file and is otherwise refused with 403; a link that was deliberately revoked is not recreated but answered with 404. Read the address from `sharedTo.shareLink`.
|
|
609
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/create-file-primary-external-link/
|
|
610
|
+
# @param id [Integer, String] The file the link points at.
|
|
611
|
+
# @param file_link_request [FileLinkRequest] The settings of the link. They are applied in full, so a field left out is reset rather than kept.
|
|
612
|
+
# @param [Hash] opts the optional parameters
|
|
613
|
+
# @return [Array<(FileShareWrapper, Integer, Hash)>] FileShareWrapper data, response status code and response headers
|
|
614
|
+
def create_file_primary_external_link_with_http_info(id, file_link_request, opts = {})
|
|
615
|
+
if @api_client.config.debugging
|
|
616
|
+
@api_client.config.logger.debug 'Calling API: Files::FilesApi.create_file_primary_external_link ...'
|
|
617
|
+
end
|
|
618
|
+
# verify the required parameter 'id' is set
|
|
619
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
620
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling Files::FilesApi.create_file_primary_external_link"
|
|
621
|
+
end
|
|
622
|
+
# verify the required parameter 'file_link_request' is set
|
|
623
|
+
if @api_client.config.client_side_validation && file_link_request.nil?
|
|
624
|
+
fail ArgumentError, "Missing the required parameter 'file_link_request' when calling Files::FilesApi.create_file_primary_external_link"
|
|
625
|
+
end
|
|
626
|
+
# resource path
|
|
627
|
+
local_var_path = '/api/2.0/files/file/{id}/link'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
628
|
+
|
|
629
|
+
# query parameters
|
|
630
|
+
query_params = opts[:query_params] || {}
|
|
631
|
+
|
|
632
|
+
# header parameters
|
|
633
|
+
header_params = opts[:header_params] || {}
|
|
634
|
+
# HTTP header 'Accept' (if needed)
|
|
635
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
636
|
+
# HTTP header 'Content-Type'
|
|
637
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
638
|
+
if !content_type.nil?
|
|
639
|
+
header_params['Content-Type'] = content_type
|
|
640
|
+
end
|
|
641
|
+
|
|
642
|
+
# form parameters
|
|
643
|
+
form_params = opts[:form_params] || {}
|
|
644
|
+
|
|
645
|
+
# http body (model)
|
|
646
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(file_link_request)
|
|
647
|
+
|
|
648
|
+
# return_type
|
|
649
|
+
return_type = opts[:debug_return_type] || 'FileShareWrapper'
|
|
650
|
+
|
|
651
|
+
# auth_names
|
|
652
|
+
auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2', 'ApiKeyBearer', 'asc_auth_key', 'Bearer', 'OpenId']
|
|
653
|
+
|
|
654
|
+
new_options = opts.merge(
|
|
655
|
+
:operation => :"Files::FilesApi.create_file_primary_external_link",
|
|
656
|
+
:header_params => header_params,
|
|
657
|
+
:query_params => query_params,
|
|
658
|
+
:form_params => form_params,
|
|
659
|
+
:body => post_body,
|
|
660
|
+
:auth_names => auth_names,
|
|
661
|
+
:return_type => return_type
|
|
662
|
+
)
|
|
663
|
+
|
|
664
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
665
|
+
if @api_client.config.debugging
|
|
666
|
+
@api_client.config.logger.debug "API called: Files::FilesApi#create_file_primary_external_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
667
|
+
end
|
|
668
|
+
return data, status_code, headers
|
|
669
|
+
end
|
|
670
|
+
|
|
671
|
+
# Create an HTML file
|
|
672
|
+
# Creates an HTML file in the folder named in the route out of the markup passed as the content, and answers with the stored file. The `.html` extension is added to the title unless the title already ends with it, and a request carrying no content is rejected as an invalid request. `createNewIfExist` acts the other way round than its name reads: with `true` the file that already carries this title is updated, the markup replacing its content and a version appearing in its history, while with `false`, which is also the default, another file is created and its title made unique, as in Notes (1).html. Updating needs the existing file to be editable by the caller, so one that is locked, open in an editing session, encrypted or in Trash is left alone and a new file appears beside it instead. The caller needs the right to create files in the folder and is otherwise refused with 403. The call is mutating. To create the file in the caller's own section use `POST api/2.0/files/@my/html`.
|
|
673
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/create-html-file/
|
|
674
|
+
# @param folder_id [Integer, String] The folder the file is created in.
|
|
675
|
+
# @param create_text_or_html_file_request [CreateTextOrHtmlFileRequest] The title, the content and the collision behaviour of the new file.
|
|
676
|
+
# @param [Hash] opts the optional parameters
|
|
677
|
+
# @return [FileWrapper, ThirdPartyFileWrapper]
|
|
678
|
+
def create_html_file(folder_id, create_text_or_html_file_request, opts = {})
|
|
679
|
+
data, _status_code, _headers = create_html_file_with_http_info(folder_id, create_text_or_html_file_request, opts)
|
|
680
|
+
data
|
|
681
|
+
end
|
|
682
|
+
|
|
683
|
+
# Create an HTML file
|
|
684
|
+
# Creates an HTML file in the folder named in the route out of the markup passed as the content, and answers with the stored file. The `.html` extension is added to the title unless the title already ends with it, and a request carrying no content is rejected as an invalid request. `createNewIfExist` acts the other way round than its name reads: with `true` the file that already carries this title is updated, the markup replacing its content and a version appearing in its history, while with `false`, which is also the default, another file is created and its title made unique, as in Notes (1).html. Updating needs the existing file to be editable by the caller, so one that is locked, open in an editing session, encrypted or in Trash is left alone and a new file appears beside it instead. The caller needs the right to create files in the folder and is otherwise refused with 403. The call is mutating. To create the file in the caller's own section use `POST api/2.0/files/@my/html`.
|
|
685
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/create-html-file/
|
|
686
|
+
# @param folder_id [Integer, String] The folder the file is created in.
|
|
687
|
+
# @param create_text_or_html_file_request [CreateTextOrHtmlFileRequest] The title, the content and the collision behaviour of the new file.
|
|
688
|
+
# @param [Hash] opts the optional parameters
|
|
689
|
+
# @return [Array<(FileWrapper, ThirdPartyFileWrapper, Integer, Hash)>] FileWrapper, ThirdPartyFileWrapper data, response status code and response headers
|
|
690
|
+
def create_html_file_with_http_info(folder_id, create_text_or_html_file_request, opts = {})
|
|
691
|
+
if @api_client.config.debugging
|
|
692
|
+
@api_client.config.logger.debug 'Calling API: Files::FilesApi.create_html_file ...'
|
|
693
|
+
end
|
|
694
|
+
# verify the required parameter 'folder_id' is set
|
|
695
|
+
if @api_client.config.client_side_validation && folder_id.nil?
|
|
696
|
+
fail ArgumentError, "Missing the required parameter 'folder_id' when calling Files::FilesApi.create_html_file"
|
|
697
|
+
end
|
|
698
|
+
# verify the required parameter 'create_text_or_html_file_request' is set
|
|
699
|
+
if @api_client.config.client_side_validation && create_text_or_html_file_request.nil?
|
|
700
|
+
fail ArgumentError, "Missing the required parameter 'create_text_or_html_file_request' when calling Files::FilesApi.create_html_file"
|
|
701
|
+
end
|
|
702
|
+
# resource path
|
|
703
|
+
local_var_path = '/api/2.0/files/{folderId}/html'.sub('{' + 'folderId' + '}', CGI.escape(folder_id.to_s))
|
|
704
|
+
|
|
705
|
+
# query parameters
|
|
706
|
+
query_params = opts[:query_params] || {}
|
|
707
|
+
|
|
708
|
+
# header parameters
|
|
709
|
+
header_params = opts[:header_params] || {}
|
|
710
|
+
# HTTP header 'Accept' (if needed)
|
|
711
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
712
|
+
# HTTP header 'Content-Type'
|
|
713
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
714
|
+
if !content_type.nil?
|
|
715
|
+
header_params['Content-Type'] = content_type
|
|
716
|
+
end
|
|
717
|
+
|
|
718
|
+
# form parameters
|
|
719
|
+
form_params = opts[:form_params] || {}
|
|
720
|
+
|
|
721
|
+
# http body (model)
|
|
722
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_text_or_html_file_request)
|
|
723
|
+
|
|
724
|
+
# return_type
|
|
725
|
+
return_type = opts[:debug_return_type] || (folder_id.is_a?(String) ? 'ThirdPartyFileWrapper' : 'FileWrapper')
|
|
726
|
+
|
|
727
|
+
# auth_names
|
|
728
|
+
auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2', 'ApiKeyBearer', 'asc_auth_key', 'Bearer', 'OpenId']
|
|
729
|
+
|
|
730
|
+
new_options = opts.merge(
|
|
731
|
+
:operation => :"Files::FilesApi.create_html_file",
|
|
732
|
+
:header_params => header_params,
|
|
733
|
+
:query_params => query_params,
|
|
734
|
+
:form_params => form_params,
|
|
735
|
+
:body => post_body,
|
|
736
|
+
:auth_names => auth_names,
|
|
737
|
+
:return_type => return_type
|
|
738
|
+
)
|
|
739
|
+
|
|
740
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
741
|
+
if @api_client.config.debugging
|
|
742
|
+
@api_client.config.logger.debug "API called: Files::FilesApi#create_html_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
743
|
+
end
|
|
744
|
+
return data, status_code, headers
|
|
745
|
+
end
|
|
746
|
+
|
|
747
|
+
# Create an HTML file in My documents
|
|
748
|
+
# Creates an HTML file in the caller's own My documents section out of the markup passed as the content, and answers with the stored file. The `.html` extension is added to the title unless the title already ends with it, and a request carrying no content is rejected as invalid. `createNewIfExist` acts the other way round than its name reads: with `true` the file that already carries this title is updated, the markup replacing its content and a version appearing in its history, while with `false`, which is also the default, another file is created and its title made unique, as in Notes (1).html. Updating needs the existing file to be editable by the caller, so one that is locked, open in an editing session, encrypted or in Trash is left alone and a new file appears beside it instead. The call is mutating: repeating it with `true` keeps a single file and grows its history, repeating it with `false` fills the section with numbered copies. A guest has no My documents section and is refused. To create the file in a room or another folder use `POST api/2.0/files/{folderId}/html`.
|
|
749
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/create-html-file-in-my-documents/
|
|
750
|
+
# @param [Hash] opts the optional parameters
|
|
751
|
+
# @option opts [CreateTextOrHtmlFileRequest] :create_text_or_html_file_request
|
|
752
|
+
# @return [FileWrapper]
|
|
753
|
+
def create_html_file_in_my_documents(opts = {})
|
|
754
|
+
data, _status_code, _headers = create_html_file_in_my_documents_with_http_info(opts)
|
|
755
|
+
data
|
|
756
|
+
end
|
|
757
|
+
|
|
758
|
+
# Create an HTML file in My documents
|
|
759
|
+
# Creates an HTML file in the caller's own My documents section out of the markup passed as the content, and answers with the stored file. The `.html` extension is added to the title unless the title already ends with it, and a request carrying no content is rejected as invalid. `createNewIfExist` acts the other way round than its name reads: with `true` the file that already carries this title is updated, the markup replacing its content and a version appearing in its history, while with `false`, which is also the default, another file is created and its title made unique, as in Notes (1).html. Updating needs the existing file to be editable by the caller, so one that is locked, open in an editing session, encrypted or in Trash is left alone and a new file appears beside it instead. The call is mutating: repeating it with `true` keeps a single file and grows its history, repeating it with `false` fills the section with numbered copies. A guest has no My documents section and is refused. To create the file in a room or another folder use `POST api/2.0/files/{folderId}/html`.
|
|
760
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/create-html-file-in-my-documents/
|
|
761
|
+
# @param [Hash] opts the optional parameters
|
|
762
|
+
# @option opts [CreateTextOrHtmlFileRequest] :create_text_or_html_file_request
|
|
763
|
+
# @return [Array<(FileWrapper, Integer, Hash)>] FileWrapper data, response status code and response headers
|
|
764
|
+
def create_html_file_in_my_documents_with_http_info(opts = {})
|
|
765
|
+
if @api_client.config.debugging
|
|
766
|
+
@api_client.config.logger.debug 'Calling API: Files::FilesApi.create_html_file_in_my_documents ...'
|
|
767
|
+
end
|
|
768
|
+
# resource path
|
|
769
|
+
local_var_path = '/api/2.0/files/@my/html'
|
|
770
|
+
|
|
771
|
+
# query parameters
|
|
772
|
+
query_params = opts[:query_params] || {}
|
|
773
|
+
|
|
774
|
+
# header parameters
|
|
775
|
+
header_params = opts[:header_params] || {}
|
|
776
|
+
# HTTP header 'Accept' (if needed)
|
|
777
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
778
|
+
# HTTP header 'Content-Type'
|
|
779
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
780
|
+
if !content_type.nil?
|
|
781
|
+
header_params['Content-Type'] = content_type
|
|
782
|
+
end
|
|
783
|
+
|
|
784
|
+
# form parameters
|
|
785
|
+
form_params = opts[:form_params] || {}
|
|
786
|
+
|
|
787
|
+
# http body (model)
|
|
788
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_text_or_html_file_request'])
|
|
789
|
+
|
|
790
|
+
# return_type
|
|
791
|
+
return_type = opts[:debug_return_type] || 'FileWrapper'
|
|
792
|
+
|
|
793
|
+
# auth_names
|
|
794
|
+
auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2', 'ApiKeyBearer', 'asc_auth_key', 'Bearer', 'OpenId']
|
|
795
|
+
|
|
796
|
+
new_options = opts.merge(
|
|
797
|
+
:operation => :"Files::FilesApi.create_html_file_in_my_documents",
|
|
798
|
+
:header_params => header_params,
|
|
799
|
+
:query_params => query_params,
|
|
800
|
+
:form_params => form_params,
|
|
801
|
+
:body => post_body,
|
|
802
|
+
:auth_names => auth_names,
|
|
803
|
+
:return_type => return_type
|
|
804
|
+
)
|
|
805
|
+
|
|
806
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
807
|
+
if @api_client.config.debugging
|
|
808
|
+
@api_client.config.logger.debug "API called: Files::FilesApi#create_html_file_in_my_documents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
809
|
+
end
|
|
810
|
+
return data, status_code, headers
|
|
811
|
+
end
|
|
812
|
+
|
|
813
|
+
# Create a text file
|
|
814
|
+
# Creates a text file in the folder named in the route out of the text passed as the content, and answers with the stored file. The extension follows the content rather than the request: `.txt` normally, but `.html` as soon as the text contains something shaped like an HTML tag, so a snippet of markup sent here ends up as an HTML file; the extension is added to the title unless the title already ends with it. A request carrying no content is rejected as an invalid request. `createNewIfExist` acts the other way round than its name reads: with `true` the file that already carries this title is updated and a version appears in its history, while with `false`, which is also the default, another file is created and its title made unique, as in Notes (1).txt. A file that is locked, open in an editing session, encrypted or in Trash is not updated - a new file appears beside it instead. The caller needs the right to create files in the folder. The call is mutating. To create the file in the caller's own section use `POST api/2.0/files/@my/text`.
|
|
815
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/create-text-file/
|
|
816
|
+
# @param folder_id [Integer, String] The folder the file is created in.
|
|
817
|
+
# @param create_text_or_html_file_request [CreateTextOrHtmlFileRequest] The title, the content and the collision behaviour of the new file.
|
|
818
|
+
# @param [Hash] opts the optional parameters
|
|
819
|
+
# @return [FileWrapper, ThirdPartyFileWrapper]
|
|
820
|
+
def create_text_file(folder_id, create_text_or_html_file_request, opts = {})
|
|
821
|
+
data, _status_code, _headers = create_text_file_with_http_info(folder_id, create_text_or_html_file_request, opts)
|
|
822
|
+
data
|
|
823
|
+
end
|
|
824
|
+
|
|
825
|
+
# Create a text file
|
|
826
|
+
# Creates a text file in the folder named in the route out of the text passed as the content, and answers with the stored file. The extension follows the content rather than the request: `.txt` normally, but `.html` as soon as the text contains something shaped like an HTML tag, so a snippet of markup sent here ends up as an HTML file; the extension is added to the title unless the title already ends with it. A request carrying no content is rejected as an invalid request. `createNewIfExist` acts the other way round than its name reads: with `true` the file that already carries this title is updated and a version appears in its history, while with `false`, which is also the default, another file is created and its title made unique, as in Notes (1).txt. A file that is locked, open in an editing session, encrypted or in Trash is not updated - a new file appears beside it instead. The caller needs the right to create files in the folder. The call is mutating. To create the file in the caller's own section use `POST api/2.0/files/@my/text`.
|
|
827
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/create-text-file/
|
|
828
|
+
# @param folder_id [Integer, String] The folder the file is created in.
|
|
829
|
+
# @param create_text_or_html_file_request [CreateTextOrHtmlFileRequest] The title, the content and the collision behaviour of the new file.
|
|
830
|
+
# @param [Hash] opts the optional parameters
|
|
831
|
+
# @return [Array<(FileWrapper, ThirdPartyFileWrapper, Integer, Hash)>] FileWrapper, ThirdPartyFileWrapper data, response status code and response headers
|
|
832
|
+
def create_text_file_with_http_info(folder_id, create_text_or_html_file_request, opts = {})
|
|
833
|
+
if @api_client.config.debugging
|
|
834
|
+
@api_client.config.logger.debug 'Calling API: Files::FilesApi.create_text_file ...'
|
|
835
|
+
end
|
|
836
|
+
# verify the required parameter 'folder_id' is set
|
|
837
|
+
if @api_client.config.client_side_validation && folder_id.nil?
|
|
838
|
+
fail ArgumentError, "Missing the required parameter 'folder_id' when calling Files::FilesApi.create_text_file"
|
|
839
|
+
end
|
|
840
|
+
# verify the required parameter 'create_text_or_html_file_request' is set
|
|
841
|
+
if @api_client.config.client_side_validation && create_text_or_html_file_request.nil?
|
|
842
|
+
fail ArgumentError, "Missing the required parameter 'create_text_or_html_file_request' when calling Files::FilesApi.create_text_file"
|
|
843
|
+
end
|
|
844
|
+
# resource path
|
|
845
|
+
local_var_path = '/api/2.0/files/{folderId}/text'.sub('{' + 'folderId' + '}', CGI.escape(folder_id.to_s))
|
|
846
|
+
|
|
847
|
+
# query parameters
|
|
848
|
+
query_params = opts[:query_params] || {}
|
|
849
|
+
|
|
850
|
+
# header parameters
|
|
851
|
+
header_params = opts[:header_params] || {}
|
|
852
|
+
# HTTP header 'Accept' (if needed)
|
|
853
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
854
|
+
# HTTP header 'Content-Type'
|
|
855
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
856
|
+
if !content_type.nil?
|
|
857
|
+
header_params['Content-Type'] = content_type
|
|
858
|
+
end
|
|
859
|
+
|
|
860
|
+
# form parameters
|
|
861
|
+
form_params = opts[:form_params] || {}
|
|
862
|
+
|
|
863
|
+
# http body (model)
|
|
864
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_text_or_html_file_request)
|
|
865
|
+
|
|
866
|
+
# return_type
|
|
867
|
+
return_type = opts[:debug_return_type] || (folder_id.is_a?(String) ? 'ThirdPartyFileWrapper' : 'FileWrapper')
|
|
868
|
+
|
|
869
|
+
# auth_names
|
|
870
|
+
auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2', 'ApiKeyBearer', 'asc_auth_key', 'Bearer', 'OpenId']
|
|
871
|
+
|
|
872
|
+
new_options = opts.merge(
|
|
873
|
+
:operation => :"Files::FilesApi.create_text_file",
|
|
874
|
+
:header_params => header_params,
|
|
875
|
+
:query_params => query_params,
|
|
876
|
+
:form_params => form_params,
|
|
877
|
+
:body => post_body,
|
|
878
|
+
:auth_names => auth_names,
|
|
879
|
+
:return_type => return_type
|
|
880
|
+
)
|
|
881
|
+
|
|
882
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
883
|
+
if @api_client.config.debugging
|
|
884
|
+
@api_client.config.logger.debug "API called: Files::FilesApi#create_text_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
885
|
+
end
|
|
886
|
+
return data, status_code, headers
|
|
887
|
+
end
|
|
888
|
+
|
|
889
|
+
# Create a text file in My documents
|
|
890
|
+
# Creates a text file in the caller's own My documents section out of the text passed as the content, and answers with the stored file. The extension follows the content rather than the request: `.txt` normally, but `.html` as soon as the text contains something shaped like an HTML tag, so a snippet of markup sent here ends up as an HTML file; the extension is added to the title unless the title already ends with it. A request carrying no content is rejected as invalid. `createNewIfExist` acts the other way round than its name reads: with `true` the file that already carries this title is updated and a version appears in its history, while with `false`, which is also the default, another file is created and its title made unique, as in Notes (1).txt. A file that is locked, open in an editing session, encrypted or in Trash is not updated - a new file appears beside it instead. The call is mutating. A guest has no My documents section and is refused. To create the file in a room or another folder use `POST api/2.0/files/{folderId}/text`.
|
|
891
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/create-text-file-in-my-documents/
|
|
892
|
+
# @param [Hash] opts the optional parameters
|
|
893
|
+
# @option opts [CreateTextOrHtmlFileRequest] :create_text_or_html_file_request
|
|
894
|
+
# @return [FileWrapper]
|
|
895
|
+
def create_text_file_in_my_documents(opts = {})
|
|
896
|
+
data, _status_code, _headers = create_text_file_in_my_documents_with_http_info(opts)
|
|
897
|
+
data
|
|
898
|
+
end
|
|
899
|
+
|
|
900
|
+
# Create a text file in My documents
|
|
901
|
+
# Creates a text file in the caller's own My documents section out of the text passed as the content, and answers with the stored file. The extension follows the content rather than the request: `.txt` normally, but `.html` as soon as the text contains something shaped like an HTML tag, so a snippet of markup sent here ends up as an HTML file; the extension is added to the title unless the title already ends with it. A request carrying no content is rejected as invalid. `createNewIfExist` acts the other way round than its name reads: with `true` the file that already carries this title is updated and a version appears in its history, while with `false`, which is also the default, another file is created and its title made unique, as in Notes (1).txt. A file that is locked, open in an editing session, encrypted or in Trash is not updated - a new file appears beside it instead. The call is mutating. A guest has no My documents section and is refused. To create the file in a room or another folder use `POST api/2.0/files/{folderId}/text`.
|
|
902
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/create-text-file-in-my-documents/
|
|
903
|
+
# @param [Hash] opts the optional parameters
|
|
904
|
+
# @option opts [CreateTextOrHtmlFileRequest] :create_text_or_html_file_request
|
|
905
|
+
# @return [Array<(FileWrapper, Integer, Hash)>] FileWrapper data, response status code and response headers
|
|
906
|
+
def create_text_file_in_my_documents_with_http_info(opts = {})
|
|
907
|
+
if @api_client.config.debugging
|
|
908
|
+
@api_client.config.logger.debug 'Calling API: Files::FilesApi.create_text_file_in_my_documents ...'
|
|
909
|
+
end
|
|
910
|
+
# resource path
|
|
911
|
+
local_var_path = '/api/2.0/files/@my/text'
|
|
912
|
+
|
|
913
|
+
# query parameters
|
|
914
|
+
query_params = opts[:query_params] || {}
|
|
915
|
+
|
|
916
|
+
# header parameters
|
|
917
|
+
header_params = opts[:header_params] || {}
|
|
918
|
+
# HTTP header 'Accept' (if needed)
|
|
919
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
920
|
+
# HTTP header 'Content-Type'
|
|
921
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
922
|
+
if !content_type.nil?
|
|
923
|
+
header_params['Content-Type'] = content_type
|
|
924
|
+
end
|
|
925
|
+
|
|
926
|
+
# form parameters
|
|
927
|
+
form_params = opts[:form_params] || {}
|
|
928
|
+
|
|
929
|
+
# http body (model)
|
|
930
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_text_or_html_file_request'])
|
|
931
|
+
|
|
932
|
+
# return_type
|
|
933
|
+
return_type = opts[:debug_return_type] || 'FileWrapper'
|
|
934
|
+
|
|
935
|
+
# auth_names
|
|
936
|
+
auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2', 'ApiKeyBearer', 'asc_auth_key', 'Bearer', 'OpenId']
|
|
937
|
+
|
|
938
|
+
new_options = opts.merge(
|
|
939
|
+
:operation => :"Files::FilesApi.create_text_file_in_my_documents",
|
|
940
|
+
:header_params => header_params,
|
|
941
|
+
:query_params => query_params,
|
|
942
|
+
:form_params => form_params,
|
|
943
|
+
:body => post_body,
|
|
944
|
+
:auth_names => auth_names,
|
|
945
|
+
:return_type => return_type
|
|
946
|
+
)
|
|
947
|
+
|
|
948
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
949
|
+
if @api_client.config.debugging
|
|
950
|
+
@api_client.config.logger.debug "API called: Files::FilesApi#create_text_file_in_my_documents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
951
|
+
end
|
|
952
|
+
return data, status_code, headers
|
|
953
|
+
end
|
|
954
|
+
|
|
955
|
+
# Queue file thumbnails
|
|
956
|
+
# Asks the portal to build preview thumbnails for the listed files, and answers at once with the same file ids that were sent. That answer echoes the request and does not confirm that anything was queued: the work is handed over to a background worker, and a failure on the way there is written to the log rather than reported to the caller. Only the file ids of the body are read - the folder ids are ignored, and a request naming no files at all is answered with an empty list. Ids of files kept in a connected third-party storage are dropped as well, because the worker handles portal storage only. Access to the individual files is not checked here; the caller has to be signed in or to reach the portal through an external share link, and an anonymous caller without such a link is refused. The call is asynchronous and safe to repeat. The thumbnails themselves are not in the answer: read `thumbnailStatus` and `thumbnailUrl` of the file, for instance with `GET api/2.0/files/file/{fileId}`, until the status reports the thumbnail as created.
|
|
957
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/create-thumbnails/
|
|
958
|
+
# @param [Hash] opts the optional parameters
|
|
959
|
+
# @option opts [BaseBatchRequestDto] :base_batch_request_dto
|
|
960
|
+
# @return [ObjectArrayWrapper]
|
|
961
|
+
def create_thumbnails(opts = {})
|
|
962
|
+
data, _status_code, _headers = create_thumbnails_with_http_info(opts)
|
|
963
|
+
data
|
|
964
|
+
end
|
|
965
|
+
|
|
966
|
+
# Queue file thumbnails
|
|
967
|
+
# Asks the portal to build preview thumbnails for the listed files, and answers at once with the same file ids that were sent. That answer echoes the request and does not confirm that anything was queued: the work is handed over to a background worker, and a failure on the way there is written to the log rather than reported to the caller. Only the file ids of the body are read - the folder ids are ignored, and a request naming no files at all is answered with an empty list. Ids of files kept in a connected third-party storage are dropped as well, because the worker handles portal storage only. Access to the individual files is not checked here; the caller has to be signed in or to reach the portal through an external share link, and an anonymous caller without such a link is refused. The call is asynchronous and safe to repeat. The thumbnails themselves are not in the answer: read `thumbnailStatus` and `thumbnailUrl` of the file, for instance with `GET api/2.0/files/file/{fileId}`, until the status reports the thumbnail as created.
|
|
968
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/create-thumbnails/
|
|
969
|
+
# @param [Hash] opts the optional parameters
|
|
970
|
+
# @option opts [BaseBatchRequestDto] :base_batch_request_dto
|
|
971
|
+
# @return [Array<(ObjectArrayWrapper, Integer, Hash)>] ObjectArrayWrapper data, response status code and response headers
|
|
972
|
+
def create_thumbnails_with_http_info(opts = {})
|
|
973
|
+
if @api_client.config.debugging
|
|
974
|
+
@api_client.config.logger.debug 'Calling API: Files::FilesApi.create_thumbnails ...'
|
|
975
|
+
end
|
|
976
|
+
# resource path
|
|
977
|
+
local_var_path = '/api/2.0/files/thumbnails'
|
|
978
|
+
|
|
979
|
+
# query parameters
|
|
980
|
+
query_params = opts[:query_params] || {}
|
|
981
|
+
|
|
982
|
+
# header parameters
|
|
983
|
+
header_params = opts[:header_params] || {}
|
|
984
|
+
# HTTP header 'Accept' (if needed)
|
|
985
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
986
|
+
# HTTP header 'Content-Type'
|
|
987
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
988
|
+
if !content_type.nil?
|
|
989
|
+
header_params['Content-Type'] = content_type
|
|
990
|
+
end
|
|
991
|
+
|
|
992
|
+
# form parameters
|
|
993
|
+
form_params = opts[:form_params] || {}
|
|
994
|
+
|
|
995
|
+
# http body (model)
|
|
996
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'base_batch_request_dto'])
|
|
997
|
+
|
|
998
|
+
# return_type
|
|
999
|
+
return_type = opts[:debug_return_type] || 'ObjectArrayWrapper'
|
|
1000
|
+
|
|
1001
|
+
# auth_names
|
|
1002
|
+
auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2', 'ApiKeyBearer', 'asc_auth_key', 'Bearer', 'OpenId']
|
|
1003
|
+
|
|
1004
|
+
new_options = opts.merge(
|
|
1005
|
+
:operation => :"Files::FilesApi.create_thumbnails",
|
|
1006
|
+
:header_params => header_params,
|
|
1007
|
+
:query_params => query_params,
|
|
1008
|
+
:form_params => form_params,
|
|
1009
|
+
:body => post_body,
|
|
1010
|
+
:auth_names => auth_names,
|
|
1011
|
+
:return_type => return_type
|
|
1012
|
+
)
|
|
1013
|
+
|
|
1014
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1015
|
+
if @api_client.config.debugging
|
|
1016
|
+
@api_client.config.logger.debug "API called: Files::FilesApi#create_thumbnails\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1017
|
+
end
|
|
1018
|
+
return data, status_code, headers
|
|
1019
|
+
end
|
|
1020
|
+
|
|
1021
|
+
# Delete a file
|
|
1022
|
+
# Queues the deletion of one file and answers with the caller's file operations, the one just created among them. The file is not gone when the response arrives: poll `GET api/2.0/files/fileops` until the operation reports `finished`, and read its `error` to learn whether the deletion succeeded. By default the file is moved to Trash, from where it can be restored; `immediately=true` deletes it for good instead, and inside a room, where there is no Trash, deletion is always final. `deleteAfter=true` postpones the deletion until the editing session on the file has ended, so a file somebody is working on is not pulled away. `returnSingleOperation=true` narrows the answer to this deletion instead of listing every active operation of the caller. The caller needs the right to delete the file, which the room admin, a DocSpace admin acting as room manager and a content creator acting on their own file have; editing access alone, read access, a guest and a member without access to the room are all refused. The call is destructive. To delete several items at once use `PUT api/2.0/files/fileops/delete`.
|
|
1023
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/delete-file/
|
|
1024
|
+
# @param file_id [Integer, String] The file to delete.
|
|
1025
|
+
# @param delete_file_request [DeleteFileRequest] When and how the file is deleted.
|
|
1026
|
+
# @param [Hash] opts the optional parameters
|
|
1027
|
+
# @option opts [Boolean] :return_single_operation Which operations the answer carries: `true` returns the operation this call started and nothing else, `false` returns every operation of the same kind that the caller has running or unread. When nothing was queued, which happens for an empty selection, `true` falls back to the full list.
|
|
1028
|
+
# @return [FileOperationArrayWrapper]
|
|
1029
|
+
def delete_file(file_id, delete_file_request, opts = {})
|
|
1030
|
+
data, _status_code, _headers = delete_file_with_http_info(file_id, delete_file_request, opts)
|
|
1031
|
+
data
|
|
1032
|
+
end
|
|
1033
|
+
|
|
1034
|
+
# Delete a file
|
|
1035
|
+
# Queues the deletion of one file and answers with the caller's file operations, the one just created among them. The file is not gone when the response arrives: poll `GET api/2.0/files/fileops` until the operation reports `finished`, and read its `error` to learn whether the deletion succeeded. By default the file is moved to Trash, from where it can be restored; `immediately=true` deletes it for good instead, and inside a room, where there is no Trash, deletion is always final. `deleteAfter=true` postpones the deletion until the editing session on the file has ended, so a file somebody is working on is not pulled away. `returnSingleOperation=true` narrows the answer to this deletion instead of listing every active operation of the caller. The caller needs the right to delete the file, which the room admin, a DocSpace admin acting as room manager and a content creator acting on their own file have; editing access alone, read access, a guest and a member without access to the room are all refused. The call is destructive. To delete several items at once use `PUT api/2.0/files/fileops/delete`.
|
|
1036
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/delete-file/
|
|
1037
|
+
# @param file_id [Integer, String] The file to delete.
|
|
1038
|
+
# @param delete_file_request [DeleteFileRequest] When and how the file is deleted.
|
|
1039
|
+
# @param [Hash] opts the optional parameters
|
|
1040
|
+
# @option opts [Boolean] :return_single_operation Which operations the answer carries: `true` returns the operation this call started and nothing else, `false` returns every operation of the same kind that the caller has running or unread. When nothing was queued, which happens for an empty selection, `true` falls back to the full list.
|
|
1041
|
+
# @return [Array<(FileOperationArrayWrapper, Integer, Hash)>] FileOperationArrayWrapper data, response status code and response headers
|
|
1042
|
+
def delete_file_with_http_info(file_id, delete_file_request, opts = {})
|
|
1043
|
+
if @api_client.config.debugging
|
|
1044
|
+
@api_client.config.logger.debug 'Calling API: Files::FilesApi.delete_file ...'
|
|
1045
|
+
end
|
|
1046
|
+
# verify the required parameter 'file_id' is set
|
|
1047
|
+
if @api_client.config.client_side_validation && file_id.nil?
|
|
1048
|
+
fail ArgumentError, "Missing the required parameter 'file_id' when calling Files::FilesApi.delete_file"
|
|
1049
|
+
end
|
|
1050
|
+
# verify the required parameter 'delete_file_request' is set
|
|
1051
|
+
if @api_client.config.client_side_validation && delete_file_request.nil?
|
|
1052
|
+
fail ArgumentError, "Missing the required parameter 'delete_file_request' when calling Files::FilesApi.delete_file"
|
|
1053
|
+
end
|
|
1054
|
+
# resource path
|
|
1055
|
+
local_var_path = '/api/2.0/files/file/{fileId}'.sub('{' + 'fileId' + '}', CGI.escape(file_id.to_s))
|
|
1056
|
+
|
|
1057
|
+
# query parameters
|
|
1058
|
+
query_params = opts[:query_params] || {}
|
|
1059
|
+
query_params[:'returnSingleOperation'] = opts[:'return_single_operation'] if !opts[:'return_single_operation'].nil?
|
|
1060
|
+
|
|
1061
|
+
# header parameters
|
|
1062
|
+
header_params = opts[:header_params] || {}
|
|
1063
|
+
# HTTP header 'Accept' (if needed)
|
|
1064
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1065
|
+
# HTTP header 'Content-Type'
|
|
1066
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1067
|
+
if !content_type.nil?
|
|
1068
|
+
header_params['Content-Type'] = content_type
|
|
1069
|
+
end
|
|
1070
|
+
|
|
1071
|
+
# form parameters
|
|
1072
|
+
form_params = opts[:form_params] || {}
|
|
1073
|
+
|
|
1074
|
+
# http body (model)
|
|
1075
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(delete_file_request)
|
|
1076
|
+
|
|
1077
|
+
# return_type
|
|
1078
|
+
return_type = opts[:debug_return_type] || 'FileOperationArrayWrapper'
|
|
1079
|
+
|
|
1080
|
+
# auth_names
|
|
1081
|
+
auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2', 'ApiKeyBearer', 'asc_auth_key', 'Bearer', 'OpenId']
|
|
1082
|
+
|
|
1083
|
+
new_options = opts.merge(
|
|
1084
|
+
:operation => :"Files::FilesApi.delete_file",
|
|
1085
|
+
:header_params => header_params,
|
|
1086
|
+
:query_params => query_params,
|
|
1087
|
+
:form_params => form_params,
|
|
1088
|
+
:body => post_body,
|
|
1089
|
+
:auth_names => auth_names,
|
|
1090
|
+
:return_type => return_type
|
|
1091
|
+
)
|
|
1092
|
+
|
|
1093
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
1094
|
+
if @api_client.config.debugging
|
|
1095
|
+
@api_client.config.logger.debug "API called: Files::FilesApi#delete_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1096
|
+
end
|
|
1097
|
+
return data, status_code, headers
|
|
1098
|
+
end
|
|
1099
|
+
|
|
1100
|
+
# Delete recent files
|
|
1101
|
+
# Removes the listed entries from the Recent section of the calling account, the history of opened files that `GET api/2.0/files/recent` returns. Nothing is deleted from storage and no other member's history is touched; access to the entries is not checked at all, so a file the caller can no longer read can still be cleared from their own history. A file on a connected third-party account is cleared by its string id too, but only while the storage can still find it: the entry of a file removed from the storage stays in the history. Folder ids are accepted but change nothing because the section lists files only. The answer carries no body and reports nothing about how many entries were found: an empty request and an id that was never in the section are accepted alike. Repeating the call is safe, but an entry returns the next time the file is opened or `POST api/2.0/files/file/{fileId}/recent` is called for it. To hide the whole section instead, call `PUT api/2.0/files/displayrecent`.
|
|
1102
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/delete-recent/
|
|
1103
|
+
# @param [Hash] opts the optional parameters
|
|
1104
|
+
# @option opts [BaseBatchRequestDto] :base_batch_request_dto
|
|
1105
|
+
# @return [nil]
|
|
1106
|
+
def delete_recent(opts = {})
|
|
1107
|
+
delete_recent_with_http_info(opts)
|
|
1108
|
+
nil
|
|
1109
|
+
end
|
|
1110
|
+
|
|
1111
|
+
# Delete recent files
|
|
1112
|
+
# Removes the listed entries from the Recent section of the calling account, the history of opened files that `GET api/2.0/files/recent` returns. Nothing is deleted from storage and no other member's history is touched; access to the entries is not checked at all, so a file the caller can no longer read can still be cleared from their own history. A file on a connected third-party account is cleared by its string id too, but only while the storage can still find it: the entry of a file removed from the storage stays in the history. Folder ids are accepted but change nothing because the section lists files only. The answer carries no body and reports nothing about how many entries were found: an empty request and an id that was never in the section are accepted alike. Repeating the call is safe, but an entry returns the next time the file is opened or `POST api/2.0/files/file/{fileId}/recent` is called for it. To hide the whole section instead, call `PUT api/2.0/files/displayrecent`.
|
|
1113
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/delete-recent/
|
|
1114
|
+
# @param [Hash] opts the optional parameters
|
|
1115
|
+
# @option opts [BaseBatchRequestDto] :base_batch_request_dto
|
|
1116
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
1117
|
+
def delete_recent_with_http_info(opts = {})
|
|
1118
|
+
if @api_client.config.debugging
|
|
1119
|
+
@api_client.config.logger.debug 'Calling API: Files::FilesApi.delete_recent ...'
|
|
1120
|
+
end
|
|
1121
|
+
# resource path
|
|
1122
|
+
local_var_path = '/api/2.0/files/recent'
|
|
1123
|
+
|
|
1124
|
+
# query parameters
|
|
1125
|
+
query_params = opts[:query_params] || {}
|
|
1126
|
+
|
|
1127
|
+
# header parameters
|
|
1128
|
+
header_params = opts[:header_params] || {}
|
|
1129
|
+
# HTTP header 'Accept' (if needed)
|
|
1130
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1131
|
+
# HTTP header 'Content-Type'
|
|
1132
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1133
|
+
if !content_type.nil?
|
|
1134
|
+
header_params['Content-Type'] = content_type
|
|
1135
|
+
end
|
|
1136
|
+
|
|
1137
|
+
# form parameters
|
|
1138
|
+
form_params = opts[:form_params] || {}
|
|
1139
|
+
|
|
1140
|
+
# http body (model)
|
|
1141
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'base_batch_request_dto'])
|
|
1142
|
+
|
|
1143
|
+
# return_type
|
|
1144
|
+
return_type = opts[:debug_return_type]
|
|
1145
|
+
|
|
1146
|
+
# auth_names
|
|
1147
|
+
auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2', 'ApiKeyBearer', 'asc_auth_key', 'Bearer', 'OpenId']
|
|
1148
|
+
|
|
1149
|
+
new_options = opts.merge(
|
|
1150
|
+
:operation => :"Files::FilesApi.delete_recent",
|
|
1151
|
+
:header_params => header_params,
|
|
1152
|
+
:query_params => query_params,
|
|
1153
|
+
:form_params => form_params,
|
|
1154
|
+
:body => post_body,
|
|
1155
|
+
:auth_names => auth_names,
|
|
1156
|
+
:return_type => return_type
|
|
1157
|
+
)
|
|
1158
|
+
|
|
1159
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
1160
|
+
if @api_client.config.debugging
|
|
1161
|
+
@api_client.config.logger.debug "API called: Files::FilesApi#delete_recent\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1162
|
+
end
|
|
1163
|
+
return data, status_code, headers
|
|
1164
|
+
end
|
|
1165
|
+
|
|
1166
|
+
# Delete template files
|
|
1167
|
+
# Takes the listed files off the personal template list of the calling account, leaving the files themselves untouched: only the template mark is dropped. The body of this request is a bare JSON array of numeric file ids rather than an object with a field, and a request that carries no array at all is rejected as an invalid request. Every authenticated member type may manage their own list, a guest is refused, and read access to a file is required for its mark to be dropped. The answer is `true` whenever the array was understood, which an empty array, an id that does not exist and a file that was never a template all achieve, so it confirms nothing about what was removed. Repeating the call is safe. Use `POST api/2.0/files/templates` to put a file back on the list; that operation expects an object with a `fileIds` field, so the two bodies are not interchangeable.
|
|
1168
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/delete-templates/
|
|
1169
|
+
# @param [Hash] opts the optional parameters
|
|
1170
|
+
# @option opts [Array<Integer>] :delete_template_files_request_dto The files to take off the template list, by id; this array is the whole request body. Only a file stored in the portal itself can be a template, which is why an id here is always numeric.
|
|
1171
|
+
# @return [BooleanWrapper]
|
|
1172
|
+
def delete_templates(opts = {})
|
|
1173
|
+
data, _status_code, _headers = delete_templates_with_http_info(opts)
|
|
1174
|
+
data
|
|
1175
|
+
end
|
|
1176
|
+
|
|
1177
|
+
# Delete template files
|
|
1178
|
+
# Takes the listed files off the personal template list of the calling account, leaving the files themselves untouched: only the template mark is dropped. The body of this request is a bare JSON array of numeric file ids rather than an object with a field, and a request that carries no array at all is rejected as an invalid request. Every authenticated member type may manage their own list, a guest is refused, and read access to a file is required for its mark to be dropped. The answer is `true` whenever the array was understood, which an empty array, an id that does not exist and a file that was never a template all achieve, so it confirms nothing about what was removed. Repeating the call is safe. Use `POST api/2.0/files/templates` to put a file back on the list; that operation expects an object with a `fileIds` field, so the two bodies are not interchangeable.
|
|
1179
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/delete-templates/
|
|
1180
|
+
# @param [Hash] opts the optional parameters
|
|
1181
|
+
# @option opts [Array<Integer>] :delete_template_files_request_dto The files to take off the template list, by id; this array is the whole request body. Only a file stored in the portal itself can be a template, which is why an id here is always numeric.
|
|
1182
|
+
# @return [Array<(BooleanWrapper, Integer, Hash)>] BooleanWrapper data, response status code and response headers
|
|
1183
|
+
def delete_templates_with_http_info(opts = {})
|
|
1184
|
+
if @api_client.config.debugging
|
|
1185
|
+
@api_client.config.logger.debug 'Calling API: Files::FilesApi.delete_templates ...'
|
|
1186
|
+
end
|
|
1187
|
+
# resource path
|
|
1188
|
+
local_var_path = '/api/2.0/files/templates'
|
|
1189
|
+
|
|
1190
|
+
# query parameters
|
|
1191
|
+
query_params = opts[:query_params] || {}
|
|
1192
|
+
|
|
1193
|
+
# header parameters
|
|
1194
|
+
header_params = opts[:header_params] || {}
|
|
1195
|
+
# HTTP header 'Accept' (if needed)
|
|
1196
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1197
|
+
# HTTP header 'Content-Type'
|
|
1198
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1199
|
+
if !content_type.nil?
|
|
1200
|
+
header_params['Content-Type'] = content_type
|
|
1201
|
+
end
|
|
1202
|
+
|
|
1203
|
+
# form parameters
|
|
1204
|
+
form_params = opts[:form_params] || {}
|
|
1205
|
+
|
|
1206
|
+
# http body (model)
|
|
1207
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'delete_template_files_request_dto'])
|
|
1208
|
+
|
|
1209
|
+
# return_type
|
|
1210
|
+
return_type = opts[:debug_return_type] || 'BooleanWrapper'
|
|
1211
|
+
|
|
1212
|
+
# auth_names
|
|
1213
|
+
auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2', 'ApiKeyBearer', 'asc_auth_key', 'Bearer', 'OpenId']
|
|
1214
|
+
|
|
1215
|
+
new_options = opts.merge(
|
|
1216
|
+
:operation => :"Files::FilesApi.delete_templates",
|
|
1217
|
+
:header_params => header_params,
|
|
1218
|
+
:query_params => query_params,
|
|
1219
|
+
:form_params => form_params,
|
|
1220
|
+
:body => post_body,
|
|
1221
|
+
:auth_names => auth_names,
|
|
1222
|
+
:return_type => return_type
|
|
1223
|
+
)
|
|
1224
|
+
|
|
1225
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
1226
|
+
if @api_client.config.debugging
|
|
1227
|
+
@api_client.config.logger.debug "API called: Files::FilesApi#delete_templates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1228
|
+
end
|
|
1229
|
+
return data, status_code, headers
|
|
1230
|
+
end
|
|
1231
|
+
|
|
1232
|
+
# Generate a form answers report
|
|
1233
|
+
# Queues generation of the spreadsheet that collects every answer submitted for a PDF form in a form-filling room, and answers at once with the queued task, the original form and a flag telling whether the report file is being created now or an existing one refreshed in place. Either identifier works: the id of the original form, or the id of an XLSX or CSV result file inside the room's Complete folder, from which the portal resolves the form behind it. The form must already have been opened for filling with `PUT api/2.0/files/file/{fileId}/startfilling` and must still live in the form-filling room that started it. The caller must be allowed to update that form's report. The call is mutating and asynchronous: the spreadsheet is not ready when the response arrives, so poll `GET api/2.0/files/file/{fileId}/xlsx` with the original form's id until the task reports completion, then take the produced file from the task. Calling it again while a run is still going answers with that run instead of starting a second one.
|
|
1234
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/generate-xlsx/
|
|
1235
|
+
# @param file_id [Integer] The file the operation addresses. Take the identifier from a listing such as `GET api/2.0/files/{folderId}`: a file stored on the portal is numbered, while a file in a connected third-party account is named by an opaque string.
|
|
1236
|
+
# @param [Hash] opts the optional parameters
|
|
1237
|
+
# @return [XlsxReportResponseWrapper]
|
|
1238
|
+
def generate_xlsx(file_id, opts = {})
|
|
1239
|
+
data, _status_code, _headers = generate_xlsx_with_http_info(file_id, opts)
|
|
1240
|
+
data
|
|
1241
|
+
end
|
|
1242
|
+
|
|
1243
|
+
# Generate a form answers report
|
|
1244
|
+
# Queues generation of the spreadsheet that collects every answer submitted for a PDF form in a form-filling room, and answers at once with the queued task, the original form and a flag telling whether the report file is being created now or an existing one refreshed in place. Either identifier works: the id of the original form, or the id of an XLSX or CSV result file inside the room's Complete folder, from which the portal resolves the form behind it. The form must already have been opened for filling with `PUT api/2.0/files/file/{fileId}/startfilling` and must still live in the form-filling room that started it. The caller must be allowed to update that form's report. The call is mutating and asynchronous: the spreadsheet is not ready when the response arrives, so poll `GET api/2.0/files/file/{fileId}/xlsx` with the original form's id until the task reports completion, then take the produced file from the task. Calling it again while a run is still going answers with that run instead of starting a second one.
|
|
1245
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/generate-xlsx/
|
|
1246
|
+
# @param file_id [Integer] The file the operation addresses. Take the identifier from a listing such as `GET api/2.0/files/{folderId}`: a file stored on the portal is numbered, while a file in a connected third-party account is named by an opaque string.
|
|
1247
|
+
# @param [Hash] opts the optional parameters
|
|
1248
|
+
# @return [Array<(XlsxReportResponseWrapper, Integer, Hash)>] XlsxReportResponseWrapper data, response status code and response headers
|
|
1249
|
+
def generate_xlsx_with_http_info(file_id, opts = {})
|
|
1250
|
+
if @api_client.config.debugging
|
|
1251
|
+
@api_client.config.logger.debug 'Calling API: Files::FilesApi.generate_xlsx ...'
|
|
1252
|
+
end
|
|
1253
|
+
# verify the required parameter 'file_id' is set
|
|
1254
|
+
if @api_client.config.client_side_validation && file_id.nil?
|
|
1255
|
+
fail ArgumentError, "Missing the required parameter 'file_id' when calling Files::FilesApi.generate_xlsx"
|
|
1256
|
+
end
|
|
1257
|
+
# resource path
|
|
1258
|
+
local_var_path = '/api/2.0/files/file/{fileId}/xlsx'.sub('{' + 'fileId' + '}', CGI.escape(file_id.to_s))
|
|
1259
|
+
|
|
1260
|
+
# query parameters
|
|
1261
|
+
query_params = opts[:query_params] || {}
|
|
1262
|
+
|
|
1263
|
+
# header parameters
|
|
1264
|
+
header_params = opts[:header_params] || {}
|
|
1265
|
+
# HTTP header 'Accept' (if needed)
|
|
1266
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1267
|
+
|
|
1268
|
+
# form parameters
|
|
1269
|
+
form_params = opts[:form_params] || {}
|
|
1270
|
+
|
|
1271
|
+
# http body (model)
|
|
1272
|
+
post_body = opts[:debug_body]
|
|
1273
|
+
|
|
1274
|
+
# return_type
|
|
1275
|
+
return_type = opts[:debug_return_type] || 'XlsxReportResponseWrapper'
|
|
1276
|
+
|
|
1277
|
+
# auth_names
|
|
1278
|
+
auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2', 'ApiKeyBearer', 'asc_auth_key', 'Bearer', 'OpenId']
|
|
1279
|
+
|
|
1280
|
+
new_options = opts.merge(
|
|
1281
|
+
:operation => :"Files::FilesApi.generate_xlsx",
|
|
1282
|
+
:header_params => header_params,
|
|
1283
|
+
:query_params => query_params,
|
|
1284
|
+
:form_params => form_params,
|
|
1285
|
+
:body => post_body,
|
|
1286
|
+
:auth_names => auth_names,
|
|
1287
|
+
:return_type => return_type
|
|
1288
|
+
)
|
|
1289
|
+
|
|
1290
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1291
|
+
if @api_client.config.debugging
|
|
1292
|
+
@api_client.config.logger.debug "API called: Files::FilesApi#generate_xlsx\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1293
|
+
end
|
|
1294
|
+
return data, status_code, headers
|
|
1295
|
+
end
|
|
1296
|
+
|
|
1297
|
+
# Get form roles
|
|
1298
|
+
# Returns the roles of a PDF form together with the state each of them is in, which is how a client shows who is expected to fill the form next. Every entry carries the name of the role, the account holding it, the sequence number that decides the turn and a status: the roles of earlier turns are reported as complete, those of later turns as waiting, and the role whose turn it is as either yours to fill or already in progress, depending on whether that person has opened the form; when the filling has been stopped, the role it was interrupted at is reported as stopped instead. A form whose filling was never started answers with an empty list. The file has to be a PDF form, or the completed copy of one, and anything else is refused. Read access to the form is enough, so every member of the room sees the roles, while a caller without access to the room and a guest outside it are refused with 403 and an unknown file is answered with 404. The operation is read-only. The assignment itself is written by `POST api/2.0/files/file/{fileId}/formrolemapping`.
|
|
1299
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/get-all-form-roles/
|
|
1300
|
+
# @param file_id [Integer, String] The file the operation addresses. Take the identifier from a listing such as `GET api/2.0/files/{folderId}`: a file stored on the portal is numbered, while a file in a connected third-party account is named by an opaque string.
|
|
1301
|
+
# @param [Hash] opts the optional parameters
|
|
1302
|
+
# @return [FormRoleArrayWrapper]
|
|
1303
|
+
def get_all_form_roles(file_id, opts = {})
|
|
1304
|
+
data, _status_code, _headers = get_all_form_roles_with_http_info(file_id, opts)
|
|
1305
|
+
data
|
|
1306
|
+
end
|
|
1307
|
+
|
|
1308
|
+
# Get form roles
|
|
1309
|
+
# Returns the roles of a PDF form together with the state each of them is in, which is how a client shows who is expected to fill the form next. Every entry carries the name of the role, the account holding it, the sequence number that decides the turn and a status: the roles of earlier turns are reported as complete, those of later turns as waiting, and the role whose turn it is as either yours to fill or already in progress, depending on whether that person has opened the form; when the filling has been stopped, the role it was interrupted at is reported as stopped instead. A form whose filling was never started answers with an empty list. The file has to be a PDF form, or the completed copy of one, and anything else is refused. Read access to the form is enough, so every member of the room sees the roles, while a caller without access to the room and a guest outside it are refused with 403 and an unknown file is answered with 404. The operation is read-only. The assignment itself is written by `POST api/2.0/files/file/{fileId}/formrolemapping`.
|
|
1310
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/get-all-form-roles/
|
|
1311
|
+
# @param file_id [Integer, String] The file the operation addresses. Take the identifier from a listing such as `GET api/2.0/files/{folderId}`: a file stored on the portal is numbered, while a file in a connected third-party account is named by an opaque string.
|
|
1312
|
+
# @param [Hash] opts the optional parameters
|
|
1313
|
+
# @return [Array<(FormRoleArrayWrapper, Integer, Hash)>] FormRoleArrayWrapper data, response status code and response headers
|
|
1314
|
+
def get_all_form_roles_with_http_info(file_id, opts = {})
|
|
1315
|
+
if @api_client.config.debugging
|
|
1316
|
+
@api_client.config.logger.debug 'Calling API: Files::FilesApi.get_all_form_roles ...'
|
|
1317
|
+
end
|
|
1318
|
+
# verify the required parameter 'file_id' is set
|
|
1319
|
+
if @api_client.config.client_side_validation && file_id.nil?
|
|
1320
|
+
fail ArgumentError, "Missing the required parameter 'file_id' when calling Files::FilesApi.get_all_form_roles"
|
|
1321
|
+
end
|
|
1322
|
+
# resource path
|
|
1323
|
+
local_var_path = '/api/2.0/files/file/{fileId}/formroles'.sub('{' + 'fileId' + '}', CGI.escape(file_id.to_s))
|
|
1324
|
+
|
|
1325
|
+
# query parameters
|
|
1326
|
+
query_params = opts[:query_params] || {}
|
|
1327
|
+
|
|
1328
|
+
# header parameters
|
|
1329
|
+
header_params = opts[:header_params] || {}
|
|
1330
|
+
# HTTP header 'Accept' (if needed)
|
|
1331
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1332
|
+
|
|
1333
|
+
# form parameters
|
|
1334
|
+
form_params = opts[:form_params] || {}
|
|
1335
|
+
|
|
1336
|
+
# http body (model)
|
|
1337
|
+
post_body = opts[:debug_body]
|
|
1338
|
+
|
|
1339
|
+
# return_type
|
|
1340
|
+
return_type = opts[:debug_return_type] || 'FormRoleArrayWrapper'
|
|
1341
|
+
|
|
1342
|
+
# auth_names
|
|
1343
|
+
auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2', 'ApiKeyBearer', 'asc_auth_key', 'Bearer', 'OpenId']
|
|
1344
|
+
|
|
1345
|
+
new_options = opts.merge(
|
|
1346
|
+
:operation => :"Files::FilesApi.get_all_form_roles",
|
|
1347
|
+
:header_params => header_params,
|
|
1348
|
+
:query_params => query_params,
|
|
1349
|
+
:form_params => form_params,
|
|
1350
|
+
:body => post_body,
|
|
1351
|
+
:auth_names => auth_names,
|
|
1352
|
+
:return_type => return_type
|
|
1353
|
+
)
|
|
1354
|
+
|
|
1355
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1356
|
+
if @api_client.config.debugging
|
|
1357
|
+
@api_client.config.logger.debug "API called: Files::FilesApi#get_all_form_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1358
|
+
end
|
|
1359
|
+
return data, status_code, headers
|
|
1360
|
+
end
|
|
1361
|
+
|
|
1362
|
+
# Get changes URL
|
|
1363
|
+
# Answers with everything an editor needs in order to show what changed in one version of a file: the address of the version itself, its document key and format, the address of the recorded changes, the same trio for the version it is compared against, and a token that signs the whole answer for the document service. `version` picks the version, and 0, the default, means the current one. `changesUrl` and `previous` are filled in only when the portal has stored the changes of that version, which is the case for versions written by an editing session; for a version uploaded as a whole they stay empty and only the file itself can be shown. The addresses are meant for the document service and carry their own time-limited keys. The caller needs the right to read the history of the file, which editing access and above grant: read-only access, commenting access, a guest and an anonymous caller are all refused, as is a file kept in a connected third-party storage. The operation is read-only. For the list of versions themselves use `GET api/2.0/files/file/{fileId}/edit/history`.
|
|
1364
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/get-edit-diff-url/
|
|
1365
|
+
# @param file_id [Integer, String] The file whose changes are read.
|
|
1366
|
+
# @param [Hash] opts the optional parameters
|
|
1367
|
+
# @option opts [Integer] :version The version to show the changes of, as reported by `GET api/2.0/files/file/{fileId}/edit/history`; 0 means the current version.
|
|
1368
|
+
# @return [EditHistoryDataWrapper]
|
|
1369
|
+
def get_edit_diff_url(file_id, opts = {})
|
|
1370
|
+
data, _status_code, _headers = get_edit_diff_url_with_http_info(file_id, opts)
|
|
1371
|
+
data
|
|
1372
|
+
end
|
|
1373
|
+
|
|
1374
|
+
# Get changes URL
|
|
1375
|
+
# Answers with everything an editor needs in order to show what changed in one version of a file: the address of the version itself, its document key and format, the address of the recorded changes, the same trio for the version it is compared against, and a token that signs the whole answer for the document service. `version` picks the version, and 0, the default, means the current one. `changesUrl` and `previous` are filled in only when the portal has stored the changes of that version, which is the case for versions written by an editing session; for a version uploaded as a whole they stay empty and only the file itself can be shown. The addresses are meant for the document service and carry their own time-limited keys. The caller needs the right to read the history of the file, which editing access and above grant: read-only access, commenting access, a guest and an anonymous caller are all refused, as is a file kept in a connected third-party storage. The operation is read-only. For the list of versions themselves use `GET api/2.0/files/file/{fileId}/edit/history`.
|
|
1376
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/get-edit-diff-url/
|
|
1377
|
+
# @param file_id [Integer, String] The file whose changes are read.
|
|
1378
|
+
# @param [Hash] opts the optional parameters
|
|
1379
|
+
# @option opts [Integer] :version The version to show the changes of, as reported by `GET api/2.0/files/file/{fileId}/edit/history`; 0 means the current version.
|
|
1380
|
+
# @return [Array<(EditHistoryDataWrapper, Integer, Hash)>] EditHistoryDataWrapper data, response status code and response headers
|
|
1381
|
+
def get_edit_diff_url_with_http_info(file_id, opts = {})
|
|
1382
|
+
if @api_client.config.debugging
|
|
1383
|
+
@api_client.config.logger.debug 'Calling API: Files::FilesApi.get_edit_diff_url ...'
|
|
1384
|
+
end
|
|
1385
|
+
# verify the required parameter 'file_id' is set
|
|
1386
|
+
if @api_client.config.client_side_validation && file_id.nil?
|
|
1387
|
+
fail ArgumentError, "Missing the required parameter 'file_id' when calling Files::FilesApi.get_edit_diff_url"
|
|
1388
|
+
end
|
|
1389
|
+
# resource path
|
|
1390
|
+
local_var_path = '/api/2.0/files/file/{fileId}/edit/diff'.sub('{' + 'fileId' + '}', CGI.escape(file_id.to_s))
|
|
1391
|
+
|
|
1392
|
+
# query parameters
|
|
1393
|
+
query_params = opts[:query_params] || {}
|
|
1394
|
+
query_params[:'version'] = opts[:'version'] if !opts[:'version'].nil?
|
|
1395
|
+
|
|
1396
|
+
# header parameters
|
|
1397
|
+
header_params = opts[:header_params] || {}
|
|
1398
|
+
# HTTP header 'Accept' (if needed)
|
|
1399
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1400
|
+
|
|
1401
|
+
# form parameters
|
|
1402
|
+
form_params = opts[:form_params] || {}
|
|
1403
|
+
|
|
1404
|
+
# http body (model)
|
|
1405
|
+
post_body = opts[:debug_body]
|
|
1406
|
+
|
|
1407
|
+
# return_type
|
|
1408
|
+
return_type = opts[:debug_return_type] || 'EditHistoryDataWrapper'
|
|
1409
|
+
|
|
1410
|
+
# auth_names
|
|
1411
|
+
auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2', 'ApiKeyBearer', 'asc_auth_key', 'Bearer', 'OpenId']
|
|
1412
|
+
|
|
1413
|
+
new_options = opts.merge(
|
|
1414
|
+
:operation => :"Files::FilesApi.get_edit_diff_url",
|
|
1415
|
+
:header_params => header_params,
|
|
1416
|
+
:query_params => query_params,
|
|
1417
|
+
:form_params => form_params,
|
|
1418
|
+
:body => post_body,
|
|
1419
|
+
:auth_names => auth_names,
|
|
1420
|
+
:return_type => return_type
|
|
1421
|
+
)
|
|
1422
|
+
|
|
1423
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1424
|
+
if @api_client.config.debugging
|
|
1425
|
+
@api_client.config.logger.debug "API called: Files::FilesApi#get_edit_diff_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1426
|
+
end
|
|
1427
|
+
return data, status_code, headers
|
|
1428
|
+
end
|
|
1429
|
+
|
|
1430
|
+
# Get version history
|
|
1431
|
+
# Returns the editing revisions of a file, oldest first, as the document service understands them: each entry carries the version and the revision group it belongs to, the account that saved it, when it was saved, the comment left on it, the document key of that revision and, where the portal stored them, the changes it introduced. Only the revisions a person saved are listed - the autosaves an editing session writes in between are left out, which is what separates this list from the plain version list of `GET api/2.0/files/file/{fileId}/history`. The caller needs the right to read the history of the file, which editing access and above grant: commenting access, read-only access, a guest, a member without access to the room and an anonymous caller are all refused, and so is a file kept in a connected third-party storage, which keeps no history in the portal. The operation is read-only. Take one entry to `GET api/2.0/files/file/{fileId}/edit/diff` to show its changes, or to `POST api/2.0/files/file/{fileId}/restoreversion` to bring it back.
|
|
1432
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/get-edit-history/
|
|
1433
|
+
# @param file_id [Integer, String] The file the operation addresses. Take the identifier from a listing such as `GET api/2.0/files/{folderId}`: a file stored on the portal is numbered, while a file in a connected third-party account is named by an opaque string.
|
|
1434
|
+
# @param [Hash] opts the optional parameters
|
|
1435
|
+
# @return [EditHistoryArrayWrapper]
|
|
1436
|
+
def get_edit_history(file_id, opts = {})
|
|
1437
|
+
data, _status_code, _headers = get_edit_history_with_http_info(file_id, opts)
|
|
1438
|
+
data
|
|
1439
|
+
end
|
|
1440
|
+
|
|
1441
|
+
# Get version history
|
|
1442
|
+
# Returns the editing revisions of a file, oldest first, as the document service understands them: each entry carries the version and the revision group it belongs to, the account that saved it, when it was saved, the comment left on it, the document key of that revision and, where the portal stored them, the changes it introduced. Only the revisions a person saved are listed - the autosaves an editing session writes in between are left out, which is what separates this list from the plain version list of `GET api/2.0/files/file/{fileId}/history`. The caller needs the right to read the history of the file, which editing access and above grant: commenting access, read-only access, a guest, a member without access to the room and an anonymous caller are all refused, and so is a file kept in a connected third-party storage, which keeps no history in the portal. The operation is read-only. Take one entry to `GET api/2.0/files/file/{fileId}/edit/diff` to show its changes, or to `POST api/2.0/files/file/{fileId}/restoreversion` to bring it back.
|
|
1443
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/get-edit-history/
|
|
1444
|
+
# @param file_id [Integer, String] The file the operation addresses. Take the identifier from a listing such as `GET api/2.0/files/{folderId}`: a file stored on the portal is numbered, while a file in a connected third-party account is named by an opaque string.
|
|
1445
|
+
# @param [Hash] opts the optional parameters
|
|
1446
|
+
# @return [Array<(EditHistoryArrayWrapper, Integer, Hash)>] EditHistoryArrayWrapper data, response status code and response headers
|
|
1447
|
+
def get_edit_history_with_http_info(file_id, opts = {})
|
|
1448
|
+
if @api_client.config.debugging
|
|
1449
|
+
@api_client.config.logger.debug 'Calling API: Files::FilesApi.get_edit_history ...'
|
|
1450
|
+
end
|
|
1451
|
+
# verify the required parameter 'file_id' is set
|
|
1452
|
+
if @api_client.config.client_side_validation && file_id.nil?
|
|
1453
|
+
fail ArgumentError, "Missing the required parameter 'file_id' when calling Files::FilesApi.get_edit_history"
|
|
1454
|
+
end
|
|
1455
|
+
# resource path
|
|
1456
|
+
local_var_path = '/api/2.0/files/file/{fileId}/edit/history'.sub('{' + 'fileId' + '}', CGI.escape(file_id.to_s))
|
|
1457
|
+
|
|
1458
|
+
# query parameters
|
|
1459
|
+
query_params = opts[:query_params] || {}
|
|
1460
|
+
|
|
1461
|
+
# header parameters
|
|
1462
|
+
header_params = opts[:header_params] || {}
|
|
1463
|
+
# HTTP header 'Accept' (if needed)
|
|
1464
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1465
|
+
|
|
1466
|
+
# form parameters
|
|
1467
|
+
form_params = opts[:form_params] || {}
|
|
1468
|
+
|
|
1469
|
+
# http body (model)
|
|
1470
|
+
post_body = opts[:debug_body]
|
|
1471
|
+
|
|
1472
|
+
# return_type
|
|
1473
|
+
return_type = opts[:debug_return_type] || 'EditHistoryArrayWrapper'
|
|
1474
|
+
|
|
1475
|
+
# auth_names
|
|
1476
|
+
auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2', 'ApiKeyBearer', 'asc_auth_key', 'Bearer', 'OpenId']
|
|
1477
|
+
|
|
1478
|
+
new_options = opts.merge(
|
|
1479
|
+
:operation => :"Files::FilesApi.get_edit_history",
|
|
1480
|
+
:header_params => header_params,
|
|
1481
|
+
:query_params => query_params,
|
|
1482
|
+
:form_params => form_params,
|
|
1483
|
+
:body => post_body,
|
|
1484
|
+
:auth_names => auth_names,
|
|
1485
|
+
:return_type => return_type
|
|
1486
|
+
)
|
|
1487
|
+
|
|
1488
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1489
|
+
if @api_client.config.debugging
|
|
1490
|
+
@api_client.config.logger.debug "API called: Files::FilesApi#get_edit_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1491
|
+
end
|
|
1492
|
+
return data, status_code, headers
|
|
1493
|
+
end
|
|
1494
|
+
|
|
1495
|
+
# Get file encryption information
|
|
1496
|
+
# Returns what the caller needs in order to decrypt one file of an end-to-end encrypted private room: `userKeys` holds the key pairs of the calling account, the private half of each of them encrypted with that person's own password, and `fileKeys` holds the file keys that were issued to this account for this file, each naming the public key it was encrypted for. Only the keys of the calling account are ever returned, never those of the other people in the room. An account that holds no key pair yet, and a file no key was issued for, answer with empty lists rather than with an error, so an empty `fileKeys` means the caller cannot open that file rather than that the file is unencrypted. The caller needs read access to the file; a caller without it, and a file that does not exist, are both refused with 403. The operation is read-only. Keys are issued by `PUT api/2.0/files/{fileId}/access`, and the personal key pairs are managed under `api/2.0/privacyroom/keys`.
|
|
1497
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/get-encryption-info/
|
|
1498
|
+
# @param file_id [Integer, String] The file whose encryption keys are read. Only a file in an end-to-end encrypted private room has any.
|
|
1499
|
+
# @param [Hash] opts the optional parameters
|
|
1500
|
+
# @return [FileEncryptionInfoWrapper]
|
|
1501
|
+
def get_encryption_info(file_id, opts = {})
|
|
1502
|
+
data, _status_code, _headers = get_encryption_info_with_http_info(file_id, opts)
|
|
1503
|
+
data
|
|
1504
|
+
end
|
|
1505
|
+
|
|
1506
|
+
# Get file encryption information
|
|
1507
|
+
# Returns what the caller needs in order to decrypt one file of an end-to-end encrypted private room: `userKeys` holds the key pairs of the calling account, the private half of each of them encrypted with that person's own password, and `fileKeys` holds the file keys that were issued to this account for this file, each naming the public key it was encrypted for. Only the keys of the calling account are ever returned, never those of the other people in the room. An account that holds no key pair yet, and a file no key was issued for, answer with empty lists rather than with an error, so an empty `fileKeys` means the caller cannot open that file rather than that the file is unencrypted. The caller needs read access to the file; a caller without it, and a file that does not exist, are both refused with 403. The operation is read-only. Keys are issued by `PUT api/2.0/files/{fileId}/access`, and the personal key pairs are managed under `api/2.0/privacyroom/keys`.
|
|
1508
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/get-encryption-info/
|
|
1509
|
+
# @param file_id [Integer, String] The file whose encryption keys are read. Only a file in an end-to-end encrypted private room has any.
|
|
1510
|
+
# @param [Hash] opts the optional parameters
|
|
1511
|
+
# @return [Array<(FileEncryptionInfoWrapper, Integer, Hash)>] FileEncryptionInfoWrapper data, response status code and response headers
|
|
1512
|
+
def get_encryption_info_with_http_info(file_id, opts = {})
|
|
1513
|
+
if @api_client.config.debugging
|
|
1514
|
+
@api_client.config.logger.debug 'Calling API: Files::FilesApi.get_encryption_info ...'
|
|
1515
|
+
end
|
|
1516
|
+
# verify the required parameter 'file_id' is set
|
|
1517
|
+
if @api_client.config.client_side_validation && file_id.nil?
|
|
1518
|
+
fail ArgumentError, "Missing the required parameter 'file_id' when calling Files::FilesApi.get_encryption_info"
|
|
1519
|
+
end
|
|
1520
|
+
# resource path
|
|
1521
|
+
local_var_path = '/api/2.0/files/{fileId}/access'.sub('{' + 'fileId' + '}', CGI.escape(file_id.to_s))
|
|
1522
|
+
|
|
1523
|
+
# query parameters
|
|
1524
|
+
query_params = opts[:query_params] || {}
|
|
1525
|
+
|
|
1526
|
+
# header parameters
|
|
1527
|
+
header_params = opts[:header_params] || {}
|
|
1528
|
+
# HTTP header 'Accept' (if needed)
|
|
1529
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1530
|
+
|
|
1531
|
+
# form parameters
|
|
1532
|
+
form_params = opts[:form_params] || {}
|
|
1533
|
+
|
|
1534
|
+
# http body (model)
|
|
1535
|
+
post_body = opts[:debug_body]
|
|
1536
|
+
|
|
1537
|
+
# return_type
|
|
1538
|
+
return_type = opts[:debug_return_type] || 'FileEncryptionInfoWrapper'
|
|
1539
|
+
|
|
1540
|
+
# auth_names
|
|
1541
|
+
auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2', 'ApiKeyBearer', 'asc_auth_key', 'Bearer', 'OpenId']
|
|
1542
|
+
|
|
1543
|
+
new_options = opts.merge(
|
|
1544
|
+
:operation => :"Files::FilesApi.get_encryption_info",
|
|
1545
|
+
:header_params => header_params,
|
|
1546
|
+
:query_params => query_params,
|
|
1547
|
+
:form_params => form_params,
|
|
1548
|
+
:body => post_body,
|
|
1549
|
+
:auth_names => auth_names,
|
|
1550
|
+
:return_type => return_type
|
|
1551
|
+
)
|
|
1552
|
+
|
|
1553
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1554
|
+
if @api_client.config.debugging
|
|
1555
|
+
@api_client.config.logger.debug "API called: Files::FilesApi#get_encryption_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1556
|
+
end
|
|
1557
|
+
return data, status_code, headers
|
|
1558
|
+
end
|
|
1559
|
+
|
|
1560
|
+
# Get file history
|
|
1561
|
+
# Returns the activity log of a single file - who renamed, moved, shared, converted, locked or edited it, and when - as the portal recorded it in its audit trail. Entries arrive newest first, and the events that belong to one action are folded into a single entry whose `related` list carries the rest of them. `fromDate` and `toDate` are read in the portal's time zone and narrow the range; `startIndex` and `count` page through the result, and the number of matching entries is reported in the response headers rather than in the body. The caller needs read access to the file, so a member of the room it lies in, the admin of that room and a DocSpace admin all see the same log, while a caller without access to the room is refused with 403 and an unknown id is answered with 404. The operation is read-only. Only files stored in the portal itself have a log here - a file kept in a connected third-party storage has none. For the log of a folder or a room use `GET api/2.0/files/folder/{folderId}/log`.
|
|
1562
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/get-file-history/
|
|
1563
|
+
# @param file_id [Integer] The file whose activity log is read; only files stored in the portal itself have one.
|
|
1564
|
+
# @param [Hash] opts the optional parameters
|
|
1565
|
+
# @option opts [Time] :from_date The earliest moment an entry may have, read in the time zone of the portal; left out, the log starts at the oldest entry the portal still keeps.
|
|
1566
|
+
# @option opts [Time] :to_date The latest moment an entry may have, read in the time zone of the portal; left out, the log ends at the newest entry.
|
|
1567
|
+
# @option opts [Integer] :count How many entries one page holds. The number of entries that match the query is reported in the response headers, not in the body.
|
|
1568
|
+
# @option opts [Integer] :start_index How many entries to skip before the page begins, counted from the newest one, so pages are taken by adding the page size to it.
|
|
1569
|
+
# @return [HistoryArrayWrapper]
|
|
1570
|
+
def get_file_history(file_id, opts = {})
|
|
1571
|
+
data, _status_code, _headers = get_file_history_with_http_info(file_id, opts)
|
|
1572
|
+
data
|
|
1573
|
+
end
|
|
1574
|
+
|
|
1575
|
+
# Get file history
|
|
1576
|
+
# Returns the activity log of a single file - who renamed, moved, shared, converted, locked or edited it, and when - as the portal recorded it in its audit trail. Entries arrive newest first, and the events that belong to one action are folded into a single entry whose `related` list carries the rest of them. `fromDate` and `toDate` are read in the portal's time zone and narrow the range; `startIndex` and `count` page through the result, and the number of matching entries is reported in the response headers rather than in the body. The caller needs read access to the file, so a member of the room it lies in, the admin of that room and a DocSpace admin all see the same log, while a caller without access to the room is refused with 403 and an unknown id is answered with 404. The operation is read-only. Only files stored in the portal itself have a log here - a file kept in a connected third-party storage has none. For the log of a folder or a room use `GET api/2.0/files/folder/{folderId}/log`.
|
|
1577
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/get-file-history/
|
|
1578
|
+
# @param file_id [Integer] The file whose activity log is read; only files stored in the portal itself have one.
|
|
1579
|
+
# @param [Hash] opts the optional parameters
|
|
1580
|
+
# @option opts [Time] :from_date The earliest moment an entry may have, read in the time zone of the portal; left out, the log starts at the oldest entry the portal still keeps.
|
|
1581
|
+
# @option opts [Time] :to_date The latest moment an entry may have, read in the time zone of the portal; left out, the log ends at the newest entry.
|
|
1582
|
+
# @option opts [Integer] :count How many entries one page holds. The number of entries that match the query is reported in the response headers, not in the body.
|
|
1583
|
+
# @option opts [Integer] :start_index How many entries to skip before the page begins, counted from the newest one, so pages are taken by adding the page size to it.
|
|
1584
|
+
# @return [Array<(HistoryArrayWrapper, Integer, Hash)>] HistoryArrayWrapper data, response status code and response headers
|
|
1585
|
+
def get_file_history_with_http_info(file_id, opts = {})
|
|
1586
|
+
if @api_client.config.debugging
|
|
1587
|
+
@api_client.config.logger.debug 'Calling API: Files::FilesApi.get_file_history ...'
|
|
1588
|
+
end
|
|
1589
|
+
# verify the required parameter 'file_id' is set
|
|
1590
|
+
if @api_client.config.client_side_validation && file_id.nil?
|
|
1591
|
+
fail ArgumentError, "Missing the required parameter 'file_id' when calling Files::FilesApi.get_file_history"
|
|
1592
|
+
end
|
|
1593
|
+
if @api_client.config.client_side_validation && !opts[:'count'].nil? && opts[:'count'] > 100
|
|
1594
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]" when calling Files::FilesApi.get_file_history, must be smaller than or equal to 100.'
|
|
1595
|
+
end
|
|
1596
|
+
|
|
1597
|
+
if @api_client.config.client_side_validation && !opts[:'count'].nil? && opts[:'count'] < 1
|
|
1598
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]" when calling Files::FilesApi.get_file_history, must be greater than or equal to 1.'
|
|
1599
|
+
end
|
|
1600
|
+
|
|
1601
|
+
# resource path
|
|
1602
|
+
local_var_path = '/api/2.0/files/file/{fileId}/log'.sub('{' + 'fileId' + '}', CGI.escape(file_id.to_s))
|
|
1603
|
+
|
|
1604
|
+
# query parameters
|
|
1605
|
+
query_params = opts[:query_params] || {}
|
|
1606
|
+
query_params[:'fromDate'] = opts[:'from_date'] if !opts[:'from_date'].nil?
|
|
1607
|
+
query_params[:'toDate'] = opts[:'to_date'] if !opts[:'to_date'].nil?
|
|
1608
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
|
1609
|
+
query_params[:'startIndex'] = opts[:'start_index'] if !opts[:'start_index'].nil?
|
|
1610
|
+
|
|
1611
|
+
# header parameters
|
|
1612
|
+
header_params = opts[:header_params] || {}
|
|
1613
|
+
# HTTP header 'Accept' (if needed)
|
|
1614
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1615
|
+
|
|
1616
|
+
# form parameters
|
|
1617
|
+
form_params = opts[:form_params] || {}
|
|
1618
|
+
|
|
1619
|
+
# http body (model)
|
|
1620
|
+
post_body = opts[:debug_body]
|
|
1621
|
+
|
|
1622
|
+
# return_type
|
|
1623
|
+
return_type = opts[:debug_return_type] || 'HistoryArrayWrapper'
|
|
1624
|
+
|
|
1625
|
+
# auth_names
|
|
1626
|
+
auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2', 'ApiKeyBearer', 'asc_auth_key', 'Bearer', 'OpenId']
|
|
1627
|
+
|
|
1628
|
+
new_options = opts.merge(
|
|
1629
|
+
:operation => :"Files::FilesApi.get_file_history",
|
|
1630
|
+
:header_params => header_params,
|
|
1631
|
+
:query_params => query_params,
|
|
1632
|
+
:form_params => form_params,
|
|
1633
|
+
:body => post_body,
|
|
1634
|
+
:auth_names => auth_names,
|
|
1635
|
+
:return_type => return_type
|
|
1636
|
+
)
|
|
1637
|
+
|
|
1638
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1639
|
+
if @api_client.config.debugging
|
|
1640
|
+
@api_client.config.logger.debug "API called: Files::FilesApi#get_file_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1641
|
+
end
|
|
1642
|
+
return data, status_code, headers
|
|
1643
|
+
end
|
|
1644
|
+
|
|
1645
|
+
# Get file information
|
|
1646
|
+
# Returns one file as the portal stores it, together with the state it has for the caller: the title, the folder it lies in, the size, the current version and revision group, the addresses for viewing and editing it, the actions the caller is allowed to perform on it, the sharing rights it was reached through, and the thumbnail state. `version` picks an older version instead of the current one; the default of -1 means the current version. When the file belongs to another person's own section and the caller cannot read the folder holding it, the answer reports the Shared with me section as its folder, so that a client can show it in a place the caller can actually open. The caller needs read access to the file, which any member of the room it lies in has; a caller without access to the room is refused and an anonymous caller without an external share link is rejected. The operation is read-only. For every version at once use `GET api/2.0/files/file/{fileId}/history`.
|
|
1647
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/get-file-info/
|
|
1648
|
+
# @param file_id [Integer, String] The file to read.
|
|
1649
|
+
# @param [Hash] opts the optional parameters
|
|
1650
|
+
# @option opts [Integer] :version The version to read, as reported by `GET api/2.0/files/file/{fileId}/history`; -1, the default, reads the current version.
|
|
1651
|
+
# @return [FileWrapper, ThirdPartyFileWrapper]
|
|
1652
|
+
def get_file_info(file_id, opts = {})
|
|
1653
|
+
data, _status_code, _headers = get_file_info_with_http_info(file_id, opts)
|
|
1654
|
+
data
|
|
1655
|
+
end
|
|
1656
|
+
|
|
1657
|
+
# Get file information
|
|
1658
|
+
# Returns one file as the portal stores it, together with the state it has for the caller: the title, the folder it lies in, the size, the current version and revision group, the addresses for viewing and editing it, the actions the caller is allowed to perform on it, the sharing rights it was reached through, and the thumbnail state. `version` picks an older version instead of the current one; the default of -1 means the current version. When the file belongs to another person's own section and the caller cannot read the folder holding it, the answer reports the Shared with me section as its folder, so that a client can show it in a place the caller can actually open. The caller needs read access to the file, which any member of the room it lies in has; a caller without access to the room is refused and an anonymous caller without an external share link is rejected. The operation is read-only. For every version at once use `GET api/2.0/files/file/{fileId}/history`.
|
|
1659
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/get-file-info/
|
|
1660
|
+
# @param file_id [Integer, String] The file to read.
|
|
1661
|
+
# @param [Hash] opts the optional parameters
|
|
1662
|
+
# @option opts [Integer] :version The version to read, as reported by `GET api/2.0/files/file/{fileId}/history`; -1, the default, reads the current version.
|
|
1663
|
+
# @return [Array<(FileWrapper, ThirdPartyFileWrapper, Integer, Hash)>] FileWrapper, ThirdPartyFileWrapper data, response status code and response headers
|
|
1664
|
+
def get_file_info_with_http_info(file_id, opts = {})
|
|
1665
|
+
if @api_client.config.debugging
|
|
1666
|
+
@api_client.config.logger.debug 'Calling API: Files::FilesApi.get_file_info ...'
|
|
1667
|
+
end
|
|
1668
|
+
# verify the required parameter 'file_id' is set
|
|
1669
|
+
if @api_client.config.client_side_validation && file_id.nil?
|
|
1670
|
+
fail ArgumentError, "Missing the required parameter 'file_id' when calling Files::FilesApi.get_file_info"
|
|
1671
|
+
end
|
|
1672
|
+
# resource path
|
|
1673
|
+
local_var_path = '/api/2.0/files/file/{fileId}'.sub('{' + 'fileId' + '}', CGI.escape(file_id.to_s))
|
|
1674
|
+
|
|
1675
|
+
# query parameters
|
|
1676
|
+
query_params = opts[:query_params] || {}
|
|
1677
|
+
query_params[:'version'] = opts[:'version'] if !opts[:'version'].nil?
|
|
1678
|
+
|
|
1679
|
+
# header parameters
|
|
1680
|
+
header_params = opts[:header_params] || {}
|
|
1681
|
+
# HTTP header 'Accept' (if needed)
|
|
1682
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1683
|
+
|
|
1684
|
+
# form parameters
|
|
1685
|
+
form_params = opts[:form_params] || {}
|
|
1686
|
+
|
|
1687
|
+
# http body (model)
|
|
1688
|
+
post_body = opts[:debug_body]
|
|
1689
|
+
|
|
1690
|
+
# return_type
|
|
1691
|
+
return_type = opts[:debug_return_type] || (file_id.is_a?(String) ? 'ThirdPartyFileWrapper' : 'FileWrapper')
|
|
1692
|
+
|
|
1693
|
+
# auth_names
|
|
1694
|
+
auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2', 'ApiKeyBearer', 'asc_auth_key', 'Bearer', 'OpenId']
|
|
1695
|
+
|
|
1696
|
+
new_options = opts.merge(
|
|
1697
|
+
:operation => :"Files::FilesApi.get_file_info",
|
|
1698
|
+
:header_params => header_params,
|
|
1699
|
+
:query_params => query_params,
|
|
1700
|
+
:form_params => form_params,
|
|
1701
|
+
:body => post_body,
|
|
1702
|
+
:auth_names => auth_names,
|
|
1703
|
+
:return_type => return_type
|
|
1704
|
+
)
|
|
1705
|
+
|
|
1706
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1707
|
+
if @api_client.config.debugging
|
|
1708
|
+
@api_client.config.logger.debug "API called: Files::FilesApi#get_file_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1709
|
+
end
|
|
1710
|
+
return data, status_code, headers
|
|
1711
|
+
end
|
|
1712
|
+
|
|
1713
|
+
# Get file external links
|
|
1714
|
+
# Lists the external links of a file, each with its identifier, title, address, rights, expiration date and download restriction. `startIndex` and `count` page through the list, and the total number of links is reported in the response headers rather than in the body. A file that has never been shared by link answers with an empty list; the primary link is part of this list once it exists, and it is the only one that is created on demand, by `GET api/2.0/files/file/{id}/link`. For a PDF form kept in a form-filling room the link of the room is appended to the answer, because that is the address through which the form is filled out. The caller needs the right to share the file, which its creator, the room admin and a DocSpace admin acting as room manager have; a caller without access to the file is refused and an anonymous caller is rejected. The operation is read-only. Take an identifier from here to `PUT api/2.0/files/file/{id}/links` to change or remove that link.
|
|
1715
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/get-file-links/
|
|
1716
|
+
# @param id [Integer, String] The file the operation addresses. Take the identifier from a listing such as `GET api/2.0/files/{folderId}`: a file stored on the portal is numbered, while a file in a connected third-party account is named by an opaque string.
|
|
1717
|
+
# @param [Hash] opts the optional parameters
|
|
1718
|
+
# @option opts [Integer] :count How many entries at most to answer with, in the operations of this file that return a list; an operation that answers with a single object is not affected by it.
|
|
1719
|
+
# @option opts [Integer] :start_index How many entries of such a list to skip before answering, used together with `count` to walk through it page by page.
|
|
1720
|
+
# @return [FileShareArrayWrapper]
|
|
1721
|
+
def get_file_links(id, opts = {})
|
|
1722
|
+
data, _status_code, _headers = get_file_links_with_http_info(id, opts)
|
|
1723
|
+
data
|
|
1724
|
+
end
|
|
1725
|
+
|
|
1726
|
+
# Get file external links
|
|
1727
|
+
# Lists the external links of a file, each with its identifier, title, address, rights, expiration date and download restriction. `startIndex` and `count` page through the list, and the total number of links is reported in the response headers rather than in the body. A file that has never been shared by link answers with an empty list; the primary link is part of this list once it exists, and it is the only one that is created on demand, by `GET api/2.0/files/file/{id}/link`. For a PDF form kept in a form-filling room the link of the room is appended to the answer, because that is the address through which the form is filled out. The caller needs the right to share the file, which its creator, the room admin and a DocSpace admin acting as room manager have; a caller without access to the file is refused and an anonymous caller is rejected. The operation is read-only. Take an identifier from here to `PUT api/2.0/files/file/{id}/links` to change or remove that link.
|
|
1728
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/get-file-links/
|
|
1729
|
+
# @param id [Integer, String] The file the operation addresses. Take the identifier from a listing such as `GET api/2.0/files/{folderId}`: a file stored on the portal is numbered, while a file in a connected third-party account is named by an opaque string.
|
|
1730
|
+
# @param [Hash] opts the optional parameters
|
|
1731
|
+
# @option opts [Integer] :count How many entries at most to answer with, in the operations of this file that return a list; an operation that answers with a single object is not affected by it.
|
|
1732
|
+
# @option opts [Integer] :start_index How many entries of such a list to skip before answering, used together with `count` to walk through it page by page.
|
|
1733
|
+
# @return [Array<(FileShareArrayWrapper, Integer, Hash)>] FileShareArrayWrapper data, response status code and response headers
|
|
1734
|
+
def get_file_links_with_http_info(id, opts = {})
|
|
1735
|
+
if @api_client.config.debugging
|
|
1736
|
+
@api_client.config.logger.debug 'Calling API: Files::FilesApi.get_file_links ...'
|
|
1737
|
+
end
|
|
1738
|
+
# verify the required parameter 'id' is set
|
|
1739
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
1740
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling Files::FilesApi.get_file_links"
|
|
1741
|
+
end
|
|
1742
|
+
if @api_client.config.client_side_validation && !opts[:'count'].nil? && opts[:'count'] > 100
|
|
1743
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]" when calling Files::FilesApi.get_file_links, must be smaller than or equal to 100.'
|
|
1744
|
+
end
|
|
1745
|
+
|
|
1746
|
+
if @api_client.config.client_side_validation && !opts[:'count'].nil? && opts[:'count'] < 1
|
|
1747
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]" when calling Files::FilesApi.get_file_links, must be greater than or equal to 1.'
|
|
1748
|
+
end
|
|
1749
|
+
|
|
1750
|
+
# resource path
|
|
1751
|
+
local_var_path = '/api/2.0/files/file/{id}/links'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
1752
|
+
|
|
1753
|
+
# query parameters
|
|
1754
|
+
query_params = opts[:query_params] || {}
|
|
1755
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
|
1756
|
+
query_params[:'startIndex'] = opts[:'start_index'] if !opts[:'start_index'].nil?
|
|
1757
|
+
|
|
1758
|
+
# header parameters
|
|
1759
|
+
header_params = opts[:header_params] || {}
|
|
1760
|
+
# HTTP header 'Accept' (if needed)
|
|
1761
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1762
|
+
|
|
1763
|
+
# form parameters
|
|
1764
|
+
form_params = opts[:form_params] || {}
|
|
1765
|
+
|
|
1766
|
+
# http body (model)
|
|
1767
|
+
post_body = opts[:debug_body]
|
|
1768
|
+
|
|
1769
|
+
# return_type
|
|
1770
|
+
return_type = opts[:debug_return_type] || 'FileShareArrayWrapper'
|
|
1771
|
+
|
|
1772
|
+
# auth_names
|
|
1773
|
+
auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2', 'ApiKeyBearer', 'asc_auth_key', 'Bearer', 'OpenId']
|
|
1774
|
+
|
|
1775
|
+
new_options = opts.merge(
|
|
1776
|
+
:operation => :"Files::FilesApi.get_file_links",
|
|
1777
|
+
:header_params => header_params,
|
|
1778
|
+
:query_params => query_params,
|
|
1779
|
+
:form_params => form_params,
|
|
1780
|
+
:body => post_body,
|
|
1781
|
+
:auth_names => auth_names,
|
|
1782
|
+
:return_type => return_type
|
|
1783
|
+
)
|
|
1784
|
+
|
|
1785
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1786
|
+
if @api_client.config.debugging
|
|
1787
|
+
@api_client.config.logger.debug "API called: Files::FilesApi#get_file_links\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1788
|
+
end
|
|
1789
|
+
return data, status_code, headers
|
|
1790
|
+
end
|
|
1791
|
+
|
|
1792
|
+
# Get the file primary external link
|
|
1793
|
+
# Answers with the primary external link of a file - the one the Copy link action of a client hands out - with its address in `sharedTo.shareLink`, its rights in `access`, and its expiration date, password flag and download restriction beside them. The link is created on the first read if the file has none, with read rights, no password and no expiry, so this operation mutates on that first call and is a plain read afterwards; repeated calls answer with the same link identifier. A PDF form in a form-filling room is answered with the link of that room, carried over to the form. The caller needs the right to share the file, which its creator, the room admin and a DocSpace admin acting as room manager have; a caller without access to the file is refused with 403 and an anonymous caller is rejected, while a link that was deliberately revoked is answered with 404 rather than being recreated. The custom links of the same file, the primary one excepted, are listed by `GET api/2.0/files/file/{id}/links`.
|
|
1794
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/get-file-primary-external-link/
|
|
1795
|
+
# @param id [Integer, String] The file the operation addresses. Take the identifier from a listing such as `GET api/2.0/files/{folderId}`: a file stored on the portal is numbered, while a file in a connected third-party account is named by an opaque string.
|
|
1796
|
+
# @param [Hash] opts the optional parameters
|
|
1797
|
+
# @option opts [Integer] :count How many entries at most to answer with, in the operations of this file that return a list; an operation that answers with a single object is not affected by it.
|
|
1798
|
+
# @option opts [Integer] :start_index How many entries of such a list to skip before answering, used together with `count` to walk through it page by page.
|
|
1799
|
+
# @return [FileShareWrapper]
|
|
1800
|
+
def get_file_primary_external_link(id, opts = {})
|
|
1801
|
+
data, _status_code, _headers = get_file_primary_external_link_with_http_info(id, opts)
|
|
1802
|
+
data
|
|
1803
|
+
end
|
|
1804
|
+
|
|
1805
|
+
# Get the file primary external link
|
|
1806
|
+
# Answers with the primary external link of a file - the one the Copy link action of a client hands out - with its address in `sharedTo.shareLink`, its rights in `access`, and its expiration date, password flag and download restriction beside them. The link is created on the first read if the file has none, with read rights, no password and no expiry, so this operation mutates on that first call and is a plain read afterwards; repeated calls answer with the same link identifier. A PDF form in a form-filling room is answered with the link of that room, carried over to the form. The caller needs the right to share the file, which its creator, the room admin and a DocSpace admin acting as room manager have; a caller without access to the file is refused with 403 and an anonymous caller is rejected, while a link that was deliberately revoked is answered with 404 rather than being recreated. The custom links of the same file, the primary one excepted, are listed by `GET api/2.0/files/file/{id}/links`.
|
|
1807
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/get-file-primary-external-link/
|
|
1808
|
+
# @param id [Integer, String] The file the operation addresses. Take the identifier from a listing such as `GET api/2.0/files/{folderId}`: a file stored on the portal is numbered, while a file in a connected third-party account is named by an opaque string.
|
|
1809
|
+
# @param [Hash] opts the optional parameters
|
|
1810
|
+
# @option opts [Integer] :count How many entries at most to answer with, in the operations of this file that return a list; an operation that answers with a single object is not affected by it.
|
|
1811
|
+
# @option opts [Integer] :start_index How many entries of such a list to skip before answering, used together with `count` to walk through it page by page.
|
|
1812
|
+
# @return [Array<(FileShareWrapper, Integer, Hash)>] FileShareWrapper data, response status code and response headers
|
|
1813
|
+
def get_file_primary_external_link_with_http_info(id, opts = {})
|
|
1814
|
+
if @api_client.config.debugging
|
|
1815
|
+
@api_client.config.logger.debug 'Calling API: Files::FilesApi.get_file_primary_external_link ...'
|
|
1816
|
+
end
|
|
1817
|
+
# verify the required parameter 'id' is set
|
|
1818
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
1819
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling Files::FilesApi.get_file_primary_external_link"
|
|
1820
|
+
end
|
|
1821
|
+
if @api_client.config.client_side_validation && !opts[:'count'].nil? && opts[:'count'] > 100
|
|
1822
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]" when calling Files::FilesApi.get_file_primary_external_link, must be smaller than or equal to 100.'
|
|
1823
|
+
end
|
|
1824
|
+
|
|
1825
|
+
if @api_client.config.client_side_validation && !opts[:'count'].nil? && opts[:'count'] < 1
|
|
1826
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]" when calling Files::FilesApi.get_file_primary_external_link, must be greater than or equal to 1.'
|
|
1827
|
+
end
|
|
1828
|
+
|
|
1829
|
+
# resource path
|
|
1830
|
+
local_var_path = '/api/2.0/files/file/{id}/link'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
1831
|
+
|
|
1832
|
+
# query parameters
|
|
1833
|
+
query_params = opts[:query_params] || {}
|
|
1834
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
|
1835
|
+
query_params[:'startIndex'] = opts[:'start_index'] if !opts[:'start_index'].nil?
|
|
1836
|
+
|
|
1837
|
+
# header parameters
|
|
1838
|
+
header_params = opts[:header_params] || {}
|
|
1839
|
+
# HTTP header 'Accept' (if needed)
|
|
1840
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1841
|
+
|
|
1842
|
+
# form parameters
|
|
1843
|
+
form_params = opts[:form_params] || {}
|
|
1844
|
+
|
|
1845
|
+
# http body (model)
|
|
1846
|
+
post_body = opts[:debug_body]
|
|
1847
|
+
|
|
1848
|
+
# return_type
|
|
1849
|
+
return_type = opts[:debug_return_type] || 'FileShareWrapper'
|
|
1850
|
+
|
|
1851
|
+
# auth_names
|
|
1852
|
+
auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2', 'ApiKeyBearer', 'asc_auth_key', 'Bearer', 'OpenId']
|
|
1853
|
+
|
|
1854
|
+
new_options = opts.merge(
|
|
1855
|
+
:operation => :"Files::FilesApi.get_file_primary_external_link",
|
|
1856
|
+
:header_params => header_params,
|
|
1857
|
+
:query_params => query_params,
|
|
1858
|
+
:form_params => form_params,
|
|
1859
|
+
:body => post_body,
|
|
1860
|
+
:auth_names => auth_names,
|
|
1861
|
+
:return_type => return_type
|
|
1862
|
+
)
|
|
1863
|
+
|
|
1864
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1865
|
+
if @api_client.config.debugging
|
|
1866
|
+
@api_client.config.logger.debug "API called: Files::FilesApi#get_file_primary_external_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1867
|
+
end
|
|
1868
|
+
return data, status_code, headers
|
|
1869
|
+
end
|
|
1870
|
+
|
|
1871
|
+
# Get file versions
|
|
1872
|
+
# Returns every stored version of a file, newest first, each of them shaped like the file itself - the version and the revision group it belongs to, the size, the comment saved with it, the addresses for viewing it, and the thumbnail and lock state. Unlike the editing revisions of `GET api/2.0/files/file/{fileId}/edit/history`, this list also holds the autosave revisions an editing session writes, so it is the fuller of the two, and it is the shape a client already knows how to render. The caller needs the right to read the history of the file, which is a stricter rule than reading the file: in a room only its managers and content creators may read the history, and in a personal section editing access is enough, so a member with read access to somebody else's file, and even a DocSpace admin in that position, are refused, as is an anonymous caller. The operation is read-only. To restore one of the versions use `POST api/2.0/files/file/{fileId}/restoreversion`, and to close or reopen a revision group `PUT api/2.0/files/file/{fileId}/history`.
|
|
1873
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/get-file-version-info/
|
|
1874
|
+
# @param file_id [Integer, String] The file the operation addresses. Take the identifier from a listing such as `GET api/2.0/files/{folderId}`: a file stored on the portal is numbered, while a file in a connected third-party account is named by an opaque string.
|
|
1875
|
+
# @param [Hash] opts the optional parameters
|
|
1876
|
+
# @return [FileArrayWrapper, ThirdPartyFileArrayWrapper]
|
|
1877
|
+
def get_file_version_info(file_id, opts = {})
|
|
1878
|
+
data, _status_code, _headers = get_file_version_info_with_http_info(file_id, opts)
|
|
1879
|
+
data
|
|
1880
|
+
end
|
|
1881
|
+
|
|
1882
|
+
# Get file versions
|
|
1883
|
+
# Returns every stored version of a file, newest first, each of them shaped like the file itself - the version and the revision group it belongs to, the size, the comment saved with it, the addresses for viewing it, and the thumbnail and lock state. Unlike the editing revisions of `GET api/2.0/files/file/{fileId}/edit/history`, this list also holds the autosave revisions an editing session writes, so it is the fuller of the two, and it is the shape a client already knows how to render. The caller needs the right to read the history of the file, which is a stricter rule than reading the file: in a room only its managers and content creators may read the history, and in a personal section editing access is enough, so a member with read access to somebody else's file, and even a DocSpace admin in that position, are refused, as is an anonymous caller. The operation is read-only. To restore one of the versions use `POST api/2.0/files/file/{fileId}/restoreversion`, and to close or reopen a revision group `PUT api/2.0/files/file/{fileId}/history`.
|
|
1884
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/get-file-version-info/
|
|
1885
|
+
# @param file_id [Integer, String] The file the operation addresses. Take the identifier from a listing such as `GET api/2.0/files/{folderId}`: a file stored on the portal is numbered, while a file in a connected third-party account is named by an opaque string.
|
|
1886
|
+
# @param [Hash] opts the optional parameters
|
|
1887
|
+
# @return [Array<(FileArrayWrapper, ThirdPartyFileArrayWrapper, Integer, Hash)>] FileArrayWrapper, ThirdPartyFileArrayWrapper data, response status code and response headers
|
|
1888
|
+
def get_file_version_info_with_http_info(file_id, opts = {})
|
|
1889
|
+
if @api_client.config.debugging
|
|
1890
|
+
@api_client.config.logger.debug 'Calling API: Files::FilesApi.get_file_version_info ...'
|
|
1891
|
+
end
|
|
1892
|
+
# verify the required parameter 'file_id' is set
|
|
1893
|
+
if @api_client.config.client_side_validation && file_id.nil?
|
|
1894
|
+
fail ArgumentError, "Missing the required parameter 'file_id' when calling Files::FilesApi.get_file_version_info"
|
|
1895
|
+
end
|
|
1896
|
+
# resource path
|
|
1897
|
+
local_var_path = '/api/2.0/files/file/{fileId}/history'.sub('{' + 'fileId' + '}', CGI.escape(file_id.to_s))
|
|
1898
|
+
|
|
1899
|
+
# query parameters
|
|
1900
|
+
query_params = opts[:query_params] || {}
|
|
1901
|
+
|
|
1902
|
+
# header parameters
|
|
1903
|
+
header_params = opts[:header_params] || {}
|
|
1904
|
+
# HTTP header 'Accept' (if needed)
|
|
1905
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1906
|
+
|
|
1907
|
+
# form parameters
|
|
1908
|
+
form_params = opts[:form_params] || {}
|
|
1909
|
+
|
|
1910
|
+
# http body (model)
|
|
1911
|
+
post_body = opts[:debug_body]
|
|
1912
|
+
|
|
1913
|
+
# return_type
|
|
1914
|
+
return_type = opts[:debug_return_type] || (file_id.is_a?(String) ? 'ThirdPartyFileArrayWrapper' : 'FileArrayWrapper')
|
|
1915
|
+
|
|
1916
|
+
# auth_names
|
|
1917
|
+
auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2', 'ApiKeyBearer', 'asc_auth_key', 'Bearer', 'OpenId']
|
|
1918
|
+
|
|
1919
|
+
new_options = opts.merge(
|
|
1920
|
+
:operation => :"Files::FilesApi.get_file_version_info",
|
|
1921
|
+
:header_params => header_params,
|
|
1922
|
+
:query_params => query_params,
|
|
1923
|
+
:form_params => form_params,
|
|
1924
|
+
:body => post_body,
|
|
1925
|
+
:auth_names => auth_names,
|
|
1926
|
+
:return_type => return_type
|
|
1927
|
+
)
|
|
1928
|
+
|
|
1929
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1930
|
+
if @api_client.config.debugging
|
|
1931
|
+
@api_client.config.logger.debug "API called: Files::FilesApi#get_file_version_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1932
|
+
end
|
|
1933
|
+
return data, status_code, headers
|
|
1934
|
+
end
|
|
1935
|
+
|
|
1936
|
+
# Get form-filling result
|
|
1937
|
+
# Answers with the outcome of one completed form-filling session: the filled copy of the form, the original form it was made from, the number this submission was given inside the room, the identifier of the room and the account that started the filling. `isRoomMember` says whether the caller is a member of that room, which a client uses to decide whether the room can be offered for opening. The session is named by `fillingSessionId`, the value the document service reports when the filling ends; the portal remembers it only for a while after that, so a session that was never completed, one already forgotten and a value of the wrong shape are all answered as not found, while omitting the parameter is rejected as an invalid request. The operation is read-only and needs no sign-in: it is meant for the caller that has just finished filling the form through an external link, and the session identifier is the only secret involved. The filled copy itself is an ordinary file - read it with `GET api/2.0/files/file/{fileId}`.
|
|
1938
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/get-fill-result/
|
|
1939
|
+
# @param [Hash] opts the optional parameters
|
|
1940
|
+
# @option opts [String] :filling_session_id The identifier of the finished filling session, the value the document service reports when the filling ends. The portal remembers it only for a while afterwards, so an older session is answered as not found.
|
|
1941
|
+
# @return [FillingFormResultWrapper]
|
|
1942
|
+
def get_fill_result(opts = {})
|
|
1943
|
+
data, _status_code, _headers = get_fill_result_with_http_info(opts)
|
|
1944
|
+
data
|
|
1945
|
+
end
|
|
1946
|
+
|
|
1947
|
+
# Get form-filling result
|
|
1948
|
+
# Answers with the outcome of one completed form-filling session: the filled copy of the form, the original form it was made from, the number this submission was given inside the room, the identifier of the room and the account that started the filling. `isRoomMember` says whether the caller is a member of that room, which a client uses to decide whether the room can be offered for opening. The session is named by `fillingSessionId`, the value the document service reports when the filling ends; the portal remembers it only for a while after that, so a session that was never completed, one already forgotten and a value of the wrong shape are all answered as not found, while omitting the parameter is rejected as an invalid request. The operation is read-only and needs no sign-in: it is meant for the caller that has just finished filling the form through an external link, and the session identifier is the only secret involved. The filled copy itself is an ordinary file - read it with `GET api/2.0/files/file/{fileId}`.
|
|
1949
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/get-fill-result/
|
|
1950
|
+
# @param [Hash] opts the optional parameters
|
|
1951
|
+
# @option opts [String] :filling_session_id The identifier of the finished filling session, the value the document service reports when the filling ends. The portal remembers it only for a while afterwards, so an older session is answered as not found.
|
|
1952
|
+
# @return [Array<(FillingFormResultWrapper, Integer, Hash)>] FillingFormResultWrapper data, response status code and response headers
|
|
1953
|
+
def get_fill_result_with_http_info(opts = {})
|
|
1954
|
+
if @api_client.config.debugging
|
|
1955
|
+
@api_client.config.logger.debug 'Calling API: Files::FilesApi.get_fill_result ...'
|
|
1956
|
+
end
|
|
1957
|
+
# resource path
|
|
1958
|
+
local_var_path = '/api/2.0/files/file/fillresult'
|
|
1959
|
+
|
|
1960
|
+
# query parameters
|
|
1961
|
+
query_params = opts[:query_params] || {}
|
|
1962
|
+
query_params[:'fillingSessionId'] = opts[:'filling_session_id'] if !opts[:'filling_session_id'].nil?
|
|
1963
|
+
|
|
1964
|
+
# header parameters
|
|
1965
|
+
header_params = opts[:header_params] || {}
|
|
1966
|
+
# HTTP header 'Accept' (if needed)
|
|
1967
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1968
|
+
|
|
1969
|
+
# form parameters
|
|
1970
|
+
form_params = opts[:form_params] || {}
|
|
1971
|
+
|
|
1972
|
+
# http body (model)
|
|
1973
|
+
post_body = opts[:debug_body]
|
|
1974
|
+
|
|
1975
|
+
# return_type
|
|
1976
|
+
return_type = opts[:debug_return_type] || 'FillingFormResultWrapper'
|
|
1977
|
+
|
|
1978
|
+
# auth_names
|
|
1979
|
+
auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2', 'ApiKeyBearer', 'asc_auth_key', 'Bearer', 'OpenId']
|
|
1980
|
+
|
|
1981
|
+
new_options = opts.merge(
|
|
1982
|
+
:operation => :"Files::FilesApi.get_fill_result",
|
|
1983
|
+
:header_params => header_params,
|
|
1984
|
+
:query_params => query_params,
|
|
1985
|
+
:form_params => form_params,
|
|
1986
|
+
:body => post_body,
|
|
1987
|
+
:auth_names => auth_names,
|
|
1988
|
+
:return_type => return_type
|
|
1989
|
+
)
|
|
1990
|
+
|
|
1991
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1992
|
+
if @api_client.config.debugging
|
|
1993
|
+
@api_client.config.logger.debug "API called: Files::FilesApi#get_fill_result\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1994
|
+
end
|
|
1995
|
+
return data, status_code, headers
|
|
1996
|
+
end
|
|
1997
|
+
|
|
1998
|
+
# Get form submission results
|
|
1999
|
+
# Returns everything that has been submitted against one PDF form: `metadata` describes the fields of the form, in the order they are laid out, and `submissions` carries one record per completed copy, each of them holding the values that were entered. It is the data behind the results table a client shows for a form, and the same data the spreadsheet report of `POST api/2.0/files/file/{fileId}/xlsx` is built from. Only the submissions of the version that is currently being filled are reported. The form has to be a PDF form whose filling has been started and which is still the original form of its room; a form that was never started, a copy of a form and a form whose room has been moved away are all refused. Read access to the form is enough, so every member of the room can read the results, while a caller without access to it is refused with 403. The operation is read-only. The list of roles and whose turn it is comes from `GET api/2.0/files/file/{fileId}/formroles` instead.
|
|
2000
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/get-form-submissions/
|
|
2001
|
+
# @param file_id [Integer] The file the operation addresses. Take the identifier from a listing such as `GET api/2.0/files/{folderId}`: a file stored on the portal is numbered, while a file in a connected third-party account is named by an opaque string.
|
|
2002
|
+
# @param [Hash] opts the optional parameters
|
|
2003
|
+
# @return [FormSubmissionsWrapper]
|
|
2004
|
+
def get_form_submissions(file_id, opts = {})
|
|
2005
|
+
data, _status_code, _headers = get_form_submissions_with_http_info(file_id, opts)
|
|
2006
|
+
data
|
|
2007
|
+
end
|
|
2008
|
+
|
|
2009
|
+
# Get form submission results
|
|
2010
|
+
# Returns everything that has been submitted against one PDF form: `metadata` describes the fields of the form, in the order they are laid out, and `submissions` carries one record per completed copy, each of them holding the values that were entered. It is the data behind the results table a client shows for a form, and the same data the spreadsheet report of `POST api/2.0/files/file/{fileId}/xlsx` is built from. Only the submissions of the version that is currently being filled are reported. The form has to be a PDF form whose filling has been started and which is still the original form of its room; a form that was never started, a copy of a form and a form whose room has been moved away are all refused. Read access to the form is enough, so every member of the room can read the results, while a caller without access to it is refused with 403. The operation is read-only. The list of roles and whose turn it is comes from `GET api/2.0/files/file/{fileId}/formroles` instead.
|
|
2011
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/get-form-submissions/
|
|
2012
|
+
# @param file_id [Integer] The file the operation addresses. Take the identifier from a listing such as `GET api/2.0/files/{folderId}`: a file stored on the portal is numbered, while a file in a connected third-party account is named by an opaque string.
|
|
2013
|
+
# @param [Hash] opts the optional parameters
|
|
2014
|
+
# @return [Array<(FormSubmissionsWrapper, Integer, Hash)>] FormSubmissionsWrapper data, response status code and response headers
|
|
2015
|
+
def get_form_submissions_with_http_info(file_id, opts = {})
|
|
2016
|
+
if @api_client.config.debugging
|
|
2017
|
+
@api_client.config.logger.debug 'Calling API: Files::FilesApi.get_form_submissions ...'
|
|
2018
|
+
end
|
|
2019
|
+
# verify the required parameter 'file_id' is set
|
|
2020
|
+
if @api_client.config.client_side_validation && file_id.nil?
|
|
2021
|
+
fail ArgumentError, "Missing the required parameter 'file_id' when calling Files::FilesApi.get_form_submissions"
|
|
2022
|
+
end
|
|
2023
|
+
# resource path
|
|
2024
|
+
local_var_path = '/api/2.0/files/file/{fileId}/submissions'.sub('{' + 'fileId' + '}', CGI.escape(file_id.to_s))
|
|
2025
|
+
|
|
2026
|
+
# query parameters
|
|
2027
|
+
query_params = opts[:query_params] || {}
|
|
2028
|
+
|
|
2029
|
+
# header parameters
|
|
2030
|
+
header_params = opts[:header_params] || {}
|
|
2031
|
+
# HTTP header 'Accept' (if needed)
|
|
2032
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2033
|
+
|
|
2034
|
+
# form parameters
|
|
2035
|
+
form_params = opts[:form_params] || {}
|
|
2036
|
+
|
|
2037
|
+
# http body (model)
|
|
2038
|
+
post_body = opts[:debug_body]
|
|
2039
|
+
|
|
2040
|
+
# return_type
|
|
2041
|
+
return_type = opts[:debug_return_type] || 'FormSubmissionsWrapper'
|
|
2042
|
+
|
|
2043
|
+
# auth_names
|
|
2044
|
+
auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2', 'ApiKeyBearer', 'asc_auth_key', 'Bearer', 'OpenId']
|
|
2045
|
+
|
|
2046
|
+
new_options = opts.merge(
|
|
2047
|
+
:operation => :"Files::FilesApi.get_form_submissions",
|
|
2048
|
+
:header_params => header_params,
|
|
2049
|
+
:query_params => query_params,
|
|
2050
|
+
:form_params => form_params,
|
|
2051
|
+
:body => post_body,
|
|
2052
|
+
:auth_names => auth_names,
|
|
2053
|
+
:return_type => return_type
|
|
2054
|
+
)
|
|
2055
|
+
|
|
2056
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2057
|
+
if @api_client.config.debugging
|
|
2058
|
+
@api_client.config.logger.debug "API called: Files::FilesApi#get_form_submissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2059
|
+
end
|
|
2060
|
+
return data, status_code, headers
|
|
2061
|
+
end
|
|
2062
|
+
|
|
2063
|
+
# Get a signed download address
|
|
2064
|
+
# Returns a direct download address for the current content of the file together with the signature token that the document service validates, which is what the portal hands over when the editors have to fetch the document themselves. The address points at the portal's file stream endpoint and is rewritten to the host the document service can reach, so on a deployment where the editors sit behind a private address it is not the address a browser should follow. The answer also carries the extension of the stored document, leading dot included. The caller needs read access to the file, and an unknown file id is reported as missing. The call only reads, and each call mints a fresh address and token rather than reusing the previous one, so the value is worth requesting again once a token has expired. For a link meant for a person, a plain address with no token to put behind a download button, use `GET api/2.0/files/file/{fileId}/presigneduri` instead.
|
|
2065
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/get-presigned-file-uri/
|
|
2066
|
+
# @param file_id [Integer, String] The file the operation addresses. Take the identifier from a listing such as `GET api/2.0/files/{folderId}`: a file stored on the portal is numbered, while a file in a connected third-party account is named by an opaque string.
|
|
2067
|
+
# @param [Hash] opts the optional parameters
|
|
2068
|
+
# @return [FileLinkWrapper]
|
|
2069
|
+
def get_presigned_file_uri(file_id, opts = {})
|
|
2070
|
+
data, _status_code, _headers = get_presigned_file_uri_with_http_info(file_id, opts)
|
|
2071
|
+
data
|
|
2072
|
+
end
|
|
2073
|
+
|
|
2074
|
+
# Get a signed download address
|
|
2075
|
+
# Returns a direct download address for the current content of the file together with the signature token that the document service validates, which is what the portal hands over when the editors have to fetch the document themselves. The address points at the portal's file stream endpoint and is rewritten to the host the document service can reach, so on a deployment where the editors sit behind a private address it is not the address a browser should follow. The answer also carries the extension of the stored document, leading dot included. The caller needs read access to the file, and an unknown file id is reported as missing. The call only reads, and each call mints a fresh address and token rather than reusing the previous one, so the value is worth requesting again once a token has expired. For a link meant for a person, a plain address with no token to put behind a download button, use `GET api/2.0/files/file/{fileId}/presigneduri` instead.
|
|
2076
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/get-presigned-file-uri/
|
|
2077
|
+
# @param file_id [Integer, String] The file the operation addresses. Take the identifier from a listing such as `GET api/2.0/files/{folderId}`: a file stored on the portal is numbered, while a file in a connected third-party account is named by an opaque string.
|
|
2078
|
+
# @param [Hash] opts the optional parameters
|
|
2079
|
+
# @return [Array<(FileLinkWrapper, Integer, Hash)>] FileLinkWrapper data, response status code and response headers
|
|
2080
|
+
def get_presigned_file_uri_with_http_info(file_id, opts = {})
|
|
2081
|
+
if @api_client.config.debugging
|
|
2082
|
+
@api_client.config.logger.debug 'Calling API: Files::FilesApi.get_presigned_file_uri ...'
|
|
2083
|
+
end
|
|
2084
|
+
# verify the required parameter 'file_id' is set
|
|
2085
|
+
if @api_client.config.client_side_validation && file_id.nil?
|
|
2086
|
+
fail ArgumentError, "Missing the required parameter 'file_id' when calling Files::FilesApi.get_presigned_file_uri"
|
|
2087
|
+
end
|
|
2088
|
+
# resource path
|
|
2089
|
+
local_var_path = '/api/2.0/files/file/{fileId}/presigned'.sub('{' + 'fileId' + '}', CGI.escape(file_id.to_s))
|
|
2090
|
+
|
|
2091
|
+
# query parameters
|
|
2092
|
+
query_params = opts[:query_params] || {}
|
|
2093
|
+
|
|
2094
|
+
# header parameters
|
|
2095
|
+
header_params = opts[:header_params] || {}
|
|
2096
|
+
# HTTP header 'Accept' (if needed)
|
|
2097
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2098
|
+
|
|
2099
|
+
# form parameters
|
|
2100
|
+
form_params = opts[:form_params] || {}
|
|
2101
|
+
|
|
2102
|
+
# http body (model)
|
|
2103
|
+
post_body = opts[:debug_body]
|
|
2104
|
+
|
|
2105
|
+
# return_type
|
|
2106
|
+
return_type = opts[:debug_return_type] || 'FileLinkWrapper'
|
|
2107
|
+
|
|
2108
|
+
# auth_names
|
|
2109
|
+
auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2', 'ApiKeyBearer', 'asc_auth_key', 'Bearer', 'OpenId']
|
|
2110
|
+
|
|
2111
|
+
new_options = opts.merge(
|
|
2112
|
+
:operation => :"Files::FilesApi.get_presigned_file_uri",
|
|
2113
|
+
:header_params => header_params,
|
|
2114
|
+
:query_params => query_params,
|
|
2115
|
+
:form_params => form_params,
|
|
2116
|
+
:body => post_body,
|
|
2117
|
+
:auth_names => auth_names,
|
|
2118
|
+
:return_type => return_type
|
|
2119
|
+
)
|
|
2120
|
+
|
|
2121
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2122
|
+
if @api_client.config.debugging
|
|
2123
|
+
@api_client.config.logger.debug "API called: Files::FilesApi#get_presigned_file_uri\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2124
|
+
end
|
|
2125
|
+
return data, status_code, headers
|
|
2126
|
+
end
|
|
2127
|
+
|
|
2128
|
+
# Get file download link
|
|
2129
|
+
# Builds a download address for the current version of a file and answers with it as a plain string. The address points at the portal's own file handler and carries the file identifier, the version it was built for and a time-limited authentication key, so it can be handed to a downloader that cannot sign in to the portal itself; it stops working once that key has expired, and it keeps naming the version that was current when it was built rather than following later edits. The caller needs read access to the file: a member of the room it lies in gets an address, a caller without access to the room is refused, an unknown identifier is answered as not found and an anonymous caller is rejected. The operation is read-only and safe to repeat, though every call mints a new key. Nothing is downloaded here - follow the address to fetch the bytes. For the variant the document service signs, which comes back as an object with the file type and a token, use `GET api/2.0/files/file/{fileId}/presigned`.
|
|
2130
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/get-presigned-uri/
|
|
2131
|
+
# @param file_id [Integer, String] The file the operation addresses. Take the identifier from a listing such as `GET api/2.0/files/{folderId}`: a file stored on the portal is numbered, while a file in a connected third-party account is named by an opaque string.
|
|
2132
|
+
# @param [Hash] opts the optional parameters
|
|
2133
|
+
# @return [StringWrapper]
|
|
2134
|
+
def get_presigned_uri(file_id, opts = {})
|
|
2135
|
+
data, _status_code, _headers = get_presigned_uri_with_http_info(file_id, opts)
|
|
2136
|
+
data
|
|
2137
|
+
end
|
|
2138
|
+
|
|
2139
|
+
# Get file download link
|
|
2140
|
+
# Builds a download address for the current version of a file and answers with it as a plain string. The address points at the portal's own file handler and carries the file identifier, the version it was built for and a time-limited authentication key, so it can be handed to a downloader that cannot sign in to the portal itself; it stops working once that key has expired, and it keeps naming the version that was current when it was built rather than following later edits. The caller needs read access to the file: a member of the room it lies in gets an address, a caller without access to the room is refused, an unknown identifier is answered as not found and an anonymous caller is rejected. The operation is read-only and safe to repeat, though every call mints a new key. Nothing is downloaded here - follow the address to fetch the bytes. For the variant the document service signs, which comes back as an object with the file type and a token, use `GET api/2.0/files/file/{fileId}/presigned`.
|
|
2141
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/get-presigned-uri/
|
|
2142
|
+
# @param file_id [Integer, String] The file the operation addresses. Take the identifier from a listing such as `GET api/2.0/files/{folderId}`: a file stored on the portal is numbered, while a file in a connected third-party account is named by an opaque string.
|
|
2143
|
+
# @param [Hash] opts the optional parameters
|
|
2144
|
+
# @return [Array<(StringWrapper, Integer, Hash)>] StringWrapper data, response status code and response headers
|
|
2145
|
+
def get_presigned_uri_with_http_info(file_id, opts = {})
|
|
2146
|
+
if @api_client.config.debugging
|
|
2147
|
+
@api_client.config.logger.debug 'Calling API: Files::FilesApi.get_presigned_uri ...'
|
|
2148
|
+
end
|
|
2149
|
+
# verify the required parameter 'file_id' is set
|
|
2150
|
+
if @api_client.config.client_side_validation && file_id.nil?
|
|
2151
|
+
fail ArgumentError, "Missing the required parameter 'file_id' when calling Files::FilesApi.get_presigned_uri"
|
|
2152
|
+
end
|
|
2153
|
+
# resource path
|
|
2154
|
+
local_var_path = '/api/2.0/files/file/{fileId}/presigneduri'.sub('{' + 'fileId' + '}', CGI.escape(file_id.to_s))
|
|
2155
|
+
|
|
2156
|
+
# query parameters
|
|
2157
|
+
query_params = opts[:query_params] || {}
|
|
2158
|
+
|
|
2159
|
+
# header parameters
|
|
2160
|
+
header_params = opts[:header_params] || {}
|
|
2161
|
+
# HTTP header 'Accept' (if needed)
|
|
2162
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2163
|
+
|
|
2164
|
+
# form parameters
|
|
2165
|
+
form_params = opts[:form_params] || {}
|
|
2166
|
+
|
|
2167
|
+
# http body (model)
|
|
2168
|
+
post_body = opts[:debug_body]
|
|
2169
|
+
|
|
2170
|
+
# return_type
|
|
2171
|
+
return_type = opts[:debug_return_type] || 'StringWrapper'
|
|
2172
|
+
|
|
2173
|
+
# auth_names
|
|
2174
|
+
auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2', 'ApiKeyBearer', 'asc_auth_key', 'Bearer', 'OpenId']
|
|
2175
|
+
|
|
2176
|
+
new_options = opts.merge(
|
|
2177
|
+
:operation => :"Files::FilesApi.get_presigned_uri",
|
|
2178
|
+
:header_params => header_params,
|
|
2179
|
+
:query_params => query_params,
|
|
2180
|
+
:form_params => form_params,
|
|
2181
|
+
:body => post_body,
|
|
2182
|
+
:auth_names => auth_names,
|
|
2183
|
+
:return_type => return_type
|
|
2184
|
+
)
|
|
2185
|
+
|
|
2186
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2187
|
+
if @api_client.config.debugging
|
|
2188
|
+
@api_client.config.logger.debug "API called: Files::FilesApi#get_presigned_uri\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2189
|
+
end
|
|
2190
|
+
return data, status_code, headers
|
|
2191
|
+
end
|
|
2192
|
+
|
|
2193
|
+
# Get users for document protection
|
|
2194
|
+
# Lists the users the file is shared with, which is what a client offers when the author protects a document and picks who may still edit it. The list is built from the whole access list of the file: every entry that is not an explicit denial, with groups expanded into their members, the caller themselves and deleted accounts left out, ordered by display name. Access inherited from the room counts, so a member who never received a share on the file itself is listed too. A file kept in the legacy project storage always answers with an empty list rather than with its team. The call only reads. A guest is refused, an anonymous caller is answered with nothing, and a file id that resolves to nothing is refused as well instead of being reported as missing. For the readers to offer as mentions inside the editor use `GET api/2.0/files/file/{fileId}/sharedusers`.
|
|
2195
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/get-protected-file-users/
|
|
2196
|
+
# @param file_id [Integer, String] The file the operation addresses. Take the identifier from a listing such as `GET api/2.0/files/{folderId}`: a file stored on the portal is numbered, while a file in a connected third-party account is named by an opaque string.
|
|
2197
|
+
# @param [Hash] opts the optional parameters
|
|
2198
|
+
# @return [MentionArrayWrapper]
|
|
2199
|
+
def get_protected_file_users(file_id, opts = {})
|
|
2200
|
+
data, _status_code, _headers = get_protected_file_users_with_http_info(file_id, opts)
|
|
2201
|
+
data
|
|
2202
|
+
end
|
|
2203
|
+
|
|
2204
|
+
# Get users for document protection
|
|
2205
|
+
# Lists the users the file is shared with, which is what a client offers when the author protects a document and picks who may still edit it. The list is built from the whole access list of the file: every entry that is not an explicit denial, with groups expanded into their members, the caller themselves and deleted accounts left out, ordered by display name. Access inherited from the room counts, so a member who never received a share on the file itself is listed too. A file kept in the legacy project storage always answers with an empty list rather than with its team. The call only reads. A guest is refused, an anonymous caller is answered with nothing, and a file id that resolves to nothing is refused as well instead of being reported as missing. For the readers to offer as mentions inside the editor use `GET api/2.0/files/file/{fileId}/sharedusers`.
|
|
2206
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/get-protected-file-users/
|
|
2207
|
+
# @param file_id [Integer, String] The file the operation addresses. Take the identifier from a listing such as `GET api/2.0/files/{folderId}`: a file stored on the portal is numbered, while a file in a connected third-party account is named by an opaque string.
|
|
2208
|
+
# @param [Hash] opts the optional parameters
|
|
2209
|
+
# @return [Array<(MentionArrayWrapper, Integer, Hash)>] MentionArrayWrapper data, response status code and response headers
|
|
2210
|
+
def get_protected_file_users_with_http_info(file_id, opts = {})
|
|
2211
|
+
if @api_client.config.debugging
|
|
2212
|
+
@api_client.config.logger.debug 'Calling API: Files::FilesApi.get_protected_file_users ...'
|
|
2213
|
+
end
|
|
2214
|
+
# verify the required parameter 'file_id' is set
|
|
2215
|
+
if @api_client.config.client_side_validation && file_id.nil?
|
|
2216
|
+
fail ArgumentError, "Missing the required parameter 'file_id' when calling Files::FilesApi.get_protected_file_users"
|
|
2217
|
+
end
|
|
2218
|
+
# resource path
|
|
2219
|
+
local_var_path = '/api/2.0/files/file/{fileId}/protectusers'.sub('{' + 'fileId' + '}', CGI.escape(file_id.to_s))
|
|
2220
|
+
|
|
2221
|
+
# query parameters
|
|
2222
|
+
query_params = opts[:query_params] || {}
|
|
2223
|
+
|
|
2224
|
+
# header parameters
|
|
2225
|
+
header_params = opts[:header_params] || {}
|
|
2226
|
+
# HTTP header 'Accept' (if needed)
|
|
2227
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2228
|
+
|
|
2229
|
+
# form parameters
|
|
2230
|
+
form_params = opts[:form_params] || {}
|
|
2231
|
+
|
|
2232
|
+
# http body (model)
|
|
2233
|
+
post_body = opts[:debug_body]
|
|
2234
|
+
|
|
2235
|
+
# return_type
|
|
2236
|
+
return_type = opts[:debug_return_type] || 'MentionArrayWrapper'
|
|
2237
|
+
|
|
2238
|
+
# auth_names
|
|
2239
|
+
auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2', 'ApiKeyBearer', 'asc_auth_key', 'Bearer', 'OpenId']
|
|
2240
|
+
|
|
2241
|
+
new_options = opts.merge(
|
|
2242
|
+
:operation => :"Files::FilesApi.get_protected_file_users",
|
|
2243
|
+
:header_params => header_params,
|
|
2244
|
+
:query_params => query_params,
|
|
2245
|
+
:form_params => form_params,
|
|
2246
|
+
:body => post_body,
|
|
2247
|
+
:auth_names => auth_names,
|
|
2248
|
+
:return_type => return_type
|
|
2249
|
+
)
|
|
2250
|
+
|
|
2251
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2252
|
+
if @api_client.config.debugging
|
|
2253
|
+
@api_client.config.logger.debug "API called: Files::FilesApi#get_protected_file_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2254
|
+
end
|
|
2255
|
+
return data, status_code, headers
|
|
2256
|
+
end
|
|
2257
|
+
|
|
2258
|
+
# Resolve a spreadsheet reference
|
|
2259
|
+
# Resolves a reference that a formula in one spreadsheet makes to another document, and answers with the descriptor the document service needs in order to read it: the title, the download address, the file type, the document key of the co-editing session, the web editor link and the signature token. Three ways of naming the target are tried in order, and the first that resolves wins: `fileKey` as a file id inside the portal named by `instanceId`, then `path` looked up among the files sitting next to `sourceFileId`, then `link`, short links included, from which the file id is read out. A link that points outside this portal is not resolved at all and comes back unchanged as the address to follow. The caller needs read access to the source file and to its folder, otherwise the call is refused. The call only reads. A reference that resolves to nothing is still answered with 200, with the error text filled in and the rest of the descriptor empty, so read the error before using any other field.
|
|
2260
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/get-reference-data/
|
|
2261
|
+
# @param [Hash] opts the optional parameters
|
|
2262
|
+
# @option opts [GetReferenceDataDto] :get_reference_data_dto
|
|
2263
|
+
# @return [FileReferenceWrapper]
|
|
2264
|
+
def get_reference_data(opts = {})
|
|
2265
|
+
data, _status_code, _headers = get_reference_data_with_http_info(opts)
|
|
2266
|
+
data
|
|
2267
|
+
end
|
|
2268
|
+
|
|
2269
|
+
# Resolve a spreadsheet reference
|
|
2270
|
+
# Resolves a reference that a formula in one spreadsheet makes to another document, and answers with the descriptor the document service needs in order to read it: the title, the download address, the file type, the document key of the co-editing session, the web editor link and the signature token. Three ways of naming the target are tried in order, and the first that resolves wins: `fileKey` as a file id inside the portal named by `instanceId`, then `path` looked up among the files sitting next to `sourceFileId`, then `link`, short links included, from which the file id is read out. A link that points outside this portal is not resolved at all and comes back unchanged as the address to follow. The caller needs read access to the source file and to its folder, otherwise the call is refused. The call only reads. A reference that resolves to nothing is still answered with 200, with the error text filled in and the rest of the descriptor empty, so read the error before using any other field.
|
|
2271
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/get-reference-data/
|
|
2272
|
+
# @param [Hash] opts the optional parameters
|
|
2273
|
+
# @option opts [GetReferenceDataDto] :get_reference_data_dto
|
|
2274
|
+
# @return [Array<(FileReferenceWrapper, Integer, Hash)>] FileReferenceWrapper data, response status code and response headers
|
|
2275
|
+
def get_reference_data_with_http_info(opts = {})
|
|
2276
|
+
if @api_client.config.debugging
|
|
2277
|
+
@api_client.config.logger.debug 'Calling API: Files::FilesApi.get_reference_data ...'
|
|
2278
|
+
end
|
|
2279
|
+
# resource path
|
|
2280
|
+
local_var_path = '/api/2.0/files/file/referencedata'
|
|
2281
|
+
|
|
2282
|
+
# query parameters
|
|
2283
|
+
query_params = opts[:query_params] || {}
|
|
2284
|
+
|
|
2285
|
+
# header parameters
|
|
2286
|
+
header_params = opts[:header_params] || {}
|
|
2287
|
+
# HTTP header 'Accept' (if needed)
|
|
2288
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2289
|
+
# HTTP header 'Content-Type'
|
|
2290
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2291
|
+
if !content_type.nil?
|
|
2292
|
+
header_params['Content-Type'] = content_type
|
|
2293
|
+
end
|
|
2294
|
+
|
|
2295
|
+
# form parameters
|
|
2296
|
+
form_params = opts[:form_params] || {}
|
|
2297
|
+
|
|
2298
|
+
# http body (model)
|
|
2299
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'get_reference_data_dto'])
|
|
2300
|
+
|
|
2301
|
+
# return_type
|
|
2302
|
+
return_type = opts[:debug_return_type] || 'FileReferenceWrapper'
|
|
2303
|
+
|
|
2304
|
+
# auth_names
|
|
2305
|
+
auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2', 'ApiKeyBearer', 'asc_auth_key', 'Bearer', 'OpenId']
|
|
2306
|
+
|
|
2307
|
+
new_options = opts.merge(
|
|
2308
|
+
:operation => :"Files::FilesApi.get_reference_data",
|
|
2309
|
+
:header_params => header_params,
|
|
2310
|
+
:query_params => query_params,
|
|
2311
|
+
:form_params => form_params,
|
|
2312
|
+
:body => post_body,
|
|
2313
|
+
:auth_names => auth_names,
|
|
2314
|
+
:return_type => return_type
|
|
2315
|
+
)
|
|
2316
|
+
|
|
2317
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2318
|
+
if @api_client.config.debugging
|
|
2319
|
+
@api_client.config.logger.debug "API called: Files::FilesApi#get_reference_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2320
|
+
end
|
|
2321
|
+
return data, status_code, headers
|
|
2322
|
+
end
|
|
2323
|
+
|
|
2324
|
+
# Get form report generation status
|
|
2325
|
+
# Reports how far the spreadsheet of submitted form answers has got, the one queued by `POST api/2.0/files/file/{fileId}/xlsx`. A run is kept per portal, per caller and per form, so this reports the caller's own run and not one started by another member of the room; address it with the id of the original form rather than with the id of the produced spreadsheet. The answer carries the completion flag, the progress percentage, the error text when the run failed, and the id, name and address of the produced file once it is there. Nothing at all comes back when no run is on record for this caller and form, which is the normal answer before the first run and not an error. The call only reads and is meant to be polled until completion is reported. Any authenticated caller may ask; whether the report may be built is decided when the run is queued, not here.
|
|
2326
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/get-xlsx/
|
|
2327
|
+
# @param file_id [Integer] The file the operation addresses. Take the identifier from a listing such as `GET api/2.0/files/{folderId}`: a file stored on the portal is numbered, while a file in a connected third-party account is named by an opaque string.
|
|
2328
|
+
# @param [Hash] opts the optional parameters
|
|
2329
|
+
# @return [DocumentBuilderTaskWrapper]
|
|
2330
|
+
def get_xlsx(file_id, opts = {})
|
|
2331
|
+
data, _status_code, _headers = get_xlsx_with_http_info(file_id, opts)
|
|
2332
|
+
data
|
|
2333
|
+
end
|
|
2334
|
+
|
|
2335
|
+
# Get form report generation status
|
|
2336
|
+
# Reports how far the spreadsheet of submitted form answers has got, the one queued by `POST api/2.0/files/file/{fileId}/xlsx`. A run is kept per portal, per caller and per form, so this reports the caller's own run and not one started by another member of the room; address it with the id of the original form rather than with the id of the produced spreadsheet. The answer carries the completion flag, the progress percentage, the error text when the run failed, and the id, name and address of the produced file once it is there. Nothing at all comes back when no run is on record for this caller and form, which is the normal answer before the first run and not an error. The call only reads and is meant to be polled until completion is reported. Any authenticated caller may ask; whether the report may be built is decided when the run is queued, not here.
|
|
2337
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/get-xlsx/
|
|
2338
|
+
# @param file_id [Integer] The file the operation addresses. Take the identifier from a listing such as `GET api/2.0/files/{folderId}`: a file stored on the portal is numbered, while a file in a connected third-party account is named by an opaque string.
|
|
2339
|
+
# @param [Hash] opts the optional parameters
|
|
2340
|
+
# @return [Array<(DocumentBuilderTaskWrapper, Integer, Hash)>] DocumentBuilderTaskWrapper data, response status code and response headers
|
|
2341
|
+
def get_xlsx_with_http_info(file_id, opts = {})
|
|
2342
|
+
if @api_client.config.debugging
|
|
2343
|
+
@api_client.config.logger.debug 'Calling API: Files::FilesApi.get_xlsx ...'
|
|
2344
|
+
end
|
|
2345
|
+
# verify the required parameter 'file_id' is set
|
|
2346
|
+
if @api_client.config.client_side_validation && file_id.nil?
|
|
2347
|
+
fail ArgumentError, "Missing the required parameter 'file_id' when calling Files::FilesApi.get_xlsx"
|
|
2348
|
+
end
|
|
2349
|
+
# resource path
|
|
2350
|
+
local_var_path = '/api/2.0/files/file/{fileId}/xlsx'.sub('{' + 'fileId' + '}', CGI.escape(file_id.to_s))
|
|
2351
|
+
|
|
2352
|
+
# query parameters
|
|
2353
|
+
query_params = opts[:query_params] || {}
|
|
2354
|
+
|
|
2355
|
+
# header parameters
|
|
2356
|
+
header_params = opts[:header_params] || {}
|
|
2357
|
+
# HTTP header 'Accept' (if needed)
|
|
2358
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2359
|
+
|
|
2360
|
+
# form parameters
|
|
2361
|
+
form_params = opts[:form_params] || {}
|
|
2362
|
+
|
|
2363
|
+
# http body (model)
|
|
2364
|
+
post_body = opts[:debug_body]
|
|
2365
|
+
|
|
2366
|
+
# return_type
|
|
2367
|
+
return_type = opts[:debug_return_type] || 'DocumentBuilderTaskWrapper'
|
|
2368
|
+
|
|
2369
|
+
# auth_names
|
|
2370
|
+
auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2', 'ApiKeyBearer', 'asc_auth_key', 'Bearer', 'OpenId']
|
|
2371
|
+
|
|
2372
|
+
new_options = opts.merge(
|
|
2373
|
+
:operation => :"Files::FilesApi.get_xlsx",
|
|
2374
|
+
:header_params => header_params,
|
|
2375
|
+
:query_params => query_params,
|
|
2376
|
+
:form_params => form_params,
|
|
2377
|
+
:body => post_body,
|
|
2378
|
+
:auth_names => auth_names,
|
|
2379
|
+
:return_type => return_type
|
|
2380
|
+
)
|
|
2381
|
+
|
|
2382
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2383
|
+
if @api_client.config.debugging
|
|
2384
|
+
@api_client.config.logger.debug "API called: Files::FilesApi#get_xlsx\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2385
|
+
end
|
|
2386
|
+
return data, status_code, headers
|
|
2387
|
+
end
|
|
2388
|
+
|
|
2389
|
+
# Check the PDF file
|
|
2390
|
+
# Tells whether a file is a PDF form that can be filled out in the portal, and answers with a single boolean. The check is by content, not by extension: the beginning of the file is read and the answer is `true` only when it carries the marker the editors write into the forms they produce, so an ordinary PDF, and a PDF form made in other software, both answer `false`. A file whose name is not a PDF at all answers `false` without being read. Use it before offering the form-filling operations on a file, because a document that answers `false` cannot be started for filling. The caller needs read access to the file, and read access is enough - a member of the room with read-only rights gets the answer; a caller without access to the room is refused and an anonymous caller is rejected. The operation is read-only and idempotent. It says nothing about the state of the filling - for that read `GET api/2.0/files/file/{fileId}/formroles`.
|
|
2391
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/is-form-pdf/
|
|
2392
|
+
# @param file_id [Integer, String] The file the operation addresses. Take the identifier from a listing such as `GET api/2.0/files/{folderId}`: a file stored on the portal is numbered, while a file in a connected third-party account is named by an opaque string.
|
|
2393
|
+
# @param [Hash] opts the optional parameters
|
|
2394
|
+
# @return [BooleanWrapper]
|
|
2395
|
+
def is_form_pdf(file_id, opts = {})
|
|
2396
|
+
data, _status_code, _headers = is_form_pdf_with_http_info(file_id, opts)
|
|
2397
|
+
data
|
|
2398
|
+
end
|
|
2399
|
+
|
|
2400
|
+
# Check the PDF file
|
|
2401
|
+
# Tells whether a file is a PDF form that can be filled out in the portal, and answers with a single boolean. The check is by content, not by extension: the beginning of the file is read and the answer is `true` only when it carries the marker the editors write into the forms they produce, so an ordinary PDF, and a PDF form made in other software, both answer `false`. A file whose name is not a PDF at all answers `false` without being read. Use it before offering the form-filling operations on a file, because a document that answers `false` cannot be started for filling. The caller needs read access to the file, and read access is enough - a member of the room with read-only rights gets the answer; a caller without access to the room is refused and an anonymous caller is rejected. The operation is read-only and idempotent. It says nothing about the state of the filling - for that read `GET api/2.0/files/file/{fileId}/formroles`.
|
|
2402
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/is-form-pdf/
|
|
2403
|
+
# @param file_id [Integer, String] The file the operation addresses. Take the identifier from a listing such as `GET api/2.0/files/{folderId}`: a file stored on the portal is numbered, while a file in a connected third-party account is named by an opaque string.
|
|
2404
|
+
# @param [Hash] opts the optional parameters
|
|
2405
|
+
# @return [Array<(BooleanWrapper, Integer, Hash)>] BooleanWrapper data, response status code and response headers
|
|
2406
|
+
def is_form_pdf_with_http_info(file_id, opts = {})
|
|
2407
|
+
if @api_client.config.debugging
|
|
2408
|
+
@api_client.config.logger.debug 'Calling API: Files::FilesApi.is_form_pdf ...'
|
|
2409
|
+
end
|
|
2410
|
+
# verify the required parameter 'file_id' is set
|
|
2411
|
+
if @api_client.config.client_side_validation && file_id.nil?
|
|
2412
|
+
fail ArgumentError, "Missing the required parameter 'file_id' when calling Files::FilesApi.is_form_pdf"
|
|
2413
|
+
end
|
|
2414
|
+
# resource path
|
|
2415
|
+
local_var_path = '/api/2.0/files/file/{fileId}/isformpdf'.sub('{' + 'fileId' + '}', CGI.escape(file_id.to_s))
|
|
2416
|
+
|
|
2417
|
+
# query parameters
|
|
2418
|
+
query_params = opts[:query_params] || {}
|
|
2419
|
+
|
|
2420
|
+
# header parameters
|
|
2421
|
+
header_params = opts[:header_params] || {}
|
|
2422
|
+
# HTTP header 'Accept' (if needed)
|
|
2423
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2424
|
+
|
|
2425
|
+
# form parameters
|
|
2426
|
+
form_params = opts[:form_params] || {}
|
|
2427
|
+
|
|
2428
|
+
# http body (model)
|
|
2429
|
+
post_body = opts[:debug_body]
|
|
2430
|
+
|
|
2431
|
+
# return_type
|
|
2432
|
+
return_type = opts[:debug_return_type] || 'BooleanWrapper'
|
|
2433
|
+
|
|
2434
|
+
# auth_names
|
|
2435
|
+
auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2', 'ApiKeyBearer', 'asc_auth_key', 'Bearer', 'OpenId']
|
|
2436
|
+
|
|
2437
|
+
new_options = opts.merge(
|
|
2438
|
+
:operation => :"Files::FilesApi.is_form_pdf",
|
|
2439
|
+
:header_params => header_params,
|
|
2440
|
+
:query_params => query_params,
|
|
2441
|
+
:form_params => form_params,
|
|
2442
|
+
:body => post_body,
|
|
2443
|
+
:auth_names => auth_names,
|
|
2444
|
+
:return_type => return_type
|
|
2445
|
+
)
|
|
2446
|
+
|
|
2447
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2448
|
+
if @api_client.config.debugging
|
|
2449
|
+
@api_client.config.logger.debug "API called: Files::FilesApi#is_form_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2450
|
+
end
|
|
2451
|
+
return data, status_code, headers
|
|
2452
|
+
end
|
|
2453
|
+
|
|
2454
|
+
# Lock a file
|
|
2455
|
+
# Locks a file so that nobody else can change it, or releases that lock, and answers with the file as it now stands. With `lockFile=true` the lock is put on the file and everybody else who is editing it at that moment is dropped out of the session, the caller excepted; the lock then blocks editing, renaming and deleting for everybody but the account that set it and the room admins. With `lockFile=false` the lock is removed and a note about the unlocking is appended to the current version comment, unless the file lives in a connected third-party storage. Locking a file that is already locked, or unlocking one that is not, changes nothing and still answers with the file, so the call is idempotent in effect while remaining a mutating one. The caller needs the right to lock the file, which the room admin, a DocSpace admin acting as room manager and a member with content-creator rights have; a member without access to the room and a guest are refused, and so is a file in Trash. A lock set by somebody else can only be released by a room manager.
|
|
2456
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/lock-file/
|
|
2457
|
+
# @param file_id [Integer, String] The file to lock or unlock.
|
|
2458
|
+
# @param lock_file_request [LockFileRequest] The lock state to reach.
|
|
2459
|
+
# @param [Hash] opts the optional parameters
|
|
2460
|
+
# @return [FileWrapper, ThirdPartyFileWrapper]
|
|
2461
|
+
def lock_file(file_id, lock_file_request, opts = {})
|
|
2462
|
+
data, _status_code, _headers = lock_file_with_http_info(file_id, lock_file_request, opts)
|
|
2463
|
+
data
|
|
2464
|
+
end
|
|
2465
|
+
|
|
2466
|
+
# Lock a file
|
|
2467
|
+
# Locks a file so that nobody else can change it, or releases that lock, and answers with the file as it now stands. With `lockFile=true` the lock is put on the file and everybody else who is editing it at that moment is dropped out of the session, the caller excepted; the lock then blocks editing, renaming and deleting for everybody but the account that set it and the room admins. With `lockFile=false` the lock is removed and a note about the unlocking is appended to the current version comment, unless the file lives in a connected third-party storage. Locking a file that is already locked, or unlocking one that is not, changes nothing and still answers with the file, so the call is idempotent in effect while remaining a mutating one. The caller needs the right to lock the file, which the room admin, a DocSpace admin acting as room manager and a member with content-creator rights have; a member without access to the room and a guest are refused, and so is a file in Trash. A lock set by somebody else can only be released by a room manager.
|
|
2468
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/lock-file/
|
|
2469
|
+
# @param file_id [Integer, String] The file to lock or unlock.
|
|
2470
|
+
# @param lock_file_request [LockFileRequest] The lock state to reach.
|
|
2471
|
+
# @param [Hash] opts the optional parameters
|
|
2472
|
+
# @return [Array<(FileWrapper, ThirdPartyFileWrapper, Integer, Hash)>] FileWrapper, ThirdPartyFileWrapper data, response status code and response headers
|
|
2473
|
+
def lock_file_with_http_info(file_id, lock_file_request, opts = {})
|
|
2474
|
+
if @api_client.config.debugging
|
|
2475
|
+
@api_client.config.logger.debug 'Calling API: Files::FilesApi.lock_file ...'
|
|
2476
|
+
end
|
|
2477
|
+
# verify the required parameter 'file_id' is set
|
|
2478
|
+
if @api_client.config.client_side_validation && file_id.nil?
|
|
2479
|
+
fail ArgumentError, "Missing the required parameter 'file_id' when calling Files::FilesApi.lock_file"
|
|
2480
|
+
end
|
|
2481
|
+
# verify the required parameter 'lock_file_request' is set
|
|
2482
|
+
if @api_client.config.client_side_validation && lock_file_request.nil?
|
|
2483
|
+
fail ArgumentError, "Missing the required parameter 'lock_file_request' when calling Files::FilesApi.lock_file"
|
|
2484
|
+
end
|
|
2485
|
+
# resource path
|
|
2486
|
+
local_var_path = '/api/2.0/files/file/{fileId}/lock'.sub('{' + 'fileId' + '}', CGI.escape(file_id.to_s))
|
|
2487
|
+
|
|
2488
|
+
# query parameters
|
|
2489
|
+
query_params = opts[:query_params] || {}
|
|
2490
|
+
|
|
2491
|
+
# header parameters
|
|
2492
|
+
header_params = opts[:header_params] || {}
|
|
2493
|
+
# HTTP header 'Accept' (if needed)
|
|
2494
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2495
|
+
# HTTP header 'Content-Type'
|
|
2496
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2497
|
+
if !content_type.nil?
|
|
2498
|
+
header_params['Content-Type'] = content_type
|
|
2499
|
+
end
|
|
2500
|
+
|
|
2501
|
+
# form parameters
|
|
2502
|
+
form_params = opts[:form_params] || {}
|
|
2503
|
+
|
|
2504
|
+
# http body (model)
|
|
2505
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(lock_file_request)
|
|
2506
|
+
|
|
2507
|
+
# return_type
|
|
2508
|
+
return_type = opts[:debug_return_type] || (file_id.is_a?(String) ? 'ThirdPartyFileWrapper' : 'FileWrapper')
|
|
2509
|
+
|
|
2510
|
+
# auth_names
|
|
2511
|
+
auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2', 'ApiKeyBearer', 'asc_auth_key', 'Bearer', 'OpenId']
|
|
2512
|
+
|
|
2513
|
+
new_options = opts.merge(
|
|
2514
|
+
:operation => :"Files::FilesApi.lock_file",
|
|
2515
|
+
:header_params => header_params,
|
|
2516
|
+
:query_params => query_params,
|
|
2517
|
+
:form_params => form_params,
|
|
2518
|
+
:body => post_body,
|
|
2519
|
+
:auth_names => auth_names,
|
|
2520
|
+
:return_type => return_type
|
|
2521
|
+
)
|
|
2522
|
+
|
|
2523
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
2524
|
+
if @api_client.config.debugging
|
|
2525
|
+
@api_client.config.logger.debug "API called: Files::FilesApi#lock_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2526
|
+
end
|
|
2527
|
+
return data, status_code, headers
|
|
2528
|
+
end
|
|
2529
|
+
|
|
2530
|
+
# Perform form filling action
|
|
2531
|
+
# Drives the filling of a PDF form through its states, the action deciding which way. Action 2 starts the filling: in a form-filling room the form is opened for filling, the members whose rights are limited to filling forms are let in, and a form that has been changed since it was last started has the drafts of its previous round dropped. Action 0 stops it, which in a virtual data room records who interrupted it and at which role and notifies the people who held the other roles, and in a form-filling room closes the form for filling. Action 1 resumes a filling that was stopped, clearing that record. Action 3 puts the form back into editing, closing it for filling and remembering the version it was edited from. The file has to be a PDF form lying in a room. Starting needs the right to start the filling, which the room admin and a member with content-creator rights have, while stopping a filling that somebody else started belongs to room managers alone, so a content creator is refused with 403 there. The call is mutating; the state that resulted is read with `GET api/2.0/files/file/{fileId}/formroles`.
|
|
2532
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/manage-form-filling/
|
|
2533
|
+
# @param file_id [String] The form the action applies to. Send the same value as the `formId` of the request body, which is the one the handler reads.
|
|
2534
|
+
# @param [Hash] opts the optional parameters
|
|
2535
|
+
# @option opts [ManageFormFillingDto] :manage_form_filling_dto
|
|
2536
|
+
# @return [nil]
|
|
2537
|
+
def manage_form_filling(file_id, opts = {})
|
|
2538
|
+
manage_form_filling_with_http_info(file_id, opts)
|
|
2539
|
+
nil
|
|
2540
|
+
end
|
|
2541
|
+
|
|
2542
|
+
# Perform form filling action
|
|
2543
|
+
# Drives the filling of a PDF form through its states, the action deciding which way. Action 2 starts the filling: in a form-filling room the form is opened for filling, the members whose rights are limited to filling forms are let in, and a form that has been changed since it was last started has the drafts of its previous round dropped. Action 0 stops it, which in a virtual data room records who interrupted it and at which role and notifies the people who held the other roles, and in a form-filling room closes the form for filling. Action 1 resumes a filling that was stopped, clearing that record. Action 3 puts the form back into editing, closing it for filling and remembering the version it was edited from. The file has to be a PDF form lying in a room. Starting needs the right to start the filling, which the room admin and a member with content-creator rights have, while stopping a filling that somebody else started belongs to room managers alone, so a content creator is refused with 403 there. The call is mutating; the state that resulted is read with `GET api/2.0/files/file/{fileId}/formroles`.
|
|
2544
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/manage-form-filling/
|
|
2545
|
+
# @param file_id [String] The form the action applies to. Send the same value as the `formId` of the request body, which is the one the handler reads.
|
|
2546
|
+
# @param [Hash] opts the optional parameters
|
|
2547
|
+
# @option opts [ManageFormFillingDto] :manage_form_filling_dto
|
|
2548
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
2549
|
+
def manage_form_filling_with_http_info(file_id, opts = {})
|
|
2550
|
+
if @api_client.config.debugging
|
|
2551
|
+
@api_client.config.logger.debug 'Calling API: Files::FilesApi.manage_form_filling ...'
|
|
2552
|
+
end
|
|
2553
|
+
# verify the required parameter 'file_id' is set
|
|
2554
|
+
if @api_client.config.client_side_validation && file_id.nil?
|
|
2555
|
+
fail ArgumentError, "Missing the required parameter 'file_id' when calling Files::FilesApi.manage_form_filling"
|
|
2556
|
+
end
|
|
2557
|
+
# resource path
|
|
2558
|
+
local_var_path = '/api/2.0/files/file/{fileId}/manageformfilling'.sub('{' + 'fileId' + '}', CGI.escape(file_id.to_s))
|
|
2559
|
+
|
|
2560
|
+
# query parameters
|
|
2561
|
+
query_params = opts[:query_params] || {}
|
|
2562
|
+
|
|
2563
|
+
# header parameters
|
|
2564
|
+
header_params = opts[:header_params] || {}
|
|
2565
|
+
# HTTP header 'Accept' (if needed)
|
|
2566
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2567
|
+
# HTTP header 'Content-Type'
|
|
2568
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2569
|
+
if !content_type.nil?
|
|
2570
|
+
header_params['Content-Type'] = content_type
|
|
2571
|
+
end
|
|
2572
|
+
|
|
2573
|
+
# form parameters
|
|
2574
|
+
form_params = opts[:form_params] || {}
|
|
2575
|
+
|
|
2576
|
+
# http body (model)
|
|
2577
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'manage_form_filling_dto'])
|
|
2578
|
+
|
|
2579
|
+
# return_type
|
|
2580
|
+
return_type = opts[:debug_return_type]
|
|
2581
|
+
|
|
2582
|
+
# auth_names
|
|
2583
|
+
auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2', 'ApiKeyBearer', 'asc_auth_key', 'Bearer', 'OpenId']
|
|
2584
|
+
|
|
2585
|
+
new_options = opts.merge(
|
|
2586
|
+
:operation => :"Files::FilesApi.manage_form_filling",
|
|
2587
|
+
:header_params => header_params,
|
|
2588
|
+
:query_params => query_params,
|
|
2589
|
+
:form_params => form_params,
|
|
2590
|
+
:body => post_body,
|
|
2591
|
+
:auth_names => auth_names,
|
|
2592
|
+
:return_type => return_type
|
|
2593
|
+
)
|
|
2594
|
+
|
|
2595
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
2596
|
+
if @api_client.config.debugging
|
|
2597
|
+
@api_client.config.logger.debug "API called: Files::FilesApi#manage_form_filling\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2598
|
+
end
|
|
2599
|
+
return data, status_code, headers
|
|
2600
|
+
end
|
|
2601
|
+
|
|
2602
|
+
# Get the editor configuration
|
|
2603
|
+
# Builds everything an editor client needs to open the file: the document descriptor with its download address, title, type and document key, the editor configuration with the mode, the caller's permissions, the user and the customization, the callback the editors report back to, and the signature token the document service validates. `version` opens one entry of the file history and requires access to that history; left out, the current revision is opened. `view`, `edit` and `fill` say what the client intends to do, and `editorType` picks the desktop, mobile or embedded layout. For a PDF form the room decides the outcome and may overrule the request: a form-filling room, a virtual data room, a public room and a user folder each produce their own mode, and a form opened from the templates folder is read-only and, outside the mobile layout, framed as embedded. When the portal is over its storage quota the configuration comes back read-only with the exceeded scope named. In a private room the caller's encryption keys are added to the editor configuration. Payment is not required and an anonymous caller opens through an external link.
|
|
2604
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/open-edit-file/
|
|
2605
|
+
# @param file_id [Integer, String] The file the editor configuration is built for. Take the id from a folder listing such as `GET api/2.0/files/{folderId}`.
|
|
2606
|
+
# @param [Hash] opts the optional parameters
|
|
2607
|
+
# @option opts [Integer] :version Which entry of the file history to open, numbered the way the file versions are. Left out, the current revision is opened; naming a version requires access to the history of the file.
|
|
2608
|
+
# @option opts [Boolean] :view Asks for a read-only configuration. Left off, the configuration is built for editing as far as the caller's rights and the room the file lies in allow.
|
|
2609
|
+
# @option opts [EditorType] :editor_type Which editor layout the configuration is built for: the full desktop interface, the reduced mobile one, or the embedded viewer meant to be framed inside another page.
|
|
2610
|
+
# @option opts [Boolean] :edit Asks for editing rather than viewing. On a form in a form-filling room this also records that the form is being edited; the room may still turn the request into viewing or into filling.
|
|
2611
|
+
# @option opts [Boolean] :fill Asks for a PDF form to open for filling out rather than for editing. It has no effect on a file that is not a form.
|
|
2612
|
+
# @return [ConfigurationWrapper, ThirdPartyConfigurationWrapper]
|
|
2613
|
+
def open_edit_file(file_id, opts = {})
|
|
2614
|
+
data, _status_code, _headers = open_edit_file_with_http_info(file_id, opts)
|
|
2615
|
+
data
|
|
2616
|
+
end
|
|
2617
|
+
|
|
2618
|
+
# Get the editor configuration
|
|
2619
|
+
# Builds everything an editor client needs to open the file: the document descriptor with its download address, title, type and document key, the editor configuration with the mode, the caller's permissions, the user and the customization, the callback the editors report back to, and the signature token the document service validates. `version` opens one entry of the file history and requires access to that history; left out, the current revision is opened. `view`, `edit` and `fill` say what the client intends to do, and `editorType` picks the desktop, mobile or embedded layout. For a PDF form the room decides the outcome and may overrule the request: a form-filling room, a virtual data room, a public room and a user folder each produce their own mode, and a form opened from the templates folder is read-only and, outside the mobile layout, framed as embedded. When the portal is over its storage quota the configuration comes back read-only with the exceeded scope named. In a private room the caller's encryption keys are added to the editor configuration. Payment is not required and an anonymous caller opens through an external link.
|
|
2620
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/open-edit-file/
|
|
2621
|
+
# @param file_id [Integer, String] The file the editor configuration is built for. Take the id from a folder listing such as `GET api/2.0/files/{folderId}`.
|
|
2622
|
+
# @param [Hash] opts the optional parameters
|
|
2623
|
+
# @option opts [Integer] :version Which entry of the file history to open, numbered the way the file versions are. Left out, the current revision is opened; naming a version requires access to the history of the file.
|
|
2624
|
+
# @option opts [Boolean] :view Asks for a read-only configuration. Left off, the configuration is built for editing as far as the caller's rights and the room the file lies in allow.
|
|
2625
|
+
# @option opts [EditorType] :editor_type Which editor layout the configuration is built for: the full desktop interface, the reduced mobile one, or the embedded viewer meant to be framed inside another page.
|
|
2626
|
+
# @option opts [Boolean] :edit Asks for editing rather than viewing. On a form in a form-filling room this also records that the form is being edited; the room may still turn the request into viewing or into filling.
|
|
2627
|
+
# @option opts [Boolean] :fill Asks for a PDF form to open for filling out rather than for editing. It has no effect on a file that is not a form.
|
|
2628
|
+
# @return [Array<(ConfigurationWrapper, ThirdPartyConfigurationWrapper, Integer, Hash)>] ConfigurationWrapper, ThirdPartyConfigurationWrapper data, response status code and response headers
|
|
2629
|
+
def open_edit_file_with_http_info(file_id, opts = {})
|
|
2630
|
+
if @api_client.config.debugging
|
|
2631
|
+
@api_client.config.logger.debug 'Calling API: Files::FilesApi.open_edit_file ...'
|
|
2632
|
+
end
|
|
2633
|
+
# verify the required parameter 'file_id' is set
|
|
2634
|
+
if @api_client.config.client_side_validation && file_id.nil?
|
|
2635
|
+
fail ArgumentError, "Missing the required parameter 'file_id' when calling Files::FilesApi.open_edit_file"
|
|
2636
|
+
end
|
|
2637
|
+
# resource path
|
|
2638
|
+
local_var_path = '/api/2.0/files/file/{fileId}/openedit'.sub('{' + 'fileId' + '}', CGI.escape(file_id.to_s))
|
|
2639
|
+
|
|
2640
|
+
# query parameters
|
|
2641
|
+
query_params = opts[:query_params] || {}
|
|
2642
|
+
query_params[:'version'] = opts[:'version'] if !opts[:'version'].nil?
|
|
2643
|
+
query_params[:'view'] = opts[:'view'] if !opts[:'view'].nil?
|
|
2644
|
+
query_params[:'editorType'] = opts[:'editor_type'] if !opts[:'editor_type'].nil?
|
|
2645
|
+
query_params[:'edit'] = opts[:'edit'] if !opts[:'edit'].nil?
|
|
2646
|
+
query_params[:'fill'] = opts[:'fill'] if !opts[:'fill'].nil?
|
|
2647
|
+
|
|
2648
|
+
# header parameters
|
|
2649
|
+
header_params = opts[:header_params] || {}
|
|
2650
|
+
# HTTP header 'Accept' (if needed)
|
|
2651
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2652
|
+
|
|
2653
|
+
# form parameters
|
|
2654
|
+
form_params = opts[:form_params] || {}
|
|
2655
|
+
|
|
2656
|
+
# http body (model)
|
|
2657
|
+
post_body = opts[:debug_body]
|
|
2658
|
+
|
|
2659
|
+
# return_type
|
|
2660
|
+
return_type = opts[:debug_return_type] || (file_id.is_a?(String) ? 'ThirdPartyConfigurationWrapper' : 'ConfigurationWrapper')
|
|
2661
|
+
|
|
2662
|
+
# auth_names
|
|
2663
|
+
auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2', 'ApiKeyBearer', 'asc_auth_key', 'Bearer', 'OpenId']
|
|
2664
|
+
|
|
2665
|
+
new_options = opts.merge(
|
|
2666
|
+
:operation => :"Files::FilesApi.open_edit_file",
|
|
2667
|
+
:header_params => header_params,
|
|
2668
|
+
:query_params => query_params,
|
|
2669
|
+
:form_params => form_params,
|
|
2670
|
+
:body => post_body,
|
|
2671
|
+
:auth_names => auth_names,
|
|
2672
|
+
:return_type => return_type
|
|
2673
|
+
)
|
|
2674
|
+
|
|
2675
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2676
|
+
if @api_client.config.debugging
|
|
2677
|
+
@api_client.config.logger.debug "API called: Files::FilesApi#open_edit_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2678
|
+
end
|
|
2679
|
+
return data, status_code, headers
|
|
2680
|
+
end
|
|
2681
|
+
|
|
2682
|
+
# Restore a file version
|
|
2683
|
+
# Brings an earlier version of a file back and answers with the editing revisions of the file after the restore. Nothing is overwritten: the content of the chosen version is stored again as a new version on top of the history, carrying a comment that says which version it was reverted to, so the intervening versions stay readable. `url` changes the source - with it the content is fetched from that address, which is how the document service returns a document with a set of changes rolled back, and the new version records that instead. Any links that pointed at drafts of the file are dropped, and the file is marked as new for the other people who can read it. `version` has to name an existing version and is refused with 400 when it is missing or already the current one. The caller needs the right to edit the history of the file and is otherwise refused with 403, an anonymous caller included. The call is mutating and not idempotent. A locked file, one in Trash, one being edited, an encrypted one and one kept in a connected third-party storage are all refused.
|
|
2684
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/restore-file-version/
|
|
2685
|
+
# @param file_id [Integer, String] The file whose version is restored.
|
|
2686
|
+
# @param [Hash] opts the optional parameters
|
|
2687
|
+
# @option opts [Integer] :version The version to restore, as reported by `GET api/2.0/files/file/{fileId}/edit/history`. It has to name an existing version that is not the current one.
|
|
2688
|
+
# @option opts [String] :url The address the content of the new version is fetched from instead of the stored version, which is how the document service hands back a document with a set of changes rolled back; left out, the stored version is used.
|
|
2689
|
+
# @return [EditHistoryArrayWrapper]
|
|
2690
|
+
def restore_file_version(file_id, opts = {})
|
|
2691
|
+
data, _status_code, _headers = restore_file_version_with_http_info(file_id, opts)
|
|
2692
|
+
data
|
|
2693
|
+
end
|
|
2694
|
+
|
|
2695
|
+
# Restore a file version
|
|
2696
|
+
# Brings an earlier version of a file back and answers with the editing revisions of the file after the restore. Nothing is overwritten: the content of the chosen version is stored again as a new version on top of the history, carrying a comment that says which version it was reverted to, so the intervening versions stay readable. `url` changes the source - with it the content is fetched from that address, which is how the document service returns a document with a set of changes rolled back, and the new version records that instead. Any links that pointed at drafts of the file are dropped, and the file is marked as new for the other people who can read it. `version` has to name an existing version and is refused with 400 when it is missing or already the current one. The caller needs the right to edit the history of the file and is otherwise refused with 403, an anonymous caller included. The call is mutating and not idempotent. A locked file, one in Trash, one being edited, an encrypted one and one kept in a connected third-party storage are all refused.
|
|
2697
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/restore-file-version/
|
|
2698
|
+
# @param file_id [Integer, String] The file whose version is restored.
|
|
2699
|
+
# @param [Hash] opts the optional parameters
|
|
2700
|
+
# @option opts [Integer] :version The version to restore, as reported by `GET api/2.0/files/file/{fileId}/edit/history`. It has to name an existing version that is not the current one.
|
|
2701
|
+
# @option opts [String] :url The address the content of the new version is fetched from instead of the stored version, which is how the document service hands back a document with a set of changes rolled back; left out, the stored version is used.
|
|
2702
|
+
# @return [Array<(EditHistoryArrayWrapper, Integer, Hash)>] EditHistoryArrayWrapper data, response status code and response headers
|
|
2703
|
+
def restore_file_version_with_http_info(file_id, opts = {})
|
|
2704
|
+
if @api_client.config.debugging
|
|
2705
|
+
@api_client.config.logger.debug 'Calling API: Files::FilesApi.restore_file_version ...'
|
|
2706
|
+
end
|
|
2707
|
+
# verify the required parameter 'file_id' is set
|
|
2708
|
+
if @api_client.config.client_side_validation && file_id.nil?
|
|
2709
|
+
fail ArgumentError, "Missing the required parameter 'file_id' when calling Files::FilesApi.restore_file_version"
|
|
2710
|
+
end
|
|
2711
|
+
# resource path
|
|
2712
|
+
local_var_path = '/api/2.0/files/file/{fileId}/restoreversion'.sub('{' + 'fileId' + '}', CGI.escape(file_id.to_s))
|
|
2713
|
+
|
|
2714
|
+
# query parameters
|
|
2715
|
+
query_params = opts[:query_params] || {}
|
|
2716
|
+
query_params[:'version'] = opts[:'version'] if !opts[:'version'].nil?
|
|
2717
|
+
query_params[:'url'] = opts[:'url'] if !opts[:'url'].nil?
|
|
2718
|
+
|
|
2719
|
+
# header parameters
|
|
2720
|
+
header_params = opts[:header_params] || {}
|
|
2721
|
+
# HTTP header 'Accept' (if needed)
|
|
2722
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2723
|
+
|
|
2724
|
+
# form parameters
|
|
2725
|
+
form_params = opts[:form_params] || {}
|
|
2726
|
+
|
|
2727
|
+
# http body (model)
|
|
2728
|
+
post_body = opts[:debug_body]
|
|
2729
|
+
|
|
2730
|
+
# return_type
|
|
2731
|
+
return_type = opts[:debug_return_type] || 'EditHistoryArrayWrapper'
|
|
2732
|
+
|
|
2733
|
+
# auth_names
|
|
2734
|
+
auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2', 'ApiKeyBearer', 'asc_auth_key', 'Bearer', 'OpenId']
|
|
2735
|
+
|
|
2736
|
+
new_options = opts.merge(
|
|
2737
|
+
:operation => :"Files::FilesApi.restore_file_version",
|
|
2738
|
+
:header_params => header_params,
|
|
2739
|
+
:query_params => query_params,
|
|
2740
|
+
:form_params => form_params,
|
|
2741
|
+
:body => post_body,
|
|
2742
|
+
:auth_names => auth_names,
|
|
2743
|
+
:return_type => return_type
|
|
2744
|
+
)
|
|
2745
|
+
|
|
2746
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2747
|
+
if @api_client.config.debugging
|
|
2748
|
+
@api_client.config.logger.debug "API called: Files::FilesApi#restore_file_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2749
|
+
end
|
|
2750
|
+
return data, status_code, headers
|
|
2751
|
+
end
|
|
2752
|
+
|
|
2753
|
+
# Save edited file content
|
|
2754
|
+
# Replaces the content of an existing file with an edited copy and answers with the file as it now stands. The content is the `File` part of a `multipart/form-data` body, and when no such part is sent the raw request body is saved instead, so an empty body empties the file. The `DownloadUri` query parameter does not supply content here; it is only read for the extension when `FileExtension` is empty. `fileExtension` names the format of the content being sent, and when it differs from the stored format the portal converts the content, or keeps it under a renamed copy when a third-party storage cannot convert it. The caller needs edit access to the file. The call is mutating and not idempotent: an ordinary call adds a version to the file history, while `forcesave=true` records an editor autosave, which overwrites the previous autosave revision instead of adding another version and leaves a running editing session in place. It is refused with 403 when the file is locked, lies in Trash, or is open in an editing session started by somebody else, and an unknown file id is reported as missing. For content too large to post in one request use `POST api/2.0/files/file/{fileId}/edit_session`.
|
|
2755
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/save-editing-file-from-form/
|
|
2756
|
+
# @param file_id [Integer, String] The file whose content is replaced. The submitted content is written onto this file, so it has to be the file the editing session was opened on rather than a copy of it.
|
|
2757
|
+
# @param [Hash] opts the optional parameters
|
|
2758
|
+
# @option opts [String] :download_uri An address the document service saved the document at. This operation does not fetch the content from it - the content always comes from the request body - and reads it only for the extension, when no file extension is given.
|
|
2759
|
+
# @option opts [String] :file_extension The format the submitted content is in, with the leading dot, as in `.docx`. When it differs from the format the file is stored in, the portal converts the content before saving it. Left empty, the extension is read off the download address, and failing that the stored format is assumed.
|
|
2760
|
+
# @option opts [File] :file The edited content, sent as the `File` part of a `multipart/form-data` body. When the part is missing the raw request body is saved as the content instead, so an empty body empties the file.
|
|
2761
|
+
# @option opts [Boolean] :forcesave Records the write as an editor autosave: the file keeps its running editing session and the previous autosave revision is overwritten. Left off, the write closes the solo editing session, is refused while somebody else has the file open, and adds a version to the history.
|
|
2762
|
+
# @return [FileWrapper, ThirdPartyFileWrapper]
|
|
2763
|
+
def save_editing_file_from_form(file_id, opts = {})
|
|
2764
|
+
data, _status_code, _headers = save_editing_file_from_form_with_http_info(file_id, opts)
|
|
2765
|
+
data
|
|
2766
|
+
end
|
|
2767
|
+
|
|
2768
|
+
# Save edited file content
|
|
2769
|
+
# Replaces the content of an existing file with an edited copy and answers with the file as it now stands. The content is the `File` part of a `multipart/form-data` body, and when no such part is sent the raw request body is saved instead, so an empty body empties the file. The `DownloadUri` query parameter does not supply content here; it is only read for the extension when `FileExtension` is empty. `fileExtension` names the format of the content being sent, and when it differs from the stored format the portal converts the content, or keeps it under a renamed copy when a third-party storage cannot convert it. The caller needs edit access to the file. The call is mutating and not idempotent: an ordinary call adds a version to the file history, while `forcesave=true` records an editor autosave, which overwrites the previous autosave revision instead of adding another version and leaves a running editing session in place. It is refused with 403 when the file is locked, lies in Trash, or is open in an editing session started by somebody else, and an unknown file id is reported as missing. For content too large to post in one request use `POST api/2.0/files/file/{fileId}/edit_session`.
|
|
2770
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/save-editing-file-from-form/
|
|
2771
|
+
# @param file_id [Integer, String] The file whose content is replaced. The submitted content is written onto this file, so it has to be the file the editing session was opened on rather than a copy of it.
|
|
2772
|
+
# @param [Hash] opts the optional parameters
|
|
2773
|
+
# @option opts [String] :download_uri An address the document service saved the document at. This operation does not fetch the content from it - the content always comes from the request body - and reads it only for the extension, when no file extension is given.
|
|
2774
|
+
# @option opts [String] :file_extension The format the submitted content is in, with the leading dot, as in `.docx`. When it differs from the format the file is stored in, the portal converts the content before saving it. Left empty, the extension is read off the download address, and failing that the stored format is assumed.
|
|
2775
|
+
# @option opts [File] :file The edited content, sent as the `File` part of a `multipart/form-data` body. When the part is missing the raw request body is saved as the content instead, so an empty body empties the file.
|
|
2776
|
+
# @option opts [Boolean] :forcesave Records the write as an editor autosave: the file keeps its running editing session and the previous autosave revision is overwritten. Left off, the write closes the solo editing session, is refused while somebody else has the file open, and adds a version to the history.
|
|
2777
|
+
# @return [Array<(FileWrapper, ThirdPartyFileWrapper, Integer, Hash)>] FileWrapper, ThirdPartyFileWrapper data, response status code and response headers
|
|
2778
|
+
def save_editing_file_from_form_with_http_info(file_id, opts = {})
|
|
2779
|
+
if @api_client.config.debugging
|
|
2780
|
+
@api_client.config.logger.debug 'Calling API: Files::FilesApi.save_editing_file_from_form ...'
|
|
2781
|
+
end
|
|
2782
|
+
# verify the required parameter 'file_id' is set
|
|
2783
|
+
if @api_client.config.client_side_validation && file_id.nil?
|
|
2784
|
+
fail ArgumentError, "Missing the required parameter 'file_id' when calling Files::FilesApi.save_editing_file_from_form"
|
|
2785
|
+
end
|
|
2786
|
+
# resource path
|
|
2787
|
+
local_var_path = '/api/2.0/files/file/{fileId}/saveediting'.sub('{' + 'fileId' + '}', CGI.escape(file_id.to_s))
|
|
2788
|
+
|
|
2789
|
+
# query parameters
|
|
2790
|
+
query_params = opts[:query_params] || {}
|
|
2791
|
+
query_params[:'downloadUri'] = opts[:'download_uri'] if !opts[:'download_uri'].nil?
|
|
2792
|
+
|
|
2793
|
+
# header parameters
|
|
2794
|
+
header_params = opts[:header_params] || {}
|
|
2795
|
+
# HTTP header 'Accept' (if needed)
|
|
2796
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2797
|
+
# HTTP header 'Content-Type'
|
|
2798
|
+
content_type = @api_client.select_header_content_type(['multipart/form-data'])
|
|
2799
|
+
if !content_type.nil?
|
|
2800
|
+
header_params['Content-Type'] = content_type
|
|
2801
|
+
end
|
|
2802
|
+
|
|
2803
|
+
# form parameters
|
|
2804
|
+
form_params = opts[:form_params] || {}
|
|
2805
|
+
form_params['fileExtension'] = opts[:'file_extension'] if !opts[:'file_extension'].nil?
|
|
2806
|
+
form_params['file'] = opts[:'file'] if !opts[:'file'].nil?
|
|
2807
|
+
form_params['forcesave'] = opts[:'forcesave'] if !opts[:'forcesave'].nil?
|
|
2808
|
+
|
|
2809
|
+
# http body (model)
|
|
2810
|
+
post_body = opts[:debug_body]
|
|
2811
|
+
|
|
2812
|
+
# return_type
|
|
2813
|
+
return_type = opts[:debug_return_type] || (file_id.is_a?(String) ? 'ThirdPartyFileWrapper' : 'FileWrapper')
|
|
2814
|
+
|
|
2815
|
+
# auth_names
|
|
2816
|
+
auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2', 'ApiKeyBearer', 'asc_auth_key', 'Bearer', 'OpenId']
|
|
2817
|
+
|
|
2818
|
+
new_options = opts.merge(
|
|
2819
|
+
:operation => :"Files::FilesApi.save_editing_file_from_form",
|
|
2820
|
+
:header_params => header_params,
|
|
2821
|
+
:query_params => query_params,
|
|
2822
|
+
:form_params => form_params,
|
|
2823
|
+
:body => post_body,
|
|
2824
|
+
:auth_names => auth_names,
|
|
2825
|
+
:return_type => return_type
|
|
2826
|
+
)
|
|
2827
|
+
|
|
2828
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
2829
|
+
if @api_client.config.debugging
|
|
2830
|
+
@api_client.config.logger.debug "API called: Files::FilesApi#save_editing_file_from_form\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2831
|
+
end
|
|
2832
|
+
return data, status_code, headers
|
|
2833
|
+
end
|
|
2834
|
+
|
|
2835
|
+
# Save a file as PDF
|
|
2836
|
+
# Converts a file into a PDF, stores that PDF as a new file in the folder named in the body, and answers with the file that was created. The source is left untouched, so the two files then live side by side. `title` names the result without an extension - the `.pdf` extension is added to it - and an empty title reuses the name of the source with its extension replaced. The conversion is done by the document service while the request waits, so the call takes as long as the document needs and answers with the finished file rather than with a queue entry. The caller needs read access to the source file and the right to create files in the destination folder, and is otherwise refused; a source file or a destination folder that does not exist is answered with 404. The call is mutating and not idempotent: each call adds another PDF, its title made unique when one of that name is already there. The result is marked as new for the room, and for a form the portal recognises it is stored as a PDF form. To convert in place instead use `PUT api/2.0/files/file/{fileId}/checkconversion`.
|
|
2837
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/save-file-as-pdf/
|
|
2838
|
+
# @param id [Integer, String] The file to convert; it is left untouched.
|
|
2839
|
+
# @param save_as_pdf_request [SaveAsPdfRequest, ThirdPartySaveAsPdfRequest] The destination folder and the name of the PDF.
|
|
2840
|
+
# @param [Hash] opts the optional parameters
|
|
2841
|
+
# @return [FileWrapper, ThirdPartyFileWrapper]
|
|
2842
|
+
def save_file_as_pdf(id, save_as_pdf_request, opts = {})
|
|
2843
|
+
data, _status_code, _headers = save_file_as_pdf_with_http_info(id, save_as_pdf_request, opts)
|
|
2844
|
+
data
|
|
2845
|
+
end
|
|
2846
|
+
|
|
2847
|
+
# Save a file as PDF
|
|
2848
|
+
# Converts a file into a PDF, stores that PDF as a new file in the folder named in the body, and answers with the file that was created. The source is left untouched, so the two files then live side by side. `title` names the result without an extension - the `.pdf` extension is added to it - and an empty title reuses the name of the source with its extension replaced. The conversion is done by the document service while the request waits, so the call takes as long as the document needs and answers with the finished file rather than with a queue entry. The caller needs read access to the source file and the right to create files in the destination folder, and is otherwise refused; a source file or a destination folder that does not exist is answered with 404. The call is mutating and not idempotent: each call adds another PDF, its title made unique when one of that name is already there. The result is marked as new for the room, and for a form the portal recognises it is stored as a PDF form. To convert in place instead use `PUT api/2.0/files/file/{fileId}/checkconversion`.
|
|
2849
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/save-file-as-pdf/
|
|
2850
|
+
# @param id [Integer, String] The file to convert; it is left untouched.
|
|
2851
|
+
# @param save_as_pdf_request [SaveAsPdfRequest, ThirdPartySaveAsPdfRequest] The destination folder and the name of the PDF.
|
|
2852
|
+
# @param [Hash] opts the optional parameters
|
|
2853
|
+
# @return [Array<(FileWrapper, ThirdPartyFileWrapper, Integer, Hash)>] FileWrapper, ThirdPartyFileWrapper data, response status code and response headers
|
|
2854
|
+
def save_file_as_pdf_with_http_info(id, save_as_pdf_request, opts = {})
|
|
2855
|
+
if @api_client.config.debugging
|
|
2856
|
+
@api_client.config.logger.debug 'Calling API: Files::FilesApi.save_file_as_pdf ...'
|
|
2857
|
+
end
|
|
2858
|
+
# verify the required parameter 'id' is set
|
|
2859
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
2860
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling Files::FilesApi.save_file_as_pdf"
|
|
2861
|
+
end
|
|
2862
|
+
# verify the required parameter 'save_as_pdf_request' is set
|
|
2863
|
+
if @api_client.config.client_side_validation && save_as_pdf_request.nil?
|
|
2864
|
+
fail ArgumentError, "Missing the required parameter 'save_as_pdf_request' when calling Files::FilesApi.save_file_as_pdf"
|
|
2865
|
+
end
|
|
2866
|
+
# resource path
|
|
2867
|
+
local_var_path = '/api/2.0/files/file/{id}/saveaspdf'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
2868
|
+
|
|
2869
|
+
# query parameters
|
|
2870
|
+
query_params = opts[:query_params] || {}
|
|
2871
|
+
|
|
2872
|
+
# header parameters
|
|
2873
|
+
header_params = opts[:header_params] || {}
|
|
2874
|
+
# HTTP header 'Accept' (if needed)
|
|
2875
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2876
|
+
# HTTP header 'Content-Type'
|
|
2877
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2878
|
+
if !content_type.nil?
|
|
2879
|
+
header_params['Content-Type'] = content_type
|
|
2880
|
+
end
|
|
2881
|
+
|
|
2882
|
+
# form parameters
|
|
2883
|
+
form_params = opts[:form_params] || {}
|
|
2884
|
+
|
|
2885
|
+
# http body (model)
|
|
2886
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(save_as_pdf_request)
|
|
2887
|
+
|
|
2888
|
+
# return_type
|
|
2889
|
+
return_type = opts[:debug_return_type] || (id.is_a?(String) ? 'ThirdPartyFileWrapper' : 'FileWrapper')
|
|
2890
|
+
|
|
2891
|
+
# auth_names
|
|
2892
|
+
auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2', 'ApiKeyBearer', 'asc_auth_key', 'Bearer', 'OpenId']
|
|
2893
|
+
|
|
2894
|
+
new_options = opts.merge(
|
|
2895
|
+
:operation => :"Files::FilesApi.save_file_as_pdf",
|
|
2896
|
+
:header_params => header_params,
|
|
2897
|
+
:query_params => query_params,
|
|
2898
|
+
:form_params => form_params,
|
|
2899
|
+
:body => post_body,
|
|
2900
|
+
:auth_names => auth_names,
|
|
2901
|
+
:return_type => return_type
|
|
2902
|
+
)
|
|
2903
|
+
|
|
2904
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2905
|
+
if @api_client.config.debugging
|
|
2906
|
+
@api_client.config.logger.debug "API called: Files::FilesApi#save_file_as_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2907
|
+
end
|
|
2908
|
+
return data, status_code, headers
|
|
2909
|
+
end
|
|
2910
|
+
|
|
2911
|
+
# Save form role mapping
|
|
2912
|
+
# Assigns the roles of a PDF form to the people who are to fill them in, and starts the filling: the form is marked as being filled out, the account that called is recorded as the one who started it, everybody named in a role is notified, and the form becomes visible to the members whose room rights are limited to filling forms. Each role carries its name, the account that takes it and the sequence number that decides the turn, so the same sequence means the roles may be filled in parallel and different ones make a queue. Sending an empty role list resets the filling instead, dropping the assignment altogether. The whole set is replaced on every call, so the call is idempotent for a given set of roles but not additive. The file has to be a PDF form lying in a room; the caller needs the right to start the filling of that form, which the room admin and a member with content-creator rights have, and is otherwise refused with 403. Read back what was stored with `GET api/2.0/files/file/{fileId}/formroles`.
|
|
2913
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/save-form-role-mapping/
|
|
2914
|
+
# @param file_id [String] The form the role mapping belongs to. Send the same value as the `formId` of the request body, which is the one the handler reads.
|
|
2915
|
+
# @param [Hash] opts the optional parameters
|
|
2916
|
+
# @option opts [SaveFormRoleMappingDto] :save_form_role_mapping_dto
|
|
2917
|
+
# @return [nil]
|
|
2918
|
+
def save_form_role_mapping(file_id, opts = {})
|
|
2919
|
+
save_form_role_mapping_with_http_info(file_id, opts)
|
|
2920
|
+
nil
|
|
2921
|
+
end
|
|
2922
|
+
|
|
2923
|
+
# Save form role mapping
|
|
2924
|
+
# Assigns the roles of a PDF form to the people who are to fill them in, and starts the filling: the form is marked as being filled out, the account that called is recorded as the one who started it, everybody named in a role is notified, and the form becomes visible to the members whose room rights are limited to filling forms. Each role carries its name, the account that takes it and the sequence number that decides the turn, so the same sequence means the roles may be filled in parallel and different ones make a queue. Sending an empty role list resets the filling instead, dropping the assignment altogether. The whole set is replaced on every call, so the call is idempotent for a given set of roles but not additive. The file has to be a PDF form lying in a room; the caller needs the right to start the filling of that form, which the room admin and a member with content-creator rights have, and is otherwise refused with 403. Read back what was stored with `GET api/2.0/files/file/{fileId}/formroles`.
|
|
2925
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/save-form-role-mapping/
|
|
2926
|
+
# @param file_id [String] The form the role mapping belongs to. Send the same value as the `formId` of the request body, which is the one the handler reads.
|
|
2927
|
+
# @param [Hash] opts the optional parameters
|
|
2928
|
+
# @option opts [SaveFormRoleMappingDto] :save_form_role_mapping_dto
|
|
2929
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
2930
|
+
def save_form_role_mapping_with_http_info(file_id, opts = {})
|
|
2931
|
+
if @api_client.config.debugging
|
|
2932
|
+
@api_client.config.logger.debug 'Calling API: Files::FilesApi.save_form_role_mapping ...'
|
|
2933
|
+
end
|
|
2934
|
+
# verify the required parameter 'file_id' is set
|
|
2935
|
+
if @api_client.config.client_side_validation && file_id.nil?
|
|
2936
|
+
fail ArgumentError, "Missing the required parameter 'file_id' when calling Files::FilesApi.save_form_role_mapping"
|
|
2937
|
+
end
|
|
2938
|
+
# resource path
|
|
2939
|
+
local_var_path = '/api/2.0/files/file/{fileId}/formrolemapping'.sub('{' + 'fileId' + '}', CGI.escape(file_id.to_s))
|
|
2940
|
+
|
|
2941
|
+
# query parameters
|
|
2942
|
+
query_params = opts[:query_params] || {}
|
|
2943
|
+
|
|
2944
|
+
# header parameters
|
|
2945
|
+
header_params = opts[:header_params] || {}
|
|
2946
|
+
# HTTP header 'Accept' (if needed)
|
|
2947
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2948
|
+
# HTTP header 'Content-Type'
|
|
2949
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2950
|
+
if !content_type.nil?
|
|
2951
|
+
header_params['Content-Type'] = content_type
|
|
2952
|
+
end
|
|
2953
|
+
|
|
2954
|
+
# form parameters
|
|
2955
|
+
form_params = opts[:form_params] || {}
|
|
2956
|
+
|
|
2957
|
+
# http body (model)
|
|
2958
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'save_form_role_mapping_dto'])
|
|
2959
|
+
|
|
2960
|
+
# return_type
|
|
2961
|
+
return_type = opts[:debug_return_type]
|
|
2962
|
+
|
|
2963
|
+
# auth_names
|
|
2964
|
+
auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2', 'ApiKeyBearer', 'asc_auth_key', 'Bearer', 'OpenId']
|
|
2965
|
+
|
|
2966
|
+
new_options = opts.merge(
|
|
2967
|
+
:operation => :"Files::FilesApi.save_form_role_mapping",
|
|
2968
|
+
:header_params => header_params,
|
|
2969
|
+
:query_params => query_params,
|
|
2970
|
+
:form_params => form_params,
|
|
2971
|
+
:body => post_body,
|
|
2972
|
+
:auth_names => auth_names,
|
|
2973
|
+
:return_type => return_type
|
|
2974
|
+
)
|
|
2975
|
+
|
|
2976
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2977
|
+
if @api_client.config.debugging
|
|
2978
|
+
@api_client.config.logger.debug "API called: Files::FilesApi#save_form_role_mapping\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2979
|
+
end
|
|
2980
|
+
return data, status_code, headers
|
|
2981
|
+
end
|
|
2982
|
+
|
|
2983
|
+
# Set the Custom Filter editing mode
|
|
2984
|
+
# Turns the Custom Filter editing mode of a spreadsheet on or off and answers with the file as it now stands. In that mode the sorting and filtering one person applies to the sheet is visible to that person alone, so that several people can work on the same data without moving the rows under each other; with the mode off, filtering is shared again, as everywhere else. Turning it on also drops everybody else out of the running editing session, the caller excepted, because the mode has to be established before the sheet is opened. Only formats that support the mode are accepted; anything else is rejected as an invalid request. The caller needs the right to use the mode in the room, which the room admin and a DocSpace admin acting as room manager have; read-only access, a member without access to the room and an anonymous caller are refused. Once the mode has been switched on by one person, only that person, a room manager or a DocSpace admin can switch it off again. The call is mutating and, called twice with the same value, changes nothing the second time.
|
|
2985
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/set-custom-filter-tag/
|
|
2986
|
+
# @param file_id [Integer, String] The spreadsheet whose Custom Filter mode is switched.
|
|
2987
|
+
# @param custom_filter_request [CustomFilterRequest] The Custom Filter state to reach.
|
|
2988
|
+
# @param [Hash] opts the optional parameters
|
|
2989
|
+
# @return [FileWrapper, ThirdPartyFileWrapper]
|
|
2990
|
+
def set_custom_filter_tag(file_id, custom_filter_request, opts = {})
|
|
2991
|
+
data, _status_code, _headers = set_custom_filter_tag_with_http_info(file_id, custom_filter_request, opts)
|
|
2992
|
+
data
|
|
2993
|
+
end
|
|
2994
|
+
|
|
2995
|
+
# Set the Custom Filter editing mode
|
|
2996
|
+
# Turns the Custom Filter editing mode of a spreadsheet on or off and answers with the file as it now stands. In that mode the sorting and filtering one person applies to the sheet is visible to that person alone, so that several people can work on the same data without moving the rows under each other; with the mode off, filtering is shared again, as everywhere else. Turning it on also drops everybody else out of the running editing session, the caller excepted, because the mode has to be established before the sheet is opened. Only formats that support the mode are accepted; anything else is rejected as an invalid request. The caller needs the right to use the mode in the room, which the room admin and a DocSpace admin acting as room manager have; read-only access, a member without access to the room and an anonymous caller are refused. Once the mode has been switched on by one person, only that person, a room manager or a DocSpace admin can switch it off again. The call is mutating and, called twice with the same value, changes nothing the second time.
|
|
2997
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/set-custom-filter-tag/
|
|
2998
|
+
# @param file_id [Integer, String] The spreadsheet whose Custom Filter mode is switched.
|
|
2999
|
+
# @param custom_filter_request [CustomFilterRequest] The Custom Filter state to reach.
|
|
3000
|
+
# @param [Hash] opts the optional parameters
|
|
3001
|
+
# @return [Array<(FileWrapper, ThirdPartyFileWrapper, Integer, Hash)>] FileWrapper, ThirdPartyFileWrapper data, response status code and response headers
|
|
3002
|
+
def set_custom_filter_tag_with_http_info(file_id, custom_filter_request, opts = {})
|
|
3003
|
+
if @api_client.config.debugging
|
|
3004
|
+
@api_client.config.logger.debug 'Calling API: Files::FilesApi.set_custom_filter_tag ...'
|
|
3005
|
+
end
|
|
3006
|
+
# verify the required parameter 'file_id' is set
|
|
3007
|
+
if @api_client.config.client_side_validation && file_id.nil?
|
|
3008
|
+
fail ArgumentError, "Missing the required parameter 'file_id' when calling Files::FilesApi.set_custom_filter_tag"
|
|
3009
|
+
end
|
|
3010
|
+
# verify the required parameter 'custom_filter_request' is set
|
|
3011
|
+
if @api_client.config.client_side_validation && custom_filter_request.nil?
|
|
3012
|
+
fail ArgumentError, "Missing the required parameter 'custom_filter_request' when calling Files::FilesApi.set_custom_filter_tag"
|
|
3013
|
+
end
|
|
3014
|
+
# resource path
|
|
3015
|
+
local_var_path = '/api/2.0/files/file/{fileId}/customfilter'.sub('{' + 'fileId' + '}', CGI.escape(file_id.to_s))
|
|
3016
|
+
|
|
3017
|
+
# query parameters
|
|
3018
|
+
query_params = opts[:query_params] || {}
|
|
3019
|
+
|
|
3020
|
+
# header parameters
|
|
3021
|
+
header_params = opts[:header_params] || {}
|
|
3022
|
+
# HTTP header 'Accept' (if needed)
|
|
3023
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3024
|
+
# HTTP header 'Content-Type'
|
|
3025
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3026
|
+
if !content_type.nil?
|
|
3027
|
+
header_params['Content-Type'] = content_type
|
|
3028
|
+
end
|
|
3029
|
+
|
|
3030
|
+
# form parameters
|
|
3031
|
+
form_params = opts[:form_params] || {}
|
|
3032
|
+
|
|
3033
|
+
# http body (model)
|
|
3034
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(custom_filter_request)
|
|
3035
|
+
|
|
3036
|
+
# return_type
|
|
3037
|
+
return_type = opts[:debug_return_type] || (file_id.is_a?(String) ? 'ThirdPartyFileWrapper' : 'FileWrapper')
|
|
3038
|
+
|
|
3039
|
+
# auth_names
|
|
3040
|
+
auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2', 'ApiKeyBearer', 'asc_auth_key', 'Bearer', 'OpenId']
|
|
3041
|
+
|
|
3042
|
+
new_options = opts.merge(
|
|
3043
|
+
:operation => :"Files::FilesApi.set_custom_filter_tag",
|
|
3044
|
+
:header_params => header_params,
|
|
3045
|
+
:query_params => query_params,
|
|
3046
|
+
:form_params => form_params,
|
|
3047
|
+
:body => post_body,
|
|
3048
|
+
:auth_names => auth_names,
|
|
3049
|
+
:return_type => return_type
|
|
3050
|
+
)
|
|
3051
|
+
|
|
3052
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
3053
|
+
if @api_client.config.debugging
|
|
3054
|
+
@api_client.config.logger.debug "API called: Files::FilesApi#set_custom_filter_tag\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3055
|
+
end
|
|
3056
|
+
return data, status_code, headers
|
|
3057
|
+
end
|
|
3058
|
+
|
|
3059
|
+
# Set file encryption information
|
|
3060
|
+
# Issues the file keys that let the named people open one file of an end-to-end encrypted private room. Each entry of the body names the account the key is for, the public key it was encrypted with and the encrypted key itself, so the plain key never reaches the portal: the client encrypts it once per recipient with the public key that `GET api/2.0/files/file/{fileId}/publickeys` reports for them. The keys of the accounts named in the request are replaced, and the keys of everybody else are left as they are, which makes the call idempotent for a given set of recipients while remaining a mutating one; sending no entry for a person does not revoke that person's key. The file has to lie in a private room, and every account named in the request has to have read access to it. The caller needs read access to the file and the right to create content in that room, which its members with editing rights and its admins have; a caller without those rights, a file outside a private room and a file that does not exist are all refused with 403. Read the result back with `GET api/2.0/files/{fileId}/access`.
|
|
3061
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/set-encryption-info/
|
|
3062
|
+
# @param file_id [Integer, String] The file the keys are issued for; it has to lie in a private room.
|
|
3063
|
+
# @param [Hash] opts the optional parameters
|
|
3064
|
+
# @option opts [Array<AccessRequestKeyDto>] :access_request_key_dto One key per account that is to open the file. The keys of the accounts named here are replaced and the keys of everybody else are left as they are, so sending no entry for a person does not revoke that person's key.
|
|
3065
|
+
# @return [nil]
|
|
3066
|
+
def set_encryption_info(file_id, opts = {})
|
|
3067
|
+
set_encryption_info_with_http_info(file_id, opts)
|
|
3068
|
+
nil
|
|
3069
|
+
end
|
|
3070
|
+
|
|
3071
|
+
# Set file encryption information
|
|
3072
|
+
# Issues the file keys that let the named people open one file of an end-to-end encrypted private room. Each entry of the body names the account the key is for, the public key it was encrypted with and the encrypted key itself, so the plain key never reaches the portal: the client encrypts it once per recipient with the public key that `GET api/2.0/files/file/{fileId}/publickeys` reports for them. The keys of the accounts named in the request are replaced, and the keys of everybody else are left as they are, which makes the call idempotent for a given set of recipients while remaining a mutating one; sending no entry for a person does not revoke that person's key. The file has to lie in a private room, and every account named in the request has to have read access to it. The caller needs read access to the file and the right to create content in that room, which its members with editing rights and its admins have; a caller without those rights, a file outside a private room and a file that does not exist are all refused with 403. Read the result back with `GET api/2.0/files/{fileId}/access`.
|
|
3073
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/set-encryption-info/
|
|
3074
|
+
# @param file_id [Integer, String] The file the keys are issued for; it has to lie in a private room.
|
|
3075
|
+
# @param [Hash] opts the optional parameters
|
|
3076
|
+
# @option opts [Array<AccessRequestKeyDto>] :access_request_key_dto One key per account that is to open the file. The keys of the accounts named here are replaced and the keys of everybody else are left as they are, so sending no entry for a person does not revoke that person's key.
|
|
3077
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
3078
|
+
def set_encryption_info_with_http_info(file_id, opts = {})
|
|
3079
|
+
if @api_client.config.debugging
|
|
3080
|
+
@api_client.config.logger.debug 'Calling API: Files::FilesApi.set_encryption_info ...'
|
|
3081
|
+
end
|
|
3082
|
+
# verify the required parameter 'file_id' is set
|
|
3083
|
+
if @api_client.config.client_side_validation && file_id.nil?
|
|
3084
|
+
fail ArgumentError, "Missing the required parameter 'file_id' when calling Files::FilesApi.set_encryption_info"
|
|
3085
|
+
end
|
|
3086
|
+
# resource path
|
|
3087
|
+
local_var_path = '/api/2.0/files/{fileId}/access'.sub('{' + 'fileId' + '}', CGI.escape(file_id.to_s))
|
|
3088
|
+
|
|
3089
|
+
# query parameters
|
|
3090
|
+
query_params = opts[:query_params] || {}
|
|
3091
|
+
|
|
3092
|
+
# header parameters
|
|
3093
|
+
header_params = opts[:header_params] || {}
|
|
3094
|
+
# HTTP header 'Accept' (if needed)
|
|
3095
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3096
|
+
# HTTP header 'Content-Type'
|
|
3097
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3098
|
+
if !content_type.nil?
|
|
3099
|
+
header_params['Content-Type'] = content_type
|
|
3100
|
+
end
|
|
3101
|
+
|
|
3102
|
+
# form parameters
|
|
3103
|
+
form_params = opts[:form_params] || {}
|
|
3104
|
+
|
|
3105
|
+
# http body (model)
|
|
3106
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'access_request_key_dto'])
|
|
3107
|
+
|
|
3108
|
+
# return_type
|
|
3109
|
+
return_type = opts[:debug_return_type]
|
|
3110
|
+
|
|
3111
|
+
# auth_names
|
|
3112
|
+
auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2', 'ApiKeyBearer', 'asc_auth_key', 'Bearer', 'OpenId']
|
|
3113
|
+
|
|
3114
|
+
new_options = opts.merge(
|
|
3115
|
+
:operation => :"Files::FilesApi.set_encryption_info",
|
|
3116
|
+
:header_params => header_params,
|
|
3117
|
+
:query_params => query_params,
|
|
3118
|
+
:form_params => form_params,
|
|
3119
|
+
:body => post_body,
|
|
3120
|
+
:auth_names => auth_names,
|
|
3121
|
+
:return_type => return_type
|
|
3122
|
+
)
|
|
3123
|
+
|
|
3124
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
3125
|
+
if @api_client.config.debugging
|
|
3126
|
+
@api_client.config.logger.debug "API called: Files::FilesApi#set_encryption_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3127
|
+
end
|
|
3128
|
+
return data, status_code, headers
|
|
3129
|
+
end
|
|
3130
|
+
|
|
3131
|
+
# Set a file external link
|
|
3132
|
+
# Creates an external link to a file, or changes or revokes an existing one, and answers with the link as it now stands. `linkId` decides which: an identifier that is not yet in use, the empty one included, creates a link, while the identifier of an existing link rewrites it, so the whole set of parameters is applied every time and a field left out is reset rather than kept. `access` carries the rights the link grants, and `access` set to the value that denies everything revokes the link instead - the answer is then empty, and a revoked primary link is not recreated by a later read. `title` names the link for the people who manage it, `expirationDate` limits its lifetime and is refused when it lies more than a few years ahead, `password` asks visitors for a secret, `denyDownload` leaves them with viewing only, `internal` admits signed-in members alone, and `primary=true` makes it the primary link of the file. The caller needs the right to share the file and is otherwise refused, an unknown file being answered as not found. The call is mutating.
|
|
3133
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/set-file-external-link/
|
|
3134
|
+
# @param id [Integer, String] The file the link points at.
|
|
3135
|
+
# @param file_link_request [FileLinkRequest] The settings of the link. They are applied in full, so a field left out is reset rather than kept.
|
|
3136
|
+
# @param [Hash] opts the optional parameters
|
|
3137
|
+
# @return [FileShareWrapper]
|
|
3138
|
+
def set_file_external_link(id, file_link_request, opts = {})
|
|
3139
|
+
data, _status_code, _headers = set_file_external_link_with_http_info(id, file_link_request, opts)
|
|
3140
|
+
data
|
|
3141
|
+
end
|
|
3142
|
+
|
|
3143
|
+
# Set a file external link
|
|
3144
|
+
# Creates an external link to a file, or changes or revokes an existing one, and answers with the link as it now stands. `linkId` decides which: an identifier that is not yet in use, the empty one included, creates a link, while the identifier of an existing link rewrites it, so the whole set of parameters is applied every time and a field left out is reset rather than kept. `access` carries the rights the link grants, and `access` set to the value that denies everything revokes the link instead - the answer is then empty, and a revoked primary link is not recreated by a later read. `title` names the link for the people who manage it, `expirationDate` limits its lifetime and is refused when it lies more than a few years ahead, `password` asks visitors for a secret, `denyDownload` leaves them with viewing only, `internal` admits signed-in members alone, and `primary=true` makes it the primary link of the file. The caller needs the right to share the file and is otherwise refused, an unknown file being answered as not found. The call is mutating.
|
|
3145
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/set-file-external-link/
|
|
3146
|
+
# @param id [Integer, String] The file the link points at.
|
|
3147
|
+
# @param file_link_request [FileLinkRequest] The settings of the link. They are applied in full, so a field left out is reset rather than kept.
|
|
3148
|
+
# @param [Hash] opts the optional parameters
|
|
3149
|
+
# @return [Array<(FileShareWrapper, Integer, Hash)>] FileShareWrapper data, response status code and response headers
|
|
3150
|
+
def set_file_external_link_with_http_info(id, file_link_request, opts = {})
|
|
3151
|
+
if @api_client.config.debugging
|
|
3152
|
+
@api_client.config.logger.debug 'Calling API: Files::FilesApi.set_file_external_link ...'
|
|
3153
|
+
end
|
|
3154
|
+
# verify the required parameter 'id' is set
|
|
3155
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
3156
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling Files::FilesApi.set_file_external_link"
|
|
3157
|
+
end
|
|
3158
|
+
# verify the required parameter 'file_link_request' is set
|
|
3159
|
+
if @api_client.config.client_side_validation && file_link_request.nil?
|
|
3160
|
+
fail ArgumentError, "Missing the required parameter 'file_link_request' when calling Files::FilesApi.set_file_external_link"
|
|
3161
|
+
end
|
|
3162
|
+
# resource path
|
|
3163
|
+
local_var_path = '/api/2.0/files/file/{id}/links'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
3164
|
+
|
|
3165
|
+
# query parameters
|
|
3166
|
+
query_params = opts[:query_params] || {}
|
|
3167
|
+
|
|
3168
|
+
# header parameters
|
|
3169
|
+
header_params = opts[:header_params] || {}
|
|
3170
|
+
# HTTP header 'Accept' (if needed)
|
|
3171
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3172
|
+
# HTTP header 'Content-Type'
|
|
3173
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3174
|
+
if !content_type.nil?
|
|
3175
|
+
header_params['Content-Type'] = content_type
|
|
3176
|
+
end
|
|
3177
|
+
|
|
3178
|
+
# form parameters
|
|
3179
|
+
form_params = opts[:form_params] || {}
|
|
3180
|
+
|
|
3181
|
+
# http body (model)
|
|
3182
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(file_link_request)
|
|
3183
|
+
|
|
3184
|
+
# return_type
|
|
3185
|
+
return_type = opts[:debug_return_type] || 'FileShareWrapper'
|
|
3186
|
+
|
|
3187
|
+
# auth_names
|
|
3188
|
+
auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2', 'ApiKeyBearer', 'asc_auth_key', 'Bearer', 'OpenId']
|
|
3189
|
+
|
|
3190
|
+
new_options = opts.merge(
|
|
3191
|
+
:operation => :"Files::FilesApi.set_file_external_link",
|
|
3192
|
+
:header_params => header_params,
|
|
3193
|
+
:query_params => query_params,
|
|
3194
|
+
:form_params => form_params,
|
|
3195
|
+
:body => post_body,
|
|
3196
|
+
:auth_names => auth_names,
|
|
3197
|
+
:return_type => return_type
|
|
3198
|
+
)
|
|
3199
|
+
|
|
3200
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
3201
|
+
if @api_client.config.debugging
|
|
3202
|
+
@api_client.config.logger.debug "API called: Files::FilesApi#set_file_external_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3203
|
+
end
|
|
3204
|
+
return data, status_code, headers
|
|
3205
|
+
end
|
|
3206
|
+
|
|
3207
|
+
# Set file order
|
|
3208
|
+
# Puts a file at a given position inside its folder and answers with the file, its `order` reporting where it now stands. Positions count from 1, and the file that held the wanted position, together with everything after it, is shifted to make room, so the numbering of a folder stays without gaps; a position beyond the end of the folder places the file last. The value may also be sent as a dotted path, as in 1.2.3, in which case only its last segment is read. Ordering is what the manual sorting of a room is built on, and it only means something in rooms whose contents are indexed - elsewhere the value is stored and ignored. The caller needs edit access to the file, which room managers, content creators and members with editing rights have; a member acting on somebody else's file, a guest and an anonymous caller are refused with 403, and an unknown file is answered with 404. The call is mutating and idempotent. To move several items in one go use `PUT api/2.0/files/order`.
|
|
3209
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/set-file-order/
|
|
3210
|
+
# @param file_id [Integer, String] The file to move.
|
|
3211
|
+
# @param [Hash] opts the optional parameters
|
|
3212
|
+
# @option opts [OrderRequestDto] :order_request_dto The position the file is to take.
|
|
3213
|
+
# @return [FileWrapper, ThirdPartyFileWrapper]
|
|
3214
|
+
def set_file_order(file_id, opts = {})
|
|
3215
|
+
data, _status_code, _headers = set_file_order_with_http_info(file_id, opts)
|
|
3216
|
+
data
|
|
3217
|
+
end
|
|
3218
|
+
|
|
3219
|
+
# Set file order
|
|
3220
|
+
# Puts a file at a given position inside its folder and answers with the file, its `order` reporting where it now stands. Positions count from 1, and the file that held the wanted position, together with everything after it, is shifted to make room, so the numbering of a folder stays without gaps; a position beyond the end of the folder places the file last. The value may also be sent as a dotted path, as in 1.2.3, in which case only its last segment is read. Ordering is what the manual sorting of a room is built on, and it only means something in rooms whose contents are indexed - elsewhere the value is stored and ignored. The caller needs edit access to the file, which room managers, content creators and members with editing rights have; a member acting on somebody else's file, a guest and an anonymous caller are refused with 403, and an unknown file is answered with 404. The call is mutating and idempotent. To move several items in one go use `PUT api/2.0/files/order`.
|
|
3221
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/set-file-order/
|
|
3222
|
+
# @param file_id [Integer, String] The file to move.
|
|
3223
|
+
# @param [Hash] opts the optional parameters
|
|
3224
|
+
# @option opts [OrderRequestDto] :order_request_dto The position the file is to take.
|
|
3225
|
+
# @return [Array<(FileWrapper, ThirdPartyFileWrapper, Integer, Hash)>] FileWrapper, ThirdPartyFileWrapper data, response status code and response headers
|
|
3226
|
+
def set_file_order_with_http_info(file_id, opts = {})
|
|
3227
|
+
if @api_client.config.debugging
|
|
3228
|
+
@api_client.config.logger.debug 'Calling API: Files::FilesApi.set_file_order ...'
|
|
3229
|
+
end
|
|
3230
|
+
# verify the required parameter 'file_id' is set
|
|
3231
|
+
if @api_client.config.client_side_validation && file_id.nil?
|
|
3232
|
+
fail ArgumentError, "Missing the required parameter 'file_id' when calling Files::FilesApi.set_file_order"
|
|
3233
|
+
end
|
|
3234
|
+
# resource path
|
|
3235
|
+
local_var_path = '/api/2.0/files/{fileId}/order'.sub('{' + 'fileId' + '}', CGI.escape(file_id.to_s))
|
|
3236
|
+
|
|
3237
|
+
# query parameters
|
|
3238
|
+
query_params = opts[:query_params] || {}
|
|
3239
|
+
|
|
3240
|
+
# header parameters
|
|
3241
|
+
header_params = opts[:header_params] || {}
|
|
3242
|
+
# HTTP header 'Accept' (if needed)
|
|
3243
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3244
|
+
# HTTP header 'Content-Type'
|
|
3245
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3246
|
+
if !content_type.nil?
|
|
3247
|
+
header_params['Content-Type'] = content_type
|
|
3248
|
+
end
|
|
3249
|
+
|
|
3250
|
+
# form parameters
|
|
3251
|
+
form_params = opts[:form_params] || {}
|
|
3252
|
+
|
|
3253
|
+
# http body (model)
|
|
3254
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'order_request_dto'])
|
|
3255
|
+
|
|
3256
|
+
# return_type
|
|
3257
|
+
return_type = opts[:debug_return_type] || (file_id.is_a?(String) ? 'ThirdPartyFileWrapper' : 'FileWrapper')
|
|
3258
|
+
|
|
3259
|
+
# auth_names
|
|
3260
|
+
auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2', 'ApiKeyBearer', 'asc_auth_key', 'Bearer', 'OpenId']
|
|
3261
|
+
|
|
3262
|
+
new_options = opts.merge(
|
|
3263
|
+
:operation => :"Files::FilesApi.set_file_order",
|
|
3264
|
+
:header_params => header_params,
|
|
3265
|
+
:query_params => query_params,
|
|
3266
|
+
:form_params => form_params,
|
|
3267
|
+
:body => post_body,
|
|
3268
|
+
:auth_names => auth_names,
|
|
3269
|
+
:return_type => return_type
|
|
3270
|
+
)
|
|
3271
|
+
|
|
3272
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
3273
|
+
if @api_client.config.debugging
|
|
3274
|
+
@api_client.config.logger.debug "API called: Files::FilesApi#set_file_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3275
|
+
end
|
|
3276
|
+
return data, status_code, headers
|
|
3277
|
+
end
|
|
3278
|
+
|
|
3279
|
+
# Set order of files
|
|
3280
|
+
# Puts several files and folders at given positions in one go and answers with the entries that were moved, each with the position it now holds. Every item of `items` names an entry by its identifier and its kind - a file or a folder - and the position it is to take, counting from 1; a position may also be sent as a dotted path, as in 1.2.3, of which only the last segment is read. The items are applied one after another in the order they are sent, and each of them shifts its neighbours, so the result depends on that order; the whole request is not one transaction, and a failure in the middle leaves the items before it moved. Every item has to lie in a room the caller may administer, which the room admin and a DocSpace admin acting as room manager do: read-only access, a guest and an anonymous caller are refused, and an identifier that matches nothing is answered as not found. Ordering only means something in rooms whose contents are indexed. The call is mutating. For a single file use `PUT api/2.0/files/{fileId}/order`.
|
|
3281
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/set-files-order/
|
|
3282
|
+
# @param [Hash] opts the optional parameters
|
|
3283
|
+
# @option opts [OrdersRequestDto] :orders_request_dto
|
|
3284
|
+
# @return [FileEntryArrayWrapper]
|
|
3285
|
+
def set_files_order(opts = {})
|
|
3286
|
+
data, _status_code, _headers = set_files_order_with_http_info(opts)
|
|
3287
|
+
data
|
|
3288
|
+
end
|
|
3289
|
+
|
|
3290
|
+
# Set order of files
|
|
3291
|
+
# Puts several files and folders at given positions in one go and answers with the entries that were moved, each with the position it now holds. Every item of `items` names an entry by its identifier and its kind - a file or a folder - and the position it is to take, counting from 1; a position may also be sent as a dotted path, as in 1.2.3, of which only the last segment is read. The items are applied one after another in the order they are sent, and each of them shifts its neighbours, so the result depends on that order; the whole request is not one transaction, and a failure in the middle leaves the items before it moved. Every item has to lie in a room the caller may administer, which the room admin and a DocSpace admin acting as room manager do: read-only access, a guest and an anonymous caller are refused, and an identifier that matches nothing is answered as not found. Ordering only means something in rooms whose contents are indexed. The call is mutating. For a single file use `PUT api/2.0/files/{fileId}/order`.
|
|
3292
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/set-files-order/
|
|
3293
|
+
# @param [Hash] opts the optional parameters
|
|
3294
|
+
# @option opts [OrdersRequestDto] :orders_request_dto
|
|
3295
|
+
# @return [Array<(FileEntryArrayWrapper, Integer, Hash)>] FileEntryArrayWrapper data, response status code and response headers
|
|
3296
|
+
def set_files_order_with_http_info(opts = {})
|
|
3297
|
+
if @api_client.config.debugging
|
|
3298
|
+
@api_client.config.logger.debug 'Calling API: Files::FilesApi.set_files_order ...'
|
|
3299
|
+
end
|
|
3300
|
+
# resource path
|
|
3301
|
+
local_var_path = '/api/2.0/files/order'
|
|
3302
|
+
|
|
3303
|
+
# query parameters
|
|
3304
|
+
query_params = opts[:query_params] || {}
|
|
3305
|
+
|
|
3306
|
+
# header parameters
|
|
3307
|
+
header_params = opts[:header_params] || {}
|
|
3308
|
+
# HTTP header 'Accept' (if needed)
|
|
3309
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3310
|
+
# HTTP header 'Content-Type'
|
|
3311
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3312
|
+
if !content_type.nil?
|
|
3313
|
+
header_params['Content-Type'] = content_type
|
|
3314
|
+
end
|
|
3315
|
+
|
|
3316
|
+
# form parameters
|
|
3317
|
+
form_params = opts[:form_params] || {}
|
|
3318
|
+
|
|
3319
|
+
# http body (model)
|
|
3320
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'orders_request_dto'])
|
|
3321
|
+
|
|
3322
|
+
# return_type
|
|
3323
|
+
return_type = opts[:debug_return_type] || 'FileEntryArrayWrapper'
|
|
3324
|
+
|
|
3325
|
+
# auth_names
|
|
3326
|
+
auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2', 'ApiKeyBearer', 'asc_auth_key', 'Bearer', 'OpenId']
|
|
3327
|
+
|
|
3328
|
+
new_options = opts.merge(
|
|
3329
|
+
:operation => :"Files::FilesApi.set_files_order",
|
|
3330
|
+
:header_params => header_params,
|
|
3331
|
+
:query_params => query_params,
|
|
3332
|
+
:form_params => form_params,
|
|
3333
|
+
:body => post_body,
|
|
3334
|
+
:auth_names => auth_names,
|
|
3335
|
+
:return_type => return_type
|
|
3336
|
+
)
|
|
3337
|
+
|
|
3338
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
3339
|
+
if @api_client.config.debugging
|
|
3340
|
+
@api_client.config.logger.debug "API called: Files::FilesApi#set_files_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3341
|
+
end
|
|
3342
|
+
return data, status_code, headers
|
|
3343
|
+
end
|
|
3344
|
+
|
|
3345
|
+
# Open an editing session
|
|
3346
|
+
# Opens an editing session on the file and answers with the document key that identifies it, the value an editor client passes to the document service in order to join the co-editing session for that exact revision. The file is marked as being edited for as long as the session lasts, which keeps it from being deleted or moved. With `editingAlone=false` the portal builds the editor configuration, requires write mode plus at least one of the edit, review, comment, form-filling or filter permissions, and asks the document service to start tracking the document. With `editingAlone=true` the caller claims the file for itself, and the call is refused with 403 when anybody is already editing it. The caller needs edit access: a member with read access, a guest and an anonymous caller whose external link does not grant editing are all refused. The call is mutating and not idempotent. Keep the session alive with `GET api/2.0/files/file/{fileId}/trackeditfile`, and end it by calling that operation with `isFinish=true`.
|
|
3347
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/start-edit-file/
|
|
3348
|
+
# @param file_id [Integer, String] The file to open the editing session on. The caller needs edit access to it.
|
|
3349
|
+
# @param start_edit_request [StartEditRequest] The session options. The body is required even when it only carries the default, so send an empty object to open an ordinary co-editing session.
|
|
3350
|
+
# @param [Hash] opts the optional parameters
|
|
3351
|
+
# @return [StringWrapper]
|
|
3352
|
+
def start_edit_file(file_id, start_edit_request, opts = {})
|
|
3353
|
+
data, _status_code, _headers = start_edit_file_with_http_info(file_id, start_edit_request, opts)
|
|
3354
|
+
data
|
|
3355
|
+
end
|
|
3356
|
+
|
|
3357
|
+
# Open an editing session
|
|
3358
|
+
# Opens an editing session on the file and answers with the document key that identifies it, the value an editor client passes to the document service in order to join the co-editing session for that exact revision. The file is marked as being edited for as long as the session lasts, which keeps it from being deleted or moved. With `editingAlone=false` the portal builds the editor configuration, requires write mode plus at least one of the edit, review, comment, form-filling or filter permissions, and asks the document service to start tracking the document. With `editingAlone=true` the caller claims the file for itself, and the call is refused with 403 when anybody is already editing it. The caller needs edit access: a member with read access, a guest and an anonymous caller whose external link does not grant editing are all refused. The call is mutating and not idempotent. Keep the session alive with `GET api/2.0/files/file/{fileId}/trackeditfile`, and end it by calling that operation with `isFinish=true`.
|
|
3359
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/start-edit-file/
|
|
3360
|
+
# @param file_id [Integer, String] The file to open the editing session on. The caller needs edit access to it.
|
|
3361
|
+
# @param start_edit_request [StartEditRequest] The session options. The body is required even when it only carries the default, so send an empty object to open an ordinary co-editing session.
|
|
3362
|
+
# @param [Hash] opts the optional parameters
|
|
3363
|
+
# @return [Array<(StringWrapper, Integer, Hash)>] StringWrapper data, response status code and response headers
|
|
3364
|
+
def start_edit_file_with_http_info(file_id, start_edit_request, opts = {})
|
|
3365
|
+
if @api_client.config.debugging
|
|
3366
|
+
@api_client.config.logger.debug 'Calling API: Files::FilesApi.start_edit_file ...'
|
|
3367
|
+
end
|
|
3368
|
+
# verify the required parameter 'file_id' is set
|
|
3369
|
+
if @api_client.config.client_side_validation && file_id.nil?
|
|
3370
|
+
fail ArgumentError, "Missing the required parameter 'file_id' when calling Files::FilesApi.start_edit_file"
|
|
3371
|
+
end
|
|
3372
|
+
# verify the required parameter 'start_edit_request' is set
|
|
3373
|
+
if @api_client.config.client_side_validation && start_edit_request.nil?
|
|
3374
|
+
fail ArgumentError, "Missing the required parameter 'start_edit_request' when calling Files::FilesApi.start_edit_file"
|
|
3375
|
+
end
|
|
3376
|
+
# resource path
|
|
3377
|
+
local_var_path = '/api/2.0/files/file/{fileId}/startedit'.sub('{' + 'fileId' + '}', CGI.escape(file_id.to_s))
|
|
3378
|
+
|
|
3379
|
+
# query parameters
|
|
3380
|
+
query_params = opts[:query_params] || {}
|
|
3381
|
+
|
|
3382
|
+
# header parameters
|
|
3383
|
+
header_params = opts[:header_params] || {}
|
|
3384
|
+
# HTTP header 'Accept' (if needed)
|
|
3385
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3386
|
+
# HTTP header 'Content-Type'
|
|
3387
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3388
|
+
if !content_type.nil?
|
|
3389
|
+
header_params['Content-Type'] = content_type
|
|
3390
|
+
end
|
|
3391
|
+
|
|
3392
|
+
# form parameters
|
|
3393
|
+
form_params = opts[:form_params] || {}
|
|
3394
|
+
|
|
3395
|
+
# http body (model)
|
|
3396
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(start_edit_request)
|
|
3397
|
+
|
|
3398
|
+
# return_type
|
|
3399
|
+
return_type = opts[:debug_return_type] || 'StringWrapper'
|
|
3400
|
+
|
|
3401
|
+
# auth_names
|
|
3402
|
+
auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2', 'ApiKeyBearer', 'asc_auth_key', 'Bearer', 'OpenId']
|
|
3403
|
+
|
|
3404
|
+
new_options = opts.merge(
|
|
3405
|
+
:operation => :"Files::FilesApi.start_edit_file",
|
|
3406
|
+
:header_params => header_params,
|
|
3407
|
+
:query_params => query_params,
|
|
3408
|
+
:form_params => form_params,
|
|
3409
|
+
:body => post_body,
|
|
3410
|
+
:auth_names => auth_names,
|
|
3411
|
+
:return_type => return_type
|
|
3412
|
+
)
|
|
3413
|
+
|
|
3414
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
3415
|
+
if @api_client.config.debugging
|
|
3416
|
+
@api_client.config.logger.debug "API called: Files::FilesApi#start_edit_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3417
|
+
end
|
|
3418
|
+
return data, status_code, headers
|
|
3419
|
+
end
|
|
3420
|
+
|
|
3421
|
+
# Start filling a form
|
|
3422
|
+
# Marks a PDF form in a form-filling room as open for filling out and answers with the form file. The portal stores the filling properties on it - the room it belongs to, its title, the account that started it and the id it keeps as the original form - so that later submissions are collected against this form. The file has to be a PDF whose parent folder is a form-filling room; anything else is answered unchanged and nothing is stored. Access follows room membership rather than portal role: a member holding only form-filling access on the room may not start filling, and a caller with no access to the room at all is refused with 403 unless they can manage it, which the room owner, a room administrator and a DocSpace administrator can. The call is mutating and safe to repeat, since a repeat rewrites the same properties. Once a form is started, the answers submitted for it can be collected into a spreadsheet with `POST api/2.0/files/file/{fileId}/xlsx`.
|
|
3423
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/start-filling-file/
|
|
3424
|
+
# @param file_id [Integer, String] The PDF form to open for filling. It has to be the form as it lies in the form-filling room itself, not a copy kept elsewhere and not a submitted result.
|
|
3425
|
+
# @param [Hash] opts the optional parameters
|
|
3426
|
+
# @return [FileWrapper, ThirdPartyFileWrapper]
|
|
3427
|
+
def start_filling_file(file_id, opts = {})
|
|
3428
|
+
data, _status_code, _headers = start_filling_file_with_http_info(file_id, opts)
|
|
3429
|
+
data
|
|
3430
|
+
end
|
|
3431
|
+
|
|
3432
|
+
# Start filling a form
|
|
3433
|
+
# Marks a PDF form in a form-filling room as open for filling out and answers with the form file. The portal stores the filling properties on it - the room it belongs to, its title, the account that started it and the id it keeps as the original form - so that later submissions are collected against this form. The file has to be a PDF whose parent folder is a form-filling room; anything else is answered unchanged and nothing is stored. Access follows room membership rather than portal role: a member holding only form-filling access on the room may not start filling, and a caller with no access to the room at all is refused with 403 unless they can manage it, which the room owner, a room administrator and a DocSpace administrator can. The call is mutating and safe to repeat, since a repeat rewrites the same properties. Once a form is started, the answers submitted for it can be collected into a spreadsheet with `POST api/2.0/files/file/{fileId}/xlsx`.
|
|
3434
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/start-filling-file/
|
|
3435
|
+
# @param file_id [Integer, String] The PDF form to open for filling. It has to be the form as it lies in the form-filling room itself, not a copy kept elsewhere and not a submitted result.
|
|
3436
|
+
# @param [Hash] opts the optional parameters
|
|
3437
|
+
# @return [Array<(FileWrapper, ThirdPartyFileWrapper, Integer, Hash)>] FileWrapper, ThirdPartyFileWrapper data, response status code and response headers
|
|
3438
|
+
def start_filling_file_with_http_info(file_id, opts = {})
|
|
3439
|
+
if @api_client.config.debugging
|
|
3440
|
+
@api_client.config.logger.debug 'Calling API: Files::FilesApi.start_filling_file ...'
|
|
3441
|
+
end
|
|
3442
|
+
# verify the required parameter 'file_id' is set
|
|
3443
|
+
if @api_client.config.client_side_validation && file_id.nil?
|
|
3444
|
+
fail ArgumentError, "Missing the required parameter 'file_id' when calling Files::FilesApi.start_filling_file"
|
|
3445
|
+
end
|
|
3446
|
+
# resource path
|
|
3447
|
+
local_var_path = '/api/2.0/files/file/{fileId}/startfilling'.sub('{' + 'fileId' + '}', CGI.escape(file_id.to_s))
|
|
3448
|
+
|
|
3449
|
+
# query parameters
|
|
3450
|
+
query_params = opts[:query_params] || {}
|
|
3451
|
+
|
|
3452
|
+
# header parameters
|
|
3453
|
+
header_params = opts[:header_params] || {}
|
|
3454
|
+
# HTTP header 'Accept' (if needed)
|
|
3455
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3456
|
+
|
|
3457
|
+
# form parameters
|
|
3458
|
+
form_params = opts[:form_params] || {}
|
|
3459
|
+
|
|
3460
|
+
# http body (model)
|
|
3461
|
+
post_body = opts[:debug_body]
|
|
3462
|
+
|
|
3463
|
+
# return_type
|
|
3464
|
+
return_type = opts[:debug_return_type] || (file_id.is_a?(String) ? 'ThirdPartyFileWrapper' : 'FileWrapper')
|
|
3465
|
+
|
|
3466
|
+
# auth_names
|
|
3467
|
+
auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2', 'ApiKeyBearer', 'asc_auth_key', 'Bearer', 'OpenId']
|
|
3468
|
+
|
|
3469
|
+
new_options = opts.merge(
|
|
3470
|
+
:operation => :"Files::FilesApi.start_filling_file",
|
|
3471
|
+
:header_params => header_params,
|
|
3472
|
+
:query_params => query_params,
|
|
3473
|
+
:form_params => form_params,
|
|
3474
|
+
:body => post_body,
|
|
3475
|
+
:auth_names => auth_names,
|
|
3476
|
+
:return_type => return_type
|
|
3477
|
+
)
|
|
3478
|
+
|
|
3479
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
3480
|
+
if @api_client.config.debugging
|
|
3481
|
+
@api_client.config.logger.debug "API called: Files::FilesApi#start_filling_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3482
|
+
end
|
|
3483
|
+
return data, status_code, headers
|
|
3484
|
+
end
|
|
3485
|
+
|
|
3486
|
+
# Set the file favorite status
|
|
3487
|
+
# Sets or clears the favorite mark of one file for the calling account: `true` adds the file to the favorites, `false` takes it out again. The call changes stored state even though it is a GET, so it is not one to issue speculatively; repeating it with the same value changes nothing further. The mark is personal, no other member sees it, and the file stays where it is stored. Read access is enough, so a room member with view-only rights and a guest may call it. The answer only echoes the value that was asked for: an identifier that resolves to nothing and a file the caller cannot read are skipped without a word, an encrypted file of a private room is never marked, and the requested value still comes back, so read the outcome from `GET api/2.0/files/@favorites` instead. A file moved to the Trash keeps its mark and is left out of that listing until it is restored. To mark several entries at once, or to mark folders, use `POST api/2.0/files/favorites` and `DELETE api/2.0/files/favorites`.
|
|
3488
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/toggle-file-favorite/
|
|
3489
|
+
# @param file_id [Integer, String] The file the operation addresses. Take the identifier from a listing such as `GET api/2.0/files/{folderId}`: a file stored on the portal is numbered, while a file in a connected third-party account is named by an opaque string.
|
|
3490
|
+
# @param [Hash] opts the optional parameters
|
|
3491
|
+
# @option opts [Boolean] :favorite Which state to put the mark in: `true` adds the file to the favorites of the calling account, `false` removes it from them. Leaving the field out of the request removes the mark rather than setting it.
|
|
3492
|
+
# @return [BooleanWrapper]
|
|
3493
|
+
def toggle_file_favorite(file_id, opts = {})
|
|
3494
|
+
data, _status_code, _headers = toggle_file_favorite_with_http_info(file_id, opts)
|
|
3495
|
+
data
|
|
3496
|
+
end
|
|
3497
|
+
|
|
3498
|
+
# Set the file favorite status
|
|
3499
|
+
# Sets or clears the favorite mark of one file for the calling account: `true` adds the file to the favorites, `false` takes it out again. The call changes stored state even though it is a GET, so it is not one to issue speculatively; repeating it with the same value changes nothing further. The mark is personal, no other member sees it, and the file stays where it is stored. Read access is enough, so a room member with view-only rights and a guest may call it. The answer only echoes the value that was asked for: an identifier that resolves to nothing and a file the caller cannot read are skipped without a word, an encrypted file of a private room is never marked, and the requested value still comes back, so read the outcome from `GET api/2.0/files/@favorites` instead. A file moved to the Trash keeps its mark and is left out of that listing until it is restored. To mark several entries at once, or to mark folders, use `POST api/2.0/files/favorites` and `DELETE api/2.0/files/favorites`.
|
|
3500
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/toggle-file-favorite/
|
|
3501
|
+
# @param file_id [Integer, String] The file the operation addresses. Take the identifier from a listing such as `GET api/2.0/files/{folderId}`: a file stored on the portal is numbered, while a file in a connected third-party account is named by an opaque string.
|
|
3502
|
+
# @param [Hash] opts the optional parameters
|
|
3503
|
+
# @option opts [Boolean] :favorite Which state to put the mark in: `true` adds the file to the favorites of the calling account, `false` removes it from them. Leaving the field out of the request removes the mark rather than setting it.
|
|
3504
|
+
# @return [Array<(BooleanWrapper, Integer, Hash)>] BooleanWrapper data, response status code and response headers
|
|
3505
|
+
def toggle_file_favorite_with_http_info(file_id, opts = {})
|
|
3506
|
+
if @api_client.config.debugging
|
|
3507
|
+
@api_client.config.logger.debug 'Calling API: Files::FilesApi.toggle_file_favorite ...'
|
|
3508
|
+
end
|
|
3509
|
+
# verify the required parameter 'file_id' is set
|
|
3510
|
+
if @api_client.config.client_side_validation && file_id.nil?
|
|
3511
|
+
fail ArgumentError, "Missing the required parameter 'file_id' when calling Files::FilesApi.toggle_file_favorite"
|
|
3512
|
+
end
|
|
3513
|
+
# resource path
|
|
3514
|
+
local_var_path = '/api/2.0/files/favorites/{fileId}'.sub('{' + 'fileId' + '}', CGI.escape(file_id.to_s))
|
|
3515
|
+
|
|
3516
|
+
# query parameters
|
|
3517
|
+
query_params = opts[:query_params] || {}
|
|
3518
|
+
query_params[:'favorite'] = opts[:'favorite'] if !opts[:'favorite'].nil?
|
|
3519
|
+
|
|
3520
|
+
# header parameters
|
|
3521
|
+
header_params = opts[:header_params] || {}
|
|
3522
|
+
# HTTP header 'Accept' (if needed)
|
|
3523
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3524
|
+
|
|
3525
|
+
# form parameters
|
|
3526
|
+
form_params = opts[:form_params] || {}
|
|
3527
|
+
|
|
3528
|
+
# http body (model)
|
|
3529
|
+
post_body = opts[:debug_body]
|
|
3530
|
+
|
|
3531
|
+
# return_type
|
|
3532
|
+
return_type = opts[:debug_return_type] || 'BooleanWrapper'
|
|
3533
|
+
|
|
3534
|
+
# auth_names
|
|
3535
|
+
auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2', 'ApiKeyBearer', 'asc_auth_key', 'Bearer', 'OpenId']
|
|
3536
|
+
|
|
3537
|
+
new_options = opts.merge(
|
|
3538
|
+
:operation => :"Files::FilesApi.toggle_file_favorite",
|
|
3539
|
+
:header_params => header_params,
|
|
3540
|
+
:query_params => query_params,
|
|
3541
|
+
:form_params => form_params,
|
|
3542
|
+
:body => post_body,
|
|
3543
|
+
:auth_names => auth_names,
|
|
3544
|
+
:return_type => return_type
|
|
3545
|
+
)
|
|
3546
|
+
|
|
3547
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
3548
|
+
if @api_client.config.debugging
|
|
3549
|
+
@api_client.config.logger.debug "API called: Files::FilesApi#toggle_file_favorite\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3550
|
+
end
|
|
3551
|
+
return data, status_code, headers
|
|
3552
|
+
end
|
|
3553
|
+
|
|
3554
|
+
# Track an editing session
|
|
3555
|
+
# Keeps an editing session on the file alive, or ends it; an editor client calls it repeatedly while a document is open. `docKeyForTrack` has to be the document key of the file as it currently stands, the value `POST api/2.0/files/file/{fileId}/startedit` returned, and a key matching neither the current revision nor the one being edited is refused with 403. `tabId` names the client tab that holds the session, so several tabs and several users are tracked on one file independently. Refreshing an entry requires one of the editing rights on the file - editing, reviewing, commenting, filling or filter editing - so a reader is refused. With `isFinish=false` the entry is refreshed and the file stays marked as being edited; with `isFinish=true` the entry for that tab is dropped and the other clients are told that editing has stopped. The call changes the tracking state and never the document, and repeating it is safe. It answers `key` true with an empty `value` whenever it succeeds, so a failure arrives as an error rather than as a false key. An anonymous caller is accepted only through an external share link.
|
|
3556
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/track-edit-file/
|
|
3557
|
+
# @param file_id [Integer, String] The file whose editing session is being tracked.
|
|
3558
|
+
# @param [Hash] opts the optional parameters
|
|
3559
|
+
# @option opts [String] :tab_id The client tab that holds the session, a value the client makes up once and repeats on every call about that tab. Two tabs sending different values are tracked as two sessions on the same file, while the all-zero value belongs to a session claimed for a single editor.
|
|
3560
|
+
# @option opts [String] :doc_key_for_track The document key of the revision being edited, as `POST api/2.0/files/file/{fileId}/startedit` returned it. It is checked against the file's current key on every call, so a key left over from an older revision is refused.
|
|
3561
|
+
# @option opts [Boolean] :is_finish Ends the session for this tab and tells the other clients that editing has stopped. Left off, the session is refreshed and the file stays marked as being edited.
|
|
3562
|
+
# @return [ItemKeyValuePairBooleanStringWrapper]
|
|
3563
|
+
def track_edit_file(file_id, opts = {})
|
|
3564
|
+
data, _status_code, _headers = track_edit_file_with_http_info(file_id, opts)
|
|
3565
|
+
data
|
|
3566
|
+
end
|
|
3567
|
+
|
|
3568
|
+
# Track an editing session
|
|
3569
|
+
# Keeps an editing session on the file alive, or ends it; an editor client calls it repeatedly while a document is open. `docKeyForTrack` has to be the document key of the file as it currently stands, the value `POST api/2.0/files/file/{fileId}/startedit` returned, and a key matching neither the current revision nor the one being edited is refused with 403. `tabId` names the client tab that holds the session, so several tabs and several users are tracked on one file independently. Refreshing an entry requires one of the editing rights on the file - editing, reviewing, commenting, filling or filter editing - so a reader is refused. With `isFinish=false` the entry is refreshed and the file stays marked as being edited; with `isFinish=true` the entry for that tab is dropped and the other clients are told that editing has stopped. The call changes the tracking state and never the document, and repeating it is safe. It answers `key` true with an empty `value` whenever it succeeds, so a failure arrives as an error rather than as a false key. An anonymous caller is accepted only through an external share link.
|
|
3570
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/track-edit-file/
|
|
3571
|
+
# @param file_id [Integer, String] The file whose editing session is being tracked.
|
|
3572
|
+
# @param [Hash] opts the optional parameters
|
|
3573
|
+
# @option opts [String] :tab_id The client tab that holds the session, a value the client makes up once and repeats on every call about that tab. Two tabs sending different values are tracked as two sessions on the same file, while the all-zero value belongs to a session claimed for a single editor.
|
|
3574
|
+
# @option opts [String] :doc_key_for_track The document key of the revision being edited, as `POST api/2.0/files/file/{fileId}/startedit` returned it. It is checked against the file's current key on every call, so a key left over from an older revision is refused.
|
|
3575
|
+
# @option opts [Boolean] :is_finish Ends the session for this tab and tells the other clients that editing has stopped. Left off, the session is refreshed and the file stays marked as being edited.
|
|
3576
|
+
# @return [Array<(ItemKeyValuePairBooleanStringWrapper, Integer, Hash)>] ItemKeyValuePairBooleanStringWrapper data, response status code and response headers
|
|
3577
|
+
def track_edit_file_with_http_info(file_id, opts = {})
|
|
3578
|
+
if @api_client.config.debugging
|
|
3579
|
+
@api_client.config.logger.debug 'Calling API: Files::FilesApi.track_edit_file ...'
|
|
3580
|
+
end
|
|
3581
|
+
# verify the required parameter 'file_id' is set
|
|
3582
|
+
if @api_client.config.client_side_validation && file_id.nil?
|
|
3583
|
+
fail ArgumentError, "Missing the required parameter 'file_id' when calling Files::FilesApi.track_edit_file"
|
|
3584
|
+
end
|
|
3585
|
+
# resource path
|
|
3586
|
+
local_var_path = '/api/2.0/files/file/{fileId}/trackeditfile'.sub('{' + 'fileId' + '}', CGI.escape(file_id.to_s))
|
|
3587
|
+
|
|
3588
|
+
# query parameters
|
|
3589
|
+
query_params = opts[:query_params] || {}
|
|
3590
|
+
query_params[:'tabId'] = opts[:'tab_id'] if !opts[:'tab_id'].nil?
|
|
3591
|
+
query_params[:'docKeyForTrack'] = opts[:'doc_key_for_track'] if !opts[:'doc_key_for_track'].nil?
|
|
3592
|
+
query_params[:'isFinish'] = opts[:'is_finish'] if !opts[:'is_finish'].nil?
|
|
3593
|
+
|
|
3594
|
+
# header parameters
|
|
3595
|
+
header_params = opts[:header_params] || {}
|
|
3596
|
+
# HTTP header 'Accept' (if needed)
|
|
3597
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3598
|
+
|
|
3599
|
+
# form parameters
|
|
3600
|
+
form_params = opts[:form_params] || {}
|
|
3601
|
+
|
|
3602
|
+
# http body (model)
|
|
3603
|
+
post_body = opts[:debug_body]
|
|
3604
|
+
|
|
3605
|
+
# return_type
|
|
3606
|
+
return_type = opts[:debug_return_type] || 'ItemKeyValuePairBooleanStringWrapper'
|
|
3607
|
+
|
|
3608
|
+
# auth_names
|
|
3609
|
+
auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2', 'ApiKeyBearer', 'asc_auth_key', 'Bearer', 'OpenId']
|
|
3610
|
+
|
|
3611
|
+
new_options = opts.merge(
|
|
3612
|
+
:operation => :"Files::FilesApi.track_edit_file",
|
|
3613
|
+
:header_params => header_params,
|
|
3614
|
+
:query_params => query_params,
|
|
3615
|
+
:form_params => form_params,
|
|
3616
|
+
:body => post_body,
|
|
3617
|
+
:auth_names => auth_names,
|
|
3618
|
+
:return_type => return_type
|
|
3619
|
+
)
|
|
3620
|
+
|
|
3621
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
3622
|
+
if @api_client.config.debugging
|
|
3623
|
+
@api_client.config.logger.debug "API called: Files::FilesApi#track_edit_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3624
|
+
end
|
|
3625
|
+
return data, status_code, headers
|
|
3626
|
+
end
|
|
3627
|
+
|
|
3628
|
+
# Update a file
|
|
3629
|
+
# Renames a file, restores one of its versions, or both at once, and answers with the file as it now stands. A non-empty `title` renames the file, keeping the stored extension whatever the new title says, so a rename cannot change the format; an empty or missing title leaves the name alone. A `lastVersion` above 0 restores that version the way `POST api/2.0/files/file/{fileId}/restoreversion` does, storing its content again on top of the history, while 0 or less leaves the versions untouched and answers with the file as it is - which makes this operation a read of the file when both fields are left out. The caller needs edit access, and renaming somebody else's file additionally needs room-manager rights: a member or room admin with plain editing access, read-only access, a guest and a DocSpace admin who is not a member of the room are all refused with 403, while a content creator may rename a file of their own. The call is mutating. Renaming marks the file as new for everybody else who can read it.
|
|
3630
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/update-file/
|
|
3631
|
+
# @param file_id [Integer, String] The file to update.
|
|
3632
|
+
# @param update_file_request [UpdateFileRequest] The new title and the version to restore.
|
|
3633
|
+
# @param [Hash] opts the optional parameters
|
|
3634
|
+
# @return [FileWrapper, ThirdPartyFileWrapper]
|
|
3635
|
+
def update_file(file_id, update_file_request, opts = {})
|
|
3636
|
+
data, _status_code, _headers = update_file_with_http_info(file_id, update_file_request, opts)
|
|
3637
|
+
data
|
|
3638
|
+
end
|
|
3639
|
+
|
|
3640
|
+
# Update a file
|
|
3641
|
+
# Renames a file, restores one of its versions, or both at once, and answers with the file as it now stands. A non-empty `title` renames the file, keeping the stored extension whatever the new title says, so a rename cannot change the format; an empty or missing title leaves the name alone. A `lastVersion` above 0 restores that version the way `POST api/2.0/files/file/{fileId}/restoreversion` does, storing its content again on top of the history, while 0 or less leaves the versions untouched and answers with the file as it is - which makes this operation a read of the file when both fields are left out. The caller needs edit access, and renaming somebody else's file additionally needs room-manager rights: a member or room admin with plain editing access, read-only access, a guest and a DocSpace admin who is not a member of the room are all refused with 403, while a content creator may rename a file of their own. The call is mutating. Renaming marks the file as new for everybody else who can read it.
|
|
3642
|
+
# See also: https://api.onlyoffice.com/docspace/api-backend/usage-api/update-file/
|
|
3643
|
+
# @param file_id [Integer, String] The file to update.
|
|
3644
|
+
# @param update_file_request [UpdateFileRequest] The new title and the version to restore.
|
|
3645
|
+
# @param [Hash] opts the optional parameters
|
|
3646
|
+
# @return [Array<(FileWrapper, ThirdPartyFileWrapper, Integer, Hash)>] FileWrapper, ThirdPartyFileWrapper data, response status code and response headers
|
|
3647
|
+
def update_file_with_http_info(file_id, update_file_request, opts = {})
|
|
3648
|
+
if @api_client.config.debugging
|
|
3649
|
+
@api_client.config.logger.debug 'Calling API: Files::FilesApi.update_file ...'
|
|
3650
|
+
end
|
|
3651
|
+
# verify the required parameter 'file_id' is set
|
|
3652
|
+
if @api_client.config.client_side_validation && file_id.nil?
|
|
3653
|
+
fail ArgumentError, "Missing the required parameter 'file_id' when calling Files::FilesApi.update_file"
|
|
3654
|
+
end
|
|
3655
|
+
# verify the required parameter 'update_file_request' is set
|
|
3656
|
+
if @api_client.config.client_side_validation && update_file_request.nil?
|
|
3657
|
+
fail ArgumentError, "Missing the required parameter 'update_file_request' when calling Files::FilesApi.update_file"
|
|
3658
|
+
end
|
|
3659
|
+
# resource path
|
|
3660
|
+
local_var_path = '/api/2.0/files/file/{fileId}'.sub('{' + 'fileId' + '}', CGI.escape(file_id.to_s))
|
|
3661
|
+
|
|
3662
|
+
# query parameters
|
|
3663
|
+
query_params = opts[:query_params] || {}
|
|
3664
|
+
|
|
3665
|
+
# header parameters
|
|
3666
|
+
header_params = opts[:header_params] || {}
|
|
3667
|
+
# HTTP header 'Accept' (if needed)
|
|
3668
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3669
|
+
# HTTP header 'Content-Type'
|
|
3670
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3671
|
+
if !content_type.nil?
|
|
3672
|
+
header_params['Content-Type'] = content_type
|
|
3673
|
+
end
|
|
3674
|
+
|
|
3675
|
+
# form parameters
|
|
3676
|
+
form_params = opts[:form_params] || {}
|
|
3677
|
+
|
|
3678
|
+
# http body (model)
|
|
3679
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_file_request)
|
|
3680
|
+
|
|
3681
|
+
# return_type
|
|
3682
|
+
return_type = opts[:debug_return_type] || (file_id.is_a?(String) ? 'ThirdPartyFileWrapper' : 'FileWrapper')
|
|
3683
|
+
|
|
3684
|
+
# auth_names
|
|
3685
|
+
auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2', 'ApiKeyBearer', 'asc_auth_key', 'Bearer', 'OpenId']
|
|
3686
|
+
|
|
3687
|
+
new_options = opts.merge(
|
|
3688
|
+
:operation => :"Files::FilesApi.update_file",
|
|
3689
|
+
:header_params => header_params,
|
|
3690
|
+
:query_params => query_params,
|
|
3691
|
+
:form_params => form_params,
|
|
3692
|
+
:body => post_body,
|
|
3693
|
+
:auth_names => auth_names,
|
|
3694
|
+
:return_type => return_type
|
|
3695
|
+
)
|
|
3696
|
+
|
|
3697
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
3698
|
+
if @api_client.config.debugging
|
|
3699
|
+
@api_client.config.logger.debug "API called: Files::FilesApi#update_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3700
|
+
end
|
|
3701
|
+
return data, status_code, headers
|
|
3702
|
+
end
|
|
3703
|
+
end
|
|
3704
|
+
end
|
|
3705
|
+
end
|