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,193 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Imagekitio
|
|
4
|
+
module Resources
|
|
5
|
+
class Beta
|
|
6
|
+
class V2
|
|
7
|
+
class Files
|
|
8
|
+
# The V2 API enhances security by verifying the entire payload using JWT. This API
|
|
9
|
+
# is in beta.
|
|
10
|
+
#
|
|
11
|
+
# ImageKit.io allows you to upload files directly from both the server and client
|
|
12
|
+
# sides. For server-side uploads, private API key authentication is used. For
|
|
13
|
+
# client-side uploads, generate a one-time `token` from your secure backend using
|
|
14
|
+
# private API.
|
|
15
|
+
# [Learn more](/docs/api-reference/upload-file/upload-file-v2#how-to-implement-secure-client-side-file-upload)
|
|
16
|
+
# about how to implement secure client-side file upload.
|
|
17
|
+
#
|
|
18
|
+
# **File size limit** \
|
|
19
|
+
# On the free plan, the maximum upload file sizes are 20MB for images, audio, and raw
|
|
20
|
+
# files, and 100MB for videos. On the paid plan, these limits increase to 40MB for
|
|
21
|
+
# images, audio, and raw files, and 2GB for videos. These limits can be further increased
|
|
22
|
+
# with higher-tier plans.
|
|
23
|
+
#
|
|
24
|
+
# **Version limit** \
|
|
25
|
+
# A file can have a maximum of 100 versions.
|
|
26
|
+
#
|
|
27
|
+
# **Demo applications**
|
|
28
|
+
#
|
|
29
|
+
# - A full-fledged
|
|
30
|
+
# [upload widget using Uppy](https://github.com/imagekit-samples/uppy-uploader),
|
|
31
|
+
# supporting file selections from local storage, URL, Dropbox, Google Drive,
|
|
32
|
+
# Instagram, and more.
|
|
33
|
+
# - [Quick start guides](/docs/quick-start-guides) for various frameworks and
|
|
34
|
+
# technologies.
|
|
35
|
+
sig do
|
|
36
|
+
params(
|
|
37
|
+
file: Imagekitio::Internal::FileInput,
|
|
38
|
+
file_name: String,
|
|
39
|
+
token: String,
|
|
40
|
+
checks: String,
|
|
41
|
+
custom_coordinates: String,
|
|
42
|
+
custom_metadata: T::Hash[Symbol, T.anything],
|
|
43
|
+
description: String,
|
|
44
|
+
extensions:
|
|
45
|
+
T::Array[
|
|
46
|
+
T.any(
|
|
47
|
+
Imagekitio::ExtensionItem::RemoveBg::OrHash,
|
|
48
|
+
Imagekitio::ExtensionItem::AIAutoDescription::OrHash,
|
|
49
|
+
Imagekitio::ExtensionItem::AutoTaggingExtension::OrHash
|
|
50
|
+
)
|
|
51
|
+
],
|
|
52
|
+
folder: String,
|
|
53
|
+
is_private_file: T::Boolean,
|
|
54
|
+
is_published: T::Boolean,
|
|
55
|
+
overwrite_ai_tags: T::Boolean,
|
|
56
|
+
overwrite_custom_metadata: T::Boolean,
|
|
57
|
+
overwrite_file: T::Boolean,
|
|
58
|
+
overwrite_tags: T::Boolean,
|
|
59
|
+
response_fields:
|
|
60
|
+
T::Array[
|
|
61
|
+
Imagekitio::Beta::V2::FileUploadParams::ResponseField::OrSymbol
|
|
62
|
+
],
|
|
63
|
+
tags: T::Array[String],
|
|
64
|
+
transformation:
|
|
65
|
+
Imagekitio::Beta::V2::FileUploadParams::Transformation::OrHash,
|
|
66
|
+
use_unique_file_name: T::Boolean,
|
|
67
|
+
webhook_url: String,
|
|
68
|
+
request_options: Imagekitio::RequestOptions::OrHash
|
|
69
|
+
).returns(Imagekitio::Models::Beta::V2::FileUploadResponse)
|
|
70
|
+
end
|
|
71
|
+
def upload(
|
|
72
|
+
# The API accepts any of the following:
|
|
73
|
+
#
|
|
74
|
+
# - **Binary data** – send the raw bytes as `multipart/form-data`.
|
|
75
|
+
# - **HTTP / HTTPS URL** – a publicly reachable URL that ImageKit’s servers can
|
|
76
|
+
# fetch.
|
|
77
|
+
# - **Base64 string** – the file encoded as a Base64 data URI or plain Base64.
|
|
78
|
+
#
|
|
79
|
+
# When supplying a URL, the server must receive the response headers within 8
|
|
80
|
+
# seconds; otherwise the request fails with 400 Bad Request.
|
|
81
|
+
file:,
|
|
82
|
+
# The name with which the file has to be uploaded.
|
|
83
|
+
file_name:,
|
|
84
|
+
# This is the client-generated JSON Web Token (JWT). The ImageKit.io server uses
|
|
85
|
+
# it to authenticate and check that the upload request parameters have not been
|
|
86
|
+
# tampered with after the token has been generated. Learn how to create the token
|
|
87
|
+
# on the page below. This field is only required for authentication when uploading
|
|
88
|
+
# a file from the client side.
|
|
89
|
+
#
|
|
90
|
+
# **Note**: Sending a JWT that has been used in the past will result in a
|
|
91
|
+
# validation error. Even if your previous request resulted in an error, you should
|
|
92
|
+
# always send a new token.
|
|
93
|
+
#
|
|
94
|
+
# **⚠️Warning**: JWT must be generated on the server-side because it is generated
|
|
95
|
+
# using your account's private API key. This field is required for authentication
|
|
96
|
+
# when uploading a file from the client-side.
|
|
97
|
+
token: nil,
|
|
98
|
+
# Server-side checks to run on the asset. Read more about
|
|
99
|
+
# [Upload API checks](/docs/api-reference/upload-file/upload-file-v2#upload-api-checks).
|
|
100
|
+
checks: nil,
|
|
101
|
+
# Define an important area in the image. This is only relevant for image type
|
|
102
|
+
# files.
|
|
103
|
+
#
|
|
104
|
+
# - To be passed as a string with the x and y coordinates of the top-left corner,
|
|
105
|
+
# and width and height of the area of interest in the format `x,y,width,height`.
|
|
106
|
+
# For example - `10,10,100,100`
|
|
107
|
+
# - Can be used with fo-customtransformation.
|
|
108
|
+
# - If this field is not specified and the file is overwritten, then
|
|
109
|
+
# customCoordinates will be removed.
|
|
110
|
+
custom_coordinates: nil,
|
|
111
|
+
# JSON key-value pairs to associate with the asset. Create the custom metadata
|
|
112
|
+
# fields before setting these values.
|
|
113
|
+
custom_metadata: nil,
|
|
114
|
+
# Optional text to describe the contents of the file.
|
|
115
|
+
description: nil,
|
|
116
|
+
# Array of extensions to be applied to the asset. Each extension can be configured
|
|
117
|
+
# with specific parameters based on the extension type.
|
|
118
|
+
extensions: nil,
|
|
119
|
+
# The folder path in which the image has to be uploaded. If the folder(s) didn't
|
|
120
|
+
# exist before, a new folder(s) is created. Using multiple `/` creates a nested
|
|
121
|
+
# folder.
|
|
122
|
+
folder: nil,
|
|
123
|
+
# Whether to mark the file as private or not.
|
|
124
|
+
#
|
|
125
|
+
# If `true`, the file is marked as private and is accessible only using named
|
|
126
|
+
# transformation or signed URL.
|
|
127
|
+
is_private_file: nil,
|
|
128
|
+
# Whether to upload file as published or not.
|
|
129
|
+
#
|
|
130
|
+
# If `false`, the file is marked as unpublished, which restricts access to the
|
|
131
|
+
# file only via the media library. Files in draft or unpublished state can only be
|
|
132
|
+
# publicly accessed after being published.
|
|
133
|
+
#
|
|
134
|
+
# The option to upload in draft state is only available in custom enterprise
|
|
135
|
+
# pricing plans.
|
|
136
|
+
is_published: nil,
|
|
137
|
+
# If set to `true` and a file already exists at the exact location, its AITags
|
|
138
|
+
# will be removed. Set `overwriteAITags` to `false` to preserve AITags.
|
|
139
|
+
overwrite_ai_tags: nil,
|
|
140
|
+
# If the request does not have `customMetadata`, and a file already exists at the
|
|
141
|
+
# exact location, existing customMetadata will be removed.
|
|
142
|
+
overwrite_custom_metadata: nil,
|
|
143
|
+
# If `false` and `useUniqueFileName` is also `false`, and a file already exists at
|
|
144
|
+
# the exact location, upload API will return an error immediately.
|
|
145
|
+
overwrite_file: nil,
|
|
146
|
+
# If the request does not have `tags`, and a file already exists at the exact
|
|
147
|
+
# location, existing tags will be removed.
|
|
148
|
+
overwrite_tags: nil,
|
|
149
|
+
# Array of response field keys to include in the API response body.
|
|
150
|
+
response_fields: nil,
|
|
151
|
+
# Set the tags while uploading the file. Provide an array of tag strings (e.g.
|
|
152
|
+
# `["tag1", "tag2", "tag3"]`). The combined length of all tag characters must not
|
|
153
|
+
# exceed 500, and the `%` character is not allowed. If this field is not specified
|
|
154
|
+
# and the file is overwritten, the existing tags will be removed.
|
|
155
|
+
tags: nil,
|
|
156
|
+
# Configure pre-processing (`pre`) and post-processing (`post`) transformations.
|
|
157
|
+
#
|
|
158
|
+
# - `pre` — applied before the file is uploaded to the Media Library.
|
|
159
|
+
# Useful for reducing file size or applying basic optimizations upfront (e.g.,
|
|
160
|
+
# resize, compress).
|
|
161
|
+
#
|
|
162
|
+
# - `post` — applied immediately after upload.
|
|
163
|
+
# Ideal for generating transformed versions (like video encodes or thumbnails)
|
|
164
|
+
# in advance, so they're ready for delivery without delay.
|
|
165
|
+
#
|
|
166
|
+
# You can mix and match any combination of post-processing types.
|
|
167
|
+
transformation: nil,
|
|
168
|
+
# Whether to use a unique filename for this file or not.
|
|
169
|
+
#
|
|
170
|
+
# If `true`, ImageKit.io will add a unique suffix to the filename parameter to get
|
|
171
|
+
# a unique filename.
|
|
172
|
+
#
|
|
173
|
+
# If `false`, then the image is uploaded with the provided filename parameter, and
|
|
174
|
+
# any existing file with the same name is replaced.
|
|
175
|
+
use_unique_file_name: nil,
|
|
176
|
+
# The final status of extensions after they have completed execution will be
|
|
177
|
+
# delivered to this endpoint as a POST request.
|
|
178
|
+
# [Learn more](/docs/api-reference/digital-asset-management-dam/managing-assets/update-file-details#webhook-payload-structure)
|
|
179
|
+
# about the webhook payload structure.
|
|
180
|
+
webhook_url: nil,
|
|
181
|
+
request_options: {}
|
|
182
|
+
)
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
# @api private
|
|
186
|
+
sig { params(client: Imagekitio::Client).returns(T.attached_class) }
|
|
187
|
+
def self.new(client:)
|
|
188
|
+
end
|
|
189
|
+
end
|
|
190
|
+
end
|
|
191
|
+
end
|
|
192
|
+
end
|
|
193
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Imagekitio
|
|
4
|
+
module Resources
|
|
5
|
+
class Beta
|
|
6
|
+
class V2
|
|
7
|
+
sig { returns(Imagekitio::Resources::Beta::V2::Files) }
|
|
8
|
+
attr_reader :files
|
|
9
|
+
|
|
10
|
+
# @api private
|
|
11
|
+
sig { params(client: Imagekitio::Client).returns(T.attached_class) }
|
|
12
|
+
def self.new(client:)
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Imagekitio
|
|
4
|
+
module Resources
|
|
5
|
+
class Beta
|
|
6
|
+
sig { returns(Imagekitio::Resources::Beta::V2) }
|
|
7
|
+
attr_reader :v2
|
|
8
|
+
|
|
9
|
+
# @api private
|
|
10
|
+
sig { params(client: Imagekitio::Client).returns(T.attached_class) }
|
|
11
|
+
def self.new(client:)
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Imagekitio
|
|
4
|
+
module Resources
|
|
5
|
+
class Cache
|
|
6
|
+
class Invalidation
|
|
7
|
+
# This API will purge CDN cache and ImageKit.io's internal cache for a file. Note:
|
|
8
|
+
# Purge cache is an asynchronous process and it may take some time to reflect the
|
|
9
|
+
# changes.
|
|
10
|
+
sig do
|
|
11
|
+
params(
|
|
12
|
+
url: String,
|
|
13
|
+
request_options: Imagekitio::RequestOptions::OrHash
|
|
14
|
+
).returns(Imagekitio::Models::Cache::InvalidationCreateResponse)
|
|
15
|
+
end
|
|
16
|
+
def create(
|
|
17
|
+
# The full URL of the file to be purged.
|
|
18
|
+
url:,
|
|
19
|
+
request_options: {}
|
|
20
|
+
)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# This API returns the status of a purge cache request.
|
|
24
|
+
sig do
|
|
25
|
+
params(
|
|
26
|
+
request_id: String,
|
|
27
|
+
request_options: Imagekitio::RequestOptions::OrHash
|
|
28
|
+
).returns(Imagekitio::Models::Cache::InvalidationGetResponse)
|
|
29
|
+
end
|
|
30
|
+
def get(
|
|
31
|
+
# Should be a valid requestId.
|
|
32
|
+
request_id,
|
|
33
|
+
request_options: {}
|
|
34
|
+
)
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# @api private
|
|
38
|
+
sig { params(client: Imagekitio::Client).returns(T.attached_class) }
|
|
39
|
+
def self.new(client:)
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Imagekitio
|
|
4
|
+
module Resources
|
|
5
|
+
class Cache
|
|
6
|
+
sig { returns(Imagekitio::Resources::Cache::Invalidation) }
|
|
7
|
+
attr_reader :invalidation
|
|
8
|
+
|
|
9
|
+
# @api private
|
|
10
|
+
sig { params(client: Imagekitio::Client).returns(T.attached_class) }
|
|
11
|
+
def self.new(client:)
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Imagekitio
|
|
4
|
+
module Resources
|
|
5
|
+
class CustomMetadataFields
|
|
6
|
+
# This API creates a new custom metadata field. Once a custom metadata field is
|
|
7
|
+
# created either through this API or using the dashboard UI, its value can be set
|
|
8
|
+
# on the assets. The value of a field for an asset can be set using the media
|
|
9
|
+
# library UI or programmatically through upload or update assets API.
|
|
10
|
+
sig do
|
|
11
|
+
params(
|
|
12
|
+
label: String,
|
|
13
|
+
name: String,
|
|
14
|
+
schema: Imagekitio::CustomMetadataFieldCreateParams::Schema::OrHash,
|
|
15
|
+
request_options: Imagekitio::RequestOptions::OrHash
|
|
16
|
+
).returns(Imagekitio::CustomMetadataField)
|
|
17
|
+
end
|
|
18
|
+
def create(
|
|
19
|
+
# Human readable name of the custom metadata field. This should be unique across
|
|
20
|
+
# all non deleted custom metadata fields. This name is displayed as form field
|
|
21
|
+
# label to the users while setting field value on an asset in the media library
|
|
22
|
+
# UI.
|
|
23
|
+
label:,
|
|
24
|
+
# API name of the custom metadata field. This should be unique across all
|
|
25
|
+
# (including deleted) custom metadata fields.
|
|
26
|
+
name:,
|
|
27
|
+
schema:,
|
|
28
|
+
request_options: {}
|
|
29
|
+
)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# This API updates the label or schema of an existing custom metadata field.
|
|
33
|
+
sig do
|
|
34
|
+
params(
|
|
35
|
+
id: String,
|
|
36
|
+
label: String,
|
|
37
|
+
schema: Imagekitio::CustomMetadataFieldUpdateParams::Schema::OrHash,
|
|
38
|
+
request_options: Imagekitio::RequestOptions::OrHash
|
|
39
|
+
).returns(Imagekitio::CustomMetadataField)
|
|
40
|
+
end
|
|
41
|
+
def update(
|
|
42
|
+
# Should be a valid custom metadata field id.
|
|
43
|
+
id,
|
|
44
|
+
# Human readable name of the custom metadata field. This should be unique across
|
|
45
|
+
# all non deleted custom metadata fields. This name is displayed as form field
|
|
46
|
+
# label to the users while setting field value on an asset in the media library
|
|
47
|
+
# UI. This parameter is required if `schema` is not provided.
|
|
48
|
+
label: nil,
|
|
49
|
+
# An object that describes the rules for the custom metadata key. This parameter
|
|
50
|
+
# is required if `label` is not provided. Note: `type` cannot be updated and will
|
|
51
|
+
# be ignored if sent with the `schema`. The schema will be validated as per the
|
|
52
|
+
# existing `type`.
|
|
53
|
+
schema: nil,
|
|
54
|
+
request_options: {}
|
|
55
|
+
)
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# This API returns the array of created custom metadata field objects. By default
|
|
59
|
+
# the API returns only non deleted field objects, but you can include deleted
|
|
60
|
+
# fields in the API response.
|
|
61
|
+
#
|
|
62
|
+
# You can also filter results by a specific folder path to retrieve custom
|
|
63
|
+
# metadata fields applicable at that location. This path-specific filtering is
|
|
64
|
+
# useful when using the **Path policy** feature to determine which custom metadata
|
|
65
|
+
# fields are selected for a given path.
|
|
66
|
+
sig do
|
|
67
|
+
params(
|
|
68
|
+
folder_path: String,
|
|
69
|
+
include_deleted: T::Boolean,
|
|
70
|
+
request_options: Imagekitio::RequestOptions::OrHash
|
|
71
|
+
).returns(T::Array[Imagekitio::CustomMetadataField])
|
|
72
|
+
end
|
|
73
|
+
def list(
|
|
74
|
+
# The folder path (e.g., `/path/to/folder`) for which to retrieve applicable
|
|
75
|
+
# custom metadata fields. Useful for determining path-specific field selections
|
|
76
|
+
# when the [Path policy](https://imagekit.io/docs/dam/path-policy) feature is in
|
|
77
|
+
# use.
|
|
78
|
+
folder_path: nil,
|
|
79
|
+
# Set it to `true` to include deleted field objects in the API response.
|
|
80
|
+
include_deleted: nil,
|
|
81
|
+
request_options: {}
|
|
82
|
+
)
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# This API deletes a custom metadata field. Even after deleting a custom metadata
|
|
86
|
+
# field, you cannot create any new custom metadata field with the same name.
|
|
87
|
+
sig do
|
|
88
|
+
params(
|
|
89
|
+
id: String,
|
|
90
|
+
request_options: Imagekitio::RequestOptions::OrHash
|
|
91
|
+
).returns(Imagekitio::Models::CustomMetadataFieldDeleteResponse)
|
|
92
|
+
end
|
|
93
|
+
def delete(
|
|
94
|
+
# Should be a valid custom metadata field id.
|
|
95
|
+
id,
|
|
96
|
+
request_options: {}
|
|
97
|
+
)
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# @api private
|
|
101
|
+
sig { params(client: Imagekitio::Client).returns(T.attached_class) }
|
|
102
|
+
def self.new(client:)
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
end
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Imagekitio
|
|
4
|
+
module Resources
|
|
5
|
+
class Files
|
|
6
|
+
class Bulk
|
|
7
|
+
# This API deletes multiple files and all their file versions permanently.
|
|
8
|
+
#
|
|
9
|
+
# Note: If a file or specific transformation has been requested in the past, then
|
|
10
|
+
# the response is cached. Deleting a file does not purge the cache. You can purge
|
|
11
|
+
# the cache using purge cache API.
|
|
12
|
+
#
|
|
13
|
+
# A maximum of 100 files can be deleted at a time.
|
|
14
|
+
sig do
|
|
15
|
+
params(
|
|
16
|
+
file_ids: T::Array[String],
|
|
17
|
+
request_options: Imagekitio::RequestOptions::OrHash
|
|
18
|
+
).returns(Imagekitio::Models::Files::BulkDeleteResponse)
|
|
19
|
+
end
|
|
20
|
+
def delete(
|
|
21
|
+
# An array of fileIds which you want to delete.
|
|
22
|
+
file_ids:,
|
|
23
|
+
request_options: {}
|
|
24
|
+
)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# This API adds tags to multiple files in bulk. A maximum of 50 files can be
|
|
28
|
+
# specified at a time.
|
|
29
|
+
sig do
|
|
30
|
+
params(
|
|
31
|
+
file_ids: T::Array[String],
|
|
32
|
+
tags: T::Array[String],
|
|
33
|
+
request_options: Imagekitio::RequestOptions::OrHash
|
|
34
|
+
).returns(Imagekitio::Models::Files::BulkAddTagsResponse)
|
|
35
|
+
end
|
|
36
|
+
def add_tags(
|
|
37
|
+
# An array of fileIds to which you want to add tags.
|
|
38
|
+
file_ids:,
|
|
39
|
+
# An array of tags that you want to add to the files.
|
|
40
|
+
tags:,
|
|
41
|
+
request_options: {}
|
|
42
|
+
)
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# This API removes AITags from multiple files in bulk. A maximum of 50 files can
|
|
46
|
+
# be specified at a time.
|
|
47
|
+
sig do
|
|
48
|
+
params(
|
|
49
|
+
ai_tags: T::Array[String],
|
|
50
|
+
file_ids: T::Array[String],
|
|
51
|
+
request_options: Imagekitio::RequestOptions::OrHash
|
|
52
|
+
).returns(Imagekitio::Models::Files::BulkRemoveAITagsResponse)
|
|
53
|
+
end
|
|
54
|
+
def remove_ai_tags(
|
|
55
|
+
# An array of AITags that you want to remove from the files.
|
|
56
|
+
ai_tags:,
|
|
57
|
+
# An array of fileIds from which you want to remove AITags.
|
|
58
|
+
file_ids:,
|
|
59
|
+
request_options: {}
|
|
60
|
+
)
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# This API removes tags from multiple files in bulk. A maximum of 50 files can be
|
|
64
|
+
# specified at a time.
|
|
65
|
+
sig do
|
|
66
|
+
params(
|
|
67
|
+
file_ids: T::Array[String],
|
|
68
|
+
tags: T::Array[String],
|
|
69
|
+
request_options: Imagekitio::RequestOptions::OrHash
|
|
70
|
+
).returns(Imagekitio::Models::Files::BulkRemoveTagsResponse)
|
|
71
|
+
end
|
|
72
|
+
def remove_tags(
|
|
73
|
+
# An array of fileIds from which you want to remove tags.
|
|
74
|
+
file_ids:,
|
|
75
|
+
# An array of tags that you want to remove from the files.
|
|
76
|
+
tags:,
|
|
77
|
+
request_options: {}
|
|
78
|
+
)
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# @api private
|
|
82
|
+
sig { params(client: Imagekitio::Client).returns(T.attached_class) }
|
|
83
|
+
def self.new(client:)
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
end
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Imagekitio
|
|
4
|
+
module Resources
|
|
5
|
+
class Files
|
|
6
|
+
class Metadata
|
|
7
|
+
# You can programmatically get image EXIF, pHash, and other metadata for uploaded
|
|
8
|
+
# files in the ImageKit.io media library using this API.
|
|
9
|
+
#
|
|
10
|
+
# You can also get the metadata in upload API response by passing `metadata` in
|
|
11
|
+
# `responseFields` parameter.
|
|
12
|
+
sig do
|
|
13
|
+
params(
|
|
14
|
+
file_id: String,
|
|
15
|
+
request_options: Imagekitio::RequestOptions::OrHash
|
|
16
|
+
).returns(Imagekitio::Metadata)
|
|
17
|
+
end
|
|
18
|
+
def get(
|
|
19
|
+
# The unique `fileId` of the uploaded file. `fileId` is returned in the list and
|
|
20
|
+
# search assets API and upload API.
|
|
21
|
+
file_id,
|
|
22
|
+
request_options: {}
|
|
23
|
+
)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# Get image EXIF, pHash, and other metadata from ImageKit.io powered remote URL
|
|
27
|
+
# using this API.
|
|
28
|
+
sig do
|
|
29
|
+
params(
|
|
30
|
+
url: String,
|
|
31
|
+
request_options: Imagekitio::RequestOptions::OrHash
|
|
32
|
+
).returns(Imagekitio::Metadata)
|
|
33
|
+
end
|
|
34
|
+
def get_from_url(
|
|
35
|
+
# Should be a valid file URL. It should be accessible using your ImageKit.io
|
|
36
|
+
# account.
|
|
37
|
+
url:,
|
|
38
|
+
request_options: {}
|
|
39
|
+
)
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# @api private
|
|
43
|
+
sig { params(client: Imagekitio::Client).returns(T.attached_class) }
|
|
44
|
+
def self.new(client:)
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Imagekitio
|
|
4
|
+
module Resources
|
|
5
|
+
class Files
|
|
6
|
+
class Versions
|
|
7
|
+
# This API returns details of all versions of a file.
|
|
8
|
+
sig do
|
|
9
|
+
params(
|
|
10
|
+
file_id: String,
|
|
11
|
+
request_options: Imagekitio::RequestOptions::OrHash
|
|
12
|
+
).returns(T::Array[Imagekitio::File])
|
|
13
|
+
end
|
|
14
|
+
def list(
|
|
15
|
+
# The unique `fileId` of the uploaded file. `fileId` is returned in list and
|
|
16
|
+
# search assets API and upload API.
|
|
17
|
+
file_id,
|
|
18
|
+
request_options: {}
|
|
19
|
+
)
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
# This API deletes a non-current file version permanently. The API returns an
|
|
23
|
+
# empty response.
|
|
24
|
+
#
|
|
25
|
+
# Note: If you want to delete all versions of a file, use the delete file API.
|
|
26
|
+
sig do
|
|
27
|
+
params(
|
|
28
|
+
version_id: String,
|
|
29
|
+
file_id: String,
|
|
30
|
+
request_options: Imagekitio::RequestOptions::OrHash
|
|
31
|
+
).returns(Imagekitio::Models::Files::VersionDeleteResponse)
|
|
32
|
+
end
|
|
33
|
+
def delete(
|
|
34
|
+
# The unique `versionId` of the uploaded file. `versionId` is returned in list and
|
|
35
|
+
# search assets API and upload API.
|
|
36
|
+
version_id,
|
|
37
|
+
# The unique `fileId` of the uploaded file. `fileId` is returned in list and
|
|
38
|
+
# search assets API and upload API.
|
|
39
|
+
file_id:,
|
|
40
|
+
request_options: {}
|
|
41
|
+
)
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# This API returns an object with details or attributes of a file version.
|
|
45
|
+
sig do
|
|
46
|
+
params(
|
|
47
|
+
version_id: String,
|
|
48
|
+
file_id: String,
|
|
49
|
+
request_options: Imagekitio::RequestOptions::OrHash
|
|
50
|
+
).returns(Imagekitio::File)
|
|
51
|
+
end
|
|
52
|
+
def get(
|
|
53
|
+
# The unique `versionId` of the uploaded file. `versionId` is returned in list and
|
|
54
|
+
# search assets API and upload API.
|
|
55
|
+
version_id,
|
|
56
|
+
# The unique `fileId` of the uploaded file. `fileId` is returned in list and
|
|
57
|
+
# search assets API and upload API.
|
|
58
|
+
file_id:,
|
|
59
|
+
request_options: {}
|
|
60
|
+
)
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# This API restores a file version as the current file version.
|
|
64
|
+
sig do
|
|
65
|
+
params(
|
|
66
|
+
version_id: String,
|
|
67
|
+
file_id: String,
|
|
68
|
+
request_options: Imagekitio::RequestOptions::OrHash
|
|
69
|
+
).returns(Imagekitio::File)
|
|
70
|
+
end
|
|
71
|
+
def restore(
|
|
72
|
+
# The unique `versionId` of the uploaded file. `versionId` is returned in list and
|
|
73
|
+
# search assets API and upload API.
|
|
74
|
+
version_id,
|
|
75
|
+
# The unique `fileId` of the uploaded file. `fileId` is returned in list and
|
|
76
|
+
# search assets API and upload API.
|
|
77
|
+
file_id:,
|
|
78
|
+
request_options: {}
|
|
79
|
+
)
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# @api private
|
|
83
|
+
sig { params(client: Imagekitio::Client).returns(T.attached_class) }
|
|
84
|
+
def self.new(client:)
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
end
|