@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.
Files changed (55) hide show
  1. package/build/cjs/index.d.ts +2 -0
  2. package/build/cjs/index.js +25 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/src/media-site-media-v1-file-descriptor.http.d.ts +107 -0
  5. package/build/cjs/src/media-site-media-v1-file-descriptor.http.js +555 -0
  6. package/build/cjs/src/media-site-media-v1-file-descriptor.http.js.map +1 -0
  7. package/build/cjs/src/media-site-media-v1-file-descriptor.public.d.ts +18 -0
  8. package/build/cjs/src/media-site-media-v1-file-descriptor.public.js +97 -0
  9. package/build/cjs/src/media-site-media-v1-file-descriptor.public.js.map +1 -0
  10. package/build/cjs/src/media-site-media-v1-file-descriptor.types.d.ts +562 -0
  11. package/build/cjs/src/media-site-media-v1-file-descriptor.types.js +52 -0
  12. package/build/cjs/src/media-site-media-v1-file-descriptor.types.js.map +1 -0
  13. package/build/cjs/src/media-site-media-v1-file-descriptor.universal.d.ts +845 -0
  14. package/build/cjs/src/media-site-media-v1-file-descriptor.universal.js +962 -0
  15. package/build/cjs/src/media-site-media-v1-file-descriptor.universal.js.map +1 -0
  16. package/build/cjs/src/media-site-media-v1-folder.http.d.ts +49 -0
  17. package/build/cjs/src/media-site-media-v1-folder.http.js +285 -0
  18. package/build/cjs/src/media-site-media-v1-folder.http.js.map +1 -0
  19. package/build/cjs/src/media-site-media-v1-folder.public.d.ts +13 -0
  20. package/build/cjs/src/media-site-media-v1-folder.public.js +63 -0
  21. package/build/cjs/src/media-site-media-v1-folder.public.js.map +1 -0
  22. package/build/cjs/src/media-site-media-v1-folder.types.d.ts +179 -0
  23. package/build/cjs/src/media-site-media-v1-folder.types.js +23 -0
  24. package/build/cjs/src/media-site-media-v1-folder.types.js.map +1 -0
  25. package/build/cjs/src/media-site-media-v1-folder.universal.d.ts +337 -0
  26. package/build/cjs/src/media-site-media-v1-folder.universal.js +584 -0
  27. package/build/cjs/src/media-site-media-v1-folder.universal.js.map +1 -0
  28. package/build/es/index.d.ts +2 -0
  29. package/build/es/index.js +3 -0
  30. package/build/es/index.js.map +1 -0
  31. package/build/es/src/media-site-media-v1-file-descriptor.http.d.ts +107 -0
  32. package/build/es/src/media-site-media-v1-file-descriptor.http.js +538 -0
  33. package/build/es/src/media-site-media-v1-file-descriptor.http.js.map +1 -0
  34. package/build/es/src/media-site-media-v1-file-descriptor.public.d.ts +18 -0
  35. package/build/es/src/media-site-media-v1-file-descriptor.public.js +73 -0
  36. package/build/es/src/media-site-media-v1-file-descriptor.public.js.map +1 -0
  37. package/build/es/src/media-site-media-v1-file-descriptor.types.d.ts +562 -0
  38. package/build/es/src/media-site-media-v1-file-descriptor.types.js +49 -0
  39. package/build/es/src/media-site-media-v1-file-descriptor.types.js.map +1 -0
  40. package/build/es/src/media-site-media-v1-file-descriptor.universal.d.ts +845 -0
  41. package/build/es/src/media-site-media-v1-file-descriptor.universal.js +926 -0
  42. package/build/es/src/media-site-media-v1-file-descriptor.universal.js.map +1 -0
  43. package/build/es/src/media-site-media-v1-folder.http.d.ts +49 -0
  44. package/build/es/src/media-site-media-v1-folder.http.js +273 -0
  45. package/build/es/src/media-site-media-v1-folder.http.js.map +1 -0
  46. package/build/es/src/media-site-media-v1-folder.public.d.ts +13 -0
  47. package/build/es/src/media-site-media-v1-folder.public.js +48 -0
  48. package/build/es/src/media-site-media-v1-folder.public.js.map +1 -0
  49. package/build/es/src/media-site-media-v1-folder.types.d.ts +179 -0
  50. package/build/es/src/media-site-media-v1-folder.types.js +20 -0
  51. package/build/es/src/media-site-media-v1-folder.types.js.map +1 -0
  52. package/build/es/src/media-site-media-v1-folder.universal.d.ts +337 -0
  53. package/build/es/src/media-site-media-v1-folder.universal.js +553 -0
  54. package/build/es/src/media-site-media-v1-folder.universal.js.map +1 -0
  55. package/package.json +37 -0
@@ -0,0 +1,845 @@
1
+ export declare const __debug: {
2
+ verboseLogging: {
3
+ on: () => boolean;
4
+ off: () => boolean;
5
+ };
6
+ };
7
+ export interface FileDescriptor {
8
+ /** File ID. Generated when a file is uploaded to the Media Manager. */
9
+ _id?: string;
10
+ /** File name as it appears in the Media Manager. */
11
+ displayName?: string;
12
+ /** Static URL of the file. */
13
+ url?: string;
14
+ /** ID of the file's parent folder. */
15
+ parentFolderId?: string | null;
16
+ /** File hash. */
17
+ hash?: string;
18
+ /**
19
+ * Whether the link to the uploaded file is public or private. Private links require a token.
20
+ * @readonly
21
+ */
22
+ private?: boolean;
23
+ /** Media file type. */
24
+ mediaType?: MediaType;
25
+ /** Media file content. */
26
+ media?: FileMedia;
27
+ /**
28
+ * Status of the file that was uploaded.
29
+ * * `FAILED`: The file failed to upload, for example, during media post processing.
30
+ * * `READY`: The file uploaded, finished all processing, and is ready for use.
31
+ * * `PENDING`: The file is processing and the URLs are not yet available. This response is returned when importing a file.
32
+ */
33
+ operationStatus?: OperationStatus;
34
+ /** URL where the file was uploaded from. */
35
+ sourceUrl?: string | null;
36
+ /** URL of the file's thumbnail. */
37
+ thumbnailUrl?: string | null;
38
+ /** 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. */
39
+ labels?: string[];
40
+ /** Date and time the file was created. */
41
+ _createdDate?: Date;
42
+ /** Date and time the file was updated. */
43
+ _updatedDate?: Date;
44
+ /** The Wix site ID where the media file is stored. */
45
+ siteId?: string;
46
+ /** State of the file. */
47
+ state?: State;
48
+ }
49
+ export declare enum MediaType {
50
+ UNKNOWN = "UNKNOWN",
51
+ IMAGE = "IMAGE",
52
+ VIDEO = "VIDEO",
53
+ AUDIO = "AUDIO",
54
+ DOCUMENT = "DOCUMENT",
55
+ VECTOR = "VECTOR"
56
+ }
57
+ export interface FileMedia extends FileMediaMediaOneOf {
58
+ /** Information about the image. */
59
+ image?: ImageMedia;
60
+ /** Information about the video. */
61
+ video?: string;
62
+ /** Information about the audio. */
63
+ audio?: AudioV2;
64
+ /** Information about the document. */
65
+ document?: string;
66
+ /** Information about the vector. */
67
+ vector?: ImageMedia;
68
+ }
69
+ /** @oneof */
70
+ export interface FileMediaMediaOneOf {
71
+ /** Information about the image. */
72
+ image?: ImageMedia;
73
+ /** Information about the video. */
74
+ video?: string;
75
+ /** Information about the audio. */
76
+ audio?: AudioV2;
77
+ /** Information about the document. */
78
+ document?: string;
79
+ /** Information about the vector. */
80
+ vector?: ImageMedia;
81
+ }
82
+ export interface ImageMedia {
83
+ /** Image data. */
84
+ image?: string;
85
+ /** Image colors. */
86
+ colors?: Colors;
87
+ /** Information about faces in the image. Use to crop images without cutting out faces. */
88
+ faces?: FaceRecognition[];
89
+ /**
90
+ * Information about the image preview.
91
+ * You can use this to display a preview for private images.
92
+ */
93
+ previewImage?: string;
94
+ }
95
+ export interface Colors {
96
+ /** Main color of the image. */
97
+ prominent?: Color;
98
+ /** Color palette of the image. */
99
+ palette?: Color[];
100
+ }
101
+ export interface Color {
102
+ /** HEX color. */
103
+ hex?: string | null;
104
+ /** RGB color. */
105
+ rgb?: ColorRGB;
106
+ }
107
+ export interface ColorRGB {
108
+ /** Red channel. */
109
+ r?: number | null;
110
+ /** Green channel. */
111
+ g?: number | null;
112
+ /** Blue channel. */
113
+ b?: number | null;
114
+ }
115
+ /**
116
+ * Using this object you can crop images while centering on faces
117
+ * ------------------------
118
+ * | |
119
+ * | x,y |
120
+ * | *-------- |
121
+ * | | . . | |
122
+ * | | | | height |
123
+ * | | \ / | |
124
+ * | | | |
125
+ * | --------- |
126
+ * | width |
127
+ * | |
128
+ * |______________________|
129
+ */
130
+ export interface FaceRecognition {
131
+ /** The accuracy percentage of the face recognition. The likelihood that a face is detected. */
132
+ confidence?: number;
133
+ /** Top left x pixel coordinate of the face. */
134
+ x?: number;
135
+ /** Top left y pixel coordinate of the face. */
136
+ y?: number;
137
+ /** Face pixel height. */
138
+ height?: number;
139
+ /** Face pixel width. */
140
+ width?: number;
141
+ }
142
+ export interface VideoResolution {
143
+ /** Video URL. */
144
+ url?: string;
145
+ /** Video height. */
146
+ height?: number;
147
+ /** Video width. */
148
+ width?: number;
149
+ /** Video format for example, mp4, hls. */
150
+ format?: string;
151
+ }
152
+ export interface AudioV2 {
153
+ /** WixMedia ID. */
154
+ _id?: string;
155
+ /** Audio formats available for this file. */
156
+ assets?: string[];
157
+ }
158
+ export declare enum OperationStatus {
159
+ /** File upload or processing failed */
160
+ FAILED = "FAILED",
161
+ /** File is ready for consumption */
162
+ READY = "READY",
163
+ /** File is waiting for processing or currently being processed */
164
+ PENDING = "PENDING"
165
+ }
166
+ export declare enum State {
167
+ OK = "OK",
168
+ DELETED = "DELETED"
169
+ }
170
+ export interface FileReady {
171
+ /** File entity that is ready with full information */
172
+ file?: FileDescriptor;
173
+ /** External information passed in the file import or upload. */
174
+ externalInfo?: ExternalInfo;
175
+ /** The File was restored from the trash-bin */
176
+ triggeredByUndelete?: boolean;
177
+ }
178
+ export interface ExternalInfo {
179
+ /** Information about an external entity that is mapped to a Wix entity. */
180
+ origin?: string;
181
+ /** External ID that is mapped to a Wix entity. */
182
+ externalIds?: string[];
183
+ }
184
+ export interface FileFailed {
185
+ /** External information passed in the file import or upload. */
186
+ externalInfo?: ExternalInfo;
187
+ }
188
+ export interface GenerateFilesDownloadUrlRequest {
189
+ /** IDs of the files to download. */
190
+ fileIds: string[];
191
+ }
192
+ export interface GenerateFilesDownloadUrlResponse {
193
+ /** URL for downloading the compressed file containing the specified files in the Media Manager. */
194
+ downloadUrl?: string;
195
+ }
196
+ export interface GenerateFileDownloadUrlRequest {
197
+ /** File ID. */
198
+ fileId: string;
199
+ /**
200
+ * Temporary file name used to identify the file type. For example, a file named "myFile.jpeg" identifies as an "image/jpeg" file type. <br />
201
+ *
202
+ * **Note:** The name that appears in the Media Manager is taken from the `filename` query parameter in the upload request.
203
+ */
204
+ downloadFileName?: string | null;
205
+ /**
206
+ * The time that it takes in minutes for the download URL to expire. <br />
207
+ * Default: `600`. <br />
208
+ * Limit: `525600` (1 year).
209
+ */
210
+ expirationInMinutes?: number | null;
211
+ /**
212
+ * The redirect URL for when the temporary download URL with a token expires. <br />
213
+ * Default: A 403 Forbidden response page.
214
+ */
215
+ expirationRedirectUrl?: string | null;
216
+ /**
217
+ * Keys for downloading different assets (format and quality) of a file.
218
+ * Default: `src`, key representing the original file's format and quality.
219
+ */
220
+ assetKeys?: string[] | null;
221
+ }
222
+ export interface GenerateFileDownloadUrlResponse {
223
+ /** URL for downloading a specific file in the Media Manager. */
224
+ downloadUrls?: DownloadUrl[];
225
+ }
226
+ export interface DownloadUrl {
227
+ /** The file download URL. */
228
+ url?: string;
229
+ /**
230
+ * Key for downloading a different asset (format and quality) of a file.
231
+ * Default: `src`, key representing the original file's format and quality.
232
+ */
233
+ assetKey?: string;
234
+ }
235
+ export interface GetFileDescriptorRequest {
236
+ /** File ID. */
237
+ fileId: string;
238
+ }
239
+ export interface GetFileDescriptorResponse {
240
+ /** Information about the file. */
241
+ file?: FileDescriptor;
242
+ }
243
+ export interface UpdateFileRequest {
244
+ /** ID of the file to update. */
245
+ fileId: string;
246
+ /** File name that appears in the Media Manager. */
247
+ displayName?: string | null;
248
+ /**
249
+ * ID of the file's parent folder. <br />
250
+ * Default: `media-root`.
251
+ */
252
+ parentFolderId?: string | null;
253
+ /** 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. */
254
+ labels?: string[] | null;
255
+ }
256
+ export interface UpdateFileResponse {
257
+ /** Information about the updated file. */
258
+ file?: FileDescriptor;
259
+ }
260
+ export interface GenerateFileUploadUrlRequest {
261
+ /** File mime type. */
262
+ mimeType: string | null;
263
+ /**
264
+ * Temporary file name used to identify the file type. For example, a file named "myFile.jpeg" identifies as an "image/jpeg" file type.
265
+ * <br /> **Note:** The name that appears in the Media Manager is taken from the `filename` query parameter in the upload request.
266
+ */
267
+ fileName?: string | null;
268
+ /** File size in bytes. */
269
+ sizeInBytes?: string | null;
270
+ /**
271
+ * ID of the file's parent folder. <br />
272
+ * Default: `media-root`.
273
+ */
274
+ parentFolderId?: string | null;
275
+ /** Whether the link to the uploaded file is public or private. See `Private Files` in terminology. */
276
+ private?: boolean | null;
277
+ /** 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. */
278
+ labels?: string[] | null;
279
+ /** A place to map an external entity to an uploaded file in the Wix Media Manager. */
280
+ externalInfo?: ExternalInfo;
281
+ }
282
+ export interface GenerateFileUploadUrlResponse {
283
+ /** The URL for uploading a file to the Media Manager. */
284
+ uploadUrl?: string;
285
+ }
286
+ export interface GenerateFileResumableUploadUrlRequest {
287
+ /** File mime type. */
288
+ mimeType: string | null;
289
+ /**
290
+ * Temporary file name used to identify the file type. For example, a file named "myFile.jpeg" identifies as an "image/jpeg" file type.
291
+ * <br /> **Note:** The name that appears in the Media Manager is taken from the `filename` query parameter in the upload request.
292
+ */
293
+ fileName?: string | null;
294
+ /** File size in bytes. */
295
+ sizeInBytes?: string | null;
296
+ /**
297
+ * ID of the file's parent folder. <br />
298
+ * Default: `media-root`.
299
+ */
300
+ parentFolderId?: string | null;
301
+ /** Whether the link to the imported file is public or private. See `Private Files` in terminology. */
302
+ private?: boolean | 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
+ /** The upload protocol to use for implementing the resumable upload. */
306
+ uploadProtocol?: UploadProtocol;
307
+ }
308
+ export declare enum UploadProtocol {
309
+ /** The upload protocol to use for implementing the resumable upload. */
310
+ TUS = "TUS"
311
+ }
312
+ export interface GenerateFileResumableUploadUrlResponse {
313
+ /** The upload protocol to use for implementing the resumable upload. */
314
+ uploadProtocol?: UploadProtocol;
315
+ /** The URL for uploading a file to the Media Manager. */
316
+ uploadUrl?: string;
317
+ /** Single-use upload token. */
318
+ uploadToken?: string;
319
+ }
320
+ export interface ImportFileRequest {
321
+ /** Publicly accessible external file url. */
322
+ url: string;
323
+ /** Media type of the file to import. */
324
+ mediaType?: MediaType;
325
+ /** File name that appears in the Media Manager. */
326
+ displayName?: string | null;
327
+ /**
328
+ * ID of the file's parent folder. <br />
329
+ * Default: `media-root`.
330
+ */
331
+ parentFolderId?: string | null;
332
+ /** Whether the link to the imported file is public or private. */
333
+ private?: boolean | null;
334
+ /** 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. */
335
+ labels?: string[] | null;
336
+ /** File mime type. */
337
+ mimeType?: string;
338
+ /** A place to map an external entity to an imported file in the Wix Media Manager. */
339
+ externalInfo?: ExternalInfo;
340
+ }
341
+ export interface ImportFileResponse {
342
+ /** Information about the imported file. */
343
+ file?: FileDescriptor;
344
+ }
345
+ export interface BulkImportFilesRequest {
346
+ /** Information about the files to import. */
347
+ importFileRequests?: ImportFileRequest[];
348
+ }
349
+ export interface BulkImportFilesResponse {
350
+ /** Information about the imported files. */
351
+ files?: FileDescriptor[];
352
+ }
353
+ export interface ListFilesRequest {
354
+ /**
355
+ * ID of the file's parent folder. <br />
356
+ * Default:`media-root`.
357
+ */
358
+ parentFolderId?: string | null;
359
+ /** File media type. */
360
+ mediaTypes?: MediaType[];
361
+ /** Whether the link to the imported file is public or private. */
362
+ private?: boolean | null;
363
+ /**
364
+ * Field name and order to sort by. One of: <br />
365
+ * * `displayName`
366
+ * * `updatedDate`
367
+ * Default: `updatedDate` in `desc` order.
368
+ */
369
+ sort?: Sorting;
370
+ /** Cursor and paging information. */
371
+ paging?: CursorPaging;
372
+ }
373
+ export interface Sorting {
374
+ /** Name of the field to sort by. */
375
+ fieldName?: string;
376
+ /** Sort order. */
377
+ order?: SortOrder;
378
+ }
379
+ export declare enum SortOrder {
380
+ ASC = "ASC",
381
+ DESC = "DESC"
382
+ }
383
+ export interface CursorPaging {
384
+ /** Number of items to load. */
385
+ limit?: number | null;
386
+ /**
387
+ * Pointer to the next or previous page in the list of results.
388
+ *
389
+ * You can get the relevant cursor token
390
+ * from the `pagingMetadata` object in the previous call's response.
391
+ * Not relevant for the first request.
392
+ */
393
+ cursor?: string | null;
394
+ }
395
+ export interface ListFilesResponse {
396
+ /** List of files in the Media Manager. */
397
+ files?: FileDescriptor[];
398
+ /** The next cursor if it exists. */
399
+ nextCursor?: PagingMetadataV2;
400
+ }
401
+ export interface PagingMetadataV2 {
402
+ /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
403
+ cursors?: Cursors;
404
+ }
405
+ export interface Cursors {
406
+ /** Cursor pointing to next page in the list of results. */
407
+ next?: string | null;
408
+ }
409
+ export interface SearchFilesRequest {
410
+ /**
411
+ * Term to search for. Possible terms include the value of a file's
412
+ * `displayName`, `mimeType`, and `label`. <br />
413
+ * For example, if a file's label is cat, the search term is 'cat'.
414
+ */
415
+ search?: string | null;
416
+ /**
417
+ * A root folder in the media manager to search in. <br />
418
+ * Default: `MEDIA_ROOT`.
419
+ */
420
+ rootFolder?: RootFolder;
421
+ /** File media type. */
422
+ mediaTypes?: MediaType[];
423
+ /** Whether the link to the imported file is public or private. */
424
+ private?: boolean | null;
425
+ /**
426
+ * Field name and order to sort by. One of: <br />
427
+ * * `displayName`
428
+ * * `updatedDate`
429
+ * Default: `updatedDate` in `desc` order.
430
+ */
431
+ sort?: Sorting;
432
+ /** Cursor and paging information. */
433
+ paging?: CursorPaging;
434
+ }
435
+ export declare enum RootFolder {
436
+ /** Root of all site media */
437
+ MEDIA_ROOT = "MEDIA_ROOT",
438
+ /** Root of the trash system folder */
439
+ TRASH_ROOT = "TRASH_ROOT",
440
+ /** Root of all visitor uploads */
441
+ VISITOR_UPLOADS_ROOT = "VISITOR_UPLOADS_ROOT"
442
+ }
443
+ export interface SearchFilesResponse {
444
+ /** Files matching the query. */
445
+ files?: FileDescriptor[];
446
+ /** The next cursor if it exists. */
447
+ nextCursor?: PagingMetadataV2;
448
+ }
449
+ export interface GenerateVideoStreamingUrlRequest {
450
+ /** File ID. */
451
+ fileId: string;
452
+ /** Video stream format. */
453
+ format?: StreamFormat;
454
+ }
455
+ export declare enum StreamFormat {
456
+ UNKNOWN = "UNKNOWN",
457
+ HLS = "HLS",
458
+ DASH = "DASH"
459
+ }
460
+ export interface GenerateVideoStreamingUrlResponse {
461
+ /** URL for streaming a specific file in the Media Manager. */
462
+ downloadUrl?: DownloadUrl;
463
+ }
464
+ export interface GenerateWebSocketTokenRequest {
465
+ }
466
+ export interface GenerateWebSocketTokenResponse {
467
+ /** The web socket token for the identity in the request */
468
+ token?: string;
469
+ }
470
+ export interface BulkDeleteFilesRequest {
471
+ /** IDs of the files to move to the Media Manager's trash bin. */
472
+ fileIds?: string[];
473
+ /**
474
+ * Whether the specified files are permanently deleted. <br />
475
+ * Default: `false`
476
+ */
477
+ permanent?: boolean;
478
+ }
479
+ export interface BulkDeleteFilesResponse {
480
+ }
481
+ export interface BulkRestoreFilesFromTrashBinRequest {
482
+ /** IDs of the files to restore from the Media Manager's trash bin. */
483
+ fileIds: string[];
484
+ }
485
+ export interface BulkRestoreFilesFromTrashBinResponse {
486
+ }
487
+ export interface ListDeletedFilesRequest {
488
+ /**
489
+ * ID of the file's parent folder. <br />
490
+ * Default: `media-root`.
491
+ */
492
+ parentFolderId?: string | null;
493
+ /** File media type. */
494
+ mediaTypes?: MediaType[];
495
+ /** Whether the link to the imported file is public or private. */
496
+ private?: boolean | null;
497
+ /**
498
+ * Field name and order to sort by. One of: <br />
499
+ * * `displayName`
500
+ * * `updatedDate`
501
+ * Default: `updatedDate` in `desc` order.
502
+ */
503
+ sort?: Sorting;
504
+ /** Cursor and paging information. */
505
+ paging?: CursorPaging;
506
+ }
507
+ export interface ListDeletedFilesResponse {
508
+ /** List of files in the Media Manager's trash bin. */
509
+ files?: FileDescriptor[];
510
+ /** The next cursor if it exists. */
511
+ nextCursor?: PagingMetadataV2;
512
+ }
513
+ /**
514
+ * Generates a URL for downloading a compressed file containing specific files in the Media Manager. <br/>
515
+ *
516
+ * The compressed file can contain up to 1000 files.
517
+ * @param fileIds - IDs of the files to download.
518
+ * @public
519
+ * @documentationMaturity preview
520
+ * @requiredField fileIds
521
+ */
522
+ export declare function generateFilesDownloadUrl(fileIds: string[]): Promise<GenerateFilesDownloadUrlResponse>;
523
+ /**
524
+ * Generates one or more temporary URLs for downloading a specific file in the Media Manager.
525
+ *
526
+ * To download different assets of the file, use the `assetKeys` parameter which generates a download URL for each asset.
527
+ * If no `assetKey` is specified, it defaults to `src`, which generates one download URL in the original file's format and quality.
528
+ *
529
+ * 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.
530
+ * @param fileId - File ID.
531
+ * @public
532
+ * @documentationMaturity preview
533
+ * @requiredField fileId
534
+ */
535
+ export declare function generateFileDownloadUrl(fileId: string, options?: GenerateFileDownloadUrlOptions): Promise<GenerateFileDownloadUrlResponse>;
536
+ export interface GenerateFileDownloadUrlOptions {
537
+ /**
538
+ * Temporary file name used to identify the file type. For example, a file named "myFile.jpeg" identifies as an "image/jpeg" file type. <br />
539
+ *
540
+ * **Note:** The name that appears in the Media Manager is taken from the `filename` query parameter in the upload request.
541
+ */
542
+ downloadFileName?: string | null;
543
+ /**
544
+ * The time that it takes in minutes for the download URL to expire. <br />
545
+ * Default: `600`. <br />
546
+ * Limit: `525600` (1 year).
547
+ */
548
+ expirationInMinutes?: number | null;
549
+ /**
550
+ * The redirect URL for when the temporary download URL with a token expires. <br />
551
+ * Default: A 403 Forbidden response page.
552
+ */
553
+ expirationRedirectUrl?: string | null;
554
+ /**
555
+ * Keys for downloading different assets (format and quality) of a file.
556
+ * Default: `src`, key representing the original file's format and quality.
557
+ */
558
+ assetKeys?: string[] | null;
559
+ }
560
+ /**
561
+ * Gets information about a specific file in the Media Manager.
562
+ * @param fileId - File ID.
563
+ * @public
564
+ * @documentationMaturity preview
565
+ * @requiredField fileId
566
+ */
567
+ export declare function getFileDescriptor(fileId: string): Promise<GetFileDescriptorResponse>;
568
+ /**
569
+ * Updates a file. <br />
570
+ *
571
+ * You can use the `parentFolderId` parameter to move a file from its current folder to a different folder.
572
+ * @param fileId - ID of the file to update.
573
+ * @public
574
+ * @documentationMaturity preview
575
+ * @requiredField fileId
576
+ */
577
+ export declare function updateFile(fileId: string, options?: UpdateFileOptions): Promise<UpdateFileResponse>;
578
+ export interface UpdateFileOptions {
579
+ /** File name that appears in the Media Manager. */
580
+ displayName?: string | null;
581
+ /**
582
+ * ID of the file's parent folder. <br />
583
+ * Default: `media-root`.
584
+ */
585
+ parentFolderId?: string | null;
586
+ /** 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. */
587
+ labels?: string[] | null;
588
+ }
589
+ /**
590
+ * Generates an upload URL to allow external clients to upload a file to the Media Manager. <br/>
591
+ *
592
+ * 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.
593
+ * >**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.
594
+ * @param mimeType - File mime type.
595
+ * @public
596
+ * @documentationMaturity preview
597
+ * @requiredField mimeType
598
+ */
599
+ export declare function generateFileUploadUrl(mimeType: string | null, options?: GenerateFileUploadUrlOptions): Promise<GenerateFileUploadUrlResponse>;
600
+ export interface GenerateFileUploadUrlOptions {
601
+ /**
602
+ * Temporary file name used to identify the file type. For example, a file named "myFile.jpeg" identifies as an "image/jpeg" file type.
603
+ * <br /> **Note:** The name that appears in the Media Manager is taken from the `filename` query parameter in the upload request.
604
+ */
605
+ fileName?: string | null;
606
+ /** File size in bytes. */
607
+ sizeInBytes?: string | null;
608
+ /**
609
+ * ID of the file's parent folder. <br />
610
+ * Default: `media-root`.
611
+ */
612
+ parentFolderId?: string | null;
613
+ /** Whether the link to the uploaded file is public or private. See `Private Files` in terminology. */
614
+ private?: boolean | null;
615
+ /** 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. */
616
+ labels?: string[] | null;
617
+ /** A place to map an external entity to an uploaded file in the Wix Media Manager. */
618
+ externalInfo?: ExternalInfo;
619
+ }
620
+ /**
621
+ * Generates a resumable upload URL to allow external clients to easily upload large files over 10MB to the Media Manager. <br/>
622
+ *
623
+ * 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.
624
+ * 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.
625
+ * @param mimeType - File mime type.
626
+ * @public
627
+ * @documentationMaturity preview
628
+ * @requiredField mimeType
629
+ */
630
+ export declare function generateFileResumableUploadUrl(mimeType: string | null, options?: GenerateFileResumableUploadUrlOptions): Promise<GenerateFileResumableUploadUrlResponse>;
631
+ export interface GenerateFileResumableUploadUrlOptions {
632
+ /**
633
+ * Temporary file name used to identify the file type. For example, a file named "myFile.jpeg" identifies as an "image/jpeg" file type.
634
+ * <br /> **Note:** The name that appears in the Media Manager is taken from the `filename` query parameter in the upload request.
635
+ */
636
+ fileName?: string | null;
637
+ /** File size in bytes. */
638
+ sizeInBytes?: string | null;
639
+ /**
640
+ * ID of the file's parent folder. <br />
641
+ * Default: `media-root`.
642
+ */
643
+ parentFolderId?: string | null;
644
+ /** Whether the link to the imported file is public or private. See `Private Files` in terminology. */
645
+ private?: boolean | null;
646
+ /** 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. */
647
+ labels?: string[] | null;
648
+ /** The upload protocol to use for implementing the resumable upload. */
649
+ uploadProtocol?: UploadProtocol;
650
+ }
651
+ /**
652
+ * Imports a file to the Media Manager using an external url.
653
+ *
654
+ * Returns information about the imported file.
655
+ * Use the `parentFolderId` parameter to specify which folder you want the file to be imported to.
656
+ * If no folder is specified, the file is imported to the `media-root` folder.
657
+ *
658
+ * To import a file, you need to provide one of the following:
659
+ * 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'.
660
+ * 2. Pass the file's name and extenstion. For example, 'my-image.png'.
661
+ * 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.
662
+ *
663
+ * >**Note:** The `media` property isn't returned in the `files` response object.
664
+ * @param url - Publicly accessible external file url.
665
+ * @public
666
+ * @documentationMaturity preview
667
+ * @requiredField url
668
+ */
669
+ export declare function importFile(url: string, options?: ImportFileOptions): Promise<ImportFileResponse>;
670
+ export interface ImportFileOptions {
671
+ /** Media type of the file to import. */
672
+ mediaType?: MediaType;
673
+ /** File name that appears in the Media Manager. */
674
+ displayName?: string | null;
675
+ /**
676
+ * ID of the file's parent folder. <br />
677
+ * Default: `media-root`.
678
+ */
679
+ parentFolderId?: string | null;
680
+ /** Whether the link to the imported file is public or private. */
681
+ private?: boolean | null;
682
+ /** 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. */
683
+ labels?: string[] | null;
684
+ /** File mime type. */
685
+ mimeType?: string;
686
+ /** A place to map an external entity to an imported file in the Wix Media Manager. */
687
+ externalInfo?: ExternalInfo;
688
+ }
689
+ /**
690
+ * Imports a bulk of files to the Media Manager using external urls. <br/>
691
+ *
692
+ * Returns information about the imported files. Use the `parentFolderId` parameter to specify in which folder you want each file to be imported to.
693
+ * If no folder is specified, the file is imported to the `media-root` folder.
694
+ *
695
+ * To import files, you need to provide one of the following:
696
+ * 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'.
697
+ * 2. Pass each file's name and extenstion. For example, 'my-image.png'.
698
+ * 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.
699
+ *
700
+ * >**Note:** The `media` property isn't returned in the `files` response object.
701
+ * @public
702
+ * @documentationMaturity preview
703
+ * @requiredField options.importFileRequests.url
704
+ */
705
+ export declare function bulkImportFiles(options?: BulkImportFilesOptions): Promise<BulkImportFilesResponse>;
706
+ export interface BulkImportFilesOptions {
707
+ /** Information about the files to import. */
708
+ importFileRequests?: ImportFileRequest[];
709
+ }
710
+ /**
711
+ * Retrieves a list of files in the Media Manager.
712
+ *
713
+ * 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.
714
+ * @public
715
+ * @documentationMaturity preview
716
+ */
717
+ export declare function listFiles(options?: ListFilesOptions): Promise<ListFilesResponse>;
718
+ export interface ListFilesOptions {
719
+ /**
720
+ * ID of the file's parent folder. <br />
721
+ * Default:`media-root`.
722
+ */
723
+ parentFolderId?: string | null;
724
+ /** File media type. */
725
+ mediaTypes?: MediaType[];
726
+ /** Whether the link to the imported file is public or private. */
727
+ private?: boolean | null;
728
+ /**
729
+ * Field name and order to sort by. One of: <br />
730
+ * * `displayName`
731
+ * * `updatedDate`
732
+ * Default: `updatedDate` in `desc` order.
733
+ */
734
+ sort?: Sorting;
735
+ /** Cursor and paging information. */
736
+ paging?: CursorPaging;
737
+ }
738
+ /**
739
+ * Searches all folders in the Media Manager and returns a list of files that match the terms specified in the parameters. <br/>
740
+ *
741
+ * If no parameters are specified, the endpoint returns all files in the `MEDIA_ROOT` folder.
742
+ * @public
743
+ * @documentationMaturity preview
744
+ */
745
+ export declare function searchFiles(options?: SearchFilesOptions): Promise<SearchFilesResponse>;
746
+ export interface SearchFilesOptions {
747
+ /**
748
+ * Term to search for. Possible terms include the value of a file's
749
+ * `displayName`, `mimeType`, and `label`. <br />
750
+ * For example, if a file's label is cat, the search term is 'cat'.
751
+ */
752
+ search?: string | null;
753
+ /**
754
+ * A root folder in the media manager to search in. <br />
755
+ * Default: `MEDIA_ROOT`.
756
+ */
757
+ rootFolder?: RootFolder;
758
+ /** File media type. */
759
+ mediaTypes?: MediaType[];
760
+ /** Whether the link to the imported file is public or private. */
761
+ private?: boolean | null;
762
+ /**
763
+ * Field name and order to sort by. One of: <br />
764
+ * * `displayName`
765
+ * * `updatedDate`
766
+ * Default: `updatedDate` in `desc` order.
767
+ */
768
+ sort?: Sorting;
769
+ /** Cursor and paging information. */
770
+ paging?: CursorPaging;
771
+ }
772
+ /**
773
+ * Generates a URL for streaming a specific video file in the Media Manager. <br/>
774
+ *
775
+ * 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.
776
+ * @param fileId - File ID.
777
+ * @public
778
+ * @documentationMaturity preview
779
+ * @requiredField fileId
780
+ */
781
+ export declare function generateVideoStreamingUrl(fileId: string, options?: GenerateVideoStreamingUrlOptions): Promise<GenerateVideoStreamingUrlResponse>;
782
+ export interface GenerateVideoStreamingUrlOptions {
783
+ /** Video stream format. */
784
+ format?: StreamFormat;
785
+ }
786
+ /**
787
+ * Deletes the specified files from the Media Manager. <br/>
788
+ *
789
+ * 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.
790
+ *
791
+ * Note the following:
792
+ * * The specified files can be from different folders.
793
+ * * Moving multiple files at once is an asynchronous action, and may take time for the changes to appear in the Media Manager.
794
+ * * Attempting to delete files that are already in the trash bin doesn't result in an error.
795
+ * * 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).
796
+ * * 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.
797
+ * @public
798
+ * @documentationMaturity preview
799
+ */
800
+ export declare function bulkDeleteFiles(options?: BulkDeleteFilesOptions): Promise<void>;
801
+ export interface BulkDeleteFilesOptions {
802
+ /** IDs of the files to move to the Media Manager's trash bin. */
803
+ fileIds?: string[];
804
+ /**
805
+ * Whether the specified files are permanently deleted. <br />
806
+ * Default: `false`
807
+ */
808
+ permanent?: boolean;
809
+ }
810
+ /**
811
+ * Restores the specified files from the Media Manager's trash bin, and moves them to their original locations in the Media Manager.
812
+ * @param fileIds - IDs of the files to restore from the Media Manager's trash bin.
813
+ * @public
814
+ * @documentationMaturity preview
815
+ * @requiredField fileIds
816
+ */
817
+ export declare function bulkRestoreFilesFromTrashBin(fileIds: string[]): Promise<void>;
818
+ /**
819
+ * Retrieves a list of files in the Media Manager's trash bin. <br/>
820
+ *
821
+ * >**Note:** The Media Manager's trash bin (`TRASH-ROOT` folder) only contains temporarily deleted files, not permanently deleted files.
822
+ * @public
823
+ * @documentationMaturity preview
824
+ */
825
+ export declare function listDeletedFiles(options?: ListDeletedFilesOptions): Promise<ListDeletedFilesResponse>;
826
+ export interface ListDeletedFilesOptions {
827
+ /**
828
+ * ID of the file's parent folder. <br />
829
+ * Default: `media-root`.
830
+ */
831
+ parentFolderId?: string | null;
832
+ /** File media type. */
833
+ mediaTypes?: MediaType[];
834
+ /** Whether the link to the imported file is public or private. */
835
+ private?: boolean | null;
836
+ /**
837
+ * Field name and order to sort by. One of: <br />
838
+ * * `displayName`
839
+ * * `updatedDate`
840
+ * Default: `updatedDate` in `desc` order.
841
+ */
842
+ sort?: Sorting;
843
+ /** Cursor and paging information. */
844
+ paging?: CursorPaging;
845
+ }