@wix/media 1.0.0
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.d.ts +2 -0
- package/build/cjs/index.js +25 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/src/media-site-media-v1-file-descriptor.http.d.ts +107 -0
- package/build/cjs/src/media-site-media-v1-file-descriptor.http.js +555 -0
- package/build/cjs/src/media-site-media-v1-file-descriptor.http.js.map +1 -0
- package/build/cjs/src/media-site-media-v1-file-descriptor.public.d.ts +18 -0
- package/build/cjs/src/media-site-media-v1-file-descriptor.public.js +97 -0
- package/build/cjs/src/media-site-media-v1-file-descriptor.public.js.map +1 -0
- package/build/cjs/src/media-site-media-v1-file-descriptor.types.d.ts +562 -0
- package/build/cjs/src/media-site-media-v1-file-descriptor.types.js +52 -0
- package/build/cjs/src/media-site-media-v1-file-descriptor.types.js.map +1 -0
- package/build/cjs/src/media-site-media-v1-file-descriptor.universal.d.ts +845 -0
- package/build/cjs/src/media-site-media-v1-file-descriptor.universal.js +962 -0
- package/build/cjs/src/media-site-media-v1-file-descriptor.universal.js.map +1 -0
- package/build/cjs/src/media-site-media-v1-folder.http.d.ts +49 -0
- package/build/cjs/src/media-site-media-v1-folder.http.js +285 -0
- package/build/cjs/src/media-site-media-v1-folder.http.js.map +1 -0
- package/build/cjs/src/media-site-media-v1-folder.public.d.ts +13 -0
- package/build/cjs/src/media-site-media-v1-folder.public.js +63 -0
- package/build/cjs/src/media-site-media-v1-folder.public.js.map +1 -0
- package/build/cjs/src/media-site-media-v1-folder.types.d.ts +179 -0
- package/build/cjs/src/media-site-media-v1-folder.types.js +23 -0
- package/build/cjs/src/media-site-media-v1-folder.types.js.map +1 -0
- package/build/cjs/src/media-site-media-v1-folder.universal.d.ts +337 -0
- package/build/cjs/src/media-site-media-v1-folder.universal.js +584 -0
- package/build/cjs/src/media-site-media-v1-folder.universal.js.map +1 -0
- package/build/es/index.d.ts +2 -0
- package/build/es/index.js +3 -0
- package/build/es/index.js.map +1 -0
- package/build/es/src/media-site-media-v1-file-descriptor.http.d.ts +107 -0
- package/build/es/src/media-site-media-v1-file-descriptor.http.js +538 -0
- package/build/es/src/media-site-media-v1-file-descriptor.http.js.map +1 -0
- package/build/es/src/media-site-media-v1-file-descriptor.public.d.ts +18 -0
- package/build/es/src/media-site-media-v1-file-descriptor.public.js +73 -0
- package/build/es/src/media-site-media-v1-file-descriptor.public.js.map +1 -0
- package/build/es/src/media-site-media-v1-file-descriptor.types.d.ts +562 -0
- package/build/es/src/media-site-media-v1-file-descriptor.types.js +49 -0
- package/build/es/src/media-site-media-v1-file-descriptor.types.js.map +1 -0
- package/build/es/src/media-site-media-v1-file-descriptor.universal.d.ts +845 -0
- package/build/es/src/media-site-media-v1-file-descriptor.universal.js +926 -0
- package/build/es/src/media-site-media-v1-file-descriptor.universal.js.map +1 -0
- package/build/es/src/media-site-media-v1-folder.http.d.ts +49 -0
- package/build/es/src/media-site-media-v1-folder.http.js +273 -0
- package/build/es/src/media-site-media-v1-folder.http.js.map +1 -0
- package/build/es/src/media-site-media-v1-folder.public.d.ts +13 -0
- package/build/es/src/media-site-media-v1-folder.public.js +48 -0
- package/build/es/src/media-site-media-v1-folder.public.js.map +1 -0
- package/build/es/src/media-site-media-v1-folder.types.d.ts +179 -0
- package/build/es/src/media-site-media-v1-folder.types.js +20 -0
- package/build/es/src/media-site-media-v1-folder.types.js.map +1 -0
- package/build/es/src/media-site-media-v1-folder.universal.d.ts +337 -0
- package/build/es/src/media-site-media-v1-folder.universal.js +553 -0
- package/build/es/src/media-site-media-v1-folder.universal.js.map +1 -0
- package/package.json +37 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.folders = exports.files = void 0;
|
|
23
|
+
exports.files = __importStar(require("./src/media-site-media-v1-file-descriptor.public"));
|
|
24
|
+
exports.folders = __importStar(require("./src/media-site-media-v1-folder.public"));
|
|
25
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,0FAA0E;AAC1E,mFAAmE"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { RequestOptionsFactory } from '@wix/sdk-types';
|
|
2
|
+
import { BulkDeleteFilesRequest, BulkDeleteFilesResponse, BulkImportFilesRequest, BulkImportFilesResponse, BulkRestoreFilesFromTrashBinRequest, BulkRestoreFilesFromTrashBinResponse, GenerateFileDownloadUrlRequest, GenerateFileDownloadUrlResponse, GenerateFileResumableUploadUrlRequest, GenerateFileResumableUploadUrlResponse, GenerateFilesDownloadUrlRequest, GenerateFilesDownloadUrlResponse, GenerateFileUploadUrlRequest, GenerateFileUploadUrlResponse, GenerateVideoStreamingUrlRequest, GenerateVideoStreamingUrlResponse, GetFileDescriptorRequest, GetFileDescriptorResponse, ImportFileRequest, ImportFileResponse, ListDeletedFilesRequest, ListDeletedFilesResponse, ListFilesRequest, ListFilesResponse, SearchFilesRequest, SearchFilesResponse, UpdateFileRequest, UpdateFileResponse } from './media-site-media-v1-file-descriptor.types';
|
|
3
|
+
/**
|
|
4
|
+
* Generates a URL for downloading a compressed file containing specific files in the Media Manager. <br/>
|
|
5
|
+
*
|
|
6
|
+
* The compressed file can contain up to 1000 files.
|
|
7
|
+
*/
|
|
8
|
+
export declare function generateFilesDownloadUrl(payload: GenerateFilesDownloadUrlRequest): RequestOptionsFactory<GenerateFilesDownloadUrlResponse>;
|
|
9
|
+
/**
|
|
10
|
+
* Generates one or more temporary URLs for downloading a specific file in the Media Manager.
|
|
11
|
+
*
|
|
12
|
+
* To download different assets of the file, use the `assetKeys` parameter which generates a download URL for each asset.
|
|
13
|
+
* If no `assetKey` is specified, it defaults to `src`, which generates one download URL in the original file's format and quality.
|
|
14
|
+
*
|
|
15
|
+
* 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.
|
|
16
|
+
*/
|
|
17
|
+
export declare function generateFileDownloadUrl(payload: GenerateFileDownloadUrlRequest): RequestOptionsFactory<GenerateFileDownloadUrlResponse>;
|
|
18
|
+
/** Gets information about a specific file in the Media Manager. */
|
|
19
|
+
export declare function getFileDescriptor(payload: GetFileDescriptorRequest): RequestOptionsFactory<GetFileDescriptorResponse>;
|
|
20
|
+
/**
|
|
21
|
+
* Updates a file. <br />
|
|
22
|
+
*
|
|
23
|
+
* You can use the `parentFolderId` parameter to move a file from its current folder to a different folder.
|
|
24
|
+
*/
|
|
25
|
+
export declare function updateFile(payload: UpdateFileRequest): RequestOptionsFactory<UpdateFileResponse>;
|
|
26
|
+
/**
|
|
27
|
+
* Generates an upload URL to allow external clients to upload a file to the Media Manager. <br/>
|
|
28
|
+
*
|
|
29
|
+
* To learn how external clients can use the generated upload URL in the response to upload a file to the Media Manager, see [Using the Upload Url](#upload-api) article.
|
|
30
|
+
* >**Note:** Any interruption in the upload process stops the file upload. For files larger than 10MB, or when network connection is poor, use the [Generate File Resumable Upload Url](https://dev.wix.com/api/rest/all-apis/site-media---media-manager-backend/files/generate-file-resumable-upload-url) instead. With the resumable upload URL, any interruption in the upload process pauses the file upload, and resumes the file upload process after the interruption.
|
|
31
|
+
*/
|
|
32
|
+
export declare function generateFileUploadUrl(payload: GenerateFileUploadUrlRequest): RequestOptionsFactory<GenerateFileUploadUrlResponse>;
|
|
33
|
+
/**
|
|
34
|
+
* Generates a resumable upload URL to allow external clients to easily upload large files over 10MB to the Media Manager. <br/>
|
|
35
|
+
*
|
|
36
|
+
* 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.
|
|
37
|
+
* To learn how external clients can use the generated upload URL in the response to upload large files to the Media Manager, see [Using the Resumable Upload Url](#upload-api) article.
|
|
38
|
+
*/
|
|
39
|
+
export declare function generateFileResumableUploadUrl(payload: GenerateFileResumableUploadUrlRequest): RequestOptionsFactory<GenerateFileResumableUploadUrlResponse>;
|
|
40
|
+
/**
|
|
41
|
+
* Imports a file to the Media Manager using an external url.
|
|
42
|
+
*
|
|
43
|
+
* Returns information about the imported file.
|
|
44
|
+
* Use the `parentFolderId` parameter to specify which folder you want the file to be imported to.
|
|
45
|
+
* If no folder is specified, the file is imported to the `media-root` folder.
|
|
46
|
+
*
|
|
47
|
+
* To import a file, you need to provide one of the following:
|
|
48
|
+
* 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'.
|
|
49
|
+
* 2. Pass the file's name and extenstion. For example, 'my-image.png'.
|
|
50
|
+
* 3. If you don't know the 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.
|
|
51
|
+
*
|
|
52
|
+
* >**Note:** The `media` property isn't returned in the `files` response object.
|
|
53
|
+
*/
|
|
54
|
+
export declare function importFile(payload: ImportFileRequest): RequestOptionsFactory<ImportFileResponse>;
|
|
55
|
+
/**
|
|
56
|
+
* Imports a bulk of files to the Media Manager using external urls. <br/>
|
|
57
|
+
*
|
|
58
|
+
* Returns information about the imported files. Use the `parentFolderId` parameter to specify in which folder you want each file to be imported to.
|
|
59
|
+
* If no folder is specified, the file is imported to the `media-root` folder.
|
|
60
|
+
*
|
|
61
|
+
* To import files, you need to provide one of the following:
|
|
62
|
+
* 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'.
|
|
63
|
+
* 2. Pass each file's name and extenstion. For example, 'my-image.png'.
|
|
64
|
+
* 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.
|
|
65
|
+
*
|
|
66
|
+
* >**Note:** The `media` property isn't returned in the `files` response object.
|
|
67
|
+
*/
|
|
68
|
+
export declare function bulkImportFiles(payload: BulkImportFilesRequest): RequestOptionsFactory<BulkImportFilesResponse>;
|
|
69
|
+
/**
|
|
70
|
+
* Retrieves a list of files in the Media Manager.
|
|
71
|
+
*
|
|
72
|
+
* 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 the list of files in the root folder of the Media Manager.
|
|
73
|
+
*/
|
|
74
|
+
export declare function listFiles(payload: ListFilesRequest): RequestOptionsFactory<ListFilesResponse>;
|
|
75
|
+
/**
|
|
76
|
+
* Searches all folders in the Media Manager and returns a list of files that match the terms specified in the parameters. <br/>
|
|
77
|
+
*
|
|
78
|
+
* If no parameters are specified, the endpoint returns all files in the `MEDIA_ROOT` folder.
|
|
79
|
+
*/
|
|
80
|
+
export declare function searchFiles(payload: SearchFilesRequest): RequestOptionsFactory<SearchFilesResponse>;
|
|
81
|
+
/**
|
|
82
|
+
* Generates a URL for streaming a specific video file in the Media Manager. <br/>
|
|
83
|
+
*
|
|
84
|
+
* To stream different assets of the file, use the `assetKeys` parameter which generates a video streaming URL for each asset. If no assetKey is specified, it defaults to `src`, which generates one video streaming URL in the original file's format and quality.
|
|
85
|
+
*/
|
|
86
|
+
export declare function generateVideoStreamingUrl(payload: GenerateVideoStreamingUrlRequest): RequestOptionsFactory<GenerateVideoStreamingUrlResponse>;
|
|
87
|
+
/**
|
|
88
|
+
* Deletes the specified files from the Media Manager. <br/>
|
|
89
|
+
*
|
|
90
|
+
* 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.
|
|
91
|
+
*
|
|
92
|
+
* Note the following:
|
|
93
|
+
* * The specified files can be from different folders.
|
|
94
|
+
* * Moving multiple files at once is an asynchronous action, and may take time for the changes to appear in the Media Manager.
|
|
95
|
+
* * Attempting to delete files that are already in the trash bin doesn't result in an error.
|
|
96
|
+
* * If your site contains deleted media files, the deleted media files still appear on your site as the files are still in the Media Manager (in the trash bin).
|
|
97
|
+
* * You can use the [Bulk Restore Files From Trash Bin](bulk-restore-files-from-trash-bin) endpoint to restore files from the Media Manager's trash bin.
|
|
98
|
+
*/
|
|
99
|
+
export declare function bulkDeleteFiles(payload: BulkDeleteFilesRequest): RequestOptionsFactory<BulkDeleteFilesResponse>;
|
|
100
|
+
/** Restores the specified files from the Media Manager's trash bin, and moves them to their original locations in the Media Manager. */
|
|
101
|
+
export declare function bulkRestoreFilesFromTrashBin(payload: BulkRestoreFilesFromTrashBinRequest): RequestOptionsFactory<BulkRestoreFilesFromTrashBinResponse>;
|
|
102
|
+
/**
|
|
103
|
+
* Retrieves a list of files in the Media Manager's trash bin. <br/>
|
|
104
|
+
*
|
|
105
|
+
* >**Note:** The Media Manager's trash bin (`TRASH-ROOT` folder) only contains temporarily deleted files, not permanently deleted files.
|
|
106
|
+
*/
|
|
107
|
+
export declare function listDeletedFiles(payload: ListDeletedFilesRequest): RequestOptionsFactory<ListDeletedFilesResponse>;
|