imagekitio 4.2.0 → 4.4.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 +73 -0
- data/README.md +9 -2
- data/lib/imagekitio/client.rb +14 -0
- data/lib/imagekitio/helpers/helper.rb +6 -0
- data/lib/imagekitio/internal/transport/pooled_net_requester.rb +1 -1
- data/lib/imagekitio/internal/type/base_model.rb +5 -5
- data/lib/imagekitio/internal/util.rb +54 -8
- data/lib/imagekitio/models/accounts/origin_create_params.rb +1 -9
- data/lib/imagekitio/models/accounts/origin_delete_params.rb +13 -1
- data/lib/imagekitio/models/accounts/origin_get_params.rb +13 -1
- data/lib/imagekitio/models/accounts/origin_update_params.rb +10 -6
- data/lib/imagekitio/models/accounts/url_endpoint_delete_params.rb +14 -1
- data/lib/imagekitio/models/accounts/url_endpoint_get_params.rb +14 -1
- data/lib/imagekitio/models/accounts/url_endpoint_update_params.rb +14 -1
- data/lib/imagekitio/models/ai_tag.rb +39 -0
- data/lib/imagekitio/models/beta/v2/file_upload_response.rb +9 -270
- data/lib/imagekitio/models/cache/invalidation_get_params.rb +7 -1
- data/lib/imagekitio/models/custom_metadata.rb +8 -0
- data/lib/imagekitio/models/custom_metadata_field_delete_params.rb +7 -1
- data/lib/imagekitio/models/custom_metadata_field_update_params.rb +8 -1
- data/lib/imagekitio/models/embedded_metadata.rb +8 -0
- data/lib/imagekitio/models/extension_config.rb +10 -5
- data/lib/imagekitio/models/extensions.rb +10 -5
- data/lib/imagekitio/models/file.rb +11 -275
- data/lib/imagekitio/models/file_create_event.rb +34 -0
- data/lib/imagekitio/models/file_delete_event.rb +44 -0
- data/lib/imagekitio/models/file_delete_params.rb +7 -1
- data/lib/imagekitio/models/file_get_params.rb +7 -1
- data/lib/imagekitio/models/file_update_event.rb +34 -0
- data/lib/imagekitio/models/file_update_params.rb +5 -7
- data/lib/imagekitio/models/file_upload_response.rb +9 -267
- data/lib/imagekitio/models/file_version_create_event.rb +34 -0
- data/lib/imagekitio/models/file_version_delete_event.rb +52 -0
- data/lib/imagekitio/models/files/metadata_get_params.rb +7 -1
- data/lib/imagekitio/models/files/version_delete_params.rb +7 -1
- data/lib/imagekitio/models/files/version_get_params.rb +7 -1
- data/lib/imagekitio/models/files/version_list_params.rb +7 -1
- data/lib/imagekitio/models/files/version_restore_params.rb +7 -1
- data/lib/imagekitio/models/folders/job_get_params.rb +7 -1
- data/lib/imagekitio/models/overlay_position.rb +99 -5
- data/lib/imagekitio/models/saved_extension_delete_params.rb +7 -1
- data/lib/imagekitio/models/saved_extension_get_params.rb +7 -1
- data/lib/imagekitio/models/saved_extension_update_params.rb +8 -1
- data/lib/imagekitio/models/selected_fields_schema.rb +212 -0
- data/lib/imagekitio/models/unsafe_unwrap_webhook_event.rb +16 -1
- data/lib/imagekitio/models/unwrap_webhook_event.rb +16 -1
- data/lib/imagekitio/models/upload_pre_transform_success_event.rb +9 -285
- data/lib/imagekitio/models/version_info.rb +26 -0
- data/lib/imagekitio/models.rb +25 -0
- data/lib/imagekitio/resources/accounts/origins.rb +4 -14
- data/lib/imagekitio/resources/accounts/usage.rb +2 -1
- data/lib/imagekitio/resources/assets.rb +2 -1
- data/lib/imagekitio/resources/beta/v2/files.rb +5 -4
- data/lib/imagekitio/resources/custom_metadata_fields.rb +2 -1
- data/lib/imagekitio/resources/files/metadata.rb +2 -1
- data/lib/imagekitio/resources/files.rb +7 -11
- data/lib/imagekitio/resources/webhooks.rb +14 -3
- data/lib/imagekitio/version.rb +1 -1
- data/lib/imagekitio.rb +12 -1
- data/rbi/imagekitio/client.rbi +13 -0
- data/rbi/imagekitio/internal/util.rbi +29 -1
- data/rbi/imagekitio/models/accounts/origin_create_params.rbi +4 -51
- data/rbi/imagekitio/models/accounts/origin_delete_params.rbi +18 -5
- data/rbi/imagekitio/models/accounts/origin_get_params.rbi +18 -5
- data/rbi/imagekitio/models/accounts/origin_update_params.rbi +9 -43
- data/rbi/imagekitio/models/accounts/url_endpoint_delete_params.rbi +20 -5
- data/rbi/imagekitio/models/accounts/url_endpoint_get_params.rbi +20 -5
- data/rbi/imagekitio/models/accounts/url_endpoint_update_params.rbi +20 -5
- data/rbi/imagekitio/models/ai_tag.rbi +56 -0
- data/rbi/imagekitio/models/beta/v2/file_upload_response.rbi +11 -535
- data/rbi/imagekitio/models/cache/invalidation_get_params.rbi +11 -5
- data/rbi/imagekitio/models/custom_metadata.rbi +11 -0
- data/rbi/imagekitio/models/custom_metadata_field_delete_params.rbi +13 -5
- data/rbi/imagekitio/models/custom_metadata_field_update_params.rbi +6 -0
- data/rbi/imagekitio/models/embedded_metadata.rbi +11 -0
- data/rbi/imagekitio/models/extension_config.rbi +16 -6
- data/rbi/imagekitio/models/extensions.rbi +16 -6
- data/rbi/imagekitio/models/file.rbi +15 -475
- data/rbi/imagekitio/models/file_create_event.rbi +53 -0
- data/rbi/imagekitio/models/file_delete_event.rbi +80 -0
- data/rbi/imagekitio/models/file_delete_params.rbi +13 -5
- data/rbi/imagekitio/models/file_get_params.rbi +13 -5
- data/rbi/imagekitio/models/file_update_event.rbi +53 -0
- data/rbi/imagekitio/models/file_update_params.rbi +5 -28
- data/rbi/imagekitio/models/file_upload_response.rbi +11 -520
- data/rbi/imagekitio/models/file_version_create_event.rbi +56 -0
- data/rbi/imagekitio/models/file_version_delete_event.rbi +93 -0
- data/rbi/imagekitio/models/files/metadata_get_params.rbi +11 -5
- data/rbi/imagekitio/models/files/version_delete_params.rbi +10 -2
- data/rbi/imagekitio/models/files/version_get_params.rbi +10 -2
- data/rbi/imagekitio/models/files/version_list_params.rbi +11 -5
- data/rbi/imagekitio/models/files/version_restore_params.rbi +10 -2
- data/rbi/imagekitio/models/folders/job_get_params.rbi +11 -5
- data/rbi/imagekitio/models/overlay_position.rbi +165 -9
- data/rbi/imagekitio/models/saved_extension_delete_params.rbi +13 -5
- data/rbi/imagekitio/models/saved_extension_get_params.rbi +13 -5
- data/rbi/imagekitio/models/saved_extension_update_params.rbi +6 -0
- data/rbi/imagekitio/models/selected_fields_schema.rbi +364 -0
- data/rbi/imagekitio/models/unsafe_unwrap_webhook_event.rbi +6 -1
- data/rbi/imagekitio/models/unwrap_webhook_event.rbi +6 -1
- data/rbi/imagekitio/models/upload_pre_transform_success_event.rbi +11 -533
- data/rbi/imagekitio/models/version_info.rbi +40 -0
- data/rbi/imagekitio/models.rbi +34 -0
- data/rbi/imagekitio/resources/accounts/origins.rbi +22 -2
- data/rbi/imagekitio/resources/beta/v2/files.rbi +5 -4
- data/rbi/imagekitio/resources/files.rbi +10 -5
- data/rbi/imagekitio/resources/webhooks.rbi +22 -4
- data/sig/imagekitio/client.rbs +3 -0
- data/sig/imagekitio/internal/util.rbs +14 -0
- data/sig/imagekitio/models/accounts/origin_create_params.rbs +3 -16
- data/sig/imagekitio/models/accounts/origin_delete_params.rbs +11 -3
- data/sig/imagekitio/models/accounts/origin_get_params.rbs +11 -3
- data/sig/imagekitio/models/accounts/origin_update_params.rbs +4 -9
- data/sig/imagekitio/models/accounts/url_endpoint_delete_params.rbs +11 -3
- data/sig/imagekitio/models/accounts/url_endpoint_get_params.rbs +11 -3
- data/sig/imagekitio/models/accounts/url_endpoint_update_params.rbs +13 -3
- data/sig/imagekitio/models/ai_tag.rbs +27 -0
- data/sig/imagekitio/models/beta/v2/file_upload_response.rbs +30 -223
- data/sig/imagekitio/models/cache/invalidation_get_params.rbs +11 -3
- data/sig/imagekitio/models/custom_metadata.rbs +7 -0
- data/sig/imagekitio/models/custom_metadata_field_delete_params.rbs +11 -3
- data/sig/imagekitio/models/custom_metadata_field_update_params.rbs +5 -0
- data/sig/imagekitio/models/embedded_metadata.rbs +7 -0
- data/sig/imagekitio/models/file.rbs +29 -224
- data/sig/imagekitio/models/file_create_event.rbs +32 -0
- data/sig/imagekitio/models/file_delete_event.rbs +48 -0
- data/sig/imagekitio/models/file_delete_params.rbs +11 -3
- data/sig/imagekitio/models/file_get_params.rbs +12 -3
- data/sig/imagekitio/models/file_update_event.rbs +32 -0
- data/sig/imagekitio/models/file_update_params.rbs +4 -9
- data/sig/imagekitio/models/file_upload_response.rbs +29 -224
- data/sig/imagekitio/models/file_version_create_event.rbs +36 -0
- data/sig/imagekitio/models/file_version_delete_event.rbs +50 -0
- data/sig/imagekitio/models/files/metadata_get_params.rbs +11 -3
- data/sig/imagekitio/models/files/version_delete_params.rbs +6 -1
- data/sig/imagekitio/models/files/version_get_params.rbs +6 -1
- data/sig/imagekitio/models/files/version_list_params.rbs +11 -3
- data/sig/imagekitio/models/files/version_restore_params.rbs +6 -1
- data/sig/imagekitio/models/folders/job_get_params.rbs +11 -3
- data/sig/imagekitio/models/overlay_position.rbs +73 -3
- data/sig/imagekitio/models/saved_extension_delete_params.rbs +11 -3
- data/sig/imagekitio/models/saved_extension_get_params.rbs +11 -3
- data/sig/imagekitio/models/saved_extension_update_params.rbs +5 -0
- data/sig/imagekitio/models/selected_fields_schema.rbs +165 -0
- data/sig/imagekitio/models/unsafe_unwrap_webhook_event.rbs +5 -0
- data/sig/imagekitio/models/unwrap_webhook_event.rbs +5 -0
- data/sig/imagekitio/models/upload_pre_transform_success_event.rbs +29 -224
- data/sig/imagekitio/models/version_info.rbs +19 -0
- data/sig/imagekitio/models.rbs +22 -0
- data/sig/imagekitio/resources/accounts/origins.rbs +2 -2
- data/sig/imagekitio/resources/files.rbs +1 -1
- data/sig/imagekitio/resources/webhooks.rbs +15 -3
- metadata +46 -2
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Imagekitio
|
|
4
|
+
module Models
|
|
5
|
+
class FileVersionDeleteEvent < Imagekitio::Models::BaseWebhookEvent
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
Imagekitio::FileVersionDeleteEvent,
|
|
10
|
+
Imagekitio::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# Timestamp of when the event occurred in ISO8601 format.
|
|
15
|
+
sig { returns(Time) }
|
|
16
|
+
attr_accessor :created_at
|
|
17
|
+
|
|
18
|
+
sig { returns(Imagekitio::FileVersionDeleteEvent::Data) }
|
|
19
|
+
attr_reader :data
|
|
20
|
+
|
|
21
|
+
sig do
|
|
22
|
+
params(data: Imagekitio::FileVersionDeleteEvent::Data::OrHash).void
|
|
23
|
+
end
|
|
24
|
+
attr_writer :data
|
|
25
|
+
|
|
26
|
+
# Type of the webhook event.
|
|
27
|
+
sig { returns(Symbol) }
|
|
28
|
+
attr_accessor :type
|
|
29
|
+
|
|
30
|
+
# Triggered when a file version is deleted.
|
|
31
|
+
sig do
|
|
32
|
+
params(
|
|
33
|
+
created_at: Time,
|
|
34
|
+
data: Imagekitio::FileVersionDeleteEvent::Data::OrHash,
|
|
35
|
+
type: Symbol
|
|
36
|
+
).returns(T.attached_class)
|
|
37
|
+
end
|
|
38
|
+
def self.new(
|
|
39
|
+
# Timestamp of when the event occurred in ISO8601 format.
|
|
40
|
+
created_at:,
|
|
41
|
+
data:,
|
|
42
|
+
# Type of the webhook event.
|
|
43
|
+
type: :"file-version.deleted"
|
|
44
|
+
)
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
sig do
|
|
48
|
+
override.returns(
|
|
49
|
+
{
|
|
50
|
+
created_at: Time,
|
|
51
|
+
data: Imagekitio::FileVersionDeleteEvent::Data,
|
|
52
|
+
type: Symbol
|
|
53
|
+
}
|
|
54
|
+
)
|
|
55
|
+
end
|
|
56
|
+
def to_hash
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
class Data < Imagekitio::Internal::Type::BaseModel
|
|
60
|
+
OrHash =
|
|
61
|
+
T.type_alias do
|
|
62
|
+
T.any(
|
|
63
|
+
Imagekitio::FileVersionDeleteEvent::Data,
|
|
64
|
+
Imagekitio::Internal::AnyHash
|
|
65
|
+
)
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# The unique `fileId` of the deleted file.
|
|
69
|
+
sig { returns(String) }
|
|
70
|
+
attr_accessor :file_id
|
|
71
|
+
|
|
72
|
+
# The unique `versionId` of the deleted file version.
|
|
73
|
+
sig { returns(String) }
|
|
74
|
+
attr_accessor :version_id
|
|
75
|
+
|
|
76
|
+
sig do
|
|
77
|
+
params(file_id: String, version_id: String).returns(T.attached_class)
|
|
78
|
+
end
|
|
79
|
+
def self.new(
|
|
80
|
+
# The unique `fileId` of the deleted file.
|
|
81
|
+
file_id:,
|
|
82
|
+
# The unique `versionId` of the deleted file version.
|
|
83
|
+
version_id:
|
|
84
|
+
)
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
sig { override.returns({ file_id: String, version_id: String }) }
|
|
88
|
+
def to_hash
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
end
|
|
@@ -15,16 +15,22 @@ module Imagekitio
|
|
|
15
15
|
)
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :file_id
|
|
20
|
+
|
|
18
21
|
sig do
|
|
19
|
-
params(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
params(
|
|
23
|
+
file_id: String,
|
|
24
|
+
request_options: Imagekitio::RequestOptions::OrHash
|
|
25
|
+
).returns(T.attached_class)
|
|
22
26
|
end
|
|
23
|
-
def self.new(request_options: {})
|
|
27
|
+
def self.new(file_id:, request_options: {})
|
|
24
28
|
end
|
|
25
29
|
|
|
26
30
|
sig do
|
|
27
|
-
override.returns(
|
|
31
|
+
override.returns(
|
|
32
|
+
{ file_id: String, request_options: Imagekitio::RequestOptions }
|
|
33
|
+
)
|
|
28
34
|
end
|
|
29
35
|
def to_hash
|
|
30
36
|
end
|
|
@@ -18,18 +18,26 @@ module Imagekitio
|
|
|
18
18
|
sig { returns(String) }
|
|
19
19
|
attr_accessor :file_id
|
|
20
20
|
|
|
21
|
+
sig { returns(String) }
|
|
22
|
+
attr_accessor :version_id
|
|
23
|
+
|
|
21
24
|
sig do
|
|
22
25
|
params(
|
|
23
26
|
file_id: String,
|
|
27
|
+
version_id: String,
|
|
24
28
|
request_options: Imagekitio::RequestOptions::OrHash
|
|
25
29
|
).returns(T.attached_class)
|
|
26
30
|
end
|
|
27
|
-
def self.new(file_id:, request_options: {})
|
|
31
|
+
def self.new(file_id:, version_id:, request_options: {})
|
|
28
32
|
end
|
|
29
33
|
|
|
30
34
|
sig do
|
|
31
35
|
override.returns(
|
|
32
|
-
{
|
|
36
|
+
{
|
|
37
|
+
file_id: String,
|
|
38
|
+
version_id: String,
|
|
39
|
+
request_options: Imagekitio::RequestOptions
|
|
40
|
+
}
|
|
33
41
|
)
|
|
34
42
|
end
|
|
35
43
|
def to_hash
|
|
@@ -18,18 +18,26 @@ module Imagekitio
|
|
|
18
18
|
sig { returns(String) }
|
|
19
19
|
attr_accessor :file_id
|
|
20
20
|
|
|
21
|
+
sig { returns(String) }
|
|
22
|
+
attr_accessor :version_id
|
|
23
|
+
|
|
21
24
|
sig do
|
|
22
25
|
params(
|
|
23
26
|
file_id: String,
|
|
27
|
+
version_id: String,
|
|
24
28
|
request_options: Imagekitio::RequestOptions::OrHash
|
|
25
29
|
).returns(T.attached_class)
|
|
26
30
|
end
|
|
27
|
-
def self.new(file_id:, request_options: {})
|
|
31
|
+
def self.new(file_id:, version_id:, request_options: {})
|
|
28
32
|
end
|
|
29
33
|
|
|
30
34
|
sig do
|
|
31
35
|
override.returns(
|
|
32
|
-
{
|
|
36
|
+
{
|
|
37
|
+
file_id: String,
|
|
38
|
+
version_id: String,
|
|
39
|
+
request_options: Imagekitio::RequestOptions
|
|
40
|
+
}
|
|
33
41
|
)
|
|
34
42
|
end
|
|
35
43
|
def to_hash
|
|
@@ -15,16 +15,22 @@ module Imagekitio
|
|
|
15
15
|
)
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :file_id
|
|
20
|
+
|
|
18
21
|
sig do
|
|
19
|
-
params(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
params(
|
|
23
|
+
file_id: String,
|
|
24
|
+
request_options: Imagekitio::RequestOptions::OrHash
|
|
25
|
+
).returns(T.attached_class)
|
|
22
26
|
end
|
|
23
|
-
def self.new(request_options: {})
|
|
27
|
+
def self.new(file_id:, request_options: {})
|
|
24
28
|
end
|
|
25
29
|
|
|
26
30
|
sig do
|
|
27
|
-
override.returns(
|
|
31
|
+
override.returns(
|
|
32
|
+
{ file_id: String, request_options: Imagekitio::RequestOptions }
|
|
33
|
+
)
|
|
28
34
|
end
|
|
29
35
|
def to_hash
|
|
30
36
|
end
|
|
@@ -18,18 +18,26 @@ module Imagekitio
|
|
|
18
18
|
sig { returns(String) }
|
|
19
19
|
attr_accessor :file_id
|
|
20
20
|
|
|
21
|
+
sig { returns(String) }
|
|
22
|
+
attr_accessor :version_id
|
|
23
|
+
|
|
21
24
|
sig do
|
|
22
25
|
params(
|
|
23
26
|
file_id: String,
|
|
27
|
+
version_id: String,
|
|
24
28
|
request_options: Imagekitio::RequestOptions::OrHash
|
|
25
29
|
).returns(T.attached_class)
|
|
26
30
|
end
|
|
27
|
-
def self.new(file_id:, request_options: {})
|
|
31
|
+
def self.new(file_id:, version_id:, request_options: {})
|
|
28
32
|
end
|
|
29
33
|
|
|
30
34
|
sig do
|
|
31
35
|
override.returns(
|
|
32
|
-
{
|
|
36
|
+
{
|
|
37
|
+
file_id: String,
|
|
38
|
+
version_id: String,
|
|
39
|
+
request_options: Imagekitio::RequestOptions
|
|
40
|
+
}
|
|
33
41
|
)
|
|
34
42
|
end
|
|
35
43
|
def to_hash
|
|
@@ -15,16 +15,22 @@ module Imagekitio
|
|
|
15
15
|
)
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :job_id
|
|
20
|
+
|
|
18
21
|
sig do
|
|
19
|
-
params(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
params(
|
|
23
|
+
job_id: String,
|
|
24
|
+
request_options: Imagekitio::RequestOptions::OrHash
|
|
25
|
+
).returns(T.attached_class)
|
|
22
26
|
end
|
|
23
|
-
def self.new(request_options: {})
|
|
27
|
+
def self.new(job_id:, request_options: {})
|
|
24
28
|
end
|
|
25
29
|
|
|
26
30
|
sig do
|
|
27
|
-
override.returns(
|
|
31
|
+
override.returns(
|
|
32
|
+
{ job_id: String, request_options: Imagekitio::RequestOptions }
|
|
33
|
+
)
|
|
28
34
|
end
|
|
29
35
|
def to_hash
|
|
30
36
|
end
|
|
@@ -8,8 +8,24 @@ module Imagekitio
|
|
|
8
8
|
T.any(Imagekitio::OverlayPosition, Imagekitio::Internal::AnyHash)
|
|
9
9
|
end
|
|
10
10
|
|
|
11
|
-
#
|
|
12
|
-
# Maps to `
|
|
11
|
+
# Sets the anchor point on the base asset from which the overlay offset is
|
|
12
|
+
# calculated. The default value is `top_left`. Maps to `lap` in the URL. Can only
|
|
13
|
+
# be used with one or more of `x`, `y`, `xCenter`, or `yCenter`.
|
|
14
|
+
sig do
|
|
15
|
+
returns(T.nilable(Imagekitio::OverlayPosition::AnchorPoint::OrSymbol))
|
|
16
|
+
end
|
|
17
|
+
attr_reader :anchor_point
|
|
18
|
+
|
|
19
|
+
sig do
|
|
20
|
+
params(
|
|
21
|
+
anchor_point: Imagekitio::OverlayPosition::AnchorPoint::OrSymbol
|
|
22
|
+
).void
|
|
23
|
+
end
|
|
24
|
+
attr_writer :anchor_point
|
|
25
|
+
|
|
26
|
+
# Specifies the position of the overlay relative to the parent image or video. If
|
|
27
|
+
# one or more of `x`, `y`, `xCenter`, or `yCenter` parameters are specified, this
|
|
28
|
+
# parameter is ignored. Maps to `lfo` in the URL.
|
|
13
29
|
sig { returns(T.nilable(Imagekitio::OverlayPosition::Focus::OrSymbol)) }
|
|
14
30
|
attr_reader :focus
|
|
15
31
|
|
|
@@ -27,6 +43,19 @@ module Imagekitio
|
|
|
27
43
|
sig { params(x: Imagekitio::OverlayPosition::X::Variants).void }
|
|
28
44
|
attr_writer :x
|
|
29
45
|
|
|
46
|
+
# Specifies the x-coordinate on the base asset where the overlay's center will be
|
|
47
|
+
# positioned. It also accepts arithmetic expressions such as `bw_mul_0.4` or
|
|
48
|
+
# `bw_sub_cw`. Maps to `lxc` in the URL. Cannot be used together with `x`, but can
|
|
49
|
+
# be used with `y`. Learn about
|
|
50
|
+
# [Arithmetic expressions](https://imagekit.io/docs/arithmetic-expressions-in-transformations).
|
|
51
|
+
sig { returns(T.nilable(Imagekitio::OverlayPosition::XCenter::Variants)) }
|
|
52
|
+
attr_reader :x_center
|
|
53
|
+
|
|
54
|
+
sig do
|
|
55
|
+
params(x_center: Imagekitio::OverlayPosition::XCenter::Variants).void
|
|
56
|
+
end
|
|
57
|
+
attr_writer :x_center
|
|
58
|
+
|
|
30
59
|
# Specifies the y-coordinate of the top-left corner of the base asset where the
|
|
31
60
|
# overlay's top-left corner will be positioned. It also accepts arithmetic
|
|
32
61
|
# expressions such as `bh_mul_0.4` or `bh_sub_ch`. Maps to `ly` in the URL. Learn
|
|
@@ -38,16 +67,37 @@ module Imagekitio
|
|
|
38
67
|
sig { params(y_: Imagekitio::OverlayPosition::Y::Variants).void }
|
|
39
68
|
attr_writer :y_
|
|
40
69
|
|
|
70
|
+
# Specifies the y-coordinate on the base asset where the overlay's center will be
|
|
71
|
+
# positioned. It also accepts arithmetic expressions such as `bh_mul_0.4` or
|
|
72
|
+
# `bh_sub_ch`. Maps to `lyc` in the URL. Cannot be used together with `y`, but can
|
|
73
|
+
# be used with `x`. Learn about
|
|
74
|
+
# [Arithmetic expressions](https://imagekit.io/docs/arithmetic-expressions-in-transformations).
|
|
75
|
+
sig { returns(T.nilable(Imagekitio::OverlayPosition::YCenter::Variants)) }
|
|
76
|
+
attr_reader :y_center
|
|
77
|
+
|
|
78
|
+
sig do
|
|
79
|
+
params(y_center: Imagekitio::OverlayPosition::YCenter::Variants).void
|
|
80
|
+
end
|
|
81
|
+
attr_writer :y_center
|
|
82
|
+
|
|
41
83
|
sig do
|
|
42
84
|
params(
|
|
85
|
+
anchor_point: Imagekitio::OverlayPosition::AnchorPoint::OrSymbol,
|
|
43
86
|
focus: Imagekitio::OverlayPosition::Focus::OrSymbol,
|
|
44
87
|
x: Imagekitio::OverlayPosition::X::Variants,
|
|
45
|
-
|
|
88
|
+
x_center: Imagekitio::OverlayPosition::XCenter::Variants,
|
|
89
|
+
y_: Imagekitio::OverlayPosition::Y::Variants,
|
|
90
|
+
y_center: Imagekitio::OverlayPosition::YCenter::Variants
|
|
46
91
|
).returns(T.attached_class)
|
|
47
92
|
end
|
|
48
93
|
def self.new(
|
|
49
|
-
#
|
|
50
|
-
# Maps to `
|
|
94
|
+
# Sets the anchor point on the base asset from which the overlay offset is
|
|
95
|
+
# calculated. The default value is `top_left`. Maps to `lap` in the URL. Can only
|
|
96
|
+
# be used with one or more of `x`, `y`, `xCenter`, or `yCenter`.
|
|
97
|
+
anchor_point: nil,
|
|
98
|
+
# Specifies the position of the overlay relative to the parent image or video. If
|
|
99
|
+
# one or more of `x`, `y`, `xCenter`, or `yCenter` parameters are specified, this
|
|
100
|
+
# parameter is ignored. Maps to `lfo` in the URL.
|
|
51
101
|
focus: nil,
|
|
52
102
|
# Specifies the x-coordinate of the top-left corner of the base asset where the
|
|
53
103
|
# overlay's top-left corner will be positioned. It also accepts arithmetic
|
|
@@ -55,29 +105,97 @@ module Imagekitio
|
|
|
55
105
|
# about
|
|
56
106
|
# [Arithmetic expressions](https://imagekit.io/docs/arithmetic-expressions-in-transformations).
|
|
57
107
|
x: nil,
|
|
108
|
+
# Specifies the x-coordinate on the base asset where the overlay's center will be
|
|
109
|
+
# positioned. It also accepts arithmetic expressions such as `bw_mul_0.4` or
|
|
110
|
+
# `bw_sub_cw`. Maps to `lxc` in the URL. Cannot be used together with `x`, but can
|
|
111
|
+
# be used with `y`. Learn about
|
|
112
|
+
# [Arithmetic expressions](https://imagekit.io/docs/arithmetic-expressions-in-transformations).
|
|
113
|
+
x_center: nil,
|
|
58
114
|
# Specifies the y-coordinate of the top-left corner of the base asset where the
|
|
59
115
|
# overlay's top-left corner will be positioned. It also accepts arithmetic
|
|
60
116
|
# expressions such as `bh_mul_0.4` or `bh_sub_ch`. Maps to `ly` in the URL. Learn
|
|
61
117
|
# about
|
|
62
118
|
# [Arithmetic expressions](https://imagekit.io/docs/arithmetic-expressions-in-transformations).
|
|
63
|
-
y_: nil
|
|
119
|
+
y_: nil,
|
|
120
|
+
# Specifies the y-coordinate on the base asset where the overlay's center will be
|
|
121
|
+
# positioned. It also accepts arithmetic expressions such as `bh_mul_0.4` or
|
|
122
|
+
# `bh_sub_ch`. Maps to `lyc` in the URL. Cannot be used together with `y`, but can
|
|
123
|
+
# be used with `x`. Learn about
|
|
124
|
+
# [Arithmetic expressions](https://imagekit.io/docs/arithmetic-expressions-in-transformations).
|
|
125
|
+
y_center: nil
|
|
64
126
|
)
|
|
65
127
|
end
|
|
66
128
|
|
|
67
129
|
sig do
|
|
68
130
|
override.returns(
|
|
69
131
|
{
|
|
132
|
+
anchor_point: Imagekitio::OverlayPosition::AnchorPoint::OrSymbol,
|
|
70
133
|
focus: Imagekitio::OverlayPosition::Focus::OrSymbol,
|
|
71
134
|
x: Imagekitio::OverlayPosition::X::Variants,
|
|
72
|
-
|
|
135
|
+
x_center: Imagekitio::OverlayPosition::XCenter::Variants,
|
|
136
|
+
y_: Imagekitio::OverlayPosition::Y::Variants,
|
|
137
|
+
y_center: Imagekitio::OverlayPosition::YCenter::Variants
|
|
73
138
|
}
|
|
74
139
|
)
|
|
75
140
|
end
|
|
76
141
|
def to_hash
|
|
77
142
|
end
|
|
78
143
|
|
|
79
|
-
#
|
|
80
|
-
# Maps to `
|
|
144
|
+
# Sets the anchor point on the base asset from which the overlay offset is
|
|
145
|
+
# calculated. The default value is `top_left`. Maps to `lap` in the URL. Can only
|
|
146
|
+
# be used with one or more of `x`, `y`, `xCenter`, or `yCenter`.
|
|
147
|
+
module AnchorPoint
|
|
148
|
+
extend Imagekitio::Internal::Type::Enum
|
|
149
|
+
|
|
150
|
+
TaggedSymbol =
|
|
151
|
+
T.type_alias do
|
|
152
|
+
T.all(Symbol, Imagekitio::OverlayPosition::AnchorPoint)
|
|
153
|
+
end
|
|
154
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
155
|
+
|
|
156
|
+
TOP =
|
|
157
|
+
T.let(:top, Imagekitio::OverlayPosition::AnchorPoint::TaggedSymbol)
|
|
158
|
+
LEFT =
|
|
159
|
+
T.let(:left, Imagekitio::OverlayPosition::AnchorPoint::TaggedSymbol)
|
|
160
|
+
RIGHT =
|
|
161
|
+
T.let(:right, Imagekitio::OverlayPosition::AnchorPoint::TaggedSymbol)
|
|
162
|
+
BOTTOM =
|
|
163
|
+
T.let(:bottom, Imagekitio::OverlayPosition::AnchorPoint::TaggedSymbol)
|
|
164
|
+
TOP_LEFT =
|
|
165
|
+
T.let(
|
|
166
|
+
:top_left,
|
|
167
|
+
Imagekitio::OverlayPosition::AnchorPoint::TaggedSymbol
|
|
168
|
+
)
|
|
169
|
+
TOP_RIGHT =
|
|
170
|
+
T.let(
|
|
171
|
+
:top_right,
|
|
172
|
+
Imagekitio::OverlayPosition::AnchorPoint::TaggedSymbol
|
|
173
|
+
)
|
|
174
|
+
BOTTOM_LEFT =
|
|
175
|
+
T.let(
|
|
176
|
+
:bottom_left,
|
|
177
|
+
Imagekitio::OverlayPosition::AnchorPoint::TaggedSymbol
|
|
178
|
+
)
|
|
179
|
+
BOTTOM_RIGHT =
|
|
180
|
+
T.let(
|
|
181
|
+
:bottom_right,
|
|
182
|
+
Imagekitio::OverlayPosition::AnchorPoint::TaggedSymbol
|
|
183
|
+
)
|
|
184
|
+
CENTER =
|
|
185
|
+
T.let(:center, Imagekitio::OverlayPosition::AnchorPoint::TaggedSymbol)
|
|
186
|
+
|
|
187
|
+
sig do
|
|
188
|
+
override.returns(
|
|
189
|
+
T::Array[Imagekitio::OverlayPosition::AnchorPoint::TaggedSymbol]
|
|
190
|
+
)
|
|
191
|
+
end
|
|
192
|
+
def self.values
|
|
193
|
+
end
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# Specifies the position of the overlay relative to the parent image or video. If
|
|
197
|
+
# one or more of `x`, `y`, `xCenter`, or `yCenter` parameters are specified, this
|
|
198
|
+
# parameter is ignored. Maps to `lfo` in the URL.
|
|
81
199
|
module Focus
|
|
82
200
|
extend Imagekitio::Internal::Type::Enum
|
|
83
201
|
|
|
@@ -127,6 +245,25 @@ module Imagekitio
|
|
|
127
245
|
end
|
|
128
246
|
end
|
|
129
247
|
|
|
248
|
+
# Specifies the x-coordinate on the base asset where the overlay's center will be
|
|
249
|
+
# positioned. It also accepts arithmetic expressions such as `bw_mul_0.4` or
|
|
250
|
+
# `bw_sub_cw`. Maps to `lxc` in the URL. Cannot be used together with `x`, but can
|
|
251
|
+
# be used with `y`. Learn about
|
|
252
|
+
# [Arithmetic expressions](https://imagekit.io/docs/arithmetic-expressions-in-transformations).
|
|
253
|
+
module XCenter
|
|
254
|
+
extend Imagekitio::Internal::Type::Union
|
|
255
|
+
|
|
256
|
+
Variants = T.type_alias { T.any(Float, String) }
|
|
257
|
+
|
|
258
|
+
sig do
|
|
259
|
+
override.returns(
|
|
260
|
+
T::Array[Imagekitio::OverlayPosition::XCenter::Variants]
|
|
261
|
+
)
|
|
262
|
+
end
|
|
263
|
+
def self.variants
|
|
264
|
+
end
|
|
265
|
+
end
|
|
266
|
+
|
|
130
267
|
# Specifies the y-coordinate of the top-left corner of the base asset where the
|
|
131
268
|
# overlay's top-left corner will be positioned. It also accepts arithmetic
|
|
132
269
|
# expressions such as `bh_mul_0.4` or `bh_sub_ch`. Maps to `ly` in the URL. Learn
|
|
@@ -143,6 +280,25 @@ module Imagekitio
|
|
|
143
280
|
def self.variants
|
|
144
281
|
end
|
|
145
282
|
end
|
|
283
|
+
|
|
284
|
+
# Specifies the y-coordinate on the base asset where the overlay's center will be
|
|
285
|
+
# positioned. It also accepts arithmetic expressions such as `bh_mul_0.4` or
|
|
286
|
+
# `bh_sub_ch`. Maps to `lyc` in the URL. Cannot be used together with `y`, but can
|
|
287
|
+
# be used with `x`. Learn about
|
|
288
|
+
# [Arithmetic expressions](https://imagekit.io/docs/arithmetic-expressions-in-transformations).
|
|
289
|
+
module YCenter
|
|
290
|
+
extend Imagekitio::Internal::Type::Union
|
|
291
|
+
|
|
292
|
+
Variants = T.type_alias { T.any(Float, String) }
|
|
293
|
+
|
|
294
|
+
sig do
|
|
295
|
+
override.returns(
|
|
296
|
+
T::Array[Imagekitio::OverlayPosition::YCenter::Variants]
|
|
297
|
+
)
|
|
298
|
+
end
|
|
299
|
+
def self.variants
|
|
300
|
+
end
|
|
301
|
+
end
|
|
146
302
|
end
|
|
147
303
|
end
|
|
148
304
|
end
|
|
@@ -14,15 +14,23 @@ module Imagekitio
|
|
|
14
14
|
)
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
+
sig { returns(String) }
|
|
18
|
+
attr_accessor :id
|
|
19
|
+
|
|
17
20
|
sig do
|
|
18
|
-
params(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
params(
|
|
22
|
+
id: String,
|
|
23
|
+
request_options: Imagekitio::RequestOptions::OrHash
|
|
24
|
+
).returns(T.attached_class)
|
|
21
25
|
end
|
|
22
|
-
def self.new(request_options: {})
|
|
26
|
+
def self.new(id:, request_options: {})
|
|
23
27
|
end
|
|
24
28
|
|
|
25
|
-
sig
|
|
29
|
+
sig do
|
|
30
|
+
override.returns(
|
|
31
|
+
{ id: String, request_options: Imagekitio::RequestOptions }
|
|
32
|
+
)
|
|
33
|
+
end
|
|
26
34
|
def to_hash
|
|
27
35
|
end
|
|
28
36
|
end
|
|
@@ -14,15 +14,23 @@ module Imagekitio
|
|
|
14
14
|
)
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
+
sig { returns(String) }
|
|
18
|
+
attr_accessor :id
|
|
19
|
+
|
|
17
20
|
sig do
|
|
18
|
-
params(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
params(
|
|
22
|
+
id: String,
|
|
23
|
+
request_options: Imagekitio::RequestOptions::OrHash
|
|
24
|
+
).returns(T.attached_class)
|
|
21
25
|
end
|
|
22
|
-
def self.new(request_options: {})
|
|
26
|
+
def self.new(id:, request_options: {})
|
|
23
27
|
end
|
|
24
28
|
|
|
25
|
-
sig
|
|
29
|
+
sig do
|
|
30
|
+
override.returns(
|
|
31
|
+
{ id: String, request_options: Imagekitio::RequestOptions }
|
|
32
|
+
)
|
|
33
|
+
end
|
|
26
34
|
def to_hash
|
|
27
35
|
end
|
|
28
36
|
end
|
|
@@ -14,6 +14,9 @@ module Imagekitio
|
|
|
14
14
|
)
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
+
sig { returns(String) }
|
|
18
|
+
attr_accessor :id
|
|
19
|
+
|
|
17
20
|
# Configuration object for an extension (base extensions only, not saved extension
|
|
18
21
|
# references).
|
|
19
22
|
sig do
|
|
@@ -59,6 +62,7 @@ module Imagekitio
|
|
|
59
62
|
|
|
60
63
|
sig do
|
|
61
64
|
params(
|
|
65
|
+
id: String,
|
|
62
66
|
config:
|
|
63
67
|
T.any(
|
|
64
68
|
Imagekitio::ExtensionConfig::RemoveBg::OrHash,
|
|
@@ -72,6 +76,7 @@ module Imagekitio
|
|
|
72
76
|
).returns(T.attached_class)
|
|
73
77
|
end
|
|
74
78
|
def self.new(
|
|
79
|
+
id:,
|
|
75
80
|
# Configuration object for an extension (base extensions only, not saved extension
|
|
76
81
|
# references).
|
|
77
82
|
config: nil,
|
|
@@ -86,6 +91,7 @@ module Imagekitio
|
|
|
86
91
|
sig do
|
|
87
92
|
override.returns(
|
|
88
93
|
{
|
|
94
|
+
id: String,
|
|
89
95
|
config:
|
|
90
96
|
T.any(
|
|
91
97
|
Imagekitio::ExtensionConfig::RemoveBg,
|