Skip to content

Commit 8296498

Browse files
fix(api): extract shared schemas to prevent Go webhook union breaking changes
1 parent fbffd21 commit 8296498

4 files changed

Lines changed: 30 additions & 20 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-d73a37dc3426586109bd153f02c6a605036b6a7396bba5173d013468c5291ce6.yml
3-
openapi_spec_hash: c193c6e557ff477481ec8d5ac8a0c96e
4-
config_hash: 32b155378f65c234d3abeb18519fb3cd
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: e3c2679d25f6235381dfb11962fbf3d9

src/resources/beta/v2/files.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ export class Files extends APIResource {
6666
*/
6767
export interface FileUploadResponse {
6868
/**
69-
* An array of tags assigned to the uploaded file by auto tagging.
69+
* Array of `AITags` associated with the image. If no `AITags` are set, it will be
70+
* null. These tags can be added using the `google-auto-tagging` or
71+
* `aws-auto-tagging` extensions.
7072
*/
7173
AITags?: Array<FileUploadResponse.AITag> | null;
7274

@@ -237,9 +239,8 @@ export namespace FileUploadResponse {
237239
name?: string;
238240

239241
/**
240-
* Array of `AITags` associated with the image. If no `AITags` are set, it will be
241-
* null. These tags can be added using the `google-auto-tagging` or
242-
* `aws-auto-tagging` extensions.
242+
* Source of the tag. Possible values are `google-auto-tagging` and
243+
* `aws-auto-tagging`.
243244
*/
244245
source?: string;
245246
}

src/resources/files/files.ts

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,9 @@ export class Files extends APIResource {
196196
*/
197197
export interface File {
198198
/**
199-
* An array of tags assigned to the file by auto tagging.
199+
* Array of `AITags` associated with the image. If no `AITags` are set, it will be
200+
* null. These tags can be added using the `google-auto-tagging` or
201+
* `aws-auto-tagging` extensions.
200202
*/
201203
AITags?: Array<File.AITag> | null;
202204

@@ -222,7 +224,11 @@ export interface File {
222224
customCoordinates?: string | null;
223225

224226
/**
225-
* An object with custom metadata for the file.
227+
* A key-value data associated with the asset. Use `responseField` in API request
228+
* to get `customMetadata` in the upload API response. Before setting any custom
229+
* metadata on an asset, you have to create the field using custom metadata fields
230+
* API. Send `customMetadata` in `responseFields` in API request to get the value
231+
* of this field.
226232
*/
227233
customMetadata?: { [key: string]: unknown };
228234

@@ -239,7 +245,8 @@ export interface File {
239245

240246
/**
241247
* Consolidated embedded metadata associated with the file. It includes exif, iptc,
242-
* and xmp data.
248+
* and xmp data. Send `embeddedMetadata` in `responseFields` in API request to get
249+
* embeddedMetadata in the upload API response.
243250
*/
244251
embeddedMetadata?: { [key: string]: unknown };
245252

@@ -336,7 +343,7 @@ export interface File {
336343
url?: string;
337344

338345
/**
339-
* An object with details of the file version.
346+
* An object containing the file or file version's `id` (versionId) and `name`.
340347
*/
341348
versionInfo?: File.VersionInfo;
342349

@@ -431,7 +438,7 @@ export namespace File {
431438
}
432439

433440
/**
434-
* An object with details of the file version.
441+
* An object containing the file or file version's `id` (versionId) and `name`.
435442
*/
436443
export interface VersionInfo {
437444
/**
@@ -835,7 +842,9 @@ export interface FileRenameResponse {
835842
*/
836843
export interface FileUploadResponse {
837844
/**
838-
* An array of tags assigned to the uploaded file by auto tagging.
845+
* Array of `AITags` associated with the image. If no `AITags` are set, it will be
846+
* null. These tags can be added using the `google-auto-tagging` or
847+
* `aws-auto-tagging` extensions.
839848
*/
840849
AITags?: Array<FileUploadResponse.AITag> | null;
841850

@@ -1006,9 +1015,8 @@ export namespace FileUploadResponse {
10061015
name?: string;
10071016

10081017
/**
1009-
* Array of `AITags` associated with the image. If no `AITags` are set, it will be
1010-
* null. These tags can be added using the `google-auto-tagging` or
1011-
* `aws-auto-tagging` extensions.
1018+
* Source of the tag. Possible values are `google-auto-tagging` and
1019+
* `aws-auto-tagging`.
10121020
*/
10131021
source?: string;
10141022
}

src/resources/webhooks.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,9 @@ export namespace UploadPreTransformSuccessEvent {
391391
*/
392392
export interface Data {
393393
/**
394-
* An array of tags assigned to the uploaded file by auto tagging.
394+
* Array of `AITags` associated with the image. If no `AITags` are set, it will be
395+
* null. These tags can be added using the `google-auto-tagging` or
396+
* `aws-auto-tagging` extensions.
395397
*/
396398
AITags?: Array<Data.AITag> | null;
397399

@@ -562,9 +564,8 @@ export namespace UploadPreTransformSuccessEvent {
562564
name?: string;
563565

564566
/**
565-
* Array of `AITags` associated with the image. If no `AITags` are set, it will be
566-
* null. These tags can be added using the `google-auto-tagging` or
567-
* `aws-auto-tagging` extensions.
567+
* Source of the tag. Possible values are `google-auto-tagging` and
568+
* `aws-auto-tagging`.
568569
*/
569570
source?: string;
570571
}

0 commit comments

Comments
 (0)