imagekitio 4.12.0 → 4.13.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 +8 -0
- data/README.md +1 -1
- data/lib/imagekitio/helpers/helper.rb +18 -4
- data/lib/imagekitio/helpers/transformation_utils.rb +1 -0
- data/lib/imagekitio/models/folder_delete_event.rb +13 -1
- data/lib/imagekitio/models/folder_update_event.rb +30 -3
- data/lib/imagekitio/models/transformation.rb +13 -1
- data/lib/imagekitio/models/unsafe_unwrap_webhook_event.rb +1 -1
- data/lib/imagekitio/models/unwrap_webhook_event.rb +1 -1
- data/lib/imagekitio/version.rb +1 -1
- data/rbi/imagekitio/models/folder_delete_event.rbi +18 -3
- data/rbi/imagekitio/models/folder_update_event.rbi +50 -3
- data/rbi/imagekitio/models/transformation.rbi +19 -0
- data/sig/imagekitio/models/folder_delete_event.rbs +7 -3
- data/sig/imagekitio/models/folder_update_event.rbs +25 -2
- data/sig/imagekitio/models/transformation.rbs +7 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 44f21e327dc4c1d2b2bed8c273f84f5455917c0784f6a795861364f379d1e312
|
|
4
|
+
data.tar.gz: bd87588fa306bb68d1f6df783e65f76cf85864f5c501708d3d46ad17e1883f34
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 25470054024768ca6a5933a3a483766c81519fe01132d16ae941062c43e002039e5e4686290d348b4844d84eacf6b92d41652c46a1c8a00b7d2ca8037c3291c1
|
|
7
|
+
data.tar.gz: 4eb1b076c1e53ba3c2878a1e9376cfd0091f7b9399db5383fafc8518671331604fcdee0c180a39b1ce33135b4abe59f37a8e81d5f907bbb1fe085af14f2d7509
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [4.13.0](https://github.com/imagekit-developer/imagekit-ruby/compare/v4.12.0...v4.13.0) (2026-11-16)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **transformation:** add saturation and encode negative numbers with the N prefix in URL generation ([512b775](https://github.com/imagekit-developer/imagekit-ruby/commit/512b77500a76de41b5a7b3ce8f9b09f5daffdc02))
|
|
9
|
+
* **webhooks:** add folder paths to folder.deleted and folder.updated events ([7a9b990](https://github.com/imagekit-developer/imagekit-ruby/commit/7a9b9904fe4459e8dd48932f3c5f8d742dceb538))
|
|
10
|
+
|
|
3
11
|
## [4.12.0](https://github.com/imagekit-developer/imagekit-ruby/compare/v4.11.0...v4.12.0) (2026-11-02)
|
|
4
12
|
|
|
5
13
|
|
data/README.md
CHANGED
|
@@ -209,6 +209,8 @@ module Imagekitio
|
|
|
209
209
|
value = value.to_i if value == value.to_i
|
|
210
210
|
end
|
|
211
211
|
|
|
212
|
+
value = encode_negative_number(value) if %w[rt x y e-saturation].include?(transform_key)
|
|
213
|
+
|
|
212
214
|
parsed_transform_step << "#{transform_key}#{Imagekitio::TransformationUtils.get_transform_key_value_delimiter}#{value}"
|
|
213
215
|
end
|
|
214
216
|
# rubocop:enable Metrics/BlockLength
|
|
@@ -410,6 +412,16 @@ module Imagekitio
|
|
|
410
412
|
str.chomp("/")
|
|
411
413
|
end
|
|
412
414
|
|
|
415
|
+
# Encode a negative number with the N prefix, because "-" separates a key from its value in the URL.
|
|
416
|
+
# For example, -40 becomes "N40". Other values are returned as is.
|
|
417
|
+
def encode_negative_number(value)
|
|
418
|
+
return value unless value.is_a?(Numeric) && value.negative?
|
|
419
|
+
|
|
420
|
+
magnitude = value.abs
|
|
421
|
+
magnitude = magnitude.to_i if magnitude == magnitude.to_i
|
|
422
|
+
"N#{magnitude}"
|
|
423
|
+
end
|
|
424
|
+
|
|
413
425
|
# Remove leading slash from string
|
|
414
426
|
def remove_leading_slash(str)
|
|
415
427
|
return str unless str.is_a?(String) && str.start_with?("/")
|
|
@@ -633,6 +645,8 @@ module Imagekitio
|
|
|
633
645
|
# Add position properties
|
|
634
646
|
position = safe_get(overlay, :position)
|
|
635
647
|
if position
|
|
648
|
+
# Read raw values: the typed accessors raise for strings that are not numeric, such as "N20" or "bw_mul_0.4".
|
|
649
|
+
position = position.to_h if position.respond_to?(:to_h)
|
|
636
650
|
x = safe_get(position, :x)
|
|
637
651
|
y = safe_get(position, :y_)
|
|
638
652
|
x_center = safe_get(position, :x_center)
|
|
@@ -640,10 +654,10 @@ module Imagekitio
|
|
|
640
654
|
focus = safe_get(position, :focus)
|
|
641
655
|
anchor_point = safe_get(position, :anchor_point)
|
|
642
656
|
|
|
643
|
-
parts << "lx-#{x}" if x
|
|
644
|
-
parts << "ly-#{y}" if y
|
|
645
|
-
parts << "lxc-#{x_center}" if x_center
|
|
646
|
-
parts << "lyc-#{y_center}" if y_center
|
|
657
|
+
parts << "lx-#{encode_negative_number(x)}" if x
|
|
658
|
+
parts << "ly-#{encode_negative_number(y)}" if y
|
|
659
|
+
parts << "lxc-#{encode_negative_number(x_center)}" if x_center
|
|
660
|
+
parts << "lyc-#{encode_negative_number(y_center)}" if y_center
|
|
647
661
|
parts << "lfo-#{focus}" if focus
|
|
648
662
|
parts << "lap-#{anchor_point}" if anchor_point
|
|
649
663
|
end
|
|
@@ -39,8 +39,20 @@ module Imagekitio
|
|
|
39
39
|
# @return [String]
|
|
40
40
|
required :folder_id, String, api_name: :folderId
|
|
41
41
|
|
|
42
|
-
# @!
|
|
42
|
+
# @!attribute folder_path
|
|
43
|
+
# Path of the deleted folder. For a moved folder, this is its path before the
|
|
44
|
+
# move.
|
|
45
|
+
#
|
|
46
|
+
# @return [String, nil]
|
|
47
|
+
optional :folder_path, String, api_name: :folderPath
|
|
48
|
+
|
|
49
|
+
# @!method initialize(folder_id:, folder_path: nil)
|
|
50
|
+
# Some parameter documentations has been truncated, see
|
|
51
|
+
# {Imagekitio::Models::FolderDeleteEvent::Data} for more details.
|
|
52
|
+
#
|
|
43
53
|
# @param folder_id [String] The unique `folderId` of the deleted folder.
|
|
54
|
+
#
|
|
55
|
+
# @param folder_path [String] Path of the deleted folder. For a moved folder, this is its path before the move
|
|
44
56
|
end
|
|
45
57
|
end
|
|
46
58
|
end
|
|
@@ -20,16 +20,43 @@ module Imagekitio
|
|
|
20
20
|
# @return [Symbol, :"folder.updated"]
|
|
21
21
|
required :type, const: :"folder.updated"
|
|
22
22
|
|
|
23
|
-
# @!
|
|
23
|
+
# @!attribute previous
|
|
24
|
+
# Present only when the folder or one of its parent folders was renamed. Contains
|
|
25
|
+
# the folder's path before the rename.
|
|
26
|
+
#
|
|
27
|
+
# @return [Imagekitio::Models::FolderUpdateEvent::Previous, nil]
|
|
28
|
+
optional :previous, -> { Imagekitio::FolderUpdateEvent::Previous }
|
|
29
|
+
|
|
30
|
+
# @!method initialize(created_at:, data:, previous: nil, type: :"folder.updated")
|
|
31
|
+
# Some parameter documentations has been truncated, see
|
|
32
|
+
# {Imagekitio::Models::FolderUpdateEvent} for more details.
|
|
33
|
+
#
|
|
24
34
|
# Triggered when a folder is updated, for example when its custom metadata changes
|
|
25
|
-
# or it is renamed. Renaming a folder sends one event per folder in the tree
|
|
26
|
-
#
|
|
35
|
+
# or it is renamed. Renaming a folder sends one event per folder in the tree. In
|
|
36
|
+
# each of these events, `data.folderPath` is the folder's new path and
|
|
37
|
+
# `previous.folderPath` is its path before the rename.
|
|
27
38
|
#
|
|
28
39
|
# @param created_at [Time] Timestamp of when the event occurred in ISO8601 format.
|
|
29
40
|
#
|
|
30
41
|
# @param data [Imagekitio::Models::Folder]
|
|
31
42
|
#
|
|
43
|
+
# @param previous [Imagekitio::Models::FolderUpdateEvent::Previous] Present only when the folder or one of its parent folders was renamed. Contains
|
|
44
|
+
#
|
|
32
45
|
# @param type [Symbol, :"folder.updated"] Type of the webhook event.
|
|
46
|
+
|
|
47
|
+
class Previous < Imagekitio::Internal::Type::BaseModel
|
|
48
|
+
# @!attribute folder_path
|
|
49
|
+
# Path of the folder before it was renamed.
|
|
50
|
+
#
|
|
51
|
+
# @return [String]
|
|
52
|
+
required :folder_path, String, api_name: :folderPath
|
|
53
|
+
|
|
54
|
+
# @!method initialize(folder_path:)
|
|
55
|
+
# Present only when the folder or one of its parent folders was renamed. Contains
|
|
56
|
+
# the folder's path before the rename.
|
|
57
|
+
#
|
|
58
|
+
# @param folder_path [String] Path of the folder before it was renamed.
|
|
59
|
+
end
|
|
33
60
|
end
|
|
34
61
|
end
|
|
35
62
|
end
|
|
@@ -416,6 +416,16 @@ module Imagekitio
|
|
|
416
416
|
# @return [Float, String, nil]
|
|
417
417
|
optional :rotation, union: -> { Imagekitio::Transformation::Rotation }
|
|
418
418
|
|
|
419
|
+
# @!attribute saturation
|
|
420
|
+
# Adjusts the color saturation of the image. Accepts an integer from -100 to 100.
|
|
421
|
+
# Negative values desaturate (`-100` is fully gray), positive values increase
|
|
422
|
+
# saturation, and `0` leaves the image unchanged. Supported inside image overlays.
|
|
423
|
+
# Not supported for animated images. See
|
|
424
|
+
# [Saturation](https://imagekit.io/docs/effects-and-enhancements#saturation---e-saturation).
|
|
425
|
+
#
|
|
426
|
+
# @return [Integer, nil]
|
|
427
|
+
optional :saturation, Integer
|
|
428
|
+
|
|
419
429
|
# @!attribute shadow
|
|
420
430
|
# Adds a shadow beneath solid objects in an image with a transparent background.
|
|
421
431
|
# For AI-based drop shadows, refer to aiDropShadow. Pass `true` for a default
|
|
@@ -521,7 +531,7 @@ module Imagekitio
|
|
|
521
531
|
# @return [Float, nil]
|
|
522
532
|
optional :zoom, Float
|
|
523
533
|
|
|
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)
|
|
534
|
+
# @!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, saturation: 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)
|
|
525
535
|
# Some parameter documentations has been truncated, see
|
|
526
536
|
# {Imagekitio::Models::Transformation} for more details.
|
|
527
537
|
#
|
|
@@ -618,6 +628,8 @@ module Imagekitio
|
|
|
618
628
|
#
|
|
619
629
|
# @param rotation [Float, String] Specifies the rotation angle in degrees. Positive values rotate the image clockw
|
|
620
630
|
#
|
|
631
|
+
# @param saturation [Integer] Adjusts the color saturation of the image. Accepts an integer from -100 to 100.
|
|
632
|
+
#
|
|
621
633
|
# @param shadow [Boolean, true, String] Adds a shadow beneath solid objects in an image with a transparent background.
|
|
622
634
|
#
|
|
623
635
|
# @param sharpen [Boolean, true, Float] Sharpens the input image, highlighting edges and finer details.
|
|
@@ -49,7 +49,7 @@ module Imagekitio
|
|
|
49
49
|
# Triggered when a folder is created, whether explicitly, by copying or moving a folder, or implicitly when an upload creates missing parent folders. Copying or moving a folder tree sends one event per folder in the tree.
|
|
50
50
|
variant -> { Imagekitio::FolderCreateEvent }
|
|
51
51
|
|
|
52
|
-
# Triggered when a folder is updated, for example when its custom metadata changes or it is renamed. Renaming a folder sends one event per folder in the tree
|
|
52
|
+
# Triggered when a folder is updated, for example when its custom metadata changes or it is renamed. Renaming a folder sends one event per folder in the tree. In each of these events, `data.folderPath` is the folder's new path and `previous.folderPath` is its path before the rename.
|
|
53
53
|
variant -> { Imagekitio::FolderUpdateEvent }
|
|
54
54
|
|
|
55
55
|
# Triggered when a folder is deleted. Deleting a folder tree sends one event per folder in the tree; the files inside it send `file.deleted` events and their versions send `file-version.deleted` events. Moving a folder sends this event for the old `folderId` and `folder.created` for the new one.
|
|
@@ -49,7 +49,7 @@ module Imagekitio
|
|
|
49
49
|
# Triggered when a folder is created, whether explicitly, by copying or moving a folder, or implicitly when an upload creates missing parent folders. Copying or moving a folder tree sends one event per folder in the tree.
|
|
50
50
|
variant -> { Imagekitio::FolderCreateEvent }
|
|
51
51
|
|
|
52
|
-
# Triggered when a folder is updated, for example when its custom metadata changes or it is renamed. Renaming a folder sends one event per folder in the tree
|
|
52
|
+
# Triggered when a folder is updated, for example when its custom metadata changes or it is renamed. Renaming a folder sends one event per folder in the tree. In each of these events, `data.folderPath` is the folder's new path and `previous.folderPath` is its path before the rename.
|
|
53
53
|
variant -> { Imagekitio::FolderUpdateEvent }
|
|
54
54
|
|
|
55
55
|
# Triggered when a folder is deleted. Deleting a folder tree sends one event per folder in the tree; the files inside it send `file.deleted` events and their versions send `file-version.deleted` events. Moving a folder sends this event for the old `folderId` and `folder.created` for the new one.
|
data/lib/imagekitio/version.rb
CHANGED
|
@@ -67,14 +67,29 @@ module Imagekitio
|
|
|
67
67
|
sig { returns(String) }
|
|
68
68
|
attr_accessor :folder_id
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
# Path of the deleted folder. For a moved folder, this is its path before the
|
|
71
|
+
# move.
|
|
72
|
+
sig { returns(T.nilable(String)) }
|
|
73
|
+
attr_reader :folder_path
|
|
74
|
+
|
|
75
|
+
sig { params(folder_path: String).void }
|
|
76
|
+
attr_writer :folder_path
|
|
77
|
+
|
|
78
|
+
sig do
|
|
79
|
+
params(folder_id: String, folder_path: String).returns(
|
|
80
|
+
T.attached_class
|
|
81
|
+
)
|
|
82
|
+
end
|
|
71
83
|
def self.new(
|
|
72
84
|
# The unique `folderId` of the deleted folder.
|
|
73
|
-
folder_id
|
|
85
|
+
folder_id:,
|
|
86
|
+
# Path of the deleted folder. For a moved folder, this is its path before the
|
|
87
|
+
# move.
|
|
88
|
+
folder_path: nil
|
|
74
89
|
)
|
|
75
90
|
end
|
|
76
91
|
|
|
77
|
-
sig { override.returns({ folder_id: String }) }
|
|
92
|
+
sig { override.returns({ folder_id: String, folder_path: String }) }
|
|
78
93
|
def to_hash
|
|
79
94
|
end
|
|
80
95
|
end
|
|
@@ -22,13 +22,25 @@ module Imagekitio
|
|
|
22
22
|
sig { returns(Symbol) }
|
|
23
23
|
attr_accessor :type
|
|
24
24
|
|
|
25
|
+
# Present only when the folder or one of its parent folders was renamed. Contains
|
|
26
|
+
# the folder's path before the rename.
|
|
27
|
+
sig { returns(T.nilable(Imagekitio::FolderUpdateEvent::Previous)) }
|
|
28
|
+
attr_reader :previous
|
|
29
|
+
|
|
30
|
+
sig do
|
|
31
|
+
params(previous: Imagekitio::FolderUpdateEvent::Previous::OrHash).void
|
|
32
|
+
end
|
|
33
|
+
attr_writer :previous
|
|
34
|
+
|
|
25
35
|
# Triggered when a folder is updated, for example when its custom metadata changes
|
|
26
|
-
# or it is renamed. Renaming a folder sends one event per folder in the tree
|
|
27
|
-
#
|
|
36
|
+
# or it is renamed. Renaming a folder sends one event per folder in the tree. In
|
|
37
|
+
# each of these events, `data.folderPath` is the folder's new path and
|
|
38
|
+
# `previous.folderPath` is its path before the rename.
|
|
28
39
|
sig do
|
|
29
40
|
params(
|
|
30
41
|
created_at: Time,
|
|
31
42
|
data: Imagekitio::Folder::OrHash,
|
|
43
|
+
previous: Imagekitio::FolderUpdateEvent::Previous::OrHash,
|
|
32
44
|
type: Symbol
|
|
33
45
|
).returns(T.attached_class)
|
|
34
46
|
end
|
|
@@ -36,6 +48,9 @@ module Imagekitio
|
|
|
36
48
|
# Timestamp of when the event occurred in ISO8601 format.
|
|
37
49
|
created_at:,
|
|
38
50
|
data:,
|
|
51
|
+
# Present only when the folder or one of its parent folders was renamed. Contains
|
|
52
|
+
# the folder's path before the rename.
|
|
53
|
+
previous: nil,
|
|
39
54
|
# Type of the webhook event.
|
|
40
55
|
type: :"folder.updated"
|
|
41
56
|
)
|
|
@@ -43,11 +58,43 @@ module Imagekitio
|
|
|
43
58
|
|
|
44
59
|
sig do
|
|
45
60
|
override.returns(
|
|
46
|
-
{
|
|
61
|
+
{
|
|
62
|
+
created_at: Time,
|
|
63
|
+
data: Imagekitio::Folder,
|
|
64
|
+
type: Symbol,
|
|
65
|
+
previous: Imagekitio::FolderUpdateEvent::Previous
|
|
66
|
+
}
|
|
47
67
|
)
|
|
48
68
|
end
|
|
49
69
|
def to_hash
|
|
50
70
|
end
|
|
71
|
+
|
|
72
|
+
class Previous < Imagekitio::Internal::Type::BaseModel
|
|
73
|
+
OrHash =
|
|
74
|
+
T.type_alias do
|
|
75
|
+
T.any(
|
|
76
|
+
Imagekitio::FolderUpdateEvent::Previous,
|
|
77
|
+
Imagekitio::Internal::AnyHash
|
|
78
|
+
)
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Path of the folder before it was renamed.
|
|
82
|
+
sig { returns(String) }
|
|
83
|
+
attr_accessor :folder_path
|
|
84
|
+
|
|
85
|
+
# Present only when the folder or one of its parent folders was renamed. Contains
|
|
86
|
+
# the folder's path before the rename.
|
|
87
|
+
sig { params(folder_path: String).returns(T.attached_class) }
|
|
88
|
+
def self.new(
|
|
89
|
+
# Path of the folder before it was renamed.
|
|
90
|
+
folder_path:
|
|
91
|
+
)
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
sig { override.returns({ folder_path: String }) }
|
|
95
|
+
def to_hash
|
|
96
|
+
end
|
|
97
|
+
end
|
|
51
98
|
end
|
|
52
99
|
end
|
|
53
100
|
end
|
|
@@ -529,6 +529,17 @@ module Imagekitio
|
|
|
529
529
|
end
|
|
530
530
|
attr_writer :rotation
|
|
531
531
|
|
|
532
|
+
# Adjusts the color saturation of the image. Accepts an integer from -100 to 100.
|
|
533
|
+
# Negative values desaturate (`-100` is fully gray), positive values increase
|
|
534
|
+
# saturation, and `0` leaves the image unchanged. Supported inside image overlays.
|
|
535
|
+
# Not supported for animated images. See
|
|
536
|
+
# [Saturation](https://imagekit.io/docs/effects-and-enhancements#saturation---e-saturation).
|
|
537
|
+
sig { returns(T.nilable(Integer)) }
|
|
538
|
+
attr_reader :saturation
|
|
539
|
+
|
|
540
|
+
sig { params(saturation: Integer).void }
|
|
541
|
+
attr_writer :saturation
|
|
542
|
+
|
|
532
543
|
# Adds a shadow beneath solid objects in an image with a transparent background.
|
|
533
544
|
# For AI-based drop shadows, refer to aiDropShadow. Pass `true` for a default
|
|
534
545
|
# shadow, or provide a string for a custom shadow. See
|
|
@@ -722,6 +733,7 @@ module Imagekitio
|
|
|
722
733
|
radius: T.any(Float, Symbol, String),
|
|
723
734
|
raw: String,
|
|
724
735
|
rotation: Imagekitio::Transformation::Rotation::Variants,
|
|
736
|
+
saturation: Integer,
|
|
725
737
|
shadow: T.any(T::Boolean, String),
|
|
726
738
|
sharpen: T.any(T::Boolean, Float),
|
|
727
739
|
start_offset: Imagekitio::Transformation::StartOffset::Variants,
|
|
@@ -970,6 +982,12 @@ module Imagekitio
|
|
|
970
982
|
# only the following values are supported: 0, 90, 180, 270, or 360. See
|
|
971
983
|
# [Rotate](https://imagekit.io/docs/effects-and-enhancements#rotate---rt).
|
|
972
984
|
rotation: nil,
|
|
985
|
+
# Adjusts the color saturation of the image. Accepts an integer from -100 to 100.
|
|
986
|
+
# Negative values desaturate (`-100` is fully gray), positive values increase
|
|
987
|
+
# saturation, and `0` leaves the image unchanged. Supported inside image overlays.
|
|
988
|
+
# Not supported for animated images. See
|
|
989
|
+
# [Saturation](https://imagekit.io/docs/effects-and-enhancements#saturation---e-saturation).
|
|
990
|
+
saturation: nil,
|
|
973
991
|
# Adds a shadow beneath solid objects in an image with a transparent background.
|
|
974
992
|
# For AI-based drop shadows, refer to aiDropShadow. Pass `true` for a default
|
|
975
993
|
# shadow, or provide a string for a custom shadow. See
|
|
@@ -1073,6 +1091,7 @@ module Imagekitio
|
|
|
1073
1091
|
radius: T.any(Float, Symbol, String),
|
|
1074
1092
|
raw: String,
|
|
1075
1093
|
rotation: Imagekitio::Transformation::Rotation::Variants,
|
|
1094
|
+
saturation: Integer,
|
|
1076
1095
|
shadow: T.any(T::Boolean, String),
|
|
1077
1096
|
sharpen: T.any(T::Boolean, Float),
|
|
1078
1097
|
start_offset: Imagekitio::Transformation::StartOffset::Variants,
|
|
@@ -34,14 +34,18 @@ module Imagekitio
|
|
|
34
34
|
type: :"folder.deleted"
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
type data = { folder_id: String }
|
|
37
|
+
type data = { folder_id: String, folder_path: String }
|
|
38
38
|
|
|
39
39
|
class Data < Imagekitio::Internal::Type::BaseModel
|
|
40
40
|
attr_accessor folder_id: String
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
attr_reader folder_path: String?
|
|
43
43
|
|
|
44
|
-
def
|
|
44
|
+
def folder_path=: (String) -> String
|
|
45
|
+
|
|
46
|
+
def initialize: (folder_id: String, ?folder_path: String) -> void
|
|
47
|
+
|
|
48
|
+
def to_hash: -> { folder_id: String, folder_path: String }
|
|
45
49
|
end
|
|
46
50
|
end
|
|
47
51
|
end
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
module Imagekitio
|
|
2
2
|
module Models
|
|
3
3
|
type folder_update_event =
|
|
4
|
-
{
|
|
4
|
+
{
|
|
5
|
+
created_at: Time,
|
|
6
|
+
data: Imagekitio::Folder,
|
|
7
|
+
type: :"folder.updated",
|
|
8
|
+
previous: Imagekitio::FolderUpdateEvent::Previous
|
|
9
|
+
}
|
|
5
10
|
|
|
6
11
|
class FolderUpdateEvent < Imagekitio::Models::BaseWebhookEvent
|
|
7
12
|
def created_at: -> Time
|
|
@@ -16,17 +21,35 @@ module Imagekitio
|
|
|
16
21
|
|
|
17
22
|
def type=: (:"folder.updated" _) -> :"folder.updated"
|
|
18
23
|
|
|
24
|
+
def previous: -> Imagekitio::FolderUpdateEvent::Previous?
|
|
25
|
+
|
|
26
|
+
def previous=: (
|
|
27
|
+
Imagekitio::FolderUpdateEvent::Previous _
|
|
28
|
+
) -> Imagekitio::FolderUpdateEvent::Previous
|
|
29
|
+
|
|
19
30
|
def initialize: (
|
|
20
31
|
created_at: Time,
|
|
21
32
|
data: Imagekitio::Folder,
|
|
33
|
+
?previous: Imagekitio::FolderUpdateEvent::Previous,
|
|
22
34
|
?type: :"folder.updated"
|
|
23
35
|
) -> void
|
|
24
36
|
|
|
25
37
|
def to_hash: -> {
|
|
26
38
|
created_at: Time,
|
|
27
39
|
data: Imagekitio::Folder,
|
|
28
|
-
type: :"folder.updated"
|
|
40
|
+
type: :"folder.updated",
|
|
41
|
+
previous: Imagekitio::FolderUpdateEvent::Previous
|
|
29
42
|
}
|
|
43
|
+
|
|
44
|
+
type previous = { folder_path: String }
|
|
45
|
+
|
|
46
|
+
class Previous < Imagekitio::Internal::Type::BaseModel
|
|
47
|
+
attr_accessor folder_path: String
|
|
48
|
+
|
|
49
|
+
def initialize: (folder_path: String) -> void
|
|
50
|
+
|
|
51
|
+
def to_hash: -> { folder_path: String }
|
|
52
|
+
end
|
|
30
53
|
end
|
|
31
54
|
end
|
|
32
55
|
end
|
|
@@ -45,6 +45,7 @@ module Imagekitio
|
|
|
45
45
|
radius: Imagekitio::Models::Transformation::radius,
|
|
46
46
|
raw: String,
|
|
47
47
|
rotation: Imagekitio::Models::Transformation::rotation,
|
|
48
|
+
saturation: Integer,
|
|
48
49
|
shadow: Imagekitio::Models::Transformation::shadow,
|
|
49
50
|
sharpen: Imagekitio::Models::Transformation::sharpen,
|
|
50
51
|
start_offset: Imagekitio::Models::Transformation::start_offset,
|
|
@@ -277,6 +278,10 @@ module Imagekitio
|
|
|
277
278
|
Imagekitio::Models::Transformation::rotation
|
|
278
279
|
) -> Imagekitio::Models::Transformation::rotation
|
|
279
280
|
|
|
281
|
+
attr_reader saturation: Integer?
|
|
282
|
+
|
|
283
|
+
def saturation=: (Integer) -> Integer
|
|
284
|
+
|
|
280
285
|
attr_reader shadow: Imagekitio::Models::Transformation::shadow?
|
|
281
286
|
|
|
282
287
|
def shadow=: (
|
|
@@ -397,6 +402,7 @@ module Imagekitio
|
|
|
397
402
|
?radius: Imagekitio::Models::Transformation::radius,
|
|
398
403
|
?raw: String,
|
|
399
404
|
?rotation: Imagekitio::Models::Transformation::rotation,
|
|
405
|
+
?saturation: Integer,
|
|
400
406
|
?shadow: Imagekitio::Models::Transformation::shadow,
|
|
401
407
|
?sharpen: Imagekitio::Models::Transformation::sharpen,
|
|
402
408
|
?start_offset: Imagekitio::Models::Transformation::start_offset,
|
|
@@ -456,6 +462,7 @@ module Imagekitio
|
|
|
456
462
|
radius: Imagekitio::Models::Transformation::radius,
|
|
457
463
|
raw: String,
|
|
458
464
|
rotation: Imagekitio::Models::Transformation::rotation,
|
|
465
|
+
saturation: Integer,
|
|
459
466
|
shadow: Imagekitio::Models::Transformation::shadow,
|
|
460
467
|
sharpen: Imagekitio::Models::Transformation::sharpen,
|
|
461
468
|
start_offset: Imagekitio::Models::Transformation::start_offset,
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: imagekitio
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.
|
|
4
|
+
version: 4.13.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- ImageKit
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-11-
|
|
11
|
+
date: 2026-11-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cgi
|