import * as _wix_sdk_types from '@wix/sdk-types'; import { QuerySpec, Query, NonNullablePaths } from '@wix/sdk-types'; interface FileDescriptor { /** * File ID. Generated when a file is uploaded to the Media Manager. * @readonly * @maxLength 1000 */ _id?: string; /** * File name as it appears in the Media Manager. * @maxLength 255 */ displayName?: string; /** * Static URL of the file. * @readonly * @format WEB_URL */ url?: string; /** * ID of the file's parent folder. * @maxLength 100 */ parentFolderId?: string | null; /** * File hash. * @readonly * @maxLength 100 */ hash?: string; /** * Size of the uploaded file in bytes. * @readonly * @format DECIMAL_VALUE * @decimalValue options { maxScale:0 } */ sizeInBytes?: string | null; /** * Whether the file is public or private. Learn more about [private files](https://dev.wix.com/docs/rest/assets/media/media-manager/files/private-files). * @readonly */ private?: boolean; /** * Media file type. * @readonly */ mediaType?: MediaTypeWithLiterals; /** * Media-type-specific metadata, such as an image's dimensions or a video's available resolutions. The relevant property is populated according to the file's `mediaType`. * @readonly */ media?: FileMedia; /** * Status of the file that was uploaded. * @readonly */ operationStatus?: OperationStatusWithLiterals; /** * URL where the file was uploaded from. * @readonly * @format WEB_URL */ sourceUrl?: string | null; /** * URL of the file's thumbnail. * @readonly * @format WEB_URL */ thumbnailUrl?: string | null; /** * Labels assigned to media files that describe and categorize them. Provided by the Wix user, or generated by [Google Vision API](https://cloud.google.com/vision/docs/drag-and-drop) for images. * @maxSize 100 * @maxLength 200 */ labels?: string[]; /** * Date and time the file was created. * @readonly */ _createdDate?: Date | null; /** * Date and time the file was updated. * @readonly */ _updatedDate?: Date | null; /** * The Wix site ID where the media file is stored. * @readonly * @maxLength 100 */ siteId?: string; /** * State of the file. * @readonly */ state?: StateWithLiterals; } declare enum MediaType { /** Unknown media type. */ UNKNOWN = "UNKNOWN", /** Image file, such as JPEG or PNG. */ IMAGE = "IMAGE", /** Video file. */ VIDEO = "VIDEO", /** Audio file. */ AUDIO = "AUDIO", /** Document file, such as PDF. */ DOCUMENT = "DOCUMENT", /** Vector image file, such as SVG. */ VECTOR = "VECTOR", /** Archive file, such as ZIP. */ ARCHIVE = "ARCHIVE", /** 3D model file. */ MODEL3D = "MODEL3D", /** Any other file type. */ OTHER = "OTHER" } /** @enumType */ type MediaTypeWithLiterals = MediaType | 'UNKNOWN' | 'IMAGE' | 'VIDEO' | 'AUDIO' | 'DOCUMENT' | 'VECTOR' | 'ARCHIVE' | 'MODEL3D' | 'OTHER'; interface FileMedia extends FileMediaMediaOneOf { /** Information about the image. */ image?: ImageMedia; /** Information about the video. */ video?: string; /** Information about the audio. */ audio?: AudioV2; /** Information about the document. */ document?: string; /** Information about the vector. */ vector?: ImageMedia; /** Information about the archive. */ archive?: Archive; /** Information about the 3D Model. */ model3d?: Model3D; } /** @oneof */ interface FileMediaMediaOneOf { /** Information about the image. */ image?: ImageMedia; /** Information about the video. */ video?: string; /** Information about the audio. */ audio?: AudioV2; /** Information about the document. */ document?: string; /** Information about the vector. */ vector?: ImageMedia; /** Information about the archive. */ archive?: Archive; /** Information about the 3D Model. */ model3d?: Model3D; } interface ImageMedia { /** Image data. */ image?: string; /** Image colors. */ colors?: Colors; /** * Information about faces in the image. Use to crop images without cutting out faces. * @maxSize 100 */ faces?: FaceRecognition[]; /** * Information about the image preview. * You can use this to display a preview for private images. */ previewImage?: string; /** * Optional, An AI generated description of the image * @readonly * @maxLength 300 */ caption?: string | null; } interface FocalPoint { /** X-coordinate of the focal point. */ x?: number; /** Y-coordinate of the focal point. */ y?: number; /** crop by height */ height?: number | null; /** crop by width */ width?: number | null; } interface Colors { /** Main color of the image. */ prominent?: Color; /** * Color palette of the image. * @maxSize 100 */ palette?: Color[]; } interface Color { /** * HEX color. * @format COLOR_HEX */ hex?: string | null; /** RGB color. */ rgb?: ColorRGB; } interface ColorRGB { /** * Red channel. * @max 255 */ r?: number | null; /** * Green channel. * @max 255 */ g?: number | null; /** * Blue channel. * @max 255 */ b?: number | null; } /** * Using this object you can crop images while centering on faces * ------------------------ * | | * | x,y | * | *-------- | * | | . . | | * | | | | height | * | | \ / | | * | | | | * | --------- | * | width | * | | * |______________________| */ interface FaceRecognition { /** The accuracy percentage of the face recognition. The likelihood that a face is detected. */ confidence?: number; /** Top left x pixel coordinate of the face. */ x?: number; /** Top left y pixel coordinate of the face. */ y?: number; /** Face pixel height. */ height?: number; /** Face pixel width. */ width?: number; } interface VideoResolution { /** Video URL. */ url?: string; /** Video height. */ height?: number; /** Video width. */ width?: number; /** * Video format * Possible values: ['144p.mp4' '144p.webm' '240p.mp4' '240p.webm' '360p.mp4' '360p.webm' '480p.mp4' '480p.webm' * '720p.mp4' '720p.webm' '1080p.mp4' '1080p.webm', 'hls' ] */ format?: string; } interface AudioV2 { /** * WixMedia ID. * @maxLength 200 */ _id?: string; /** * Audio formats available for this file. * @maxSize 100 */ assets?: string[]; /** * Audio bitrate. * @readonly */ bitrate?: number | null; /** * Audio format. * @readonly * @maxLength 100 */ format?: string | null; /** * Audio duration in seconds. * @readonly */ duration?: number | null; /** * Audio size in bytes. * @readonly * @format DECIMAL_VALUE * @decimalValue options { maxScale:0 } */ sizeInBytes?: string | null; } interface Archive { /** WixMedia ID. */ _id?: string; /** Archive URL. */ url?: string; /** * Archive URL expiration date (when relevant). * @readonly */ urlExpirationDate?: Date | null; /** * Archive size in bytes. * @format DECIMAL_VALUE */ sizeInBytes?: string | null; /** Archive filename. */ filename?: string | null; } interface Model3D { /** WixMedia 3D ID. */ _id?: string; /** 3D URL. */ url?: string; /** 3D thumbnail Image */ thumbnail?: string; /** 3D alt text. */ altText?: string | null; /** * 3D URL expiration date (when relevant). * @readonly */ urlExpirationDate?: Date | null; /** * 3D filename. * @readonly */ filename?: string | null; /** * 3D size in bytes. * @readonly * @format DECIMAL_VALUE */ sizeInBytes?: string | null; } interface OtherMedia { /** * WixMedia ID. for use with Site Media APIs only * @maxLength 200 */ _id?: string; /** * The media type of the file: 'package', 'raw' * @readonly * @maxLength 100 */ internalMediaType?: string | null; /** * size in bytes. Optional. * @readonly * @format DECIMAL_VALUE * @decimalValue options { gte:0, maxScale:0 } */ sizeInBytes?: string | null; /** * The file URL. * @format WEB_URL */ url?: string; } interface FontMedia { /** * WixMedia ID. for use with Site Media APIs only * @maxLength 200 */ _id?: string | null; /** * size in bytes. Optional. * @readonly * @format DECIMAL_VALUE * @decimalValue options { gte:0, maxScale:0 } */ sizeInBytes?: string | null; /** * The format of the font asset. ttf, woff, woff2 * @maxLength 200 */ format?: string | null; /** * The font family name. * @maxLength 100 */ family?: string | null; /** * The font name * @maxLength 100 */ fontName?: string | null; /** * Font formats available for this file. * @maxSize 5 */ assets?: FontAsset[]; } interface FontAsset { /** * Keys for downloading different assets of a file. * Default: `src`, key representing the original file's format and quality. * @maxLength 100 */ assetKey?: string | null; /** * The URL of the font asset. * @maxLength 200 */ url?: string | null; /** * The format of the font asset. ttf, woff, woff2 * @maxLength 200 */ format?: string | null; } declare enum OperationStatus { /** The file failed to upload, for example, during media post processing. */ FAILED = "FAILED", /** The file uploaded, finished all processing, and is ready for use. */ READY = "READY", /** The file is processing and the URLs are not yet available. This response is returned when importing a file. */ PENDING = "PENDING" } /** @enumType */ type OperationStatusWithLiterals = OperationStatus | 'FAILED' | 'READY' | 'PENDING'; declare enum State { /** File is ready for consumption */ OK = "OK", /** Deleted file */ DELETED = "DELETED" } /** @enumType */ type StateWithLiterals = State | 'OK' | 'DELETED'; declare enum Namespace { /** No namespaces */ NO_NAMESPACE = "NO_NAMESPACE", /** Custom namespace */ OTHERS = "OTHERS", /** Wix videos */ WIX_VIDEO = "WIX_VIDEO", /** Wix music */ WIX_MUSIC = "WIX_MUSIC", /** Albums and art store */ ALBUMS_AND_ART_STORE = "ALBUMS_AND_ART_STORE", /** Wix ecom */ WIX_ECOM = "WIX_ECOM", /** Photo share */ PHOTO_SHARE_APP = "PHOTO_SHARE_APP", /** Sharing app */ SHARING_APP = "SHARING_APP", /** Chat (engage) */ CHAT = "CHAT", /** Logo builder */ LOGO_BUILDER = "LOGO_BUILDER", /** Albums old namespace */ ALBUMS_OLD = "ALBUMS_OLD", /** Mobile chat */ CHAT_MOBILE = "CHAT_MOBILE", /** Wix Forms */ WIX_FORMS = "WIX_FORMS", /** Wix legends */ WIX_LEGENDS = "WIX_LEGENDS", /** Portfolio */ PORTFOLIO = "PORTFOLIO", /** LOGOS */ LOGOS = "LOGOS", /** Wix Stores buyers */ WIX_STORES_BUYERS = "WIX_STORES_BUYERS" } /** @enumType */ type NamespaceWithLiterals = Namespace | 'NO_NAMESPACE' | 'OTHERS' | 'WIX_VIDEO' | 'WIX_MUSIC' | 'ALBUMS_AND_ART_STORE' | 'WIX_ECOM' | 'PHOTO_SHARE_APP' | 'SHARING_APP' | 'CHAT' | 'LOGO_BUILDER' | 'ALBUMS_OLD' | 'CHAT_MOBILE' | 'WIX_FORMS' | 'WIX_LEGENDS' | 'PORTFOLIO' | 'LOGOS' | 'WIX_STORES_BUYERS'; interface IdentityInfo { /** The type of the user that uploaded the file */ identityType?: IdentityTypeWithLiterals; /** * User Id. empty when UNKNOWN * @format GUID */ identityId?: string | null; } declare enum IdentityType { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** @enumType */ type IdentityTypeWithLiterals = IdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP'; /** * Internal-only metadata preserved from the raw PM contract that has no * representation in the domain model. Populated during toDomain and used * by fromDomain to reconstruct a lossless raw PM file. */ interface FileAdditionalProperties extends FileAdditionalPropertiesMediaAdditionalPropertiesOneOf { /** Set when the file is an audio file; preserves PM-specific audio fields. */ audio?: AudioAdditionalProperties; /** Set when the file is a video file; preserves PM-specific video fields. */ video?: VideoAdditionalProperties; /** Set when the file is a font file; preserves PM-specific font fields. */ font?: FontAdditionalProperties; /** Set when the file is a document file; preserves PM-specific document fields. */ document?: DocumentAdditionalProperties; /** Set when the file is a 3D model file; preserves PM-specific model3d fields. */ model3d?: Model3dAdditionalProperties; /** Set when the file is an image file; preserves PM-specific image fields. */ image?: ImageAdditionalProperties; } /** @oneof */ interface FileAdditionalPropertiesMediaAdditionalPropertiesOneOf { /** Set when the file is an audio file; preserves PM-specific audio fields. */ audio?: AudioAdditionalProperties; /** Set when the file is a video file; preserves PM-specific video fields. */ video?: VideoAdditionalProperties; /** Set when the file is a font file; preserves PM-specific font fields. */ font?: FontAdditionalProperties; /** Set when the file is a document file; preserves PM-specific document fields. */ document?: DocumentAdditionalProperties; /** Set when the file is a 3D model file; preserves PM-specific model3d fields. */ model3d?: Model3dAdditionalProperties; /** Set when the file is an image file; preserves PM-specific image fields. */ image?: ImageAdditionalProperties; } interface AudioAdditionalProperties { /** From PmAudioInfo.file_input.sample_rate, in Hz (e.g. 44100). */ sampleRate?: number | null; /** From PmAudioInfo.file_input.channels (e.g. 2 for stereo). */ channels?: number | null; /** * Parallel array to AudioV2.assets, same sort order. * @maxSize 10 */ assets?: AudioAssetAdditionalProperties[]; } interface AudioAssetAdditionalProperties { /** * From PmAudioInfo.file_output.audio[].tag (e.g. "high"). * @maxLength 100 */ tag?: string | null; /** From PmAudioInfo.file_output.audio[].audio_bitrate, in bits per second. */ audioBitrate?: number | null; /** * From PmAudioInfo.file_output.audio[].status (e.g. "READY"). * @maxLength 30 */ status?: string | null; /** * From PmAudioInfo.file_output.audio[].url (only populated for secure assets where PM omits the URL). * @format WEB_URL */ url?: string | null; } interface VideoAdditionalProperties { /** * From PmVideoInfo.file_input.fps (e.g. "25/1"). * @maxLength 50 */ fps?: string | null; /** From PmVideoInfo.file_input.video_bitrate, in bits per second. */ videoBitrate?: number | null; /** From PmVideoInfo.file_input.rotation, in degrees (e.g. 0, 90, 180, 270). */ rotation?: number | null; /** * From PmVideoInfo.file_input.display_aspect_ratio (e.g. "16:9"). * @maxLength 10 */ displayAspectRatio?: string | null; /** From PmVideoInfo.file_input.audio_bitrate, in bits per second. */ audioBitrate?: number | null; /** * From PmVideoInfo.file_input.sample_aspect_ration (e.g. "1:1"). * @maxLength 10 */ sampleAspectRatio?: string | null; /** * Keyed by VideoResolution.assetKey (e.g. "720p.mp4", "storyboard-00001.jpg"). * Covers both file_output.video[] and file_output.storyboard[] on the raw side. */ resolutions?: Record; /** * Parallel array to VideoV2.posters, same sort order. * @maxSize 10 */ posters?: ImageOutputAdditionalProperties[]; } interface VideoResolutionAdditionalProperties { /** From PmVideoInfo.file_output.video[].audio_bitrate or storyboard[].audio_bitrate, in bits per second. */ audioBitrate?: number | null; /** * From PmVideoInfo.file_output.video[].display_aspect_ratio or storyboard[].display_aspect_ratio (e.g. "16:9"). * @maxLength 10 */ displayAspectRatio?: string | null; /** * From PmVideoInfo.file_output.video[].fps or storyboard[].fps (e.g. "25/1"). * @maxLength 50 */ fps?: string | null; /** * From PmVideoInfo.file_output.video[].status or storyboard[].status (e.g. "READY"). * @maxLength 20 */ status?: string | null; /** * From PmVideoInfo.file_output.video[].tag or storyboard[].tag (e.g. "HD"). * @maxLength 100 */ tag?: string | null; /** From PmVideoInfo.file_output.video[].video_bitrate or storyboard[].video_bitrate, in bits per second. */ videoBitrate?: number | null; } /** * Shared additional properties for any ImageOutput in the raw PM contract * (video poster outputs and preview outputs for document/model3d/image files). */ interface ImageOutputAdditionalProperties { /** * From ImageOutput.key (e.g. "poster.0", "image.preview"). * @maxLength 100 */ key?: string | null; /** From ImageOutput.secure. */ secure?: boolean | null; /** * From ImageOutput.status (e.g. "READY"). * @maxLength 30 */ status?: string | null; /** * From ImageOutput.format (e.g. "jpg", "png"). Absent when original raw had no format field. * @maxLength 10 */ format?: string | null; /** * From ImageOutput.name. Present for model3d and some document previews; absent for video posters. * @maxLength 200 */ name?: string | null; } interface FontAdditionalProperties { /** * Parallel array to FontMedia.assets, same sort order. * @maxSize 10 */ assets?: FontAssetAdditionalProperties[]; } interface FontAssetAdditionalProperties { /** * From PmFontInfo.file_output.font[].status (e.g. "READY"). * @maxLength 30 */ status?: string | null; } interface DocumentAdditionalProperties { /** From PmDocumentInfo.file_output.image[] preview entry; preserves raw PM image-output metadata. */ preview?: ImageOutputAdditionalProperties; } interface Model3dAdditionalProperties { /** From PmModel3dInfo.file_output.image[] preview entry; preserves raw PM image-output metadata. */ preview?: ImageOutputAdditionalProperties; } interface ImageAdditionalProperties { /** From PmImageInfo.file_output.image[] preview entry; preserves raw PM image-output metadata. */ preview?: ImageOutputAdditionalProperties; } /** * Applications known to Private Media, spanning both its own SiteAppAuth apps and Dev Center * apps. Private Media stores a raw application id that is a GUID for the latter and an internal * non-GUID id for the former, so it is exposed resolved to a name rather than as an id. */ declare enum Application { UNKNOWN_APPLICATION = "UNKNOWN_APPLICATION", ASCEND = "ASCEND", BLOG_IMPORTER = "BLOG_IMPORTER", BLOG_IMPORTER_NEW = "BLOG_IMPORTER_NEW", BRANDING = "BRANDING", CHAT = "CHAT", CHAT_TEST = "CHAT_TEST", COMMUNITIES = "COMMUNITIES", COMMUNITIES_NEW = "COMMUNITIES_NEW", CONTACTS = "CONTACTS", DEVZAI = "DEVZAI", DGS = "DGS", DGS_TEST = "DGS_TEST", DS_OLSH = "DS_OLSH", ENTERPRISE = "ENTERPRISE", ENTERPRISE_PUBLIC_MEDIA = "ENTERPRISE_PUBLIC_MEDIA", EVENTS_LIVE_VIDEO = "EVENTS_LIVE_VIDEO", FILE_SHARING_ONE_APP = "FILE_SHARING_ONE_APP", GET_FEEDBACK = "GET_FEEDBACK", HACKATON_2022_YOAV = "HACKATON_2022_YOAV", HTML_EDITOR_GDPR = "HTML_EDITOR_GDPR", LIGHTROOM_PLUGIN = "LIGHTROOM_PLUGIN", MARKETING_CAMPAIGN_CREATIVE_MORNINGS = "MARKETING_CAMPAIGN_CREATIVE_MORNINGS", MEDIA_FOR_YOU_BO = "MEDIA_FOR_YOU_BO", MEMBERS_AREA = "MEMBERS_AREA", MOBILE_APPS_SERVER = "MOBILE_APPS_SERVER", MULTICHANNEL_CAMPAIGNS = "MULTICHANNEL_CAMPAIGNS", PHOTO_ALBUMS = "PHOTO_ALBUMS", PHOTO_STUDIO = "PHOTO_STUDIO", PIX_UNSPLASH = "PIX_UNSPLASH", PLATFORMIZED_SITE_MEDIA = "PLATFORMIZED_SITE_MEDIA", PMADMIN = "PMADMIN", PMM_ADMIN = "PMM_ADMIN", PRODUCT_CLASSIFIER = "PRODUCT_CLASSIFIER", PRO_GALLERY = "PRO_GALLERY", PRO_GALLERY_EDITOR_WEBAPP = "PRO_GALLERY_EDITOR_WEBAPP", REST = "REST", REVIEWS_WIDGET = "REVIEWS_WIDGET", ROUTER_SERVER = "ROUTER_SERVER", SITE_FATHER = "SITE_FATHER", STORES_POS = "STORES_POS", VIDEO_AS_A_FUNNEL = "VIDEO_AS_A_FUNNEL", WIXCODE = "WIXCODE", WIXMUSICWIZARD = "WIXMUSICWIZARD", WIXPIX = "WIXPIX", WIXPUBLICMEDIA = "WIXPUBLICMEDIA", WIXSTORES_APP = "WIXSTORES_APP", WIXWIZ = "WIXWIZ", WIX_CHALLENGES = "WIX_CHALLENGES", WIX_CODE_EDITOR = "WIX_CODE_EDITOR", WIX_CODE_VIEWER = "WIX_CODE_VIEWER", WIX_ECOMMERCE_CATALOG_WEB = "WIX_ECOMMERCE_CATALOG_WEB", WIX_FORM_BUILDER_WEB = "WIX_FORM_BUILDER_WEB", WIX_FORUM = "WIX_FORUM", WIX_GROUPS_1 = "WIX_GROUPS_1", WIX_GROUPS_2 = "WIX_GROUPS_2", WIX_MEDIA_EDM = "WIX_MEDIA_EDM", WIX_MIGRATION_TOOL = "WIX_MIGRATION_TOOL", WIX_MIGRATION_TOOL_1 = "WIX_MIGRATION_TOOL_1", WIX_NADLAN = "WIX_NADLAN", WIX_ONEAPP_MEMBERS = "WIX_ONEAPP_MEMBERS", WIX_ONE_APP = "WIX_ONE_APP", WIX_RICH_CONTENT = "WIX_RICH_CONTENT", WIX_SITES_MIGRATOR = "WIX_SITES_MIGRATOR", WIX_STORES = "WIX_STORES", WIX_VIDEO = "WIX_VIDEO", WIX_ZAPIER = "WIX_ZAPIER", HARMONY = "HARMONY", CLOUD_SITE_EXTENSION = "CLOUD_SITE_EXTENSION" } /** @enumType */ type ApplicationWithLiterals = Application | 'UNKNOWN_APPLICATION' | 'ASCEND' | 'BLOG_IMPORTER' | 'BLOG_IMPORTER_NEW' | 'BRANDING' | 'CHAT' | 'CHAT_TEST' | 'COMMUNITIES' | 'COMMUNITIES_NEW' | 'CONTACTS' | 'DEVZAI' | 'DGS' | 'DGS_TEST' | 'DS_OLSH' | 'ENTERPRISE' | 'ENTERPRISE_PUBLIC_MEDIA' | 'EVENTS_LIVE_VIDEO' | 'FILE_SHARING_ONE_APP' | 'GET_FEEDBACK' | 'HACKATON_2022_YOAV' | 'HTML_EDITOR_GDPR' | 'LIGHTROOM_PLUGIN' | 'MARKETING_CAMPAIGN_CREATIVE_MORNINGS' | 'MEDIA_FOR_YOU_BO' | 'MEMBERS_AREA' | 'MOBILE_APPS_SERVER' | 'MULTICHANNEL_CAMPAIGNS' | 'PHOTO_ALBUMS' | 'PHOTO_STUDIO' | 'PIX_UNSPLASH' | 'PLATFORMIZED_SITE_MEDIA' | 'PMADMIN' | 'PMM_ADMIN' | 'PRODUCT_CLASSIFIER' | 'PRO_GALLERY' | 'PRO_GALLERY_EDITOR_WEBAPP' | 'REST' | 'REVIEWS_WIDGET' | 'ROUTER_SERVER' | 'SITE_FATHER' | 'STORES_POS' | 'VIDEO_AS_A_FUNNEL' | 'WIXCODE' | 'WIXMUSICWIZARD' | 'WIXPIX' | 'WIXPUBLICMEDIA' | 'WIXSTORES_APP' | 'WIXWIZ' | 'WIX_CHALLENGES' | 'WIX_CODE_EDITOR' | 'WIX_CODE_VIEWER' | 'WIX_ECOMMERCE_CATALOG_WEB' | 'WIX_FORM_BUILDER_WEB' | 'WIX_FORUM' | 'WIX_GROUPS_1' | 'WIX_GROUPS_2' | 'WIX_MEDIA_EDM' | 'WIX_MIGRATION_TOOL' | 'WIX_MIGRATION_TOOL_1' | 'WIX_NADLAN' | 'WIX_ONEAPP_MEMBERS' | 'WIX_ONE_APP' | 'WIX_RICH_CONTENT' | 'WIX_SITES_MIGRATOR' | 'WIX_STORES' | 'WIX_VIDEO' | 'WIX_ZAPIER' | 'HARMONY' | 'CLOUD_SITE_EXTENSION'; interface DraftFilePublished { /** The file after it was published */ file?: FileDescriptor; /** The namespace the file was published to */ namespace?: NamespaceWithLiterals; } interface FileFailed { /** External information specified in the file import or upload. */ externalInfo?: ExternalInfo; /** Error information. */ error?: ApplicationError; } interface ExternalInfo { /** * Identifier of the app or service that initiated the upload or import, for example your app's ID. Returned in the resulting File Ready and File Failed events, and can be used to filter events by their origin. * @maxLength 1000 */ origin?: string; /** * IDs from your own system, for example the IDs of the entities the file belongs to. Returned in the resulting File Ready and File Failed events, and can be used to correlate an event with the call that triggered it. * @maxSize 30 * @maxLength 4000 */ externalIds?: string[]; } interface ApplicationError { /** Error code. */ code?: string; /** Description of the error. */ description?: string; /** Data related to the error. */ data?: Record | null; } interface FileReady { /** File entity that is ready with full information. */ file?: FileDescriptor; /** External information specified in the file import or upload. */ externalInfo?: ExternalInfo; /** * Whether the event was triggered by restoring a file from the Media Manager's trash bin. * * Default: `false` */ triggeredByUndelete?: boolean; } interface BulkAnnotateImagesRequest { /** * The file ids to run detection on * @minSize 1 * @maxSize 10 * @maxLength 1000 */ fileIds?: string[]; /** * A list of detections types to fill for the image * @minSize 1 * @maxSize 10 */ annotationTypes?: ImageAnnotationTypeWithLiterals[]; /** When true the endpoint will detect listed information even if the image has this information */ overwrite?: boolean | null; /** Should the response return the item following the operation */ returnEntity?: boolean; /** Client-provided context to guide AI-based annotations */ annotationContext?: AnnotationContext; } declare enum ImageAnnotationType { UNKNOWN_IMAGE_ANNOTATION_TYPE = "UNKNOWN_IMAGE_ANNOTATION_TYPE", CONTAINS_TEXT = "CONTAINS_TEXT", IS_ANIMATED = "IS_ANIMATED", FACES = "FACES", LABELS = "LABELS", COLORS = "COLORS", CAPTION = "CAPTION", /** AI-model-extracted colors */ COLOR_V2 = "COLOR_V2", /** Predefined site-section category, classified by the AI model */ SITE_SECTION_CATEGORY = "SITE_SECTION_CATEGORY" } /** @enumType */ type ImageAnnotationTypeWithLiterals = ImageAnnotationType | 'UNKNOWN_IMAGE_ANNOTATION_TYPE' | 'CONTAINS_TEXT' | 'IS_ANIMATED' | 'FACES' | 'LABELS' | 'COLORS' | 'CAPTION' | 'COLOR_V2' | 'SITE_SECTION_CATEGORY'; interface AnnotationContext { /** * The context the user provided to the client system (e.g. the intent supplied * when the image was uploaded). Forwarded to the AI prompt as `user_context`, not persisted. * @maxLength 4000 */ userContext?: string | null; } interface BulkAnnotateImagesResponse { /** Results of individual items */ results?: BulkAnnotateImageResult[]; /** Metadata of the operation */ bulkActionMetadata?: BulkActionMetadata; } interface BulkAnnotateImageResult { /** Item metadata */ itemMetadata?: ItemMetadata; /** * The item following the operation * Only returned if operation was successful and if returnEntity flag was on */ item?: FileDescriptor; } interface ItemMetadata { /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */ _id?: string | null; /** Index of the item within the request array. Allows for correlation between request and response items. */ originalIndex?: number; /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */ success?: boolean; /** Details about the error in case of failure. */ error?: ApplicationError; } interface BulkActionMetadata { /** Number of items that were successfully processed. */ totalSuccesses?: number; /** Number of items that couldn't be processed. */ totalFailures?: number; /** Number of failures without details because detailed failure threshold was exceeded. */ undetailedFailures?: number; } interface GenerateAnimatedVectorRequest { /** * Start file id * @maxLength 1000 */ startVectorId?: string; /** * End file id * @maxLength 1000 */ endVectorId?: string; /** * Result file name as it appears in the Media Manager. * @maxLength 255 */ displayName?: string; } interface GenerateAnimatedVectorResponse { /** Information about the result file. */ file?: FileDescriptor; } interface GenerateFilesDownloadUrlRequest { /** * IDs of the files to download. * * You can also specify the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`. * Learn more [about the file ID parameter](https://dev.wix.com/docs/api-reference/assets/media/media-manager/files/file-id). * @minSize 1 * @maxSize 1000 * @maxLength 1000 */ fileIds: string[]; } interface GenerateFilesDownloadUrlResponse { /** * URL for downloading the compressed file containing the specified files in the Media Manager. * @format WEB_URL */ downloadUrl?: string; } interface GenerateFileDownloadUrlRequest { /** * File ID. * * You can also specify the file's Wix media URL. For example, `wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032`. * Learn more [about the file ID parameter](https://dev.wix.com/docs/api-reference/assets/media/media-manager/files/file-id). * @maxLength 1000 */ fileId: string; /** * Temporary file name used to identify the file type. For example, a file named "myFile.jpeg" identifies as an "image/jpeg" file type.
* * **Note:** The name that appears in the Media Manager is taken from the `filename` parameter in the Generate File Upload Url call. * @maxLength 100 */ downloadFileName?: string | null; /** * Time in minutes until the download URL expires.
* Default: `600` (10 hours).
* Limit: `525600` (1 year). * @min 1 */ expirationInMinutes?: number | null; /** * The redirect URL for when the temporary download URL with a token expires.
* Default: A 403 Forbidden response page. * @format WEB_URL */ expirationRedirectUrl?: string | null; /** * Keys for downloading different assets (format and quality) of a file. * Default: `src`, key representing the original file's format and quality. * @maxSize 100 * @maxLength 100 */ assetKeys?: string[] | null; /** * Whether the link downloads the file or opens the file in the browser. * * - `ATTACHMENT`: The link downloads the file. * - `INLINE`: The link opens the file in the browser. * * Default: `ATTACHMENT` */ contentDisposition?: ContentDispositionWithLiterals; } declare enum ContentDisposition { /** Using the link in the browser will download the file */ ATTACHMENT = "ATTACHMENT", /** Using the link in the browser will open the file in the browser */ INLINE = "INLINE" } /** @enumType */ type ContentDispositionWithLiterals = ContentDisposition | 'ATTACHMENT' | 'INLINE'; interface GenerateFileDownloadUrlResponse { /** * URL for downloading a specific file in the Media Manager. * @maxSize 100 */ downloadUrls?: DownloadUrl[]; } interface DownloadUrl { /** * The file download URL. * @format WEB_URL */ url?: string; /** * Key for downloading a different asset (format and quality) of a file. * Default: `src`, key representing the original file's format and quality. * @maxLength 100 */ assetKey?: string; } interface ServiceError { /** * Error codes are groups of related errors * The error code can be used to provide additional details to wix support while debugging service errors * @maxLength 200 */ internalCode?: string | null; /** Debugging information, http status code returned from wix media internal API */ internalHttpStatusCode?: number | null; /** * Optional Debugging information, error key will represent the error "family" returned from wix media internal API * @maxLength 200 */ internalKey?: string | null; } interface GetFileDescriptorRequest { /** * File ID. * * You can also specify the file's Wix media URL. For example, `wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032`. * Learn more [about the file ID parameter](https://dev.wix.com/docs/api-reference/assets/media/media-manager/files/file-id). * * If you are working in REST, note that you must encode the Wix media URL to specify it as a query param because it contains special characters. For example, `wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032` becomes `wix%3Aimage%3A%2F%2Fv1%2F0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg%2Fleon.jpg%23originWidth%3D3024%26originHeight%3D4032`. * @maxLength 1000 */ fileId: string; } interface GetFileDescriptorResponse { /** Information about the file. */ file?: FileDescriptor; } interface GetFileDescriptorsRequest { /** * File IDs. * * You can also specify the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`. * Learn more [about the file ID parameter](https://dev.wix.com/docs/api-reference/assets/media/media-manager/files/file-id). * @minSize 1 * @maxSize 100 * @maxLength 1000 */ fileIds: string[]; } interface GetFileDescriptorsResponse { /** * Information about the requested files. * @maxSize 100 */ files?: FileDescriptor[]; } interface GetSiteFileDescriptorsRequest { /** * File IDs. * * You can also specify the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`. * Learn more about the [file ID parameter](https://dev.wix.com/docs/api-reference/assets/media/media-manager/files/file-id). * @minSize 1 * @maxSize 1500 * @maxLength 1000 */ fileIds?: string[]; } interface GetSiteFileDescriptorsResponse { /** * Information about the requested files. * @maxSize 1500 */ files?: FileDescriptor[]; /** * File ids that could not be found * @maxSize 1500 * @maxLength 1000 */ missingFileIds?: string[]; } interface UpdateFileDescriptorRequest { /** The file to update. */ file: FileDescriptor; } interface UpdateFileDescriptorResponse { /** Information about the updated file. */ file?: FileDescriptor; } interface UnsupportedRequestValueError { /** * Optional A list of allowed values * @maxSize 100 * @maxLength 200 */ allowedValues?: string[]; /** * The unsupported value send in the request * @maxLength 200 */ requestValue?: string; } interface GenerateFileUploadUrlRequest { /** * File mime type. * @maxLength 100 */ mimeType: string | null; /** * Temporary file name used to identify the file type. For example, a file named "myFile.jpeg" identifies as an "image/jpeg" file type. *
**Notes:** * The file name is truncated to 255 characters if longer. * @maxLength 1000 */ fileName?: string | null; /** * File size in bytes. * @readonly * @format DECIMAL_VALUE * @decimalValue options { gte:0, maxScale:0 } */ sizeInBytes?: string | null; /** * ID of the file's parent folder.
* This folder is the path root for the `filePath`.
* Default: `media-root`. * @maxLength 100 */ parentFolderId?: string | null; /** Whether the file will be public or private. Learn more [about private files](https://dev.wix.com/docs/api-reference/assets/media/media-manager/files/private-files). */ private?: boolean | null; /** * Labels assigned to media files that describe and categorize them. Provided by the Wix user, or generated by [Google Vision API](https://cloud.google.com/vision/docs/drag-and-drop) for images. * @maxSize 50 * @maxLength 200 */ labels?: string[] | null; /** A place to map an external entity to an uploaded file in the Wix Media Manager. */ externalInfo?: ExternalInfo; /** * Path to the folder where the file will be stored. * For example, `/videos/2024/december`.
* If `parentFolderId` is defined, the parent folder is used as the path root. Otherwise, the root is `media-root`. * The folders in the path will be created if they don't already exist.
* @maxLength 100 */ filePath?: string | null; } interface ImageAnnotationConfigurations { /** Whether to skip detection for the image */ skipDetection?: boolean | null; /** * A list of detections types to fill for the image * If specified at least one valid annotation type should be provided * Default will be all detections * @maxSize 10 */ annotationTypes?: ImageAnnotationTypeWithLiterals[]; /** Client-provided context to guide AI-based annotations */ annotationContext?: AnnotationContext; } interface GenerateFileUploadUrlResponse { /** * The URL for uploading a file to the Media Manager. * @format WEB_URL */ uploadUrl?: string; } interface SiteQuotaExceededError { /** * Error codes are groups of related errors * The error code can be used to provide additional details to wix support while debugging service errors * @maxLength 200 */ internalCode?: string | null; /** Debugging information, http status code returned from wix media internal API */ internalHttpStatusCode?: number | null; /** * Optional Debugging information, error key will represent the error "family" returned from wix media internal API * @maxLength 200 */ internalKey?: string | null; /** The quota details */ quota?: TotalQuota; } interface TotalQuota { /** Storage quota in bytes. */ storage?: string | null; /** Premium plans that determine the storage quota. */ plans?: Plans; /** Time for which the quota is relevant - When the plans were retrieved from premium */ timestamp?: Date | null; } interface Plans { /** Current premium plan details. */ premium?: Plan; /** * URL for upgrading the storage quota. * @format WEB_URL */ upgradeUrl?: string; } interface Plan { /** * Plan ID. * @readonly * @format GUID */ _id?: string; /** Plan name. */ name?: string; /** Date and time when the plan was created. */ createdAt?: Date | null; /** Date and time when the plan expires. */ expiresAt?: Date | null; } interface GenerateFileResumableUploadUrlRequest { /** * File mime type. * @maxLength 100 */ mimeType: string | null; /** * Temporary file name used to identify the file type. For example, a file named "myFile.jpeg" identifies as an "image/jpeg" file type. *
**Notes:** * The file name is truncated to 255 characters if longer. * @maxLength 1000 */ fileName?: string | null; /** * File size in bytes. * @readonly * @format DECIMAL_VALUE * @decimalValue options { gte:0, maxScale:0 } */ sizeInBytes?: string | null; /** * ID of the file's parent folder.
* This folder is the path root for the `filePath`.
* Default: `media-root`. * @maxLength 100 */ parentFolderId?: string | null; /** Whether the file will be public or private. Learn more [about private files](https://dev.wix.com/docs/api-reference/assets/media/media-manager/files/private-files). */ private?: boolean | null; /** * Labels assigned to media files that describe and categorize them. Provided by the Wix user, or generated by [Google Vision API](https://cloud.google.com/vision/docs/drag-and-drop) for images. * @maxSize 500 * @maxLength 200 */ labels?: string[] | null; /** The upload protocol to use for implementing the resumable upload. */ uploadProtocol?: UploadProtocolWithLiterals; /** * Path to the folder where the file will be stored. * For example, `/videos/2024/december`.
* If `parentFolderId` is defined, the parent folder is used as the path root. Otherwise, the root is `media-root`. * The folders in the path will be created if they don't already exist.
* @maxLength 100 */ filePath?: string | null; } declare enum UploadProtocol { /** [TUS](https://tus.io/) open protocol for resumable uploads. */ TUS = "TUS" } /** @enumType */ type UploadProtocolWithLiterals = UploadProtocol | 'TUS'; interface GenerateFileResumableUploadUrlResponse { /** The upload protocol to use for implementing the resumable upload. */ uploadProtocol?: UploadProtocolWithLiterals; /** * The URL for uploading a file to the Media Manager. * @format WEB_URL */ uploadUrl?: string; /** * Single-use upload token. * @maxLength 2000 */ uploadToken?: string; } interface ImportFileRequest { /** * Publicly accessible external file URL. * @format WEB_URL * @minLength 2 */ url: string; /** * Media type of the file to import. * excluding: OTHER media type */ mediaType?: MediaTypeWithLiterals; /** * File name that appears in the Media Manager. * The file name is truncated to 255 characters if longer. * @maxLength 1000 */ displayName?: string | null; /** * ID of the file's parent folder.
* This folder is the path root for the `filePath`.
* Default: `media-root`. * @maxLength 100 */ parentFolderId?: string | null; /** Whether the file will be public or private. Learn more [about private files](https://dev.wix.com/docs/api-reference/assets/media/media-manager/files/private-files). */ private?: boolean | null; /** * Labels assigned to media files that describe and categorize them. Provided by the Wix user, or generated by [Google Vision API](https://cloud.google.com/vision/docs/drag-and-drop) for images. * @maxSize 500 * @maxLength 200 */ labels?: string[] | null; /** * File mime type. * @maxLength 100 */ mimeType?: string; /** Information sent to the File Ready and File Failed events. See [Importing Files](https://dev.wix.com/docs/api-reference/assets/media/media-manager/files/importing-files) to learn more. */ externalInfo?: ExternalInfo; /** Optional parameters that should be sent with the external URL. */ urlParams?: Record | null; /** Optional headers that should be sent with the external URL. */ urlHeaders?: Record | null; /** * Path to the folder where the file will be stored. * For example, `/videos/2024/december`.
* If `parentFolderId` is defined, the parent folder is used as the path root. Otherwise, the root is `media-root`. * The folders in the path will be created if they don't already exist.
* @maxLength 100 */ filePath?: string | null; } interface ImportFileResponse { /** Information about the imported file. */ file?: FileDescriptor; } interface SyncImportFileRequest { /** The import request */ importRequest?: ImportFileRequest; } interface SyncImportFileResponse { /** Information about the imported file. */ file?: FileDescriptor; } interface SyncImportFileDescriptorRequest { /** The import request */ importRequest?: ImportFileRequest; } interface SyncImportFileDescriptorResponse { /** Information about the imported file. */ file?: FileDescriptor; } interface BulkImportFilesRequest { /** * Information about the files to import. * @minSize 1 * @maxSize 100 */ importFileRequests: ImportFileRequest[]; } interface BulkImportFilesResponse { /** * Information about the imported files. * @maxSize 100 */ files?: FileDescriptor[]; } interface BulkImportFileRequest { /** * Information about the files to import. * @minSize 1 * @maxSize 100 */ importFileRequests: ImportFileRequest[]; /** * Whether to include the imported file descriptor in the response. Set to `false` to exclude the file descriptor from the response. * * Default: `true` */ returnEntity?: boolean | null; } interface BulkImportFileResponse { /** Items created by bulk action. */ results?: BulkImportFileResult[]; /** Bulk action metadata. */ bulkActionMetadata?: BulkActionMetadata; } interface BulkImportFileResult { /** Item metadata. */ itemMetadata?: ItemMetadata; /** Imported file. This field is included in the response if the operation was successful and `returnEntity` is not set to `false`. */ item?: FileDescriptor; } interface BulkInternalImportFilesRequest { /** * Information about the files to import. * @minSize 1 * @maxSize 5 */ importFileRequests?: ImportFileRequest[]; } interface BulkInternalImportFilesResponse { /** Items created by bulk action. */ results?: BulkImportFileResult[]; /** Bulk action metadata. */ bulkActionMetadata?: BulkActionMetadata; } interface BulkImportWixVideoFilesRequest { /** The files to import and the site they belong to. */ source?: ImportSource; } interface WixVideoFileToImport { /** * ID of the file to import, as it appears in the source site's Media Manager. * @maxLength 1000 */ fileId?: string | null; } interface ImportSource { /** * Files to import from the source site. * @minSize 1 * @maxSize 100 */ items?: WixVideoFileToImport[]; /** * ID of the site containing the files. * * Default: The site the request is made on. * @maxLength 100 */ siteId?: string | null; } interface BulkImportWixVideoFilesResponse { /** Items created by bulk action. */ results?: BulkImportWixVideoFileResult[]; /** Bulk action metadata. */ bulkActionMetadata?: BulkActionMetadata; } interface BulkImportWixVideoFileResult { /** Item metadata. `id` is the requested source file ID. */ itemMetadata?: ItemMetadata; /** Imported file. This field is included in the response if the operation was successful. */ item?: FileDescriptor; } interface ListFilesRequest { /** * ID of the file's parent folder. * * Default: `media-root`. * @maxLength 100 */ parentFolderId?: string | null; /** * File media type. * @maxSize 30 */ mediaTypes?: MediaTypeWithLiterals[]; /** * Whether to return only private or only public files. * + `true`: Returns only private files. * + `false`: Returns only public files. * + `undefined`: Returns public and private files. * * Learn more about [private files](https://dev.wix.com/docs/rest/assets/media/media-manager/files/private-files). */ private?: boolean | null; /** * Field name and order to sort by. One of: * * `displayName` * `updatedDate` * `sizeInBytes` * * Default: `updatedDate` in `desc` order. */ sort?: CommonSorting; /** Cursor and paging information. */ paging?: CursorPaging; } interface CommonSorting { /** * Name of the field to sort by. * @maxLength 512 */ fieldName?: string; /** Sort order. */ order?: CommonSortOrderWithLiterals; /** * Origin point for geo-distance sorting on a GEO field * results are ordered by distance from this point (ASC = nearest first, DESC = farthest first). */ origin?: AddressLocation; } declare enum CommonSortOrder { ASC = "ASC", DESC = "DESC" } /** @enumType */ type CommonSortOrderWithLiterals = CommonSortOrder | 'ASC' | 'DESC'; interface AddressLocation { /** Address latitude. */ latitude?: number | null; /** Address longitude. */ longitude?: number | null; } interface CursorPaging { /** * Maximum number of items to return in the results. * @max 100 */ limit?: number | null; /** * Pointer to the next or previous page in the list of results. * * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. * @maxLength 16000 */ cursor?: string | null; } interface ListFilesResponse { /** * List of files in the Media Manager. * @maxSize 200 */ files?: FileDescriptor[]; /** The next cursor if it exists. */ nextCursor?: PagingMetadataV2; } interface PagingMetadataV2 { /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */ total?: number | null; /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */ cursors?: Cursors; } interface Cursors { /** * Cursor string pointing to the next page in the list of results. * @maxLength 16000 */ next?: string | null; } interface SearchFilesRequest { /** * Free text to match in searchable fields. * * For example, search for specific values in a file's * `displayName`, `mimeType`, or `label`. * @maxLength 200 */ search?: string | null; /** * The root folder in the media manager to search in. * For more information, see Root Folders in [Terminology](https://dev.wix.com/docs/rest/assets/media/media-manager/introduction#terminology). * * Default: `MEDIA_ROOT`. */ rootFolder?: RootFolderWithLiterals; /** * File media type. * @maxSize 30 */ mediaTypes?: MediaTypeWithLiterals[]; /** * Whether to return only private or only public files. * + `true`: Returns only private files. * + `false`: Returns only public files. * + `undefined`: Returns public and private files. * * Learn more [about private files](https://dev.wix.com/docs/api-reference/assets/media/media-manager/files/private-files). */ private?: boolean | null; /** * Field name and order to sort by. * * One of: * `displayName` * `updatedDate` * `sizeInBytes` * * Default: `updatedDate` in `desc` order. */ sort?: CommonSorting; /** Cursor and paging information. */ paging?: CursorPaging; } declare enum RootFolder { /** Contains all files and folders in the Media Manager's **Site Files** tab in the UI. */ MEDIA_ROOT = "MEDIA_ROOT", /** Contains all files and folders in the Media Manager's **Trash** tab in the UI. */ TRASH_ROOT = "TRASH_ROOT", /** Contains all files and folders created by site visitors or members. */ VISITOR_UPLOADS_ROOT = "VISITOR_UPLOADS_ROOT" } /** @enumType */ type RootFolderWithLiterals = RootFolder | 'MEDIA_ROOT' | 'TRASH_ROOT' | 'VISITOR_UPLOADS_ROOT'; interface SearchFilesResponse { /** * Retrieved files that match the search criteria specified in the request. * * Each file includes all standard file information. * @maxSize 200 */ files?: FileDescriptor[]; /** The next cursor if it exists. */ nextCursor?: PagingMetadataV2; } interface SearchFilesCrossSiteRequest { /** File media type filter. `UNKNOWN` (default) means no media-type filter is applied. */ mediaType?: MediaTypeWithLiterals; } interface SearchFilesCrossSiteResponse { /** * Files matching the tag across all sites of the account. * @maxSize 200 */ files?: FileDescriptor[]; } interface GenerateVideoStreamingUrlRequest { /** * File ID. * * You can also specify the file's Wix media URL. For example, `wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032`. * Learn more [about the file ID parameter](https://dev.wix.com/docs/api-reference/assets/media/media-manager/files/file-id). * @maxLength 1000 */ fileId: string; /** * Video stream format. * * Default: `DASH` */ format?: StreamFormatWithLiterals; /** * Number of minutes until the streaming URL expires.
* * Applies only to private (secure) videos. Public videos are streamed from non-expiring URLs, so this value is ignored for them.
* The streaming token is re-validated on every chunk that is played, so set this longer than the video's play duration.
* Default: `1440` (24 hours). * @min 60 * @max 1440 */ expirationInMinutes?: number | null; } declare enum StreamFormat { /** Unknown stream format. */ UNKNOWN = "UNKNOWN", /** HTTP Live Streaming. */ HLS = "HLS", /** Dynamic Adaptive Streaming over HTTP. */ DASH = "DASH" } /** @enumType */ type StreamFormatWithLiterals = StreamFormat | 'UNKNOWN' | 'HLS' | 'DASH'; interface GenerateVideoStreamingUrlResponse { /** URL for streaming a specific file in the Media Manager. */ downloadUrl?: DownloadUrl; } interface GeneratePrivateImageUrlRequest { /** * File ID of the private image. * * You can also specify the file's Wix media URL. For example, `wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032`. * Learn more [about the file ID parameter](https://dev.wix.com/docs/api-reference/assets/media/media-manager/files/file-id). * @maxLength 1000 */ fileId?: string; /** * Transformation to apply to the image, as the URL path segments that follow the file ID.
* * For example, `v1/fit/w_924,h_520/leon.jpg`. Learn more about the available transformations in the * [URL-Based Image Transformation reference](https://dev.wix.com/docs/api-reference/assets/media/media-manager/url-image-transformation).
* * Default: the URL serves the image at its original dimensions and format. * @maxLength 2000 */ transformation?: string | null; } interface GeneratePrivateImageUrlResponse { /** * Signed URL that serves the requested private image. * @format WEB_URL */ url?: string; } interface GenerateWebSocketTokenRequest { } interface GenerateWebSocketTokenResponse { /** * The web socket token for the identity in the request * @maxLength 2000 */ token?: string; } interface BulkDeleteFilesRequest { /** * IDs of the files to move to the Media Manager's trash bin. * * You can also specify the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`. * Learn more [about the file ID parameter](https://dev.wix.com/docs/api-reference/assets/media/media-manager/files/file-id). * @maxSize 1000 * @maxLength 1000 */ fileIds: string[]; /** * Whether the specified files are permanently deleted.
* Default: `false` */ permanent?: boolean; } interface BulkDeleteFilesResponse { } interface BulkRestoreFilesFromTrashBinRequest { /** * IDs of the files to restore from the Media Manager's trash bin. * * You can also specify the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`. * Learn more [about the file ID parameter](https://dev.wix.com/docs/api-reference/assets/media/media-manager/files/file-id). * @maxSize 1000 * @maxLength 1000 */ fileIds: string[]; } interface BulkRestoreFilesFromTrashBinResponse { } interface ListDeletedFilesRequest { /** * ID of the file's parent folder.
* Default: `media-root`. * @maxLength 100 */ parentFolderId?: string | null; /** * File media type. * @maxSize 30 */ mediaTypes?: MediaTypeWithLiterals[]; /** * Whether to return only private or only public files. * + `true`: Returns only private files. * + `false`: Returns only public files. * + `undefined`: Returns public and private files. * * Learn more [about private files](https://dev.wix.com/docs/api-reference/assets/media/media-manager/files/private-files). */ private?: boolean | null; /** * Field name and order to sort by. One of:
* * `displayName` * * `updatedDate` * * `sizeInBytes` * Default: `updatedDate` in `desc` order. */ sort?: CommonSorting; /** Cursor and paging information. */ paging?: CursorPaging; } interface ListDeletedFilesResponse { /** * List of files in the Media Manager's trash bin. * @maxSize 200 */ files?: FileDescriptor[]; /** The next cursor if it exists. */ nextCursor?: PagingMetadataV2; } interface BulkPublishDraftFilesRequest { /** * IDs of the draft files to be published. * * You can also specify the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`. * Learn more [about the file ID parameter](https://dev.wix.com/docs/api-reference/assets/media/media-manager/files/file-id). * @maxSize 100 * @maxLength 1000 */ fileIds?: string[]; /** * The namespace the files will be published to * Note, private files must have a namespace */ namespace?: NamespaceWithLiterals; /** * ID of the file's parent folder.
* This folder is the path root for the `filePath`.
* Default: `media-root`. * @maxLength 100 */ parentFolderId?: string | null; /** * Path to the folder where the file will be stored. * For example, `/videos/2024/december`.
* If `parentFolderId` is defined, the parent folder is used as the path root. Otherwise, the root is `media-root`. * The folders in the path will be created if they don't already exist.
* @maxLength 100 */ filePath?: string | null; /** Should the response return the item following the operation */ returnEntity?: boolean; } interface BulkPublishDraftFilesResponse { /** Results of individual items */ results?: BulkPublishDraftFileResult[]; /** Metadata of the operation */ bulkActionMetadata?: BulkActionMetadata; } interface BulkPublishDraftFileResult { /** Item metadata */ itemMetadata?: ItemMetadata; /** * The item following the operation * Only returned if operation was successful and if returnEntity flag was on */ item?: FileDescriptor; } interface UpdateFileRequest { /** * ID of the file to update. * * You can also specify the file's Wix media URL. For example, `wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032`. * Learn more [about the file ID parameter](https://dev.wix.com/docs/api-reference/assets/media/media-manager/files/file-id). * @maxLength 1000 */ fileId?: string; /** * File name that appears in the Media Manager. * @maxLength 255 */ displayName?: string | null; /** * ID of the file's parent folder.
* Default: `media-root`. * @maxLength 100 */ parentFolderId?: string | null; /** * Labels assigned to media files that describe and categorize them. Provided by the Wix user, or generated by [Google Vision API](https://cloud.google.com/vision/docs/drag-and-drop) for images. * @maxSize 500 * @maxLength 200 */ labels?: string[] | null; } interface UpdateFileResponse { /** Information about the updated file. */ file?: FileDescriptor; } interface QueryFileDescriptorsRequest { /** * Query options, including filter, sort, and cursor paging. * * See [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language) and * [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging) for more information. */ query?: CursorQuery; } interface CursorQuery extends CursorQueryPagingMethodOneOf { /** * Cursor paging options. * * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging). */ cursorPaging?: CursorPaging; /** * Filter object. * * Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters). */ filter?: Record | null; /** * Sort object. * * Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting). * @maxSize 1 */ sort?: Sorting[]; } /** @oneof */ interface CursorQueryPagingMethodOneOf { /** * Cursor paging options. * * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging). */ cursorPaging?: CursorPaging; } interface Sorting { /** * Name of the field to sort by. * @maxLength 512 */ fieldName?: string; /** * Sort order. Use `ASC` for ascending order or `DESC` for descending order. * * Default: `ASC` */ order?: SortOrderWithLiterals; } declare enum SortOrder { ASC = "ASC", DESC = "DESC" } /** @enumType */ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC'; interface QueryFileDescriptorsResponse { /** * Retrieved files that match the query. * @maxSize 200 */ files?: FileDescriptor[]; /** Paging metadata, including the cursors for the next and previous pages. */ pagingMetadata?: PagingMetadataV2; } interface ListRecentItemsRequest { /** Cursor and paging information. */ paging?: CursorPaging; } interface ListRecentItemsResponse { /** * List of recently updated files. * @maxSize 200 */ files?: FileDescriptor[]; /** The next cursor if it exists. */ nextCursor?: PagingMetadataV2; } interface DomainEvent extends DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; /** Event ID. With this ID you can easily spot duplicated events and ignore them. */ _id?: string; /** * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities. * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`. */ entityFqdn?: string; /** * Event action name, placed at the top level to make it easier for users to dispatch messages. * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`. */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number. * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; } interface EntityCreatedEvent { entity?: string; } interface RestoreInfo { deletedDate?: Date | null; } interface EntityUpdatedEvent { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntity?: string; } interface EntityDeletedEvent { /** Entity that was deleted. */ deletedEntity?: string | null; } interface ActionEvent { body?: string; } interface MessageEnvelope { /** * App instance ID. * @format GUID */ instanceId?: string | null; /** * Event type. * @maxLength 150 */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Stringify payload. */ data?: string; /** Details related to the account */ accountInfo?: AccountInfo; } interface IdentificationData extends IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; /** @readonly */ identityType?: WebhookIdentityTypeWithLiterals; } /** @oneof */ interface IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; } declare enum WebhookIdentityType { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** @enumType */ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP'; interface AccountInfo { /** * ID of the Wix account associated with the event. * @format GUID */ accountId?: string | null; /** * ID of the parent Wix account. Only included when accountId belongs to a child account. * @format GUID */ parentAccountId?: string | null; /** * ID of the Wix site associated with the event. Only included when the event is tied to a specific site. * @format GUID */ siteId?: string | null; } /** @docsIgnore */ type GenerateFileDownloadUrlValidationErrors = { ruleName?: 'INVALID_ASSET_KEY'; }; /** @docsIgnore */ type GetFileDescriptorValidationErrors = { ruleName?: 'RESOURCE_NOT_FOUND'; }; /** @docsIgnore */ type GetFileDescriptorsValidationErrors = { ruleName?: 'RESOURCE_NOT_FOUND'; }; /** @docsIgnore */ type UpdateFileDescriptorValidationErrors = { ruleName?: 'FIELD_MASK_IS_EMPTY_OR_MISSING'; }; /** @docsIgnore */ type GenerateFileUploadUrlValidationErrors = { ruleName?: 'MISMATCH_MIME_TYPE'; } | { ruleName?: 'ZERO_FILE_SIZE'; } | { ruleName?: 'UNSUPPORTED_FILE_FORMAT'; } | { ruleName?: 'FILE_SIZE_OVER_LIMIT'; } | { ruleName?: 'SITE_QUOTA_EXCEEDED'; }; /** @docsIgnore */ type GenerateFileResumableUploadUrlValidationErrors = { ruleName?: 'MISMATCH_MIME_TYPE'; } | { ruleName?: 'ZERO_FILE_SIZE'; } | { ruleName?: 'UNSUPPORTED_FILE_FORMAT'; } | { ruleName?: 'FILE_SIZE_OVER_LIMIT'; }; /** @docsIgnore */ type ImportFileValidationErrors = { ruleName?: 'SITE_QUOTA_EXCEEDED'; }; /** @docsIgnore */ type ListFilesValidationErrors = { ruleName?: 'UNSUPPORTED_MEDIA_TYPE'; } | { ruleName?: 'UNSUPPORTED_SORT_VALUE'; }; /** @docsIgnore */ type SearchFilesValidationErrors = { ruleName?: 'UNSUPPORTED_MEDIA_TYPE'; } | { ruleName?: 'UNSUPPORTED_SORT_VALUE'; }; /** @docsIgnore */ type ListDeletedFilesValidationErrors = { ruleName?: 'UNSUPPORTED_MEDIA_TYPE'; } | { ruleName?: 'UNSUPPORTED_SORT_VALUE'; }; interface BaseEventMetadata { /** * App instance ID. * @format GUID */ instanceId?: string | null; /** * Event type. * @maxLength 150 */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Details related to the account */ accountInfo?: AccountInfo; } interface EventMetadata extends BaseEventMetadata { /** Event ID. With this ID you can easily spot duplicated events and ignore them. */ _id?: string; /** * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities. * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`. */ entityFqdn?: string; /** * Event action name, placed at the top level to make it easier for users to dispatch messages. * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`. */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number. * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it. */ entityEventSequence?: string | null; accountInfo?: AccountInfoMetadata; } interface AccountInfoMetadata { /** ID of the Wix account associated with the event */ accountId: string; /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */ siteId?: string; /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */ parentAccountId?: string; } interface FileDescriptorFileFailedEnvelope { data: FileFailed; metadata: EventMetadata; } /** * Triggered when a file's import fails. Learn more about [knowing when a file is ready](https://dev.wix.com/docs/api-reference/assets/media/media-manager/files/importing-files#knowing-when-a-file-is-ready). * @permissionScope Manage_Wix_Rentals_App_Forms_submissions * @permissionScopeId SCOPE.RENTALS.MANAGE * @permissionScope Manage Stores * @permissionScopeId SCOPE.STORES.MANAGE-STORES * @permissionScope Manage Bookings Services and Settings * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION * @permissionScope View settlement reports and payouts * @permissionScopeId SCOPE.PAYMENTS.PAYOUTS-VIEW-FOR-SITE * @permissionScope Manage Events * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS * @permissionScope Manage Online Programs * @permissionScopeId SCOPE.CHALLENGES.MANAGE * @permissionScope Read Media Manager * @permissionScopeId SCOPE.DC-MEDIA.READ-MEDIAMANAGER * @permissionScope Manage Media Manager * @permissionScopeId SCOPE.DC-MEDIA.MANAGE-MEDIAMANAGER * @permissionScope Manage Base44 Payments * @permissionScopeId SCOPE.PAYMENTS.BASE44 * @permissionScope Manage Portfolio * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO * @permissionScope View SEO Settings * @permissionScopeId SCOPE.PROMOTE.VIEW-SEO * @permissionScope Manage Social Posts * @permissionScopeId SCOPE.PROMOTE.MANAGE-SOCIAL-POSTS * @permissionScope Manage SEO Settings * @permissionScopeId SCOPE.PROMOTE.MANAGE-SEO * @permissionScope Access Verticals by Automations * @permissionScopeId SCOPE.CRM.ACCESS-VERTICALS-BY-AUTOMATIONS * @permissionScope Manage Restaurants - all permissions * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES * @permissionScope View Site Analytics * @permissionScopeId SCOPE.MEDIA.VIEW-SITE-ANALYTICS * @permissionScope Set Up Automations * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS * @permissionScope Manage google ads campaigns * @permissionScopeId SCOPE.PROMOTE.MANAGE-GOOGLE-ADS * @permissionScope View google ads campaigns * @permissionScopeId SCOPE.PROMOTE.VIEW-GOOGLE-ADS * @permissionId MEDIA.SITE_MEDIA_FILES_READ * @webhook * @eventType wix.media.site_media.v1.file_descriptor_file_failed * @slug file_failed */ declare function onFileDescriptorFileFailed(handler: (event: FileDescriptorFileFailedEnvelope) => void | Promise): void; interface FileDescriptorFileReadyEnvelope { data: FileReady; metadata: EventMetadata; } /** * Triggered when a file finishes processing successfully. Learn more about [knowing when a file is ready](https://dev.wix.com/docs/api-reference/assets/media/media-manager/files/importing-files#knowing-when-a-file-is-ready). * @permissionScope Manage_Wix_Rentals_App_Forms_submissions * @permissionScopeId SCOPE.RENTALS.MANAGE * @permissionScope Manage Stores * @permissionScopeId SCOPE.STORES.MANAGE-STORES * @permissionScope Manage Bookings Services and Settings * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION * @permissionScope View settlement reports and payouts * @permissionScopeId SCOPE.PAYMENTS.PAYOUTS-VIEW-FOR-SITE * @permissionScope Manage Events * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS * @permissionScope Manage Online Programs * @permissionScopeId SCOPE.CHALLENGES.MANAGE * @permissionScope Read Media Manager * @permissionScopeId SCOPE.DC-MEDIA.READ-MEDIAMANAGER * @permissionScope Manage Media Manager * @permissionScopeId SCOPE.DC-MEDIA.MANAGE-MEDIAMANAGER * @permissionScope Manage Base44 Payments * @permissionScopeId SCOPE.PAYMENTS.BASE44 * @permissionScope Manage Portfolio * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO * @permissionScope View SEO Settings * @permissionScopeId SCOPE.PROMOTE.VIEW-SEO * @permissionScope Manage Social Posts * @permissionScopeId SCOPE.PROMOTE.MANAGE-SOCIAL-POSTS * @permissionScope Manage SEO Settings * @permissionScopeId SCOPE.PROMOTE.MANAGE-SEO * @permissionScope Access Verticals by Automations * @permissionScopeId SCOPE.CRM.ACCESS-VERTICALS-BY-AUTOMATIONS * @permissionScope Manage Restaurants - all permissions * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES * @permissionScope View Site Analytics * @permissionScopeId SCOPE.MEDIA.VIEW-SITE-ANALYTICS * @permissionScope Set Up Automations * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS * @permissionScope Manage google ads campaigns * @permissionScopeId SCOPE.PROMOTE.MANAGE-GOOGLE-ADS * @permissionScope View google ads campaigns * @permissionScopeId SCOPE.PROMOTE.VIEW-GOOGLE-ADS * @permissionId MEDIA.SITE_MEDIA_FILES_READ * @webhook * @eventType wix.media.site_media.v1.file_descriptor_file_ready * @slug file_ready */ declare function onFileDescriptorFileReady(handler: (event: FileDescriptorFileReadyEnvelope) => void | Promise): void; /** * Generates a URL for downloading a compressed file containing specific files in the Media Manager. * * The compressed file can contain up to 1000 files. * * To generate a permanent URL for downloading a compressed file that contains multiple files in the Media Manager, call the Generate Files Download URL endpoint. * Since this is a permanent URL, it is less secure. * Therefore, to download private files, call the Generate File Download URL endpoint for each private file that you want to generate a download URL for. * @public * @requiredField fileIds * @param fileIds - IDs of the files to download. * * You can also pass the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`. * Learn more in the File and Folder IDs article. * @permissionId MEDIA.SITE_MEDIA_FILES_DOWNLOAD * @applicableIdentity APP * @fqn com.wix.media.site_media.v1.FilesService.GenerateFilesDownloadUrl */ declare function generateFilesDownloadUrl(fileIds: string[]): Promise>; /** * Generates one or more temporary URLs for downloading a specific file in the Media Manager. * * To download different assets of the file, specify the `assetKeys` parameter which generates a download URL for each asset. * If no `assetKey` is specified, it defaults to `src`, which generates one download URL in the original file's format and quality. * * Call this endpoint to grant external clients access to a private media file. Specify the `expirationInMinutes` parameter to set the URL expiration time, and the `expirationRedirectUrl` parameter to add a redirect url when the URL expires. * * To generate a permanent URL for downloading a compressed file that contains multiple files in the Media Manager, call the Generate Files Download URL endpoint. * Since this is a permanent URL, it is less secure. * Therefore, to download private files, call the Generate File Download URL endpoint for each private file that you want to generate a download URL for. * @public * @requiredField fileId * @param options - Options to use when generating a file's download URL. * @param fileId - File ID. * * You can also pass the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`. * Learn more in the File and Folder IDs article. * @permissionId MEDIA.SITE_MEDIA_FILES_DOWNLOAD_URL * @applicableIdentity APP * @fqn com.wix.media.site_media.v1.FilesService.GenerateFileDownloadUrl */ declare function generateFileDownloadUrl(fileId: string, options?: GenerateFileDownloadUrlOptions): Promise & { __validationErrorsType?: GenerateFileDownloadUrlValidationErrors; }>; interface GenerateFileDownloadUrlOptions { /** * Temporary file name used to identify the file type. For example, a file named "myFile.jpeg" identifies as an "image/jpeg" file type.
* * **Note:** The name that appears in the Media Manager is taken from the `filename` parameter in the Generate File Upload Url call. * @maxLength 100 */ downloadFileName?: string | null; /** * Time in minutes until the download URL expires.
* Default: `600` (10 hours).
* Limit: `525600` (1 year). * @min 1 */ expirationInMinutes?: number | null; /** * The redirect URL for when the temporary download URL with a token expires.
* Default: A 403 Forbidden response page. * @format WEB_URL */ expirationRedirectUrl?: string | null; /** * Keys for downloading different assets (format and quality) of a file. * Default: `src`, key representing the original file's format and quality. * @maxSize 100 * @maxLength 100 */ assetKeys?: string[] | null; /** * Whether the link downloads the file or opens the file in the browser. * * - `ATTACHMENT`: The link downloads the file. * - `INLINE`: The link opens the file in the browser. * * Default: `ATTACHMENT` */ contentDisposition?: ContentDispositionWithLiterals; } /** * Gets information about a specific file in the Media Manager. * @public * @requiredField fileId * @param fileId - File ID. * * You can also pass the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`. * Learn more in the File and Folder IDs article. * @permissionId MEDIA.SITE_MEDIA_FILES_READ * @applicableIdentity APP * @returns Information about the file. * @fqn com.wix.media.site_media.v1.FilesService.GetFileDescriptor */ declare function getFileDescriptor(fileId: string): Promise & { __validationErrorsType?: GetFileDescriptorValidationErrors; }>; /** * Gets information about specific files in the Media Manager. * @public * @requiredField fileIds * @param fileIds - File IDs. * * You can also pass the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`. * Learn more in the File and Folder IDs article. * @permissionId MEDIA.SITE_MEDIA_FILES_READ * @applicableIdentity APP * @fqn com.wix.media.site_media.v1.FilesService.GetFileDescriptors */ declare function getFileDescriptors(fileIds: string[]): Promise & { __validationErrorsType?: GetFileDescriptorsValidationErrors; }>; /** * Updates a file.
* * Specify the `parentFolderId` parameter to move a file from its current folder to a different folder. * @param file - The file to update. * @public * @requiredField file * @requiredField file._id * @permissionId MEDIA.SITE_MEDIA_FILES_UPDATE * @applicableIdentity APP * @returns Information about the updated file. * @fqn com.wix.media.site_media.v1.FilesService.UpdateFileDescriptor */ declare function updateFileDescriptor(file: NonNullablePaths): Promise & { __validationErrorsType?: UpdateFileDescriptorValidationErrors; }>; /** * Generates an upload URL to allow external clients to upload a file to the Media Manager.
* * Learn how to use the generated upload URL to [upload a file to the Media Manager](https://dev.wix.com/docs/api-reference/assets/media/media-manager/files/upload-api). * > **Notes:** * > - When you upload a file, it's not immediately available, meaning you can't manage or use the file straight away. Learn more about [knowing when a file is ready](https://dev.wix.com/docs/api-reference/assets/media/media-manager/files/importing-files#knowing-when-a-file-is-ready). * > - Any interruption in the upload process stops the file upload. For files larger than 10MB, or when network connection is poor, call Generate File Resumable Upload URL instead. With the resumable upload URL, any interruption in the upload process pauses the file upload, and resumes the file upload process after the interruption. * @param mimeType - File mime type. * @public * @requiredField mimeType * @param options - Options to use when generating a file's upload URL. * @permissionId MEDIA.SITE_MEDIA_FILES_UPLOAD * @applicableIdentity APP * @fqn com.wix.media.site_media.v1.FilesService.GenerateFileUploadUrl */ declare function generateFileUploadUrl(mimeType: string, options?: GenerateFileUploadUrlOptions): Promise & { __validationErrorsType?: GenerateFileUploadUrlValidationErrors; }>; interface GenerateFileUploadUrlOptions { /** * Temporary file name used to identify the file type. For example, a file named "myFile.jpeg" identifies as an "image/jpeg" file type. *
**Notes:**
  • The name that appears in the Media Manager is taken from the `fileName` parameter in the Generate File Upload Url call.
  • If you specify a `fileName`, the `filename` query parameter in the upload request itself is not required.
* The file name is truncated to 255 characters if longer. * @maxLength 1000 */ fileName?: string | null; /** * File size in bytes. * @readonly * @format DECIMAL_VALUE * @decimalValue options { gte:0, maxScale:0 } */ sizeInBytes?: string | null; /** * ID of the file's parent folder.
* This folder is the path root for the `filePath`.
* Default: `media-root`. * @maxLength 100 */ parentFolderId?: string | null; /** Whether the file will be public or private. Learn more [about private files](https://dev.wix.com/docs/api-reference/assets/media/media-manager/files/private-files). */ private?: boolean | null; /** * Labels assigned to media files that describe and categorize them. Provided by the Wix user, or generated by [Google Vision API](https://cloud.google.com/vision/docs/drag-and-drop) for images. * @maxSize 50 * @maxLength 200 */ labels?: string[] | null; /** A place to map an external entity to an uploaded file in the Wix Media Manager. */ externalInfo?: ExternalInfo; /** * Path to the folder where the file will be stored. * For example, `/videos/2024/december`.
* If `parentFolderId` is defined, the parent folder is used as the path root. Otherwise, the root is `media-root`. * The folders in the path will be created if they don't already exist.
* @maxLength 100 */ filePath?: string | null; } /** * Generates a resumable upload URL to allow external clients to easily upload large files over 10MB to the Media Manager.
* * With the resumable upload URL, any interruptions in the upload process pauses the file upload, and resumes the file upload process after the interruption. The resumable upload URL is also helpful when network connection is poor. * Learn how to use the generated upload URL in the response to [upload large files to the Media Manager](https://dev.wix.com/docs/api-reference/assets/media/media-manager/files/resumable-upload-api). * * > **Note:** When you upload a file, it's not immediately available, meaning you can't manage or use the file straight away. Learn more about [knowing when a file is ready](https://dev.wix.com/docs/api-reference/assets/media/media-manager/files/importing-files#knowing-when-a-file-is-ready). * @param mimeType - File mime type. * @public * @requiredField mimeType * @param options - Options to use when generating a resumable upload URL. * @permissionId MEDIA.SITE_MEDIA_FILES_UPLOAD * @applicableIdentity APP * @fqn com.wix.media.site_media.v1.FilesService.GenerateFileResumableUploadUrl */ declare function generateFileResumableUploadUrl(mimeType: string, options?: GenerateFileResumableUploadUrlOptions): Promise & { __validationErrorsType?: GenerateFileResumableUploadUrlValidationErrors; }>; interface GenerateFileResumableUploadUrlOptions { /** * Temporary file name used to identify the file type. For example, a file named "myFile.jpeg" identifies as an "image/jpeg" file type. *
**Notes:**
  • The name that appears in the Media Manager is taken from the `fileName` parameter in the Generate File Upload Url call.
  • If you specify a `fileName`, the `filename` query parameter in the upload request itself is not required.
* The file name is truncated to 255 characters if longer. * @maxLength 1000 */ fileName?: string | null; /** * File size in bytes. * @readonly * @format DECIMAL_VALUE * @decimalValue options { gte:0, maxScale:0 } */ sizeInBytes?: string | null; /** * ID of the file's parent folder.
* This folder is the path root for the `filePath`.
* Default: `media-root`. * @maxLength 100 */ parentFolderId?: string | null; /** Whether the file will be public or private. Learn more [about private files](https://dev.wix.com/docs/api-reference/assets/media/media-manager/files/private-files). */ private?: boolean | null; /** * Labels assigned to media files that describe and categorize them. Provided by the Wix user, or generated by [Google Vision API](https://cloud.google.com/vision/docs/drag-and-drop) for images. * @maxSize 500 * @maxLength 200 */ labels?: string[] | null; /** The upload protocol to use for implementing the resumable upload. */ uploadProtocol?: UploadProtocolWithLiterals; /** * Path to the folder where the file will be stored. * For example, `/videos/2024/december`.
* If `parentFolderId` is defined, the parent folder is used as the path root. Otherwise, the root is `media-root`. * The folders in the path will be created if they don't already exist.
* @maxLength 100 */ filePath?: string | null; } /** * Imports a file to the Media Manager using an external url. * * Returns information about the imported file. * Specify the `parentFolderId` and `filePath` parameters to specify which folder you want the file to be imported to. * If no folder is specified, the file is imported to the `media-root` folder. * * >**Notes:** * > - The `media` property isn't returned in the `files` response object. * > - When you import a file, it's not immediately available, meaning you can't manage or use the file straight away. Learn more about [knowing when a file is ready](https://dev.wix.com/docs/api-reference/assets/media/media-manager/files/importing-files#knowing-when-a-file-is-ready). * * To import a file, you need to do one of the following: * - Specify its [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) in the `mimeType` field of the request. For example, `mimeType: 'image/jpeg'`. * - Specify its extension in either the `displayName` or `url` field of the request. For example, `displayName: 'Example Image.jpeg` or `url: https://www.example.com/image.jpeg`. * - Ensure the server hosting the file supports HEAD requests. In these cases the Wix servers can retrieve the MIME type from the hosting server. * > **Note:** If you want to validate the media type, specify the file's expected media type in the optional `mediaType` field of the request. For example, `mediaType: 'IMAGE'`. * @param url - Publicly accessible external file URL. * @public * @requiredField url * @param options - Options to use when importing a single file. * @permissionId MEDIA.SITE_MEDIA_FILES_IMPORT * @applicableIdentity APP * @fqn com.wix.media.site_media.v1.FilesService.ImportFile */ declare function importFile(url: string, options?: ImportFileOptions): Promise & { __validationErrorsType?: ImportFileValidationErrors; }>; interface ImportFileOptions { /** * Media type of the file to import. * excluding: OTHER media type */ mediaType?: MediaTypeWithLiterals; /** * File name that appears in the Media Manager. * The file name is truncated to 255 characters if longer. * @maxLength 1000 */ displayName?: string | null; /** * ID of the file's parent folder.
* This folder is the path root for the `filePath`.
* Default: `media-root`. * @maxLength 100 */ parentFolderId?: string | null; /** Whether the file will be public or private. Learn more [about private files](https://dev.wix.com/docs/api-reference/assets/media/media-manager/files/private-files). */ private?: boolean | null; /** * Labels assigned to media files that describe and categorize them. Provided by the Wix user, or generated by [Google Vision API](https://cloud.google.com/vision/docs/drag-and-drop) for images. * @maxSize 500 * @maxLength 200 */ labels?: string[] | null; /** * File mime type. * @maxLength 100 */ mimeType?: string; /** Information sent to the File Ready and File Failed events. See [Importing Files](https://dev.wix.com/docs/api-reference/assets/media/media-manager/files/importing-files) to learn more. */ externalInfo?: ExternalInfo; /** Optional parameters that should be sent with the external URL. */ urlParams?: Record | null; /** Optional headers that should be sent with the external URL. */ urlHeaders?: Record | null; /** * Path to the folder where the file will be stored. * For example, `/videos/2024/december`.
* If `parentFolderId` is defined, the parent folder is used as the path root. Otherwise, the root is `media-root`. * The folders in the path will be created if they don't already exist.
* @maxLength 100 */ filePath?: string | null; } /** * Imports a bulk of files to the Media Manager using external urls.
* * Returns information about the imported files. * * Use the `parentFolderId` and `filePath` parameters to specify the folder you want each file to be imported to. * If no folder is specified, the file is imported to the `media-root` folder. * * >**Notes:** * > - The `media` property isn't returned in the `files` response object. * > - When you import a file, it's not immediately available, meaning you can't manage or use the file straight away. Learn more about [knowing when a file is ready](https://dev.wix.com/docs/api-reference/assets/media/media-manager/files/importing-files#knowing-when-a-file-is-ready). * * To import files, you need to do one of the following for each file: * - Specify its [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) in the `mimeType` field of the request. For example, `mimeType: 'image/jpeg'`. * - Include its extension in either the `displayName` or `url` field of the request. For example, `displayName: 'Example Image.jpeg` or `url: https://www.example.com/image.jpeg`. * - Ensure the server hosting the file supports HEAD requests. In these cases the Wix servers can retrieve the MIME type from the hosting server. * > **Note:** If you want to validate the media type, specify the file's expected media type in the optional `mediaType` field of the request. For example, `mediaType: 'IMAGE'`. * @param importFileRequests - Information about the files to import. * @public * @requiredField importFileRequests * @requiredField importFileRequests.url * @param options - Options to use when uploading multiple files. * @permissionId MEDIA.SITE_MEDIA_FILES_IMPORT * @applicableIdentity APP * @fqn com.wix.media.site_media.v1.FilesService.BulkImportFiles * @deprecated * @replacedBy com.wix.media.site_media.v1.FilesService.BulkImportFile * @targetRemovalDate 2024-03-31 */ declare function bulkImportFiles(importFileRequests: NonNullablePaths[]): Promise>; /** * Imports a bulk of files to the Media Manager using external urls.
* * Returns information about the imported files. * * Specify the `parentFolderId` and `filePath` parameters to specify the folder you want each file to be imported to. * If no folder is specified, the file is imported to the `media-root` folder. * * >**Notes:** * > - The `media` property isn't returned in the `files` response object. * > - When you import a file, it's not immediately available, meaning you can't manage or use the file straight away. Learn more about [knowing when a file is ready](https://dev.wix.com/docs/api-reference/assets/media/media-manager/files/importing-files#knowing-when-a-file-is-ready). * * To import files, you need to do one of the following for each file: * - Specify its [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) in the `mimeType` field of the request. For example, `mimeType: 'image/jpeg'`. * - Include its extension in either the `displayName` or `url` field of the request. For example, `displayName: 'Example Image.jpeg` or `url: https://www.example.com/image.jpeg`. * - Ensure the server hosting the file supports HEAD requests. In these cases the Wix servers can retrieve the MIME type from the hosting server. * > **Note:** If you want to validate the media type, specify the file's expected media type in the optional `mediaType` field of the request. For example, `mediaType: 'IMAGE'`. * @param importFileRequests - Information about the files to import. * @public * @requiredField importFileRequests * @requiredField importFileRequests.url * @param options - Options to include the file descriptor in the response. * @permissionId MEDIA.SITE_MEDIA_FILES_IMPORT * @applicableIdentity APP * @fqn com.wix.media.site_media.v1.FilesService.BulkImportFile */ declare function bulkImportFile(importFileRequests: NonNullablePaths[], options?: BulkImportFileOptions): Promise>; interface BulkImportFileOptions { /** * Whether to include the imported file descriptor in the response. Set to `false` to exclude the file descriptor from the response. * * Default: `true` */ returnEntity?: boolean | null; } /** * Retrieves a list of files in the Media Manager. * * To retrieve a list of files within a specific folder in the Media Manager, specify the folder's ID in the `parentFolderId` parameter. If no folder is specified, the method retrieves the list of files in the root folder of the Media Manager. * @public * @param options - Options to use when listing media files. * @permissionId MEDIA.SITE_MEDIA_FILES_LIST * @applicableIdentity APP * @fqn com.wix.media.site_media.v1.FilesService.ListFiles */ declare function listFiles(options?: ListFilesOptions): Promise & { __validationErrorsType?: ListFilesValidationErrors; }>; interface ListFilesOptions { /** * ID of the file's parent folder. * * Default: `media-root`. * @maxLength 100 */ parentFolderId?: string | null; /** * File media type. * @maxSize 30 */ mediaTypes?: MediaTypeWithLiterals[]; /** * Whether to return only private or only public files. * + `true`: Returns only private files. * + `false`: Returns only public files. * + `undefined`: Returns public and private files. * * Learn more about [private files](https://dev.wix.com/docs/rest/assets/media/media-manager/files/private-files). */ private?: boolean | null; /** * Field name and order to sort by. One of: * * `displayName` * `updatedDate` * `sizeInBytes` * * Default: `updatedDate` in `desc` order. */ sort?: CommonSorting; /** Cursor and paging information. */ paging?: CursorPaging; } /** * Retrieves a list of up to 100 files with the specified filtering, sorting, and cursor paging. * * If no parameters are specified, the method returns all files in the `MEDIA_ROOT` folder. * * ## Defaults * * Search Files has the following default setting, which you can override: * + Sorted by `updatedDate` in descending order. * * ## Filters * * When using filters for dates, you must use * [UTC time](https://en.wikipedia.org/wiki/Coordinated_Universal_Time). * * ## See also * * To learn about working with *Search* methods, see * [API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language) * and [Sorting and Paging](https://dev.wix.com/docs/rest/articles/get-started/sorting-and-paging). * @public * @param options - Options to specify which folders to search. * @permissionId MEDIA.SITE_MEDIA_FILES_LIST * @applicableIdentity APP * @fqn com.wix.media.site_media.v1.FilesService.SearchFiles */ declare function searchFiles(options?: SearchFilesOptions): Promise & { __validationErrorsType?: SearchFilesValidationErrors; }>; interface SearchFilesOptions { /** * Free text to match in searchable fields. * * For example, search for specific values in a file's * `displayName`, `mimeType`, or `label`. * @maxLength 200 */ search?: string | null; /** * The root folder in the media manager to search in. * For more information, see Root Folders in [Terminology](https://dev.wix.com/docs/rest/assets/media/media-manager/introduction#terminology). * * Default: `MEDIA_ROOT`. */ rootFolder?: RootFolderWithLiterals; /** * File media type. * @maxSize 30 */ mediaTypes?: MediaTypeWithLiterals[]; /** * Whether to return only private or only public files. * + `true`: Returns only private files. * + `false`: Returns only public files. * + `undefined`: Returns public and private files. * * Learn more [about private files](https://dev.wix.com/docs/api-reference/assets/media/media-manager/files/private-files). */ private?: boolean | null; /** * Field name and order to sort by. * * One of: * `displayName` * `updatedDate` * `sizeInBytes` * * Default: `updatedDate` in `desc` order. */ sort?: CommonSorting; /** Cursor and paging information. */ paging?: CursorPaging; } /** * Generates a URL for streaming a specific video file in the Media Manager.
* * To stream different assets of the file, specify the `assetKeys` parameter which generates a video streaming URL for each asset. If no assetKey is specified, it defaults to `src`, which generates one video streaming URL in the original file's format and quality. * @public * @requiredField fileId * @param options - Options to use when generating a video file's streaming URL. * @param fileId - File ID. * * You can also pass the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`. * Learn more in the File and Folder IDs article. * @permissionId MEDIA.SITE_MEDIA_FILES_READ * @applicableIdentity APP * @fqn com.wix.media.site_media.v1.FilesService.GenerateVideoStreamingUrl */ declare function generateVideoStreamingUrl(fileId: string, options?: GenerateVideoStreamingUrlOptions): Promise>; interface GenerateVideoStreamingUrlOptions { /** * Video stream format. * * Default: `DASH` */ format?: StreamFormatWithLiterals; /** * Number of minutes until the streaming URL expires.
* * Applies only to private (secure) videos. Public videos are streamed from non-expiring URLs, so this value is ignored for them.
* The streaming token is re-validated on every chunk that is played, so set this longer than the video's play duration.
* Default: `1440` (24 hours). * @min 60 * @max 1440 */ expirationInMinutes?: number | null; } /** * Deletes the specified files from the Media Manager.
* * The deleted files are moved to the Media Manager's trash bin (`TRASH-ROOT` folder) unless permanently deleted. To permanently delete files, specify the `permanent` parameter with the value `true`. Permanently deleting files isn't reversible, so make sure that these files aren't being used in a site or in any other way as the files will no longer be accessible. * * Note the following: * * The specified files can be from different folders. * * Moving multiple files at once is an asynchronous action, and may take time for the changes to appear in the Media Manager. * * Attempting to delete files that are already in the trash bin doesn't result in an error. * * If a site contains deleted media files, the deleted media files still appear on the site as the files are still in the Media Manager (in the trash bin). * * You can use Bulk Restore Files From Trash Bin to restore files from the Media Manager's trash bin. * @public * @requiredField fileIds * @param options - Options to use when deleting files. * @param fileIds - IDs of the files to move to the Media Manager's trash bin. * * You can also pass the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`. * Learn more in the File and Folder IDs article. * @permissionId MEDIA.SITE_MEDIA_FILES_MOVE_TO_TRASH * @applicableIdentity APP * @fqn com.wix.media.site_media.v1.FilesService.BulkDeleteFiles */ declare function bulkDeleteFiles(fileIds: string[], options?: BulkDeleteFilesOptions): Promise; interface BulkDeleteFilesOptions { /** * Whether the specified files are permanently deleted.
* Default: `false` */ permanent?: boolean; } /** * Restores the specified files from the Media Manager's trash bin, and moves them to their original locations in the Media Manager. * @public * @requiredField fileIds * @param fileIds - IDs of the files to restore from the Media Manager's trash bin. * * You can also pass the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`. * Learn more in the File and Folder IDs article. * @permissionId MEDIA.SITE_MEDIA_FILES_RESTORE_FROM_TRASH * @applicableIdentity APP * @fqn com.wix.media.site_media.v1.FilesService.BulkRestoreFilesFromTrashBin */ declare function bulkRestoreFilesFromTrashBin(fileIds: string[]): Promise; /** * Retrieves a list of files in the Media Manager's trash bin.
* * >**Note:** The Media Manager's trash bin (`TRASH-ROOT` folder) only contains temporarily deleted files, not permanently deleted files. * @public * @param options - Options to use when listing deleted files from the trash bin. * @permissionId MEDIA.SITE_MEDIA_FILES_LIST_DELETED * @applicableIdentity APP * @fqn com.wix.media.site_media.v1.FilesService.ListDeletedFiles */ declare function listDeletedFiles(options?: ListDeletedFilesOptions): Promise & { __validationErrorsType?: ListDeletedFilesValidationErrors; }>; interface ListDeletedFilesOptions { /** * ID of the file's parent folder.
* Default: `media-root`. * @maxLength 100 */ parentFolderId?: string | null; /** * File media type. * @maxSize 30 */ mediaTypes?: MediaTypeWithLiterals[]; /** * Whether to return only private or only public files. * + `true`: Returns only private files. * + `false`: Returns only public files. * + `undefined`: Returns public and private files. * * Learn more [about private files](https://dev.wix.com/docs/api-reference/assets/media/media-manager/files/private-files). */ private?: boolean | null; /** * Field name and order to sort by. One of:
* * `displayName` * * `updatedDate` * * `sizeInBytes` * Default: `updatedDate` in `desc` order. */ sort?: CommonSorting; /** Cursor and paging information. */ paging?: CursorPaging; } /** * Retrieves a list of files in the Media Manager, given the provided [cursor paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language#cursor-paging), filtering, and sorting. * * Query File Descriptors runs with these defaults, which you can override: * * - `updatedDate` is sorted in `DESC` order * - `cursorPaging.limit` is `100` * * Up to 100 files can be returned per request. * * Filterable fields: `mediaType`, `private`, and `state`. Sortable fields: `displayName`, `updatedDate`, and `sizeInBytes`. * * When filtering by `mediaType`, supported values are: `IMAGE`, `VIDEO`, `AUDIO`, `DOCUMENT`, `VECTOR`, `ARCHIVE`, and `MODEL3D`. * * To learn about working with *Query* methods, see * [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language) and * [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging). * @public * @permissionId media:site_media:v1:file_descriptor:query_file_descriptors * @applicableIdentity APP * @fqn com.wix.media.site_media.v1.FilesService.QueryFileDescriptors */ declare function queryFileDescriptors(): FilesQueryBuilder; interface QueryCursorResult { cursors: Cursors; hasNext: () => boolean; hasPrev: () => boolean; length: number; pageSize: number; } interface FilesQueryResult extends QueryCursorResult { items: FileDescriptor[]; query: FilesQueryBuilder; next: () => Promise; prev: () => Promise; } interface FilesQueryBuilder { /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ eq: (propertyName: 'private' | 'mediaType' | 'state', value: any) => FilesQueryBuilder; in: (propertyName: 'mediaType', value: any) => FilesQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */ ascending: (...propertyNames: Array<'displayName' | 'sizeInBytes' | '_updatedDate'>) => FilesQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */ descending: (...propertyNames: Array<'displayName' | 'sizeInBytes' | '_updatedDate'>) => FilesQueryBuilder; /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */ limit: (limit: number) => FilesQueryBuilder; /** @param cursor - A pointer to specific record */ skipTo: (cursor: string) => FilesQueryBuilder; find: () => Promise; } /** * @hidden * @fqn com.wix.media.site_media.v1.FilesService.QueryFileDescriptors * @requiredField query */ declare function typedQueryFileDescriptors(query: FileDescriptorQuery): Promise>; interface FileDescriptorQuerySpec extends QuerySpec { paging: 'cursor'; wql: [ { fields: ['displayName']; operators: []; sort: 'BOTH'; }, { fields: ['sizeInBytes']; operators: []; sort: 'BOTH'; }, { fields: ['private']; operators: ['$eq']; sort: 'NONE'; }, { fields: ['mediaType']; operators: ['$eq', '$in']; sort: 'NONE'; }, { fields: ['_updatedDate']; operators: []; sort: 'BOTH'; }, { fields: ['state']; operators: ['$eq']; sort: 'NONE'; } ]; } type CommonQueryWithEntityContext = Query; type FileDescriptorQuery = { /** Cursor paging options. Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging). */ cursorPaging?: { /** Maximum number of items to return in the results. @max: 100 */ limit?: NonNullable['limit'] | null; /** Pointer to the next or previous page in the list of results. Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request. @maxLength: 16000 */ cursor?: NonNullable['cursor'] | null; }; /** Filter object. Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters). */ filter?: CommonQueryWithEntityContext['filter'] | null; /** Sort object. Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting). @maxSize: 1 */ sort?: { /** Name of the field to sort by. @maxLength: 512 */ fieldName?: NonNullable[number]['fieldName']; /** Sort order. Use `ASC` for ascending order or `DESC` for descending order. Default: `ASC` */ order?: NonNullable[number]['order']; }[]; }; declare const utils: { query: _wix_sdk_types.QueryHelpers; }; export { type AccountInfo, type AccountInfoMetadata, type ActionEvent, type AddressLocation, type AnnotationContext, Application, type ApplicationError, type ApplicationWithLiterals, type Archive, type AudioAdditionalProperties, type AudioAssetAdditionalProperties, type AudioV2, type BaseEventMetadata, type BulkActionMetadata, type BulkAnnotateImageResult, type BulkAnnotateImagesRequest, type BulkAnnotateImagesResponse, type BulkDeleteFilesOptions, type BulkDeleteFilesRequest, type BulkDeleteFilesResponse, type BulkImportFileOptions, type BulkImportFileRequest, type BulkImportFileResponse, type BulkImportFileResult, type BulkImportFilesRequest, type BulkImportFilesResponse, type BulkImportWixVideoFileResult, type BulkImportWixVideoFilesRequest, type BulkImportWixVideoFilesResponse, type BulkInternalImportFilesRequest, type BulkInternalImportFilesResponse, type BulkPublishDraftFileResult, type BulkPublishDraftFilesRequest, type BulkPublishDraftFilesResponse, type BulkRestoreFilesFromTrashBinRequest, type BulkRestoreFilesFromTrashBinResponse, type Color, type ColorRGB, type Colors, type CommonQueryWithEntityContext, CommonSortOrder, type CommonSortOrderWithLiterals, type CommonSorting, ContentDisposition, type ContentDispositionWithLiterals, type CursorPaging, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DocumentAdditionalProperties, type DomainEvent, type DomainEventBodyOneOf, type DownloadUrl, type DraftFilePublished, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type ExternalInfo, type FaceRecognition, type FileAdditionalProperties, type FileAdditionalPropertiesMediaAdditionalPropertiesOneOf, type FileDescriptor, type FileDescriptorFileFailedEnvelope, type FileDescriptorFileReadyEnvelope, type FileDescriptorQuery, type FileDescriptorQuerySpec, type FileFailed, type FileMedia, type FileMediaMediaOneOf, type FileReady, type FilesQueryBuilder, type FilesQueryResult, type FocalPoint, type FontAdditionalProperties, type FontAsset, type FontAssetAdditionalProperties, type FontMedia, type GenerateAnimatedVectorRequest, type GenerateAnimatedVectorResponse, type GenerateFileDownloadUrlOptions, type GenerateFileDownloadUrlRequest, type GenerateFileDownloadUrlResponse, type GenerateFileDownloadUrlValidationErrors, type GenerateFileResumableUploadUrlOptions, type GenerateFileResumableUploadUrlRequest, type GenerateFileResumableUploadUrlResponse, type GenerateFileResumableUploadUrlValidationErrors, type GenerateFileUploadUrlOptions, type GenerateFileUploadUrlRequest, type GenerateFileUploadUrlResponse, type GenerateFileUploadUrlValidationErrors, type GenerateFilesDownloadUrlRequest, type GenerateFilesDownloadUrlResponse, type GeneratePrivateImageUrlRequest, type GeneratePrivateImageUrlResponse, type GenerateVideoStreamingUrlOptions, type GenerateVideoStreamingUrlRequest, type GenerateVideoStreamingUrlResponse, type GenerateWebSocketTokenRequest, type GenerateWebSocketTokenResponse, type GetFileDescriptorRequest, type GetFileDescriptorResponse, type GetFileDescriptorValidationErrors, type GetFileDescriptorsRequest, type GetFileDescriptorsResponse, type GetFileDescriptorsValidationErrors, type GetSiteFileDescriptorsRequest, type GetSiteFileDescriptorsResponse, type IdentificationData, type IdentificationDataIdOneOf, type IdentityInfo, IdentityType, type IdentityTypeWithLiterals, type ImageAdditionalProperties, type ImageAnnotationConfigurations, ImageAnnotationType, type ImageAnnotationTypeWithLiterals, type ImageMedia, type ImageOutputAdditionalProperties, type ImportFileOptions, type ImportFileRequest, type ImportFileResponse, type ImportFileValidationErrors, type ImportSource, type ItemMetadata, type ListDeletedFilesOptions, type ListDeletedFilesRequest, type ListDeletedFilesResponse, type ListDeletedFilesValidationErrors, type ListFilesOptions, type ListFilesRequest, type ListFilesResponse, type ListFilesValidationErrors, type ListRecentItemsRequest, type ListRecentItemsResponse, MediaType, type MediaTypeWithLiterals, type MessageEnvelope, type Model3D, type Model3dAdditionalProperties, Namespace, type NamespaceWithLiterals, OperationStatus, type OperationStatusWithLiterals, type OtherMedia, type PagingMetadataV2, type Plan, type Plans, type QueryFileDescriptorsRequest, type QueryFileDescriptorsResponse, type RestoreInfo, RootFolder, type RootFolderWithLiterals, type SearchFilesCrossSiteRequest, type SearchFilesCrossSiteResponse, type SearchFilesOptions, type SearchFilesRequest, type SearchFilesResponse, type SearchFilesValidationErrors, type ServiceError, type SiteQuotaExceededError, SortOrder, type SortOrderWithLiterals, type Sorting, State, type StateWithLiterals, StreamFormat, type StreamFormatWithLiterals, type SyncImportFileDescriptorRequest, type SyncImportFileDescriptorResponse, type SyncImportFileRequest, type SyncImportFileResponse, type TotalQuota, type UnsupportedRequestValueError, type UpdateFileDescriptorRequest, type UpdateFileDescriptorResponse, type UpdateFileDescriptorValidationErrors, type UpdateFileRequest, type UpdateFileResponse, UploadProtocol, type UploadProtocolWithLiterals, type VideoAdditionalProperties, type VideoResolution, type VideoResolutionAdditionalProperties, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, type WixVideoFileToImport, bulkDeleteFiles, bulkImportFile, bulkImportFiles, bulkRestoreFilesFromTrashBin, generateFileDownloadUrl, generateFileResumableUploadUrl, generateFileUploadUrl, generateFilesDownloadUrl, generateVideoStreamingUrl, getFileDescriptor, getFileDescriptors, importFile, listDeletedFiles, listFiles, onFileDescriptorFileFailed, onFileDescriptorFileReady, queryFileDescriptors, searchFiles, typedQueryFileDescriptors, updateFileDescriptor, utils };