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,159 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Imagekitio
|
|
4
|
+
module Models
|
|
5
|
+
class SrcOptions < Imagekitio::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(Imagekitio::SrcOptions, Imagekitio::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# Accepts a relative or absolute path of the resource. If a relative path is
|
|
12
|
+
# provided, it is appended to the `urlEndpoint`. If an absolute path is provided,
|
|
13
|
+
# `urlEndpoint` is ignored.
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :src
|
|
16
|
+
|
|
17
|
+
# Get your urlEndpoint from the
|
|
18
|
+
# [ImageKit dashboard](https://imagekit.io/dashboard/url-endpoints).
|
|
19
|
+
sig { returns(String) }
|
|
20
|
+
attr_accessor :url_endpoint
|
|
21
|
+
|
|
22
|
+
# When you want the signed URL to expire, specified in seconds. If `expiresIn` is
|
|
23
|
+
# anything above 0, the URL will always be signed even if `signed` is set to
|
|
24
|
+
# false. If not specified and `signed` is `true`, the signed URL will not expire
|
|
25
|
+
# (valid indefinitely).
|
|
26
|
+
#
|
|
27
|
+
# Example: Setting `expiresIn: 3600` will make the URL expire 1 hour from
|
|
28
|
+
# generation time. After the expiry time, the signed URL will no longer be valid
|
|
29
|
+
# and ImageKit will return a 401 Unauthorized status code.
|
|
30
|
+
#
|
|
31
|
+
# [Learn more](https://imagekit.io/docs/media-delivery-basic-security#how-to-generate-signed-urls).
|
|
32
|
+
sig { returns(T.nilable(Float)) }
|
|
33
|
+
attr_reader :expires_in
|
|
34
|
+
|
|
35
|
+
sig { params(expires_in: Float).void }
|
|
36
|
+
attr_writer :expires_in
|
|
37
|
+
|
|
38
|
+
# These are additional query parameters that you want to add to the final URL.
|
|
39
|
+
# They can be any query parameters and not necessarily related to ImageKit. This
|
|
40
|
+
# is especially useful if you want to add a versioning parameter to your URLs.
|
|
41
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
42
|
+
attr_reader :query_parameters
|
|
43
|
+
|
|
44
|
+
sig { params(query_parameters: T::Hash[Symbol, String]).void }
|
|
45
|
+
attr_writer :query_parameters
|
|
46
|
+
|
|
47
|
+
# Whether to sign the URL or not. Set this to `true` if you want to generate a
|
|
48
|
+
# signed URL. If `signed` is `true` and `expiresIn` is not specified, the signed
|
|
49
|
+
# URL will not expire (valid indefinitely). Note: If `expiresIn` is set to any
|
|
50
|
+
# value above 0, the URL will always be signed regardless of this setting.
|
|
51
|
+
# [Learn more](https://imagekit.io/docs/media-delivery-basic-security#how-to-generate-signed-urls).
|
|
52
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
53
|
+
attr_reader :signed
|
|
54
|
+
|
|
55
|
+
sig { params(signed: T::Boolean).void }
|
|
56
|
+
attr_writer :signed
|
|
57
|
+
|
|
58
|
+
# An array of objects specifying the transformations to be applied in the URL. If
|
|
59
|
+
# more than one transformation is specified, they are applied in the order they
|
|
60
|
+
# are specified as chained transformations. See
|
|
61
|
+
# [Chained transformations](https://imagekit.io/docs/transformations#chained-transformations).
|
|
62
|
+
sig { returns(T.nilable(T::Array[Imagekitio::Transformation])) }
|
|
63
|
+
attr_reader :transformation
|
|
64
|
+
|
|
65
|
+
sig do
|
|
66
|
+
params(
|
|
67
|
+
transformation: T::Array[Imagekitio::Transformation::OrHash]
|
|
68
|
+
).void
|
|
69
|
+
end
|
|
70
|
+
attr_writer :transformation
|
|
71
|
+
|
|
72
|
+
# By default, the transformation string is added as a query parameter in the URL,
|
|
73
|
+
# e.g., `?tr=w-100,h-100`. If you want to add the transformation string in the
|
|
74
|
+
# path of the URL, set this to `path`. Learn more in the
|
|
75
|
+
# [Transformations guide](https://imagekit.io/docs/transformations).
|
|
76
|
+
sig { returns(T.nilable(Imagekitio::TransformationPosition::OrSymbol)) }
|
|
77
|
+
attr_reader :transformation_position
|
|
78
|
+
|
|
79
|
+
sig do
|
|
80
|
+
params(
|
|
81
|
+
transformation_position: Imagekitio::TransformationPosition::OrSymbol
|
|
82
|
+
).void
|
|
83
|
+
end
|
|
84
|
+
attr_writer :transformation_position
|
|
85
|
+
|
|
86
|
+
# Options for generating ImageKit URLs with transformations. See the
|
|
87
|
+
# [Transformations guide](https://imagekit.io/docs/transformations).
|
|
88
|
+
sig do
|
|
89
|
+
params(
|
|
90
|
+
src: String,
|
|
91
|
+
url_endpoint: String,
|
|
92
|
+
expires_in: Float,
|
|
93
|
+
query_parameters: T::Hash[Symbol, String],
|
|
94
|
+
signed: T::Boolean,
|
|
95
|
+
transformation: T::Array[Imagekitio::Transformation::OrHash],
|
|
96
|
+
transformation_position: Imagekitio::TransformationPosition::OrSymbol
|
|
97
|
+
).returns(T.attached_class)
|
|
98
|
+
end
|
|
99
|
+
def self.new(
|
|
100
|
+
# Accepts a relative or absolute path of the resource. If a relative path is
|
|
101
|
+
# provided, it is appended to the `urlEndpoint`. If an absolute path is provided,
|
|
102
|
+
# `urlEndpoint` is ignored.
|
|
103
|
+
src:,
|
|
104
|
+
# Get your urlEndpoint from the
|
|
105
|
+
# [ImageKit dashboard](https://imagekit.io/dashboard/url-endpoints).
|
|
106
|
+
url_endpoint:,
|
|
107
|
+
# When you want the signed URL to expire, specified in seconds. If `expiresIn` is
|
|
108
|
+
# anything above 0, the URL will always be signed even if `signed` is set to
|
|
109
|
+
# false. If not specified and `signed` is `true`, the signed URL will not expire
|
|
110
|
+
# (valid indefinitely).
|
|
111
|
+
#
|
|
112
|
+
# Example: Setting `expiresIn: 3600` will make the URL expire 1 hour from
|
|
113
|
+
# generation time. After the expiry time, the signed URL will no longer be valid
|
|
114
|
+
# and ImageKit will return a 401 Unauthorized status code.
|
|
115
|
+
#
|
|
116
|
+
# [Learn more](https://imagekit.io/docs/media-delivery-basic-security#how-to-generate-signed-urls).
|
|
117
|
+
expires_in: nil,
|
|
118
|
+
# These are additional query parameters that you want to add to the final URL.
|
|
119
|
+
# They can be any query parameters and not necessarily related to ImageKit. This
|
|
120
|
+
# is especially useful if you want to add a versioning parameter to your URLs.
|
|
121
|
+
query_parameters: nil,
|
|
122
|
+
# Whether to sign the URL or not. Set this to `true` if you want to generate a
|
|
123
|
+
# signed URL. If `signed` is `true` and `expiresIn` is not specified, the signed
|
|
124
|
+
# URL will not expire (valid indefinitely). Note: If `expiresIn` is set to any
|
|
125
|
+
# value above 0, the URL will always be signed regardless of this setting.
|
|
126
|
+
# [Learn more](https://imagekit.io/docs/media-delivery-basic-security#how-to-generate-signed-urls).
|
|
127
|
+
signed: nil,
|
|
128
|
+
# An array of objects specifying the transformations to be applied in the URL. If
|
|
129
|
+
# more than one transformation is specified, they are applied in the order they
|
|
130
|
+
# are specified as chained transformations. See
|
|
131
|
+
# [Chained transformations](https://imagekit.io/docs/transformations#chained-transformations).
|
|
132
|
+
transformation: nil,
|
|
133
|
+
# By default, the transformation string is added as a query parameter in the URL,
|
|
134
|
+
# e.g., `?tr=w-100,h-100`. If you want to add the transformation string in the
|
|
135
|
+
# path of the URL, set this to `path`. Learn more in the
|
|
136
|
+
# [Transformations guide](https://imagekit.io/docs/transformations).
|
|
137
|
+
transformation_position: nil
|
|
138
|
+
)
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
sig do
|
|
142
|
+
override.returns(
|
|
143
|
+
{
|
|
144
|
+
src: String,
|
|
145
|
+
url_endpoint: String,
|
|
146
|
+
expires_in: Float,
|
|
147
|
+
query_parameters: T::Hash[Symbol, String],
|
|
148
|
+
signed: T::Boolean,
|
|
149
|
+
transformation: T::Array[Imagekitio::Transformation],
|
|
150
|
+
transformation_position:
|
|
151
|
+
Imagekitio::TransformationPosition::OrSymbol
|
|
152
|
+
}
|
|
153
|
+
)
|
|
154
|
+
end
|
|
155
|
+
def to_hash
|
|
156
|
+
end
|
|
157
|
+
end
|
|
158
|
+
end
|
|
159
|
+
end
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Imagekitio
|
|
4
|
+
module Models
|
|
5
|
+
# Available streaming resolutions for
|
|
6
|
+
# [adaptive bitrate streaming](https://imagekit.io/docs/adaptive-bitrate-streaming)
|
|
7
|
+
module StreamingResolution
|
|
8
|
+
extend Imagekitio::Internal::Type::Enum
|
|
9
|
+
|
|
10
|
+
TaggedSymbol =
|
|
11
|
+
T.type_alias { T.all(Symbol, Imagekitio::StreamingResolution) }
|
|
12
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
13
|
+
|
|
14
|
+
STREAMING_RESOLUTION_240 =
|
|
15
|
+
T.let(:"240", Imagekitio::StreamingResolution::TaggedSymbol)
|
|
16
|
+
STREAMING_RESOLUTION_360 =
|
|
17
|
+
T.let(:"360", Imagekitio::StreamingResolution::TaggedSymbol)
|
|
18
|
+
STREAMING_RESOLUTION_480 =
|
|
19
|
+
T.let(:"480", Imagekitio::StreamingResolution::TaggedSymbol)
|
|
20
|
+
STREAMING_RESOLUTION_720 =
|
|
21
|
+
T.let(:"720", Imagekitio::StreamingResolution::TaggedSymbol)
|
|
22
|
+
STREAMING_RESOLUTION_1080 =
|
|
23
|
+
T.let(:"1080", Imagekitio::StreamingResolution::TaggedSymbol)
|
|
24
|
+
STREAMING_RESOLUTION_1440 =
|
|
25
|
+
T.let(:"1440", Imagekitio::StreamingResolution::TaggedSymbol)
|
|
26
|
+
STREAMING_RESOLUTION_2160 =
|
|
27
|
+
T.let(:"2160", Imagekitio::StreamingResolution::TaggedSymbol)
|
|
28
|
+
|
|
29
|
+
sig do
|
|
30
|
+
override.returns(
|
|
31
|
+
T::Array[Imagekitio::StreamingResolution::TaggedSymbol]
|
|
32
|
+
)
|
|
33
|
+
end
|
|
34
|
+
def self.values
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Imagekitio
|
|
4
|
+
module Models
|
|
5
|
+
class SubtitleOverlay < Imagekitio::Models::BaseOverlay
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(Imagekitio::SubtitleOverlay, Imagekitio::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# Specifies the relative path to the subtitle file used as an overlay.
|
|
12
|
+
sig { returns(String) }
|
|
13
|
+
attr_accessor :input
|
|
14
|
+
|
|
15
|
+
sig { returns(Symbol) }
|
|
16
|
+
attr_accessor :type
|
|
17
|
+
|
|
18
|
+
# The input path can be included in the layer as either `i-{input}` or
|
|
19
|
+
# `ie-{base64_encoded_input}`. By default, the SDK determines the appropriate
|
|
20
|
+
# format automatically. To always use base64 encoding (`ie-{base64}`), set this
|
|
21
|
+
# parameter to `base64`. To always use plain text (`i-{input}`), set it to
|
|
22
|
+
# `plain`.
|
|
23
|
+
sig do
|
|
24
|
+
returns(T.nilable(Imagekitio::SubtitleOverlay::Encoding::OrSymbol))
|
|
25
|
+
end
|
|
26
|
+
attr_reader :encoding
|
|
27
|
+
|
|
28
|
+
sig do
|
|
29
|
+
params(encoding: Imagekitio::SubtitleOverlay::Encoding::OrSymbol).void
|
|
30
|
+
end
|
|
31
|
+
attr_writer :encoding
|
|
32
|
+
|
|
33
|
+
# Control styling of the subtitle. See
|
|
34
|
+
# [Styling subtitles](https://imagekit.io/docs/add-overlays-on-videos#styling-controls-for-subtitles-layer).
|
|
35
|
+
sig do
|
|
36
|
+
returns(T.nilable(T::Array[Imagekitio::SubtitleOverlayTransformation]))
|
|
37
|
+
end
|
|
38
|
+
attr_reader :transformation
|
|
39
|
+
|
|
40
|
+
sig do
|
|
41
|
+
params(
|
|
42
|
+
transformation:
|
|
43
|
+
T::Array[Imagekitio::SubtitleOverlayTransformation::OrHash]
|
|
44
|
+
).void
|
|
45
|
+
end
|
|
46
|
+
attr_writer :transformation
|
|
47
|
+
|
|
48
|
+
sig do
|
|
49
|
+
params(
|
|
50
|
+
input: String,
|
|
51
|
+
encoding: Imagekitio::SubtitleOverlay::Encoding::OrSymbol,
|
|
52
|
+
transformation:
|
|
53
|
+
T::Array[Imagekitio::SubtitleOverlayTransformation::OrHash],
|
|
54
|
+
type: Symbol
|
|
55
|
+
).returns(T.attached_class)
|
|
56
|
+
end
|
|
57
|
+
def self.new(
|
|
58
|
+
# Specifies the relative path to the subtitle file used as an overlay.
|
|
59
|
+
input:,
|
|
60
|
+
# The input path can be included in the layer as either `i-{input}` or
|
|
61
|
+
# `ie-{base64_encoded_input}`. By default, the SDK determines the appropriate
|
|
62
|
+
# format automatically. To always use base64 encoding (`ie-{base64}`), set this
|
|
63
|
+
# parameter to `base64`. To always use plain text (`i-{input}`), set it to
|
|
64
|
+
# `plain`.
|
|
65
|
+
encoding: nil,
|
|
66
|
+
# Control styling of the subtitle. See
|
|
67
|
+
# [Styling subtitles](https://imagekit.io/docs/add-overlays-on-videos#styling-controls-for-subtitles-layer).
|
|
68
|
+
transformation: nil,
|
|
69
|
+
type: :subtitle
|
|
70
|
+
)
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
sig do
|
|
74
|
+
override.returns(
|
|
75
|
+
{
|
|
76
|
+
input: String,
|
|
77
|
+
type: Symbol,
|
|
78
|
+
encoding: Imagekitio::SubtitleOverlay::Encoding::OrSymbol,
|
|
79
|
+
transformation: T::Array[Imagekitio::SubtitleOverlayTransformation]
|
|
80
|
+
}
|
|
81
|
+
)
|
|
82
|
+
end
|
|
83
|
+
def to_hash
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# The input path can be included in the layer as either `i-{input}` or
|
|
87
|
+
# `ie-{base64_encoded_input}`. By default, the SDK determines the appropriate
|
|
88
|
+
# format automatically. To always use base64 encoding (`ie-{base64}`), set this
|
|
89
|
+
# parameter to `base64`. To always use plain text (`i-{input}`), set it to
|
|
90
|
+
# `plain`.
|
|
91
|
+
module Encoding
|
|
92
|
+
extend Imagekitio::Internal::Type::Enum
|
|
93
|
+
|
|
94
|
+
TaggedSymbol =
|
|
95
|
+
T.type_alias { T.all(Symbol, Imagekitio::SubtitleOverlay::Encoding) }
|
|
96
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
97
|
+
|
|
98
|
+
AUTO = T.let(:auto, Imagekitio::SubtitleOverlay::Encoding::TaggedSymbol)
|
|
99
|
+
PLAIN =
|
|
100
|
+
T.let(:plain, Imagekitio::SubtitleOverlay::Encoding::TaggedSymbol)
|
|
101
|
+
BASE64 =
|
|
102
|
+
T.let(:base64, Imagekitio::SubtitleOverlay::Encoding::TaggedSymbol)
|
|
103
|
+
|
|
104
|
+
sig do
|
|
105
|
+
override.returns(
|
|
106
|
+
T::Array[Imagekitio::SubtitleOverlay::Encoding::TaggedSymbol]
|
|
107
|
+
)
|
|
108
|
+
end
|
|
109
|
+
def self.values
|
|
110
|
+
end
|
|
111
|
+
end
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
end
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Imagekitio
|
|
4
|
+
module Models
|
|
5
|
+
class SubtitleOverlayTransformation < Imagekitio::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
Imagekitio::SubtitleOverlayTransformation,
|
|
10
|
+
Imagekitio::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# Specifies the subtitle background color using a standard color name, an RGB
|
|
15
|
+
# color code (e.g., FF0000), or an RGBA color code (e.g., FFAABB50).
|
|
16
|
+
#
|
|
17
|
+
# [Subtitle styling options](https://imagekit.io/docs/add-overlays-on-videos#styling-controls-for-subtitles-layer)
|
|
18
|
+
sig { returns(T.nilable(String)) }
|
|
19
|
+
attr_reader :background
|
|
20
|
+
|
|
21
|
+
sig { params(background: String).void }
|
|
22
|
+
attr_writer :background
|
|
23
|
+
|
|
24
|
+
# Sets the font color of the subtitle text using a standard color name, an RGB
|
|
25
|
+
# color code (e.g., FF0000), or an RGBA color code (e.g., FFAABB50).
|
|
26
|
+
#
|
|
27
|
+
# [Subtitle styling options](https://imagekit.io/docs/add-overlays-on-videos#styling-controls-for-subtitles-layer)
|
|
28
|
+
sig { returns(T.nilable(String)) }
|
|
29
|
+
attr_reader :color
|
|
30
|
+
|
|
31
|
+
sig { params(color: String).void }
|
|
32
|
+
attr_writer :color
|
|
33
|
+
|
|
34
|
+
# Font family for subtitles. Refer to the
|
|
35
|
+
# [supported fonts](https://imagekit.io/docs/add-overlays-on-images#supported-text-font-list).
|
|
36
|
+
sig { returns(T.nilable(String)) }
|
|
37
|
+
attr_reader :font_family
|
|
38
|
+
|
|
39
|
+
sig { params(font_family: String).void }
|
|
40
|
+
attr_writer :font_family
|
|
41
|
+
|
|
42
|
+
# Sets the font outline of the subtitle text. Requires the outline width (an
|
|
43
|
+
# integer) and the outline color (as an RGB color code, RGBA color code, or
|
|
44
|
+
# standard web color name) separated by an underscore. Example: `fol-2_blue`
|
|
45
|
+
# (outline width of 2px and outline color blue), `fol-2_A1CCDD` (outline width of
|
|
46
|
+
# 2px and outline color `#A1CCDD`) and `fol-2_A1CCDD50` (outline width of 2px and
|
|
47
|
+
# outline color `#A1CCDD` at 50% opacity).
|
|
48
|
+
#
|
|
49
|
+
# [Subtitle styling options](https://imagekit.io/docs/add-overlays-on-videos#styling-controls-for-subtitles-layer)
|
|
50
|
+
sig { returns(T.nilable(String)) }
|
|
51
|
+
attr_reader :font_outline
|
|
52
|
+
|
|
53
|
+
sig { params(font_outline: String).void }
|
|
54
|
+
attr_writer :font_outline
|
|
55
|
+
|
|
56
|
+
# Sets the font shadow for the subtitle text. Requires the shadow color (as an RGB
|
|
57
|
+
# color code, RGBA color code, or standard web color name) and shadow indent (an
|
|
58
|
+
# integer) separated by an underscore. Example: `fsh-blue_2` (shadow color blue,
|
|
59
|
+
# indent of 2px), `fsh-A1CCDD_3` (shadow color `#A1CCDD`, indent of 3px),
|
|
60
|
+
# `fsh-A1CCDD50_3` (shadow color `#A1CCDD` at 50% opacity, indent of 3px).
|
|
61
|
+
#
|
|
62
|
+
# [Subtitle styling options](https://imagekit.io/docs/add-overlays-on-videos#styling-controls-for-subtitles-layer)
|
|
63
|
+
sig { returns(T.nilable(String)) }
|
|
64
|
+
attr_reader :font_shadow
|
|
65
|
+
|
|
66
|
+
sig { params(font_shadow: String).void }
|
|
67
|
+
attr_writer :font_shadow
|
|
68
|
+
|
|
69
|
+
# Sets the font size of subtitle text.
|
|
70
|
+
#
|
|
71
|
+
# [Subtitle styling options](https://imagekit.io/docs/add-overlays-on-videos#styling-controls-for-subtitles-layer)
|
|
72
|
+
sig { returns(T.nilable(Float)) }
|
|
73
|
+
attr_reader :font_size
|
|
74
|
+
|
|
75
|
+
sig { params(font_size: Float).void }
|
|
76
|
+
attr_writer :font_size
|
|
77
|
+
|
|
78
|
+
# Sets the typography style of the subtitle text. Supports values are `b` for
|
|
79
|
+
# bold, `i` for italics, and `b_i` for bold with italics.
|
|
80
|
+
#
|
|
81
|
+
# [Subtitle styling options](https://imagekit.io/docs/add-overlays-on-videos#styling-controls-for-subtitles-layer)
|
|
82
|
+
sig do
|
|
83
|
+
returns(
|
|
84
|
+
T.nilable(
|
|
85
|
+
Imagekitio::SubtitleOverlayTransformation::Typography::OrSymbol
|
|
86
|
+
)
|
|
87
|
+
)
|
|
88
|
+
end
|
|
89
|
+
attr_reader :typography
|
|
90
|
+
|
|
91
|
+
sig do
|
|
92
|
+
params(
|
|
93
|
+
typography:
|
|
94
|
+
Imagekitio::SubtitleOverlayTransformation::Typography::OrSymbol
|
|
95
|
+
).void
|
|
96
|
+
end
|
|
97
|
+
attr_writer :typography
|
|
98
|
+
|
|
99
|
+
# Subtitle styling options.
|
|
100
|
+
# [Learn more](https://imagekit.io/docs/add-overlays-on-videos#styling-controls-for-subtitles-layer)
|
|
101
|
+
# from the docs.
|
|
102
|
+
sig do
|
|
103
|
+
params(
|
|
104
|
+
background: String,
|
|
105
|
+
color: String,
|
|
106
|
+
font_family: String,
|
|
107
|
+
font_outline: String,
|
|
108
|
+
font_shadow: String,
|
|
109
|
+
font_size: Float,
|
|
110
|
+
typography:
|
|
111
|
+
Imagekitio::SubtitleOverlayTransformation::Typography::OrSymbol
|
|
112
|
+
).returns(T.attached_class)
|
|
113
|
+
end
|
|
114
|
+
def self.new(
|
|
115
|
+
# Specifies the subtitle background color using a standard color name, an RGB
|
|
116
|
+
# color code (e.g., FF0000), or an RGBA color code (e.g., FFAABB50).
|
|
117
|
+
#
|
|
118
|
+
# [Subtitle styling options](https://imagekit.io/docs/add-overlays-on-videos#styling-controls-for-subtitles-layer)
|
|
119
|
+
background: nil,
|
|
120
|
+
# Sets the font color of the subtitle text using a standard color name, an RGB
|
|
121
|
+
# color code (e.g., FF0000), or an RGBA color code (e.g., FFAABB50).
|
|
122
|
+
#
|
|
123
|
+
# [Subtitle styling options](https://imagekit.io/docs/add-overlays-on-videos#styling-controls-for-subtitles-layer)
|
|
124
|
+
color: nil,
|
|
125
|
+
# Font family for subtitles. Refer to the
|
|
126
|
+
# [supported fonts](https://imagekit.io/docs/add-overlays-on-images#supported-text-font-list).
|
|
127
|
+
font_family: nil,
|
|
128
|
+
# Sets the font outline of the subtitle text. Requires the outline width (an
|
|
129
|
+
# integer) and the outline color (as an RGB color code, RGBA color code, or
|
|
130
|
+
# standard web color name) separated by an underscore. Example: `fol-2_blue`
|
|
131
|
+
# (outline width of 2px and outline color blue), `fol-2_A1CCDD` (outline width of
|
|
132
|
+
# 2px and outline color `#A1CCDD`) and `fol-2_A1CCDD50` (outline width of 2px and
|
|
133
|
+
# outline color `#A1CCDD` at 50% opacity).
|
|
134
|
+
#
|
|
135
|
+
# [Subtitle styling options](https://imagekit.io/docs/add-overlays-on-videos#styling-controls-for-subtitles-layer)
|
|
136
|
+
font_outline: nil,
|
|
137
|
+
# Sets the font shadow for the subtitle text. Requires the shadow color (as an RGB
|
|
138
|
+
# color code, RGBA color code, or standard web color name) and shadow indent (an
|
|
139
|
+
# integer) separated by an underscore. Example: `fsh-blue_2` (shadow color blue,
|
|
140
|
+
# indent of 2px), `fsh-A1CCDD_3` (shadow color `#A1CCDD`, indent of 3px),
|
|
141
|
+
# `fsh-A1CCDD50_3` (shadow color `#A1CCDD` at 50% opacity, indent of 3px).
|
|
142
|
+
#
|
|
143
|
+
# [Subtitle styling options](https://imagekit.io/docs/add-overlays-on-videos#styling-controls-for-subtitles-layer)
|
|
144
|
+
font_shadow: nil,
|
|
145
|
+
# Sets the font size of subtitle text.
|
|
146
|
+
#
|
|
147
|
+
# [Subtitle styling options](https://imagekit.io/docs/add-overlays-on-videos#styling-controls-for-subtitles-layer)
|
|
148
|
+
font_size: nil,
|
|
149
|
+
# Sets the typography style of the subtitle text. Supports values are `b` for
|
|
150
|
+
# bold, `i` for italics, and `b_i` for bold with italics.
|
|
151
|
+
#
|
|
152
|
+
# [Subtitle styling options](https://imagekit.io/docs/add-overlays-on-videos#styling-controls-for-subtitles-layer)
|
|
153
|
+
typography: nil
|
|
154
|
+
)
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
sig do
|
|
158
|
+
override.returns(
|
|
159
|
+
{
|
|
160
|
+
background: String,
|
|
161
|
+
color: String,
|
|
162
|
+
font_family: String,
|
|
163
|
+
font_outline: String,
|
|
164
|
+
font_shadow: String,
|
|
165
|
+
font_size: Float,
|
|
166
|
+
typography:
|
|
167
|
+
Imagekitio::SubtitleOverlayTransformation::Typography::OrSymbol
|
|
168
|
+
}
|
|
169
|
+
)
|
|
170
|
+
end
|
|
171
|
+
def to_hash
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# Sets the typography style of the subtitle text. Supports values are `b` for
|
|
175
|
+
# bold, `i` for italics, and `b_i` for bold with italics.
|
|
176
|
+
#
|
|
177
|
+
# [Subtitle styling options](https://imagekit.io/docs/add-overlays-on-videos#styling-controls-for-subtitles-layer)
|
|
178
|
+
module Typography
|
|
179
|
+
extend Imagekitio::Internal::Type::Enum
|
|
180
|
+
|
|
181
|
+
TaggedSymbol =
|
|
182
|
+
T.type_alias do
|
|
183
|
+
T.all(Symbol, Imagekitio::SubtitleOverlayTransformation::Typography)
|
|
184
|
+
end
|
|
185
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
186
|
+
|
|
187
|
+
B =
|
|
188
|
+
T.let(
|
|
189
|
+
:b,
|
|
190
|
+
Imagekitio::SubtitleOverlayTransformation::Typography::TaggedSymbol
|
|
191
|
+
)
|
|
192
|
+
I =
|
|
193
|
+
T.let(
|
|
194
|
+
:i,
|
|
195
|
+
Imagekitio::SubtitleOverlayTransformation::Typography::TaggedSymbol
|
|
196
|
+
)
|
|
197
|
+
B_I =
|
|
198
|
+
T.let(
|
|
199
|
+
:b_i,
|
|
200
|
+
Imagekitio::SubtitleOverlayTransformation::Typography::TaggedSymbol
|
|
201
|
+
)
|
|
202
|
+
|
|
203
|
+
sig do
|
|
204
|
+
override.returns(
|
|
205
|
+
T::Array[
|
|
206
|
+
Imagekitio::SubtitleOverlayTransformation::Typography::TaggedSymbol
|
|
207
|
+
]
|
|
208
|
+
)
|
|
209
|
+
end
|
|
210
|
+
def self.values
|
|
211
|
+
end
|
|
212
|
+
end
|
|
213
|
+
end
|
|
214
|
+
end
|
|
215
|
+
end
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Imagekitio
|
|
4
|
+
module Models
|
|
5
|
+
class TextOverlay < Imagekitio::Models::BaseOverlay
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(Imagekitio::TextOverlay, Imagekitio::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# Specifies the text to be displayed in the overlay. The SDK automatically handles
|
|
12
|
+
# special characters and encoding.
|
|
13
|
+
sig { returns(String) }
|
|
14
|
+
attr_accessor :text
|
|
15
|
+
|
|
16
|
+
sig { returns(Symbol) }
|
|
17
|
+
attr_accessor :type
|
|
18
|
+
|
|
19
|
+
# Text can be included in the layer as either `i-{input}` (plain text) or
|
|
20
|
+
# `ie-{base64_encoded_input}` (base64). By default, the SDK selects the
|
|
21
|
+
# appropriate format based on the input text. To always use base64
|
|
22
|
+
# (`ie-{base64}`), set this parameter to `base64`. To always use plain text
|
|
23
|
+
# (`i-{input}`), set it to `plain`.
|
|
24
|
+
sig { returns(T.nilable(Imagekitio::TextOverlay::Encoding::OrSymbol)) }
|
|
25
|
+
attr_reader :encoding
|
|
26
|
+
|
|
27
|
+
sig { params(encoding: Imagekitio::TextOverlay::Encoding::OrSymbol).void }
|
|
28
|
+
attr_writer :encoding
|
|
29
|
+
|
|
30
|
+
# Control styling of the text overlay. See
|
|
31
|
+
# [Text overlays](https://imagekit.io/docs/add-overlays-on-images#text-overlay).
|
|
32
|
+
sig do
|
|
33
|
+
returns(T.nilable(T::Array[Imagekitio::TextOverlayTransformation]))
|
|
34
|
+
end
|
|
35
|
+
attr_reader :transformation
|
|
36
|
+
|
|
37
|
+
sig do
|
|
38
|
+
params(
|
|
39
|
+
transformation:
|
|
40
|
+
T::Array[Imagekitio::TextOverlayTransformation::OrHash]
|
|
41
|
+
).void
|
|
42
|
+
end
|
|
43
|
+
attr_writer :transformation
|
|
44
|
+
|
|
45
|
+
sig do
|
|
46
|
+
params(
|
|
47
|
+
text: String,
|
|
48
|
+
encoding: Imagekitio::TextOverlay::Encoding::OrSymbol,
|
|
49
|
+
transformation:
|
|
50
|
+
T::Array[Imagekitio::TextOverlayTransformation::OrHash],
|
|
51
|
+
type: Symbol
|
|
52
|
+
).returns(T.attached_class)
|
|
53
|
+
end
|
|
54
|
+
def self.new(
|
|
55
|
+
# Specifies the text to be displayed in the overlay. The SDK automatically handles
|
|
56
|
+
# special characters and encoding.
|
|
57
|
+
text:,
|
|
58
|
+
# Text can be included in the layer as either `i-{input}` (plain text) or
|
|
59
|
+
# `ie-{base64_encoded_input}` (base64). By default, the SDK selects the
|
|
60
|
+
# appropriate format based on the input text. To always use base64
|
|
61
|
+
# (`ie-{base64}`), set this parameter to `base64`. To always use plain text
|
|
62
|
+
# (`i-{input}`), set it to `plain`.
|
|
63
|
+
encoding: nil,
|
|
64
|
+
# Control styling of the text overlay. See
|
|
65
|
+
# [Text overlays](https://imagekit.io/docs/add-overlays-on-images#text-overlay).
|
|
66
|
+
transformation: nil,
|
|
67
|
+
type: :text
|
|
68
|
+
)
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
sig do
|
|
72
|
+
override.returns(
|
|
73
|
+
{
|
|
74
|
+
text: String,
|
|
75
|
+
type: Symbol,
|
|
76
|
+
encoding: Imagekitio::TextOverlay::Encoding::OrSymbol,
|
|
77
|
+
transformation: T::Array[Imagekitio::TextOverlayTransformation]
|
|
78
|
+
}
|
|
79
|
+
)
|
|
80
|
+
end
|
|
81
|
+
def to_hash
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Text can be included in the layer as either `i-{input}` (plain text) or
|
|
85
|
+
# `ie-{base64_encoded_input}` (base64). By default, the SDK selects the
|
|
86
|
+
# appropriate format based on the input text. To always use base64
|
|
87
|
+
# (`ie-{base64}`), set this parameter to `base64`. To always use plain text
|
|
88
|
+
# (`i-{input}`), set it to `plain`.
|
|
89
|
+
module Encoding
|
|
90
|
+
extend Imagekitio::Internal::Type::Enum
|
|
91
|
+
|
|
92
|
+
TaggedSymbol =
|
|
93
|
+
T.type_alias { T.all(Symbol, Imagekitio::TextOverlay::Encoding) }
|
|
94
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
95
|
+
|
|
96
|
+
AUTO = T.let(:auto, Imagekitio::TextOverlay::Encoding::TaggedSymbol)
|
|
97
|
+
PLAIN = T.let(:plain, Imagekitio::TextOverlay::Encoding::TaggedSymbol)
|
|
98
|
+
BASE64 = T.let(:base64, Imagekitio::TextOverlay::Encoding::TaggedSymbol)
|
|
99
|
+
|
|
100
|
+
sig do
|
|
101
|
+
override.returns(
|
|
102
|
+
T::Array[Imagekitio::TextOverlay::Encoding::TaggedSymbol]
|
|
103
|
+
)
|
|
104
|
+
end
|
|
105
|
+
def self.values
|
|
106
|
+
end
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
end
|