@wix/media 1.0.49 → 1.0.51

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. package/build/cjs/src/media-site-media-v1-file-descriptor.http.d.ts +83 -34
  2. package/build/cjs/src/media-site-media-v1-file-descriptor.http.js +83 -34
  3. package/build/cjs/src/media-site-media-v1-file-descriptor.http.js.map +1 -1
  4. package/build/cjs/src/media-site-media-v1-file-descriptor.universal.d.ts +121 -63
  5. package/build/cjs/src/media-site-media-v1-file-descriptor.universal.js +72 -32
  6. package/build/cjs/src/media-site-media-v1-file-descriptor.universal.js.map +1 -1
  7. package/build/cjs/src/media-site-media-v1-folder.http.d.ts +35 -6
  8. package/build/cjs/src/media-site-media-v1-folder.http.js +35 -6
  9. package/build/cjs/src/media-site-media-v1-folder.http.js.map +1 -1
  10. package/build/cjs/src/media-site-media-v1-folder.universal.d.ts +55 -27
  11. package/build/cjs/src/media-site-media-v1-folder.universal.js +26 -5
  12. package/build/cjs/src/media-site-media-v1-folder.universal.js.map +1 -1
  13. package/build/es/src/media-site-media-v1-file-descriptor.http.d.ts +83 -34
  14. package/build/es/src/media-site-media-v1-file-descriptor.http.js +83 -34
  15. package/build/es/src/media-site-media-v1-file-descriptor.http.js.map +1 -1
  16. package/build/es/src/media-site-media-v1-file-descriptor.universal.d.ts +121 -63
  17. package/build/es/src/media-site-media-v1-file-descriptor.universal.js +72 -32
  18. package/build/es/src/media-site-media-v1-file-descriptor.universal.js.map +1 -1
  19. package/build/es/src/media-site-media-v1-folder.http.d.ts +35 -6
  20. package/build/es/src/media-site-media-v1-folder.http.js +35 -6
  21. package/build/es/src/media-site-media-v1-folder.http.js.map +1 -1
  22. package/build/es/src/media-site-media-v1-folder.universal.d.ts +55 -27
  23. package/build/es/src/media-site-media-v1-folder.universal.js +26 -5
  24. package/build/es/src/media-site-media-v1-folder.universal.js.map +1 -1
  25. package/package.json +2 -2
@@ -356,9 +356,9 @@ export interface FileReady {
356
356
  triggeredByUndelete?: boolean;
357
357
  }
358
358
  export interface ExternalInfo {
359
- /** External information to pass in the [File Ready](https://dev.wix.com/api/rest/media/media-manager/files/file-ready-domain-event) or [File Failed](https://dev.wix.com/api/rest/media/media-manager/files/file-failed-domain-event) events. */
359
+ /** External information to pass in the File Ready or File Failed events. */
360
360
  origin?: string;
361
- /** External IDs to pass in the [File Ready](https://dev.wix.com/api/rest/media/media-manager/files/file-ready-domain-event) or [File Failed](https://dev.wix.com/api/rest/media/media-manager/files/file-failed-domain-event) events. */
361
+ /** External IDs to pass in the File Ready or File Failed events. */
362
362
  externalIds?: string[];
363
363
  }
364
364
  export interface FileFailed {
@@ -641,11 +641,13 @@ export interface ListFilesRequest {
641
641
  /** Whether the link to the imported file is public or private. */
642
642
  private?: boolean | null;
643
643
  /**
644
- * Field name and order to sort by. One of: <br />
645
- * * `displayName`
646
- * * `updatedDate`
647
- * * `sizeInBytes`
648
- * Default: `updatedDate` in `desc` order.
644
+ * Field name and order to sort by. One of:
645
+ *
646
+ * - `displayName`
647
+ * - `_updatedDate`
648
+ * - `sizeInBytes`
649
+ *
650
+ * Default: `_updatedDate` in `"DESC"` order.
649
651
  */
650
652
  sort?: Sorting;
651
653
  /** Cursor and paging information. */
@@ -713,11 +715,13 @@ export interface SearchFilesRequest {
713
715
  /** Whether the link to the imported file is public or private. */
714
716
  private?: boolean | null;
715
717
  /**
716
- * Field name and order to sort by. One of: <br />
717
- * * `displayName`
718
- * * `updatedDate`
719
- * * `sizeInBytes`
720
- * Default: `updatedDate` in `desc` order.
718
+ * Field name and order to sort by. One of:
719
+ *
720
+ * - `displayName`
721
+ * - `_updatedDate`
722
+ * - `sizeInBytes`
723
+ *
724
+ * Default: `_updatedDate` in `"DESC"` order.
721
725
  */
722
726
  sort?: Sorting;
723
727
  /** Cursor and paging information. */
@@ -789,11 +793,13 @@ export interface ListDeletedFilesRequest {
789
793
  /** Whether the link to the imported file is public or private. */
790
794
  private?: boolean | null;
791
795
  /**
792
- * Field name and order to sort by. One of: <br />
793
- * * `displayName`
794
- * * `updatedDate`
795
- * * `sizeInBytes`
796
- * Default: `updatedDate` in `desc` order.
796
+ * Field name and order to sort by. One of:
797
+ *
798
+ * - `displayName`
799
+ * - `_updatedDate`
800
+ * - `sizeInBytes`
801
+ *
802
+ * Default: `_updatedDate` in `"DESC"` order.
797
803
  */
798
804
  sort?: Sorting;
799
805
  /** Cursor and paging information. */
@@ -1377,6 +1383,8 @@ export interface ListDeletedFilesResponseNonNullableFields {
1377
1383
  /**
1378
1384
  * Generates a URL for downloading a compressed file containing specific files in the Media Manager.
1379
1385
  *
1386
+ * The `generateFilesDownloadUrl()` function returns a Promise that resolves to a download URL.
1387
+ *
1380
1388
  * The compressed file can contain up to 1000 files.
1381
1389
  * @param fileIds - IDs of the files to download.
1382
1390
  * @public
@@ -1390,10 +1398,12 @@ export declare function generateFilesDownloadUrl(fileIds: string[]): Promise<Gen
1390
1398
  /**
1391
1399
  * Generates one or more temporary URLs for downloading a specific file in the Media Manager.
1392
1400
  *
1401
+ * The `generateFileDownloadUrl()` function returns a Promise that resolves to an array containing download URLs for the assets specified in the options parameter.
1402
+ *
1393
1403
  * To download different assets of the file, use the `assetKeys` parameter which generates a download URL for each asset.
1394
- * If no `assetKey` is specified, it defaults to `src`, which generates one download URL in the original file's format and quality.
1404
+ * If no asset key is specified, it defaults to `src`, which generates one download URL in the original file's format and quality.
1395
1405
  *
1396
- * Use this endpoint to grant external clients access to a private media file. Use the `expirationInMinutes` parameter to set the URL expiration time, and the `expirationRedirectUrl` parameter to add a redirect url when the URL expires.
1406
+ * Use this endpoint to grant external clients access to a private media file. Use the `expirationInMinutes` parameter to set the URL expiration time, and the `expirationRedirectUrl` parameter to add a redirect URL when the URL expires.
1397
1407
  * @param fileId - File ID.
1398
1408
  * @public
1399
1409
  * @requiredField fileId
@@ -1438,6 +1448,11 @@ export interface GenerateFileDownloadUrlOptions {
1438
1448
  }
1439
1449
  /**
1440
1450
  * Gets information about the specified file in the Media Manager.
1451
+ *
1452
+ *
1453
+ * The `getFileDescriptor()` function returns a Promise that resolves to the specified file's descriptor.
1454
+ *
1455
+ * Use `getFileDescriptors()` to get multiple file descriptors at once.
1441
1456
  * @param fileId - File ID.
1442
1457
  * @public
1443
1458
  * @documentationMaturity preview
@@ -1451,6 +1466,11 @@ export interface GenerateFileDownloadUrlOptions {
1451
1466
  export declare function getFileDescriptor(fileId: string): Promise<FileDescriptor & NonNullable<GetFileDescriptorResponseNonNullableFields>['file']>;
1452
1467
  /**
1453
1468
  * Gets information about the specified files in the Media Manager.
1469
+ *
1470
+ *
1471
+ * The `getFileDescriptors()` function returns a Promise that resolves to an array containing the specified files' descriptors.
1472
+ *
1473
+ * Use `getFileDescriptor()` to get a single file descriptor.
1454
1474
  * @param fileIds - File IDs.
1455
1475
  * @public
1456
1476
  * @documentationMaturity preview
@@ -1462,7 +1482,10 @@ export declare function getFileDescriptor(fileId: string): Promise<FileDescripto
1462
1482
  */
1463
1483
  export declare function getFileDescriptors(fileIds: string[]): Promise<GetFileDescriptorsResponse & GetFileDescriptorsResponseNonNullableFields>;
1464
1484
  /**
1465
- * Updates a file. <br />
1485
+ * Updates a file.
1486
+ *
1487
+ *
1488
+ * The `updateFileDescriptor()` function returns a Promise that resolves to the updated file's descriptor.
1466
1489
  *
1467
1490
  * You can use the `parentFolderId` parameter to move a file from its current folder to a different folder.
1468
1491
  * @param _id - File ID. Generated when a file is uploaded to the Media Manager.
@@ -1566,9 +1589,11 @@ export interface UpdateFileDescriptorFile {
1566
1589
  /**
1567
1590
  * Generates an upload URL to allow external clients to upload a file to the Media Manager.
1568
1591
  *
1592
+ * The `generateFileUploadUrl()` function returns a Promise that resolves to an upload URL.
1593
+ *
1569
1594
  * To learn how external clients can use the generated upload URL in the response to upload a file to the Media Manager, see the Upload API article.
1570
1595
  *
1571
- * > **Note:** Any interruption in the upload process stops the file upload. For files larger than 10MB, or when network connection is poor, use the generateFileResumableUploadUrl() 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.
1596
+ * > **Note:** Any interruption in the upload process stops the file upload. For files larger than 10MB, or when network connection is poor, use `generateFileResumableUploadUrl()` 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.
1572
1597
  * @param mimeType - File mime type.
1573
1598
  * @public
1574
1599
  * @documentationMaturity preview
@@ -1603,9 +1628,11 @@ export interface GenerateFileUploadUrlOptions {
1603
1628
  externalInfo?: ExternalInfo;
1604
1629
  }
1605
1630
  /**
1606
- * Generates a resumable upload URL to allow external clients to easily upload large files over 10MB to the Media Manager.
1631
+ * Generates a resumable upload URL to allow external clients to upload large files over 10MB to the Media Manager.
1632
+ *
1633
+ * The `generateFileResumableUploadUrl()` function returns a Promise that resolves to an upload URL, token, and protocol.
1607
1634
  *
1608
- * 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.
1635
+ * When using the resumable upload URL, any interruptions will pause the file upload process, which automatically resumes once the interruption is resolved. The resumable upload URL is also helpful when network connection is poor.
1609
1636
  *
1610
1637
  * To learn how external clients can use the generated upload URL in the response to upload large files to the Media Manager, see the Resumable Upload API article.
1611
1638
  * @param mimeType - File mime type.
@@ -1646,19 +1673,18 @@ export interface GenerateFileResumableUploadUrlOptions {
1646
1673
  uploadProtocol?: UploadProtocol;
1647
1674
  }
1648
1675
  /**
1649
- * Imports a file to the Media Manager using an external url.
1676
+ * Imports a file to the Media Manager using an external URL.
1650
1677
  *
1651
- * This function returns information about the imported file.
1678
+ * The `importFile()` function returns a Promise that resolves to the imported file's descriptor.
1679
+ *
1680
+ * This function returns information about the imported file. Importing a file is the method through which you can add files to the Media Manager.
1652
1681
  * Use the `parentFolderId` parameter to specify which folder you want the file to be imported to.
1653
1682
  * If no folder is specified, the file is imported to the `media-root` folder.
1654
1683
  *
1655
- * To import a file, you need to provide one of the following:
1656
- * 1. Pass the file's [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) in the `mimeType` parameter of the request. For example, `'image/png'`.
1657
- * 2. Pass the file's name and extension. For example, `'my-image.png'`.
1658
- * 3. If you don't know the file's extension or MIME type, pass its [media type](https://support.wix.com/en/article/wix-media-supported-media-file-types-and-file-sizes) in the `mediaType` parameter of the request. For example, `'IMAGE'`. Note that this option only works if the server hosting the media allows a 'HEAD' request.
1659
- *
1660
- * >**Note:** The `media` property isn't returned in the `files` response object.
1661
- *
1684
+ * To import a file, you need to pass one of the following:
1685
+ * - The file's [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) in the `mimeType` parameter of the request. For example, `'image/png'`.
1686
+ * - The file's name and extension. For example, `'my-image.png'`.
1687
+ * - If you don't know the file's extension or MIME type, its [media type](https://support.wix.com/en/article/wix-media-supported-media-file-types-and-file-sizes) in the `mediaType` parameter of the request. For example, `'IMAGE'`. Note that this option only works if the server hosting the media allows a 'HEAD' request.
1662
1688
  * @param url - Publicly accessible external file URL.
1663
1689
  * @public
1664
1690
  * @documentationMaturity preview
@@ -1701,15 +1727,17 @@ export interface ImportFileOptions {
1701
1727
  * > This function has been replaced with `bulkImportFile()`, and will be removed on March 31, 2024.
1702
1728
  *
1703
1729
  *
1730
+ * The `bulkImportFiles()` function returns a Promise that resolves to an array of the imported files' descriptors.
1731
+ *
1704
1732
  * Imports a bulk of files to the Media Manager using external urls.
1705
1733
  *
1706
1734
  * Returns information about the imported files. Use the `parentFolderId` parameter to specify in which folder you want each file to be imported.
1707
1735
  * If no folder is specified, the file is imported to the `media-root` folder.
1708
1736
  *
1709
- * To import files, you need to provide one of the following:
1710
- * 1. Pass each file's [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) in the `mimeType` parameter of the request. For example, `'image/png'`.
1711
- * 2. Pass each file's name and extension. For example, `'my-image.png'`.
1712
- * 3. If you don't know a file's extension or MIME type, pass its [media type](https://support.wix.com/en/article/wix-media-supported-media-file-types-and-file-sizes) in the `mediaType` parameter of the request. For example, `'IMAGE'`. Note that this option only works if the server hosting the media allows a 'HEAD' request.
1737
+ * To import a file, you need to pass one of the following:
1738
+ * - The file's [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) in the `mimeType` parameter of the request. For example, `'image/png'`.
1739
+ * - The file's name and extension. For example, `'my-image.png'`.
1740
+ * - If you don't know the file's extension or MIME type, its [media type](https://support.wix.com/en/article/wix-media-supported-media-file-types-and-file-sizes) in the `mediaType` parameter of the request. For example, `'IMAGE'`. Note that this option only works if the server hosting the media allows a 'HEAD' request.
1713
1741
  *
1714
1742
  * >**Note:** The `media` property isn't returned in the `files` response object.
1715
1743
  * @param importFileRequests - Information about the files to import.
@@ -1724,22 +1752,23 @@ export interface ImportFileOptions {
1724
1752
  */
1725
1753
  export declare function bulkImportFiles(importFileRequests: ImportFileRequest[]): Promise<BulkImportFilesResponse & BulkImportFilesResponseNonNullableFields>;
1726
1754
  /**
1727
- * Imports a bulk of files to the Media Manager using external urls. <br/>
1755
+ * Imports a bulk of files to the Media Manager using external urls.
1728
1756
  *
1729
- * Returns information about the imported files. Use the `parentFolderId` parameter to specify in which folder you want each file to be imported to.
1730
- * If no folder is specified, the file is imported to the `media-root` folder.
1757
+ * The `bulkImportFile()` function returns a Promise that resolves to an object containing bulk import metadata and an array of imported files' descriptors and metadata.
1731
1758
  *
1732
- * To import files, you need to provide one of the following:
1733
- * 1. Pass each file's [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) in the `mimeType` parameter of the request. For example, 'image/png'.
1734
- * 2. Pass each file's name and extension. For example, 'my-image.png'.
1735
- * 3. If you don't know a file's extension or MIME type, pass its media type in the `mediaType` parameter of the request. For example, 'IMAGE'. Note that this option only works if the server hosting the media allows a 'HEAD' request.
1759
+ * Returns information about the imported files. Use the `parentFolderId` parameter to specify in which folder you want each file to be imported.
1760
+ * If no folder is specified, the file is imported to the `media-root` folder.
1736
1761
  *
1737
- * >**Note:** The `media` property isn't returned in the `files` response object.
1762
+ * To import a file, you need to pass one of the following:
1763
+ * - The file's [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) in the `mimeType` parameter of the request. For example, `'image/png'`.
1764
+ * - The file's name and extension. For example, `'my-image.png'`.
1765
+ * - If you don't know the file's extension or MIME type, its [media type](https://support.wix.com/en/article/wix-media-supported-media-file-types-and-file-sizes) in the `mediaType` parameter of the request. For example, `'IMAGE'`. Note that this option only works if the server hosting the media allows a 'HEAD' request.
1738
1766
  * @param importFileRequests - Information about the files to import.
1739
1767
  * @public
1740
1768
  * @documentationMaturity preview
1741
1769
  * @requiredField importFileRequests
1742
1770
  * @requiredField importFileRequests.url
1771
+ * @param options - Options to include the file descriptor in the response.
1743
1772
  * @permissionScope Manage Bookings Services and Settings
1744
1773
  * @permissionScope Manage Media Manager
1745
1774
  * @applicableIdentity APP
@@ -1756,7 +1785,11 @@ export interface BulkImportFileOptions {
1756
1785
  /**
1757
1786
  * Retrieves a list of files in the Media Manager.
1758
1787
  *
1788
+ * The `listFiles()` function returns a Promise that resolves to an array of the specified files' descriptors and cursor information.
1789
+ *
1759
1790
  * To retrieve a list of files within a specific folder in the Media Manager, pass the folder's ID in the `parentFolderId` parameter. If no folder is specified, the endpoint retrieves only the list of files in the root folder of the Media Manager.
1791
+ *
1792
+ * To retrieve a list of (non-permanently) deleted files, use the `listDeletedFiles()` function.
1760
1793
  * @public
1761
1794
  * @documentationMaturity preview
1762
1795
  * @param options - Options to use when listing media files.
@@ -1781,11 +1814,13 @@ export interface ListFilesOptions {
1781
1814
  /** Whether the link to the imported file is public or private. */
1782
1815
  private?: boolean | null;
1783
1816
  /**
1784
- * Field name and order to sort by. One of: <br />
1785
- * * `displayName`
1786
- * * `updatedDate`
1787
- * * `sizeInBytes`
1788
- * Default: `updatedDate` in `desc` order.
1817
+ * Field name and order to sort by. One of:
1818
+ *
1819
+ * - `displayName`
1820
+ * - `_updatedDate`
1821
+ * - `sizeInBytes`
1822
+ *
1823
+ * Default: `_updatedDate` in `"DESC"` order.
1789
1824
  */
1790
1825
  sort?: Sorting;
1791
1826
  /** Cursor and paging information. */
@@ -1794,7 +1829,9 @@ export interface ListFilesOptions {
1794
1829
  /**
1795
1830
  * Searches all folders in the Media Manager and returns a list of files that match the terms specified in the optional parameters.
1796
1831
  *
1797
- * If no parameters are specified, the endpoint returns all files in the `MEDIA_ROOT` folder.
1832
+ * The `searchFiles()` function returns a Promise that resolves to an array of the specified files' descriptors and cursor information.
1833
+ *
1834
+ * If no parameters are specified, the function returns all files in the `MEDIA_ROOT` folder.
1798
1835
  * @public
1799
1836
  * @documentationMaturity preview
1800
1837
  * @param options - Options to specify which folders to search.
@@ -1825,14 +1862,20 @@ export interface SearchFilesOptions {
1825
1862
  * Supported values: `"IMAGE"`, `"VIDEO"`, `"AUDIO"`, `"DOCUMENT"`, `"VECTOR"`, `"ARCHIVE"`, `"MODEL3D"`
1826
1863
  */
1827
1864
  mediaTypes?: MediaType[];
1828
- /** Whether the link to the imported file is public or private. */
1865
+ /**
1866
+ * Whether the link to the imported file is public or private.
1867
+ *
1868
+ * Default: `false`.
1869
+ */
1829
1870
  private?: boolean | null;
1830
1871
  /**
1831
- * Field name and order to sort by. One of: <br />
1832
- * * `displayName`
1833
- * * `updatedDate`
1834
- * * `sizeInBytes`
1835
- * Default: `updatedDate` in `desc` order.
1872
+ * Field name and order to sort by. One of:
1873
+ *
1874
+ * - `displayName`
1875
+ * - `_updatedDate`
1876
+ * - `sizeInBytes`
1877
+ *
1878
+ * Default: `_updatedDate` in `"DESC"` order.
1836
1879
  */
1837
1880
  sort?: Sorting;
1838
1881
  /** Cursor and paging information. */
@@ -1840,6 +1883,11 @@ export interface SearchFilesOptions {
1840
1883
  }
1841
1884
  /**
1842
1885
  * Generates a URL for streaming a specific video file in the Media Manager.
1886
+ *
1887
+ *
1888
+ * The `generateVideoStreamingUrl()` function returns a Promise that resolves to a download URL and its asset key.
1889
+ *
1890
+ * To stream different assets of the file, use the `assetKeys` parameter which generates a video streaming URL for each asset. If no asset key is specified, it defaults to `src`, which generates one video streaming URL in the original file's format and quality.
1843
1891
  * @param fileId - File ID.
1844
1892
  * @public
1845
1893
  * @documentationMaturity preview
@@ -1865,7 +1913,9 @@ export interface GenerateVideoStreamingUrlOptions {
1865
1913
  * Deletes the specified files from the Media Manager.
1866
1914
  *
1867
1915
  *
1868
- * The deleted files are moved to the Media Manager's trash bin (`TRASH-ROOT` folder) unless permanently deleted. To permanently delete files, pass 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.
1916
+ * The `bulkDeleteFiles()` function returns a Promise that resolves when the files are deleted.
1917
+ *
1918
+ * The deleted files are moved to the Media Manager's trash bin (`TRASH_ROOT` folder) unless permanently deleted. To permanently delete files, pass 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.
1869
1919
  *
1870
1920
  * >**Notes:**
1871
1921
  * > - The specified files can be from different folders.
@@ -1892,6 +1942,8 @@ export interface BulkDeleteFilesOptions {
1892
1942
  }
1893
1943
  /**
1894
1944
  * Restores the specified files from the Media Manager's trash bin, and moves them to their original locations in the Media Manager.
1945
+ *
1946
+ * The `bulkRestoreFilesFromTrashBin()` function returns a Promise that resolves when the files have been restored.
1895
1947
  * @param fileIds - IDs of the files to restore from the Media Manager's trash bin.
1896
1948
  * @public
1897
1949
  * @documentationMaturity preview
@@ -1904,7 +1956,11 @@ export declare function bulkRestoreFilesFromTrashBin(fileIds: string[]): Promise
1904
1956
  /**
1905
1957
  * Retrieves a list of files in the Media Manager's trash bin.
1906
1958
  *
1907
- * >**Note:** The Media Manager's trash bin (`TRASH-ROOT` folder) only contains temporarily deleted files, not permanently deleted files.
1959
+ * The `listDeletedFiles()` function returns a Promise that resolves to an array of the specified deleted files' descriptors and cursor information.
1960
+ *
1961
+ * >**Note:** The Media Manager's trash bin (`TRASH_ROOT` folder) only contains temporarily deleted files, not permanently deleted files.
1962
+ *
1963
+ * To retrieve a list of non-deleted files, use the `listFiles()` function.
1908
1964
  * @public
1909
1965
  * @documentationMaturity preview
1910
1966
  * @param options - Options to use when listing deleted files from the trash bin.
@@ -1929,11 +1985,13 @@ export interface ListDeletedFilesOptions {
1929
1985
  /** Whether the link to the imported file is public or private. */
1930
1986
  private?: boolean | null;
1931
1987
  /**
1932
- * Field name and order to sort by. One of: <br />
1933
- * * `displayName`
1934
- * * `updatedDate`
1935
- * * `sizeInBytes`
1936
- * Default: `updatedDate` in `desc` order.
1988
+ * Field name and order to sort by. One of:
1989
+ *
1990
+ * - `displayName`
1991
+ * - `_updatedDate`
1992
+ * - `sizeInBytes`
1993
+ *
1994
+ * Default: `_updatedDate` in `"DESC"` order.
1937
1995
  */
1938
1996
  sort?: Sorting;
1939
1997
  /** Cursor and paging information. */
@@ -170,6 +170,8 @@ const _updateFileDescriptorResponse = { file: '_fileDescriptor' };
170
170
  /**
171
171
  * Generates a URL for downloading a compressed file containing specific files in the Media Manager.
172
172
  *
173
+ * The `generateFilesDownloadUrl()` function returns a Promise that resolves to a download URL.
174
+ *
173
175
  * The compressed file can contain up to 1000 files.
174
176
  * @param fileIds - IDs of the files to download.
175
177
  * @public
@@ -225,10 +227,12 @@ export function generateFilesDownloadUrl(fileIds) {
225
227
  /**
226
228
  * Generates one or more temporary URLs for downloading a specific file in the Media Manager.
227
229
  *
230
+ * The `generateFileDownloadUrl()` function returns a Promise that resolves to an array containing download URLs for the assets specified in the options parameter.
231
+ *
228
232
  * To download different assets of the file, use the `assetKeys` parameter which generates a download URL for each asset.
229
- * If no `assetKey` is specified, it defaults to `src`, which generates one download URL in the original file's format and quality.
233
+ * If no asset key is specified, it defaults to `src`, which generates one download URL in the original file's format and quality.
230
234
  *
231
- * Use this endpoint to grant external clients access to a private media file. Use the `expirationInMinutes` parameter to set the URL expiration time, and the `expirationRedirectUrl` parameter to add a redirect url when the URL expires.
235
+ * Use this endpoint to grant external clients access to a private media file. Use the `expirationInMinutes` parameter to set the URL expiration time, and the `expirationRedirectUrl` parameter to add a redirect URL when the URL expires.
232
236
  * @param fileId - File ID.
233
237
  * @public
234
238
  * @requiredField fileId
@@ -290,6 +294,11 @@ export function generateFileDownloadUrl(fileId, options) {
290
294
  }
291
295
  /**
292
296
  * Gets information about the specified file in the Media Manager.
297
+ *
298
+ *
299
+ * The `getFileDescriptor()` function returns a Promise that resolves to the specified file's descriptor.
300
+ *
301
+ * Use `getFileDescriptors()` to get multiple file descriptors at once.
293
302
  * @param fileId - File ID.
294
303
  * @public
295
304
  * @documentationMaturity preview
@@ -351,6 +360,11 @@ export function getFileDescriptor(fileId) {
351
360
  }
352
361
  /**
353
362
  * Gets information about the specified files in the Media Manager.
363
+ *
364
+ *
365
+ * The `getFileDescriptors()` function returns a Promise that resolves to an array containing the specified files' descriptors.
366
+ *
367
+ * Use `getFileDescriptor()` to get a single file descriptor.
354
368
  * @param fileIds - File IDs.
355
369
  * @public
356
370
  * @documentationMaturity preview
@@ -410,7 +424,10 @@ export function getFileDescriptors(fileIds) {
410
424
  });
411
425
  }
412
426
  /**
413
- * Updates a file. <br />
427
+ * Updates a file.
428
+ *
429
+ *
430
+ * The `updateFileDescriptor()` function returns a Promise that resolves to the updated file's descriptor.
414
431
  *
415
432
  * You can use the `parentFolderId` parameter to move a file from its current folder to a different folder.
416
433
  * @param _id - File ID. Generated when a file is uploaded to the Media Manager.
@@ -482,9 +499,11 @@ export function updateFileDescriptor(_id, file) {
482
499
  /**
483
500
  * Generates an upload URL to allow external clients to upload a file to the Media Manager.
484
501
  *
502
+ * The `generateFileUploadUrl()` function returns a Promise that resolves to an upload URL.
503
+ *
485
504
  * To learn how external clients can use the generated upload URL in the response to upload a file to the Media Manager, see the Upload API article.
486
505
  *
487
- * > **Note:** Any interruption in the upload process stops the file upload. For files larger than 10MB, or when network connection is poor, use the generateFileResumableUploadUrl() 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.
506
+ * > **Note:** Any interruption in the upload process stops the file upload. For files larger than 10MB, or when network connection is poor, use `generateFileResumableUploadUrl()` 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.
488
507
  * @param mimeType - File mime type.
489
508
  * @public
490
509
  * @documentationMaturity preview
@@ -547,9 +566,11 @@ export function generateFileUploadUrl(mimeType, options) {
547
566
  });
548
567
  }
549
568
  /**
550
- * Generates a resumable upload URL to allow external clients to easily upload large files over 10MB to the Media Manager.
569
+ * Generates a resumable upload URL to allow external clients to upload large files over 10MB to the Media Manager.
551
570
  *
552
- * 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.
571
+ * The `generateFileResumableUploadUrl()` function returns a Promise that resolves to an upload URL, token, and protocol.
572
+ *
573
+ * When using the resumable upload URL, any interruptions will pause the file upload process, which automatically resumes once the interruption is resolved. The resumable upload URL is also helpful when network connection is poor.
553
574
  *
554
575
  * To learn how external clients can use the generated upload URL in the response to upload large files to the Media Manager, see the Resumable Upload API article.
555
576
  * @param mimeType - File mime type.
@@ -614,19 +635,18 @@ export function generateFileResumableUploadUrl(mimeType, options) {
614
635
  });
615
636
  }
616
637
  /**
617
- * Imports a file to the Media Manager using an external url.
638
+ * Imports a file to the Media Manager using an external URL.
639
+ *
640
+ * The `importFile()` function returns a Promise that resolves to the imported file's descriptor.
618
641
  *
619
- * This function returns information about the imported file.
642
+ * This function returns information about the imported file. Importing a file is the method through which you can add files to the Media Manager.
620
643
  * Use the `parentFolderId` parameter to specify which folder you want the file to be imported to.
621
644
  * If no folder is specified, the file is imported to the `media-root` folder.
622
645
  *
623
- * To import a file, you need to provide one of the following:
624
- * 1. Pass the file's [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) in the `mimeType` parameter of the request. For example, `'image/png'`.
625
- * 2. Pass the file's name and extension. For example, `'my-image.png'`.
626
- * 3. If you don't know the file's extension or MIME type, pass its [media type](https://support.wix.com/en/article/wix-media-supported-media-file-types-and-file-sizes) in the `mediaType` parameter of the request. For example, `'IMAGE'`. Note that this option only works if the server hosting the media allows a 'HEAD' request.
627
- *
628
- * >**Note:** The `media` property isn't returned in the `files` response object.
629
- *
646
+ * To import a file, you need to pass one of the following:
647
+ * - The file's [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) in the `mimeType` parameter of the request. For example, `'image/png'`.
648
+ * - The file's name and extension. For example, `'my-image.png'`.
649
+ * - If you don't know the file's extension or MIME type, its [media type](https://support.wix.com/en/article/wix-media-supported-media-file-types-and-file-sizes) in the `mediaType` parameter of the request. For example, `'IMAGE'`. Note that this option only works if the server hosting the media allows a 'HEAD' request.
630
650
  * @param url - Publicly accessible external file URL.
631
651
  * @public
632
652
  * @documentationMaturity preview
@@ -702,15 +722,17 @@ export function importFile(url, options) {
702
722
  * > This function has been replaced with `bulkImportFile()`, and will be removed on March 31, 2024.
703
723
  *
704
724
  *
725
+ * The `bulkImportFiles()` function returns a Promise that resolves to an array of the imported files' descriptors.
726
+ *
705
727
  * Imports a bulk of files to the Media Manager using external urls.
706
728
  *
707
729
  * Returns information about the imported files. Use the `parentFolderId` parameter to specify in which folder you want each file to be imported.
708
730
  * If no folder is specified, the file is imported to the `media-root` folder.
709
731
  *
710
- * To import files, you need to provide one of the following:
711
- * 1. Pass each file's [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) in the `mimeType` parameter of the request. For example, `'image/png'`.
712
- * 2. Pass each file's name and extension. For example, `'my-image.png'`.
713
- * 3. If you don't know a file's extension or MIME type, pass its [media type](https://support.wix.com/en/article/wix-media-supported-media-file-types-and-file-sizes) in the `mediaType` parameter of the request. For example, `'IMAGE'`. Note that this option only works if the server hosting the media allows a 'HEAD' request.
732
+ * To import a file, you need to pass one of the following:
733
+ * - The file's [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) in the `mimeType` parameter of the request. For example, `'image/png'`.
734
+ * - The file's name and extension. For example, `'my-image.png'`.
735
+ * - If you don't know the file's extension or MIME type, its [media type](https://support.wix.com/en/article/wix-media-supported-media-file-types-and-file-sizes) in the `mediaType` parameter of the request. For example, `'IMAGE'`. Note that this option only works if the server hosting the media allows a 'HEAD' request.
714
736
  *
715
737
  * >**Note:** The `media` property isn't returned in the `files` response object.
716
738
  * @param importFileRequests - Information about the files to import.
@@ -773,22 +795,23 @@ export function bulkImportFiles(importFileRequests) {
773
795
  });
774
796
  }
775
797
  /**
776
- * Imports a bulk of files to the Media Manager using external urls. <br/>
798
+ * Imports a bulk of files to the Media Manager using external urls.
777
799
  *
778
- * Returns information about the imported files. Use the `parentFolderId` parameter to specify in which folder you want each file to be imported to.
779
- * If no folder is specified, the file is imported to the `media-root` folder.
800
+ * The `bulkImportFile()` function returns a Promise that resolves to an object containing bulk import metadata and an array of imported files' descriptors and metadata.
780
801
  *
781
- * To import files, you need to provide one of the following:
782
- * 1. Pass each file's [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) in the `mimeType` parameter of the request. For example, 'image/png'.
783
- * 2. Pass each file's name and extension. For example, 'my-image.png'.
784
- * 3. If you don't know a file's extension or MIME type, pass its media type in the `mediaType` parameter of the request. For example, 'IMAGE'. Note that this option only works if the server hosting the media allows a 'HEAD' request.
802
+ * Returns information about the imported files. Use the `parentFolderId` parameter to specify in which folder you want each file to be imported.
803
+ * If no folder is specified, the file is imported to the `media-root` folder.
785
804
  *
786
- * >**Note:** The `media` property isn't returned in the `files` response object.
805
+ * To import a file, you need to pass one of the following:
806
+ * - The file's [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) in the `mimeType` parameter of the request. For example, `'image/png'`.
807
+ * - The file's name and extension. For example, `'my-image.png'`.
808
+ * - If you don't know the file's extension or MIME type, its [media type](https://support.wix.com/en/article/wix-media-supported-media-file-types-and-file-sizes) in the `mediaType` parameter of the request. For example, `'IMAGE'`. Note that this option only works if the server hosting the media allows a 'HEAD' request.
787
809
  * @param importFileRequests - Information about the files to import.
788
810
  * @public
789
811
  * @documentationMaturity preview
790
812
  * @requiredField importFileRequests
791
813
  * @requiredField importFileRequests.url
814
+ * @param options - Options to include the file descriptor in the response.
792
815
  * @permissionScope Manage Bookings Services and Settings
793
816
  * @permissionScope Manage Media Manager
794
817
  * @applicableIdentity APP
@@ -850,7 +873,11 @@ export function bulkImportFile(importFileRequests, options) {
850
873
  /**
851
874
  * Retrieves a list of files in the Media Manager.
852
875
  *
876
+ * The `listFiles()` function returns a Promise that resolves to an array of the specified files' descriptors and cursor information.
877
+ *
853
878
  * To retrieve a list of files within a specific folder in the Media Manager, pass the folder's ID in the `parentFolderId` parameter. If no folder is specified, the endpoint retrieves only the list of files in the root folder of the Media Manager.
879
+ *
880
+ * To retrieve a list of (non-permanently) deleted files, use the `listDeletedFiles()` function.
854
881
  * @public
855
882
  * @documentationMaturity preview
856
883
  * @param options - Options to use when listing media files.
@@ -917,7 +944,9 @@ export function listFiles(options) {
917
944
  /**
918
945
  * Searches all folders in the Media Manager and returns a list of files that match the terms specified in the optional parameters.
919
946
  *
920
- * If no parameters are specified, the endpoint returns all files in the `MEDIA_ROOT` folder.
947
+ * The `searchFiles()` function returns a Promise that resolves to an array of the specified files' descriptors and cursor information.
948
+ *
949
+ * If no parameters are specified, the function returns all files in the `MEDIA_ROOT` folder.
921
950
  * @public
922
951
  * @documentationMaturity preview
923
952
  * @param options - Options to specify which folders to search.
@@ -984,6 +1013,11 @@ export function searchFiles(options) {
984
1013
  }
985
1014
  /**
986
1015
  * Generates a URL for streaming a specific video file in the Media Manager.
1016
+ *
1017
+ *
1018
+ * The `generateVideoStreamingUrl()` function returns a Promise that resolves to a download URL and its asset key.
1019
+ *
1020
+ * To stream different assets of the file, use the `assetKeys` parameter which generates a video streaming URL for each asset. If no asset key is specified, it defaults to `src`, which generates one video streaming URL in the original file's format and quality.
987
1021
  * @param fileId - File ID.
988
1022
  * @public
989
1023
  * @documentationMaturity preview
@@ -1042,7 +1076,9 @@ export function generateVideoStreamingUrl(fileId, options) {
1042
1076
  * Deletes the specified files from the Media Manager.
1043
1077
  *
1044
1078
  *
1045
- * The deleted files are moved to the Media Manager's trash bin (`TRASH-ROOT` folder) unless permanently deleted. To permanently delete files, pass 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.
1079
+ * The `bulkDeleteFiles()` function returns a Promise that resolves when the files are deleted.
1080
+ *
1081
+ * The deleted files are moved to the Media Manager's trash bin (`TRASH_ROOT` folder) unless permanently deleted. To permanently delete files, pass 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.
1046
1082
  *
1047
1083
  * >**Notes:**
1048
1084
  * > - The specified files can be from different folders.
@@ -1094,7 +1130,6 @@ export function bulkDeleteFiles(fileIds, options) {
1094
1130
  try {
1095
1131
  const result = yield httpClient.request(reqOpts);
1096
1132
  (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
1097
- return fromJSON(result.data);
1098
1133
  }
1099
1134
  catch (err) {
1100
1135
  const transformedError = transformError(err, requestTransformation, [
@@ -1108,6 +1143,8 @@ export function bulkDeleteFiles(fileIds, options) {
1108
1143
  }
1109
1144
  /**
1110
1145
  * Restores the specified files from the Media Manager's trash bin, and moves them to their original locations in the Media Manager.
1146
+ *
1147
+ * The `bulkRestoreFilesFromTrashBin()` function returns a Promise that resolves when the files have been restored.
1111
1148
  * @param fileIds - IDs of the files to restore from the Media Manager's trash bin.
1112
1149
  * @public
1113
1150
  * @documentationMaturity preview
@@ -1148,7 +1185,6 @@ export function bulkRestoreFilesFromTrashBin(fileIds) {
1148
1185
  try {
1149
1186
  const result = yield httpClient.request(reqOpts);
1150
1187
  (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
1151
- return fromJSON(result.data);
1152
1188
  }
1153
1189
  catch (err) {
1154
1190
  const transformedError = transformError(err, requestTransformation, [
@@ -1162,7 +1198,11 @@ export function bulkRestoreFilesFromTrashBin(fileIds) {
1162
1198
  /**
1163
1199
  * Retrieves a list of files in the Media Manager's trash bin.
1164
1200
  *
1165
- * >**Note:** The Media Manager's trash bin (`TRASH-ROOT` folder) only contains temporarily deleted files, not permanently deleted files.
1201
+ * The `listDeletedFiles()` function returns a Promise that resolves to an array of the specified deleted files' descriptors and cursor information.
1202
+ *
1203
+ * >**Note:** The Media Manager's trash bin (`TRASH_ROOT` folder) only contains temporarily deleted files, not permanently deleted files.
1204
+ *
1205
+ * To retrieve a list of non-deleted files, use the `listFiles()` function.
1166
1206
  * @public
1167
1207
  * @documentationMaturity preview
1168
1208
  * @param options - Options to use when listing deleted files from the trash bin.