imagekitio 4.8.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.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +15 -0
  3. data/README.md +2 -2
  4. data/lib/imagekitio/client.rb +4 -0
  5. data/lib/imagekitio/models/custom_metadata_field.rb +11 -1
  6. data/lib/imagekitio/models/custom_metadata_field_create_params.rb +11 -1
  7. data/lib/imagekitio/models/custom_metadata_field_update_params.rb +12 -1
  8. data/lib/imagekitio/models/named_transformation.rb +60 -0
  9. data/lib/imagekitio/models/named_transformation_create_params.rb +45 -0
  10. data/lib/imagekitio/models/named_transformation_delete_params.rb +22 -0
  11. data/lib/imagekitio/models/named_transformation_get_params.rb +22 -0
  12. data/lib/imagekitio/models/named_transformation_list_params.rb +14 -0
  13. data/lib/imagekitio/models/named_transformation_list_response.rb +9 -0
  14. data/lib/imagekitio/models/named_transformation_update_params.rb +53 -0
  15. data/lib/imagekitio/models.rb +12 -0
  16. data/lib/imagekitio/resources/custom_metadata_fields.rb +8 -3
  17. data/lib/imagekitio/resources/named_transformations.rb +151 -0
  18. data/lib/imagekitio/version.rb +1 -1
  19. data/lib/imagekitio.rb +8 -0
  20. data/rbi/imagekitio/client.rbi +3 -0
  21. data/rbi/imagekitio/models/custom_metadata_field.rbi +18 -3
  22. data/rbi/imagekitio/models/custom_metadata_field_create_params.rbi +15 -0
  23. data/rbi/imagekitio/models/custom_metadata_field_update_params.rbi +17 -0
  24. data/rbi/imagekitio/models/named_transformation.rbi +81 -0
  25. data/rbi/imagekitio/models/named_transformation_create_params.rbi +73 -0
  26. data/rbi/imagekitio/models/named_transformation_delete_params.rbi +43 -0
  27. data/rbi/imagekitio/models/named_transformation_get_params.rbi +43 -0
  28. data/rbi/imagekitio/models/named_transformation_list_params.rbi +30 -0
  29. data/rbi/imagekitio/models/named_transformation_list_response.rbi +11 -0
  30. data/rbi/imagekitio/models/named_transformation_update_params.rbi +87 -0
  31. data/rbi/imagekitio/models.rbi +17 -0
  32. data/rbi/imagekitio/resources/custom_metadata_fields.rbi +13 -1
  33. data/rbi/imagekitio/resources/named_transformations.rbi +119 -0
  34. data/sig/imagekitio/client.rbs +2 -0
  35. data/sig/imagekitio/models/custom_metadata_field.rbs +10 -3
  36. data/sig/imagekitio/models/custom_metadata_field_create_params.rbs +8 -1
  37. data/sig/imagekitio/models/custom_metadata_field_update_params.rbs +7 -0
  38. data/sig/imagekitio/models/named_transformation.rbs +40 -0
  39. data/sig/imagekitio/models/named_transformation_create_params.rbs +34 -0
  40. data/sig/imagekitio/models/named_transformation_delete_params.rbs +23 -0
  41. data/sig/imagekitio/models/named_transformation_get_params.rbs +23 -0
  42. data/sig/imagekitio/models/named_transformation_list_params.rbs +15 -0
  43. data/sig/imagekitio/models/named_transformation_list_response.rbs +8 -0
  44. data/sig/imagekitio/models/named_transformation_update_params.rbs +42 -0
  45. data/sig/imagekitio/models.rbs +12 -0
  46. data/sig/imagekitio/resources/custom_metadata_fields.rbs +2 -0
  47. data/sig/imagekitio/resources/named_transformations.rbs +33 -0
  48. metadata +26 -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,11 @@
1
+ # typed: strong
2
+
3
+ module Imagekitio
4
+ module Models
5
+ NamedTransformationListResponse =
6
+ T.let(
7
+ Imagekitio::Internal::Type::ArrayOf[Imagekitio::NamedTransformation],
8
+ Imagekitio::Internal::Type::Converter
9
+ )
10
+ end
11
+ 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
@@ -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
@@ -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 metadata field.
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
@@ -0,0 +1,119 @@
1
+ # typed: strong
2
+
3
+ module Imagekitio
4
+ module Resources
5
+ class NamedTransformations
6
+ # Creates a new named transformation and returns the created object.
7
+ #
8
+ # A named transformation is a short, reusable name for a transformation string.
9
+ # Use it in image and video URLs as `tr:n-<name>`, and update the underlying
10
+ # transformation later without changing existing URLs. Learn more about
11
+ # [named transformations](https://imagekit.io/docs/transformations#named-transformations).
12
+ #
13
+ # You can create up to 250 named transformations per account.
14
+ sig do
15
+ params(
16
+ name: String,
17
+ transformation: String,
18
+ enabled: T::Boolean,
19
+ request_options: Imagekitio::RequestOptions::OrHash
20
+ ).returns(Imagekitio::NamedTransformation)
21
+ end
22
+ def create(
23
+ # Alias for the transformation string, used in URLs as `tr:n-<name>`. This is
24
+ # case-sensitive, contains only alphanumeric characters or `_` (underscore), and
25
+ # is unique across all named transformations for your account.
26
+ name:,
27
+ # The transformation string this named transformation refers to. Learn more about
28
+ # the [transformation string syntax](https://imagekit.io/docs/transformations).
29
+ transformation:,
30
+ # Whether the named transformation is currently enabled. When set to `false`,
31
+ # requests using this named transformation fail at delivery time.
32
+ enabled: nil,
33
+ request_options: {}
34
+ )
35
+ end
36
+
37
+ # Updates the named transformation identified by `id` and returns the updated
38
+ # object. Only the fields present in the request body are updated; other fields
39
+ # stay unchanged.
40
+ #
41
+ # Renaming or disabling a named transformation fails with a `409` error if it is
42
+ # still referenced (via the `n-<name>` token) by an upload pre-transformation or
43
+ # post-transformation setting. This check is best-effort and can't detect
44
+ # references in your own application code or in previously generated URLs.
45
+ sig do
46
+ params(
47
+ id: String,
48
+ enabled: T::Boolean,
49
+ name: String,
50
+ transformation: String,
51
+ request_options: Imagekitio::RequestOptions::OrHash
52
+ ).returns(Imagekitio::NamedTransformation)
53
+ end
54
+ def update(
55
+ # Unique identifier for a named transformation.
56
+ id,
57
+ # Whether the named transformation is enabled. Omit to leave the current value
58
+ # unchanged.
59
+ enabled: nil,
60
+ # Alias for the transformation string, used in URLs as `tr:n-<name>`. This is
61
+ # case-sensitive, contains only alphanumeric characters or `_` (underscore), and
62
+ # is unique across all named transformations for your account.
63
+ name: nil,
64
+ # The transformation string this named transformation refers to. Learn more about
65
+ # the [transformation string syntax](https://imagekit.io/docs/transformations).
66
+ transformation: nil,
67
+ request_options: {}
68
+ )
69
+ end
70
+
71
+ # Returns an array of all named transformations configured for your account.
72
+ sig do
73
+ params(request_options: Imagekitio::RequestOptions::OrHash).returns(
74
+ T::Array[Imagekitio::NamedTransformation]
75
+ )
76
+ end
77
+ def list(request_options: {})
78
+ end
79
+
80
+ # Permanently deletes the named transformation identified by `id`.
81
+ #
82
+ # Deletion fails with a `409` error if the named transformation is still
83
+ # referenced (via the `n-<name>` token) by an upload pre-transformation or
84
+ # post-transformation setting. This check is best-effort and can't detect
85
+ # references in your own application code or in previously generated URLs.
86
+ sig do
87
+ params(
88
+ id: String,
89
+ request_options: Imagekitio::RequestOptions::OrHash
90
+ ).void
91
+ end
92
+ def delete(
93
+ # Unique identifier for a named transformation.
94
+ id,
95
+ request_options: {}
96
+ )
97
+ end
98
+
99
+ # Retrieves the named transformation identified by `id`.
100
+ sig do
101
+ params(
102
+ id: String,
103
+ request_options: Imagekitio::RequestOptions::OrHash
104
+ ).returns(Imagekitio::NamedTransformation)
105
+ end
106
+ def get(
107
+ # Unique identifier for a named transformation.
108
+ id,
109
+ request_options: {}
110
+ )
111
+ end
112
+
113
+ # @api private
114
+ sig { params(client: Imagekitio::Client).returns(T.attached_class) }
115
+ def self.new(client:)
116
+ end
117
+ end
118
+ end
119
+ end