@@ -47,8 +47,7 @@ export class Files extends APIResource {
4747 * const file = await client.files.update('fileId');
4848 * ```
4949 */
50- update ( fileID : string , params : FileUpdateParams , options ?: RequestOptions ) : APIPromise < FileUpdateResponse > {
51- const body = 'body' in params ? params . body : params ;
50+ update ( fileID : string , body : FileUpdateParams , options ?: RequestOptions ) : APIPromise < FileUpdateResponse > {
5251 return this . _client . patch ( path `/v1/files/${ fileID } /details` , { body, ...options } ) ;
5352 }
5453
@@ -608,7 +607,9 @@ export namespace Metadata {
608607/**
609608 * Schema for update file update request.
610609 */
611- export type UpdateFileRequest = UpdateFileRequest . UpdateFileDetails | unknown ;
610+ export type UpdateFileRequest =
611+ | UpdateFileRequest . UpdateFileDetails
612+ | UpdateFileRequest . ChangePublicationStatus ;
612613
613614export namespace UpdateFileRequest {
614615 export interface UpdateFileDetails {
@@ -662,6 +663,31 @@ export namespace UpdateFileRequest {
662663 */
663664 webhookUrl ?: string ;
664665 }
666+
667+ export interface ChangePublicationStatus {
668+ /**
669+ * Configure the publication status of a file and its versions.
670+ */
671+ publish ?: ChangePublicationStatus . Publish ;
672+ }
673+
674+ export namespace ChangePublicationStatus {
675+ /**
676+ * Configure the publication status of a file and its versions.
677+ */
678+ export interface Publish {
679+ /**
680+ * Set to `true` to publish the file. Set to `false` to unpublish the file.
681+ */
682+ isPublished : boolean ;
683+
684+ /**
685+ * Set to `true` to publish/unpublish all versions of the file. Set to `false` to
686+ * publish/unpublish only the current version of the file.
687+ */
688+ includeFileVersions ?: boolean ;
689+ }
690+ }
665691}
666692
667693/**
@@ -960,7 +986,28 @@ export declare namespace FileUpdateParams {
960986 }
961987
962988 export interface ChangePublicationStatus {
963- body : unknown ;
989+ /**
990+ * Configure the publication status of a file and its versions.
991+ */
992+ publish ?: ChangePublicationStatus . Publish ;
993+ }
994+
995+ export namespace ChangePublicationStatus {
996+ /**
997+ * Configure the publication status of a file and its versions.
998+ */
999+ export interface Publish {
1000+ /**
1001+ * Set to `true` to publish the file. Set to `false` to unpublish the file.
1002+ */
1003+ isPublished : boolean ;
1004+
1005+ /**
1006+ * Set to `true` to publish/unpublish all versions of the file. Set to `false` to
1007+ * publish/unpublish only the current version of the file.
1008+ */
1009+ includeFileVersions ?: boolean ;
1010+ }
9641011 }
9651012}
9661013
0 commit comments