@@ -48,8 +48,7 @@ export class Files extends APIResource {
4848 * const file = await client.files.update('fileId');
4949 * ```
5050 */
51- update ( fileID : string , params : FileUpdateParams , options ?: RequestOptions ) : APIPromise < FileUpdateResponse > {
52- const body = 'body' in params ? params . body : params ;
51+ update ( fileID : string , body : FileUpdateParams , options ?: RequestOptions ) : APIPromise < FileUpdateResponse > {
5352 return this . _client . patch ( path `/v1/files/${ fileID } /details` , { body, ...options } ) ;
5453 }
5554
@@ -611,7 +610,9 @@ export namespace Metadata {
611610/**
612611 * Schema for update file update request.
613612 */
614- export type UpdateFileRequest = UpdateFileRequest . UpdateFileDetails | unknown ;
613+ export type UpdateFileRequest =
614+ | UpdateFileRequest . UpdateFileDetails
615+ | UpdateFileRequest . ChangePublicationStatus ;
615616
616617export namespace UpdateFileRequest {
617618 export interface UpdateFileDetails {
@@ -665,6 +666,31 @@ export namespace UpdateFileRequest {
665666 */
666667 webhookUrl ?: string ;
667668 }
669+
670+ export interface ChangePublicationStatus {
671+ /**
672+ * Configure the publication status of a file and its versions.
673+ */
674+ publish ?: ChangePublicationStatus . Publish ;
675+ }
676+
677+ export namespace ChangePublicationStatus {
678+ /**
679+ * Configure the publication status of a file and its versions.
680+ */
681+ export interface Publish {
682+ /**
683+ * Set to `true` to publish the file. Set to `false` to unpublish the file.
684+ */
685+ isPublished : boolean ;
686+
687+ /**
688+ * Set to `true` to publish/unpublish all versions of the file. Set to `false` to
689+ * publish/unpublish only the current version of the file.
690+ */
691+ includeFileVersions ?: boolean ;
692+ }
693+ }
668694}
669695
670696/**
@@ -963,7 +989,28 @@ export declare namespace FileUpdateParams {
963989 }
964990
965991 export interface ChangePublicationStatus {
966- body : unknown ;
992+ /**
993+ * Configure the publication status of a file and its versions.
994+ */
995+ publish ?: ChangePublicationStatus . Publish ;
996+ }
997+
998+ export namespace ChangePublicationStatus {
999+ /**
1000+ * Configure the publication status of a file and its versions.
1001+ */
1002+ export interface Publish {
1003+ /**
1004+ * Set to `true` to publish the file. Set to `false` to unpublish the file.
1005+ */
1006+ isPublished : boolean ;
1007+
1008+ /**
1009+ * Set to `true` to publish/unpublish all versions of the file. Set to `false` to
1010+ * publish/unpublish only the current version of the file.
1011+ */
1012+ includeFileVersions ?: boolean ;
1013+ }
9671014 }
9681015}
9691016
0 commit comments