Skip to content

Commit 01a4f00

Browse files
refactor: AITags to singular AITag schema with array items pattern
1 parent 3d07367 commit 01a4f00

9 files changed

Lines changed: 33 additions & 69 deletions

File tree

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 47
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/imagekit-inc%2Fimagekit-7c4c23556be689ded6bcafd05e1645b82239521c9c841c0f7e76336e2eefcffa.yml
3-
openapi_spec_hash: eca5b039a0066c6536296248c3a80854
4-
config_hash: f914ebc9670f6e7c7751660caa4e5556
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/imagekit-inc%2Fimagekit-70c42eda2bee929830b2537f758400a58dded1f1ef5686a286e2469c35a041a0.yml
3+
openapi_spec_hash: cdaeed824e91657b45092765cf55eb42
4+
config_hash: e3c2679d25f6235381dfb11962fbf3d9

lib/imagekitio/models/beta/v2/file_upload_response.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ module V2
77
# @see Imagekitio::Resources::Beta::V2::Files#upload
88
class FileUploadResponse < Imagekitio::Internal::Type::BaseModel
99
# @!attribute ai_tags
10-
# Array of `AITags` associated with the image. If no `AITags` are set, it will be
11-
# null. These tags can be added using the `google-auto-tagging` or
12-
# `aws-auto-tagging` extensions.
10+
# An array of tags assigned to the uploaded file by auto tagging.
1311
#
1412
# @return [Array<Imagekitio::Models::Beta::V2::FileUploadResponse::AITag>, nil]
1513
optional :ai_tags,
@@ -210,7 +208,7 @@ class FileUploadResponse < Imagekitio::Internal::Type::BaseModel
210208
#
211209
# Object containing details of a successful upload.
212210
#
213-
# @param ai_tags [Array<Imagekitio::Models::Beta::V2::FileUploadResponse::AITag>, nil] Array of `AITags` associated with the image. If no `AITags` are set, it will be
211+
# @param ai_tags [Array<Imagekitio::Models::Beta::V2::FileUploadResponse::AITag>, nil] An array of tags assigned to the uploaded file by auto tagging.
214212
#
215213
# @param audio_codec [String] The audio codec used in the video (only for video).
216214
#

lib/imagekitio/models/file.rb

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ module Models
55
# @see Imagekitio::Resources::Files#get
66
class File < Imagekitio::Internal::Type::BaseModel
77
# @!attribute ai_tags
8-
# Array of `AITags` associated with the image. If no `AITags` are set, it will be
9-
# null. These tags can be added using the `google-auto-tagging` or
10-
# `aws-auto-tagging` extensions.
8+
# Array of AI-generated tags associated with the image. If no AITags are set, it
9+
# will be null.
1110
#
1211
# @return [Array<Imagekitio::Models::File::AITag>, nil]
1312
optional :ai_tags,
@@ -41,11 +40,7 @@ class File < Imagekitio::Internal::Type::BaseModel
4140
optional :custom_coordinates, String, api_name: :customCoordinates, nil?: true
4241

4342
# @!attribute custom_metadata
44-
# A key-value data associated with the asset. Use `responseField` in API request
45-
# to get `customMetadata` in the upload API response. Before setting any custom
46-
# metadata on an asset, you have to create the field using custom metadata fields
47-
# API. Send `customMetadata` in `responseFields` in API request to get the value
48-
# of this field.
43+
# An object with custom metadata for the file.
4944
#
5045
# @return [Hash{Symbol=>Object}, nil]
5146
optional :custom_metadata,
@@ -67,8 +62,7 @@ class File < Imagekitio::Internal::Type::BaseModel
6762

6863
# @!attribute embedded_metadata
6964
# Consolidated embedded metadata associated with the file. It includes exif, iptc,
70-
# and xmp data. Send `embeddedMetadata` in `responseFields` in API request to get
71-
# embeddedMetadata in the upload API response.
65+
# and xmp data.
7266
#
7367
# @return [Hash{Symbol=>Object}, nil]
7468
optional :embedded_metadata,
@@ -186,7 +180,7 @@ class File < Imagekitio::Internal::Type::BaseModel
186180
optional :url, String
187181

188182
# @!attribute version_info
189-
# An object containing the file or file version's `id` (versionId) and `name`.
183+
# An object with details of the file version.
190184
#
191185
# @return [Imagekitio::Models::File::VersionInfo, nil]
192186
optional :version_info, -> { Imagekitio::File::VersionInfo }, api_name: :versionInfo
@@ -209,7 +203,7 @@ class File < Imagekitio::Internal::Type::BaseModel
209203
#
210204
# Object containing details of a file or file version.
211205
#
212-
# @param ai_tags [Array<Imagekitio::Models::File::AITag>, nil] Array of `AITags` associated with the image. If no `AITags` are set, it will be
206+
# @param ai_tags [Array<Imagekitio::Models::File::AITag>, nil] Array of AI-generated tags associated with the image. If no AITags are set, it w
213207
#
214208
# @param audio_codec [String] The audio codec used in the video (only for video/audio).
215209
#
@@ -219,7 +213,7 @@ class File < Imagekitio::Internal::Type::BaseModel
219213
#
220214
# @param custom_coordinates [String, nil] An string with custom coordinates of the file.
221215
#
222-
# @param custom_metadata [Hash{Symbol=>Object}] A key-value data associated with the asset. Use `responseField` in API request t
216+
# @param custom_metadata [Hash{Symbol=>Object}] An object with custom metadata for the file.
223217
#
224218
# @param description [String] Optional text to describe the contents of the file. Can be set by the user or th
225219
#
@@ -259,7 +253,7 @@ class File < Imagekitio::Internal::Type::BaseModel
259253
#
260254
# @param url [String] URL of the file.
261255
#
262-
# @param version_info [Imagekitio::Models::File::VersionInfo] An object containing the file or file version's `id` (versionId) and `name`.
256+
# @param version_info [Imagekitio::Models::File::VersionInfo] An object with details of the file version.
263257
#
264258
# @param video_codec [String] The video codec used in the video (only for video).
265259
#

lib/imagekitio/models/file_upload_response.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ module Models
55
# @see Imagekitio::Resources::Files#upload
66
class FileUploadResponse < Imagekitio::Internal::Type::BaseModel
77
# @!attribute ai_tags
8-
# Array of `AITags` associated with the image. If no `AITags` are set, it will be
9-
# null. These tags can be added using the `google-auto-tagging` or
10-
# `aws-auto-tagging` extensions.
8+
# An array of tags assigned to the uploaded file by auto tagging.
119
#
1210
# @return [Array<Imagekitio::Models::FileUploadResponse::AITag>, nil]
1311
optional :ai_tags,
@@ -206,7 +204,7 @@ class FileUploadResponse < Imagekitio::Internal::Type::BaseModel
206204
#
207205
# Object containing details of a successful upload.
208206
#
209-
# @param ai_tags [Array<Imagekitio::Models::FileUploadResponse::AITag>, nil] Array of `AITags` associated with the image. If no `AITags` are set, it will be
207+
# @param ai_tags [Array<Imagekitio::Models::FileUploadResponse::AITag>, nil] An array of tags assigned to the uploaded file by auto tagging.
210208
#
211209
# @param audio_codec [String] The audio codec used in the video (only for video).
212210
#

lib/imagekitio/models/upload_pre_transform_success_event.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@ class UploadPreTransformSuccessEvent < Imagekitio::Models::BaseWebhookEvent
4040

4141
class Data < Imagekitio::Internal::Type::BaseModel
4242
# @!attribute ai_tags
43-
# Array of `AITags` associated with the image. If no `AITags` are set, it will be
44-
# null. These tags can be added using the `google-auto-tagging` or
45-
# `aws-auto-tagging` extensions.
43+
# An array of tags assigned to the uploaded file by auto tagging.
4644
#
4745
# @return [Array<Imagekitio::Models::UploadPreTransformSuccessEvent::Data::AITag>, nil]
4846
optional :ai_tags,
@@ -247,7 +245,7 @@ class Data < Imagekitio::Internal::Type::BaseModel
247245
#
248246
# Object containing details of a successful upload.
249247
#
250-
# @param ai_tags [Array<Imagekitio::Models::UploadPreTransformSuccessEvent::Data::AITag>, nil] Array of `AITags` associated with the image. If no `AITags` are set, it will be
248+
# @param ai_tags [Array<Imagekitio::Models::UploadPreTransformSuccessEvent::Data::AITag>, nil] An array of tags assigned to the uploaded file by auto tagging.
251249
#
252250
# @param audio_codec [String] The audio codec used in the video (only for video).
253251
#

rbi/imagekitio/models/beta/v2/file_upload_response.rbi

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ module Imagekitio
1313
)
1414
end
1515

16-
# Array of `AITags` associated with the image. If no `AITags` are set, it will be
17-
# null. These tags can be added using the `google-auto-tagging` or
18-
# `aws-auto-tagging` extensions.
16+
# An array of tags assigned to the uploaded file by auto tagging.
1917
sig do
2018
returns(
2119
T.nilable(
@@ -303,9 +301,7 @@ module Imagekitio
303301
).returns(T.attached_class)
304302
end
305303
def self.new(
306-
# Array of `AITags` associated with the image. If no `AITags` are set, it will be
307-
# null. These tags can be added using the `google-auto-tagging` or
308-
# `aws-auto-tagging` extensions.
304+
# An array of tags assigned to the uploaded file by auto tagging.
309305
ai_tags: nil,
310306
# The audio codec used in the video (only for video).
311307
audio_codec: nil,

rbi/imagekitio/models/file.rbi

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@ module Imagekitio
66
OrHash =
77
T.type_alias { T.any(Imagekitio::File, Imagekitio::Internal::AnyHash) }
88

9-
# Array of `AITags` associated with the image. If no `AITags` are set, it will be
10-
# null. These tags can be added using the `google-auto-tagging` or
11-
# `aws-auto-tagging` extensions.
9+
# Array of AI-generated tags associated with the image. If no AITags are set, it
10+
# will be null.
1211
sig { returns(T.nilable(T::Array[Imagekitio::File::AITag])) }
1312
attr_accessor :ai_tags
1413

@@ -38,11 +37,7 @@ module Imagekitio
3837
sig { returns(T.nilable(String)) }
3938
attr_accessor :custom_coordinates
4039

41-
# A key-value data associated with the asset. Use `responseField` in API request
42-
# to get `customMetadata` in the upload API response. Before setting any custom
43-
# metadata on an asset, you have to create the field using custom metadata fields
44-
# API. Send `customMetadata` in `responseFields` in API request to get the value
45-
# of this field.
40+
# An object with custom metadata for the file.
4641
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
4742
attr_reader :custom_metadata
4843

@@ -65,8 +60,7 @@ module Imagekitio
6560
attr_writer :duration
6661

6762
# Consolidated embedded metadata associated with the file. It includes exif, iptc,
68-
# and xmp data. Send `embeddedMetadata` in `responseFields` in API request to get
69-
# embeddedMetadata in the upload API response.
63+
# and xmp data.
7064
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
7165
attr_reader :embedded_metadata
7266

@@ -203,7 +197,7 @@ module Imagekitio
203197
sig { params(url: String).void }
204198
attr_writer :url
205199

206-
# An object containing the file or file version's `id` (versionId) and `name`.
200+
# An object with details of the file version.
207201
sig { returns(T.nilable(Imagekitio::File::VersionInfo)) }
208202
attr_reader :version_info
209203

@@ -259,9 +253,8 @@ module Imagekitio
259253
).returns(T.attached_class)
260254
end
261255
def self.new(
262-
# Array of `AITags` associated with the image. If no `AITags` are set, it will be
263-
# null. These tags can be added using the `google-auto-tagging` or
264-
# `aws-auto-tagging` extensions.
256+
# Array of AI-generated tags associated with the image. If no AITags are set, it
257+
# will be null.
265258
ai_tags: nil,
266259
# The audio codec used in the video (only for video/audio).
267260
audio_codec: nil,
@@ -272,20 +265,15 @@ module Imagekitio
272265
created_at: nil,
273266
# An string with custom coordinates of the file.
274267
custom_coordinates: nil,
275-
# A key-value data associated with the asset. Use `responseField` in API request
276-
# to get `customMetadata` in the upload API response. Before setting any custom
277-
# metadata on an asset, you have to create the field using custom metadata fields
278-
# API. Send `customMetadata` in `responseFields` in API request to get the value
279-
# of this field.
268+
# An object with custom metadata for the file.
280269
custom_metadata: nil,
281270
# Optional text to describe the contents of the file. Can be set by the user or
282271
# the ai-auto-description extension.
283272
description: nil,
284273
# The duration of the video in seconds (only for video).
285274
duration: nil,
286275
# Consolidated embedded metadata associated with the file. It includes exif, iptc,
287-
# and xmp data. Send `embeddedMetadata` in `responseFields` in API request to get
288-
# embeddedMetadata in the upload API response.
276+
# and xmp data.
289277
embedded_metadata: nil,
290278
# Unique identifier of the asset.
291279
file_id: nil,
@@ -331,7 +319,7 @@ module Imagekitio
331319
updated_at: nil,
332320
# URL of the file.
333321
url: nil,
334-
# An object containing the file or file version's `id` (versionId) and `name`.
322+
# An object with details of the file version.
335323
version_info: nil,
336324
# The video codec used in the video (only for video).
337325
video_codec: nil,

rbi/imagekitio/models/file_upload_response.rbi

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ module Imagekitio
1111
)
1212
end
1313

14-
# Array of `AITags` associated with the image. If no `AITags` are set, it will be
15-
# null. These tags can be added using the `google-auto-tagging` or
16-
# `aws-auto-tagging` extensions.
14+
# An array of tags assigned to the uploaded file by auto tagging.
1715
sig do
1816
returns(
1917
T.nilable(T::Array[Imagekitio::Models::FileUploadResponse::AITag])
@@ -289,9 +287,7 @@ module Imagekitio
289287
).returns(T.attached_class)
290288
end
291289
def self.new(
292-
# Array of `AITags` associated with the image. If no `AITags` are set, it will be
293-
# null. These tags can be added using the `google-auto-tagging` or
294-
# `aws-auto-tagging` extensions.
290+
# An array of tags assigned to the uploaded file by auto tagging.
295291
ai_tags: nil,
296292
# The audio codec used in the video (only for video).
297293
audio_codec: nil,

rbi/imagekitio/models/upload_pre_transform_success_event.rbi

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,7 @@ module Imagekitio
8282
)
8383
end
8484

85-
# Array of `AITags` associated with the image. If no `AITags` are set, it will be
86-
# null. These tags can be added using the `google-auto-tagging` or
87-
# `aws-auto-tagging` extensions.
85+
# An array of tags assigned to the uploaded file by auto tagging.
8886
sig do
8987
returns(
9088
T.nilable(
@@ -370,9 +368,7 @@ module Imagekitio
370368
).returns(T.attached_class)
371369
end
372370
def self.new(
373-
# Array of `AITags` associated with the image. If no `AITags` are set, it will be
374-
# null. These tags can be added using the `google-auto-tagging` or
375-
# `aws-auto-tagging` extensions.
371+
# An array of tags assigned to the uploaded file by auto tagging.
376372
ai_tags: nil,
377373
# The audio codec used in the video (only for video).
378374
audio_codec: nil,

0 commit comments

Comments
 (0)