imagekitio 4.8.0 → 4.10.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/CHANGELOG.md +22 -0
- data/README.md +2 -2
- data/lib/imagekitio/client.rb +4 -0
- data/lib/imagekitio/helpers/transformation_utils.rb +1 -0
- data/lib/imagekitio/models/asset_list_params.rb +4 -0
- data/lib/imagekitio/models/custom_metadata_field.rb +20 -1
- data/lib/imagekitio/models/custom_metadata_field_create_params.rb +11 -1
- data/lib/imagekitio/models/custom_metadata_field_update_params.rb +12 -1
- data/lib/imagekitio/models/named_transformation.rb +60 -0
- data/lib/imagekitio/models/named_transformation_create_params.rb +45 -0
- data/lib/imagekitio/models/named_transformation_delete_params.rb +22 -0
- data/lib/imagekitio/models/named_transformation_get_params.rb +22 -0
- data/lib/imagekitio/models/named_transformation_list_params.rb +14 -0
- data/lib/imagekitio/models/named_transformation_list_response.rb +9 -0
- data/lib/imagekitio/models/named_transformation_update_params.rb +53 -0
- data/lib/imagekitio/models/transformation.rb +33 -1
- data/lib/imagekitio/models.rb +12 -0
- data/lib/imagekitio/resources/custom_metadata_fields.rb +8 -3
- data/lib/imagekitio/resources/named_transformations.rb +151 -0
- data/lib/imagekitio/version.rb +1 -1
- data/lib/imagekitio.rb +8 -0
- data/rbi/imagekitio/client.rbi +3 -0
- data/rbi/imagekitio/models/asset_list_params.rbi +14 -0
- data/rbi/imagekitio/models/custom_metadata_field.rbi +31 -3
- data/rbi/imagekitio/models/custom_metadata_field_create_params.rbi +15 -0
- data/rbi/imagekitio/models/custom_metadata_field_update_params.rbi +17 -0
- data/rbi/imagekitio/models/named_transformation.rbi +81 -0
- data/rbi/imagekitio/models/named_transformation_create_params.rbi +73 -0
- data/rbi/imagekitio/models/named_transformation_delete_params.rbi +43 -0
- data/rbi/imagekitio/models/named_transformation_get_params.rbi +43 -0
- data/rbi/imagekitio/models/named_transformation_list_params.rbi +30 -0
- data/rbi/imagekitio/models/named_transformation_list_response.rbi +11 -0
- data/rbi/imagekitio/models/named_transformation_update_params.rbi +87 -0
- data/rbi/imagekitio/models/transformation.rbi +43 -0
- data/rbi/imagekitio/models.rbi +17 -0
- data/rbi/imagekitio/resources/custom_metadata_fields.rbi +13 -1
- data/rbi/imagekitio/resources/named_transformations.rbi +119 -0
- data/sig/imagekitio/client.rbs +2 -0
- data/sig/imagekitio/models/asset_list_params.rbs +8 -0
- data/sig/imagekitio/models/custom_metadata_field.rbs +17 -3
- data/sig/imagekitio/models/custom_metadata_field_create_params.rbs +8 -1
- data/sig/imagekitio/models/custom_metadata_field_update_params.rbs +7 -0
- data/sig/imagekitio/models/named_transformation.rbs +40 -0
- data/sig/imagekitio/models/named_transformation_create_params.rbs +34 -0
- data/sig/imagekitio/models/named_transformation_delete_params.rbs +23 -0
- data/sig/imagekitio/models/named_transformation_get_params.rbs +23 -0
- data/sig/imagekitio/models/named_transformation_list_params.rbs +15 -0
- data/sig/imagekitio/models/named_transformation_list_response.rbs +8 -0
- data/sig/imagekitio/models/named_transformation_update_params.rbs +42 -0
- data/sig/imagekitio/models/transformation.rbs +17 -0
- data/sig/imagekitio/models.rbs +12 -0
- data/sig/imagekitio/resources/custom_metadata_fields.rbs +2 -0
- data/sig/imagekitio/resources/named_transformations.rbs +33 -0
- metadata +26 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3c30ed9b6589210d2b0d5c5cac947cdc09a678c5974b4751287991c9c17c3078
|
|
4
|
+
data.tar.gz: 49416c6585634a0925a298524cf57ec20043c2acd42b37b8de792a70f4d1f2b4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2b7ffb1d472b479d128ae5eab7983c7ebdf24e7197dcaa7fa8a95c6015069fe08472b3f7e8378ae8071d442d66bd34884504a7c6388ec00facc9f4ef39b879cf
|
|
7
|
+
data.tar.gz: 889a5b70b8537fef0a4cce92d97be64c7467bcb58d1d9c35b8d03bb337a756423d207a1a70ae112cca591c007ce55bee1730c2704c21ba31e55c3c6b8802fa31
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [4.10.0](https://github.com/imagekit-developer/imagekit-ruby/compare/v4.9.0...v4.10.0) (2026-09-16)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* serialize density as dn in SDK URL builders ([7815ad6](https://github.com/imagekit-developer/imagekit-ruby/commit/7815ad6897fc4ed6bd943443a87aede62ed354d9))
|
|
9
|
+
|
|
10
|
+
## [4.9.0](https://github.com/imagekit-developer/imagekit-ruby/compare/v4.8.0...v4.9.0) (2026-08-15)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* add description field in custom metadata field api ([f86bf8e](https://github.com/imagekit-developer/imagekit-ruby/commit/f86bf8e78a5fc75323bfeb1a529b2e4045a62729))
|
|
16
|
+
* **api:** Named Transformations ([512b517](https://github.com/imagekit-developer/imagekit-ruby/commit/512b517e3c7c7fa22c9a20e0a20715f3381c66ac))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Chores
|
|
20
|
+
|
|
21
|
+
* change default branch name ([9b3e035](https://github.com/imagekit-developer/imagekit-ruby/commit/9b3e0352461524f45131bc23b5a466116cc26745))
|
|
22
|
+
* move to one repo structure ([c5b6c51](https://github.com/imagekit-developer/imagekit-ruby/commit/c5b6c513b4da32c2426a699c27f90225aae7e346))
|
|
23
|
+
* pin next release ([431111b](https://github.com/imagekit-developer/imagekit-ruby/commit/431111b97b244e213eb0ba6de36a9255c125cbfc))
|
|
24
|
+
|
|
3
25
|
## [4.8.0](https://github.com/imagekit-developer/imagekit-ruby/compare/v4.7.0...v4.8.0) (2026-07-14)
|
|
4
26
|
|
|
5
27
|
|
data/README.md
CHANGED
|
@@ -46,7 +46,7 @@ To use this gem, install via Bundler by adding the following to your application
|
|
|
46
46
|
<!-- x-release-please-start-version -->
|
|
47
47
|
|
|
48
48
|
```ruby
|
|
49
|
-
gem "imagekitio", "~> 4.
|
|
49
|
+
gem "imagekitio", "~> 4.10.0"
|
|
50
50
|
```
|
|
51
51
|
|
|
52
52
|
<!-- x-release-please-end -->
|
|
@@ -748,4 +748,4 @@ Ruby 3.2.0 or higher.
|
|
|
748
748
|
|
|
749
749
|
## Contributing
|
|
750
750
|
|
|
751
|
-
See [the contributing documentation](https://github.com/imagekit-developer/imagekit-ruby/tree/
|
|
751
|
+
See [the contributing documentation](https://github.com/imagekit-developer/imagekit-ruby/tree/main/CONTRIBUTING.md).
|
data/lib/imagekitio/client.rb
CHANGED
|
@@ -41,6 +41,9 @@ module Imagekitio
|
|
|
41
41
|
# @return [Imagekitio::Resources::SavedExtensions]
|
|
42
42
|
attr_reader :saved_extensions
|
|
43
43
|
|
|
44
|
+
# @return [Imagekitio::Resources::NamedTransformations]
|
|
45
|
+
attr_reader :named_transformations
|
|
46
|
+
|
|
44
47
|
# @return [Imagekitio::Resources::Assets]
|
|
45
48
|
attr_reader :assets
|
|
46
49
|
|
|
@@ -149,6 +152,7 @@ module Imagekitio
|
|
|
149
152
|
@custom_metadata_fields = Imagekitio::Resources::CustomMetadataFields.new(client: self)
|
|
150
153
|
@files = Imagekitio::Resources::Files.new(client: self)
|
|
151
154
|
@saved_extensions = Imagekitio::Resources::SavedExtensions.new(client: self)
|
|
155
|
+
@named_transformations = Imagekitio::Resources::NamedTransformations.new(client: self)
|
|
152
156
|
@assets = Imagekitio::Resources::Assets.new(client: self)
|
|
153
157
|
@cache = Imagekitio::Resources::Cache.new(client: self)
|
|
154
158
|
@folders = Imagekitio::Resources::Folders.new(client: self)
|
|
@@ -131,6 +131,10 @@ module Imagekitio
|
|
|
131
131
|
DESC_SIZE = :DESC_SIZE
|
|
132
132
|
ASC_RELEVANCE = :ASC_RELEVANCE
|
|
133
133
|
DESC_RELEVANCE = :DESC_RELEVANCE
|
|
134
|
+
ASC_DURATION = :ASC_DURATION
|
|
135
|
+
DESC_DURATION = :DESC_DURATION
|
|
136
|
+
ASC_ORIGINAL_CREATION_DATE = :ASC_ORIGINAL_CREATION_DATE
|
|
137
|
+
DESC_ORIGINAL_CREATION_DATE = :DESC_ORIGINAL_CREATION_DATE
|
|
134
138
|
|
|
135
139
|
# @!method self.values
|
|
136
140
|
# @return [Array<Symbol>]
|
|
@@ -31,7 +31,22 @@ module Imagekitio
|
|
|
31
31
|
# @return [Imagekitio::Models::CustomMetadataField::Schema]
|
|
32
32
|
required :schema, -> { Imagekitio::CustomMetadataField::Schema }
|
|
33
33
|
|
|
34
|
-
# @!
|
|
34
|
+
# @!attribute description
|
|
35
|
+
# Optional description of the custom metadata field. Only present when a
|
|
36
|
+
# description has been set. Shown as a hint to the users while setting the field's
|
|
37
|
+
# value on an asset in the media library UI.
|
|
38
|
+
#
|
|
39
|
+
# @return [String, nil]
|
|
40
|
+
optional :description, String
|
|
41
|
+
|
|
42
|
+
# @!attribute reserved
|
|
43
|
+
# Present and set to `true` when the field is reserved. Omitted for regular
|
|
44
|
+
# fields. Reserved fields cannot be deleted.
|
|
45
|
+
#
|
|
46
|
+
# @return [Boolean, nil]
|
|
47
|
+
optional :reserved, Imagekitio::Internal::Type::Boolean
|
|
48
|
+
|
|
49
|
+
# @!method initialize(id:, label:, name:, schema:, description: nil, reserved: nil)
|
|
35
50
|
# Some parameter documentations has been truncated, see
|
|
36
51
|
# {Imagekitio::Models::CustomMetadataField} for more details.
|
|
37
52
|
#
|
|
@@ -44,6 +59,10 @@ module Imagekitio
|
|
|
44
59
|
# @param name [String] API name of the custom metadata field. This becomes the key while setting `custo
|
|
45
60
|
#
|
|
46
61
|
# @param schema [Imagekitio::Models::CustomMetadataField::Schema] An object that describes the rules for the custom metadata field value.
|
|
62
|
+
#
|
|
63
|
+
# @param description [String] Optional description of the custom metadata field. Only present when a descripti
|
|
64
|
+
#
|
|
65
|
+
# @param reserved [Boolean] Present and set to `true` when the field is reserved. Omitted for regular fields
|
|
47
66
|
|
|
48
67
|
# @see Imagekitio::Models::CustomMetadataField#schema
|
|
49
68
|
class Schema < Imagekitio::Internal::Type::BaseModel
|
|
@@ -28,7 +28,15 @@ module Imagekitio
|
|
|
28
28
|
# @return [Imagekitio::Models::CustomMetadataFieldCreateParams::Schema]
|
|
29
29
|
required :schema, -> { Imagekitio::CustomMetadataFieldCreateParams::Schema }
|
|
30
30
|
|
|
31
|
-
# @!
|
|
31
|
+
# @!attribute description
|
|
32
|
+
# Optional description for the custom metadata field. Can be up to 500 characters.
|
|
33
|
+
# This is shown as a hint to the users while setting the field's value on an asset
|
|
34
|
+
# in the media library UI.
|
|
35
|
+
#
|
|
36
|
+
# @return [String, nil]
|
|
37
|
+
optional :description, String
|
|
38
|
+
|
|
39
|
+
# @!method initialize(label:, name:, schema:, description: nil, request_options: {})
|
|
32
40
|
# Some parameter documentations has been truncated, see
|
|
33
41
|
# {Imagekitio::Models::CustomMetadataFieldCreateParams} for more details.
|
|
34
42
|
#
|
|
@@ -38,6 +46,8 @@ module Imagekitio
|
|
|
38
46
|
#
|
|
39
47
|
# @param schema [Imagekitio::Models::CustomMetadataFieldCreateParams::Schema]
|
|
40
48
|
#
|
|
49
|
+
# @param description [String] Optional description for the custom metadata field. Can be up to 500 characters.
|
|
50
|
+
#
|
|
41
51
|
# @param request_options [Imagekitio::RequestOptions, Hash{Symbol=>Object}]
|
|
42
52
|
|
|
43
53
|
class Schema < Imagekitio::Internal::Type::BaseModel
|
|
@@ -12,6 +12,15 @@ module Imagekitio
|
|
|
12
12
|
# @return [String]
|
|
13
13
|
required :id, String
|
|
14
14
|
|
|
15
|
+
# @!attribute description
|
|
16
|
+
# Optional description for the custom metadata field. Can be up to 500 characters.
|
|
17
|
+
# Send an empty string to clear an existing description. This is shown as a hint
|
|
18
|
+
# to the users while setting the field's value on an asset in the media library
|
|
19
|
+
# UI.
|
|
20
|
+
#
|
|
21
|
+
# @return [String, nil]
|
|
22
|
+
optional :description, String
|
|
23
|
+
|
|
15
24
|
# @!attribute label
|
|
16
25
|
# Human readable name of the custom metadata field. This should be unique across
|
|
17
26
|
# all non deleted custom metadata fields. This name is displayed as form field
|
|
@@ -30,12 +39,14 @@ module Imagekitio
|
|
|
30
39
|
# @return [Imagekitio::Models::CustomMetadataFieldUpdateParams::Schema, nil]
|
|
31
40
|
optional :schema, -> { Imagekitio::CustomMetadataFieldUpdateParams::Schema }
|
|
32
41
|
|
|
33
|
-
# @!method initialize(id:, label: nil, schema: nil, request_options: {})
|
|
42
|
+
# @!method initialize(id:, description: nil, label: nil, schema: nil, request_options: {})
|
|
34
43
|
# Some parameter documentations has been truncated, see
|
|
35
44
|
# {Imagekitio::Models::CustomMetadataFieldUpdateParams} for more details.
|
|
36
45
|
#
|
|
37
46
|
# @param id [String]
|
|
38
47
|
#
|
|
48
|
+
# @param description [String] Optional description for the custom metadata field. Can be up to 500 characters.
|
|
49
|
+
#
|
|
39
50
|
# @param label [String] Human readable name of the custom metadata field. This should be unique across a
|
|
40
51
|
#
|
|
41
52
|
# @param schema [Imagekitio::Models::CustomMetadataFieldUpdateParams::Schema] An object that describes the rules for the custom metadata key. This parameter i
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Imagekitio
|
|
4
|
+
module Models
|
|
5
|
+
class NamedTransformation < Imagekitio::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute id
|
|
7
|
+
# Unique identifier for a named transformation.
|
|
8
|
+
#
|
|
9
|
+
# @return [String]
|
|
10
|
+
required :id, String
|
|
11
|
+
|
|
12
|
+
# @!attribute created_at
|
|
13
|
+
# ISO 8601 timestamp of when the named transformation was created.
|
|
14
|
+
#
|
|
15
|
+
# @return [Time]
|
|
16
|
+
required :created_at, Time, api_name: :createdAt
|
|
17
|
+
|
|
18
|
+
# @!attribute enabled
|
|
19
|
+
# Whether the named transformation is currently enabled. When set to `false`,
|
|
20
|
+
# requests using this named transformation fail at delivery time.
|
|
21
|
+
#
|
|
22
|
+
# @return [Boolean]
|
|
23
|
+
required :enabled, Imagekitio::Internal::Type::Boolean
|
|
24
|
+
|
|
25
|
+
# @!attribute name
|
|
26
|
+
# Alias for the transformation string, used in URLs as `tr:n-<name>`. This is
|
|
27
|
+
# case-sensitive, contains only alphanumeric characters or `_` (underscore), and
|
|
28
|
+
# is unique across all named transformations for your account.
|
|
29
|
+
#
|
|
30
|
+
# @return [String]
|
|
31
|
+
required :name, String
|
|
32
|
+
|
|
33
|
+
# @!attribute transformation
|
|
34
|
+
# The transformation string this named transformation refers to. Learn more about
|
|
35
|
+
# the [transformation string syntax](https://imagekit.io/docs/transformations).
|
|
36
|
+
#
|
|
37
|
+
# @return [String]
|
|
38
|
+
required :transformation, String
|
|
39
|
+
|
|
40
|
+
# @!method initialize(id:, created_at:, enabled:, name:, transformation:)
|
|
41
|
+
# Some parameter documentations has been truncated, see
|
|
42
|
+
# {Imagekitio::Models::NamedTransformation} for more details.
|
|
43
|
+
#
|
|
44
|
+
# A named transformation is an alias for a transformation string, letting you
|
|
45
|
+
# apply and later update complex transformations without changing your image or
|
|
46
|
+
# video URLs. Learn more about
|
|
47
|
+
# [named transformations](https://imagekit.io/docs/transformations#named-transformations).
|
|
48
|
+
#
|
|
49
|
+
# @param id [String] Unique identifier for a named transformation.
|
|
50
|
+
#
|
|
51
|
+
# @param created_at [Time] ISO 8601 timestamp of when the named transformation was created.
|
|
52
|
+
#
|
|
53
|
+
# @param enabled [Boolean] Whether the named transformation is currently enabled. When set to `false`, requ
|
|
54
|
+
#
|
|
55
|
+
# @param name [String] Alias for the transformation string, used in URLs as `tr:n-<name>`. This is case
|
|
56
|
+
#
|
|
57
|
+
# @param transformation [String] The transformation string this named transformation refers to. Learn more about
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Imagekitio
|
|
4
|
+
module Models
|
|
5
|
+
# @see Imagekitio::Resources::NamedTransformations#create
|
|
6
|
+
class NamedTransformationCreateParams < Imagekitio::Internal::Type::BaseModel
|
|
7
|
+
extend Imagekitio::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Imagekitio::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute name
|
|
11
|
+
# Alias for the transformation string, used in URLs as `tr:n-<name>`. This is
|
|
12
|
+
# case-sensitive, contains only alphanumeric characters or `_` (underscore), and
|
|
13
|
+
# is unique across all named transformations for your account.
|
|
14
|
+
#
|
|
15
|
+
# @return [String]
|
|
16
|
+
required :name, String
|
|
17
|
+
|
|
18
|
+
# @!attribute transformation
|
|
19
|
+
# The transformation string this named transformation refers to. Learn more about
|
|
20
|
+
# the [transformation string syntax](https://imagekit.io/docs/transformations).
|
|
21
|
+
#
|
|
22
|
+
# @return [String]
|
|
23
|
+
required :transformation, String
|
|
24
|
+
|
|
25
|
+
# @!attribute enabled
|
|
26
|
+
# Whether the named transformation is currently enabled. When set to `false`,
|
|
27
|
+
# requests using this named transformation fail at delivery time.
|
|
28
|
+
#
|
|
29
|
+
# @return [Boolean, nil]
|
|
30
|
+
optional :enabled, Imagekitio::Internal::Type::Boolean
|
|
31
|
+
|
|
32
|
+
# @!method initialize(name:, transformation:, enabled: nil, request_options: {})
|
|
33
|
+
# Some parameter documentations has been truncated, see
|
|
34
|
+
# {Imagekitio::Models::NamedTransformationCreateParams} for more details.
|
|
35
|
+
#
|
|
36
|
+
# @param name [String] Alias for the transformation string, used in URLs as `tr:n-<name>`. This is case
|
|
37
|
+
#
|
|
38
|
+
# @param transformation [String] The transformation string this named transformation refers to. Learn more about
|
|
39
|
+
#
|
|
40
|
+
# @param enabled [Boolean] Whether the named transformation is currently enabled. When set to `false`, requ
|
|
41
|
+
#
|
|
42
|
+
# @param request_options [Imagekitio::RequestOptions, Hash{Symbol=>Object}]
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Imagekitio
|
|
4
|
+
module Models
|
|
5
|
+
# @see Imagekitio::Resources::NamedTransformations#delete
|
|
6
|
+
class NamedTransformationDeleteParams < Imagekitio::Internal::Type::BaseModel
|
|
7
|
+
extend Imagekitio::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Imagekitio::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute id
|
|
11
|
+
# Unique identifier for a named transformation.
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :id, String
|
|
15
|
+
|
|
16
|
+
# @!method initialize(id:, request_options: {})
|
|
17
|
+
# @param id [String] Unique identifier for a named transformation.
|
|
18
|
+
#
|
|
19
|
+
# @param request_options [Imagekitio::RequestOptions, Hash{Symbol=>Object}]
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Imagekitio
|
|
4
|
+
module Models
|
|
5
|
+
# @see Imagekitio::Resources::NamedTransformations#get
|
|
6
|
+
class NamedTransformationGetParams < Imagekitio::Internal::Type::BaseModel
|
|
7
|
+
extend Imagekitio::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Imagekitio::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute id
|
|
11
|
+
# Unique identifier for a named transformation.
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :id, String
|
|
15
|
+
|
|
16
|
+
# @!method initialize(id:, request_options: {})
|
|
17
|
+
# @param id [String] Unique identifier for a named transformation.
|
|
18
|
+
#
|
|
19
|
+
# @param request_options [Imagekitio::RequestOptions, Hash{Symbol=>Object}]
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Imagekitio
|
|
4
|
+
module Models
|
|
5
|
+
# @see Imagekitio::Resources::NamedTransformations#list
|
|
6
|
+
class NamedTransformationListParams < Imagekitio::Internal::Type::BaseModel
|
|
7
|
+
extend Imagekitio::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Imagekitio::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!method initialize(request_options: {})
|
|
11
|
+
# @param request_options [Imagekitio::RequestOptions, Hash{Symbol=>Object}]
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Imagekitio
|
|
4
|
+
module Models
|
|
5
|
+
# @see Imagekitio::Resources::NamedTransformations#update
|
|
6
|
+
class NamedTransformationUpdateParams < Imagekitio::Internal::Type::BaseModel
|
|
7
|
+
extend Imagekitio::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Imagekitio::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute id
|
|
11
|
+
# Unique identifier for a named transformation.
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :id, String
|
|
15
|
+
|
|
16
|
+
# @!attribute enabled
|
|
17
|
+
# Whether the named transformation is enabled. Omit to leave the current value
|
|
18
|
+
# unchanged.
|
|
19
|
+
#
|
|
20
|
+
# @return [Boolean, nil]
|
|
21
|
+
optional :enabled, Imagekitio::Internal::Type::Boolean
|
|
22
|
+
|
|
23
|
+
# @!attribute name
|
|
24
|
+
# Alias for the transformation string, used in URLs as `tr:n-<name>`. This is
|
|
25
|
+
# case-sensitive, contains only alphanumeric characters or `_` (underscore), and
|
|
26
|
+
# is unique across all named transformations for your account.
|
|
27
|
+
#
|
|
28
|
+
# @return [String, nil]
|
|
29
|
+
optional :name, String
|
|
30
|
+
|
|
31
|
+
# @!attribute transformation
|
|
32
|
+
# The transformation string this named transformation refers to. Learn more about
|
|
33
|
+
# the [transformation string syntax](https://imagekit.io/docs/transformations).
|
|
34
|
+
#
|
|
35
|
+
# @return [String, nil]
|
|
36
|
+
optional :transformation, String
|
|
37
|
+
|
|
38
|
+
# @!method initialize(id:, enabled: nil, name: nil, transformation: nil, request_options: {})
|
|
39
|
+
# Some parameter documentations has been truncated, see
|
|
40
|
+
# {Imagekitio::Models::NamedTransformationUpdateParams} for more details.
|
|
41
|
+
#
|
|
42
|
+
# @param id [String] Unique identifier for a named transformation.
|
|
43
|
+
#
|
|
44
|
+
# @param enabled [Boolean] Whether the named transformation is enabled. Omit to leave the current value unc
|
|
45
|
+
#
|
|
46
|
+
# @param name [String] Alias for the transformation string, used in URLs as `tr:n-<name>`. This is case
|
|
47
|
+
#
|
|
48
|
+
# @param transformation [String] The transformation string this named transformation refers to. Learn more about
|
|
49
|
+
#
|
|
50
|
+
# @param request_options [Imagekitio::RequestOptions, Hash{Symbol=>Object}]
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
@@ -201,6 +201,17 @@ module Imagekitio
|
|
|
201
201
|
# @return [String, nil]
|
|
202
202
|
optional :default_image, String, api_name: :defaultImage
|
|
203
203
|
|
|
204
|
+
# @!attribute density
|
|
205
|
+
# Sets the output image density in dots per inch (DPI). Accepts an integer from 1
|
|
206
|
+
# to 1200 or an arithmetic expression using the `idn` variable, such as
|
|
207
|
+
# `idn_mul_2`. For raster images, this updates density metadata without changing
|
|
208
|
+
# dimensions. For vector images, it controls the DPI used during rasterization.
|
|
209
|
+
# Cannot be used inside layers. See
|
|
210
|
+
# [Density](https://imagekit.io/docs/image-optimization#density---dn).
|
|
211
|
+
#
|
|
212
|
+
# @return [Integer, String, nil]
|
|
213
|
+
optional :density, union: -> { Imagekitio::Transformation::Density }
|
|
214
|
+
|
|
204
215
|
# @!attribute distort
|
|
205
216
|
# Distorts the shape of an image. Supports two modes:
|
|
206
217
|
#
|
|
@@ -510,7 +521,7 @@ module Imagekitio
|
|
|
510
521
|
# @return [Float, nil]
|
|
511
522
|
optional :zoom, Float
|
|
512
523
|
|
|
513
|
-
# @!method initialize(ai_change_background: nil, ai_drop_shadow: nil, ai_edit: nil, ai_remove_background: nil, ai_remove_background_external: nil, ai_retouch: nil, ai_upscale: nil, ai_variation: nil, aspect_ratio: nil, audio_codec: nil, background: nil, blur: nil, border: nil, colorize: nil, color_profile: nil, color_replace: nil, contrast_stretch: nil, crop: nil, crop_mode: nil, default_image: nil, distort: nil, dpr: nil, duration: nil, end_offset: nil, flip: nil, focus: nil, format_: nil, gradient: nil, grayscale: nil, height: nil, lossless: nil, metadata: nil, named: nil, opacity: nil, original: nil, overlay: nil, page: nil, progressive: nil, quality: nil, radius: nil, raw: nil, rotation: nil, shadow: nil, sharpen: nil, start_offset: nil, streaming_resolutions: nil, trim: nil, unsharp_mask: nil, video_codec: nil, width: nil, x: nil, x_center: nil, y_: nil, y_center: nil, zoom: nil)
|
|
524
|
+
# @!method initialize(ai_change_background: nil, ai_drop_shadow: nil, ai_edit: nil, ai_remove_background: nil, ai_remove_background_external: nil, ai_retouch: nil, ai_upscale: nil, ai_variation: nil, aspect_ratio: nil, audio_codec: nil, background: nil, blur: nil, border: nil, colorize: nil, color_profile: nil, color_replace: nil, contrast_stretch: nil, crop: nil, crop_mode: nil, default_image: nil, density: nil, distort: nil, dpr: nil, duration: nil, end_offset: nil, flip: nil, focus: nil, format_: nil, gradient: nil, grayscale: nil, height: nil, lossless: nil, metadata: nil, named: nil, opacity: nil, original: nil, overlay: nil, page: nil, progressive: nil, quality: nil, radius: nil, raw: nil, rotation: nil, shadow: nil, sharpen: nil, start_offset: nil, streaming_resolutions: nil, trim: nil, unsharp_mask: nil, video_codec: nil, width: nil, x: nil, x_center: nil, y_: nil, y_center: nil, zoom: nil)
|
|
514
525
|
# Some parameter documentations has been truncated, see
|
|
515
526
|
# {Imagekitio::Models::Transformation} for more details.
|
|
516
527
|
#
|
|
@@ -561,6 +572,8 @@ module Imagekitio
|
|
|
561
572
|
#
|
|
562
573
|
# @param default_image [String] Specifies a fallback image if the resource is not found, e.g., a URL or file pat
|
|
563
574
|
#
|
|
575
|
+
# @param density [Integer, String] Sets the output image density in dots per inch (DPI). Accepts an integer from 1
|
|
576
|
+
#
|
|
564
577
|
# @param distort [String] Distorts the shape of an image. Supports two modes:
|
|
565
578
|
#
|
|
566
579
|
# @param dpr [Float] Accepts values between 0.1 and 5, or `auto` for automatic device pixel ratio (DP
|
|
@@ -802,6 +815,25 @@ module Imagekitio
|
|
|
802
815
|
# @return [Array<Symbol>]
|
|
803
816
|
end
|
|
804
817
|
|
|
818
|
+
# Sets the output image density in dots per inch (DPI). Accepts an integer from 1
|
|
819
|
+
# to 1200 or an arithmetic expression using the `idn` variable, such as
|
|
820
|
+
# `idn_mul_2`. For raster images, this updates density metadata without changing
|
|
821
|
+
# dimensions. For vector images, it controls the DPI used during rasterization.
|
|
822
|
+
# Cannot be used inside layers. See
|
|
823
|
+
# [Density](https://imagekit.io/docs/image-optimization#density---dn).
|
|
824
|
+
#
|
|
825
|
+
# @see Imagekitio::Models::Transformation#density
|
|
826
|
+
module Density
|
|
827
|
+
extend Imagekitio::Internal::Type::Union
|
|
828
|
+
|
|
829
|
+
variant Integer
|
|
830
|
+
|
|
831
|
+
variant String
|
|
832
|
+
|
|
833
|
+
# @!method self.variants
|
|
834
|
+
# @return [Array(Integer, String)]
|
|
835
|
+
end
|
|
836
|
+
|
|
805
837
|
# Specifies the duration (in seconds) for trimming videos, e.g., `5` or `10.5`.
|
|
806
838
|
# Typically used with startOffset to indicate the length from the start offset.
|
|
807
839
|
# Arithmetic expressions are supported. See
|
data/lib/imagekitio/models.rb
CHANGED
|
@@ -124,6 +124,18 @@ module Imagekitio
|
|
|
124
124
|
|
|
125
125
|
Metadata = Imagekitio::Models::Metadata
|
|
126
126
|
|
|
127
|
+
NamedTransformation = Imagekitio::Models::NamedTransformation
|
|
128
|
+
|
|
129
|
+
NamedTransformationCreateParams = Imagekitio::Models::NamedTransformationCreateParams
|
|
130
|
+
|
|
131
|
+
NamedTransformationDeleteParams = Imagekitio::Models::NamedTransformationDeleteParams
|
|
132
|
+
|
|
133
|
+
NamedTransformationGetParams = Imagekitio::Models::NamedTransformationGetParams
|
|
134
|
+
|
|
135
|
+
NamedTransformationListParams = Imagekitio::Models::NamedTransformationListParams
|
|
136
|
+
|
|
137
|
+
NamedTransformationUpdateParams = Imagekitio::Models::NamedTransformationUpdateParams
|
|
138
|
+
|
|
127
139
|
Overlay = Imagekitio::Models::Overlay
|
|
128
140
|
|
|
129
141
|
OverlayPosition = Imagekitio::Models::OverlayPosition
|
|
@@ -11,7 +11,7 @@ module Imagekitio
|
|
|
11
11
|
# on the assets. The value of a field for an asset can be set using the media
|
|
12
12
|
# library UI or programmatically through upload or update assets API.
|
|
13
13
|
#
|
|
14
|
-
# @overload create(label:, name:, schema:, request_options: {})
|
|
14
|
+
# @overload create(label:, name:, schema:, description: nil, request_options: {})
|
|
15
15
|
#
|
|
16
16
|
# @param label [String] Human readable name of the custom metadata field. This should be unique across a
|
|
17
17
|
#
|
|
@@ -19,6 +19,8 @@ module Imagekitio
|
|
|
19
19
|
#
|
|
20
20
|
# @param schema [Imagekitio::Models::CustomMetadataFieldCreateParams::Schema]
|
|
21
21
|
#
|
|
22
|
+
# @param description [String] Optional description for the custom metadata field. Can be up to 500 characters.
|
|
23
|
+
#
|
|
22
24
|
# @param request_options [Imagekitio::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
23
25
|
#
|
|
24
26
|
# @return [Imagekitio::Models::CustomMetadataField]
|
|
@@ -38,12 +40,15 @@ module Imagekitio
|
|
|
38
40
|
# Some parameter documentations has been truncated, see
|
|
39
41
|
# {Imagekitio::Models::CustomMetadataFieldUpdateParams} for more details.
|
|
40
42
|
#
|
|
41
|
-
# This API updates the label or schema of an existing custom
|
|
43
|
+
# This API updates the label, description, or schema of an existing custom
|
|
44
|
+
# metadata field.
|
|
42
45
|
#
|
|
43
|
-
# @overload update(id, label: nil, schema: nil, request_options: {})
|
|
46
|
+
# @overload update(id, description: nil, label: nil, schema: nil, request_options: {})
|
|
44
47
|
#
|
|
45
48
|
# @param id [String] Should be a valid custom metadata field id.
|
|
46
49
|
#
|
|
50
|
+
# @param description [String] Optional description for the custom metadata field. Can be up to 500 characters.
|
|
51
|
+
#
|
|
47
52
|
# @param label [String] Human readable name of the custom metadata field. This should be unique across a
|
|
48
53
|
#
|
|
49
54
|
# @param schema [Imagekitio::Models::CustomMetadataFieldUpdateParams::Schema] An object that describes the rules for the custom metadata key. This parameter i
|