imagekitio 4.7.0 → 4.9.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/internal/transport/base_client.rb +4 -1
- data/lib/imagekitio/models/accounts/request_bandwidth_entry.rb +26 -0
- data/lib/imagekitio/models/accounts/usage_analytics_get_params.rb +39 -0
- data/lib/imagekitio/models/accounts/usage_analytics_response.rb +1044 -0
- data/lib/imagekitio/models/custom_metadata_field.rb +11 -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.rb +12 -0
- data/lib/imagekitio/resources/accounts/usage.rb +6 -0
- data/lib/imagekitio/resources/accounts/usage_analytics.rb +55 -0
- data/lib/imagekitio/resources/accounts.rb +4 -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 +12 -0
- data/rbi/imagekitio/client.rbi +3 -0
- data/rbi/imagekitio/models/accounts/request_bandwidth_entry.rbi +44 -0
- data/rbi/imagekitio/models/accounts/usage_analytics_get_params.rbi +64 -0
- data/rbi/imagekitio/models/accounts/usage_analytics_response.rbi +2097 -0
- data/rbi/imagekitio/models/custom_metadata_field.rbi +18 -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.rbi +17 -0
- data/rbi/imagekitio/resources/accounts/usage.rbi +6 -0
- data/rbi/imagekitio/resources/accounts/usage_analytics.rbi +46 -0
- data/rbi/imagekitio/resources/accounts.rbi +3 -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/accounts/request_bandwidth_entry.rbs +18 -0
- data/sig/imagekitio/models/accounts/usage_analytics_get_params.rbs +30 -0
- data/sig/imagekitio/models/accounts/usage_analytics_response.rbs +785 -0
- data/sig/imagekitio/models/custom_metadata_field.rbs +10 -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.rbs +12 -0
- data/sig/imagekitio/resources/accounts/usage_analytics.rbs +15 -0
- data/sig/imagekitio/resources/accounts.rbs +2 -0
- data/sig/imagekitio/resources/custom_metadata_fields.rbs +2 -0
- data/sig/imagekitio/resources/named_transformations.rbs +33 -0
- metadata +38 -2
|
@@ -32,13 +32,23 @@ module Imagekitio
|
|
|
32
32
|
end
|
|
33
33
|
attr_writer :schema
|
|
34
34
|
|
|
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
|
+
sig { returns(T.nilable(String)) }
|
|
39
|
+
attr_reader :description
|
|
40
|
+
|
|
41
|
+
sig { params(description: String).void }
|
|
42
|
+
attr_writer :description
|
|
43
|
+
|
|
35
44
|
# Object containing details of a custom metadata field.
|
|
36
45
|
sig do
|
|
37
46
|
params(
|
|
38
47
|
id: String,
|
|
39
48
|
label: String,
|
|
40
49
|
name: String,
|
|
41
|
-
schema: Imagekitio::CustomMetadataField::Schema::OrHash
|
|
50
|
+
schema: Imagekitio::CustomMetadataField::Schema::OrHash,
|
|
51
|
+
description: String
|
|
42
52
|
).returns(T.attached_class)
|
|
43
53
|
end
|
|
44
54
|
def self.new(
|
|
@@ -52,7 +62,11 @@ module Imagekitio
|
|
|
52
62
|
# `customMetadata` (key-value object) for an asset using upload or update API.
|
|
53
63
|
name:,
|
|
54
64
|
# An object that describes the rules for the custom metadata field value.
|
|
55
|
-
schema
|
|
65
|
+
schema:,
|
|
66
|
+
# Optional description of the custom metadata field. Only present when a
|
|
67
|
+
# description has been set. Shown as a hint to the users while setting the field's
|
|
68
|
+
# value on an asset in the media library UI.
|
|
69
|
+
description: nil
|
|
56
70
|
)
|
|
57
71
|
end
|
|
58
72
|
|
|
@@ -62,7 +76,8 @@ module Imagekitio
|
|
|
62
76
|
id: String,
|
|
63
77
|
label: String,
|
|
64
78
|
name: String,
|
|
65
|
-
schema: Imagekitio::CustomMetadataField::Schema
|
|
79
|
+
schema: Imagekitio::CustomMetadataField::Schema,
|
|
80
|
+
description: String
|
|
66
81
|
}
|
|
67
82
|
)
|
|
68
83
|
end
|
|
@@ -36,11 +36,21 @@ module Imagekitio
|
|
|
36
36
|
end
|
|
37
37
|
attr_writer :schema
|
|
38
38
|
|
|
39
|
+
# Optional description for the custom metadata field. Can be up to 500 characters.
|
|
40
|
+
# This is shown as a hint to the users while setting the field's value on an asset
|
|
41
|
+
# in the media library UI.
|
|
42
|
+
sig { returns(T.nilable(String)) }
|
|
43
|
+
attr_reader :description
|
|
44
|
+
|
|
45
|
+
sig { params(description: String).void }
|
|
46
|
+
attr_writer :description
|
|
47
|
+
|
|
39
48
|
sig do
|
|
40
49
|
params(
|
|
41
50
|
label: String,
|
|
42
51
|
name: String,
|
|
43
52
|
schema: Imagekitio::CustomMetadataFieldCreateParams::Schema::OrHash,
|
|
53
|
+
description: String,
|
|
44
54
|
request_options: Imagekitio::RequestOptions::OrHash
|
|
45
55
|
).returns(T.attached_class)
|
|
46
56
|
end
|
|
@@ -54,6 +64,10 @@ module Imagekitio
|
|
|
54
64
|
# (including deleted) custom metadata fields.
|
|
55
65
|
name:,
|
|
56
66
|
schema:,
|
|
67
|
+
# Optional description for the custom metadata field. Can be up to 500 characters.
|
|
68
|
+
# This is shown as a hint to the users while setting the field's value on an asset
|
|
69
|
+
# in the media library UI.
|
|
70
|
+
description: nil,
|
|
57
71
|
request_options: {}
|
|
58
72
|
)
|
|
59
73
|
end
|
|
@@ -64,6 +78,7 @@ module Imagekitio
|
|
|
64
78
|
label: String,
|
|
65
79
|
name: String,
|
|
66
80
|
schema: Imagekitio::CustomMetadataFieldCreateParams::Schema,
|
|
81
|
+
description: String,
|
|
67
82
|
request_options: Imagekitio::RequestOptions
|
|
68
83
|
}
|
|
69
84
|
)
|
|
@@ -17,6 +17,16 @@ module Imagekitio
|
|
|
17
17
|
sig { returns(String) }
|
|
18
18
|
attr_accessor :id
|
|
19
19
|
|
|
20
|
+
# Optional description for the custom metadata field. Can be up to 500 characters.
|
|
21
|
+
# Send an empty string to clear an existing description. This is shown as a hint
|
|
22
|
+
# to the users while setting the field's value on an asset in the media library
|
|
23
|
+
# UI.
|
|
24
|
+
sig { returns(T.nilable(String)) }
|
|
25
|
+
attr_reader :description
|
|
26
|
+
|
|
27
|
+
sig { params(description: String).void }
|
|
28
|
+
attr_writer :description
|
|
29
|
+
|
|
20
30
|
# Human readable name of the custom metadata field. This should be unique across
|
|
21
31
|
# all non deleted custom metadata fields. This name is displayed as form field
|
|
22
32
|
# label to the users while setting field value on an asset in the media library
|
|
@@ -46,6 +56,7 @@ module Imagekitio
|
|
|
46
56
|
sig do
|
|
47
57
|
params(
|
|
48
58
|
id: String,
|
|
59
|
+
description: String,
|
|
49
60
|
label: String,
|
|
50
61
|
schema: Imagekitio::CustomMetadataFieldUpdateParams::Schema::OrHash,
|
|
51
62
|
request_options: Imagekitio::RequestOptions::OrHash
|
|
@@ -53,6 +64,11 @@ module Imagekitio
|
|
|
53
64
|
end
|
|
54
65
|
def self.new(
|
|
55
66
|
id:,
|
|
67
|
+
# Optional description for the custom metadata field. Can be up to 500 characters.
|
|
68
|
+
# Send an empty string to clear an existing description. This is shown as a hint
|
|
69
|
+
# to the users while setting the field's value on an asset in the media library
|
|
70
|
+
# UI.
|
|
71
|
+
description: nil,
|
|
56
72
|
# Human readable name of the custom metadata field. This should be unique across
|
|
57
73
|
# all non deleted custom metadata fields. This name is displayed as form field
|
|
58
74
|
# label to the users while setting field value on an asset in the media library
|
|
@@ -71,6 +87,7 @@ module Imagekitio
|
|
|
71
87
|
override.returns(
|
|
72
88
|
{
|
|
73
89
|
id: String,
|
|
90
|
+
description: String,
|
|
74
91
|
label: String,
|
|
75
92
|
schema: Imagekitio::CustomMetadataFieldUpdateParams::Schema,
|
|
76
93
|
request_options: Imagekitio::RequestOptions
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Imagekitio
|
|
4
|
+
module Models
|
|
5
|
+
class NamedTransformation < Imagekitio::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(Imagekitio::NamedTransformation, Imagekitio::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# Unique identifier for a named transformation.
|
|
12
|
+
sig { returns(String) }
|
|
13
|
+
attr_accessor :id
|
|
14
|
+
|
|
15
|
+
# ISO 8601 timestamp of when the named transformation was created.
|
|
16
|
+
sig { returns(Time) }
|
|
17
|
+
attr_accessor :created_at
|
|
18
|
+
|
|
19
|
+
# Whether the named transformation is currently enabled. When set to `false`,
|
|
20
|
+
# requests using this named transformation fail at delivery time.
|
|
21
|
+
sig { returns(T::Boolean) }
|
|
22
|
+
attr_accessor :enabled
|
|
23
|
+
|
|
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
|
+
sig { returns(String) }
|
|
28
|
+
attr_accessor :name
|
|
29
|
+
|
|
30
|
+
# The transformation string this named transformation refers to. Learn more about
|
|
31
|
+
# the [transformation string syntax](https://imagekit.io/docs/transformations).
|
|
32
|
+
sig { returns(String) }
|
|
33
|
+
attr_accessor :transformation
|
|
34
|
+
|
|
35
|
+
# A named transformation is an alias for a transformation string, letting you
|
|
36
|
+
# apply and later update complex transformations without changing your image or
|
|
37
|
+
# video URLs. Learn more about
|
|
38
|
+
# [named transformations](https://imagekit.io/docs/transformations#named-transformations).
|
|
39
|
+
sig do
|
|
40
|
+
params(
|
|
41
|
+
id: String,
|
|
42
|
+
created_at: Time,
|
|
43
|
+
enabled: T::Boolean,
|
|
44
|
+
name: String,
|
|
45
|
+
transformation: String
|
|
46
|
+
).returns(T.attached_class)
|
|
47
|
+
end
|
|
48
|
+
def self.new(
|
|
49
|
+
# Unique identifier for a named transformation.
|
|
50
|
+
id:,
|
|
51
|
+
# ISO 8601 timestamp of when the named transformation was created.
|
|
52
|
+
created_at:,
|
|
53
|
+
# Whether the named transformation is currently enabled. When set to `false`,
|
|
54
|
+
# requests using this named transformation fail at delivery time.
|
|
55
|
+
enabled:,
|
|
56
|
+
# Alias for the transformation string, used in URLs as `tr:n-<name>`. This is
|
|
57
|
+
# case-sensitive, contains only alphanumeric characters or `_` (underscore), and
|
|
58
|
+
# is unique across all named transformations for your account.
|
|
59
|
+
name:,
|
|
60
|
+
# The transformation string this named transformation refers to. Learn more about
|
|
61
|
+
# the [transformation string syntax](https://imagekit.io/docs/transformations).
|
|
62
|
+
transformation:
|
|
63
|
+
)
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
sig do
|
|
67
|
+
override.returns(
|
|
68
|
+
{
|
|
69
|
+
id: String,
|
|
70
|
+
created_at: Time,
|
|
71
|
+
enabled: T::Boolean,
|
|
72
|
+
name: String,
|
|
73
|
+
transformation: String
|
|
74
|
+
}
|
|
75
|
+
)
|
|
76
|
+
end
|
|
77
|
+
def to_hash
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
end
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Imagekitio
|
|
4
|
+
module Models
|
|
5
|
+
class NamedTransformationCreateParams < Imagekitio::Internal::Type::BaseModel
|
|
6
|
+
extend Imagekitio::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include Imagekitio::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
Imagekitio::NamedTransformationCreateParams,
|
|
13
|
+
Imagekitio::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# Alias for the transformation string, used in URLs as `tr:n-<name>`. This is
|
|
18
|
+
# case-sensitive, contains only alphanumeric characters or `_` (underscore), and
|
|
19
|
+
# is unique across all named transformations for your account.
|
|
20
|
+
sig { returns(String) }
|
|
21
|
+
attr_accessor :name
|
|
22
|
+
|
|
23
|
+
# The transformation string this named transformation refers to. Learn more about
|
|
24
|
+
# the [transformation string syntax](https://imagekit.io/docs/transformations).
|
|
25
|
+
sig { returns(String) }
|
|
26
|
+
attr_accessor :transformation
|
|
27
|
+
|
|
28
|
+
# Whether the named transformation is currently enabled. When set to `false`,
|
|
29
|
+
# requests using this named transformation fail at delivery time.
|
|
30
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
31
|
+
attr_reader :enabled
|
|
32
|
+
|
|
33
|
+
sig { params(enabled: T::Boolean).void }
|
|
34
|
+
attr_writer :enabled
|
|
35
|
+
|
|
36
|
+
sig do
|
|
37
|
+
params(
|
|
38
|
+
name: String,
|
|
39
|
+
transformation: String,
|
|
40
|
+
enabled: T::Boolean,
|
|
41
|
+
request_options: Imagekitio::RequestOptions::OrHash
|
|
42
|
+
).returns(T.attached_class)
|
|
43
|
+
end
|
|
44
|
+
def self.new(
|
|
45
|
+
# Alias for the transformation string, used in URLs as `tr:n-<name>`. This is
|
|
46
|
+
# case-sensitive, contains only alphanumeric characters or `_` (underscore), and
|
|
47
|
+
# is unique across all named transformations for your account.
|
|
48
|
+
name:,
|
|
49
|
+
# The transformation string this named transformation refers to. Learn more about
|
|
50
|
+
# the [transformation string syntax](https://imagekit.io/docs/transformations).
|
|
51
|
+
transformation:,
|
|
52
|
+
# Whether the named transformation is currently enabled. When set to `false`,
|
|
53
|
+
# requests using this named transformation fail at delivery time.
|
|
54
|
+
enabled: nil,
|
|
55
|
+
request_options: {}
|
|
56
|
+
)
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
sig do
|
|
60
|
+
override.returns(
|
|
61
|
+
{
|
|
62
|
+
name: String,
|
|
63
|
+
transformation: String,
|
|
64
|
+
enabled: T::Boolean,
|
|
65
|
+
request_options: Imagekitio::RequestOptions
|
|
66
|
+
}
|
|
67
|
+
)
|
|
68
|
+
end
|
|
69
|
+
def to_hash
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Imagekitio
|
|
4
|
+
module Models
|
|
5
|
+
class NamedTransformationDeleteParams < Imagekitio::Internal::Type::BaseModel
|
|
6
|
+
extend Imagekitio::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include Imagekitio::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
Imagekitio::NamedTransformationDeleteParams,
|
|
13
|
+
Imagekitio::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# Unique identifier for a named transformation.
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :id
|
|
20
|
+
|
|
21
|
+
sig do
|
|
22
|
+
params(
|
|
23
|
+
id: String,
|
|
24
|
+
request_options: Imagekitio::RequestOptions::OrHash
|
|
25
|
+
).returns(T.attached_class)
|
|
26
|
+
end
|
|
27
|
+
def self.new(
|
|
28
|
+
# Unique identifier for a named transformation.
|
|
29
|
+
id:,
|
|
30
|
+
request_options: {}
|
|
31
|
+
)
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
sig do
|
|
35
|
+
override.returns(
|
|
36
|
+
{ id: String, request_options: Imagekitio::RequestOptions }
|
|
37
|
+
)
|
|
38
|
+
end
|
|
39
|
+
def to_hash
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Imagekitio
|
|
4
|
+
module Models
|
|
5
|
+
class NamedTransformationGetParams < Imagekitio::Internal::Type::BaseModel
|
|
6
|
+
extend Imagekitio::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include Imagekitio::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
Imagekitio::NamedTransformationGetParams,
|
|
13
|
+
Imagekitio::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# Unique identifier for a named transformation.
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :id
|
|
20
|
+
|
|
21
|
+
sig do
|
|
22
|
+
params(
|
|
23
|
+
id: String,
|
|
24
|
+
request_options: Imagekitio::RequestOptions::OrHash
|
|
25
|
+
).returns(T.attached_class)
|
|
26
|
+
end
|
|
27
|
+
def self.new(
|
|
28
|
+
# Unique identifier for a named transformation.
|
|
29
|
+
id:,
|
|
30
|
+
request_options: {}
|
|
31
|
+
)
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
sig do
|
|
35
|
+
override.returns(
|
|
36
|
+
{ id: String, request_options: Imagekitio::RequestOptions }
|
|
37
|
+
)
|
|
38
|
+
end
|
|
39
|
+
def to_hash
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Imagekitio
|
|
4
|
+
module Models
|
|
5
|
+
class NamedTransformationListParams < Imagekitio::Internal::Type::BaseModel
|
|
6
|
+
extend Imagekitio::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include Imagekitio::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
Imagekitio::NamedTransformationListParams,
|
|
13
|
+
Imagekitio::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
sig do
|
|
18
|
+
params(request_options: Imagekitio::RequestOptions::OrHash).returns(
|
|
19
|
+
T.attached_class
|
|
20
|
+
)
|
|
21
|
+
end
|
|
22
|
+
def self.new(request_options: {})
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
sig { override.returns({ request_options: Imagekitio::RequestOptions }) }
|
|
26
|
+
def to_hash
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Imagekitio
|
|
4
|
+
module Models
|
|
5
|
+
class NamedTransformationUpdateParams < Imagekitio::Internal::Type::BaseModel
|
|
6
|
+
extend Imagekitio::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include Imagekitio::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
Imagekitio::NamedTransformationUpdateParams,
|
|
13
|
+
Imagekitio::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# Unique identifier for a named transformation.
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :id
|
|
20
|
+
|
|
21
|
+
# Whether the named transformation is enabled. Omit to leave the current value
|
|
22
|
+
# unchanged.
|
|
23
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
24
|
+
attr_reader :enabled
|
|
25
|
+
|
|
26
|
+
sig { params(enabled: T::Boolean).void }
|
|
27
|
+
attr_writer :enabled
|
|
28
|
+
|
|
29
|
+
# Alias for the transformation string, used in URLs as `tr:n-<name>`. This is
|
|
30
|
+
# case-sensitive, contains only alphanumeric characters or `_` (underscore), and
|
|
31
|
+
# is unique across all named transformations for your account.
|
|
32
|
+
sig { returns(T.nilable(String)) }
|
|
33
|
+
attr_reader :name
|
|
34
|
+
|
|
35
|
+
sig { params(name: String).void }
|
|
36
|
+
attr_writer :name
|
|
37
|
+
|
|
38
|
+
# The transformation string this named transformation refers to. Learn more about
|
|
39
|
+
# the [transformation string syntax](https://imagekit.io/docs/transformations).
|
|
40
|
+
sig { returns(T.nilable(String)) }
|
|
41
|
+
attr_reader :transformation
|
|
42
|
+
|
|
43
|
+
sig { params(transformation: String).void }
|
|
44
|
+
attr_writer :transformation
|
|
45
|
+
|
|
46
|
+
sig do
|
|
47
|
+
params(
|
|
48
|
+
id: String,
|
|
49
|
+
enabled: T::Boolean,
|
|
50
|
+
name: String,
|
|
51
|
+
transformation: String,
|
|
52
|
+
request_options: Imagekitio::RequestOptions::OrHash
|
|
53
|
+
).returns(T.attached_class)
|
|
54
|
+
end
|
|
55
|
+
def self.new(
|
|
56
|
+
# Unique identifier for a named transformation.
|
|
57
|
+
id:,
|
|
58
|
+
# Whether the named transformation is enabled. Omit to leave the current value
|
|
59
|
+
# unchanged.
|
|
60
|
+
enabled: nil,
|
|
61
|
+
# Alias for the transformation string, used in URLs as `tr:n-<name>`. This is
|
|
62
|
+
# case-sensitive, contains only alphanumeric characters or `_` (underscore), and
|
|
63
|
+
# is unique across all named transformations for your account.
|
|
64
|
+
name: nil,
|
|
65
|
+
# The transformation string this named transformation refers to. Learn more about
|
|
66
|
+
# the [transformation string syntax](https://imagekit.io/docs/transformations).
|
|
67
|
+
transformation: nil,
|
|
68
|
+
request_options: {}
|
|
69
|
+
)
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
sig do
|
|
73
|
+
override.returns(
|
|
74
|
+
{
|
|
75
|
+
id: String,
|
|
76
|
+
enabled: T::Boolean,
|
|
77
|
+
name: String,
|
|
78
|
+
transformation: String,
|
|
79
|
+
request_options: Imagekitio::RequestOptions
|
|
80
|
+
}
|
|
81
|
+
)
|
|
82
|
+
end
|
|
83
|
+
def to_hash
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
end
|
data/rbi/imagekitio/models.rbi
CHANGED
|
@@ -96,6 +96,23 @@ module Imagekitio
|
|
|
96
96
|
|
|
97
97
|
Metadata = Imagekitio::Models::Metadata
|
|
98
98
|
|
|
99
|
+
NamedTransformation = Imagekitio::Models::NamedTransformation
|
|
100
|
+
|
|
101
|
+
NamedTransformationCreateParams =
|
|
102
|
+
Imagekitio::Models::NamedTransformationCreateParams
|
|
103
|
+
|
|
104
|
+
NamedTransformationDeleteParams =
|
|
105
|
+
Imagekitio::Models::NamedTransformationDeleteParams
|
|
106
|
+
|
|
107
|
+
NamedTransformationGetParams =
|
|
108
|
+
Imagekitio::Models::NamedTransformationGetParams
|
|
109
|
+
|
|
110
|
+
NamedTransformationListParams =
|
|
111
|
+
Imagekitio::Models::NamedTransformationListParams
|
|
112
|
+
|
|
113
|
+
NamedTransformationUpdateParams =
|
|
114
|
+
Imagekitio::Models::NamedTransformationUpdateParams
|
|
115
|
+
|
|
99
116
|
Overlay = Imagekitio::Models::Overlay
|
|
100
117
|
|
|
101
118
|
OverlayPosition = Imagekitio::Models::OverlayPosition
|
|
@@ -8,6 +8,12 @@ module Imagekitio
|
|
|
8
8
|
# includes data from the start date while excluding data from the end date. In
|
|
9
9
|
# other words, the data covers the period starting from the specified start date
|
|
10
10
|
# up to, but not including, the end date.
|
|
11
|
+
#
|
|
12
|
+
# For an agency account, the returned usage is aggregated across the agency and
|
|
13
|
+
# all of its child accounts that are billed to it.
|
|
14
|
+
#
|
|
15
|
+
# The response is cached for 6 hours per account, date range and requested
|
|
16
|
+
# metrics.
|
|
11
17
|
sig do
|
|
12
18
|
params(
|
|
13
19
|
end_date: Date,
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Imagekitio
|
|
4
|
+
module Resources
|
|
5
|
+
class Accounts
|
|
6
|
+
class UsageAnalytics
|
|
7
|
+
# **Note:** This API is currently in beta.
|
|
8
|
+
#
|
|
9
|
+
# Get the account analytics data between two dates. The response covers the period
|
|
10
|
+
# from the start date to the end date, both dates inclusive. Both dates are
|
|
11
|
+
# interpreted as UTC calendar days.
|
|
12
|
+
#
|
|
13
|
+
# The returned data is scoped to the requesting account only. Unlike
|
|
14
|
+
# `/v1/accounts/usage`, an agency account's analytics are not aggregated across
|
|
15
|
+
# its child accounts.
|
|
16
|
+
#
|
|
17
|
+
# The response is cached for 5 minutes per account and date range. Use
|
|
18
|
+
# `generatedAt` to check how fresh the returned data is.
|
|
19
|
+
sig do
|
|
20
|
+
params(
|
|
21
|
+
end_date: Date,
|
|
22
|
+
start_date: Date,
|
|
23
|
+
request_options: Imagekitio::RequestOptions::OrHash
|
|
24
|
+
).returns(Imagekitio::Accounts::UsageAnalyticsResponse)
|
|
25
|
+
end
|
|
26
|
+
def get(
|
|
27
|
+
# Specify an `endDate` in `YYYY-MM-DD` format, interpreted as a UTC calendar day.
|
|
28
|
+
# It should be after the `startDate`. The difference between `startDate` and
|
|
29
|
+
# `endDate` should be less than 90 days.
|
|
30
|
+
end_date:,
|
|
31
|
+
# Specify a `startDate` in `YYYY-MM-DD` format, interpreted as a UTC calendar day.
|
|
32
|
+
# It should be before the `endDate`. The difference between `startDate` and
|
|
33
|
+
# `endDate` should be less than 90 days.
|
|
34
|
+
start_date:,
|
|
35
|
+
request_options: {}
|
|
36
|
+
)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# @api private
|
|
40
|
+
sig { params(client: Imagekitio::Client).returns(T.attached_class) }
|
|
41
|
+
def self.new(client:)
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -6,6 +6,9 @@ module Imagekitio
|
|
|
6
6
|
sig { returns(Imagekitio::Resources::Accounts::Usage) }
|
|
7
7
|
attr_reader :usage
|
|
8
8
|
|
|
9
|
+
sig { returns(Imagekitio::Resources::Accounts::UsageAnalytics) }
|
|
10
|
+
attr_reader :usage_analytics
|
|
11
|
+
|
|
9
12
|
sig { returns(Imagekitio::Resources::Accounts::Origins) }
|
|
10
13
|
attr_reader :origins
|
|
11
14
|
|
|
@@ -12,6 +12,7 @@ module Imagekitio
|
|
|
12
12
|
label: String,
|
|
13
13
|
name: String,
|
|
14
14
|
schema: Imagekitio::CustomMetadataFieldCreateParams::Schema::OrHash,
|
|
15
|
+
description: String,
|
|
15
16
|
request_options: Imagekitio::RequestOptions::OrHash
|
|
16
17
|
).returns(Imagekitio::CustomMetadataField)
|
|
17
18
|
end
|
|
@@ -25,14 +26,20 @@ module Imagekitio
|
|
|
25
26
|
# (including deleted) custom metadata fields.
|
|
26
27
|
name:,
|
|
27
28
|
schema:,
|
|
29
|
+
# Optional description for the custom metadata field. Can be up to 500 characters.
|
|
30
|
+
# This is shown as a hint to the users while setting the field's value on an asset
|
|
31
|
+
# in the media library UI.
|
|
32
|
+
description: nil,
|
|
28
33
|
request_options: {}
|
|
29
34
|
)
|
|
30
35
|
end
|
|
31
36
|
|
|
32
|
-
# This API updates the label or schema of an existing custom
|
|
37
|
+
# This API updates the label, description, or schema of an existing custom
|
|
38
|
+
# metadata field.
|
|
33
39
|
sig do
|
|
34
40
|
params(
|
|
35
41
|
id: String,
|
|
42
|
+
description: String,
|
|
36
43
|
label: String,
|
|
37
44
|
schema: Imagekitio::CustomMetadataFieldUpdateParams::Schema::OrHash,
|
|
38
45
|
request_options: Imagekitio::RequestOptions::OrHash
|
|
@@ -41,6 +48,11 @@ module Imagekitio
|
|
|
41
48
|
def update(
|
|
42
49
|
# Should be a valid custom metadata field id.
|
|
43
50
|
id,
|
|
51
|
+
# Optional description for the custom metadata field. Can be up to 500 characters.
|
|
52
|
+
# Send an empty string to clear an existing description. This is shown as a hint
|
|
53
|
+
# to the users while setting the field's value on an asset in the media library
|
|
54
|
+
# UI.
|
|
55
|
+
description: nil,
|
|
44
56
|
# Human readable name of the custom metadata field. This should be unique across
|
|
45
57
|
# all non deleted custom metadata fields. This name is displayed as form field
|
|
46
58
|
# label to the users while setting field value on an asset in the media library
|