imagekitio 4.1.2 → 4.3.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 +51 -0
- data/README.md +1 -1
- 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/util.rb +51 -7
- 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/cache/invalidation_get_params.rb +7 -1
- 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/extension_config.rb +10 -5
- data/lib/imagekitio/models/extensions.rb +10 -5
- data/lib/imagekitio/models/file.rb +44 -1
- 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_params.rb +5 -7
- 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/folder.rb +12 -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/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 +11 -1
- data/lib/imagekitio/version.rb +1 -1
- data/lib/imagekitio.rb +1 -0
- 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/cache/invalidation_get_params.rbi +11 -5
- 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/extension_config.rbi +16 -6
- data/rbi/imagekitio/models/extensions.rbi +16 -6
- data/rbi/imagekitio/models/file.rbi +57 -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_params.rbi +5 -28
- 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/folder.rbi +13 -0
- 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/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 +10 -2
- 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/cache/invalidation_get_params.rbs +11 -3
- 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/file.rbs +35 -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_params.rbs +4 -9
- 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/folder.rbs +7 -0
- 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/resources/accounts/origins.rbs +2 -2
- data/sig/imagekitio/resources/files.rbs +1 -1
- data/sig/imagekitio/resources/webhooks.rbs +3 -1
- metadata +16 -2
|
@@ -13,8 +13,18 @@ module Imagekitio
|
|
|
13
13
|
|
|
14
14
|
# @param payload [String] The raw webhook payload as a string
|
|
15
15
|
#
|
|
16
|
+
# @param headers [Hash{String=>String}] The raw HTTP headers that came with the payload
|
|
17
|
+
#
|
|
18
|
+
# @param key [String, nil] The webhook signing key
|
|
19
|
+
#
|
|
16
20
|
# @return [Imagekitio::Models::VideoTransformationAcceptedEvent, Imagekitio::Models::VideoTransformationReadyEvent, Imagekitio::Models::VideoTransformationErrorEvent, Imagekitio::Models::UploadPreTransformSuccessEvent, Imagekitio::Models::UploadPreTransformErrorEvent, Imagekitio::Models::UploadPostTransformSuccessEvent, Imagekitio::Models::UploadPostTransformErrorEvent]
|
|
17
|
-
def unwrap(payload)
|
|
21
|
+
def unwrap(payload, headers:, key: @client.webhook_secret)
|
|
22
|
+
if key.nil?
|
|
23
|
+
raise ArgumentError.new("Cannot verify a webhook without a key on either the client's webhook_secret or passed in as an argument")
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
::StandardWebhooks::Webhook.new(key).verify(payload, headers)
|
|
27
|
+
|
|
18
28
|
parsed = JSON.parse(payload, symbolize_names: true)
|
|
19
29
|
Imagekitio::Internal::Type::Converter.coerce(Imagekitio::Models::UnwrapWebhookEvent, parsed)
|
|
20
30
|
end
|
data/lib/imagekitio/version.rb
CHANGED
data/lib/imagekitio.rb
CHANGED
data/rbi/imagekitio/client.rbi
CHANGED
|
@@ -20,6 +20,13 @@ module Imagekitio
|
|
|
20
20
|
sig { returns(T.nilable(String)) }
|
|
21
21
|
attr_reader :password
|
|
22
22
|
|
|
23
|
+
# Your ImageKit webhook secret for verifying webhook signatures (starts with
|
|
24
|
+
# `whsec_`). You can find this in the
|
|
25
|
+
# [ImageKit dashboard](https://imagekit.io/dashboard/developer/webhooks). Only
|
|
26
|
+
# required if you're using webhooks.
|
|
27
|
+
sig { returns(T.nilable(String)) }
|
|
28
|
+
attr_reader :webhook_secret
|
|
29
|
+
|
|
23
30
|
sig { returns(Imagekitio::Resources::CustomMetadataFields) }
|
|
24
31
|
attr_reader :custom_metadata_fields
|
|
25
32
|
|
|
@@ -65,6 +72,7 @@ module Imagekitio
|
|
|
65
72
|
params(
|
|
66
73
|
private_key: T.nilable(String),
|
|
67
74
|
password: T.nilable(String),
|
|
75
|
+
webhook_secret: T.nilable(String),
|
|
68
76
|
base_url: T.nilable(String),
|
|
69
77
|
max_retries: Integer,
|
|
70
78
|
timeout: Float,
|
|
@@ -81,6 +89,11 @@ module Imagekitio
|
|
|
81
89
|
# dummy value. You can ignore this field. Defaults to
|
|
82
90
|
# `ENV["OPTIONAL_IMAGEKIT_IGNORES_THIS"]`
|
|
83
91
|
password: ENV.fetch("OPTIONAL_IMAGEKIT_IGNORES_THIS", "do_not_set"),
|
|
92
|
+
# Your ImageKit webhook secret for verifying webhook signatures (starts with
|
|
93
|
+
# `whsec_`). You can find this in the
|
|
94
|
+
# [ImageKit dashboard](https://imagekit.io/dashboard/developer/webhooks). Only
|
|
95
|
+
# required if you're using webhooks. Defaults to `ENV["IMAGEKIT_WEBHOOK_SECRET"]`
|
|
96
|
+
webhook_secret: ENV["IMAGEKIT_WEBHOOK_SECRET"],
|
|
84
97
|
# Override the default base URL for the API, e.g.,
|
|
85
98
|
# `"https://api.example.com/v2/"`. Defaults to `ENV["IMAGE_KIT_BASE_URL"]`
|
|
86
99
|
base_url: ENV["IMAGE_KIT_BASE_URL"],
|
|
@@ -148,12 +148,20 @@ module Imagekitio
|
|
|
148
148
|
end
|
|
149
149
|
end
|
|
150
150
|
|
|
151
|
+
# https://www.rfc-editor.org/rfc/rfc3986.html#section-3.3
|
|
152
|
+
RFC_3986_NOT_PCHARS = T.let(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/, Regexp)
|
|
153
|
+
|
|
151
154
|
class << self
|
|
152
155
|
# @api private
|
|
153
156
|
sig { params(uri: URI::Generic).returns(String) }
|
|
154
157
|
def uri_origin(uri)
|
|
155
158
|
end
|
|
156
159
|
|
|
160
|
+
# @api private
|
|
161
|
+
sig { params(path: T.any(String, Integer)).returns(String) }
|
|
162
|
+
def encode_path(path)
|
|
163
|
+
end
|
|
164
|
+
|
|
157
165
|
# @api private
|
|
158
166
|
sig { params(path: T.any(String, T::Array[String])).returns(String) }
|
|
159
167
|
def interpolate_path(path)
|
|
@@ -296,11 +304,31 @@ module Imagekitio
|
|
|
296
304
|
end
|
|
297
305
|
|
|
298
306
|
JSON_CONTENT =
|
|
299
|
-
T.let(%r{^application/(?:
|
|
307
|
+
T.let(%r{^application/(?:[a-zA-Z0-9.-]+\+)?json(?!l)}, Regexp)
|
|
300
308
|
JSONL_CONTENT =
|
|
301
309
|
T.let(%r{^application/(:?x-(?:n|l)djson)|(:?(?:x-)?jsonl)}, Regexp)
|
|
302
310
|
|
|
303
311
|
class << self
|
|
312
|
+
# @api private
|
|
313
|
+
sig do
|
|
314
|
+
params(query: Imagekitio::Internal::AnyHash).returns(
|
|
315
|
+
Imagekitio::Internal::AnyHash
|
|
316
|
+
)
|
|
317
|
+
end
|
|
318
|
+
def encode_query_params(query)
|
|
319
|
+
end
|
|
320
|
+
|
|
321
|
+
# @api private
|
|
322
|
+
sig do
|
|
323
|
+
params(
|
|
324
|
+
collection: Imagekitio::Internal::AnyHash,
|
|
325
|
+
key: String,
|
|
326
|
+
element: T.anything
|
|
327
|
+
).void
|
|
328
|
+
end
|
|
329
|
+
private def write_query_param_element!(collection, key, element)
|
|
330
|
+
end
|
|
331
|
+
|
|
304
332
|
# @api private
|
|
305
333
|
sig do
|
|
306
334
|
params(
|
|
@@ -15,63 +15,16 @@ module Imagekitio
|
|
|
15
15
|
)
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
-
# Schema for origin request resources.
|
|
19
18
|
sig do
|
|
20
|
-
returns(
|
|
21
|
-
T.
|
|
22
|
-
Imagekitio::Accounts::OriginRequest::S3,
|
|
23
|
-
Imagekitio::Accounts::OriginRequest::S3Compatible,
|
|
24
|
-
Imagekitio::Accounts::OriginRequest::CloudinaryBackup,
|
|
25
|
-
Imagekitio::Accounts::OriginRequest::WebFolder,
|
|
26
|
-
Imagekitio::Accounts::OriginRequest::WebProxy,
|
|
27
|
-
Imagekitio::Accounts::OriginRequest::Gcs,
|
|
28
|
-
Imagekitio::Accounts::OriginRequest::AzureBlob,
|
|
29
|
-
Imagekitio::Accounts::OriginRequest::AkeneoPim
|
|
30
|
-
)
|
|
19
|
+
params(request_options: Imagekitio::RequestOptions::OrHash).returns(
|
|
20
|
+
T.attached_class
|
|
31
21
|
)
|
|
32
22
|
end
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
sig do
|
|
36
|
-
params(
|
|
37
|
-
origin_request:
|
|
38
|
-
T.any(
|
|
39
|
-
Imagekitio::Accounts::OriginRequest::S3::OrHash,
|
|
40
|
-
Imagekitio::Accounts::OriginRequest::S3Compatible::OrHash,
|
|
41
|
-
Imagekitio::Accounts::OriginRequest::CloudinaryBackup::OrHash,
|
|
42
|
-
Imagekitio::Accounts::OriginRequest::WebFolder::OrHash,
|
|
43
|
-
Imagekitio::Accounts::OriginRequest::WebProxy::OrHash,
|
|
44
|
-
Imagekitio::Accounts::OriginRequest::Gcs::OrHash,
|
|
45
|
-
Imagekitio::Accounts::OriginRequest::AzureBlob::OrHash,
|
|
46
|
-
Imagekitio::Accounts::OriginRequest::AkeneoPim::OrHash
|
|
47
|
-
),
|
|
48
|
-
request_options: Imagekitio::RequestOptions::OrHash
|
|
49
|
-
).returns(T.attached_class)
|
|
50
|
-
end
|
|
51
|
-
def self.new(
|
|
52
|
-
# Schema for origin request resources.
|
|
53
|
-
origin_request:,
|
|
54
|
-
request_options: {}
|
|
55
|
-
)
|
|
23
|
+
def self.new(request_options: {})
|
|
56
24
|
end
|
|
57
25
|
|
|
58
26
|
sig do
|
|
59
|
-
override.returns(
|
|
60
|
-
{
|
|
61
|
-
origin_request:
|
|
62
|
-
T.any(
|
|
63
|
-
Imagekitio::Accounts::OriginRequest::S3,
|
|
64
|
-
Imagekitio::Accounts::OriginRequest::S3Compatible,
|
|
65
|
-
Imagekitio::Accounts::OriginRequest::CloudinaryBackup,
|
|
66
|
-
Imagekitio::Accounts::OriginRequest::WebFolder,
|
|
67
|
-
Imagekitio::Accounts::OriginRequest::WebProxy,
|
|
68
|
-
Imagekitio::Accounts::OriginRequest::Gcs,
|
|
69
|
-
Imagekitio::Accounts::OriginRequest::AzureBlob,
|
|
70
|
-
Imagekitio::Accounts::OriginRequest::AkeneoPim
|
|
71
|
-
),
|
|
72
|
-
request_options: Imagekitio::RequestOptions
|
|
73
|
-
}
|
|
74
|
-
)
|
|
27
|
+
override.returns({ request_options: Imagekitio::RequestOptions })
|
|
75
28
|
end
|
|
76
29
|
def to_hash
|
|
77
30
|
end
|
|
@@ -15,16 +15,29 @@ module Imagekitio
|
|
|
15
15
|
)
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
+
# Unique identifier for the origin. This is generated by ImageKit when you create
|
|
19
|
+
# a new origin.
|
|
20
|
+
sig { returns(String) }
|
|
21
|
+
attr_accessor :id
|
|
22
|
+
|
|
18
23
|
sig do
|
|
19
|
-
params(
|
|
20
|
-
|
|
21
|
-
|
|
24
|
+
params(
|
|
25
|
+
id: String,
|
|
26
|
+
request_options: Imagekitio::RequestOptions::OrHash
|
|
27
|
+
).returns(T.attached_class)
|
|
22
28
|
end
|
|
23
|
-
def self.new(
|
|
29
|
+
def self.new(
|
|
30
|
+
# Unique identifier for the origin. This is generated by ImageKit when you create
|
|
31
|
+
# a new origin.
|
|
32
|
+
id:,
|
|
33
|
+
request_options: {}
|
|
34
|
+
)
|
|
24
35
|
end
|
|
25
36
|
|
|
26
37
|
sig do
|
|
27
|
-
override.returns(
|
|
38
|
+
override.returns(
|
|
39
|
+
{ id: String, request_options: Imagekitio::RequestOptions }
|
|
40
|
+
)
|
|
28
41
|
end
|
|
29
42
|
def to_hash
|
|
30
43
|
end
|
|
@@ -15,16 +15,29 @@ module Imagekitio
|
|
|
15
15
|
)
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
+
# Unique identifier for the origin. This is generated by ImageKit when you create
|
|
19
|
+
# a new origin.
|
|
20
|
+
sig { returns(String) }
|
|
21
|
+
attr_accessor :id
|
|
22
|
+
|
|
18
23
|
sig do
|
|
19
|
-
params(
|
|
20
|
-
|
|
21
|
-
|
|
24
|
+
params(
|
|
25
|
+
id: String,
|
|
26
|
+
request_options: Imagekitio::RequestOptions::OrHash
|
|
27
|
+
).returns(T.attached_class)
|
|
22
28
|
end
|
|
23
|
-
def self.new(
|
|
29
|
+
def self.new(
|
|
30
|
+
# Unique identifier for the origin. This is generated by ImageKit when you create
|
|
31
|
+
# a new origin.
|
|
32
|
+
id:,
|
|
33
|
+
request_options: {}
|
|
34
|
+
)
|
|
24
35
|
end
|
|
25
36
|
|
|
26
37
|
sig do
|
|
27
|
-
override.returns(
|
|
38
|
+
override.returns(
|
|
39
|
+
{ id: String, request_options: Imagekitio::RequestOptions }
|
|
40
|
+
)
|
|
28
41
|
end
|
|
29
42
|
def to_hash
|
|
30
43
|
end
|
|
@@ -15,62 +15,28 @@ module Imagekitio
|
|
|
15
15
|
)
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
-
#
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
Imagekitio::Accounts::OriginRequest::S3,
|
|
23
|
-
Imagekitio::Accounts::OriginRequest::S3Compatible,
|
|
24
|
-
Imagekitio::Accounts::OriginRequest::CloudinaryBackup,
|
|
25
|
-
Imagekitio::Accounts::OriginRequest::WebFolder,
|
|
26
|
-
Imagekitio::Accounts::OriginRequest::WebProxy,
|
|
27
|
-
Imagekitio::Accounts::OriginRequest::Gcs,
|
|
28
|
-
Imagekitio::Accounts::OriginRequest::AzureBlob,
|
|
29
|
-
Imagekitio::Accounts::OriginRequest::AkeneoPim
|
|
30
|
-
)
|
|
31
|
-
)
|
|
32
|
-
end
|
|
33
|
-
attr_accessor :origin_request
|
|
18
|
+
# Unique identifier for the origin. This is generated by ImageKit when you create
|
|
19
|
+
# a new origin.
|
|
20
|
+
sig { returns(String) }
|
|
21
|
+
attr_accessor :id
|
|
34
22
|
|
|
35
23
|
sig do
|
|
36
24
|
params(
|
|
37
|
-
|
|
38
|
-
T.any(
|
|
39
|
-
Imagekitio::Accounts::OriginRequest::S3::OrHash,
|
|
40
|
-
Imagekitio::Accounts::OriginRequest::S3Compatible::OrHash,
|
|
41
|
-
Imagekitio::Accounts::OriginRequest::CloudinaryBackup::OrHash,
|
|
42
|
-
Imagekitio::Accounts::OriginRequest::WebFolder::OrHash,
|
|
43
|
-
Imagekitio::Accounts::OriginRequest::WebProxy::OrHash,
|
|
44
|
-
Imagekitio::Accounts::OriginRequest::Gcs::OrHash,
|
|
45
|
-
Imagekitio::Accounts::OriginRequest::AzureBlob::OrHash,
|
|
46
|
-
Imagekitio::Accounts::OriginRequest::AkeneoPim::OrHash
|
|
47
|
-
),
|
|
25
|
+
id: String,
|
|
48
26
|
request_options: Imagekitio::RequestOptions::OrHash
|
|
49
27
|
).returns(T.attached_class)
|
|
50
28
|
end
|
|
51
29
|
def self.new(
|
|
52
|
-
#
|
|
53
|
-
|
|
30
|
+
# Unique identifier for the origin. This is generated by ImageKit when you create
|
|
31
|
+
# a new origin.
|
|
32
|
+
id:,
|
|
54
33
|
request_options: {}
|
|
55
34
|
)
|
|
56
35
|
end
|
|
57
36
|
|
|
58
37
|
sig do
|
|
59
38
|
override.returns(
|
|
60
|
-
{
|
|
61
|
-
origin_request:
|
|
62
|
-
T.any(
|
|
63
|
-
Imagekitio::Accounts::OriginRequest::S3,
|
|
64
|
-
Imagekitio::Accounts::OriginRequest::S3Compatible,
|
|
65
|
-
Imagekitio::Accounts::OriginRequest::CloudinaryBackup,
|
|
66
|
-
Imagekitio::Accounts::OriginRequest::WebFolder,
|
|
67
|
-
Imagekitio::Accounts::OriginRequest::WebProxy,
|
|
68
|
-
Imagekitio::Accounts::OriginRequest::Gcs,
|
|
69
|
-
Imagekitio::Accounts::OriginRequest::AzureBlob,
|
|
70
|
-
Imagekitio::Accounts::OriginRequest::AkeneoPim
|
|
71
|
-
),
|
|
72
|
-
request_options: Imagekitio::RequestOptions
|
|
73
|
-
}
|
|
39
|
+
{ id: String, request_options: Imagekitio::RequestOptions }
|
|
74
40
|
)
|
|
75
41
|
end
|
|
76
42
|
def to_hash
|
|
@@ -15,16 +15,31 @@ module Imagekitio
|
|
|
15
15
|
)
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
+
# Unique identifier for the URL-endpoint. This is generated by ImageKit when you
|
|
19
|
+
# create a new URL-endpoint. For the default URL-endpoint, this is always
|
|
20
|
+
# `default`.
|
|
21
|
+
sig { returns(String) }
|
|
22
|
+
attr_accessor :id
|
|
23
|
+
|
|
18
24
|
sig do
|
|
19
|
-
params(
|
|
20
|
-
|
|
21
|
-
|
|
25
|
+
params(
|
|
26
|
+
id: String,
|
|
27
|
+
request_options: Imagekitio::RequestOptions::OrHash
|
|
28
|
+
).returns(T.attached_class)
|
|
22
29
|
end
|
|
23
|
-
def self.new(
|
|
30
|
+
def self.new(
|
|
31
|
+
# Unique identifier for the URL-endpoint. This is generated by ImageKit when you
|
|
32
|
+
# create a new URL-endpoint. For the default URL-endpoint, this is always
|
|
33
|
+
# `default`.
|
|
34
|
+
id:,
|
|
35
|
+
request_options: {}
|
|
36
|
+
)
|
|
24
37
|
end
|
|
25
38
|
|
|
26
39
|
sig do
|
|
27
|
-
override.returns(
|
|
40
|
+
override.returns(
|
|
41
|
+
{ id: String, request_options: Imagekitio::RequestOptions }
|
|
42
|
+
)
|
|
28
43
|
end
|
|
29
44
|
def to_hash
|
|
30
45
|
end
|
|
@@ -15,16 +15,31 @@ module Imagekitio
|
|
|
15
15
|
)
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
+
# Unique identifier for the URL-endpoint. This is generated by ImageKit when you
|
|
19
|
+
# create a new URL-endpoint. For the default URL-endpoint, this is always
|
|
20
|
+
# `default`.
|
|
21
|
+
sig { returns(String) }
|
|
22
|
+
attr_accessor :id
|
|
23
|
+
|
|
18
24
|
sig do
|
|
19
|
-
params(
|
|
20
|
-
|
|
21
|
-
|
|
25
|
+
params(
|
|
26
|
+
id: String,
|
|
27
|
+
request_options: Imagekitio::RequestOptions::OrHash
|
|
28
|
+
).returns(T.attached_class)
|
|
22
29
|
end
|
|
23
|
-
def self.new(
|
|
30
|
+
def self.new(
|
|
31
|
+
# Unique identifier for the URL-endpoint. This is generated by ImageKit when you
|
|
32
|
+
# create a new URL-endpoint. For the default URL-endpoint, this is always
|
|
33
|
+
# `default`.
|
|
34
|
+
id:,
|
|
35
|
+
request_options: {}
|
|
36
|
+
)
|
|
24
37
|
end
|
|
25
38
|
|
|
26
39
|
sig do
|
|
27
|
-
override.returns(
|
|
40
|
+
override.returns(
|
|
41
|
+
{ id: String, request_options: Imagekitio::RequestOptions }
|
|
42
|
+
)
|
|
28
43
|
end
|
|
29
44
|
def to_hash
|
|
30
45
|
end
|
|
@@ -15,16 +15,31 @@ module Imagekitio
|
|
|
15
15
|
)
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
+
# Unique identifier for the URL-endpoint. This is generated by ImageKit when you
|
|
19
|
+
# create a new URL-endpoint. For the default URL-endpoint, this is always
|
|
20
|
+
# `default`.
|
|
21
|
+
sig { returns(String) }
|
|
22
|
+
attr_accessor :id
|
|
23
|
+
|
|
18
24
|
sig do
|
|
19
|
-
params(
|
|
20
|
-
|
|
21
|
-
|
|
25
|
+
params(
|
|
26
|
+
id: String,
|
|
27
|
+
request_options: Imagekitio::RequestOptions::OrHash
|
|
28
|
+
).returns(T.attached_class)
|
|
22
29
|
end
|
|
23
|
-
def self.new(
|
|
30
|
+
def self.new(
|
|
31
|
+
# Unique identifier for the URL-endpoint. This is generated by ImageKit when you
|
|
32
|
+
# create a new URL-endpoint. For the default URL-endpoint, this is always
|
|
33
|
+
# `default`.
|
|
34
|
+
id:,
|
|
35
|
+
request_options: {}
|
|
36
|
+
)
|
|
24
37
|
end
|
|
25
38
|
|
|
26
39
|
sig do
|
|
27
|
-
override.returns(
|
|
40
|
+
override.returns(
|
|
41
|
+
{ id: String, request_options: Imagekitio::RequestOptions }
|
|
42
|
+
)
|
|
28
43
|
end
|
|
29
44
|
def to_hash
|
|
30
45
|
end
|
|
@@ -15,16 +15,22 @@ module Imagekitio
|
|
|
15
15
|
)
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :request_id
|
|
20
|
+
|
|
18
21
|
sig do
|
|
19
|
-
params(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
params(
|
|
23
|
+
request_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(request_id:, request_options: {})
|
|
24
28
|
end
|
|
25
29
|
|
|
26
30
|
sig do
|
|
27
|
-
override.returns(
|
|
31
|
+
override.returns(
|
|
32
|
+
{ request_id: String, request_options: Imagekitio::RequestOptions }
|
|
33
|
+
)
|
|
28
34
|
end
|
|
29
35
|
def to_hash
|
|
30
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
|
# Human readable name of the custom metadata field. This should be unique across
|
|
18
21
|
# all non deleted custom metadata fields. This name is displayed as form field
|
|
19
22
|
# label to the users while setting field value on an asset in the media library
|
|
@@ -42,12 +45,14 @@ module Imagekitio
|
|
|
42
45
|
|
|
43
46
|
sig do
|
|
44
47
|
params(
|
|
48
|
+
id: String,
|
|
45
49
|
label: String,
|
|
46
50
|
schema: Imagekitio::CustomMetadataFieldUpdateParams::Schema::OrHash,
|
|
47
51
|
request_options: Imagekitio::RequestOptions::OrHash
|
|
48
52
|
).returns(T.attached_class)
|
|
49
53
|
end
|
|
50
54
|
def self.new(
|
|
55
|
+
id:,
|
|
51
56
|
# Human readable name of the custom metadata field. This should be unique across
|
|
52
57
|
# all non deleted custom metadata fields. This name is displayed as form field
|
|
53
58
|
# label to the users while setting field value on an asset in the media library
|
|
@@ -65,6 +70,7 @@ module Imagekitio
|
|
|
65
70
|
sig do
|
|
66
71
|
override.returns(
|
|
67
72
|
{
|
|
73
|
+
id: String,
|
|
68
74
|
label: String,
|
|
69
75
|
schema: Imagekitio::CustomMetadataFieldUpdateParams::Schema,
|
|
70
76
|
request_options: Imagekitio::RequestOptions
|
|
@@ -374,8 +374,10 @@ module Imagekitio
|
|
|
374
374
|
sig { params(min_selections: Integer).void }
|
|
375
375
|
attr_writer :min_selections
|
|
376
376
|
|
|
377
|
-
# Array of possible tag values.
|
|
378
|
-
# characters
|
|
377
|
+
# Array of possible tag values. The combined length of all strings must not exceed
|
|
378
|
+
# 500 characters, and values cannot include the `%` character. When providing
|
|
379
|
+
# large vocabularies (more than 30 items), the AI may not follow the list
|
|
380
|
+
# strictly.
|
|
379
381
|
sig { returns(T.nilable(T::Array[String])) }
|
|
380
382
|
attr_reader :vocabulary
|
|
381
383
|
|
|
@@ -398,8 +400,10 @@ module Imagekitio
|
|
|
398
400
|
max_selections: nil,
|
|
399
401
|
# Minimum number of tags to select from the vocabulary.
|
|
400
402
|
min_selections: nil,
|
|
401
|
-
# Array of possible tag values.
|
|
402
|
-
# characters
|
|
403
|
+
# Array of possible tag values. The combined length of all strings must not exceed
|
|
404
|
+
# 500 characters, and values cannot include the `%` character. When providing
|
|
405
|
+
# large vocabularies (more than 30 items), the AI may not follow the list
|
|
406
|
+
# strictly.
|
|
403
407
|
vocabulary: nil,
|
|
404
408
|
# Task type that analyzes the image and adds matching tags from a vocabulary.
|
|
405
409
|
type: :select_tags
|
|
@@ -457,7 +461,10 @@ module Imagekitio
|
|
|
457
461
|
sig { params(min_selections: Integer).void }
|
|
458
462
|
attr_writer :min_selections
|
|
459
463
|
|
|
460
|
-
#
|
|
464
|
+
# An array of possible values matching the custom metadata field type. If not
|
|
465
|
+
# provided for SingleSelect or MultiSelect field types, all values from the custom
|
|
466
|
+
# metadata field definition will be used. When providing large vocabularies (above
|
|
467
|
+
# 30 items), the AI may not strictly adhere to the list.
|
|
461
468
|
sig do
|
|
462
469
|
returns(
|
|
463
470
|
T.nilable(
|
|
@@ -501,7 +508,10 @@ module Imagekitio
|
|
|
501
508
|
max_selections: nil,
|
|
502
509
|
# Minimum number of values to select from the vocabulary.
|
|
503
510
|
min_selections: nil,
|
|
504
|
-
#
|
|
511
|
+
# An array of possible values matching the custom metadata field type. If not
|
|
512
|
+
# provided for SingleSelect or MultiSelect field types, all values from the custom
|
|
513
|
+
# metadata field definition will be used. When providing large vocabularies (above
|
|
514
|
+
# 30 items), the AI may not strictly adhere to the list.
|
|
505
515
|
vocabulary: nil,
|
|
506
516
|
# Task type that analyzes the image and sets a custom metadata field value from a
|
|
507
517
|
# vocabulary.
|
|
@@ -371,8 +371,10 @@ module Imagekitio
|
|
|
371
371
|
sig { params(min_selections: Integer).void }
|
|
372
372
|
attr_writer :min_selections
|
|
373
373
|
|
|
374
|
-
# Array of possible tag values.
|
|
375
|
-
# characters
|
|
374
|
+
# Array of possible tag values. The combined length of all strings must not exceed
|
|
375
|
+
# 500 characters, and values cannot include the `%` character. When providing
|
|
376
|
+
# large vocabularies (more than 30 items), the AI may not follow the list
|
|
377
|
+
# strictly.
|
|
376
378
|
sig { returns(T.nilable(T::Array[String])) }
|
|
377
379
|
attr_reader :vocabulary
|
|
378
380
|
|
|
@@ -395,8 +397,10 @@ module Imagekitio
|
|
|
395
397
|
max_selections: nil,
|
|
396
398
|
# Minimum number of tags to select from the vocabulary.
|
|
397
399
|
min_selections: nil,
|
|
398
|
-
# Array of possible tag values.
|
|
399
|
-
# characters
|
|
400
|
+
# Array of possible tag values. The combined length of all strings must not exceed
|
|
401
|
+
# 500 characters, and values cannot include the `%` character. When providing
|
|
402
|
+
# large vocabularies (more than 30 items), the AI may not follow the list
|
|
403
|
+
# strictly.
|
|
400
404
|
vocabulary: nil,
|
|
401
405
|
# Task type that analyzes the image and adds matching tags from a vocabulary.
|
|
402
406
|
type: :select_tags
|
|
@@ -454,7 +458,10 @@ module Imagekitio
|
|
|
454
458
|
sig { params(min_selections: Integer).void }
|
|
455
459
|
attr_writer :min_selections
|
|
456
460
|
|
|
457
|
-
#
|
|
461
|
+
# An array of possible values matching the custom metadata field type. If not
|
|
462
|
+
# provided for SingleSelect or MultiSelect field types, all values from the custom
|
|
463
|
+
# metadata field definition will be used. When providing large vocabularies (above
|
|
464
|
+
# 30 items), the AI may not strictly adhere to the list.
|
|
458
465
|
sig do
|
|
459
466
|
returns(
|
|
460
467
|
T.nilable(
|
|
@@ -498,7 +505,10 @@ module Imagekitio
|
|
|
498
505
|
max_selections: nil,
|
|
499
506
|
# Minimum number of values to select from the vocabulary.
|
|
500
507
|
min_selections: nil,
|
|
501
|
-
#
|
|
508
|
+
# An array of possible values matching the custom metadata field type. If not
|
|
509
|
+
# provided for SingleSelect or MultiSelect field types, all values from the custom
|
|
510
|
+
# metadata field definition will be used. When providing large vocabularies (above
|
|
511
|
+
# 30 items), the AI may not strictly adhere to the list.
|
|
502
512
|
vocabulary: nil,
|
|
503
513
|
# Task type that analyzes the image and sets a custom metadata field value from a
|
|
504
514
|
# vocabulary.
|