@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. */
@@ -192,6 +192,8 @@ const _updateFileDescriptorResponse = { file: '_fileDescriptor' };
192
192
  /**
193
193
  * Generates a URL for downloading a compressed file containing specific files in the Media Manager.
194
194
  *
195
+ * The `generateFilesDownloadUrl()` function returns a Promise that resolves to a download URL.
196
+ *
195
197
  * The compressed file can contain up to 1000 files.
196
198
  * @param fileIds - IDs of the files to download.
197
199
  * @public
@@ -248,10 +250,12 @@ exports.generateFilesDownloadUrl = generateFilesDownloadUrl;
248
250
  /**
249
251
  * Generates one or more temporary URLs for downloading a specific file in the Media Manager.
250
252
  *
253
+ * The `generateFileDownloadUrl()` function returns a Promise that resolves to an array containing download URLs for the assets specified in the options parameter.
254
+ *
251
255
  * To download different assets of the file, use the `assetKeys` parameter which generates a download URL for each asset.
252
- * If no `assetKey` is specified, it defaults to `src`, which generates one download URL in the original file's format and quality.
256
+ * If no asset key is specified, it defaults to `src`, which generates one download URL in the original file's format and quality.
253
257
  *
254
- * 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.
258
+ * 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.
255
259
  * @param fileId - File ID.
256
260
  * @public
257
261
  * @requiredField fileId
@@ -314,6 +318,11 @@ function generateFileDownloadUrl(fileId, options) {
314
318
  exports.generateFileDownloadUrl = generateFileDownloadUrl;
315
319
  /**
316
320
  * Gets information about the specified file in the Media Manager.
321
+ *
322
+ *
323
+ * The `getFileDescriptor()` function returns a Promise that resolves to the specified file's descriptor.
324
+ *
325
+ * Use `getFileDescriptors()` to get multiple file descriptors at once.
317
326
  * @param fileId - File ID.
318
327
  * @public
319
328
  * @documentationMaturity preview
@@ -376,6 +385,11 @@ function getFileDescriptor(fileId) {
376
385
  exports.getFileDescriptor = getFileDescriptor;
377
386
  /**
378
387
  * Gets information about the specified files in the Media Manager.
388
+ *
389
+ *
390
+ * The `getFileDescriptors()` function returns a Promise that resolves to an array containing the specified files' descriptors.
391
+ *
392
+ * Use `getFileDescriptor()` to get a single file descriptor.
379
393
  * @param fileIds - File IDs.
380
394
  * @public
381
395
  * @documentationMaturity preview
@@ -436,7 +450,10 @@ function getFileDescriptors(fileIds) {
436
450
  }
437
451
  exports.getFileDescriptors = getFileDescriptors;
438
452
  /**
439
- * Updates a file. <br />
453
+ * Updates a file.
454
+ *
455
+ *
456
+ * The `updateFileDescriptor()` function returns a Promise that resolves to the updated file's descriptor.
440
457
  *
441
458
  * You can use the `parentFolderId` parameter to move a file from its current folder to a different folder.
442
459
  * @param _id - File ID. Generated when a file is uploaded to the Media Manager.
@@ -509,9 +526,11 @@ exports.updateFileDescriptor = updateFileDescriptor;
509
526
  /**
510
527
  * Generates an upload URL to allow external clients to upload a file to the Media Manager.
511
528
  *
529
+ * The `generateFileUploadUrl()` function returns a Promise that resolves to an upload URL.
530
+ *
512
531
  * 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.
513
532
  *
514
- * > **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.
533
+ * > **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.
515
534
  * @param mimeType - File mime type.
516
535
  * @public
517
536
  * @documentationMaturity preview
@@ -575,9 +594,11 @@ function generateFileUploadUrl(mimeType, options) {
575
594
  }
576
595
  exports.generateFileUploadUrl = generateFileUploadUrl;
577
596
  /**
578
- * Generates a resumable upload URL to allow external clients to easily upload large files over 10MB to the Media Manager.
597
+ * Generates a resumable upload URL to allow external clients to upload large files over 10MB to the Media Manager.
579
598
  *
580
- * 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.
599
+ * The `generateFileResumableUploadUrl()` function returns a Promise that resolves to an upload URL, token, and protocol.
600
+ *
601
+ * 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.
581
602
  *
582
603
  * 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.
583
604
  * @param mimeType - File mime type.
@@ -643,19 +664,18 @@ function generateFileResumableUploadUrl(mimeType, options) {
643
664
  }
644
665
  exports.generateFileResumableUploadUrl = generateFileResumableUploadUrl;
645
666
  /**
646
- * Imports a file to the Media Manager using an external url.
667
+ * Imports a file to the Media Manager using an external URL.
668
+ *
669
+ * The `importFile()` function returns a Promise that resolves to the imported file's descriptor.
647
670
  *
648
- * This function returns information about the imported file.
671
+ * This function returns information about the imported file. Importing a file is the method through which you can add files to the Media Manager.
649
672
  * Use the `parentFolderId` parameter to specify which folder you want the file to be imported to.
650
673
  * If no folder is specified, the file is imported to the `media-root` folder.
651
674
  *
652
- * To import a file, you need to provide one of the following:
653
- * 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'`.
654
- * 2. Pass the file's name and extension. For example, `'my-image.png'`.
655
- * 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.
656
- *
657
- * >**Note:** The `media` property isn't returned in the `files` response object.
658
- *
675
+ * To import a file, you need to pass one of the following:
676
+ * - 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'`.
677
+ * - The file's name and extension. For example, `'my-image.png'`.
678
+ * - 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.
659
679
  * @param url - Publicly accessible external file URL.
660
680
  * @public
661
681
  * @documentationMaturity preview
@@ -732,15 +752,17 @@ exports.importFile = importFile;
732
752
  * > This function has been replaced with `bulkImportFile()`, and will be removed on March 31, 2024.
733
753
  *
734
754
  *
755
+ * The `bulkImportFiles()` function returns a Promise that resolves to an array of the imported files' descriptors.
756
+ *
735
757
  * Imports a bulk of files to the Media Manager using external urls.
736
758
  *
737
759
  * Returns information about the imported files. Use the `parentFolderId` parameter to specify in which folder you want each file to be imported.
738
760
  * If no folder is specified, the file is imported to the `media-root` folder.
739
761
  *
740
- * To import files, you need to provide one of the following:
741
- * 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'`.
742
- * 2. Pass each file's name and extension. For example, `'my-image.png'`.
743
- * 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.
762
+ * To import a file, you need to pass one of the following:
763
+ * - 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'`.
764
+ * - The file's name and extension. For example, `'my-image.png'`.
765
+ * - 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.
744
766
  *
745
767
  * >**Note:** The `media` property isn't returned in the `files` response object.
746
768
  * @param importFileRequests - Information about the files to import.
@@ -804,22 +826,23 @@ function bulkImportFiles(importFileRequests) {
804
826
  }
805
827
  exports.bulkImportFiles = bulkImportFiles;
806
828
  /**
807
- * Imports a bulk of files to the Media Manager using external urls. <br/>
829
+ * Imports a bulk of files to the Media Manager using external urls.
808
830
  *
809
- * Returns information about the imported files. Use the `parentFolderId` parameter to specify in which folder you want each file to be imported to.
810
- * If no folder is specified, the file is imported to the `media-root` folder.
831
+ * The `bulkImportFile()` function returns a Promise that resolves to an object containing bulk import metadata and an array of imported files' descriptors and metadata.
811
832
  *
812
- * To import files, you need to provide one of the following:
813
- * 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'.
814
- * 2. Pass each file's name and extension. For example, 'my-image.png'.
815
- * 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.
833
+ * Returns information about the imported files. Use the `parentFolderId` parameter to specify in which folder you want each file to be imported.
834
+ * If no folder is specified, the file is imported to the `media-root` folder.
816
835
  *
817
- * >**Note:** The `media` property isn't returned in the `files` response object.
836
+ * To import a file, you need to pass one of the following:
837
+ * - 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'`.
838
+ * - The file's name and extension. For example, `'my-image.png'`.
839
+ * - 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.
818
840
  * @param importFileRequests - Information about the files to import.
819
841
  * @public
820
842
  * @documentationMaturity preview
821
843
  * @requiredField importFileRequests
822
844
  * @requiredField importFileRequests.url
845
+ * @param options - Options to include the file descriptor in the response.
823
846
  * @permissionScope Manage Bookings Services and Settings
824
847
  * @permissionScope Manage Media Manager
825
848
  * @applicableIdentity APP
@@ -882,7 +905,11 @@ exports.bulkImportFile = bulkImportFile;
882
905
  /**
883
906
  * Retrieves a list of files in the Media Manager.
884
907
  *
908
+ * The `listFiles()` function returns a Promise that resolves to an array of the specified files' descriptors and cursor information.
909
+ *
885
910
  * 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.
911
+ *
912
+ * To retrieve a list of (non-permanently) deleted files, use the `listDeletedFiles()` function.
886
913
  * @public
887
914
  * @documentationMaturity preview
888
915
  * @param options - Options to use when listing media files.
@@ -950,7 +977,9 @@ exports.listFiles = listFiles;
950
977
  /**
951
978
  * Searches all folders in the Media Manager and returns a list of files that match the terms specified in the optional parameters.
952
979
  *
953
- * If no parameters are specified, the endpoint returns all files in the `MEDIA_ROOT` folder.
980
+ * The `searchFiles()` function returns a Promise that resolves to an array of the specified files' descriptors and cursor information.
981
+ *
982
+ * If no parameters are specified, the function returns all files in the `MEDIA_ROOT` folder.
954
983
  * @public
955
984
  * @documentationMaturity preview
956
985
  * @param options - Options to specify which folders to search.
@@ -1018,6 +1047,11 @@ function searchFiles(options) {
1018
1047
  exports.searchFiles = searchFiles;
1019
1048
  /**
1020
1049
  * Generates a URL for streaming a specific video file in the Media Manager.
1050
+ *
1051
+ *
1052
+ * The `generateVideoStreamingUrl()` function returns a Promise that resolves to a download URL and its asset key.
1053
+ *
1054
+ * 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.
1021
1055
  * @param fileId - File ID.
1022
1056
  * @public
1023
1057
  * @documentationMaturity preview
@@ -1077,7 +1111,9 @@ exports.generateVideoStreamingUrl = generateVideoStreamingUrl;
1077
1111
  * Deletes the specified files from the Media Manager.
1078
1112
  *
1079
1113
  *
1080
- * 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.
1114
+ * The `bulkDeleteFiles()` function returns a Promise that resolves when the files are deleted.
1115
+ *
1116
+ * 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.
1081
1117
  *
1082
1118
  * >**Notes:**
1083
1119
  * > - The specified files can be from different folders.
@@ -1129,7 +1165,6 @@ function bulkDeleteFiles(fileIds, options) {
1129
1165
  try {
1130
1166
  const result = yield httpClient.request(reqOpts);
1131
1167
  (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
1132
- return fromJSON(result.data);
1133
1168
  }
1134
1169
  catch (err) {
1135
1170
  const transformedError = (0, velo_1.transformError)(err, requestTransformation, [
@@ -1144,6 +1179,8 @@ function bulkDeleteFiles(fileIds, options) {
1144
1179
  exports.bulkDeleteFiles = bulkDeleteFiles;
1145
1180
  /**
1146
1181
  * Restores the specified files from the Media Manager's trash bin, and moves them to their original locations in the Media Manager.
1182
+ *
1183
+ * The `bulkRestoreFilesFromTrashBin()` function returns a Promise that resolves when the files have been restored.
1147
1184
  * @param fileIds - IDs of the files to restore from the Media Manager's trash bin.
1148
1185
  * @public
1149
1186
  * @documentationMaturity preview
@@ -1184,7 +1221,6 @@ function bulkRestoreFilesFromTrashBin(fileIds) {
1184
1221
  try {
1185
1222
  const result = yield httpClient.request(reqOpts);
1186
1223
  (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
1187
- return fromJSON(result.data);
1188
1224
  }
1189
1225
  catch (err) {
1190
1226
  const transformedError = (0, velo_1.transformError)(err, requestTransformation, [
@@ -1199,7 +1235,11 @@ exports.bulkRestoreFilesFromTrashBin = bulkRestoreFilesFromTrashBin;
1199
1235
  /**
1200
1236
  * Retrieves a list of files in the Media Manager's trash bin.
1201
1237
  *
1202
- * >**Note:** The Media Manager's trash bin (`TRASH-ROOT` folder) only contains temporarily deleted files, not permanently deleted files.
1238
+ * The `listDeletedFiles()` function returns a Promise that resolves to an array of the specified deleted files' descriptors and cursor information.
1239
+ *
1240
+ * >**Note:** The Media Manager's trash bin (`TRASH_ROOT` folder) only contains temporarily deleted files, not permanently deleted files.
1241
+ *
1242
+ * To retrieve a list of non-deleted files, use the `listFiles()` function.
1203
1243
  * @public
1204
1244
  * @documentationMaturity preview
1205
1245
  * @param options - Options to use when listing deleted files from the trash bin.