Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 35 additions & 10 deletions lib/imagekitio/models/accounts/origin_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module OriginRequest

class S3 < Imagekitio::Internal::Type::BaseModel
# @!attribute access_key
# Access key for the bucket.
# Access key for the bucket. When `useIAMRole` is `true`, send an empty string.
#
# @return [String]
required :access_key, String, api_name: :accessKey
Expand All @@ -45,7 +45,7 @@ class S3 < Imagekitio::Internal::Type::BaseModel
required :name, String

# @!attribute secret_key
# Secret key for the bucket.
# Secret key for the bucket. When `useIAMRole` is `true`, send an empty string.
#
# @return [String]
required :secret_key, String, api_name: :secretKey
Expand Down Expand Up @@ -75,21 +75,33 @@ class S3 < Imagekitio::Internal::Type::BaseModel
# @return [String, nil]
optional :prefix, String

# @!method initialize(access_key:, bucket:, name:, secret_key:, base_url_for_canonical_header: nil, include_canonical_header: nil, prefix: nil, type: :S3)
# @param access_key [String] Access key for the bucket.
# @!attribute use_iam_role
# Use IAM role for authentication instead of access/secret keys. When set to
# `true`, send an empty string for both `accessKey` and `secretKey`.
#
# @return [Boolean, nil]
optional :use_iam_role, Imagekitio::Internal::Type::Boolean, api_name: :useIAMRole

# @!method initialize(access_key:, bucket:, name:, secret_key:, base_url_for_canonical_header: nil, include_canonical_header: nil, prefix: nil, use_iam_role: nil, type: :S3)
# Some parameter documentations has been truncated, see
# {Imagekitio::Models::Accounts::OriginRequest::S3} for more details.
#
# @param access_key [String] Access key for the bucket. When `useIAMRole` is `true`, send an empty string.
#
# @param bucket [String] S3 bucket name.
#
# @param name [String] Display name of the origin.
#
# @param secret_key [String] Secret key for the bucket.
# @param secret_key [String] Secret key for the bucket. When `useIAMRole` is `true`, send an empty string.
#
# @param base_url_for_canonical_header [String] URL used in the Canonical header (if enabled).
#
# @param include_canonical_header [Boolean] Whether to send a Canonical header.
#
# @param prefix [String] Path prefix inside the bucket.
#
# @param use_iam_role [Boolean] Use IAM role for authentication instead of access/secret keys. When set to `true
#
# @param type [Symbol, :S3]
end

Expand Down Expand Up @@ -179,7 +191,7 @@ class S3Compatible < Imagekitio::Internal::Type::BaseModel

class CloudinaryBackup < Imagekitio::Internal::Type::BaseModel
# @!attribute access_key
# Access key for the bucket.
# Access key for the bucket. When `useIAMRole` is `true`, send an empty string.
#
# @return [String]
required :access_key, String, api_name: :accessKey
Expand All @@ -197,7 +209,7 @@ class CloudinaryBackup < Imagekitio::Internal::Type::BaseModel
required :name, String

# @!attribute secret_key
# Secret key for the bucket.
# Secret key for the bucket. When `useIAMRole` is `true`, send an empty string.
#
# @return [String]
required :secret_key, String, api_name: :secretKey
Expand Down Expand Up @@ -227,21 +239,34 @@ class CloudinaryBackup < Imagekitio::Internal::Type::BaseModel
# @return [String, nil]
optional :prefix, String

# @!method initialize(access_key:, bucket:, name:, secret_key:, base_url_for_canonical_header: nil, include_canonical_header: nil, prefix: nil, type: :CLOUDINARY_BACKUP)
# @param access_key [String] Access key for the bucket.
# @!attribute use_iam_role
# Use IAM role for authentication instead of access/secret keys. When set to
# `true`, send an empty string for both `accessKey` and `secretKey`.
#
# @return [Boolean, nil]
optional :use_iam_role, Imagekitio::Internal::Type::Boolean, api_name: :useIAMRole

# @!method initialize(access_key:, bucket:, name:, secret_key:, base_url_for_canonical_header: nil, include_canonical_header: nil, prefix: nil, use_iam_role: nil, type: :CLOUDINARY_BACKUP)
# Some parameter documentations has been truncated, see
# {Imagekitio::Models::Accounts::OriginRequest::CloudinaryBackup} for more
# details.
#
# @param access_key [String] Access key for the bucket. When `useIAMRole` is `true`, send an empty string.
#
# @param bucket [String] S3 bucket name.
#
# @param name [String] Display name of the origin.
#
# @param secret_key [String] Secret key for the bucket.
# @param secret_key [String] Secret key for the bucket. When `useIAMRole` is `true`, send an empty string.
#
# @param base_url_for_canonical_header [String] URL used in the Canonical header (if enabled).
#
# @param include_canonical_header [Boolean] Whether to send a Canonical header.
#
# @param prefix [String] Path prefix inside the bucket.
#
# @param use_iam_role [Boolean] Use IAM role for authentication instead of access/secret keys. When set to `true
#
# @param type [Symbol, :CLOUDINARY_BACKUP]
end

Expand Down
22 changes: 20 additions & 2 deletions lib/imagekitio/models/accounts/origin_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ class S3 < Imagekitio::Internal::Type::BaseModel
# @return [String, nil]
optional :base_url_for_canonical_header, String, api_name: :baseUrlForCanonicalHeader

# @!attribute use_iam_role
# Whether the origin authenticates using an IAM role instead of access/secret
# keys.
#
# @return [Boolean, nil]
optional :use_iam_role, Imagekitio::Internal::Type::Boolean, api_name: :useIAMRole

response_only do
# @!attribute id
# Unique identifier for the origin. This is generated by ImageKit when you create
Expand All @@ -74,7 +81,7 @@ class S3 < Imagekitio::Internal::Type::BaseModel
required :id, String
end

# @!method initialize(id:, bucket:, include_canonical_header:, name:, prefix:, base_url_for_canonical_header: nil, type: :S3)
# @!method initialize(id:, bucket:, include_canonical_header:, name:, prefix:, base_url_for_canonical_header: nil, use_iam_role: nil, type: :S3)
# Some parameter documentations has been truncated, see
# {Imagekitio::Models::Accounts::OriginResponse::S3} for more details.
#
Expand All @@ -90,6 +97,8 @@ class S3 < Imagekitio::Internal::Type::BaseModel
#
# @param base_url_for_canonical_header [String] URL used in the Canonical header (if enabled).
#
# @param use_iam_role [Boolean] Whether the origin authenticates using an IAM role instead of access/secret keys
#
# @param type [Symbol, :S3]
end

Expand Down Expand Up @@ -213,6 +222,13 @@ class CloudinaryBackup < Imagekitio::Internal::Type::BaseModel
# @return [String, nil]
optional :base_url_for_canonical_header, String, api_name: :baseUrlForCanonicalHeader

# @!attribute use_iam_role
# Whether the origin authenticates using an IAM role instead of access/secret
# keys.
#
# @return [Boolean, nil]
optional :use_iam_role, Imagekitio::Internal::Type::Boolean, api_name: :useIAMRole

response_only do
# @!attribute id
# Unique identifier for the origin. This is generated by ImageKit when you create
Expand All @@ -222,7 +238,7 @@ class CloudinaryBackup < Imagekitio::Internal::Type::BaseModel
required :id, String
end

# @!method initialize(id:, bucket:, include_canonical_header:, name:, prefix:, base_url_for_canonical_header: nil, type: :CLOUDINARY_BACKUP)
# @!method initialize(id:, bucket:, include_canonical_header:, name:, prefix:, base_url_for_canonical_header: nil, use_iam_role: nil, type: :CLOUDINARY_BACKUP)
# Some parameter documentations has been truncated, see
# {Imagekitio::Models::Accounts::OriginResponse::CloudinaryBackup} for more
# details.
Expand All @@ -239,6 +255,8 @@ class CloudinaryBackup < Imagekitio::Internal::Type::BaseModel
#
# @param base_url_for_canonical_header [String] URL used in the Canonical header (if enabled).
#
# @param use_iam_role [Boolean] Whether the origin authenticates using an IAM role instead of access/secret keys
#
# @param type [Symbol, :CLOUDINARY_BACKUP]
end

Expand Down
2 changes: 1 addition & 1 deletion lib/imagekitio/models/transformation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ class Transformation < Imagekitio::Internal::Type::BaseModel
#
# - `co-color` - Color to apply (e.g., `red`, `blue`, `FF0022`). Default is gray
# color.
# - `in-intensity` - Intensity of the color (0-100). Default is 35. See
# - `in-intensity` - Intensity of the color (0-100). Default is 100. See
# [Colorize](https://imagekit.io/docs/effects-and-enhancements#colorize---e-colorize).
#
# @return [String, nil]
Expand Down
46 changes: 36 additions & 10 deletions rbi/imagekitio/models/accounts/origin_request.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ module Imagekitio
)
end

# Access key for the bucket.
# Access key for the bucket. When `useIAMRole` is `true`, send an empty string.
sig { returns(String) }
attr_accessor :access_key

Expand All @@ -42,7 +42,7 @@ module Imagekitio
sig { returns(String) }
attr_accessor :name

# Secret key for the bucket.
# Secret key for the bucket. When `useIAMRole` is `true`, send an empty string.
sig { returns(String) }
attr_accessor :secret_key

Expand Down Expand Up @@ -70,6 +70,14 @@ module Imagekitio
sig { params(prefix: String).void }
attr_writer :prefix

# Use IAM role for authentication instead of access/secret keys. When set to
# `true`, send an empty string for both `accessKey` and `secretKey`.
sig { returns(T.nilable(T::Boolean)) }
attr_reader :use_iam_role

sig { params(use_iam_role: T::Boolean).void }
attr_writer :use_iam_role

sig do
params(
access_key: String,
Expand All @@ -79,24 +87,28 @@ module Imagekitio
base_url_for_canonical_header: String,
include_canonical_header: T::Boolean,
prefix: String,
use_iam_role: T::Boolean,
type: Symbol
).returns(T.attached_class)
end
def self.new(
# Access key for the bucket.
# Access key for the bucket. When `useIAMRole` is `true`, send an empty string.
access_key:,
# S3 bucket name.
bucket:,
# Display name of the origin.
name:,
# Secret key for the bucket.
# Secret key for the bucket. When `useIAMRole` is `true`, send an empty string.
secret_key:,
# URL used in the Canonical header (if enabled).
base_url_for_canonical_header: nil,
# Whether to send a Canonical header.
include_canonical_header: nil,
# Path prefix inside the bucket.
prefix: nil,
# Use IAM role for authentication instead of access/secret keys. When set to
# `true`, send an empty string for both `accessKey` and `secretKey`.
use_iam_role: nil,
type: :S3
)
end
Expand All @@ -111,7 +123,8 @@ module Imagekitio
type: Symbol,
base_url_for_canonical_header: String,
include_canonical_header: T::Boolean,
prefix: String
prefix: String,
use_iam_role: T::Boolean
}
)
end
Expand Down Expand Up @@ -245,7 +258,7 @@ module Imagekitio
)
end

# Access key for the bucket.
# Access key for the bucket. When `useIAMRole` is `true`, send an empty string.
sig { returns(String) }
attr_accessor :access_key

Expand All @@ -257,7 +270,7 @@ module Imagekitio
sig { returns(String) }
attr_accessor :name

# Secret key for the bucket.
# Secret key for the bucket. When `useIAMRole` is `true`, send an empty string.
sig { returns(String) }
attr_accessor :secret_key

Expand Down Expand Up @@ -285,6 +298,14 @@ module Imagekitio
sig { params(prefix: String).void }
attr_writer :prefix

# Use IAM role for authentication instead of access/secret keys. When set to
# `true`, send an empty string for both `accessKey` and `secretKey`.
sig { returns(T.nilable(T::Boolean)) }
attr_reader :use_iam_role

sig { params(use_iam_role: T::Boolean).void }
attr_writer :use_iam_role

sig do
params(
access_key: String,
Expand All @@ -294,24 +315,28 @@ module Imagekitio
base_url_for_canonical_header: String,
include_canonical_header: T::Boolean,
prefix: String,
use_iam_role: T::Boolean,
type: Symbol
).returns(T.attached_class)
end
def self.new(
# Access key for the bucket.
# Access key for the bucket. When `useIAMRole` is `true`, send an empty string.
access_key:,
# S3 bucket name.
bucket:,
# Display name of the origin.
name:,
# Secret key for the bucket.
# Secret key for the bucket. When `useIAMRole` is `true`, send an empty string.
secret_key:,
# URL used in the Canonical header (if enabled).
base_url_for_canonical_header: nil,
# Whether to send a Canonical header.
include_canonical_header: nil,
# Path prefix inside the bucket.
prefix: nil,
# Use IAM role for authentication instead of access/secret keys. When set to
# `true`, send an empty string for both `accessKey` and `secretKey`.
use_iam_role: nil,
type: :CLOUDINARY_BACKUP
)
end
Expand All @@ -326,7 +351,8 @@ module Imagekitio
type: Symbol,
base_url_for_canonical_header: String,
include_canonical_header: T::Boolean,
prefix: String
prefix: String,
use_iam_role: T::Boolean
}
)
end
Expand Down
Loading