imagekitio 3.0.0 → 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 +4 -4
- data/.ignore +2 -0
- data/CHANGELOG.md +116 -0
- data/README.md +538 -679
- data/SECURITY.md +27 -0
- data/lib/imagekitio/client.rb +122 -195
- data/lib/imagekitio/errors.rb +226 -2
- data/lib/imagekitio/file_part.rb +58 -0
- data/lib/imagekitio/helpers/crypto_utils.rb +25 -0
- data/lib/imagekitio/helpers/helper.rb +689 -0
- data/lib/imagekitio/helpers/transformation_utils.rb +164 -0
- data/lib/imagekitio/helpers/uuid_utils.rb +18 -0
- data/lib/imagekitio/internal/transport/base_client.rb +567 -0
- data/lib/imagekitio/internal/transport/pooled_net_requester.rb +217 -0
- data/lib/imagekitio/internal/type/array_of.rb +168 -0
- data/lib/imagekitio/internal/type/base_model.rb +530 -0
- data/lib/imagekitio/internal/type/base_page.rb +55 -0
- data/lib/imagekitio/internal/type/boolean.rb +77 -0
- data/lib/imagekitio/internal/type/converter.rb +327 -0
- data/lib/imagekitio/internal/type/enum.rb +156 -0
- data/lib/imagekitio/internal/type/file_input.rb +111 -0
- data/lib/imagekitio/internal/type/hash_of.rb +188 -0
- data/lib/imagekitio/internal/type/request_parameters.rb +42 -0
- data/lib/imagekitio/internal/type/union.rb +250 -0
- data/lib/imagekitio/internal/type/unknown.rb +81 -0
- data/lib/imagekitio/internal/util.rb +915 -0
- data/lib/imagekitio/internal.rb +20 -0
- data/lib/imagekitio/models/accounts/origin_create_params.rb +24 -0
- data/lib/imagekitio/models/accounts/origin_delete_params.rb +16 -0
- data/lib/imagekitio/models/accounts/origin_get_params.rb +16 -0
- data/lib/imagekitio/models/accounts/origin_list_params.rb +16 -0
- data/lib/imagekitio/models/accounts/origin_list_response.rb +11 -0
- data/lib/imagekitio/models/accounts/origin_request.rb +547 -0
- data/lib/imagekitio/models/accounts/origin_response.rb +568 -0
- data/lib/imagekitio/models/accounts/origin_update_params.rb +24 -0
- data/lib/imagekitio/models/accounts/url_endpoint_create_params.rb +16 -0
- data/lib/imagekitio/models/accounts/url_endpoint_delete_params.rb +16 -0
- data/lib/imagekitio/models/accounts/url_endpoint_get_params.rb +16 -0
- data/lib/imagekitio/models/accounts/url_endpoint_list_params.rb +16 -0
- data/lib/imagekitio/models/accounts/url_endpoint_list_response.rb +11 -0
- data/lib/imagekitio/models/accounts/url_endpoint_request.rb +110 -0
- data/lib/imagekitio/models/accounts/url_endpoint_response.rb +123 -0
- data/lib/imagekitio/models/accounts/url_endpoint_update_params.rb +16 -0
- data/lib/imagekitio/models/accounts/usage_get_params.rb +37 -0
- data/lib/imagekitio/models/accounts/usage_get_response.rb +51 -0
- data/lib/imagekitio/models/asset_list_params.rb +158 -0
- data/lib/imagekitio/models/asset_list_response.rb +24 -0
- data/lib/imagekitio/models/base_overlay.rb +21 -0
- data/lib/imagekitio/models/base_webhook_event.rb +24 -0
- data/lib/imagekitio/models/beta/v2/file_upload_params.rb +510 -0
- data/lib/imagekitio/models/beta/v2/file_upload_response.rb +618 -0
- data/lib/imagekitio/models/cache/invalidation_create_params.rb +27 -0
- data/lib/imagekitio/models/cache/invalidation_create_response.rb +23 -0
- data/lib/imagekitio/models/cache/invalidation_get_params.rb +16 -0
- data/lib/imagekitio/models/cache/invalidation_get_response.rb +35 -0
- data/lib/imagekitio/models/custom_metadata_field.rb +243 -0
- data/lib/imagekitio/models/custom_metadata_field_create_params.rb +238 -0
- data/lib/imagekitio/models/custom_metadata_field_delete_params.rb +14 -0
- data/lib/imagekitio/models/custom_metadata_field_delete_response.rb +10 -0
- data/lib/imagekitio/models/custom_metadata_field_list_params.rb +36 -0
- data/lib/imagekitio/models/custom_metadata_field_list_response.rb +9 -0
- data/lib/imagekitio/models/custom_metadata_field_update_params.rb +212 -0
- data/lib/imagekitio/models/extensions.rb +136 -0
- data/lib/imagekitio/models/file.rb +497 -0
- data/lib/imagekitio/models/file_copy_params.rb +43 -0
- data/lib/imagekitio/models/file_copy_response.rb +10 -0
- data/lib/imagekitio/models/file_delete_params.rb +14 -0
- data/lib/imagekitio/models/file_get_params.rb +14 -0
- data/lib/imagekitio/models/file_move_params.rb +33 -0
- data/lib/imagekitio/models/file_move_response.rb +10 -0
- data/lib/imagekitio/models/file_rename_params.rb +61 -0
- data/lib/imagekitio/models/file_rename_response.rb +21 -0
- data/lib/imagekitio/models/file_update_params.rb +22 -0
- data/lib/imagekitio/models/file_update_response.rb +104 -0
- data/lib/imagekitio/models/file_upload_params.rb +540 -0
- data/lib/imagekitio/models/file_upload_response.rb +611 -0
- data/lib/imagekitio/models/files/bulk_add_tags_params.rb +35 -0
- data/lib/imagekitio/models/files/bulk_add_tags_response.rb +24 -0
- data/lib/imagekitio/models/files/bulk_delete_params.rb +27 -0
- data/lib/imagekitio/models/files/bulk_delete_response.rb +24 -0
- data/lib/imagekitio/models/files/bulk_remove_ai_tags_params.rb +35 -0
- data/lib/imagekitio/models/files/bulk_remove_ai_tags_response.rb +24 -0
- data/lib/imagekitio/models/files/bulk_remove_tags_params.rb +35 -0
- data/lib/imagekitio/models/files/bulk_remove_tags_response.rb +24 -0
- data/lib/imagekitio/models/files/metadata_get_from_url_params.rb +28 -0
- data/lib/imagekitio/models/files/metadata_get_params.rb +16 -0
- data/lib/imagekitio/models/files/version_delete_params.rb +22 -0
- data/lib/imagekitio/models/files/version_delete_response.rb +12 -0
- data/lib/imagekitio/models/files/version_get_params.rb +22 -0
- data/lib/imagekitio/models/files/version_list_params.rb +16 -0
- data/lib/imagekitio/models/files/version_list_response.rb +10 -0
- data/lib/imagekitio/models/files/version_restore_params.rb +22 -0
- data/lib/imagekitio/models/folder.rb +76 -0
- data/lib/imagekitio/models/folder_copy_params.rb +44 -0
- data/lib/imagekitio/models/folder_copy_response.rb +23 -0
- data/lib/imagekitio/models/folder_create_params.rb +43 -0
- data/lib/imagekitio/models/folder_create_response.rb +10 -0
- data/lib/imagekitio/models/folder_delete_params.rb +25 -0
- data/lib/imagekitio/models/folder_delete_response.rb +10 -0
- data/lib/imagekitio/models/folder_move_params.rb +34 -0
- data/lib/imagekitio/models/folder_move_response.rb +23 -0
- data/lib/imagekitio/models/folder_rename_params.rb +59 -0
- data/lib/imagekitio/models/folder_rename_response.rb +23 -0
- data/lib/imagekitio/models/folders/job_get_params.rb +16 -0
- data/lib/imagekitio/models/folders/job_get_response.rb +74 -0
- data/lib/imagekitio/models/get_image_attributes_options.rb +68 -0
- data/lib/imagekitio/models/image_overlay.rb +66 -0
- data/lib/imagekitio/models/metadata.rb +483 -0
- data/lib/imagekitio/models/overlay.rb +28 -0
- data/lib/imagekitio/models/overlay_position.rb +101 -0
- data/lib/imagekitio/models/overlay_timing.rb +97 -0
- data/lib/imagekitio/models/responsive_image_attributes.rb +48 -0
- data/lib/imagekitio/models/solid_color_overlay.rb +42 -0
- data/lib/imagekitio/models/solid_color_overlay_transformation.rb +135 -0
- data/lib/imagekitio/models/src_options.rb +96 -0
- data/lib/imagekitio/models/streaming_resolution.rb +22 -0
- data/lib/imagekitio/models/subtitle_overlay.rb +64 -0
- data/lib/imagekitio/models/subtitle_overlay_transformation.rb +113 -0
- data/lib/imagekitio/models/text_overlay.rb +65 -0
- data/lib/imagekitio/models/text_overlay_transformation.rb +267 -0
- data/lib/imagekitio/models/transformation.rb +1100 -0
- data/lib/imagekitio/models/transformation_position.rb +19 -0
- data/lib/imagekitio/models/unsafe_unwrap_webhook_event.rb +36 -0
- data/lib/imagekitio/models/unwrap_webhook_event.rb +36 -0
- data/lib/imagekitio/models/update_file_request.rb +164 -0
- data/lib/imagekitio/models/upload_post_transform_error_event.rb +180 -0
- data/lib/imagekitio/models/upload_post_transform_success_event.rb +143 -0
- data/lib/imagekitio/models/upload_pre_transform_error_event.rb +108 -0
- data/lib/imagekitio/models/upload_pre_transform_success_event.rb +690 -0
- data/lib/imagekitio/models/video_overlay.rb +64 -0
- data/lib/imagekitio/models/video_transformation_accepted_event.rb +279 -0
- data/lib/imagekitio/models/video_transformation_error_event.rb +326 -0
- data/lib/imagekitio/models/video_transformation_ready_event.rb +379 -0
- data/lib/imagekitio/models/webhook_unsafe_unwrap_params.rb +14 -0
- data/lib/imagekitio/models/webhook_unwrap_params.rb +14 -0
- data/lib/imagekitio/models.rb +160 -0
- data/lib/imagekitio/request_options.rb +77 -0
- data/lib/imagekitio/resources/accounts/origins.rb +145 -0
- data/lib/imagekitio/resources/accounts/url_endpoints.rb +151 -0
- data/lib/imagekitio/resources/accounts/usage.rb +46 -0
- data/lib/imagekitio/resources/accounts.rb +26 -0
- data/lib/imagekitio/resources/assets.rb +54 -0
- data/lib/imagekitio/resources/beta/v2/files.rb +110 -0
- data/lib/imagekitio/resources/beta/v2.rb +20 -0
- data/lib/imagekitio/resources/beta.rb +18 -0
- data/lib/imagekitio/resources/cache/invalidation.rb +66 -0
- data/lib/imagekitio/resources/cache.rb +18 -0
- data/lib/imagekitio/resources/custom_metadata_fields.rb +133 -0
- data/lib/imagekitio/resources/files/bulk.rb +131 -0
- data/lib/imagekitio/resources/files/metadata.rb +69 -0
- data/lib/imagekitio/resources/files/versions.rb +132 -0
- data/lib/imagekitio/resources/files.rb +305 -0
- data/lib/imagekitio/resources/folders/job.rb +39 -0
- data/lib/imagekitio/resources/folders.rb +166 -0
- data/lib/imagekitio/resources/webhooks.rb +30 -0
- data/lib/imagekitio/version.rb +5 -0
- data/lib/imagekitio.rb +181 -13
- data/manifest.yaml +15 -0
- data/rbi/imagekitio/client.rbi +92 -0
- data/rbi/imagekitio/errors.rbi +205 -0
- data/rbi/imagekitio/file_part.rbi +37 -0
- data/rbi/imagekitio/helpers/helper.rbi +41 -0
- data/rbi/imagekitio/internal/transport/base_client.rbi +295 -0
- data/rbi/imagekitio/internal/transport/pooled_net_requester.rbi +80 -0
- data/rbi/imagekitio/internal/type/array_of.rbi +104 -0
- data/rbi/imagekitio/internal/type/base_model.rbi +304 -0
- data/rbi/imagekitio/internal/type/base_page.rbi +42 -0
- data/rbi/imagekitio/internal/type/boolean.rbi +58 -0
- data/rbi/imagekitio/internal/type/converter.rbi +216 -0
- data/rbi/imagekitio/internal/type/enum.rbi +82 -0
- data/rbi/imagekitio/internal/type/file_input.rbi +59 -0
- data/rbi/imagekitio/internal/type/hash_of.rbi +104 -0
- data/rbi/imagekitio/internal/type/request_parameters.rbi +29 -0
- data/rbi/imagekitio/internal/type/union.rbi +128 -0
- data/rbi/imagekitio/internal/type/unknown.rbi +58 -0
- data/rbi/imagekitio/internal/util.rbi +487 -0
- data/rbi/imagekitio/internal.rbi +18 -0
- data/rbi/imagekitio/models/accounts/origin_create_params.rbi +81 -0
- data/rbi/imagekitio/models/accounts/origin_delete_params.rbi +34 -0
- data/rbi/imagekitio/models/accounts/origin_get_params.rbi +34 -0
- data/rbi/imagekitio/models/accounts/origin_list_params.rbi +34 -0
- data/rbi/imagekitio/models/accounts/origin_list_response.rbi +15 -0
- data/rbi/imagekitio/models/accounts/origin_request.rbi +775 -0
- data/rbi/imagekitio/models/accounts/origin_response.rbi +718 -0
- data/rbi/imagekitio/models/accounts/origin_update_params.rbi +81 -0
- data/rbi/imagekitio/models/accounts/url_endpoint_create_params.rbi +34 -0
- data/rbi/imagekitio/models/accounts/url_endpoint_delete_params.rbi +34 -0
- data/rbi/imagekitio/models/accounts/url_endpoint_get_params.rbi +34 -0
- data/rbi/imagekitio/models/accounts/url_endpoint_list_params.rbi +34 -0
- data/rbi/imagekitio/models/accounts/url_endpoint_list_response.rbi +15 -0
- data/rbi/imagekitio/models/accounts/url_endpoint_request.rbi +218 -0
- data/rbi/imagekitio/models/accounts/url_endpoint_response.rbi +213 -0
- data/rbi/imagekitio/models/accounts/url_endpoint_update_params.rbi +34 -0
- data/rbi/imagekitio/models/accounts/usage_get_params.rbi +60 -0
- data/rbi/imagekitio/models/accounts/usage_get_response.rbi +89 -0
- data/rbi/imagekitio/models/asset_list_params.rbi +281 -0
- data/rbi/imagekitio/models/asset_list_response.rbi +28 -0
- data/rbi/imagekitio/models/base_overlay.rbi +44 -0
- data/rbi/imagekitio/models/base_webhook_event.rbi +33 -0
- data/rbi/imagekitio/models/beta/v2/file_upload_params.rbi +861 -0
- data/rbi/imagekitio/models/beta/v2/file_upload_response.rbi +1197 -0
- data/rbi/imagekitio/models/cache/invalidation_create_params.rbi +45 -0
- data/rbi/imagekitio/models/cache/invalidation_create_response.rbi +37 -0
- data/rbi/imagekitio/models/cache/invalidation_get_params.rbi +34 -0
- data/rbi/imagekitio/models/cache/invalidation_get_response.rbi +93 -0
- data/rbi/imagekitio/models/custom_metadata_field.rbi +422 -0
- data/rbi/imagekitio/models/custom_metadata_field_create_params.rbi +443 -0
- data/rbi/imagekitio/models/custom_metadata_field_delete_params.rbi +30 -0
- data/rbi/imagekitio/models/custom_metadata_field_delete_response.rbi +23 -0
- data/rbi/imagekitio/models/custom_metadata_field_list_params.rbi +66 -0
- data/rbi/imagekitio/models/custom_metadata_field_list_response.rbi +11 -0
- data/rbi/imagekitio/models/custom_metadata_field_update_params.rbi +376 -0
- data/rbi/imagekitio/models/extensions.rbi +274 -0
- data/rbi/imagekitio/models/file.rbi +789 -0
- data/rbi/imagekitio/models/file_copy_params.rbi +66 -0
- data/rbi/imagekitio/models/file_copy_response.rbi +23 -0
- data/rbi/imagekitio/models/file_delete_params.rbi +27 -0
- data/rbi/imagekitio/models/file_get_params.rbi +27 -0
- data/rbi/imagekitio/models/file_move_params.rbi +51 -0
- data/rbi/imagekitio/models/file_move_response.rbi +23 -0
- data/rbi/imagekitio/models/file_rename_params.rbi +102 -0
- data/rbi/imagekitio/models/file_rename_response.rbi +35 -0
- data/rbi/imagekitio/models/file_update_params.rbi +58 -0
- data/rbi/imagekitio/models/file_update_response.rbi +322 -0
- data/rbi/imagekitio/models/file_upload_params.rbi +897 -0
- data/rbi/imagekitio/models/file_upload_response.rbi +1176 -0
- data/rbi/imagekitio/models/files/bulk_add_tags_params.rbi +56 -0
- data/rbi/imagekitio/models/files/bulk_add_tags_response.rbi +41 -0
- data/rbi/imagekitio/models/files/bulk_delete_params.rbi +48 -0
- data/rbi/imagekitio/models/files/bulk_delete_response.rbi +41 -0
- data/rbi/imagekitio/models/files/bulk_remove_ai_tags_params.rbi +56 -0
- data/rbi/imagekitio/models/files/bulk_remove_ai_tags_response.rbi +41 -0
- data/rbi/imagekitio/models/files/bulk_remove_tags_params.rbi +56 -0
- data/rbi/imagekitio/models/files/bulk_remove_tags_response.rbi +41 -0
- data/rbi/imagekitio/models/files/metadata_get_from_url_params.rbi +47 -0
- data/rbi/imagekitio/models/files/metadata_get_params.rbi +34 -0
- data/rbi/imagekitio/models/files/version_delete_params.rbi +40 -0
- data/rbi/imagekitio/models/files/version_delete_response.rbi +25 -0
- data/rbi/imagekitio/models/files/version_get_params.rbi +40 -0
- data/rbi/imagekitio/models/files/version_list_params.rbi +34 -0
- data/rbi/imagekitio/models/files/version_list_response.rbi +13 -0
- data/rbi/imagekitio/models/files/version_restore_params.rbi +40 -0
- data/rbi/imagekitio/models/folder.rbi +121 -0
- data/rbi/imagekitio/models/folder_copy_params.rbi +68 -0
- data/rbi/imagekitio/models/folder_copy_response.rbi +33 -0
- data/rbi/imagekitio/models/folder_create_params.rbi +71 -0
- data/rbi/imagekitio/models/folder_create_response.rbi +23 -0
- data/rbi/imagekitio/models/folder_delete_params.rbi +40 -0
- data/rbi/imagekitio/models/folder_delete_response.rbi +23 -0
- data/rbi/imagekitio/models/folder_move_params.rbi +53 -0
- data/rbi/imagekitio/models/folder_move_response.rbi +33 -0
- data/rbi/imagekitio/models/folder_rename_params.rbi +98 -0
- data/rbi/imagekitio/models/folder_rename_response.rbi +33 -0
- data/rbi/imagekitio/models/folders/job_get_params.rbi +34 -0
- data/rbi/imagekitio/models/folders/job_get_response.rbi +173 -0
- data/rbi/imagekitio/models/get_image_attributes_options.rbi +121 -0
- data/rbi/imagekitio/models/image_overlay.rbi +109 -0
- data/rbi/imagekitio/models/metadata.rbi +813 -0
- data/rbi/imagekitio/models/overlay.rbi +28 -0
- data/rbi/imagekitio/models/overlay_position.rbi +148 -0
- data/rbi/imagekitio/models/overlay_timing.rbi +135 -0
- data/rbi/imagekitio/models/responsive_image_attributes.rbi +74 -0
- data/rbi/imagekitio/models/solid_color_overlay.rbi +79 -0
- data/rbi/imagekitio/models/solid_color_overlay_transformation.rbi +218 -0
- data/rbi/imagekitio/models/src_options.rbi +159 -0
- data/rbi/imagekitio/models/streaming_resolution.rbi +38 -0
- data/rbi/imagekitio/models/subtitle_overlay.rbi +114 -0
- data/rbi/imagekitio/models/subtitle_overlay_transformation.rbi +215 -0
- data/rbi/imagekitio/models/text_overlay.rbi +110 -0
- data/rbi/imagekitio/models/text_overlay_transformation.rbi +451 -0
- data/rbi/imagekitio/models/transformation.rbi +1646 -0
- data/rbi/imagekitio/models/transformation_position.rbi +28 -0
- data/rbi/imagekitio/models/unsafe_unwrap_webhook_event.rbi +33 -0
- data/rbi/imagekitio/models/unwrap_webhook_event.rbi +31 -0
- data/rbi/imagekitio/models/update_file_request.rbi +316 -0
- data/rbi/imagekitio/models/upload_post_transform_error_event.rbi +434 -0
- data/rbi/imagekitio/models/upload_post_transform_success_event.rbi +327 -0
- data/rbi/imagekitio/models/upload_pre_transform_error_event.rbi +244 -0
- data/rbi/imagekitio/models/upload_pre_transform_success_event.rbi +1300 -0
- data/rbi/imagekitio/models/video_overlay.rbi +105 -0
- data/rbi/imagekitio/models/video_transformation_accepted_event.rbi +659 -0
- data/rbi/imagekitio/models/video_transformation_error_event.rbi +772 -0
- data/rbi/imagekitio/models/video_transformation_ready_event.rbi +864 -0
- data/rbi/imagekitio/models/webhook_unsafe_unwrap_params.rbi +30 -0
- data/rbi/imagekitio/models/webhook_unwrap_params.rbi +27 -0
- data/rbi/imagekitio/models.rbi +135 -0
- data/rbi/imagekitio/request_options.rbi +59 -0
- data/rbi/imagekitio/resources/accounts/origins.rbi +91 -0
- data/rbi/imagekitio/resources/accounts/url_endpoints.rbi +129 -0
- data/rbi/imagekitio/resources/accounts/usage.rbi +36 -0
- data/rbi/imagekitio/resources/accounts.rbi +21 -0
- data/rbi/imagekitio/resources/assets.rbi +74 -0
- data/rbi/imagekitio/resources/beta/v2/files.rbi +193 -0
- data/rbi/imagekitio/resources/beta/v2.rbi +17 -0
- data/rbi/imagekitio/resources/beta.rbi +15 -0
- data/rbi/imagekitio/resources/cache/invalidation.rbi +44 -0
- data/rbi/imagekitio/resources/cache.rbi +15 -0
- data/rbi/imagekitio/resources/custom_metadata_fields.rbi +106 -0
- data/rbi/imagekitio/resources/files/bulk.rbi +88 -0
- data/rbi/imagekitio/resources/files/metadata.rbi +49 -0
- data/rbi/imagekitio/resources/files/versions.rbi +89 -0
- data/rbi/imagekitio/resources/files.rbi +364 -0
- data/rbi/imagekitio/resources/folders/job.rbi +29 -0
- data/rbi/imagekitio/resources/folders.rbi +146 -0
- data/rbi/imagekitio/resources/webhooks.rbi +50 -0
- data/rbi/imagekitio/version.rbi +5 -0
- data/sig/imagekitio/client.rbs +47 -0
- data/sig/imagekitio/errors.rbs +117 -0
- data/sig/imagekitio/file_part.rbs +21 -0
- data/sig/imagekitio/helpers/helper.rbs +24 -0
- data/sig/imagekitio/internal/transport/base_client.rbs +131 -0
- data/sig/imagekitio/internal/transport/pooled_net_requester.rbs +45 -0
- data/sig/imagekitio/internal/type/array_of.rbs +48 -0
- data/sig/imagekitio/internal/type/base_model.rbs +102 -0
- data/sig/imagekitio/internal/type/base_page.rbs +24 -0
- data/sig/imagekitio/internal/type/boolean.rbs +26 -0
- data/sig/imagekitio/internal/type/converter.rbs +79 -0
- data/sig/imagekitio/internal/type/enum.rbs +32 -0
- data/sig/imagekitio/internal/type/file_input.rbs +25 -0
- data/sig/imagekitio/internal/type/hash_of.rbs +48 -0
- data/sig/imagekitio/internal/type/request_parameters.rbs +19 -0
- data/sig/imagekitio/internal/type/union.rbs +52 -0
- data/sig/imagekitio/internal/type/unknown.rbs +26 -0
- data/sig/imagekitio/internal/util.rbs +185 -0
- data/sig/imagekitio/internal.rbs +9 -0
- data/sig/imagekitio/models/accounts/origin_create_params.rbs +30 -0
- data/sig/imagekitio/models/accounts/origin_delete_params.rbs +17 -0
- data/sig/imagekitio/models/accounts/origin_get_params.rbs +17 -0
- data/sig/imagekitio/models/accounts/origin_list_params.rbs +17 -0
- data/sig/imagekitio/models/accounts/origin_list_response.rbs +10 -0
- data/sig/imagekitio/models/accounts/origin_request.rbs +468 -0
- data/sig/imagekitio/models/accounts/origin_response.rbs +418 -0
- data/sig/imagekitio/models/accounts/origin_update_params.rbs +30 -0
- data/sig/imagekitio/models/accounts/url_endpoint_create_params.rbs +17 -0
- data/sig/imagekitio/models/accounts/url_endpoint_delete_params.rbs +17 -0
- data/sig/imagekitio/models/accounts/url_endpoint_get_params.rbs +17 -0
- data/sig/imagekitio/models/accounts/url_endpoint_list_params.rbs +17 -0
- data/sig/imagekitio/models/accounts/url_endpoint_list_response.rbs +10 -0
- data/sig/imagekitio/models/accounts/url_endpoint_request.rbs +97 -0
- data/sig/imagekitio/models/accounts/url_endpoint_response.rbs +96 -0
- data/sig/imagekitio/models/accounts/url_endpoint_update_params.rbs +17 -0
- data/sig/imagekitio/models/accounts/usage_get_params.rbs +30 -0
- data/sig/imagekitio/models/accounts/usage_get_response.rbs +52 -0
- data/sig/imagekitio/models/asset_list_params.rbs +138 -0
- data/sig/imagekitio/models/asset_list_response.rbs +16 -0
- data/sig/imagekitio/models/base_overlay.rbs +31 -0
- data/sig/imagekitio/models/base_webhook_event.rbs +15 -0
- data/sig/imagekitio/models/beta/v2/file_upload_params.rbs +310 -0
- data/sig/imagekitio/models/beta/v2/file_upload_response.rbs +487 -0
- data/sig/imagekitio/models/cache/invalidation_create_params.rbs +25 -0
- data/sig/imagekitio/models/cache/invalidation_create_response.rbs +17 -0
- data/sig/imagekitio/models/cache/invalidation_get_params.rbs +17 -0
- data/sig/imagekitio/models/cache/invalidation_get_response.rbs +35 -0
- data/sig/imagekitio/models/custom_metadata_field.rbs +178 -0
- data/sig/imagekitio/models/custom_metadata_field_create_params.rbs +179 -0
- data/sig/imagekitio/models/custom_metadata_field_delete_params.rbs +15 -0
- data/sig/imagekitio/models/custom_metadata_field_delete_response.rbs +11 -0
- data/sig/imagekitio/models/custom_metadata_field_list_params.rbs +32 -0
- data/sig/imagekitio/models/custom_metadata_field_list_response.rbs +8 -0
- data/sig/imagekitio/models/custom_metadata_field_update_params.rbs +152 -0
- data/sig/imagekitio/models/extensions.rbs +132 -0
- data/sig/imagekitio/models/file.rbs +384 -0
- data/sig/imagekitio/models/file_copy_params.rbs +38 -0
- data/sig/imagekitio/models/file_copy_response.rbs +11 -0
- data/sig/imagekitio/models/file_delete_params.rbs +15 -0
- data/sig/imagekitio/models/file_get_params.rbs +14 -0
- data/sig/imagekitio/models/file_move_params.rbs +28 -0
- data/sig/imagekitio/models/file_move_response.rbs +11 -0
- data/sig/imagekitio/models/file_rename_params.rbs +34 -0
- data/sig/imagekitio/models/file_rename_response.rbs +15 -0
- data/sig/imagekitio/models/file_update_params.rbs +28 -0
- data/sig/imagekitio/models/file_update_response.rbs +120 -0
- data/sig/imagekitio/models/file_upload_params.rbs +327 -0
- data/sig/imagekitio/models/file_upload_response.rbs +483 -0
- data/sig/imagekitio/models/files/bulk_add_tags_params.rbs +30 -0
- data/sig/imagekitio/models/files/bulk_add_tags_response.rbs +20 -0
- data/sig/imagekitio/models/files/bulk_delete_params.rbs +26 -0
- data/sig/imagekitio/models/files/bulk_delete_response.rbs +20 -0
- data/sig/imagekitio/models/files/bulk_remove_ai_tags_params.rbs +30 -0
- data/sig/imagekitio/models/files/bulk_remove_ai_tags_response.rbs +20 -0
- data/sig/imagekitio/models/files/bulk_remove_tags_params.rbs +30 -0
- data/sig/imagekitio/models/files/bulk_remove_tags_response.rbs +20 -0
- data/sig/imagekitio/models/files/metadata_get_from_url_params.rbs +25 -0
- data/sig/imagekitio/models/files/metadata_get_params.rbs +17 -0
- data/sig/imagekitio/models/files/version_delete_params.rbs +25 -0
- data/sig/imagekitio/models/files/version_delete_response.rbs +13 -0
- data/sig/imagekitio/models/files/version_get_params.rbs +25 -0
- data/sig/imagekitio/models/files/version_list_params.rbs +17 -0
- data/sig/imagekitio/models/files/version_list_response.rbs +9 -0
- data/sig/imagekitio/models/files/version_restore_params.rbs +25 -0
- data/sig/imagekitio/models/folder.rbs +69 -0
- data/sig/imagekitio/models/folder_copy_params.rbs +38 -0
- data/sig/imagekitio/models/folder_copy_response.rbs +13 -0
- data/sig/imagekitio/models/folder_create_params.rbs +28 -0
- data/sig/imagekitio/models/folder_create_response.rbs +11 -0
- data/sig/imagekitio/models/folder_delete_params.rbs +23 -0
- data/sig/imagekitio/models/folder_delete_response.rbs +11 -0
- data/sig/imagekitio/models/folder_move_params.rbs +28 -0
- data/sig/imagekitio/models/folder_move_response.rbs +13 -0
- data/sig/imagekitio/models/folder_rename_params.rbs +34 -0
- data/sig/imagekitio/models/folder_rename_response.rbs +13 -0
- data/sig/imagekitio/models/folders/job_get_params.rbs +17 -0
- data/sig/imagekitio/models/folders/job_get_response.rbs +72 -0
- data/sig/imagekitio/models/get_image_attributes_options.rbs +43 -0
- data/sig/imagekitio/models/image_overlay.rbs +59 -0
- data/sig/imagekitio/models/metadata.rbs +546 -0
- data/sig/imagekitio/models/overlay.rbs +16 -0
- data/sig/imagekitio/models/overlay_position.rbs +85 -0
- data/sig/imagekitio/models/overlay_timing.rbs +66 -0
- data/sig/imagekitio/models/responsive_image_attributes.rbs +36 -0
- data/sig/imagekitio/models/solid_color_overlay.rbs +38 -0
- data/sig/imagekitio/models/solid_color_overlay_transformation.rbs +97 -0
- data/sig/imagekitio/models/src_options.rbs +64 -0
- data/sig/imagekitio/models/streaming_resolution.rbs +20 -0
- data/sig/imagekitio/models/subtitle_overlay.rbs +59 -0
- data/sig/imagekitio/models/subtitle_overlay_transformation.rbs +78 -0
- data/sig/imagekitio/models/text_overlay.rbs +59 -0
- data/sig/imagekitio/models/text_overlay_transformation.rbs +195 -0
- data/sig/imagekitio/models/transformation.rbs +763 -0
- data/sig/imagekitio/models/transformation_position.rbs +14 -0
- data/sig/imagekitio/models/unsafe_unwrap_webhook_event.rbs +18 -0
- data/sig/imagekitio/models/unwrap_webhook_event.rbs +18 -0
- data/sig/imagekitio/models/update_file_request.rbs +122 -0
- data/sig/imagekitio/models/upload_post_transform_error_event.rbs +192 -0
- data/sig/imagekitio/models/upload_post_transform_success_event.rbs +142 -0
- data/sig/imagekitio/models/upload_pre_transform_error_event.rbs +115 -0
- data/sig/imagekitio/models/upload_pre_transform_success_event.rbs +541 -0
- data/sig/imagekitio/models/video_overlay.rbs +59 -0
- data/sig/imagekitio/models/video_transformation_accepted_event.rbs +261 -0
- data/sig/imagekitio/models/video_transformation_error_event.rbs +300 -0
- data/sig/imagekitio/models/video_transformation_ready_event.rbs +359 -0
- data/sig/imagekitio/models/webhook_unsafe_unwrap_params.rbs +15 -0
- data/sig/imagekitio/models/webhook_unwrap_params.rbs +15 -0
- data/sig/imagekitio/models.rbs +119 -0
- data/sig/imagekitio/request_options.rbs +36 -0
- data/sig/imagekitio/resources/accounts/origins.rbs +34 -0
- data/sig/imagekitio/resources/accounts/url_endpoints.rbs +40 -0
- data/sig/imagekitio/resources/accounts/usage.rbs +15 -0
- data/sig/imagekitio/resources/accounts.rbs +13 -0
- data/sig/imagekitio/resources/assets.rbs +18 -0
- data/sig/imagekitio/resources/beta/v2/files.rbs +35 -0
- data/sig/imagekitio/resources/beta/v2.rbs +11 -0
- data/sig/imagekitio/resources/beta.rbs +9 -0
- data/sig/imagekitio/resources/cache/invalidation.rbs +19 -0
- data/sig/imagekitio/resources/cache.rbs +9 -0
- data/sig/imagekitio/resources/custom_metadata_fields.rbs +32 -0
- data/sig/imagekitio/resources/files/bulk.rbs +32 -0
- data/sig/imagekitio/resources/files/metadata.rbs +19 -0
- data/sig/imagekitio/resources/files/versions.rbs +32 -0
- data/sig/imagekitio/resources/files.rbs +76 -0
- data/sig/imagekitio/resources/folders/job.rbs +14 -0
- data/sig/imagekitio/resources/folders.rbs +40 -0
- data/sig/imagekitio/resources/webhooks.rbs +27 -0
- data/sig/imagekitio/version.rbs +3 -0
- metadata +470 -136
- data/Rakefile +0 -27
- data/lib/active_storage/active_storage.rb +0 -7
- data/lib/active_storage/service/ik_file.rb +0 -115
- data/lib/active_storage/service/image_kit_io_service.rb +0 -188
- data/lib/carrierwave/carrierwave.rb +0 -83
- data/lib/carrierwave/storage/ik_file.rb +0 -51
- data/lib/carrierwave/storage/imagekit_store.rb +0 -68
- data/lib/carrierwave/support/uri_filename.rb +0 -12
- data/lib/imagekitio/api_service/bulk.rb +0 -58
- data/lib/imagekitio/api_service/custom_metadata_field.rb +0 -52
- data/lib/imagekitio/api_service/file.rb +0 -221
- data/lib/imagekitio/api_service/folder.rb +0 -49
- data/lib/imagekitio/base.rb +0 -12
- data/lib/imagekitio/configurable.rb +0 -43
- data/lib/imagekitio/constant.rb +0 -36
- data/lib/imagekitio/constants/default.rb +0 -22
- data/lib/imagekitio/constants/error.rb +0 -69
- data/lib/imagekitio/constants/file.rb +0 -11
- data/lib/imagekitio/constants/supported_transformation.rb +0 -39
- data/lib/imagekitio/constants/url.rb +0 -14
- data/lib/imagekitio/railtie.rb +0 -4
- data/lib/imagekitio/request.rb +0 -98
- data/lib/imagekitio/sdk/version.rb +0 -5
- data/lib/imagekitio/url.rb +0 -216
- data/lib/imagekitio/utils/calculation.rb +0 -45
- data/lib/imagekitio/utils/formatter.rb +0 -48
- data/lib/imagekitio/utils/option_validator.rb +0 -36
- data/lib/tasks/imagekitio/imagekitio_tasks.rake +0 -4
|
@@ -0,0 +1,497 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Imagekitio
|
|
4
|
+
module Models
|
|
5
|
+
# @see Imagekitio::Resources::Files#get
|
|
6
|
+
class File < Imagekitio::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute ai_tags
|
|
8
|
+
# An array of tags assigned to the file by auto tagging.
|
|
9
|
+
#
|
|
10
|
+
# @return [Array<Imagekitio::Models::File::AITag>, nil]
|
|
11
|
+
optional :ai_tags,
|
|
12
|
+
-> { Imagekitio::Internal::Type::ArrayOf[Imagekitio::File::AITag] },
|
|
13
|
+
api_name: :AITags,
|
|
14
|
+
nil?: true
|
|
15
|
+
|
|
16
|
+
# @!attribute created_at
|
|
17
|
+
# Date and time when the file was uploaded. The date and time is in ISO8601
|
|
18
|
+
# format.
|
|
19
|
+
#
|
|
20
|
+
# @return [Time, nil]
|
|
21
|
+
optional :created_at, Time, api_name: :createdAt
|
|
22
|
+
|
|
23
|
+
# @!attribute custom_coordinates
|
|
24
|
+
# An string with custom coordinates of the file.
|
|
25
|
+
#
|
|
26
|
+
# @return [String, nil]
|
|
27
|
+
optional :custom_coordinates, String, api_name: :customCoordinates, nil?: true
|
|
28
|
+
|
|
29
|
+
# @!attribute custom_metadata
|
|
30
|
+
# An object with custom metadata for the file.
|
|
31
|
+
#
|
|
32
|
+
# @return [Hash{Symbol=>Object}, nil]
|
|
33
|
+
optional :custom_metadata,
|
|
34
|
+
Imagekitio::Internal::Type::HashOf[Imagekitio::Internal::Type::Unknown],
|
|
35
|
+
api_name: :customMetadata
|
|
36
|
+
|
|
37
|
+
# @!attribute description
|
|
38
|
+
# Optional text to describe the contents of the file. Can be set by the user or
|
|
39
|
+
# the ai-auto-description extension.
|
|
40
|
+
#
|
|
41
|
+
# @return [String, nil]
|
|
42
|
+
optional :description, String
|
|
43
|
+
|
|
44
|
+
# @!attribute file_id
|
|
45
|
+
# Unique identifier of the asset.
|
|
46
|
+
#
|
|
47
|
+
# @return [String, nil]
|
|
48
|
+
optional :file_id, String, api_name: :fileId
|
|
49
|
+
|
|
50
|
+
# @!attribute file_path
|
|
51
|
+
# Path of the file. This is the path you would use in the URL to access the file.
|
|
52
|
+
# For example, if the file is at the root of the media library, the path will be
|
|
53
|
+
# `/file.jpg`. If the file is inside a folder named `images`, the path will be
|
|
54
|
+
# `/images/file.jpg`.
|
|
55
|
+
#
|
|
56
|
+
# @return [String, nil]
|
|
57
|
+
optional :file_path, String, api_name: :filePath
|
|
58
|
+
|
|
59
|
+
# @!attribute file_type
|
|
60
|
+
# Type of the file. Possible values are `image`, `non-image`.
|
|
61
|
+
#
|
|
62
|
+
# @return [String, nil]
|
|
63
|
+
optional :file_type, String, api_name: :fileType
|
|
64
|
+
|
|
65
|
+
# @!attribute has_alpha
|
|
66
|
+
# Specifies if the image has an alpha channel.
|
|
67
|
+
#
|
|
68
|
+
# @return [Boolean, nil]
|
|
69
|
+
optional :has_alpha, Imagekitio::Internal::Type::Boolean, api_name: :hasAlpha
|
|
70
|
+
|
|
71
|
+
# @!attribute height
|
|
72
|
+
# Height of the file.
|
|
73
|
+
#
|
|
74
|
+
# @return [Float, nil]
|
|
75
|
+
optional :height, Float
|
|
76
|
+
|
|
77
|
+
# @!attribute is_private_file
|
|
78
|
+
# Specifies if the file is private or not.
|
|
79
|
+
#
|
|
80
|
+
# @return [Boolean, nil]
|
|
81
|
+
optional :is_private_file, Imagekitio::Internal::Type::Boolean, api_name: :isPrivateFile
|
|
82
|
+
|
|
83
|
+
# @!attribute is_published
|
|
84
|
+
# Specifies if the file is published or not.
|
|
85
|
+
#
|
|
86
|
+
# @return [Boolean, nil]
|
|
87
|
+
optional :is_published, Imagekitio::Internal::Type::Boolean, api_name: :isPublished
|
|
88
|
+
|
|
89
|
+
# @!attribute mime
|
|
90
|
+
# MIME type of the file.
|
|
91
|
+
#
|
|
92
|
+
# @return [String, nil]
|
|
93
|
+
optional :mime, String
|
|
94
|
+
|
|
95
|
+
# @!attribute name
|
|
96
|
+
# Name of the asset.
|
|
97
|
+
#
|
|
98
|
+
# @return [String, nil]
|
|
99
|
+
optional :name, String
|
|
100
|
+
|
|
101
|
+
# @!attribute selected_fields_schema
|
|
102
|
+
# This field is included in the response only if the Path policy feature is
|
|
103
|
+
# available in the plan. It contains schema definitions for the custom metadata
|
|
104
|
+
# fields selected for the specified file path. Field selection can only be done
|
|
105
|
+
# when the Path policy feature is enabled.
|
|
106
|
+
#
|
|
107
|
+
# Keys are the names of the custom metadata fields; the value object has details
|
|
108
|
+
# about the custom metadata schema.
|
|
109
|
+
#
|
|
110
|
+
# @return [Hash{Symbol=>Imagekitio::Models::File::SelectedFieldsSchema}, nil]
|
|
111
|
+
optional :selected_fields_schema,
|
|
112
|
+
-> { Imagekitio::Internal::Type::HashOf[Imagekitio::File::SelectedFieldsSchema] },
|
|
113
|
+
api_name: :selectedFieldsSchema
|
|
114
|
+
|
|
115
|
+
# @!attribute size
|
|
116
|
+
# Size of the file in bytes.
|
|
117
|
+
#
|
|
118
|
+
# @return [Float, nil]
|
|
119
|
+
optional :size, Float
|
|
120
|
+
|
|
121
|
+
# @!attribute tags
|
|
122
|
+
# An array of tags assigned to the file. Tags are used to search files in the
|
|
123
|
+
# media library.
|
|
124
|
+
#
|
|
125
|
+
# @return [Array<String>, nil]
|
|
126
|
+
optional :tags, Imagekitio::Internal::Type::ArrayOf[String], nil?: true
|
|
127
|
+
|
|
128
|
+
# @!attribute thumbnail
|
|
129
|
+
# URL of the thumbnail image. This URL is used to access the thumbnail image of
|
|
130
|
+
# the file in the media library.
|
|
131
|
+
#
|
|
132
|
+
# @return [String, nil]
|
|
133
|
+
optional :thumbnail, String
|
|
134
|
+
|
|
135
|
+
# @!attribute type
|
|
136
|
+
# Type of the asset.
|
|
137
|
+
#
|
|
138
|
+
# @return [Symbol, Imagekitio::Models::File::Type, nil]
|
|
139
|
+
optional :type, enum: -> { Imagekitio::File::Type }
|
|
140
|
+
|
|
141
|
+
# @!attribute updated_at
|
|
142
|
+
# Date and time when the file was last updated. The date and time is in ISO8601
|
|
143
|
+
# format.
|
|
144
|
+
#
|
|
145
|
+
# @return [Time, nil]
|
|
146
|
+
optional :updated_at, Time, api_name: :updatedAt
|
|
147
|
+
|
|
148
|
+
# @!attribute url
|
|
149
|
+
# URL of the file.
|
|
150
|
+
#
|
|
151
|
+
# @return [String, nil]
|
|
152
|
+
optional :url, String
|
|
153
|
+
|
|
154
|
+
# @!attribute version_info
|
|
155
|
+
# An object with details of the file version.
|
|
156
|
+
#
|
|
157
|
+
# @return [Imagekitio::Models::File::VersionInfo, nil]
|
|
158
|
+
optional :version_info, -> { Imagekitio::File::VersionInfo }, api_name: :versionInfo
|
|
159
|
+
|
|
160
|
+
# @!attribute width
|
|
161
|
+
# Width of the file.
|
|
162
|
+
#
|
|
163
|
+
# @return [Float, nil]
|
|
164
|
+
optional :width, Float
|
|
165
|
+
|
|
166
|
+
# @!method initialize(ai_tags: nil, created_at: nil, custom_coordinates: nil, custom_metadata: nil, description: nil, file_id: nil, file_path: nil, file_type: nil, has_alpha: nil, height: nil, is_private_file: nil, is_published: nil, mime: nil, name: nil, selected_fields_schema: nil, size: nil, tags: nil, thumbnail: nil, type: nil, updated_at: nil, url: nil, version_info: nil, width: nil)
|
|
167
|
+
# Some parameter documentations has been truncated, see {Imagekitio::Models::File}
|
|
168
|
+
# for more details.
|
|
169
|
+
#
|
|
170
|
+
# Object containing details of a file or file version.
|
|
171
|
+
#
|
|
172
|
+
# @param ai_tags [Array<Imagekitio::Models::File::AITag>, nil] An array of tags assigned to the file by auto tagging.
|
|
173
|
+
#
|
|
174
|
+
# @param created_at [Time] Date and time when the file was uploaded. The date and time is in ISO8601 format
|
|
175
|
+
#
|
|
176
|
+
# @param custom_coordinates [String, nil] An string with custom coordinates of the file.
|
|
177
|
+
#
|
|
178
|
+
# @param custom_metadata [Hash{Symbol=>Object}] An object with custom metadata for the file.
|
|
179
|
+
#
|
|
180
|
+
# @param description [String] Optional text to describe the contents of the file. Can be set by the user or th
|
|
181
|
+
#
|
|
182
|
+
# @param file_id [String] Unique identifier of the asset.
|
|
183
|
+
#
|
|
184
|
+
# @param file_path [String] Path of the file. This is the path you would use in the URL to access the file.
|
|
185
|
+
#
|
|
186
|
+
# @param file_type [String] Type of the file. Possible values are `image`, `non-image`.
|
|
187
|
+
#
|
|
188
|
+
# @param has_alpha [Boolean] Specifies if the image has an alpha channel.
|
|
189
|
+
#
|
|
190
|
+
# @param height [Float] Height of the file.
|
|
191
|
+
#
|
|
192
|
+
# @param is_private_file [Boolean] Specifies if the file is private or not.
|
|
193
|
+
#
|
|
194
|
+
# @param is_published [Boolean] Specifies if the file is published or not.
|
|
195
|
+
#
|
|
196
|
+
# @param mime [String] MIME type of the file.
|
|
197
|
+
#
|
|
198
|
+
# @param name [String] Name of the asset.
|
|
199
|
+
#
|
|
200
|
+
# @param selected_fields_schema [Hash{Symbol=>Imagekitio::Models::File::SelectedFieldsSchema}] This field is included in the response only if the Path policy feature is availa
|
|
201
|
+
#
|
|
202
|
+
# @param size [Float] Size of the file in bytes.
|
|
203
|
+
#
|
|
204
|
+
# @param tags [Array<String>, nil] An array of tags assigned to the file. Tags are used to search files in the medi
|
|
205
|
+
#
|
|
206
|
+
# @param thumbnail [String] URL of the thumbnail image. This URL is used to access the thumbnail image of th
|
|
207
|
+
#
|
|
208
|
+
# @param type [Symbol, Imagekitio::Models::File::Type] Type of the asset.
|
|
209
|
+
#
|
|
210
|
+
# @param updated_at [Time] Date and time when the file was last updated. The date and time is in ISO8601 fo
|
|
211
|
+
#
|
|
212
|
+
# @param url [String] URL of the file.
|
|
213
|
+
#
|
|
214
|
+
# @param version_info [Imagekitio::Models::File::VersionInfo] An object with details of the file version.
|
|
215
|
+
#
|
|
216
|
+
# @param width [Float] Width of the file.
|
|
217
|
+
|
|
218
|
+
class AITag < Imagekitio::Internal::Type::BaseModel
|
|
219
|
+
# @!attribute confidence
|
|
220
|
+
# Confidence score of the tag.
|
|
221
|
+
#
|
|
222
|
+
# @return [Float, nil]
|
|
223
|
+
optional :confidence, Float
|
|
224
|
+
|
|
225
|
+
# @!attribute name
|
|
226
|
+
# Name of the tag.
|
|
227
|
+
#
|
|
228
|
+
# @return [String, nil]
|
|
229
|
+
optional :name, String
|
|
230
|
+
|
|
231
|
+
# @!attribute source
|
|
232
|
+
# Source of the tag. Possible values are `google-auto-tagging` and
|
|
233
|
+
# `aws-auto-tagging`.
|
|
234
|
+
#
|
|
235
|
+
# @return [String, nil]
|
|
236
|
+
optional :source, String
|
|
237
|
+
|
|
238
|
+
# @!method initialize(confidence: nil, name: nil, source: nil)
|
|
239
|
+
# Some parameter documentations has been truncated, see
|
|
240
|
+
# {Imagekitio::Models::File::AITag} for more details.
|
|
241
|
+
#
|
|
242
|
+
# @param confidence [Float] Confidence score of the tag.
|
|
243
|
+
#
|
|
244
|
+
# @param name [String] Name of the tag.
|
|
245
|
+
#
|
|
246
|
+
# @param source [String] Source of the tag. Possible values are `google-auto-tagging` and `aws-auto-taggi
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
class SelectedFieldsSchema < Imagekitio::Internal::Type::BaseModel
|
|
250
|
+
# @!attribute type
|
|
251
|
+
# Type of the custom metadata field.
|
|
252
|
+
#
|
|
253
|
+
# @return [Symbol, Imagekitio::Models::File::SelectedFieldsSchema::Type]
|
|
254
|
+
required :type, enum: -> { Imagekitio::File::SelectedFieldsSchema::Type }
|
|
255
|
+
|
|
256
|
+
# @!attribute default_value
|
|
257
|
+
# The default value for this custom metadata field. The value should match the
|
|
258
|
+
# `type` of custom metadata field.
|
|
259
|
+
#
|
|
260
|
+
# @return [String, Float, Boolean, Array<String, Float, Boolean>, nil]
|
|
261
|
+
optional :default_value,
|
|
262
|
+
union: -> { Imagekitio::File::SelectedFieldsSchema::DefaultValue },
|
|
263
|
+
api_name: :defaultValue
|
|
264
|
+
|
|
265
|
+
# @!attribute is_value_required
|
|
266
|
+
# Specifies if the custom metadata field is required or not.
|
|
267
|
+
#
|
|
268
|
+
# @return [Boolean, nil]
|
|
269
|
+
optional :is_value_required, Imagekitio::Internal::Type::Boolean, api_name: :isValueRequired
|
|
270
|
+
|
|
271
|
+
# @!attribute max_length
|
|
272
|
+
# Maximum length of string. Only set if `type` is set to `Text` or `Textarea`.
|
|
273
|
+
#
|
|
274
|
+
# @return [Float, nil]
|
|
275
|
+
optional :max_length, Float, api_name: :maxLength
|
|
276
|
+
|
|
277
|
+
# @!attribute max_value
|
|
278
|
+
# Maximum value of the field. Only set if field type is `Date` or `Number`. For
|
|
279
|
+
# `Date` type field, the value will be in ISO8601 string format. For `Number` type
|
|
280
|
+
# field, it will be a numeric value.
|
|
281
|
+
#
|
|
282
|
+
# @return [String, Float, nil]
|
|
283
|
+
optional :max_value,
|
|
284
|
+
union: -> {
|
|
285
|
+
Imagekitio::File::SelectedFieldsSchema::MaxValue
|
|
286
|
+
},
|
|
287
|
+
api_name: :maxValue
|
|
288
|
+
|
|
289
|
+
# @!attribute min_length
|
|
290
|
+
# Minimum length of string. Only set if `type` is set to `Text` or `Textarea`.
|
|
291
|
+
#
|
|
292
|
+
# @return [Float, nil]
|
|
293
|
+
optional :min_length, Float, api_name: :minLength
|
|
294
|
+
|
|
295
|
+
# @!attribute min_value
|
|
296
|
+
# Minimum value of the field. Only set if field type is `Date` or `Number`. For
|
|
297
|
+
# `Date` type field, the value will be in ISO8601 string format. For `Number` type
|
|
298
|
+
# field, it will be a numeric value.
|
|
299
|
+
#
|
|
300
|
+
# @return [String, Float, nil]
|
|
301
|
+
optional :min_value,
|
|
302
|
+
union: -> {
|
|
303
|
+
Imagekitio::File::SelectedFieldsSchema::MinValue
|
|
304
|
+
},
|
|
305
|
+
api_name: :minValue
|
|
306
|
+
|
|
307
|
+
# @!attribute read_only
|
|
308
|
+
# Indicates whether the custom metadata field is read only. A read only field
|
|
309
|
+
# cannot be modified after being set. This field is configurable only via the
|
|
310
|
+
# **Path policy** feature.
|
|
311
|
+
#
|
|
312
|
+
# @return [Boolean, nil]
|
|
313
|
+
optional :read_only, Imagekitio::Internal::Type::Boolean, api_name: :readOnly
|
|
314
|
+
|
|
315
|
+
# @!attribute select_options
|
|
316
|
+
# An array of allowed values when field type is `SingleSelect` or `MultiSelect`.
|
|
317
|
+
#
|
|
318
|
+
# @return [Array<String, Float, Boolean>, nil]
|
|
319
|
+
optional :select_options,
|
|
320
|
+
-> {
|
|
321
|
+
Imagekitio::Internal::Type::ArrayOf[union: Imagekitio::File::SelectedFieldsSchema::SelectOption]
|
|
322
|
+
},
|
|
323
|
+
api_name: :selectOptions
|
|
324
|
+
|
|
325
|
+
# @!attribute select_options_truncated
|
|
326
|
+
# Specifies if the selectOptions array is truncated. It is truncated when number
|
|
327
|
+
# of options are > 100.
|
|
328
|
+
#
|
|
329
|
+
# @return [Boolean, nil]
|
|
330
|
+
optional :select_options_truncated,
|
|
331
|
+
Imagekitio::Internal::Type::Boolean,
|
|
332
|
+
api_name: :selectOptionsTruncated
|
|
333
|
+
|
|
334
|
+
# @!method initialize(type:, default_value: nil, is_value_required: nil, max_length: nil, max_value: nil, min_length: nil, min_value: nil, read_only: nil, select_options: nil, select_options_truncated: nil)
|
|
335
|
+
# Some parameter documentations has been truncated, see
|
|
336
|
+
# {Imagekitio::Models::File::SelectedFieldsSchema} for more details.
|
|
337
|
+
#
|
|
338
|
+
# @param type [Symbol, Imagekitio::Models::File::SelectedFieldsSchema::Type] Type of the custom metadata field.
|
|
339
|
+
#
|
|
340
|
+
# @param default_value [String, Float, Boolean, Array<String, Float, Boolean>] The default value for this custom metadata field. The value should match the `ty
|
|
341
|
+
#
|
|
342
|
+
# @param is_value_required [Boolean] Specifies if the custom metadata field is required or not.
|
|
343
|
+
#
|
|
344
|
+
# @param max_length [Float] Maximum length of string. Only set if `type` is set to `Text` or `Textarea`.
|
|
345
|
+
#
|
|
346
|
+
# @param max_value [String, Float] Maximum value of the field. Only set if field type is `Date` or `Number`. For `D
|
|
347
|
+
#
|
|
348
|
+
# @param min_length [Float] Minimum length of string. Only set if `type` is set to `Text` or `Textarea`.
|
|
349
|
+
#
|
|
350
|
+
# @param min_value [String, Float] Minimum value of the field. Only set if field type is `Date` or `Number`. For `D
|
|
351
|
+
#
|
|
352
|
+
# @param read_only [Boolean] Indicates whether the custom metadata field is read only. A read only field cann
|
|
353
|
+
#
|
|
354
|
+
# @param select_options [Array<String, Float, Boolean>] An array of allowed values when field type is `SingleSelect` or `MultiSelect`.
|
|
355
|
+
#
|
|
356
|
+
# @param select_options_truncated [Boolean] Specifies if the selectOptions array is truncated. It is truncated when number o
|
|
357
|
+
|
|
358
|
+
# Type of the custom metadata field.
|
|
359
|
+
#
|
|
360
|
+
# @see Imagekitio::Models::File::SelectedFieldsSchema#type
|
|
361
|
+
module Type
|
|
362
|
+
extend Imagekitio::Internal::Type::Enum
|
|
363
|
+
|
|
364
|
+
TEXT = :Text
|
|
365
|
+
TEXTAREA = :Textarea
|
|
366
|
+
NUMBER = :Number
|
|
367
|
+
DATE = :Date
|
|
368
|
+
BOOLEAN = :Boolean
|
|
369
|
+
SINGLE_SELECT = :SingleSelect
|
|
370
|
+
MULTI_SELECT = :MultiSelect
|
|
371
|
+
|
|
372
|
+
# @!method self.values
|
|
373
|
+
# @return [Array<Symbol>]
|
|
374
|
+
end
|
|
375
|
+
|
|
376
|
+
# The default value for this custom metadata field. The value should match the
|
|
377
|
+
# `type` of custom metadata field.
|
|
378
|
+
#
|
|
379
|
+
# @see Imagekitio::Models::File::SelectedFieldsSchema#default_value
|
|
380
|
+
module DefaultValue
|
|
381
|
+
extend Imagekitio::Internal::Type::Union
|
|
382
|
+
|
|
383
|
+
variant String
|
|
384
|
+
|
|
385
|
+
variant Float
|
|
386
|
+
|
|
387
|
+
variant Imagekitio::Internal::Type::Boolean
|
|
388
|
+
|
|
389
|
+
# Default value should be of type array when custom metadata field type is set to `MultiSelect`.
|
|
390
|
+
variant -> { Imagekitio::Models::File::SelectedFieldsSchema::DefaultValue::MixedArray }
|
|
391
|
+
|
|
392
|
+
module Mixed
|
|
393
|
+
extend Imagekitio::Internal::Type::Union
|
|
394
|
+
|
|
395
|
+
variant String
|
|
396
|
+
|
|
397
|
+
variant Float
|
|
398
|
+
|
|
399
|
+
variant Imagekitio::Internal::Type::Boolean
|
|
400
|
+
|
|
401
|
+
# @!method self.variants
|
|
402
|
+
# @return [Array(String, Float, Boolean)]
|
|
403
|
+
end
|
|
404
|
+
|
|
405
|
+
# @!method self.variants
|
|
406
|
+
# @return [Array(String, Float, Boolean, Array<String, Float, Boolean>)]
|
|
407
|
+
|
|
408
|
+
# @type [Imagekitio::Internal::Type::Converter]
|
|
409
|
+
MixedArray =
|
|
410
|
+
Imagekitio::Internal::Type::ArrayOf[union: -> {
|
|
411
|
+
Imagekitio::File::SelectedFieldsSchema::DefaultValue::Mixed
|
|
412
|
+
}]
|
|
413
|
+
end
|
|
414
|
+
|
|
415
|
+
# Maximum value of the field. Only set if field type is `Date` or `Number`. For
|
|
416
|
+
# `Date` type field, the value will be in ISO8601 string format. For `Number` type
|
|
417
|
+
# field, it will be a numeric value.
|
|
418
|
+
#
|
|
419
|
+
# @see Imagekitio::Models::File::SelectedFieldsSchema#max_value
|
|
420
|
+
module MaxValue
|
|
421
|
+
extend Imagekitio::Internal::Type::Union
|
|
422
|
+
|
|
423
|
+
variant String
|
|
424
|
+
|
|
425
|
+
variant Float
|
|
426
|
+
|
|
427
|
+
# @!method self.variants
|
|
428
|
+
# @return [Array(String, Float)]
|
|
429
|
+
end
|
|
430
|
+
|
|
431
|
+
# Minimum value of the field. Only set if field type is `Date` or `Number`. For
|
|
432
|
+
# `Date` type field, the value will be in ISO8601 string format. For `Number` type
|
|
433
|
+
# field, it will be a numeric value.
|
|
434
|
+
#
|
|
435
|
+
# @see Imagekitio::Models::File::SelectedFieldsSchema#min_value
|
|
436
|
+
module MinValue
|
|
437
|
+
extend Imagekitio::Internal::Type::Union
|
|
438
|
+
|
|
439
|
+
variant String
|
|
440
|
+
|
|
441
|
+
variant Float
|
|
442
|
+
|
|
443
|
+
# @!method self.variants
|
|
444
|
+
# @return [Array(String, Float)]
|
|
445
|
+
end
|
|
446
|
+
|
|
447
|
+
module SelectOption
|
|
448
|
+
extend Imagekitio::Internal::Type::Union
|
|
449
|
+
|
|
450
|
+
variant String
|
|
451
|
+
|
|
452
|
+
variant Float
|
|
453
|
+
|
|
454
|
+
variant Imagekitio::Internal::Type::Boolean
|
|
455
|
+
|
|
456
|
+
# @!method self.variants
|
|
457
|
+
# @return [Array(String, Float, Boolean)]
|
|
458
|
+
end
|
|
459
|
+
end
|
|
460
|
+
|
|
461
|
+
# Type of the asset.
|
|
462
|
+
#
|
|
463
|
+
# @see Imagekitio::Models::File#type
|
|
464
|
+
module Type
|
|
465
|
+
extend Imagekitio::Internal::Type::Enum
|
|
466
|
+
|
|
467
|
+
FILE = :file
|
|
468
|
+
FILE_VERSION = :"file-version"
|
|
469
|
+
|
|
470
|
+
# @!method self.values
|
|
471
|
+
# @return [Array<Symbol>]
|
|
472
|
+
end
|
|
473
|
+
|
|
474
|
+
# @see Imagekitio::Models::File#version_info
|
|
475
|
+
class VersionInfo < Imagekitio::Internal::Type::BaseModel
|
|
476
|
+
# @!attribute id
|
|
477
|
+
# Unique identifier of the file version.
|
|
478
|
+
#
|
|
479
|
+
# @return [String, nil]
|
|
480
|
+
optional :id, String
|
|
481
|
+
|
|
482
|
+
# @!attribute name
|
|
483
|
+
# Name of the file version.
|
|
484
|
+
#
|
|
485
|
+
# @return [String, nil]
|
|
486
|
+
optional :name, String
|
|
487
|
+
|
|
488
|
+
# @!method initialize(id: nil, name: nil)
|
|
489
|
+
# An object with details of the file version.
|
|
490
|
+
#
|
|
491
|
+
# @param id [String] Unique identifier of the file version.
|
|
492
|
+
#
|
|
493
|
+
# @param name [String] Name of the file version.
|
|
494
|
+
end
|
|
495
|
+
end
|
|
496
|
+
end
|
|
497
|
+
end
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Imagekitio
|
|
4
|
+
module Models
|
|
5
|
+
# @see Imagekitio::Resources::Files#copy
|
|
6
|
+
class FileCopyParams < Imagekitio::Internal::Type::BaseModel
|
|
7
|
+
extend Imagekitio::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Imagekitio::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute destination_path
|
|
11
|
+
# Full path to the folder you want to copy the above file into.
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :destination_path, String, api_name: :destinationPath
|
|
15
|
+
|
|
16
|
+
# @!attribute source_file_path
|
|
17
|
+
# The full path of the file you want to copy.
|
|
18
|
+
#
|
|
19
|
+
# @return [String]
|
|
20
|
+
required :source_file_path, String, api_name: :sourceFilePath
|
|
21
|
+
|
|
22
|
+
# @!attribute include_file_versions
|
|
23
|
+
# Option to copy all versions of a file. By default, only the current version of
|
|
24
|
+
# the file is copied. When set to true, all versions of the file will be copied.
|
|
25
|
+
# Default value - `false`.
|
|
26
|
+
#
|
|
27
|
+
# @return [Boolean, nil]
|
|
28
|
+
optional :include_file_versions, Imagekitio::Internal::Type::Boolean, api_name: :includeFileVersions
|
|
29
|
+
|
|
30
|
+
# @!method initialize(destination_path:, source_file_path:, include_file_versions: nil, request_options: {})
|
|
31
|
+
# Some parameter documentations has been truncated, see
|
|
32
|
+
# {Imagekitio::Models::FileCopyParams} for more details.
|
|
33
|
+
#
|
|
34
|
+
# @param destination_path [String] Full path to the folder you want to copy the above file into.
|
|
35
|
+
#
|
|
36
|
+
# @param source_file_path [String] The full path of the file you want to copy.
|
|
37
|
+
#
|
|
38
|
+
# @param include_file_versions [Boolean] Option to copy all versions of a file. By default, only the current version of t
|
|
39
|
+
#
|
|
40
|
+
# @param request_options [Imagekitio::RequestOptions, Hash{Symbol=>Object}]
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Imagekitio
|
|
4
|
+
module Models
|
|
5
|
+
# @see Imagekitio::Resources::Files#delete
|
|
6
|
+
class FileDeleteParams < Imagekitio::Internal::Type::BaseModel
|
|
7
|
+
extend Imagekitio::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Imagekitio::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!method initialize(request_options: {})
|
|
11
|
+
# @param request_options [Imagekitio::RequestOptions, Hash{Symbol=>Object}]
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Imagekitio
|
|
4
|
+
module Models
|
|
5
|
+
# @see Imagekitio::Resources::Files#get
|
|
6
|
+
class FileGetParams < Imagekitio::Internal::Type::BaseModel
|
|
7
|
+
extend Imagekitio::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Imagekitio::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!method initialize(request_options: {})
|
|
11
|
+
# @param request_options [Imagekitio::RequestOptions, Hash{Symbol=>Object}]
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Imagekitio
|
|
4
|
+
module Models
|
|
5
|
+
# @see Imagekitio::Resources::Files#move
|
|
6
|
+
class FileMoveParams < Imagekitio::Internal::Type::BaseModel
|
|
7
|
+
extend Imagekitio::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Imagekitio::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute destination_path
|
|
11
|
+
# Full path to the folder you want to move the above file into.
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :destination_path, String, api_name: :destinationPath
|
|
15
|
+
|
|
16
|
+
# @!attribute source_file_path
|
|
17
|
+
# The full path of the file you want to move.
|
|
18
|
+
#
|
|
19
|
+
# @return [String]
|
|
20
|
+
required :source_file_path, String, api_name: :sourceFilePath
|
|
21
|
+
|
|
22
|
+
# @!method initialize(destination_path:, source_file_path:, request_options: {})
|
|
23
|
+
# Some parameter documentations has been truncated, see
|
|
24
|
+
# {Imagekitio::Models::FileMoveParams} for more details.
|
|
25
|
+
#
|
|
26
|
+
# @param destination_path [String] Full path to the folder you want to move the above file into.
|
|
27
|
+
#
|
|
28
|
+
# @param source_file_path [String] The full path of the file you want to move.
|
|
29
|
+
#
|
|
30
|
+
# @param request_options [Imagekitio::RequestOptions, Hash{Symbol=>Object}]
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Imagekitio
|
|
4
|
+
module Models
|
|
5
|
+
# @see Imagekitio::Resources::Files#rename
|
|
6
|
+
class FileRenameParams < Imagekitio::Internal::Type::BaseModel
|
|
7
|
+
extend Imagekitio::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Imagekitio::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute file_path
|
|
11
|
+
# The full path of the file you want to rename.
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :file_path, String, api_name: :filePath
|
|
15
|
+
|
|
16
|
+
# @!attribute new_file_name
|
|
17
|
+
# The new name of the file. A filename can contain:
|
|
18
|
+
#
|
|
19
|
+
# Alphanumeric Characters: `a-z`, `A-Z`, `0-9` (including Unicode letters, marks,
|
|
20
|
+
# and numerals in other languages). Special Characters: `.`, `_`, and `-`.
|
|
21
|
+
#
|
|
22
|
+
# Any other character, including space, will be replaced by `_`.
|
|
23
|
+
#
|
|
24
|
+
# @return [String]
|
|
25
|
+
required :new_file_name, String, api_name: :newFileName
|
|
26
|
+
|
|
27
|
+
# @!attribute purge_cache
|
|
28
|
+
# Option to purge cache for the old file and its versions' URLs.
|
|
29
|
+
#
|
|
30
|
+
# When set to true, it will internally issue a purge cache request on CDN to
|
|
31
|
+
# remove cached content of old file and its versions. This purge request is
|
|
32
|
+
# counted against your monthly purge quota.
|
|
33
|
+
#
|
|
34
|
+
# Note: If the old file were accessible at
|
|
35
|
+
# `https://ik.imagekit.io/demo/old-filename.jpg`, a purge cache request would be
|
|
36
|
+
# issued against `https://ik.imagekit.io/demo/old-filename.jpg*` (with a wildcard
|
|
37
|
+
# at the end). It will remove the file and its versions' URLs and any
|
|
38
|
+
# transformations made using query parameters on this file or its versions.
|
|
39
|
+
# However, the cache for file transformations made using path parameters will
|
|
40
|
+
# persist. You can purge them using the purge API. For more details, refer to the
|
|
41
|
+
# purge API documentation.
|
|
42
|
+
#
|
|
43
|
+
# Default value - `false`
|
|
44
|
+
#
|
|
45
|
+
# @return [Boolean, nil]
|
|
46
|
+
optional :purge_cache, Imagekitio::Internal::Type::Boolean, api_name: :purgeCache
|
|
47
|
+
|
|
48
|
+
# @!method initialize(file_path:, new_file_name:, purge_cache: nil, request_options: {})
|
|
49
|
+
# Some parameter documentations has been truncated, see
|
|
50
|
+
# {Imagekitio::Models::FileRenameParams} for more details.
|
|
51
|
+
#
|
|
52
|
+
# @param file_path [String] The full path of the file you want to rename.
|
|
53
|
+
#
|
|
54
|
+
# @param new_file_name [String] The new name of the file. A filename can contain:
|
|
55
|
+
#
|
|
56
|
+
# @param purge_cache [Boolean] Option to purge cache for the old file and its versions' URLs.
|
|
57
|
+
#
|
|
58
|
+
# @param request_options [Imagekitio::RequestOptions, Hash{Symbol=>Object}]
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|