@wix/media 1.0.50 → 1.0.52
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.
- package/build/cjs/index.js +5 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.js +5 -1
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.js +5 -1
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/src/media-site-media-v1-file-descriptor.http.d.ts +83 -34
- package/build/cjs/src/media-site-media-v1-file-descriptor.http.js +433 -350
- package/build/cjs/src/media-site-media-v1-file-descriptor.http.js.map +1 -1
- package/build/cjs/src/media-site-media-v1-file-descriptor.meta.d.ts +1 -1
- package/build/cjs/src/media-site-media-v1-file-descriptor.meta.js +5 -1
- package/build/cjs/src/media-site-media-v1-file-descriptor.meta.js.map +1 -1
- package/build/cjs/src/media-site-media-v1-file-descriptor.public.d.ts +10 -10
- package/build/cjs/src/media-site-media-v1-file-descriptor.types.d.ts +5 -6
- package/build/cjs/src/media-site-media-v1-file-descriptor.types.js +10 -10
- package/build/cjs/src/media-site-media-v1-file-descriptor.types.js.map +1 -1
- package/build/cjs/src/media-site-media-v1-file-descriptor.universal.d.ts +126 -69
- package/build/cjs/src/media-site-media-v1-file-descriptor.universal.js +227 -99
- package/build/cjs/src/media-site-media-v1-file-descriptor.universal.js.map +1 -1
- package/build/cjs/src/media-site-media-v1-folder.http.js +84 -89
- package/build/cjs/src/media-site-media-v1-folder.http.js.map +1 -1
- package/build/cjs/src/media-site-media-v1-folder.meta.d.ts +1 -1
- package/build/cjs/src/media-site-media-v1-folder.meta.js +5 -1
- package/build/cjs/src/media-site-media-v1-folder.meta.js.map +1 -1
- package/build/cjs/src/media-site-media-v1-folder.public.d.ts +5 -5
- package/build/cjs/src/media-site-media-v1-folder.types.d.ts +4 -5
- package/build/cjs/src/media-site-media-v1-folder.types.js +4 -4
- package/build/cjs/src/media-site-media-v1-folder.types.js.map +1 -1
- package/build/cjs/src/media-site-media-v1-folder.universal.d.ts +4 -5
- package/build/cjs/src/media-site-media-v1-folder.universal.js +74 -37
- package/build/cjs/src/media-site-media-v1-folder.universal.js.map +1 -1
- package/build/es/src/media-site-media-v1-file-descriptor.http.d.ts +83 -34
- package/build/es/src/media-site-media-v1-file-descriptor.http.js +433 -350
- package/build/es/src/media-site-media-v1-file-descriptor.http.js.map +1 -1
- package/build/es/src/media-site-media-v1-file-descriptor.meta.d.ts +1 -1
- package/build/es/src/media-site-media-v1-file-descriptor.public.d.ts +10 -10
- package/build/es/src/media-site-media-v1-file-descriptor.types.d.ts +5 -6
- package/build/es/src/media-site-media-v1-file-descriptor.types.js.map +1 -1
- package/build/es/src/media-site-media-v1-file-descriptor.universal.d.ts +126 -69
- package/build/es/src/media-site-media-v1-file-descriptor.universal.js +213 -89
- package/build/es/src/media-site-media-v1-file-descriptor.universal.js.map +1 -1
- package/build/es/src/media-site-media-v1-folder.http.js +84 -89
- package/build/es/src/media-site-media-v1-folder.http.js.map +1 -1
- package/build/es/src/media-site-media-v1-folder.meta.d.ts +1 -1
- package/build/es/src/media-site-media-v1-folder.public.d.ts +5 -5
- package/build/es/src/media-site-media-v1-folder.types.d.ts +4 -5
- package/build/es/src/media-site-media-v1-folder.types.js.map +1 -1
- package/build/es/src/media-site-media-v1-folder.universal.d.ts +4 -5
- package/build/es/src/media-site-media-v1-folder.universal.js +66 -33
- package/build/es/src/media-site-media-v1-folder.universal.js.map +1 -1
- package/package.json +7 -3
|
@@ -210,7 +210,7 @@ export interface VideoResolution {
|
|
|
210
210
|
/**
|
|
211
211
|
* Video format
|
|
212
212
|
* Possible values: ['144p.mp4' '144p.webm' '240p.mp4' '240p.webm' '360p.mp4' '360p.webm' '480p.mp4' '480p.webm'
|
|
213
|
-
* '720p.mp4' '720p.webm' '1080p.mp4' '1080p.webm' ]
|
|
213
|
+
* '720p.mp4' '720p.webm' '1080p.mp4' '1080p.webm', 'hls' ]
|
|
214
214
|
*/
|
|
215
215
|
format?: string;
|
|
216
216
|
}
|
|
@@ -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
|
|
359
|
+
/** External information to pass in the File Ready or File Failed events. */
|
|
360
360
|
origin?: string;
|
|
361
|
-
/** External IDs to pass in the
|
|
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:
|
|
645
|
-
*
|
|
646
|
-
*
|
|
647
|
-
*
|
|
648
|
-
*
|
|
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. */
|
|
@@ -666,13 +668,12 @@ export declare enum SortOrder {
|
|
|
666
668
|
DESC = "DESC"
|
|
667
669
|
}
|
|
668
670
|
export interface CursorPaging {
|
|
669
|
-
/**
|
|
671
|
+
/** Maximum number of items to return in the results. */
|
|
670
672
|
limit?: number | null;
|
|
671
673
|
/**
|
|
672
674
|
* Pointer to the next or previous page in the list of results.
|
|
673
675
|
*
|
|
674
|
-
*
|
|
675
|
-
* from the `pagingMetadata` object in the previous call's response.
|
|
676
|
+
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
676
677
|
* Not relevant for the first request.
|
|
677
678
|
*/
|
|
678
679
|
cursor?: string | null;
|
|
@@ -684,13 +685,13 @@ export interface ListFilesResponse {
|
|
|
684
685
|
nextCursor?: PagingMetadataV2;
|
|
685
686
|
}
|
|
686
687
|
export interface PagingMetadataV2 {
|
|
687
|
-
/** Total number of items that match the query. */
|
|
688
|
+
/** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
|
|
688
689
|
total?: number | null;
|
|
689
690
|
/** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
|
|
690
691
|
cursors?: Cursors;
|
|
691
692
|
}
|
|
692
693
|
export interface Cursors {
|
|
693
|
-
/** Cursor pointing to next page in the list of results. */
|
|
694
|
+
/** Cursor string pointing to the next page in the list of results. */
|
|
694
695
|
next?: string | null;
|
|
695
696
|
}
|
|
696
697
|
export interface SearchFilesRequest {
|
|
@@ -713,11 +714,13 @@ export interface SearchFilesRequest {
|
|
|
713
714
|
/** Whether the link to the imported file is public or private. */
|
|
714
715
|
private?: boolean | null;
|
|
715
716
|
/**
|
|
716
|
-
* Field name and order to sort by. One of:
|
|
717
|
-
*
|
|
718
|
-
*
|
|
719
|
-
*
|
|
720
|
-
*
|
|
717
|
+
* Field name and order to sort by. One of:
|
|
718
|
+
*
|
|
719
|
+
* - `displayName`
|
|
720
|
+
* - `_updatedDate`
|
|
721
|
+
* - `sizeInBytes`
|
|
722
|
+
*
|
|
723
|
+
* Default: `_updatedDate` in `"DESC"` order.
|
|
721
724
|
*/
|
|
722
725
|
sort?: Sorting;
|
|
723
726
|
/** Cursor and paging information. */
|
|
@@ -789,11 +792,13 @@ export interface ListDeletedFilesRequest {
|
|
|
789
792
|
/** Whether the link to the imported file is public or private. */
|
|
790
793
|
private?: boolean | null;
|
|
791
794
|
/**
|
|
792
|
-
* Field name and order to sort by. One of:
|
|
793
|
-
*
|
|
794
|
-
*
|
|
795
|
-
*
|
|
796
|
-
*
|
|
795
|
+
* Field name and order to sort by. One of:
|
|
796
|
+
*
|
|
797
|
+
* - `displayName`
|
|
798
|
+
* - `_updatedDate`
|
|
799
|
+
* - `sizeInBytes`
|
|
800
|
+
*
|
|
801
|
+
* Default: `_updatedDate` in `"DESC"` order.
|
|
797
802
|
*/
|
|
798
803
|
sort?: Sorting;
|
|
799
804
|
/** Cursor and paging information. */
|
|
@@ -1377,6 +1382,8 @@ export interface ListDeletedFilesResponseNonNullableFields {
|
|
|
1377
1382
|
/**
|
|
1378
1383
|
* Generates a URL for downloading a compressed file containing specific files in the Media Manager.
|
|
1379
1384
|
*
|
|
1385
|
+
* The `generateFilesDownloadUrl()` function returns a Promise that resolves to a download URL.
|
|
1386
|
+
*
|
|
1380
1387
|
* The compressed file can contain up to 1000 files.
|
|
1381
1388
|
* @param fileIds - IDs of the files to download.
|
|
1382
1389
|
* @public
|
|
@@ -1390,10 +1397,12 @@ export declare function generateFilesDownloadUrl(fileIds: string[]): Promise<Gen
|
|
|
1390
1397
|
/**
|
|
1391
1398
|
* Generates one or more temporary URLs for downloading a specific file in the Media Manager.
|
|
1392
1399
|
*
|
|
1400
|
+
* The `generateFileDownloadUrl()` function returns a Promise that resolves to an array containing download URLs for the assets specified in the options parameter.
|
|
1401
|
+
*
|
|
1393
1402
|
* To download different assets of the file, use the `assetKeys` parameter which generates a download URL for each asset.
|
|
1394
|
-
* If no
|
|
1403
|
+
* If no asset key is specified, it defaults to `src`, which generates one download URL in the original file's format and quality.
|
|
1395
1404
|
*
|
|
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
|
|
1405
|
+
* 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
1406
|
* @param fileId - File ID.
|
|
1398
1407
|
* @public
|
|
1399
1408
|
* @requiredField fileId
|
|
@@ -1438,6 +1447,11 @@ export interface GenerateFileDownloadUrlOptions {
|
|
|
1438
1447
|
}
|
|
1439
1448
|
/**
|
|
1440
1449
|
* Gets information about the specified file in the Media Manager.
|
|
1450
|
+
*
|
|
1451
|
+
*
|
|
1452
|
+
* The `getFileDescriptor()` function returns a Promise that resolves to the specified file's descriptor.
|
|
1453
|
+
*
|
|
1454
|
+
* Use `getFileDescriptors()` to get multiple file descriptors at once.
|
|
1441
1455
|
* @param fileId - File ID.
|
|
1442
1456
|
* @public
|
|
1443
1457
|
* @documentationMaturity preview
|
|
@@ -1451,6 +1465,11 @@ export interface GenerateFileDownloadUrlOptions {
|
|
|
1451
1465
|
export declare function getFileDescriptor(fileId: string): Promise<FileDescriptor & NonNullable<GetFileDescriptorResponseNonNullableFields>['file']>;
|
|
1452
1466
|
/**
|
|
1453
1467
|
* Gets information about the specified files in the Media Manager.
|
|
1468
|
+
*
|
|
1469
|
+
*
|
|
1470
|
+
* The `getFileDescriptors()` function returns a Promise that resolves to an array containing the specified files' descriptors.
|
|
1471
|
+
*
|
|
1472
|
+
* Use `getFileDescriptor()` to get a single file descriptor.
|
|
1454
1473
|
* @param fileIds - File IDs.
|
|
1455
1474
|
* @public
|
|
1456
1475
|
* @documentationMaturity preview
|
|
@@ -1462,7 +1481,10 @@ export declare function getFileDescriptor(fileId: string): Promise<FileDescripto
|
|
|
1462
1481
|
*/
|
|
1463
1482
|
export declare function getFileDescriptors(fileIds: string[]): Promise<GetFileDescriptorsResponse & GetFileDescriptorsResponseNonNullableFields>;
|
|
1464
1483
|
/**
|
|
1465
|
-
* Updates a file.
|
|
1484
|
+
* Updates a file.
|
|
1485
|
+
*
|
|
1486
|
+
*
|
|
1487
|
+
* The `updateFileDescriptor()` function returns a Promise that resolves to the updated file's descriptor.
|
|
1466
1488
|
*
|
|
1467
1489
|
* You can use the `parentFolderId` parameter to move a file from its current folder to a different folder.
|
|
1468
1490
|
* @param _id - File ID. Generated when a file is uploaded to the Media Manager.
|
|
@@ -1566,9 +1588,11 @@ export interface UpdateFileDescriptorFile {
|
|
|
1566
1588
|
/**
|
|
1567
1589
|
* Generates an upload URL to allow external clients to upload a file to the Media Manager.
|
|
1568
1590
|
*
|
|
1591
|
+
* The `generateFileUploadUrl()` function returns a Promise that resolves to an upload URL.
|
|
1592
|
+
*
|
|
1569
1593
|
* 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
1594
|
*
|
|
1571
|
-
* > **Note:** Any interruption in the upload process stops the file upload. For files larger than 10MB, or when network connection is poor, use
|
|
1595
|
+
* > **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
1596
|
* @param mimeType - File mime type.
|
|
1573
1597
|
* @public
|
|
1574
1598
|
* @documentationMaturity preview
|
|
@@ -1603,9 +1627,11 @@ export interface GenerateFileUploadUrlOptions {
|
|
|
1603
1627
|
externalInfo?: ExternalInfo;
|
|
1604
1628
|
}
|
|
1605
1629
|
/**
|
|
1606
|
-
* Generates a resumable upload URL to allow external clients to
|
|
1630
|
+
* Generates a resumable upload URL to allow external clients to upload large files over 10MB to the Media Manager.
|
|
1631
|
+
*
|
|
1632
|
+
* The `generateFileResumableUploadUrl()` function returns a Promise that resolves to an upload URL, token, and protocol.
|
|
1607
1633
|
*
|
|
1608
|
-
*
|
|
1634
|
+
* 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
1635
|
*
|
|
1610
1636
|
* 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
1637
|
* @param mimeType - File mime type.
|
|
@@ -1646,19 +1672,18 @@ export interface GenerateFileResumableUploadUrlOptions {
|
|
|
1646
1672
|
uploadProtocol?: UploadProtocol;
|
|
1647
1673
|
}
|
|
1648
1674
|
/**
|
|
1649
|
-
* Imports a file to the Media Manager using an external
|
|
1675
|
+
* Imports a file to the Media Manager using an external URL.
|
|
1650
1676
|
*
|
|
1651
|
-
*
|
|
1677
|
+
* The `importFile()` function returns a Promise that resolves to the imported file's descriptor.
|
|
1678
|
+
*
|
|
1679
|
+
* 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
1680
|
* Use the `parentFolderId` parameter to specify which folder you want the file to be imported to.
|
|
1653
1681
|
* If no folder is specified, the file is imported to the `media-root` folder.
|
|
1654
1682
|
*
|
|
1655
|
-
* To import a file, you need to
|
|
1656
|
-
*
|
|
1657
|
-
*
|
|
1658
|
-
*
|
|
1659
|
-
*
|
|
1660
|
-
* >**Note:** The `media` property isn't returned in the `files` response object.
|
|
1661
|
-
*
|
|
1683
|
+
* To import a file, you need to pass one of the following:
|
|
1684
|
+
* - 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'`.
|
|
1685
|
+
* - The file's name and extension. For example, `'my-image.png'`.
|
|
1686
|
+
* - 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
1687
|
* @param url - Publicly accessible external file URL.
|
|
1663
1688
|
* @public
|
|
1664
1689
|
* @documentationMaturity preview
|
|
@@ -1701,15 +1726,17 @@ export interface ImportFileOptions {
|
|
|
1701
1726
|
* > This function has been replaced with `bulkImportFile()`, and will be removed on March 31, 2024.
|
|
1702
1727
|
*
|
|
1703
1728
|
*
|
|
1729
|
+
* The `bulkImportFiles()` function returns a Promise that resolves to an array of the imported files' descriptors.
|
|
1730
|
+
*
|
|
1704
1731
|
* Imports a bulk of files to the Media Manager using external urls.
|
|
1705
1732
|
*
|
|
1706
1733
|
* Returns information about the imported files. Use the `parentFolderId` parameter to specify in which folder you want each file to be imported.
|
|
1707
1734
|
* If no folder is specified, the file is imported to the `media-root` folder.
|
|
1708
1735
|
*
|
|
1709
|
-
* To import
|
|
1710
|
-
*
|
|
1711
|
-
*
|
|
1712
|
-
*
|
|
1736
|
+
* To import a file, you need to pass one of the following:
|
|
1737
|
+
* - 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'`.
|
|
1738
|
+
* - The file's name and extension. For example, `'my-image.png'`.
|
|
1739
|
+
* - 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
1740
|
*
|
|
1714
1741
|
* >**Note:** The `media` property isn't returned in the `files` response object.
|
|
1715
1742
|
* @param importFileRequests - Information about the files to import.
|
|
@@ -1724,22 +1751,23 @@ export interface ImportFileOptions {
|
|
|
1724
1751
|
*/
|
|
1725
1752
|
export declare function bulkImportFiles(importFileRequests: ImportFileRequest[]): Promise<BulkImportFilesResponse & BulkImportFilesResponseNonNullableFields>;
|
|
1726
1753
|
/**
|
|
1727
|
-
* Imports a bulk of files to the Media Manager using external urls.
|
|
1754
|
+
* Imports a bulk of files to the Media Manager using external urls.
|
|
1728
1755
|
*
|
|
1729
|
-
*
|
|
1730
|
-
* If no folder is specified, the file is imported to the `media-root` folder.
|
|
1756
|
+
* 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
1757
|
*
|
|
1732
|
-
*
|
|
1733
|
-
*
|
|
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.
|
|
1758
|
+
* Returns information about the imported files. Use the `parentFolderId` parameter to specify in which folder you want each file to be imported.
|
|
1759
|
+
* If no folder is specified, the file is imported to the `media-root` folder.
|
|
1736
1760
|
*
|
|
1737
|
-
*
|
|
1761
|
+
* To import a file, you need to pass one of the following:
|
|
1762
|
+
* - 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'`.
|
|
1763
|
+
* - The file's name and extension. For example, `'my-image.png'`.
|
|
1764
|
+
* - 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
1765
|
* @param importFileRequests - Information about the files to import.
|
|
1739
1766
|
* @public
|
|
1740
1767
|
* @documentationMaturity preview
|
|
1741
1768
|
* @requiredField importFileRequests
|
|
1742
1769
|
* @requiredField importFileRequests.url
|
|
1770
|
+
* @param options - Options to include the file descriptor in the response.
|
|
1743
1771
|
* @permissionScope Manage Bookings Services and Settings
|
|
1744
1772
|
* @permissionScope Manage Media Manager
|
|
1745
1773
|
* @applicableIdentity APP
|
|
@@ -1756,7 +1784,11 @@ export interface BulkImportFileOptions {
|
|
|
1756
1784
|
/**
|
|
1757
1785
|
* Retrieves a list of files in the Media Manager.
|
|
1758
1786
|
*
|
|
1787
|
+
* The `listFiles()` function returns a Promise that resolves to an array of the specified files' descriptors and cursor information.
|
|
1788
|
+
*
|
|
1759
1789
|
* 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.
|
|
1790
|
+
*
|
|
1791
|
+
* To retrieve a list of (non-permanently) deleted files, use the `listDeletedFiles()` function.
|
|
1760
1792
|
* @public
|
|
1761
1793
|
* @documentationMaturity preview
|
|
1762
1794
|
* @param options - Options to use when listing media files.
|
|
@@ -1781,11 +1813,13 @@ export interface ListFilesOptions {
|
|
|
1781
1813
|
/** Whether the link to the imported file is public or private. */
|
|
1782
1814
|
private?: boolean | null;
|
|
1783
1815
|
/**
|
|
1784
|
-
* Field name and order to sort by. One of:
|
|
1785
|
-
*
|
|
1786
|
-
*
|
|
1787
|
-
*
|
|
1788
|
-
*
|
|
1816
|
+
* Field name and order to sort by. One of:
|
|
1817
|
+
*
|
|
1818
|
+
* - `displayName`
|
|
1819
|
+
* - `_updatedDate`
|
|
1820
|
+
* - `sizeInBytes`
|
|
1821
|
+
*
|
|
1822
|
+
* Default: `_updatedDate` in `"DESC"` order.
|
|
1789
1823
|
*/
|
|
1790
1824
|
sort?: Sorting;
|
|
1791
1825
|
/** Cursor and paging information. */
|
|
@@ -1794,7 +1828,9 @@ export interface ListFilesOptions {
|
|
|
1794
1828
|
/**
|
|
1795
1829
|
* Searches all folders in the Media Manager and returns a list of files that match the terms specified in the optional parameters.
|
|
1796
1830
|
*
|
|
1797
|
-
*
|
|
1831
|
+
* The `searchFiles()` function returns a Promise that resolves to an array of the specified files' descriptors and cursor information.
|
|
1832
|
+
*
|
|
1833
|
+
* If no parameters are specified, the function returns all files in the `MEDIA_ROOT` folder.
|
|
1798
1834
|
* @public
|
|
1799
1835
|
* @documentationMaturity preview
|
|
1800
1836
|
* @param options - Options to specify which folders to search.
|
|
@@ -1825,14 +1861,20 @@ export interface SearchFilesOptions {
|
|
|
1825
1861
|
* Supported values: `"IMAGE"`, `"VIDEO"`, `"AUDIO"`, `"DOCUMENT"`, `"VECTOR"`, `"ARCHIVE"`, `"MODEL3D"`
|
|
1826
1862
|
*/
|
|
1827
1863
|
mediaTypes?: MediaType[];
|
|
1828
|
-
/**
|
|
1864
|
+
/**
|
|
1865
|
+
* Whether the link to the imported file is public or private.
|
|
1866
|
+
*
|
|
1867
|
+
* Default: `false`.
|
|
1868
|
+
*/
|
|
1829
1869
|
private?: boolean | null;
|
|
1830
1870
|
/**
|
|
1831
|
-
* Field name and order to sort by. One of:
|
|
1832
|
-
*
|
|
1833
|
-
*
|
|
1834
|
-
*
|
|
1835
|
-
*
|
|
1871
|
+
* Field name and order to sort by. One of:
|
|
1872
|
+
*
|
|
1873
|
+
* - `displayName`
|
|
1874
|
+
* - `_updatedDate`
|
|
1875
|
+
* - `sizeInBytes`
|
|
1876
|
+
*
|
|
1877
|
+
* Default: `_updatedDate` in `"DESC"` order.
|
|
1836
1878
|
*/
|
|
1837
1879
|
sort?: Sorting;
|
|
1838
1880
|
/** Cursor and paging information. */
|
|
@@ -1840,6 +1882,11 @@ export interface SearchFilesOptions {
|
|
|
1840
1882
|
}
|
|
1841
1883
|
/**
|
|
1842
1884
|
* Generates a URL for streaming a specific video file in the Media Manager.
|
|
1885
|
+
*
|
|
1886
|
+
*
|
|
1887
|
+
* The `generateVideoStreamingUrl()` function returns a Promise that resolves to a download URL and its asset key.
|
|
1888
|
+
*
|
|
1889
|
+
* 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
1890
|
* @param fileId - File ID.
|
|
1844
1891
|
* @public
|
|
1845
1892
|
* @documentationMaturity preview
|
|
@@ -1865,7 +1912,9 @@ export interface GenerateVideoStreamingUrlOptions {
|
|
|
1865
1912
|
* Deletes the specified files from the Media Manager.
|
|
1866
1913
|
*
|
|
1867
1914
|
*
|
|
1868
|
-
* The
|
|
1915
|
+
* The `bulkDeleteFiles()` function returns a Promise that resolves when the files are deleted.
|
|
1916
|
+
*
|
|
1917
|
+
* 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
1918
|
*
|
|
1870
1919
|
* >**Notes:**
|
|
1871
1920
|
* > - The specified files can be from different folders.
|
|
@@ -1892,6 +1941,8 @@ export interface BulkDeleteFilesOptions {
|
|
|
1892
1941
|
}
|
|
1893
1942
|
/**
|
|
1894
1943
|
* Restores the specified files from the Media Manager's trash bin, and moves them to their original locations in the Media Manager.
|
|
1944
|
+
*
|
|
1945
|
+
* The `bulkRestoreFilesFromTrashBin()` function returns a Promise that resolves when the files have been restored.
|
|
1895
1946
|
* @param fileIds - IDs of the files to restore from the Media Manager's trash bin.
|
|
1896
1947
|
* @public
|
|
1897
1948
|
* @documentationMaturity preview
|
|
@@ -1904,7 +1955,11 @@ export declare function bulkRestoreFilesFromTrashBin(fileIds: string[]): Promise
|
|
|
1904
1955
|
/**
|
|
1905
1956
|
* Retrieves a list of files in the Media Manager's trash bin.
|
|
1906
1957
|
*
|
|
1907
|
-
*
|
|
1958
|
+
* The `listDeletedFiles()` function returns a Promise that resolves to an array of the specified deleted files' descriptors and cursor information.
|
|
1959
|
+
*
|
|
1960
|
+
* >**Note:** The Media Manager's trash bin (`TRASH_ROOT` folder) only contains temporarily deleted files, not permanently deleted files.
|
|
1961
|
+
*
|
|
1962
|
+
* To retrieve a list of non-deleted files, use the `listFiles()` function.
|
|
1908
1963
|
* @public
|
|
1909
1964
|
* @documentationMaturity preview
|
|
1910
1965
|
* @param options - Options to use when listing deleted files from the trash bin.
|
|
@@ -1929,11 +1984,13 @@ export interface ListDeletedFilesOptions {
|
|
|
1929
1984
|
/** Whether the link to the imported file is public or private. */
|
|
1930
1985
|
private?: boolean | null;
|
|
1931
1986
|
/**
|
|
1932
|
-
* Field name and order to sort by. One of:
|
|
1933
|
-
*
|
|
1934
|
-
*
|
|
1935
|
-
*
|
|
1936
|
-
*
|
|
1987
|
+
* Field name and order to sort by. One of:
|
|
1988
|
+
*
|
|
1989
|
+
* - `displayName`
|
|
1990
|
+
* - `_updatedDate`
|
|
1991
|
+
* - `sizeInBytes`
|
|
1992
|
+
*
|
|
1993
|
+
* Default: `_updatedDate` in `"DESC"` order.
|
|
1937
1994
|
*/
|
|
1938
1995
|
sort?: Sorting;
|
|
1939
1996
|
/** Cursor and paging information. */
|