Skip to content

Commit 548adf5

Browse files
feat(api): extract UpdateFileDetailsRequest to model
1 parent 8a8d1c0 commit 548adf5

File tree

6 files changed

+90
-1
lines changed

6 files changed

+90
-1
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 42
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/imagekit-inc%2Fimagekit-bc7c0d27962b30c19c778656988e154b54696819389289f34420a5e5fdfbd3b8.yml
33
openapi_spec_hash: 1bfde02a63416c036e9545927f727459
4-
config_hash: a652d68098d82eaf611a49507fb4b831
4+
config_hash: b415c06a3b29485af4601beb94ae1aeb

api.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ Types:
4242
- <code><a href="./src/resources/files/files.ts">File</a></code>
4343
- <code><a href="./src/resources/files/files.ts">Folder</a></code>
4444
- <code><a href="./src/resources/files/files.ts">Metadata</a></code>
45+
- <code><a href="./src/resources/files/files.ts">UpdateFileDetailsRequest</a></code>
4546
- <code><a href="./src/resources/files/files.ts">FileUpdateResponse</a></code>
4647
- <code><a href="./src/resources/files/files.ts">FileCopyResponse</a></code>
4748
- <code><a href="./src/resources/files/files.ts">FileMoveResponse</a></code>

src/client.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ import {
5757
Files,
5858
Folder,
5959
Metadata,
60+
UpdateFileDetailsRequest,
6061
} from './resources/files/files';
6162
import {
6263
FolderCopyParams,
@@ -855,6 +856,7 @@ export declare namespace ImageKit {
855856
type File as File,
856857
type Folder as Folder,
857858
type Metadata as Metadata,
859+
type UpdateFileDetailsRequest as UpdateFileDetailsRequest,
858860
type FileUpdateResponse as FileUpdateResponse,
859861
type FileCopyResponse as FileCopyResponse,
860862
type FileMoveResponse as FileMoveResponse,

src/resources/files/files.ts

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -629,6 +629,89 @@ export namespace Metadata {
629629
}
630630
}
631631

632+
export type UpdateFileDetailsRequest =
633+
| UpdateFileDetailsRequest.UpdateFileDetails
634+
| UpdateFileDetailsRequest.ChangePublicationStatus;
635+
636+
export namespace UpdateFileDetailsRequest {
637+
export interface UpdateFileDetails {
638+
/**
639+
* Define an important area in the image in the format `x,y,width,height` e.g.
640+
* `10,10,100,100`. Send `null` to unset this value.
641+
*/
642+
customCoordinates?: string | null;
643+
644+
/**
645+
* A key-value data to be associated with the asset. To unset a key, send `null`
646+
* value for that key. Before setting any custom metadata on an asset you have to
647+
* create the field using custom metadata fields API.
648+
*/
649+
customMetadata?: { [key: string]: unknown };
650+
651+
/**
652+
* Optional text to describe the contents of the file.
653+
*/
654+
description?: string;
655+
656+
/**
657+
* Array of extensions to be applied to the asset. Each extension can be configured
658+
* with specific parameters based on the extension type.
659+
*/
660+
extensions?: Shared.Extensions;
661+
662+
/**
663+
* An array of AITags associated with the file that you want to remove, e.g.
664+
* `["car", "vehicle", "motorsports"]`.
665+
*
666+
* If you want to remove all AITags associated with the file, send a string -
667+
* "all".
668+
*
669+
* Note: The remove operation for `AITags` executes before any of the `extensions`
670+
* are processed.
671+
*/
672+
removeAITags?: Array<string> | 'all';
673+
674+
/**
675+
* An array of tags associated with the file, such as `["tag1", "tag2"]`. Send
676+
* `null` to unset all tags associated with the file.
677+
*/
678+
tags?: Array<string> | null;
679+
680+
/**
681+
* The final status of extensions after they have completed execution will be
682+
* delivered to this endpoint as a POST request.
683+
* [Learn more](/docs/api-reference/digital-asset-management-dam/managing-assets/update-file-details#webhook-payload-structure)
684+
* about the webhook payload structure.
685+
*/
686+
webhookUrl?: string;
687+
}
688+
689+
export interface ChangePublicationStatus {
690+
/**
691+
* Configure the publication status of a file and its versions.
692+
*/
693+
publish?: ChangePublicationStatus.Publish;
694+
}
695+
696+
export namespace ChangePublicationStatus {
697+
/**
698+
* Configure the publication status of a file and its versions.
699+
*/
700+
export interface Publish {
701+
/**
702+
* Set to `true` to publish the file. Set to `false` to unpublish the file.
703+
*/
704+
isPublished: boolean;
705+
706+
/**
707+
* Set to `true` to publish/unpublish all versions of the file. Set to `false` to
708+
* publish/unpublish only the current version of the file.
709+
*/
710+
includeFileVersions?: boolean;
711+
}
712+
}
713+
}
714+
632715
/**
633716
* Object containing details of a file or file version.
634717
*/
@@ -1328,6 +1411,7 @@ export declare namespace Files {
13281411
type File as File,
13291412
type Folder as Folder,
13301413
type Metadata as Metadata,
1414+
type UpdateFileDetailsRequest as UpdateFileDetailsRequest,
13311415
type FileUpdateResponse as FileUpdateResponse,
13321416
type FileCopyResponse as FileCopyResponse,
13331417
type FileMoveResponse as FileMoveResponse,

src/resources/files/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export {
1616
type File,
1717
type Folder,
1818
type Metadata,
19+
type UpdateFileDetailsRequest,
1920
type FileUpdateResponse,
2021
type FileCopyResponse,
2122
type FileMoveResponse,

src/resources/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export {
1919
type File,
2020
type Folder,
2121
type Metadata,
22+
type UpdateFileDetailsRequest,
2223
type FileUpdateResponse,
2324
type FileCopyResponse,
2425
type FileMoveResponse,

0 commit comments

Comments
 (0)