@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,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StreamFormat = exports.RootFolder = exports.SortOrder = exports.UploadProtocol = exports.State = exports.OperationStatus = exports.MediaType = exports.listDeletedFiles = exports.bulkRestoreFilesFromTrashBin = exports.bulkDeleteFiles = exports.generateVideoStreamingUrl = exports.searchFiles = exports.listFiles = exports.bulkImportFiles = exports.importFile = exports.generateFileResumableUploadUrl = exports.generateFileUploadUrl = exports.updateFile = exports.getFileDescriptor = exports.generateFileDownloadUrl = exports.generateFilesDownloadUrl = void 0;
|
|
4
|
+
const media_site_media_v1_file_descriptor_universal_1 = require("./media-site-media-v1-file-descriptor.universal");
|
|
5
|
+
function generateFilesDownloadUrl(httpClient) {
|
|
6
|
+
return (fileIds) => media_site_media_v1_file_descriptor_universal_1.generateFilesDownloadUrl(fileIds,
|
|
7
|
+
// @ts-ignore
|
|
8
|
+
{ httpClient });
|
|
9
|
+
}
|
|
10
|
+
exports.generateFilesDownloadUrl = generateFilesDownloadUrl;
|
|
11
|
+
function generateFileDownloadUrl(httpClient) {
|
|
12
|
+
return (fileId, options) => media_site_media_v1_file_descriptor_universal_1.generateFileDownloadUrl(fileId, options,
|
|
13
|
+
// @ts-ignore
|
|
14
|
+
{ httpClient });
|
|
15
|
+
}
|
|
16
|
+
exports.generateFileDownloadUrl = generateFileDownloadUrl;
|
|
17
|
+
function getFileDescriptor(httpClient) {
|
|
18
|
+
return (fileId) => media_site_media_v1_file_descriptor_universal_1.getFileDescriptor(fileId,
|
|
19
|
+
// @ts-ignore
|
|
20
|
+
{ httpClient });
|
|
21
|
+
}
|
|
22
|
+
exports.getFileDescriptor = getFileDescriptor;
|
|
23
|
+
function updateFile(httpClient) {
|
|
24
|
+
return (fileId, options) => media_site_media_v1_file_descriptor_universal_1.updateFile(fileId, options,
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
{ httpClient });
|
|
27
|
+
}
|
|
28
|
+
exports.updateFile = updateFile;
|
|
29
|
+
function generateFileUploadUrl(httpClient) {
|
|
30
|
+
return (mimeType, options) => media_site_media_v1_file_descriptor_universal_1.generateFileUploadUrl(mimeType, options,
|
|
31
|
+
// @ts-ignore
|
|
32
|
+
{ httpClient });
|
|
33
|
+
}
|
|
34
|
+
exports.generateFileUploadUrl = generateFileUploadUrl;
|
|
35
|
+
function generateFileResumableUploadUrl(httpClient) {
|
|
36
|
+
return (mimeType, options) => media_site_media_v1_file_descriptor_universal_1.generateFileResumableUploadUrl(mimeType, options,
|
|
37
|
+
// @ts-ignore
|
|
38
|
+
{ httpClient });
|
|
39
|
+
}
|
|
40
|
+
exports.generateFileResumableUploadUrl = generateFileResumableUploadUrl;
|
|
41
|
+
function importFile(httpClient) {
|
|
42
|
+
return (url, options) => media_site_media_v1_file_descriptor_universal_1.importFile(url, options,
|
|
43
|
+
// @ts-ignore
|
|
44
|
+
{ httpClient });
|
|
45
|
+
}
|
|
46
|
+
exports.importFile = importFile;
|
|
47
|
+
function bulkImportFiles(httpClient) {
|
|
48
|
+
return (options) => media_site_media_v1_file_descriptor_universal_1.bulkImportFiles(options,
|
|
49
|
+
// @ts-ignore
|
|
50
|
+
{ httpClient });
|
|
51
|
+
}
|
|
52
|
+
exports.bulkImportFiles = bulkImportFiles;
|
|
53
|
+
function listFiles(httpClient) {
|
|
54
|
+
return (options) => media_site_media_v1_file_descriptor_universal_1.listFiles(options,
|
|
55
|
+
// @ts-ignore
|
|
56
|
+
{ httpClient });
|
|
57
|
+
}
|
|
58
|
+
exports.listFiles = listFiles;
|
|
59
|
+
function searchFiles(httpClient) {
|
|
60
|
+
return (options) => media_site_media_v1_file_descriptor_universal_1.searchFiles(options,
|
|
61
|
+
// @ts-ignore
|
|
62
|
+
{ httpClient });
|
|
63
|
+
}
|
|
64
|
+
exports.searchFiles = searchFiles;
|
|
65
|
+
function generateVideoStreamingUrl(httpClient) {
|
|
66
|
+
return (fileId, options) => media_site_media_v1_file_descriptor_universal_1.generateVideoStreamingUrl(fileId, options,
|
|
67
|
+
// @ts-ignore
|
|
68
|
+
{ httpClient });
|
|
69
|
+
}
|
|
70
|
+
exports.generateVideoStreamingUrl = generateVideoStreamingUrl;
|
|
71
|
+
function bulkDeleteFiles(httpClient) {
|
|
72
|
+
return (options) => media_site_media_v1_file_descriptor_universal_1.bulkDeleteFiles(options,
|
|
73
|
+
// @ts-ignore
|
|
74
|
+
{ httpClient });
|
|
75
|
+
}
|
|
76
|
+
exports.bulkDeleteFiles = bulkDeleteFiles;
|
|
77
|
+
function bulkRestoreFilesFromTrashBin(httpClient) {
|
|
78
|
+
return (fileIds) => media_site_media_v1_file_descriptor_universal_1.bulkRestoreFilesFromTrashBin(fileIds,
|
|
79
|
+
// @ts-ignore
|
|
80
|
+
{ httpClient });
|
|
81
|
+
}
|
|
82
|
+
exports.bulkRestoreFilesFromTrashBin = bulkRestoreFilesFromTrashBin;
|
|
83
|
+
function listDeletedFiles(httpClient) {
|
|
84
|
+
return (options) => media_site_media_v1_file_descriptor_universal_1.listDeletedFiles(options,
|
|
85
|
+
// @ts-ignore
|
|
86
|
+
{ httpClient });
|
|
87
|
+
}
|
|
88
|
+
exports.listDeletedFiles = listDeletedFiles;
|
|
89
|
+
var media_site_media_v1_file_descriptor_universal_2 = require("./media-site-media-v1-file-descriptor.universal");
|
|
90
|
+
Object.defineProperty(exports, "MediaType", { enumerable: true, get: function () { return media_site_media_v1_file_descriptor_universal_2.MediaType; } });
|
|
91
|
+
Object.defineProperty(exports, "OperationStatus", { enumerable: true, get: function () { return media_site_media_v1_file_descriptor_universal_2.OperationStatus; } });
|
|
92
|
+
Object.defineProperty(exports, "State", { enumerable: true, get: function () { return media_site_media_v1_file_descriptor_universal_2.State; } });
|
|
93
|
+
Object.defineProperty(exports, "UploadProtocol", { enumerable: true, get: function () { return media_site_media_v1_file_descriptor_universal_2.UploadProtocol; } });
|
|
94
|
+
Object.defineProperty(exports, "SortOrder", { enumerable: true, get: function () { return media_site_media_v1_file_descriptor_universal_2.SortOrder; } });
|
|
95
|
+
Object.defineProperty(exports, "RootFolder", { enumerable: true, get: function () { return media_site_media_v1_file_descriptor_universal_2.RootFolder; } });
|
|
96
|
+
Object.defineProperty(exports, "StreamFormat", { enumerable: true, get: function () { return media_site_media_v1_file_descriptor_universal_2.StreamFormat; } });
|
|
97
|
+
//# sourceMappingURL=media-site-media-v1-file-descriptor.public.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media-site-media-v1-file-descriptor.public.js","sourceRoot":"","sources":["../../../src/media-site-media-v1-file-descriptor.public.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,562 @@
|
|
|
1
|
+
export interface FileDescriptor {
|
|
2
|
+
/** File ID. Generated when a file is uploaded to the Media Manager. */
|
|
3
|
+
id?: string;
|
|
4
|
+
/** File name as it appears in the Media Manager. */
|
|
5
|
+
displayName?: string;
|
|
6
|
+
/** Static URL of the file. */
|
|
7
|
+
url?: string;
|
|
8
|
+
/** ID of the file's parent folder. */
|
|
9
|
+
parentFolderId?: string | null;
|
|
10
|
+
/** File hash. */
|
|
11
|
+
hash?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Whether the link to the uploaded file is public or private. Private links require a token.
|
|
14
|
+
* @readonly
|
|
15
|
+
*/
|
|
16
|
+
private?: boolean;
|
|
17
|
+
/** Media file type. */
|
|
18
|
+
mediaType?: MediaType;
|
|
19
|
+
/** Media file content. */
|
|
20
|
+
media?: FileMedia;
|
|
21
|
+
/**
|
|
22
|
+
* Status of the file that was uploaded.
|
|
23
|
+
* * `FAILED`: The file failed to upload, for example, during media post processing.
|
|
24
|
+
* * `READY`: The file uploaded, finished all processing, and is ready for use.
|
|
25
|
+
* * `PENDING`: The file is processing and the URLs are not yet available. This response is returned when importing a file.
|
|
26
|
+
*/
|
|
27
|
+
operationStatus?: OperationStatus;
|
|
28
|
+
/** URL where the file was uploaded from. */
|
|
29
|
+
sourceUrl?: string | null;
|
|
30
|
+
/** URL of the file's thumbnail. */
|
|
31
|
+
thumbnailUrl?: string | null;
|
|
32
|
+
/** Labels assigned to media files that describe and categorize them. Provided by the user, or generated by [Google Vision API](https://cloud.google.com/vision/docs/drag-and-drop) for images. */
|
|
33
|
+
labels?: string[];
|
|
34
|
+
/** Date and time the file was created. */
|
|
35
|
+
createdDate?: Date;
|
|
36
|
+
/** Date and time the file was updated. */
|
|
37
|
+
updatedDate?: Date;
|
|
38
|
+
/** The Wix site ID where the media file is stored. */
|
|
39
|
+
siteId?: string;
|
|
40
|
+
/** State of the file. */
|
|
41
|
+
state?: State;
|
|
42
|
+
}
|
|
43
|
+
export declare enum MediaType {
|
|
44
|
+
UNKNOWN = "UNKNOWN",
|
|
45
|
+
IMAGE = "IMAGE",
|
|
46
|
+
VIDEO = "VIDEO",
|
|
47
|
+
AUDIO = "AUDIO",
|
|
48
|
+
DOCUMENT = "DOCUMENT",
|
|
49
|
+
VECTOR = "VECTOR"
|
|
50
|
+
}
|
|
51
|
+
export interface FileMedia extends FileMediaMediaOneOf {
|
|
52
|
+
/** Information about the image. */
|
|
53
|
+
image?: ImageMedia;
|
|
54
|
+
/** Information about the video. */
|
|
55
|
+
video?: VideoV2;
|
|
56
|
+
/** Information about the audio. */
|
|
57
|
+
audio?: AudioV2;
|
|
58
|
+
/** Information about the document. */
|
|
59
|
+
document?: Document;
|
|
60
|
+
/** Information about the vector. */
|
|
61
|
+
vector?: ImageMedia;
|
|
62
|
+
}
|
|
63
|
+
/** @oneof */
|
|
64
|
+
export interface FileMediaMediaOneOf {
|
|
65
|
+
/** Information about the image. */
|
|
66
|
+
image?: ImageMedia;
|
|
67
|
+
/** Information about the video. */
|
|
68
|
+
video?: VideoV2;
|
|
69
|
+
/** Information about the audio. */
|
|
70
|
+
audio?: AudioV2;
|
|
71
|
+
/** Information about the document. */
|
|
72
|
+
document?: Document;
|
|
73
|
+
/** Information about the vector. */
|
|
74
|
+
vector?: ImageMedia;
|
|
75
|
+
}
|
|
76
|
+
export interface ImageMedia {
|
|
77
|
+
/** Image data. */
|
|
78
|
+
image?: Image;
|
|
79
|
+
/** Image colors. */
|
|
80
|
+
colors?: Colors;
|
|
81
|
+
/** Information about faces in the image. Use to crop images without cutting out faces. */
|
|
82
|
+
faces?: FaceRecognition[];
|
|
83
|
+
/**
|
|
84
|
+
* Information about the image preview.
|
|
85
|
+
* You can use this to display a preview for private images.
|
|
86
|
+
*/
|
|
87
|
+
previewImage?: Image;
|
|
88
|
+
}
|
|
89
|
+
export interface Image {
|
|
90
|
+
/** WixMedia image ID. */
|
|
91
|
+
id?: string;
|
|
92
|
+
/** Image URL. */
|
|
93
|
+
url?: string;
|
|
94
|
+
/**
|
|
95
|
+
* Original image height.
|
|
96
|
+
* @readonly
|
|
97
|
+
*/
|
|
98
|
+
height?: number;
|
|
99
|
+
/**
|
|
100
|
+
* Original image width.
|
|
101
|
+
* @readonly
|
|
102
|
+
*/
|
|
103
|
+
width?: number;
|
|
104
|
+
/** Image alt text. */
|
|
105
|
+
altText?: string | null;
|
|
106
|
+
/**
|
|
107
|
+
* Image filename.
|
|
108
|
+
* @readonly
|
|
109
|
+
*/
|
|
110
|
+
filename?: string | null;
|
|
111
|
+
}
|
|
112
|
+
export interface Colors {
|
|
113
|
+
/** Main color of the image. */
|
|
114
|
+
prominent?: Color;
|
|
115
|
+
/** Color palette of the image. */
|
|
116
|
+
palette?: Color[];
|
|
117
|
+
}
|
|
118
|
+
export interface Color {
|
|
119
|
+
/** HEX color. */
|
|
120
|
+
hex?: string | null;
|
|
121
|
+
/** RGB color. */
|
|
122
|
+
rgb?: ColorRGB;
|
|
123
|
+
}
|
|
124
|
+
export interface ColorRGB {
|
|
125
|
+
/** Red channel. */
|
|
126
|
+
r?: number | null;
|
|
127
|
+
/** Green channel. */
|
|
128
|
+
g?: number | null;
|
|
129
|
+
/** Blue channel. */
|
|
130
|
+
b?: number | null;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Using this object you can crop images while centering on faces
|
|
134
|
+
* ------------------------
|
|
135
|
+
* | |
|
|
136
|
+
* | x,y |
|
|
137
|
+
* | *-------- |
|
|
138
|
+
* | | . . | |
|
|
139
|
+
* | | | | height |
|
|
140
|
+
* | | \ / | |
|
|
141
|
+
* | | | |
|
|
142
|
+
* | --------- |
|
|
143
|
+
* | width |
|
|
144
|
+
* | |
|
|
145
|
+
* |______________________|
|
|
146
|
+
*/
|
|
147
|
+
export interface FaceRecognition {
|
|
148
|
+
/** The accuracy percentage of the face recognition. The likelihood that a face is detected. */
|
|
149
|
+
confidence?: number;
|
|
150
|
+
/** Top left x pixel coordinate of the face. */
|
|
151
|
+
x?: number;
|
|
152
|
+
/** Top left y pixel coordinate of the face. */
|
|
153
|
+
y?: number;
|
|
154
|
+
/** Face pixel height. */
|
|
155
|
+
height?: number;
|
|
156
|
+
/** Face pixel width. */
|
|
157
|
+
width?: number;
|
|
158
|
+
}
|
|
159
|
+
export interface VideoV2 {
|
|
160
|
+
/** WixMedia ID. */
|
|
161
|
+
id?: string;
|
|
162
|
+
/**
|
|
163
|
+
* Available resolutions for the video, starting with the optimal resolution.
|
|
164
|
+
* @readonly
|
|
165
|
+
*/
|
|
166
|
+
resolutions?: VideoResolution[];
|
|
167
|
+
/**
|
|
168
|
+
* Video filename.
|
|
169
|
+
* @readonly
|
|
170
|
+
*/
|
|
171
|
+
filename?: string | null;
|
|
172
|
+
}
|
|
173
|
+
export interface VideoResolution {
|
|
174
|
+
/** Video URL. */
|
|
175
|
+
url?: string;
|
|
176
|
+
/** Video height. */
|
|
177
|
+
height?: number;
|
|
178
|
+
/** Video width. */
|
|
179
|
+
width?: number;
|
|
180
|
+
/** Video format for example, mp4, hls. */
|
|
181
|
+
format?: string;
|
|
182
|
+
}
|
|
183
|
+
export interface AudioV2 {
|
|
184
|
+
/** WixMedia ID. */
|
|
185
|
+
id?: string;
|
|
186
|
+
/** Audio formats available for this file. */
|
|
187
|
+
assets?: Audio[];
|
|
188
|
+
}
|
|
189
|
+
export interface Audio {
|
|
190
|
+
/** WixMedia ID. */
|
|
191
|
+
id?: string;
|
|
192
|
+
/** Audio URL. */
|
|
193
|
+
url?: string;
|
|
194
|
+
/**
|
|
195
|
+
* Audio filename.
|
|
196
|
+
* @readonly
|
|
197
|
+
*/
|
|
198
|
+
filename?: string | null;
|
|
199
|
+
}
|
|
200
|
+
export interface Document {
|
|
201
|
+
/** WixMedia ID. */
|
|
202
|
+
id?: string;
|
|
203
|
+
/** Document URL. */
|
|
204
|
+
url?: string;
|
|
205
|
+
/** Document filename. */
|
|
206
|
+
filename?: string | null;
|
|
207
|
+
}
|
|
208
|
+
export declare enum OperationStatus {
|
|
209
|
+
/** File upload or processing failed */
|
|
210
|
+
FAILED = "FAILED",
|
|
211
|
+
/** File is ready for consumption */
|
|
212
|
+
READY = "READY",
|
|
213
|
+
/** File is waiting for processing or currently being processed */
|
|
214
|
+
PENDING = "PENDING"
|
|
215
|
+
}
|
|
216
|
+
export declare enum State {
|
|
217
|
+
OK = "OK",
|
|
218
|
+
DELETED = "DELETED"
|
|
219
|
+
}
|
|
220
|
+
export interface FileReady {
|
|
221
|
+
/** File entity that is ready with full information */
|
|
222
|
+
file?: FileDescriptor;
|
|
223
|
+
/** External information passed in the file import or upload. */
|
|
224
|
+
externalInfo?: ExternalInfo;
|
|
225
|
+
/** The File was restored from the trash-bin */
|
|
226
|
+
triggeredByUndelete?: boolean;
|
|
227
|
+
}
|
|
228
|
+
export interface ExternalInfo {
|
|
229
|
+
/** Information about an external entity that is mapped to a Wix entity. */
|
|
230
|
+
origin?: string;
|
|
231
|
+
/** External ID that is mapped to a Wix entity. */
|
|
232
|
+
externalIds?: string[];
|
|
233
|
+
}
|
|
234
|
+
export interface FileFailed {
|
|
235
|
+
/** External information passed in the file import or upload. */
|
|
236
|
+
externalInfo?: ExternalInfo;
|
|
237
|
+
}
|
|
238
|
+
export interface GenerateFilesDownloadUrlRequest {
|
|
239
|
+
/** IDs of the files to download. */
|
|
240
|
+
fileIds: string[];
|
|
241
|
+
}
|
|
242
|
+
export interface GenerateFilesDownloadUrlResponse {
|
|
243
|
+
/** URL for downloading the compressed file containing the specified files in the Media Manager. */
|
|
244
|
+
downloadUrl?: string;
|
|
245
|
+
}
|
|
246
|
+
export interface GenerateFileDownloadUrlRequest {
|
|
247
|
+
/** File ID. */
|
|
248
|
+
fileId: string;
|
|
249
|
+
/**
|
|
250
|
+
* Temporary file name used to identify the file type. For example, a file named "myFile.jpeg" identifies as an "image/jpeg" file type. <br />
|
|
251
|
+
*
|
|
252
|
+
* **Note:** The name that appears in the Media Manager is taken from the `filename` query parameter in the upload request.
|
|
253
|
+
*/
|
|
254
|
+
downloadFileName?: string | null;
|
|
255
|
+
/**
|
|
256
|
+
* The time that it takes in minutes for the download URL to expire. <br />
|
|
257
|
+
* Default: `600`. <br />
|
|
258
|
+
* Limit: `525600` (1 year).
|
|
259
|
+
*/
|
|
260
|
+
expirationInMinutes?: number | null;
|
|
261
|
+
/**
|
|
262
|
+
* The redirect URL for when the temporary download URL with a token expires. <br />
|
|
263
|
+
* Default: A 403 Forbidden response page.
|
|
264
|
+
*/
|
|
265
|
+
expirationRedirectUrl?: string | null;
|
|
266
|
+
/**
|
|
267
|
+
* Keys for downloading different assets (format and quality) of a file.
|
|
268
|
+
* Default: `src`, key representing the original file's format and quality.
|
|
269
|
+
*/
|
|
270
|
+
assetKeys?: string[] | null;
|
|
271
|
+
}
|
|
272
|
+
export interface GenerateFileDownloadUrlResponse {
|
|
273
|
+
/** URL for downloading a specific file in the Media Manager. */
|
|
274
|
+
downloadUrls?: DownloadUrl[];
|
|
275
|
+
}
|
|
276
|
+
export interface DownloadUrl {
|
|
277
|
+
/** The file download URL. */
|
|
278
|
+
url?: string;
|
|
279
|
+
/**
|
|
280
|
+
* Key for downloading a different asset (format and quality) of a file.
|
|
281
|
+
* Default: `src`, key representing the original file's format and quality.
|
|
282
|
+
*/
|
|
283
|
+
assetKey?: string;
|
|
284
|
+
}
|
|
285
|
+
export interface GetFileDescriptorRequest {
|
|
286
|
+
/** File ID. */
|
|
287
|
+
fileId: string;
|
|
288
|
+
}
|
|
289
|
+
export interface GetFileDescriptorResponse {
|
|
290
|
+
/** Information about the file. */
|
|
291
|
+
file?: FileDescriptor;
|
|
292
|
+
}
|
|
293
|
+
export interface UpdateFileRequest {
|
|
294
|
+
/** ID of the file to update. */
|
|
295
|
+
fileId: string;
|
|
296
|
+
/** File name that appears in the Media Manager. */
|
|
297
|
+
displayName?: string | null;
|
|
298
|
+
/**
|
|
299
|
+
* ID of the file's parent folder. <br />
|
|
300
|
+
* Default: `media-root`.
|
|
301
|
+
*/
|
|
302
|
+
parentFolderId?: string | null;
|
|
303
|
+
/** Labels assigned to media files that describe and categorize them. Provided by the user, or generated by [Google Vision API](https://cloud.google.com/vision/docs/drag-and-drop) for images. */
|
|
304
|
+
labels?: string[] | null;
|
|
305
|
+
}
|
|
306
|
+
export interface UpdateFileResponse {
|
|
307
|
+
/** Information about the updated file. */
|
|
308
|
+
file?: FileDescriptor;
|
|
309
|
+
}
|
|
310
|
+
export interface GenerateFileUploadUrlRequest {
|
|
311
|
+
/** File mime type. */
|
|
312
|
+
mimeType: string | null;
|
|
313
|
+
/**
|
|
314
|
+
* Temporary file name used to identify the file type. For example, a file named "myFile.jpeg" identifies as an "image/jpeg" file type.
|
|
315
|
+
* <br /> **Note:** The name that appears in the Media Manager is taken from the `filename` query parameter in the upload request.
|
|
316
|
+
*/
|
|
317
|
+
fileName?: string | null;
|
|
318
|
+
/** File size in bytes. */
|
|
319
|
+
sizeInBytes?: string | null;
|
|
320
|
+
/**
|
|
321
|
+
* ID of the file's parent folder. <br />
|
|
322
|
+
* Default: `media-root`.
|
|
323
|
+
*/
|
|
324
|
+
parentFolderId?: string | null;
|
|
325
|
+
/** Whether the link to the uploaded file is public or private. See `Private Files` in terminology. */
|
|
326
|
+
private?: boolean | null;
|
|
327
|
+
/** Labels assigned to media files that describe and categorize them. Provided by the user, or generated by [Google Vision API](https://cloud.google.com/vision/docs/drag-and-drop) for images. */
|
|
328
|
+
labels?: string[] | null;
|
|
329
|
+
/** A place to map an external entity to an uploaded file in the Wix Media Manager. */
|
|
330
|
+
externalInfo?: ExternalInfo;
|
|
331
|
+
}
|
|
332
|
+
export interface GenerateFileUploadUrlResponse {
|
|
333
|
+
/** The URL for uploading a file to the Media Manager. */
|
|
334
|
+
uploadUrl?: string;
|
|
335
|
+
}
|
|
336
|
+
export interface GenerateFileResumableUploadUrlRequest {
|
|
337
|
+
/** File mime type. */
|
|
338
|
+
mimeType: string | null;
|
|
339
|
+
/**
|
|
340
|
+
* Temporary file name used to identify the file type. For example, a file named "myFile.jpeg" identifies as an "image/jpeg" file type.
|
|
341
|
+
* <br /> **Note:** The name that appears in the Media Manager is taken from the `filename` query parameter in the upload request.
|
|
342
|
+
*/
|
|
343
|
+
fileName?: string | null;
|
|
344
|
+
/** File size in bytes. */
|
|
345
|
+
sizeInBytes?: string | null;
|
|
346
|
+
/**
|
|
347
|
+
* ID of the file's parent folder. <br />
|
|
348
|
+
* Default: `media-root`.
|
|
349
|
+
*/
|
|
350
|
+
parentFolderId?: string | null;
|
|
351
|
+
/** Whether the link to the imported file is public or private. See `Private Files` in terminology. */
|
|
352
|
+
private?: boolean | null;
|
|
353
|
+
/** Labels assigned to media files that describe and categorize them. Provided by the user, or generated by [Google Vision API](https://cloud.google.com/vision/docs/drag-and-drop) for images. */
|
|
354
|
+
labels?: string[] | null;
|
|
355
|
+
/** The upload protocol to use for implementing the resumable upload. */
|
|
356
|
+
uploadProtocol?: UploadProtocol;
|
|
357
|
+
}
|
|
358
|
+
export declare enum UploadProtocol {
|
|
359
|
+
/** The upload protocol to use for implementing the resumable upload. */
|
|
360
|
+
TUS = "TUS"
|
|
361
|
+
}
|
|
362
|
+
export interface GenerateFileResumableUploadUrlResponse {
|
|
363
|
+
/** The upload protocol to use for implementing the resumable upload. */
|
|
364
|
+
uploadProtocol?: UploadProtocol;
|
|
365
|
+
/** The URL for uploading a file to the Media Manager. */
|
|
366
|
+
uploadUrl?: string;
|
|
367
|
+
/** Single-use upload token. */
|
|
368
|
+
uploadToken?: string;
|
|
369
|
+
}
|
|
370
|
+
export interface ImportFileRequest {
|
|
371
|
+
/** Publicly accessible external file url. */
|
|
372
|
+
url: string;
|
|
373
|
+
/** Media type of the file to import. */
|
|
374
|
+
mediaType?: MediaType;
|
|
375
|
+
/** File name that appears in the Media Manager. */
|
|
376
|
+
displayName?: string | null;
|
|
377
|
+
/**
|
|
378
|
+
* ID of the file's parent folder. <br />
|
|
379
|
+
* Default: `media-root`.
|
|
380
|
+
*/
|
|
381
|
+
parentFolderId?: string | null;
|
|
382
|
+
/** Whether the link to the imported file is public or private. */
|
|
383
|
+
private?: boolean | null;
|
|
384
|
+
/** Labels assigned to media files that describe and categorize them. Provided by the user, or generated by [Google Vision API](https://cloud.google.com/vision/docs/drag-and-drop) for images. */
|
|
385
|
+
labels?: string[] | null;
|
|
386
|
+
/** File mime type. */
|
|
387
|
+
mimeType?: string;
|
|
388
|
+
/** A place to map an external entity to an imported file in the Wix Media Manager. */
|
|
389
|
+
externalInfo?: ExternalInfo;
|
|
390
|
+
}
|
|
391
|
+
export interface ImportFileResponse {
|
|
392
|
+
/** Information about the imported file. */
|
|
393
|
+
file?: FileDescriptor;
|
|
394
|
+
}
|
|
395
|
+
export interface BulkImportFilesRequest {
|
|
396
|
+
/** Information about the files to import. */
|
|
397
|
+
importFileRequests?: ImportFileRequest[];
|
|
398
|
+
}
|
|
399
|
+
export interface BulkImportFilesResponse {
|
|
400
|
+
/** Information about the imported files. */
|
|
401
|
+
files?: FileDescriptor[];
|
|
402
|
+
}
|
|
403
|
+
export interface ListFilesRequest {
|
|
404
|
+
/**
|
|
405
|
+
* ID of the file's parent folder. <br />
|
|
406
|
+
* Default:`media-root`.
|
|
407
|
+
*/
|
|
408
|
+
parentFolderId?: string | null;
|
|
409
|
+
/** File media type. */
|
|
410
|
+
mediaTypes?: MediaType[];
|
|
411
|
+
/** Whether the link to the imported file is public or private. */
|
|
412
|
+
private?: boolean | null;
|
|
413
|
+
/**
|
|
414
|
+
* Field name and order to sort by. One of: <br />
|
|
415
|
+
* * `displayName`
|
|
416
|
+
* * `updatedDate`
|
|
417
|
+
* Default: `updatedDate` in `desc` order.
|
|
418
|
+
*/
|
|
419
|
+
sort?: Sorting;
|
|
420
|
+
/** Cursor and paging information. */
|
|
421
|
+
paging?: CursorPaging;
|
|
422
|
+
}
|
|
423
|
+
export interface Sorting {
|
|
424
|
+
/** Name of the field to sort by. */
|
|
425
|
+
fieldName?: string;
|
|
426
|
+
/** Sort order. */
|
|
427
|
+
order?: SortOrder;
|
|
428
|
+
}
|
|
429
|
+
export declare enum SortOrder {
|
|
430
|
+
ASC = "ASC",
|
|
431
|
+
DESC = "DESC"
|
|
432
|
+
}
|
|
433
|
+
export interface CursorPaging {
|
|
434
|
+
/** Number of items to load. */
|
|
435
|
+
limit?: number | null;
|
|
436
|
+
/**
|
|
437
|
+
* Pointer to the next or previous page in the list of results.
|
|
438
|
+
*
|
|
439
|
+
* You can get the relevant cursor token
|
|
440
|
+
* from the `pagingMetadata` object in the previous call's response.
|
|
441
|
+
* Not relevant for the first request.
|
|
442
|
+
*/
|
|
443
|
+
cursor?: string | null;
|
|
444
|
+
}
|
|
445
|
+
export interface ListFilesResponse {
|
|
446
|
+
/** List of files in the Media Manager. */
|
|
447
|
+
files?: FileDescriptor[];
|
|
448
|
+
/** The next cursor if it exists. */
|
|
449
|
+
nextCursor?: PagingMetadataV2;
|
|
450
|
+
}
|
|
451
|
+
export interface PagingMetadataV2 {
|
|
452
|
+
/** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
|
|
453
|
+
cursors?: Cursors;
|
|
454
|
+
}
|
|
455
|
+
export interface Cursors {
|
|
456
|
+
/** Cursor pointing to next page in the list of results. */
|
|
457
|
+
next?: string | null;
|
|
458
|
+
}
|
|
459
|
+
export interface SearchFilesRequest {
|
|
460
|
+
/**
|
|
461
|
+
* Term to search for. Possible terms include the value of a file's
|
|
462
|
+
* `displayName`, `mimeType`, and `label`. <br />
|
|
463
|
+
* For example, if a file's label is cat, the search term is 'cat'.
|
|
464
|
+
*/
|
|
465
|
+
search?: string | null;
|
|
466
|
+
/**
|
|
467
|
+
* A root folder in the media manager to search in. <br />
|
|
468
|
+
* Default: `MEDIA_ROOT`.
|
|
469
|
+
*/
|
|
470
|
+
rootFolder?: RootFolder;
|
|
471
|
+
/** File media type. */
|
|
472
|
+
mediaTypes?: MediaType[];
|
|
473
|
+
/** Whether the link to the imported file is public or private. */
|
|
474
|
+
private?: boolean | null;
|
|
475
|
+
/**
|
|
476
|
+
* Field name and order to sort by. One of: <br />
|
|
477
|
+
* * `displayName`
|
|
478
|
+
* * `updatedDate`
|
|
479
|
+
* Default: `updatedDate` in `desc` order.
|
|
480
|
+
*/
|
|
481
|
+
sort?: Sorting;
|
|
482
|
+
/** Cursor and paging information. */
|
|
483
|
+
paging?: CursorPaging;
|
|
484
|
+
}
|
|
485
|
+
export declare enum RootFolder {
|
|
486
|
+
/** Root of all site media */
|
|
487
|
+
MEDIA_ROOT = "MEDIA_ROOT",
|
|
488
|
+
/** Root of the trash system folder */
|
|
489
|
+
TRASH_ROOT = "TRASH_ROOT",
|
|
490
|
+
/** Root of all visitor uploads */
|
|
491
|
+
VISITOR_UPLOADS_ROOT = "VISITOR_UPLOADS_ROOT"
|
|
492
|
+
}
|
|
493
|
+
export interface SearchFilesResponse {
|
|
494
|
+
/** Files matching the query. */
|
|
495
|
+
files?: FileDescriptor[];
|
|
496
|
+
/** The next cursor if it exists. */
|
|
497
|
+
nextCursor?: PagingMetadataV2;
|
|
498
|
+
}
|
|
499
|
+
export interface GenerateVideoStreamingUrlRequest {
|
|
500
|
+
/** File ID. */
|
|
501
|
+
fileId: string;
|
|
502
|
+
/** Video stream format. */
|
|
503
|
+
format?: StreamFormat;
|
|
504
|
+
}
|
|
505
|
+
export declare enum StreamFormat {
|
|
506
|
+
UNKNOWN = "UNKNOWN",
|
|
507
|
+
HLS = "HLS",
|
|
508
|
+
DASH = "DASH"
|
|
509
|
+
}
|
|
510
|
+
export interface GenerateVideoStreamingUrlResponse {
|
|
511
|
+
/** URL for streaming a specific file in the Media Manager. */
|
|
512
|
+
downloadUrl?: DownloadUrl;
|
|
513
|
+
}
|
|
514
|
+
export interface GenerateWebSocketTokenRequest {
|
|
515
|
+
}
|
|
516
|
+
export interface GenerateWebSocketTokenResponse {
|
|
517
|
+
/** The web socket token for the identity in the request */
|
|
518
|
+
token?: string;
|
|
519
|
+
}
|
|
520
|
+
export interface BulkDeleteFilesRequest {
|
|
521
|
+
/** IDs of the files to move to the Media Manager's trash bin. */
|
|
522
|
+
fileIds?: string[];
|
|
523
|
+
/**
|
|
524
|
+
* Whether the specified files are permanently deleted. <br />
|
|
525
|
+
* Default: `false`
|
|
526
|
+
*/
|
|
527
|
+
permanent?: boolean;
|
|
528
|
+
}
|
|
529
|
+
export interface BulkDeleteFilesResponse {
|
|
530
|
+
}
|
|
531
|
+
export interface BulkRestoreFilesFromTrashBinRequest {
|
|
532
|
+
/** IDs of the files to restore from the Media Manager's trash bin. */
|
|
533
|
+
fileIds: string[];
|
|
534
|
+
}
|
|
535
|
+
export interface BulkRestoreFilesFromTrashBinResponse {
|
|
536
|
+
}
|
|
537
|
+
export interface ListDeletedFilesRequest {
|
|
538
|
+
/**
|
|
539
|
+
* ID of the file's parent folder. <br />
|
|
540
|
+
* Default: `media-root`.
|
|
541
|
+
*/
|
|
542
|
+
parentFolderId?: string | null;
|
|
543
|
+
/** File media type. */
|
|
544
|
+
mediaTypes?: MediaType[];
|
|
545
|
+
/** Whether the link to the imported file is public or private. */
|
|
546
|
+
private?: boolean | null;
|
|
547
|
+
/**
|
|
548
|
+
* Field name and order to sort by. One of: <br />
|
|
549
|
+
* * `displayName`
|
|
550
|
+
* * `updatedDate`
|
|
551
|
+
* Default: `updatedDate` in `desc` order.
|
|
552
|
+
*/
|
|
553
|
+
sort?: Sorting;
|
|
554
|
+
/** Cursor and paging information. */
|
|
555
|
+
paging?: CursorPaging;
|
|
556
|
+
}
|
|
557
|
+
export interface ListDeletedFilesResponse {
|
|
558
|
+
/** List of files in the Media Manager's trash bin. */
|
|
559
|
+
files?: FileDescriptor[];
|
|
560
|
+
/** The next cursor if it exists. */
|
|
561
|
+
nextCursor?: PagingMetadataV2;
|
|
562
|
+
}
|