@wix/auto_sdk_media_files 1.0.17 → 1.0.19

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 (119) hide show
  1. package/build/cjs/index.d.ts +295 -1
  2. package/build/cjs/index.js +2264 -15
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/{es/src/media-site-media-v1-file-descriptor-files.types.d.ts → cjs/media-site-media-v1-file-descriptor-files.universal-C5dCrbUZ.d.ts} +457 -220
  5. package/build/cjs/meta.d.ts +1052 -1
  6. package/build/cjs/meta.js +1326 -15
  7. package/build/cjs/meta.js.map +1 -1
  8. package/build/{cjs/src/media-site-media-v1-file-descriptor-files.public.d.ts → es/index.d.mts} +63 -26
  9. package/build/es/index.mjs +2212 -0
  10. package/build/es/index.mjs.map +1 -0
  11. package/build/{cjs/src/media-site-media-v1-file-descriptor-files.types.d.ts → es/media-site-media-v1-file-descriptor-files.universal-C5dCrbUZ.d.mts} +457 -220
  12. package/build/es/meta.d.mts +1052 -0
  13. package/build/es/meta.mjs +1287 -0
  14. package/build/es/meta.mjs.map +1 -0
  15. package/build/internal/cjs/index.d.ts +295 -1
  16. package/build/internal/cjs/index.js +2264 -15
  17. package/build/internal/cjs/index.js.map +1 -1
  18. package/build/internal/cjs/{src/media-site-media-v1-file-descriptor-files.types.d.ts → media-site-media-v1-file-descriptor-files.universal-C5dCrbUZ.d.ts} +457 -220
  19. package/build/internal/cjs/meta.d.ts +1052 -1
  20. package/build/internal/cjs/meta.js +1326 -15
  21. package/build/internal/cjs/meta.js.map +1 -1
  22. package/build/internal/{cjs/src/media-site-media-v1-file-descriptor-files.public.d.ts → es/index.d.mts} +63 -26
  23. package/build/internal/es/index.mjs +2212 -0
  24. package/build/internal/es/index.mjs.map +1 -0
  25. package/build/internal/es/{src/media-site-media-v1-file-descriptor-files.types.d.ts → media-site-media-v1-file-descriptor-files.universal-C5dCrbUZ.d.mts} +457 -220
  26. package/build/internal/es/meta.d.mts +1052 -0
  27. package/build/internal/es/meta.mjs +1287 -0
  28. package/build/internal/es/meta.mjs.map +1 -0
  29. package/package.json +10 -9
  30. package/build/cjs/index.typings.d.ts +0 -1
  31. package/build/cjs/index.typings.js +0 -18
  32. package/build/cjs/index.typings.js.map +0 -1
  33. package/build/cjs/src/media-site-media-v1-file-descriptor-files.context.d.ts +0 -45
  34. package/build/cjs/src/media-site-media-v1-file-descriptor-files.context.js +0 -60
  35. package/build/cjs/src/media-site-media-v1-file-descriptor-files.context.js.map +0 -1
  36. package/build/cjs/src/media-site-media-v1-file-descriptor-files.http.d.ts +0 -148
  37. package/build/cjs/src/media-site-media-v1-file-descriptor-files.http.js +0 -1118
  38. package/build/cjs/src/media-site-media-v1-file-descriptor-files.http.js.map +0 -1
  39. package/build/cjs/src/media-site-media-v1-file-descriptor-files.meta.d.ts +0 -28
  40. package/build/cjs/src/media-site-media-v1-file-descriptor-files.meta.js +0 -332
  41. package/build/cjs/src/media-site-media-v1-file-descriptor-files.meta.js.map +0 -1
  42. package/build/cjs/src/media-site-media-v1-file-descriptor-files.public.js +0 -265
  43. package/build/cjs/src/media-site-media-v1-file-descriptor-files.public.js.map +0 -1
  44. package/build/cjs/src/media-site-media-v1-file-descriptor-files.types.js +0 -119
  45. package/build/cjs/src/media-site-media-v1-file-descriptor-files.types.js.map +0 -1
  46. package/build/cjs/src/media-site-media-v1-file-descriptor-files.universal.d.ts +0 -2486
  47. package/build/cjs/src/media-site-media-v1-file-descriptor-files.universal.js +0 -1451
  48. package/build/cjs/src/media-site-media-v1-file-descriptor-files.universal.js.map +0 -1
  49. package/build/es/index.d.ts +0 -1
  50. package/build/es/index.js +0 -2
  51. package/build/es/index.js.map +0 -1
  52. package/build/es/index.typings.d.ts +0 -1
  53. package/build/es/index.typings.js +0 -2
  54. package/build/es/index.typings.js.map +0 -1
  55. package/build/es/meta.d.ts +0 -1
  56. package/build/es/meta.js +0 -2
  57. package/build/es/meta.js.map +0 -1
  58. package/build/es/src/media-site-media-v1-file-descriptor-files.context.d.ts +0 -45
  59. package/build/es/src/media-site-media-v1-file-descriptor-files.context.js +0 -45
  60. package/build/es/src/media-site-media-v1-file-descriptor-files.context.js.map +0 -1
  61. package/build/es/src/media-site-media-v1-file-descriptor-files.http.d.ts +0 -148
  62. package/build/es/src/media-site-media-v1-file-descriptor-files.http.js +0 -1099
  63. package/build/es/src/media-site-media-v1-file-descriptor-files.http.js.map +0 -1
  64. package/build/es/src/media-site-media-v1-file-descriptor-files.meta.d.ts +0 -28
  65. package/build/es/src/media-site-media-v1-file-descriptor-files.meta.js +0 -290
  66. package/build/es/src/media-site-media-v1-file-descriptor-files.meta.js.map +0 -1
  67. package/build/es/src/media-site-media-v1-file-descriptor-files.public.d.ts +0 -258
  68. package/build/es/src/media-site-media-v1-file-descriptor-files.public.js +0 -234
  69. package/build/es/src/media-site-media-v1-file-descriptor-files.public.js.map +0 -1
  70. package/build/es/src/media-site-media-v1-file-descriptor-files.types.js +0 -116
  71. package/build/es/src/media-site-media-v1-file-descriptor-files.types.js.map +0 -1
  72. package/build/es/src/media-site-media-v1-file-descriptor-files.universal.d.ts +0 -2486
  73. package/build/es/src/media-site-media-v1-file-descriptor-files.universal.js +0 -1409
  74. package/build/es/src/media-site-media-v1-file-descriptor-files.universal.js.map +0 -1
  75. package/build/internal/cjs/index.typings.d.ts +0 -1
  76. package/build/internal/cjs/index.typings.js +0 -18
  77. package/build/internal/cjs/index.typings.js.map +0 -1
  78. package/build/internal/cjs/src/media-site-media-v1-file-descriptor-files.context.d.ts +0 -45
  79. package/build/internal/cjs/src/media-site-media-v1-file-descriptor-files.context.js +0 -60
  80. package/build/internal/cjs/src/media-site-media-v1-file-descriptor-files.context.js.map +0 -1
  81. package/build/internal/cjs/src/media-site-media-v1-file-descriptor-files.http.d.ts +0 -148
  82. package/build/internal/cjs/src/media-site-media-v1-file-descriptor-files.http.js +0 -1118
  83. package/build/internal/cjs/src/media-site-media-v1-file-descriptor-files.http.js.map +0 -1
  84. package/build/internal/cjs/src/media-site-media-v1-file-descriptor-files.meta.d.ts +0 -28
  85. package/build/internal/cjs/src/media-site-media-v1-file-descriptor-files.meta.js +0 -332
  86. package/build/internal/cjs/src/media-site-media-v1-file-descriptor-files.meta.js.map +0 -1
  87. package/build/internal/cjs/src/media-site-media-v1-file-descriptor-files.public.js +0 -265
  88. package/build/internal/cjs/src/media-site-media-v1-file-descriptor-files.public.js.map +0 -1
  89. package/build/internal/cjs/src/media-site-media-v1-file-descriptor-files.types.js +0 -119
  90. package/build/internal/cjs/src/media-site-media-v1-file-descriptor-files.types.js.map +0 -1
  91. package/build/internal/cjs/src/media-site-media-v1-file-descriptor-files.universal.d.ts +0 -2486
  92. package/build/internal/cjs/src/media-site-media-v1-file-descriptor-files.universal.js +0 -1451
  93. package/build/internal/cjs/src/media-site-media-v1-file-descriptor-files.universal.js.map +0 -1
  94. package/build/internal/es/index.d.ts +0 -1
  95. package/build/internal/es/index.js +0 -2
  96. package/build/internal/es/index.js.map +0 -1
  97. package/build/internal/es/index.typings.d.ts +0 -1
  98. package/build/internal/es/index.typings.js +0 -2
  99. package/build/internal/es/index.typings.js.map +0 -1
  100. package/build/internal/es/meta.d.ts +0 -1
  101. package/build/internal/es/meta.js +0 -2
  102. package/build/internal/es/meta.js.map +0 -1
  103. package/build/internal/es/src/media-site-media-v1-file-descriptor-files.context.d.ts +0 -45
  104. package/build/internal/es/src/media-site-media-v1-file-descriptor-files.context.js +0 -45
  105. package/build/internal/es/src/media-site-media-v1-file-descriptor-files.context.js.map +0 -1
  106. package/build/internal/es/src/media-site-media-v1-file-descriptor-files.http.d.ts +0 -148
  107. package/build/internal/es/src/media-site-media-v1-file-descriptor-files.http.js +0 -1099
  108. package/build/internal/es/src/media-site-media-v1-file-descriptor-files.http.js.map +0 -1
  109. package/build/internal/es/src/media-site-media-v1-file-descriptor-files.meta.d.ts +0 -28
  110. package/build/internal/es/src/media-site-media-v1-file-descriptor-files.meta.js +0 -290
  111. package/build/internal/es/src/media-site-media-v1-file-descriptor-files.meta.js.map +0 -1
  112. package/build/internal/es/src/media-site-media-v1-file-descriptor-files.public.d.ts +0 -258
  113. package/build/internal/es/src/media-site-media-v1-file-descriptor-files.public.js +0 -234
  114. package/build/internal/es/src/media-site-media-v1-file-descriptor-files.public.js.map +0 -1
  115. package/build/internal/es/src/media-site-media-v1-file-descriptor-files.types.js +0 -116
  116. package/build/internal/es/src/media-site-media-v1-file-descriptor-files.types.js.map +0 -1
  117. package/build/internal/es/src/media-site-media-v1-file-descriptor-files.universal.d.ts +0 -2486
  118. package/build/internal/es/src/media-site-media-v1-file-descriptor-files.universal.js +0 -1409
  119. package/build/internal/es/src/media-site-media-v1-file-descriptor-files.universal.js.map +0 -1
@@ -1,2486 +0,0 @@
1
- import { NonNullablePaths } from '@wix/sdk-types';
2
- export interface FileDescriptor {
3
- /**
4
- * File ID. Generated when a file is uploaded to the Media Manager.
5
- * @readonly
6
- * @maxLength 1000
7
- */
8
- _id?: string;
9
- /**
10
- * File name as it appears in the Media Manager.
11
- * @maxLength 200
12
- */
13
- displayName?: string;
14
- /**
15
- * Static URL of the file.
16
- * @readonly
17
- * @format WEB_URL
18
- */
19
- url?: string;
20
- /**
21
- * ID of the file's parent folder.
22
- * @maxLength 100
23
- */
24
- parentFolderId?: string | null;
25
- /**
26
- * File hash.
27
- * @readonly
28
- * @maxLength 100
29
- */
30
- hash?: string;
31
- /**
32
- * Size of the uploaded file in bytes.
33
- * @readonly
34
- * @format DECIMAL_VALUE
35
- * @decimalValue options { maxScale:0 }
36
- */
37
- sizeInBytes?: string | null;
38
- /**
39
- * Whether the file is public or private. Learn more about private files ([SDK](https://dev.wix.com/docs/rest/assets/media/media-manager/files/private-files) | [REST](https://dev.wix.com/docs/sdk/backend-modules/media/files/private-files)).
40
- * @readonly
41
- */
42
- private?: boolean;
43
- /**
44
- * Media file type.
45
- * @readonly
46
- */
47
- mediaType?: MediaTypeWithLiterals;
48
- /**
49
- * Media file content.
50
- * @readonly
51
- */
52
- media?: FileMedia;
53
- /**
54
- * Status of the file that was uploaded.
55
- * * `FAILED`: The file failed to upload, for example, during media post processing.
56
- * * `READY`: The file uploaded, finished all processing, and is ready for use.
57
- * * `PENDING`: The file is processing and the URLs are not yet available. This response is returned when importing a file.
58
- * @readonly
59
- */
60
- operationStatus?: OperationStatusWithLiterals;
61
- /**
62
- * URL where the file was uploaded from.
63
- * @readonly
64
- * @format WEB_URL
65
- */
66
- sourceUrl?: string | null;
67
- /**
68
- * URL of the file's thumbnail.
69
- * @readonly
70
- * @format WEB_URL
71
- */
72
- thumbnailUrl?: string | null;
73
- /**
74
- * Labels assigned to media files that describe and categorize them. Provided by the Wix user, or generated by [Google Vision API](https://cloud.google.com/vision/docs/drag-and-drop) for images.
75
- * @maxSize 100
76
- * @maxLength 200
77
- */
78
- labels?: string[];
79
- /**
80
- * Date and time the file was created.
81
- * @readonly
82
- */
83
- _createdDate?: Date | null;
84
- /**
85
- * Date and time the file was updated.
86
- * @readonly
87
- */
88
- _updatedDate?: Date | null;
89
- /**
90
- * The Wix site ID where the media file is stored.
91
- * @readonly
92
- * @maxLength 100
93
- */
94
- siteId?: string;
95
- /**
96
- * State of the file.
97
- * @readonly
98
- */
99
- state?: StateWithLiterals;
100
- }
101
- export declare enum MediaType {
102
- UNKNOWN = "UNKNOWN",
103
- IMAGE = "IMAGE",
104
- VIDEO = "VIDEO",
105
- AUDIO = "AUDIO",
106
- DOCUMENT = "DOCUMENT",
107
- VECTOR = "VECTOR",
108
- ARCHIVE = "ARCHIVE",
109
- MODEL3D = "MODEL3D",
110
- OTHER = "OTHER"
111
- }
112
- /** @enumType */
113
- export type MediaTypeWithLiterals = MediaType | 'UNKNOWN' | 'IMAGE' | 'VIDEO' | 'AUDIO' | 'DOCUMENT' | 'VECTOR' | 'ARCHIVE' | 'MODEL3D' | 'OTHER';
114
- export interface FileMedia extends FileMediaMediaOneOf {
115
- /** Information about the image. */
116
- image?: ImageMedia;
117
- /** Information about the video. */
118
- video?: string;
119
- /** Information about the audio. */
120
- audio?: AudioV2;
121
- /** Information about the document. */
122
- document?: string;
123
- /** Information about the vector. */
124
- vector?: ImageMedia;
125
- /** Information about the archive. */
126
- archive?: Archive;
127
- /** Information about the 3D Model. */
128
- model3d?: Model3D;
129
- }
130
- /** @oneof */
131
- export interface FileMediaMediaOneOf {
132
- /** Information about the image. */
133
- image?: ImageMedia;
134
- /** Information about the video. */
135
- video?: string;
136
- /** Information about the audio. */
137
- audio?: AudioV2;
138
- /** Information about the document. */
139
- document?: string;
140
- /** Information about the vector. */
141
- vector?: ImageMedia;
142
- /** Information about the archive. */
143
- archive?: Archive;
144
- /** Information about the 3D Model. */
145
- model3d?: Model3D;
146
- }
147
- export interface ImageMedia {
148
- /** Image data. */
149
- image?: string;
150
- /** Image colors. */
151
- colors?: Colors;
152
- /**
153
- * Information about faces in the image. Use to crop images without cutting out faces.
154
- * @maxSize 100
155
- */
156
- faces?: FaceRecognition[];
157
- /**
158
- * Information about the image preview.
159
- * You can use this to display a preview for private images.
160
- */
161
- previewImage?: string;
162
- /**
163
- * Optional, An AI generated description of the image
164
- * @readonly
165
- * @maxLength 300
166
- */
167
- caption?: string | null;
168
- }
169
- export interface FocalPoint {
170
- /** X-coordinate of the focal point. */
171
- x?: number;
172
- /** Y-coordinate of the focal point. */
173
- y?: number;
174
- /** crop by height */
175
- height?: number | null;
176
- /** crop by width */
177
- width?: number | null;
178
- }
179
- export interface Colors {
180
- /** Main color of the image. */
181
- prominent?: Color;
182
- /**
183
- * Color palette of the image.
184
- * @maxSize 100
185
- */
186
- palette?: Color[];
187
- }
188
- export interface Color {
189
- /**
190
- * HEX color.
191
- * @format COLOR_HEX
192
- */
193
- hex?: string | null;
194
- /** RGB color. */
195
- rgb?: ColorRGB;
196
- }
197
- export interface ColorRGB {
198
- /**
199
- * Red channel.
200
- * @max 255
201
- */
202
- r?: number | null;
203
- /**
204
- * Green channel.
205
- * @max 255
206
- */
207
- g?: number | null;
208
- /**
209
- * Blue channel.
210
- * @max 255
211
- */
212
- b?: number | null;
213
- }
214
- /**
215
- * Using this object you can crop images while centering on faces
216
- * ------------------------
217
- * | |
218
- * | x,y |
219
- * | *-------- |
220
- * | | . . | |
221
- * | | | | height |
222
- * | | \ / | |
223
- * | | | |
224
- * | --------- |
225
- * | width |
226
- * | |
227
- * |______________________|
228
- */
229
- export interface FaceRecognition {
230
- /** The accuracy percentage of the face recognition. The likelihood that a face is detected. */
231
- confidence?: number;
232
- /** Top left x pixel coordinate of the face. */
233
- x?: number;
234
- /** Top left y pixel coordinate of the face. */
235
- y?: number;
236
- /** Face pixel height. */
237
- height?: number;
238
- /** Face pixel width. */
239
- width?: number;
240
- }
241
- export interface VideoResolution {
242
- /** Video URL. */
243
- url?: string;
244
- /** Video height. */
245
- height?: number;
246
- /** Video width. */
247
- width?: number;
248
- /**
249
- * Video format
250
- * Possible values: ['144p.mp4' '144p.webm' '240p.mp4' '240p.webm' '360p.mp4' '360p.webm' '480p.mp4' '480p.webm'
251
- * '720p.mp4' '720p.webm' '1080p.mp4' '1080p.webm', 'hls' ]
252
- */
253
- format?: string;
254
- }
255
- export interface AudioV2 {
256
- /**
257
- * WixMedia ID.
258
- * @maxLength 200
259
- */
260
- _id?: string;
261
- /**
262
- * Audio formats available for this file.
263
- * @maxSize 100
264
- */
265
- assets?: string[];
266
- /**
267
- * Audio bitrate.
268
- * @readonly
269
- */
270
- bitrate?: number | null;
271
- /**
272
- * Audio format.
273
- * @readonly
274
- * @maxLength 100
275
- */
276
- format?: string | null;
277
- /**
278
- * Audio duration in seconds.
279
- * @readonly
280
- */
281
- duration?: number | null;
282
- /**
283
- * Audio size in bytes.
284
- * @readonly
285
- * @format DECIMAL_VALUE
286
- * @decimalValue options { maxScale:0 }
287
- */
288
- sizeInBytes?: string | null;
289
- }
290
- export interface Archive {
291
- /** WixMedia ID. */
292
- _id?: string;
293
- /** Archive URL. */
294
- url?: string;
295
- /**
296
- * Archive URL expiration date (when relevant).
297
- * @readonly
298
- */
299
- urlExpirationDate?: Date | null;
300
- /**
301
- * Archive size in bytes.
302
- * @format DECIMAL_VALUE
303
- */
304
- sizeInBytes?: string | null;
305
- /** Archive filename. */
306
- filename?: string | null;
307
- }
308
- export interface Model3D {
309
- /** WixMedia 3D ID. */
310
- _id?: string;
311
- /** 3D URL. */
312
- url?: string;
313
- /** 3D thumbnail Image */
314
- thumbnail?: string;
315
- /** 3D alt text. */
316
- altText?: string | null;
317
- /**
318
- * 3D URL expiration date (when relevant).
319
- * @readonly
320
- */
321
- urlExpirationDate?: Date | null;
322
- /**
323
- * 3D filename.
324
- * @readonly
325
- */
326
- filename?: string | null;
327
- /**
328
- * 3D size in bytes.
329
- * @readonly
330
- * @format DECIMAL_VALUE
331
- */
332
- sizeInBytes?: string | null;
333
- }
334
- export interface OtherMedia {
335
- /**
336
- * WixMedia ID. for use with Site Media APIs only
337
- * @maxLength 200
338
- */
339
- _id?: string;
340
- /**
341
- * The media type of the file: 'package', 'raw'
342
- * @readonly
343
- * @maxLength 100
344
- */
345
- internalMediaType?: string | null;
346
- /**
347
- * size in bytes. Optional.
348
- * @readonly
349
- * @format DECIMAL_VALUE
350
- * @decimalValue options { gte:0, maxScale:0 }
351
- */
352
- sizeInBytes?: string | null;
353
- /**
354
- * The file URL.
355
- * @format WEB_URL
356
- */
357
- url?: string;
358
- }
359
- export interface FontMedia {
360
- /**
361
- * WixMedia ID. for use with Site Media APIs only
362
- * @maxLength 200
363
- */
364
- _id?: string | null;
365
- /**
366
- * size in bytes. Optional.
367
- * @readonly
368
- * @format DECIMAL_VALUE
369
- * @decimalValue options { gte:0, maxScale:0 }
370
- */
371
- sizeInBytes?: string | null;
372
- /**
373
- * The format of the font asset. ttf, woff, woff2
374
- * @maxLength 200
375
- */
376
- format?: string | null;
377
- /**
378
- * The font family name.
379
- * @maxLength 100
380
- */
381
- family?: string | null;
382
- /**
383
- * The font name
384
- * @maxLength 100
385
- */
386
- fontName?: string | null;
387
- /**
388
- * Font formats available for this file.
389
- * @maxSize 5
390
- */
391
- assets?: FontAsset[];
392
- }
393
- export interface FontAsset {
394
- /**
395
- * Keys for downloading different assets of a file.
396
- * Default: `src`, key representing the original file's format and quality.
397
- * @maxLength 100
398
- */
399
- assetKey?: string | null;
400
- /**
401
- * The URL of the font asset.
402
- * @maxLength 200
403
- */
404
- url?: string | null;
405
- /**
406
- * The format of the font asset. ttf, woff, woff2
407
- * @maxLength 200
408
- */
409
- format?: string | null;
410
- }
411
- export declare enum OperationStatus {
412
- /** File upload or processing failed */
413
- FAILED = "FAILED",
414
- /** File is ready for consumption */
415
- READY = "READY",
416
- /** File is waiting for processing or currently being processed */
417
- PENDING = "PENDING"
418
- }
419
- /** @enumType */
420
- export type OperationStatusWithLiterals = OperationStatus | 'FAILED' | 'READY' | 'PENDING';
421
- export declare enum State {
422
- /** File is ready for consumption */
423
- OK = "OK",
424
- /** Deleted file */
425
- DELETED = "DELETED"
426
- }
427
- /** @enumType */
428
- export type StateWithLiterals = State | 'OK' | 'DELETED';
429
- export declare enum Namespace {
430
- NO_NAMESPACE = "NO_NAMESPACE",
431
- OTHERS = "OTHERS",
432
- /** ANY = 2; */
433
- WIX_VIDEO = "WIX_VIDEO",
434
- /** _nsWixMusic */
435
- WIX_MUSIC = "WIX_MUSIC",
436
- /** _nsArtStore */
437
- ALBUMS_AND_ART_STORE = "ALBUMS_AND_ART_STORE",
438
- /** _nsDigitalProduct */
439
- WIX_ECOM = "WIX_ECOM",
440
- /** _nsPhotoShareApp */
441
- PHOTO_SHARE_APP = "PHOTO_SHARE_APP",
442
- /** _nsSharingApp, */
443
- SHARING_APP = "SHARING_APP",
444
- /** engage */
445
- CHAT = "CHAT",
446
- /** logobuilder */
447
- LOGO_BUILDER = "LOGO_BUILDER",
448
- /** WixExposure */
449
- ALBUMS_OLD = "ALBUMS_OLD",
450
- /** chat-mobile-uploads */
451
- CHAT_MOBILE = "CHAT_MOBILE",
452
- /** _nsWixForms */
453
- WIX_FORMS = "WIX_FORMS",
454
- /** _nsWixLegends */
455
- WIX_LEGENDS = "WIX_LEGENDS"
456
- }
457
- /** @enumType */
458
- export type NamespaceWithLiterals = Namespace | 'NO_NAMESPACE' | 'OTHERS' | 'WIX_VIDEO' | 'WIX_MUSIC' | 'ALBUMS_AND_ART_STORE' | 'WIX_ECOM' | 'PHOTO_SHARE_APP' | 'SHARING_APP' | 'CHAT' | 'LOGO_BUILDER' | 'ALBUMS_OLD' | 'CHAT_MOBILE' | 'WIX_FORMS' | 'WIX_LEGENDS';
459
- export interface IdentityInfo {
460
- /** The type of the user that uploaded the file */
461
- identityType?: IdentityTypeWithLiterals;
462
- /**
463
- * User Id. empty when UNKNOWN
464
- * @format GUID
465
- */
466
- identityId?: string | null;
467
- }
468
- export declare enum IdentityType {
469
- UNKNOWN = "UNKNOWN",
470
- ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
471
- MEMBER = "MEMBER",
472
- WIX_USER = "WIX_USER",
473
- APP = "APP"
474
- }
475
- /** @enumType */
476
- export type IdentityTypeWithLiterals = IdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
477
- export interface FileReady {
478
- /** File entity that is ready with full information. */
479
- file?: FileDescriptor;
480
- /** External information specified in the file import or upload. */
481
- externalInfo?: ExternalInfo;
482
- /** File was restored from the trash-bin. */
483
- triggeredByUndelete?: boolean;
484
- }
485
- export interface ExternalInfo {
486
- /**
487
- * External information to specify in the File Ready or File Failed events.
488
- * @maxLength 1000
489
- */
490
- origin?: string;
491
- /**
492
- * External IDs to specify in the File Ready or File Failed events.
493
- * @maxSize 30
494
- * @maxLength 4000
495
- */
496
- externalIds?: string[];
497
- }
498
- export interface FileFailed {
499
- /** External information specified in the file import or upload. */
500
- externalInfo?: ExternalInfo;
501
- /** Error information. */
502
- error?: ApplicationError;
503
- }
504
- export interface ApplicationError {
505
- /** Error code. */
506
- code?: string;
507
- /** Description of the error. */
508
- description?: string;
509
- /** Data related to the error. */
510
- data?: Record<string, any> | null;
511
- }
512
- export interface DraftFilePublished {
513
- /** The file after it was published */
514
- file?: FileDescriptor;
515
- /** The namespace the file was published to */
516
- namespace?: NamespaceWithLiterals;
517
- }
518
- export interface BulkAnnotateImagesRequest {
519
- /**
520
- * The file ids to run detection on
521
- * @minSize 1
522
- * @maxSize 10
523
- * @maxLength 1000
524
- */
525
- fileIds?: string[];
526
- /**
527
- * A list of detections types to fill for the image
528
- * @minSize 1
529
- * @maxSize 10
530
- */
531
- annotationTypes?: ImageAnnotationTypeWithLiterals[];
532
- /** When true the endpoint will detect listed information even if the image has this information */
533
- overwrite?: boolean | null;
534
- /** Should the response return the item following the operation */
535
- returnEntity?: boolean;
536
- }
537
- export declare enum ImageAnnotationType {
538
- UNKNOWN_IMAGE_ANNOTATION_TYPE = "UNKNOWN_IMAGE_ANNOTATION_TYPE",
539
- CONTAINS_TEXT = "CONTAINS_TEXT",
540
- IS_ANIMATED = "IS_ANIMATED",
541
- FACES = "FACES",
542
- LABELS = "LABELS",
543
- COLORS = "COLORS",
544
- CAPTION = "CAPTION"
545
- }
546
- /** @enumType */
547
- export type ImageAnnotationTypeWithLiterals = ImageAnnotationType | 'UNKNOWN_IMAGE_ANNOTATION_TYPE' | 'CONTAINS_TEXT' | 'IS_ANIMATED' | 'FACES' | 'LABELS' | 'COLORS' | 'CAPTION';
548
- export interface BulkAnnotateImagesResponse {
549
- /** Results of individual items */
550
- results?: BulkAnnotateImageResult[];
551
- /** Metadata of the operation */
552
- bulkActionMetadata?: BulkActionMetadata;
553
- }
554
- export interface BulkAnnotateImageResult {
555
- /** Item metadata */
556
- itemMetadata?: ItemMetadata;
557
- /**
558
- * The item following the operation
559
- * Only returned if operation was successful and if returnEntity flag was on
560
- */
561
- item?: FileDescriptor;
562
- }
563
- export interface ItemMetadata {
564
- /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
565
- _id?: string | null;
566
- /** Index of the item within the request array. Allows for correlation between request and response items. */
567
- originalIndex?: number;
568
- /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
569
- success?: boolean;
570
- /** Details about the error in case of failure. */
571
- error?: ApplicationError;
572
- }
573
- export interface BulkActionMetadata {
574
- /** Number of items that were successfully processed. */
575
- totalSuccesses?: number;
576
- /** Number of items that couldn't be processed. */
577
- totalFailures?: number;
578
- /** Number of failures without details because detailed failure threshold was exceeded. */
579
- undetailedFailures?: number;
580
- }
581
- export interface GenerateFilesDownloadUrlRequest {
582
- /**
583
- * IDs of the files to download.
584
- *
585
- * You can also specify the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`.
586
- * Learn more about the file ID parameter ([SDK](https://dev.wix.com/docs/sdk/backend-modules/media/file-and-folder-ids#file-id-as-a-parameter) | [REST](https://dev.wix.com/docs/rest/assets/media/media-manager/files/file-id#file-id-as-a-parameter)).
587
- * @minSize 1
588
- * @maxSize 1000
589
- * @maxLength 1000
590
- */
591
- fileIds: string[];
592
- }
593
- export interface GenerateFilesDownloadUrlResponse {
594
- /**
595
- * URL for downloading the compressed file containing the specified files in the Media Manager.
596
- * @format WEB_URL
597
- */
598
- downloadUrl?: string;
599
- }
600
- export interface GenerateFileDownloadUrlRequest {
601
- /**
602
- * File ID.
603
- *
604
- * You can also specify the file's Wix media URL. For example, `wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032`.
605
- * Learn more about the file ID parameter ([SDK](https://dev.wix.com/docs/sdk/backend-modules/media/file-and-folder-ids#file-id-as-a-parameter) | [REST](https://dev.wix.com/docs/rest/assets/media/media-manager/files/file-id#file-id-as-a-parameter)).
606
- * @maxLength 1000
607
- */
608
- fileId: string;
609
- /**
610
- * Temporary file name used to identify the file type. For example, a file named "myFile.jpeg" identifies as an "image/jpeg" file type. <br />
611
- *
612
- * **Note:** The name that appears in the Media Manager is taken from the `filename` parameter in the Generate File Upload Url call.
613
- * @maxLength 100
614
- */
615
- downloadFileName?: string | null;
616
- /**
617
- * The time that it takes in minutes for the download URL to expire. <br />
618
- * Default: `600`. <br />
619
- * Limit: `525600` (1 year).
620
- * @min 1
621
- */
622
- expirationInMinutes?: number | null;
623
- /**
624
- * The redirect URL for when the temporary download URL with a token expires. <br />
625
- * Default: A 403 Forbidden response page.
626
- * @format WEB_URL
627
- */
628
- expirationRedirectUrl?: string | null;
629
- /**
630
- * Keys for downloading different assets (format and quality) of a file.
631
- * Default: `src`, key representing the original file's format and quality.
632
- * @maxSize 100
633
- * @maxLength 100
634
- */
635
- assetKeys?: string[] | null;
636
- /**
637
- * Whether the link downloads the file or opens the file in the browser.
638
- *
639
- * - `ATTACHMENT`: The link downloads the file.
640
- * - `INLINE`: The link opens the file in the browser.
641
- *
642
- * Default: `ATTACHMENT`
643
- */
644
- contentDisposition?: ContentDispositionWithLiterals;
645
- }
646
- export declare enum ContentDisposition {
647
- /** Using the link in the browser will download the file */
648
- ATTACHMENT = "ATTACHMENT",
649
- /** Using the link in the browser will open the file in the browser */
650
- INLINE = "INLINE"
651
- }
652
- /** @enumType */
653
- export type ContentDispositionWithLiterals = ContentDisposition | 'ATTACHMENT' | 'INLINE';
654
- export interface GenerateFileDownloadUrlResponse {
655
- /**
656
- * URL for downloading a specific file in the Media Manager.
657
- * @maxSize 100
658
- */
659
- downloadUrls?: DownloadUrl[];
660
- }
661
- export interface DownloadUrl {
662
- /**
663
- * The file download URL.
664
- * @format WEB_URL
665
- */
666
- url?: string;
667
- /**
668
- * Key for downloading a different asset (format and quality) of a file.
669
- * Default: `src`, key representing the original file's format and quality.
670
- * @maxLength 100
671
- */
672
- assetKey?: string;
673
- }
674
- export interface ServiceError {
675
- /**
676
- * Error codes are groups of related errors
677
- * The error code can be used to provide additional details to wix support while debugging service errors
678
- * @maxLength 200
679
- */
680
- internalCode?: string | null;
681
- /** Debugging information, http status code returned from wix media internal API */
682
- internalHttpStatusCode?: number | null;
683
- /**
684
- * Optional Debugging information, error key will represent the error "family" returned from wix media internal API
685
- * @maxLength 200
686
- */
687
- internalKey?: string | null;
688
- }
689
- export interface GetFileDescriptorRequest {
690
- /**
691
- * File ID.
692
- *
693
- * You can also specify the file's Wix media URL. For example, `wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032`.
694
- * Learn more about the file ID parameter ([SDK](https://dev.wix.com/docs/sdk/backend-modules/media/file-and-folder-ids#file-id-as-a-parameter) | [REST](https://dev.wix.com/docs/rest/assets/media/media-manager/files/file-id#file-id-as-a-parameter)).
695
- *
696
- * If you are working in REST, note that you must encode the Wix media URL to specify it as a query param because it contains special characters. For example, `wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032` becomes `wix%3Aimage%3A%2F%2Fv1%2F0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg%2Fleon.jpg%23originWidth%3D3024%26originHeight%3D4032`.
697
- * @maxLength 1000
698
- */
699
- fileId: string;
700
- }
701
- export interface GetFileDescriptorResponse {
702
- /** Information about the file. */
703
- file?: FileDescriptor;
704
- }
705
- export interface GetFileDescriptorsRequest {
706
- /**
707
- * File IDs.
708
- *
709
- * You can also specify the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`.
710
- * Learn more about the file ID parameter ([SDK](https://dev.wix.com/docs/sdk/backend-modules/media/file-and-folder-ids#file-id-as-a-parameter) | [REST](https://dev.wix.com/docs/rest/assets/media/media-manager/files/file-id#file-id-as-a-parameter)).
711
- * @minSize 1
712
- * @maxSize 100
713
- * @maxLength 1000
714
- */
715
- fileIds: string[];
716
- }
717
- export interface GetFileDescriptorsResponse {
718
- /**
719
- * Information about the requested files.
720
- * @maxSize 100
721
- */
722
- files?: FileDescriptor[];
723
- }
724
- export interface UpdateFileDescriptorRequest {
725
- /** The file to update. */
726
- file: FileDescriptor;
727
- }
728
- export interface UpdateFileDescriptorResponse {
729
- /** Information about the updated file. */
730
- file?: FileDescriptor;
731
- }
732
- export interface UnsupportedRequestValueError {
733
- /**
734
- * Optional A list of allowed values
735
- * @maxSize 100
736
- * @maxLength 200
737
- */
738
- allowedValues?: string[];
739
- /**
740
- * The unsupported value send in the request
741
- * @maxLength 200
742
- */
743
- requestValue?: string;
744
- }
745
- export interface GenerateFileUploadUrlRequest {
746
- /**
747
- * File mime type.
748
- * @maxLength 100
749
- */
750
- mimeType: string | null;
751
- /**
752
- * Temporary file name used to identify the file type. For example, a file named "myFile.jpeg" identifies as an "image/jpeg" file type.
753
- * <br /> **Note:** The name that appears in the Media Manager is taken from the `filename` parameter in the Generate File Upload Url call.
754
- * @maxLength 200
755
- */
756
- fileName?: string | null;
757
- /**
758
- * File size in bytes.
759
- * @readonly
760
- * @format DECIMAL_VALUE
761
- * @decimalValue options { gte:0, maxScale:0 }
762
- */
763
- sizeInBytes?: string | null;
764
- /**
765
- * ID of the file's parent folder. <br />
766
- * This folder is the path root for the `filePath`.<br />
767
- * Default: `media-root`.
768
- * @maxLength 100
769
- */
770
- parentFolderId?: string | null;
771
- /** Whether the file will be public or private. Learn more about private files ([SDK](https://dev.wix.com/docs/rest/assets/media/media-manager/files/private-files) | [REST](https://dev.wix.com/docs/sdk/backend-modules/media/files/private-files)). */
772
- private?: boolean | null;
773
- /**
774
- * Labels assigned to media files that describe and categorize them. Provided by the Wix user, or generated by [Google Vision API](https://cloud.google.com/vision/docs/drag-and-drop) for images.
775
- * @maxSize 50
776
- * @maxLength 200
777
- */
778
- labels?: string[] | null;
779
- /** A place to map an external entity to an uploaded file in the Wix Media Manager. */
780
- externalInfo?: ExternalInfo;
781
- /**
782
- * Path to the folder where the file will be stored.
783
- * For example, `/videos/2024/december`. <br/>
784
- * If `parentFolderId` is defined, the parent folder is used as the path root. Otherwise, the root is `media-root`.
785
- * The folders in the path will be created if they don't already exist. <br />
786
- * @maxLength 100
787
- */
788
- filePath?: string | null;
789
- }
790
- export interface ImageAnnotationConfigurations {
791
- /** Whether to skip detection for the image */
792
- skipDetection?: boolean | null;
793
- /**
794
- * A list of detections types to fill for the image
795
- * If specified at least one valid annotation type should be provided
796
- * Default will be all detections
797
- * @maxSize 10
798
- */
799
- annotationTypes?: ImageAnnotationTypeWithLiterals[];
800
- }
801
- export interface GenerateFileUploadUrlResponse {
802
- /**
803
- * The URL for uploading a file to the Media Manager.
804
- * @format WEB_URL
805
- */
806
- uploadUrl?: string;
807
- }
808
- export interface SiteQuotaExceededError {
809
- /**
810
- * Error codes are groups of related errors
811
- * The error code can be used to provide additional details to wix support while debugging service errors
812
- * @maxLength 200
813
- */
814
- internalCode?: string | null;
815
- /** Debugging information, http status code returned from wix media internal API */
816
- internalHttpStatusCode?: number | null;
817
- /**
818
- * Optional Debugging information, error key will represent the error "family" returned from wix media internal API
819
- * @maxLength 200
820
- */
821
- internalKey?: string | null;
822
- /** The quota details */
823
- quota?: TotalQuota;
824
- }
825
- export interface TotalQuota {
826
- /** Storage quota in bytes */
827
- storage?: string | null;
828
- /** Plans that are related to the quota */
829
- plans?: Plans;
830
- /** Time for which the quota is relevant - When the plans were retrieved from premium */
831
- timestamp?: Date | null;
832
- }
833
- export interface Plans {
834
- /** Premium Plan */
835
- premium?: Plan;
836
- /**
837
- * Upgrade URL - the URL which a site owner can use to upgrade their quota. May be empty if an upgrade is not available.
838
- * @format WEB_URL
839
- */
840
- upgradeUrl?: string;
841
- }
842
- export interface Plan {
843
- /**
844
- * Plan ID - Premium product ID
845
- * @readonly
846
- * @format GUID
847
- */
848
- _id?: string;
849
- /** Plan name */
850
- name?: string;
851
- /** When the plan was created */
852
- createdAt?: Date | null;
853
- /** When then plan expires */
854
- expiresAt?: Date | null;
855
- }
856
- export interface GenerateFileResumableUploadUrlRequest {
857
- /**
858
- * File mime type.
859
- * @maxLength 100
860
- */
861
- mimeType: string | null;
862
- /**
863
- * Temporary file name used to identify the file type. For example, a file named "myFile.jpeg" identifies as an "image/jpeg" file type.
864
- * <br /> **Note:** The name that appears in the Media Manager is taken from the `filename` parameter in the Generate File Upload Url call.
865
- * @maxLength 200
866
- */
867
- fileName?: string | null;
868
- /**
869
- * File size in bytes.
870
- * @readonly
871
- * @format DECIMAL_VALUE
872
- * @decimalValue options { gte:0, maxScale:0 }
873
- */
874
- sizeInBytes?: string | null;
875
- /**
876
- * ID of the file's parent folder. <br />
877
- * This folder is the path root for the `filePath`.<br />
878
- * Default: `media-root`.
879
- * @maxLength 100
880
- */
881
- parentFolderId?: string | null;
882
- /** Whether the file will be public or private. Learn more about private files ([SDK](https://dev.wix.com/docs/rest/assets/media/media-manager/files/private-files) | [REST](https://dev.wix.com/docs/sdk/backend-modules/media/files/private-files)). */
883
- private?: boolean | null;
884
- /**
885
- * Labels assigned to media files that describe and categorize them. Provided by the Wix user, or generated by [Google Vision API](https://cloud.google.com/vision/docs/drag-and-drop) for images.
886
- * @maxSize 500
887
- * @maxLength 200
888
- */
889
- labels?: string[] | null;
890
- /** The upload protocol to use for implementing the resumable upload. */
891
- uploadProtocol?: UploadProtocolWithLiterals;
892
- /**
893
- * Path to the folder where the file will be stored.
894
- * For example, `/videos/2024/december`. <br/>
895
- * If `parentFolderId` is defined, the parent folder is used as the path root. Otherwise, the root is `media-root`.
896
- * The folders in the path will be created if they don't already exist. <br />
897
- * @maxLength 100
898
- */
899
- filePath?: string | null;
900
- }
901
- export declare enum UploadProtocol {
902
- /** The upload protocol to use for implementing the resumable upload. */
903
- TUS = "TUS"
904
- }
905
- /** @enumType */
906
- export type UploadProtocolWithLiterals = UploadProtocol | 'TUS';
907
- export interface GenerateFileResumableUploadUrlResponse {
908
- /** The upload protocol to use for implementing the resumable upload. */
909
- uploadProtocol?: UploadProtocolWithLiterals;
910
- /**
911
- * The URL for uploading a file to the Media Manager.
912
- * @format WEB_URL
913
- */
914
- uploadUrl?: string;
915
- /**
916
- * Single-use upload token.
917
- * @maxLength 2000
918
- */
919
- uploadToken?: string;
920
- }
921
- export interface ImportFileRequest {
922
- /**
923
- * Publicly accessible external file URL.
924
- * @format WEB_URL
925
- */
926
- url: string;
927
- /**
928
- * Media type of the file to import.
929
- * excluding: OTHER media type
930
- */
931
- mediaType?: MediaTypeWithLiterals;
932
- /**
933
- * File name that appears in the Media Manager.
934
- * @maxLength 200
935
- */
936
- displayName?: string | null;
937
- /**
938
- * ID of the file's parent folder. <br />
939
- * This folder is the path root for the `filePath`. <br />
940
- * Default: `media-root`.
941
- * @maxLength 100
942
- */
943
- parentFolderId?: string | null;
944
- /** Whether the file will be public or private. Learn more about private files ([SDK](https://dev.wix.com/docs/rest/assets/media/media-manager/files/private-files) | [REST](https://dev.wix.com/docs/sdk/backend-modules/media/files/private-files)). */
945
- private?: boolean | null;
946
- /**
947
- * Labels assigned to media files that describe and categorize them. Provided by the Wix user, or generated by [Google Vision API](https://cloud.google.com/vision/docs/drag-and-drop) for images.
948
- * @maxSize 500
949
- * @maxLength 200
950
- */
951
- labels?: string[] | null;
952
- /**
953
- * File mime type.
954
- * @maxLength 100
955
- */
956
- mimeType?: string;
957
- /** Information sent to the File Ready and File Failed events. See Importing Files ([SDK](https://dev.wix.com/docs/sdk/backend-modules/media/files/importing-files#backend-modules_media_files_using-externalinfo) | [REST](https://dev.wix.com/docs/rest/assets/media/media-manager/files/importing-files#using-externalinfo)) to learn more. */
958
- externalInfo?: ExternalInfo;
959
- /** Optional parameters that should be sent with the external URL. */
960
- urlParams?: Record<string, any> | null;
961
- /** Optional headers that should be sent with the external URL. */
962
- urlHeaders?: Record<string, any> | null;
963
- /**
964
- * Path to the folder where the file will be stored.
965
- * For example, `/videos/2024/december`. <br/>
966
- * If `parentFolderId` is defined, the parent folder is used as the path root. Otherwise, the root is `media-root`.
967
- * The folders in the path will be created if they don't already exist. <br />
968
- * @maxLength 100
969
- */
970
- filePath?: string | null;
971
- }
972
- export interface ImportFileResponse {
973
- /** Information about the imported file. */
974
- file?: FileDescriptor;
975
- }
976
- export interface BulkImportFilesRequest {
977
- /**
978
- * Information about the files to import.
979
- * @minSize 1
980
- * @maxSize 100
981
- */
982
- importFileRequests: ImportFileRequest[];
983
- }
984
- export interface BulkImportFilesResponse {
985
- /**
986
- * Information about the imported files.
987
- * @maxSize 100
988
- */
989
- files?: FileDescriptor[];
990
- }
991
- export interface BulkImportFileRequest {
992
- /**
993
- * Information about the files to import.
994
- * @minSize 1
995
- * @maxSize 100
996
- */
997
- importFileRequests: ImportFileRequest[];
998
- /** Default: `true` */
999
- returnEntity?: boolean | null;
1000
- }
1001
- export interface BulkImportFileResponse {
1002
- /** Items created by bulk action. */
1003
- results?: BulkImportFileResult[];
1004
- /** Bulk action metadata. */
1005
- bulkActionMetadata?: BulkActionMetadata;
1006
- }
1007
- export interface BulkImportFileResult {
1008
- /** Item metadata. */
1009
- itemMetadata?: ItemMetadata;
1010
- /** Imported file. This field is included in the response if the operation was successful and `returnEntity` is not set to `false`. */
1011
- item?: FileDescriptor;
1012
- }
1013
- export interface ListFilesRequest {
1014
- /**
1015
- * ID of the file's parent folder. <br />
1016
- * Default:`media-root`.
1017
- * @maxLength 100
1018
- */
1019
- parentFolderId?: string | null;
1020
- /**
1021
- * File media type.
1022
- * @maxSize 30
1023
- */
1024
- mediaTypes?: MediaTypeWithLiterals[];
1025
- /** \n`true`: Returns only private files. \n`false`: Returns only public files. \n`undefined`: Returns public and private files. \n Learn more about private files ([SDK](https://dev.wix.com/docs/rest/assets/media/media-manager/files/private-files) | [REST](https://dev.wix.com/docs/sdk/backend-modules/media/files/private-files)). */
1026
- private?: boolean | null;
1027
- /**
1028
- * Field name and order to sort by. One of: <br />
1029
- * * `displayName`
1030
- * * `updatedDate`
1031
- * * `sizeInBytes`
1032
- * Default: `updatedDate` in `desc` order.
1033
- */
1034
- sort?: Sorting;
1035
- /** Cursor and paging information. */
1036
- paging?: CursorPaging;
1037
- }
1038
- export interface Sorting {
1039
- /**
1040
- * Name of the field to sort by.
1041
- * @maxLength 512
1042
- */
1043
- fieldName?: string;
1044
- /** Sort order. */
1045
- order?: SortOrderWithLiterals;
1046
- }
1047
- export declare enum SortOrder {
1048
- ASC = "ASC",
1049
- DESC = "DESC"
1050
- }
1051
- /** @enumType */
1052
- export type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
1053
- export interface CursorPaging {
1054
- /**
1055
- * Maximum number of items to return in the results.
1056
- * @max 100
1057
- */
1058
- limit?: number | null;
1059
- /**
1060
- * Pointer to the next or previous page in the list of results.
1061
- *
1062
- * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
1063
- * Not relevant for the first request.
1064
- * @maxLength 16000
1065
- */
1066
- cursor?: string | null;
1067
- }
1068
- export interface ListFilesResponse {
1069
- /**
1070
- * List of files in the Media Manager.
1071
- * @maxSize 200
1072
- */
1073
- files?: FileDescriptor[];
1074
- /** The next cursor if it exists. */
1075
- nextCursor?: PagingMetadataV2;
1076
- }
1077
- export interface PagingMetadataV2 {
1078
- /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
1079
- total?: number | null;
1080
- /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
1081
- cursors?: Cursors;
1082
- }
1083
- export interface Cursors {
1084
- /**
1085
- * Cursor string pointing to the next page in the list of results.
1086
- * @maxLength 16000
1087
- */
1088
- next?: string | null;
1089
- }
1090
- export interface SearchFilesRequest {
1091
- /**
1092
- * Term to search for. Possible terms include the value of a file's
1093
- * `displayName`, `mimeType`, and `label`. <br />
1094
- * For example, if a file's label is cat, the search term is 'cat'.
1095
- * @maxLength 200
1096
- */
1097
- search?: string | null;
1098
- /**
1099
- * A root folder in the media manager to search in. <br />
1100
- * Default: `MEDIA_ROOT`.
1101
- */
1102
- rootFolder?: RootFolderWithLiterals;
1103
- /**
1104
- * File media type.
1105
- * @maxSize 30
1106
- */
1107
- mediaTypes?: MediaTypeWithLiterals[];
1108
- /** \n`true`: Returns only private files. \n`false`: Returns only public files. \n`undefined`: Returns public and private files. \n Learn more about private files ([SDK](https://dev.wix.com/docs/rest/assets/media/media-manager/files/private-files) | [REST](https://dev.wix.com/docs/sdk/backend-modules/media/files/private-files)). */
1109
- private?: boolean | null;
1110
- /**
1111
- * Field name and order to sort by. One of: <br />
1112
- * * `displayName`
1113
- * * `updatedDate`
1114
- * * `sizeInBytes`
1115
- * Default: `updatedDate` in `desc` order.
1116
- */
1117
- sort?: Sorting;
1118
- /** Cursor and paging information. */
1119
- paging?: CursorPaging;
1120
- }
1121
- export declare enum RootFolder {
1122
- /** Root of all site media */
1123
- MEDIA_ROOT = "MEDIA_ROOT",
1124
- /** Root of the trash system folder */
1125
- TRASH_ROOT = "TRASH_ROOT",
1126
- /** Root of all visitor uploads */
1127
- VISITOR_UPLOADS_ROOT = "VISITOR_UPLOADS_ROOT"
1128
- }
1129
- /** @enumType */
1130
- export type RootFolderWithLiterals = RootFolder | 'MEDIA_ROOT' | 'TRASH_ROOT' | 'VISITOR_UPLOADS_ROOT';
1131
- export interface SearchFilesResponse {
1132
- /**
1133
- * Files matching the query.
1134
- * @maxSize 200
1135
- */
1136
- files?: FileDescriptor[];
1137
- /** The next cursor if it exists. */
1138
- nextCursor?: PagingMetadataV2;
1139
- }
1140
- export interface GenerateVideoStreamingUrlRequest {
1141
- /**
1142
- * File ID.
1143
- *
1144
- * You can also specify the file's Wix media URL. For example, `wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032`.
1145
- * Learn more about the file ID parameter ([SDK](https://dev.wix.com/docs/sdk/backend-modules/media/file-and-folder-ids#file-id-as-a-parameter) | [REST](https://dev.wix.com/docs/rest/assets/media/media-manager/files/file-id#file-id-as-a-parameter)).
1146
- * @maxLength 1000
1147
- */
1148
- fileId: string;
1149
- /** Video stream format. */
1150
- format?: StreamFormatWithLiterals;
1151
- }
1152
- export declare enum StreamFormat {
1153
- UNKNOWN = "UNKNOWN",
1154
- HLS = "HLS",
1155
- DASH = "DASH"
1156
- }
1157
- /** @enumType */
1158
- export type StreamFormatWithLiterals = StreamFormat | 'UNKNOWN' | 'HLS' | 'DASH';
1159
- export interface GenerateVideoStreamingUrlResponse {
1160
- /** URL for streaming a specific file in the Media Manager. */
1161
- downloadUrl?: DownloadUrl;
1162
- }
1163
- export interface GenerateWebSocketTokenRequest {
1164
- }
1165
- export interface GenerateWebSocketTokenResponse {
1166
- /**
1167
- * The web socket token for the identity in the request
1168
- * @maxLength 2000
1169
- */
1170
- token?: string;
1171
- }
1172
- export interface BulkDeleteFilesRequest {
1173
- /**
1174
- * IDs of the files to move to the Media Manager's trash bin.
1175
- *
1176
- * You can also specify the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`.
1177
- * Learn more about the file ID parameter ([SDK](https://dev.wix.com/docs/sdk/backend-modules/media/file-and-folder-ids#file-id-as-a-parameter) | [REST](https://dev.wix.com/docs/rest/assets/media/media-manager/files/file-id#file-id-as-a-parameter)).
1178
- * @maxSize 1000
1179
- * @maxLength 1000
1180
- */
1181
- fileIds: string[];
1182
- /**
1183
- * Whether the specified files are permanently deleted. <br />
1184
- * Default: `false`
1185
- */
1186
- permanent?: boolean;
1187
- }
1188
- export interface BulkDeleteFilesResponse {
1189
- }
1190
- export interface BulkRestoreFilesFromTrashBinRequest {
1191
- /**
1192
- * IDs of the files to restore from the Media Manager's trash bin.
1193
- *
1194
- * You can also specify the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`.
1195
- * Learn more about the file ID parameter ([SDK](https://dev.wix.com/docs/sdk/backend-modules/media/file-and-folder-ids#file-id-as-a-parameter) | [REST](https://dev.wix.com/docs/rest/assets/media/media-manager/files/file-id#file-id-as-a-parameter)).
1196
- * @maxSize 1000
1197
- * @maxLength 1000
1198
- */
1199
- fileIds: string[];
1200
- }
1201
- export interface BulkRestoreFilesFromTrashBinResponse {
1202
- }
1203
- export interface ListDeletedFilesRequest {
1204
- /**
1205
- * ID of the file's parent folder. <br />
1206
- * Default: `media-root`.
1207
- * @maxLength 100
1208
- */
1209
- parentFolderId?: string | null;
1210
- /**
1211
- * File media type.
1212
- * @maxSize 30
1213
- */
1214
- mediaTypes?: MediaTypeWithLiterals[];
1215
- /** \n`true`: Returns only private files. \n`false`: Returns only public files. \n`undefined`: Returns public and private files. \n Learn more about private files ([SDK](https://dev.wix.com/docs/rest/assets/media/media-manager/files/private-files) | [REST](https://dev.wix.com/docs/sdk/backend-modules/media/files/private-files)). */
1216
- private?: boolean | null;
1217
- /**
1218
- * Field name and order to sort by. One of: <br />
1219
- * * `displayName`
1220
- * * `updatedDate`
1221
- * * `sizeInBytes`
1222
- * Default: `updatedDate` in `desc` order.
1223
- */
1224
- sort?: Sorting;
1225
- /** Cursor and paging information. */
1226
- paging?: CursorPaging;
1227
- }
1228
- export interface ListDeletedFilesResponse {
1229
- /**
1230
- * List of files in the Media Manager's trash bin.
1231
- * @maxSize 200
1232
- */
1233
- files?: FileDescriptor[];
1234
- /** The next cursor if it exists. */
1235
- nextCursor?: PagingMetadataV2;
1236
- }
1237
- export interface BulkPublishDraftFilesRequest {
1238
- /**
1239
- * IDs of the draft files to be published.
1240
- *
1241
- * You can also specify the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`.
1242
- * Learn more about the file ID parameter ([SDK](https://dev.wix.com/docs/sdk/backend-modules/media/file-and-folder-ids#file-id-as-a-parameter) | [REST](https://dev.wix.com/docs/rest/assets/media/media-manager/files/file-id#file-id-as-a-parameter)).
1243
- * @maxSize 100
1244
- * @maxLength 1000
1245
- */
1246
- fileIds?: string[];
1247
- /**
1248
- * The namespace the files will be published to
1249
- * Note, private files must have a namespace
1250
- */
1251
- namespace?: NamespaceWithLiterals;
1252
- /**
1253
- * ID of the file's parent folder. <br />
1254
- * This folder is the path root for the `filePath`. <br />
1255
- * Default: `media-root`.
1256
- * @maxLength 100
1257
- */
1258
- parentFolderId?: string | null;
1259
- /**
1260
- * Path to the folder where the file will be stored.
1261
- * For example, `/videos/2024/december`. <br/>
1262
- * If `parentFolderId` is defined, the parent folder is used as the path root. Otherwise, the root is `media-root`.
1263
- * The folders in the path will be created if they don't already exist. <br />
1264
- * @maxLength 100
1265
- */
1266
- filePath?: string | null;
1267
- /** Should the response return the item following the operation */
1268
- returnEntity?: boolean;
1269
- }
1270
- export interface BulkPublishDraftFilesResponse {
1271
- /** Results of individual items */
1272
- results?: BulkPublishDraftFileResult[];
1273
- /** Metadata of the operation */
1274
- bulkActionMetadata?: BulkActionMetadata;
1275
- }
1276
- export interface BulkPublishDraftFileResult {
1277
- /** Item metadata */
1278
- itemMetadata?: ItemMetadata;
1279
- /**
1280
- * The item following the operation
1281
- * Only returned if operation was successful and if returnEntity flag was on
1282
- */
1283
- item?: FileDescriptor;
1284
- }
1285
- export interface UpdateFileRequest {
1286
- /**
1287
- * ID of the file to update.
1288
- *
1289
- * You can also specify the file's Wix media URL. For example, `wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032`.
1290
- * Learn more about the file ID parameter ([SDK](https://dev.wix.com/docs/sdk/backend-modules/media/file-and-folder-ids#file-id-as-a-parameter) | [REST](https://dev.wix.com/docs/rest/assets/media/media-manager/files/file-id#file-id-as-a-parameter)).
1291
- * @maxLength 1000
1292
- */
1293
- fileId?: string;
1294
- /**
1295
- * File name that appears in the Media Manager.
1296
- * @maxLength 200
1297
- */
1298
- displayName?: string | null;
1299
- /**
1300
- * ID of the file's parent folder. <br />
1301
- * Default: `media-root`.
1302
- * @maxLength 100
1303
- */
1304
- parentFolderId?: string | null;
1305
- /**
1306
- * Labels assigned to media files that describe and categorize them. Provided by the Wix user, or generated by [Google Vision API](https://cloud.google.com/vision/docs/drag-and-drop) for images.
1307
- * @maxSize 500
1308
- * @maxLength 200
1309
- */
1310
- labels?: string[] | null;
1311
- }
1312
- export interface UpdateFileResponse {
1313
- /** Information about the updated file. */
1314
- file?: FileDescriptor;
1315
- }
1316
- export interface DomainEvent extends DomainEventBodyOneOf {
1317
- createdEvent?: EntityCreatedEvent;
1318
- updatedEvent?: EntityUpdatedEvent;
1319
- deletedEvent?: EntityDeletedEvent;
1320
- actionEvent?: ActionEvent;
1321
- /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
1322
- _id?: string;
1323
- /**
1324
- * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
1325
- * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
1326
- */
1327
- entityFqdn?: string;
1328
- /**
1329
- * Event action name, placed at the top level to make it easier for users to dispatch messages.
1330
- * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
1331
- */
1332
- slug?: string;
1333
- /** ID of the entity associated with the event. */
1334
- entityId?: string;
1335
- /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
1336
- eventTime?: Date | null;
1337
- /**
1338
- * Whether the event was triggered as a result of a privacy regulation application
1339
- * (for example, GDPR).
1340
- */
1341
- triggeredByAnonymizeRequest?: boolean | null;
1342
- /** If present, indicates the action that triggered the event. */
1343
- originatedFrom?: string | null;
1344
- /**
1345
- * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
1346
- * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
1347
- */
1348
- entityEventSequence?: string | null;
1349
- }
1350
- /** @oneof */
1351
- export interface DomainEventBodyOneOf {
1352
- createdEvent?: EntityCreatedEvent;
1353
- updatedEvent?: EntityUpdatedEvent;
1354
- deletedEvent?: EntityDeletedEvent;
1355
- actionEvent?: ActionEvent;
1356
- }
1357
- export interface EntityCreatedEvent {
1358
- entity?: string;
1359
- }
1360
- export interface RestoreInfo {
1361
- deletedDate?: Date | null;
1362
- }
1363
- export interface EntityUpdatedEvent {
1364
- /**
1365
- * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
1366
- * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
1367
- * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
1368
- */
1369
- currentEntity?: string;
1370
- }
1371
- export interface EntityDeletedEvent {
1372
- /** Entity that was deleted. */
1373
- deletedEntity?: string | null;
1374
- }
1375
- export interface ActionEvent {
1376
- body?: string;
1377
- }
1378
- export interface MessageEnvelope {
1379
- /**
1380
- * App instance ID.
1381
- * @format GUID
1382
- */
1383
- instanceId?: string | null;
1384
- /**
1385
- * Event type.
1386
- * @maxLength 150
1387
- */
1388
- eventType?: string;
1389
- /** The identification type and identity data. */
1390
- identity?: IdentificationData;
1391
- /** Stringify payload. */
1392
- data?: string;
1393
- }
1394
- export interface IdentificationData extends IdentificationDataIdOneOf {
1395
- /**
1396
- * ID of a site visitor that has not logged in to the site.
1397
- * @format GUID
1398
- */
1399
- anonymousVisitorId?: string;
1400
- /**
1401
- * ID of a site visitor that has logged in to the site.
1402
- * @format GUID
1403
- */
1404
- memberId?: string;
1405
- /**
1406
- * ID of a Wix user (site owner, contributor, etc.).
1407
- * @format GUID
1408
- */
1409
- wixUserId?: string;
1410
- /**
1411
- * ID of an app.
1412
- * @format GUID
1413
- */
1414
- appId?: string;
1415
- /** @readonly */
1416
- identityType?: WebhookIdentityTypeWithLiterals;
1417
- }
1418
- /** @oneof */
1419
- export interface IdentificationDataIdOneOf {
1420
- /**
1421
- * ID of a site visitor that has not logged in to the site.
1422
- * @format GUID
1423
- */
1424
- anonymousVisitorId?: string;
1425
- /**
1426
- * ID of a site visitor that has logged in to the site.
1427
- * @format GUID
1428
- */
1429
- memberId?: string;
1430
- /**
1431
- * ID of a Wix user (site owner, contributor, etc.).
1432
- * @format GUID
1433
- */
1434
- wixUserId?: string;
1435
- /**
1436
- * ID of an app.
1437
- * @format GUID
1438
- */
1439
- appId?: string;
1440
- }
1441
- export declare enum WebhookIdentityType {
1442
- UNKNOWN = "UNKNOWN",
1443
- ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
1444
- MEMBER = "MEMBER",
1445
- WIX_USER = "WIX_USER",
1446
- APP = "APP"
1447
- }
1448
- /** @enumType */
1449
- export type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
1450
- export interface BaseEventMetadata {
1451
- /**
1452
- * App instance ID.
1453
- * @format GUID
1454
- */
1455
- instanceId?: string | null;
1456
- /**
1457
- * Event type.
1458
- * @maxLength 150
1459
- */
1460
- eventType?: string;
1461
- /** The identification type and identity data. */
1462
- identity?: IdentificationData;
1463
- }
1464
- export interface EventMetadata extends BaseEventMetadata {
1465
- /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
1466
- _id?: string;
1467
- /**
1468
- * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
1469
- * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
1470
- */
1471
- entityFqdn?: string;
1472
- /**
1473
- * Event action name, placed at the top level to make it easier for users to dispatch messages.
1474
- * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
1475
- */
1476
- slug?: string;
1477
- /** ID of the entity associated with the event. */
1478
- entityId?: string;
1479
- /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
1480
- eventTime?: Date | null;
1481
- /**
1482
- * Whether the event was triggered as a result of a privacy regulation application
1483
- * (for example, GDPR).
1484
- */
1485
- triggeredByAnonymizeRequest?: boolean | null;
1486
- /** If present, indicates the action that triggered the event. */
1487
- originatedFrom?: string | null;
1488
- /**
1489
- * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
1490
- * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
1491
- */
1492
- entityEventSequence?: string | null;
1493
- }
1494
- export interface FileDescriptorDeletedEnvelope {
1495
- metadata: EventMetadata;
1496
- }
1497
- /**
1498
- * Triggered when a file is deleted.
1499
- *
1500
- * If the `movedToTrash` property in the event object `true`, the file was moved to the Media Manager's trash bin. If the `movedToTrash` property in the event object is `false`, the file was permanently deleted.
1501
- * @permissionScope Manage Stores
1502
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
1503
- * @permissionScope Manage Bookings Services and Settings
1504
- * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
1505
- * @permissionScope Manage Events
1506
- * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
1507
- * @permissionScope Manage Challenges
1508
- * @permissionScopeId SCOPE.CHALLENGES.MANAGE
1509
- * @permissionScope Read Media Manager
1510
- * @permissionScopeId SCOPE.DC-MEDIA.READ-MEDIAMANAGER
1511
- * @permissionScope Manage Media Manager
1512
- * @permissionScopeId SCOPE.DC-MEDIA.MANAGE-MEDIAMANAGER
1513
- * @permissionScope Manage Portfolio
1514
- * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
1515
- * @permissionScope Access Verticals by Automations
1516
- * @permissionScopeId SCOPE.CRM.ACCESS-VERTICALS-BY-AUTOMATIONS
1517
- * @permissionScope Manage Restaurants - all permissions
1518
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1519
- * @permissionScope Set Up Automations
1520
- * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
1521
- * @permissionId MEDIA.SITE_MEDIA_FILES_READ
1522
- * @webhook
1523
- * @eventType wix.media.site_media.v1.file_descriptor_deleted
1524
- * @serviceIdentifier com.wix.media.site_media.v1.FilesService
1525
- * @slug deleted
1526
- */
1527
- export declare function onFileDescriptorDeleted(handler: (event: FileDescriptorDeletedEnvelope) => void | Promise<void>): void;
1528
- export interface FileDescriptorFileFailedEnvelope {
1529
- data: FileFailed;
1530
- metadata: EventMetadata;
1531
- }
1532
- /**
1533
- * Triggered when a file fails during essential post-upload processing.
1534
- * @permissionScope Manage Stores
1535
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
1536
- * @permissionScope Manage Bookings Services and Settings
1537
- * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
1538
- * @permissionScope Manage Events
1539
- * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
1540
- * @permissionScope Manage Challenges
1541
- * @permissionScopeId SCOPE.CHALLENGES.MANAGE
1542
- * @permissionScope Read Media Manager
1543
- * @permissionScopeId SCOPE.DC-MEDIA.READ-MEDIAMANAGER
1544
- * @permissionScope Manage Media Manager
1545
- * @permissionScopeId SCOPE.DC-MEDIA.MANAGE-MEDIAMANAGER
1546
- * @permissionScope Manage Portfolio
1547
- * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
1548
- * @permissionScope Access Verticals by Automations
1549
- * @permissionScopeId SCOPE.CRM.ACCESS-VERTICALS-BY-AUTOMATIONS
1550
- * @permissionScope Manage Restaurants - all permissions
1551
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1552
- * @permissionScope Set Up Automations
1553
- * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
1554
- * @permissionId MEDIA.SITE_MEDIA_FILES_READ
1555
- * @webhook
1556
- * @eventType wix.media.site_media.v1.file_descriptor_file_failed
1557
- * @serviceIdentifier com.wix.media.site_media.v1.FilesService
1558
- * @slug file_failed
1559
- */
1560
- export declare function onFileDescriptorFileFailed(handler: (event: FileDescriptorFileFailedEnvelope) => void | Promise<void>): void;
1561
- export interface FileDescriptorFileReadyEnvelope {
1562
- data: FileReady;
1563
- metadata: EventMetadata;
1564
- }
1565
- /**
1566
- * Triggered when a file is ready to be used, after any post-upload processing.
1567
- *
1568
- * This event is also triggred when a file is restored from the Media Manager's trash bin.
1569
- * @permissionScope Manage Stores
1570
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
1571
- * @permissionScope Manage Bookings Services and Settings
1572
- * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
1573
- * @permissionScope Manage Events
1574
- * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
1575
- * @permissionScope Manage Challenges
1576
- * @permissionScopeId SCOPE.CHALLENGES.MANAGE
1577
- * @permissionScope Read Media Manager
1578
- * @permissionScopeId SCOPE.DC-MEDIA.READ-MEDIAMANAGER
1579
- * @permissionScope Manage Media Manager
1580
- * @permissionScopeId SCOPE.DC-MEDIA.MANAGE-MEDIAMANAGER
1581
- * @permissionScope Manage Portfolio
1582
- * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
1583
- * @permissionScope Access Verticals by Automations
1584
- * @permissionScopeId SCOPE.CRM.ACCESS-VERTICALS-BY-AUTOMATIONS
1585
- * @permissionScope Manage Restaurants - all permissions
1586
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1587
- * @permissionScope Set Up Automations
1588
- * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
1589
- * @permissionId MEDIA.SITE_MEDIA_FILES_READ
1590
- * @webhook
1591
- * @eventType wix.media.site_media.v1.file_descriptor_file_ready
1592
- * @serviceIdentifier com.wix.media.site_media.v1.FilesService
1593
- * @slug file_ready
1594
- */
1595
- export declare function onFileDescriptorFileReady(handler: (event: FileDescriptorFileReadyEnvelope) => void | Promise<void>): void;
1596
- export interface FileDescriptorUpdatedEnvelope {
1597
- entity: FileDescriptor;
1598
- metadata: EventMetadata;
1599
- }
1600
- /**
1601
- * Triggered when a file is updated, including when a file is moved to a different folder.
1602
- * @permissionScope Manage Stores
1603
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
1604
- * @permissionScope Manage Bookings Services and Settings
1605
- * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
1606
- * @permissionScope Manage Events
1607
- * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
1608
- * @permissionScope Manage Challenges
1609
- * @permissionScopeId SCOPE.CHALLENGES.MANAGE
1610
- * @permissionScope Read Media Manager
1611
- * @permissionScopeId SCOPE.DC-MEDIA.READ-MEDIAMANAGER
1612
- * @permissionScope Manage Media Manager
1613
- * @permissionScopeId SCOPE.DC-MEDIA.MANAGE-MEDIAMANAGER
1614
- * @permissionScope Manage Portfolio
1615
- * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
1616
- * @permissionScope Access Verticals by Automations
1617
- * @permissionScopeId SCOPE.CRM.ACCESS-VERTICALS-BY-AUTOMATIONS
1618
- * @permissionScope Manage Restaurants - all permissions
1619
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1620
- * @permissionScope Set Up Automations
1621
- * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
1622
- * @permissionId MEDIA.SITE_MEDIA_FILES_READ
1623
- * @webhook
1624
- * @eventType wix.media.site_media.v1.file_descriptor_updated
1625
- * @serviceIdentifier com.wix.media.site_media.v1.FilesService
1626
- * @slug updated
1627
- */
1628
- export declare function onFileDescriptorUpdated(handler: (event: FileDescriptorUpdatedEnvelope) => void | Promise<void>): void;
1629
- type FileDescriptorNonNullablePaths = `_id` | `displayName` | `url` | `hash` | `private` | `mediaType` | `media.image.colors.palette` | `media.image.faces` | `media.image.faces.${number}.confidence` | `media.image.faces.${number}.x` | `media.image.faces.${number}.y` | `media.image.faces.${number}.height` | `media.image.faces.${number}.width` | `media.audio._id` | `media.audio.assets` | `media.archive._id` | `media.archive.url` | `media.model3d._id` | `media.model3d.url` | `operationStatus` | `labels` | `siteId` | `state`;
1630
- /**
1631
- * Generates a URL for downloading a compressed file containing specific files in the Media Manager.
1632
- *
1633
- * The compressed file can contain up to 1000 files.
1634
- *
1635
- * To generate a permanent URL for downloading a compressed file that contains multiple files in the Media Manager, call the Generate Files Download URL endpoint.
1636
- * Since this is a permanent URL, it is less secure.
1637
- * Therefore, to download private files, call the Generate File Download URL endpoint for each private file that you want to generate a download URL for.
1638
- * @public
1639
- * @requiredField fileIds
1640
- * @param fileIds - IDs of the files to download.
1641
- *
1642
- * You can also pass the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`.
1643
- * Learn more in the File and Folder IDs article.
1644
- * @permissionId MEDIA.SITE_MEDIA_FILES_DOWNLOAD
1645
- * @permissionScope Manage Stores
1646
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
1647
- * @permissionScope Manage Bookings Services and Settings
1648
- * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
1649
- * @permissionScope Manage Events
1650
- * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
1651
- * @permissionScope Manage Challenges
1652
- * @permissionScopeId SCOPE.CHALLENGES.MANAGE
1653
- * @permissionScope Manage Media Manager
1654
- * @permissionScopeId SCOPE.DC-MEDIA.MANAGE-MEDIAMANAGER
1655
- * @permissionScope Manage Portfolio
1656
- * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
1657
- * @permissionScope Access Verticals by Automations
1658
- * @permissionScopeId SCOPE.CRM.ACCESS-VERTICALS-BY-AUTOMATIONS
1659
- * @permissionScope Manage Restaurants - all permissions
1660
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1661
- * @permissionScope Set Up Automations
1662
- * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
1663
- * @applicableIdentity APP
1664
- * @fqn com.wix.media.site_media.v1.FilesService.GenerateFilesDownloadUrl
1665
- */
1666
- export declare function generateFilesDownloadUrl(fileIds: string[]): Promise<NonNullablePaths<GenerateFilesDownloadUrlResponse, `downloadUrl`>>;
1667
- /**
1668
- * Generates one or more temporary URLs for downloading a specific file in the Media Manager.
1669
- *
1670
- * To download different assets of the file, specify the `assetKeys` parameter which generates a download URL for each asset.
1671
- * If no `assetKey` is specified, it defaults to `src`, which generates one download URL in the original file's format and quality.
1672
- *
1673
- * Call this endpoint to grant external clients access to a private media file. Specify the `expirationInMinutes` parameter to set the URL expiration time, and the `expirationRedirectUrl` parameter to add a redirect url when the URL expires.
1674
- *
1675
- * To generate a permanent URL for downloading a compressed file that contains multiple files in the Media Manager, call the Generate Files Download URL endpoint.
1676
- * Since this is a permanent URL, it is less secure.
1677
- * Therefore, to download private files, call the Generate File Download URL endpoint for each private file that you want to generate a download URL for.
1678
- * @public
1679
- * @requiredField fileId
1680
- * @param options - Options to use when generating a file's download URL.
1681
- * @param fileId - File ID.
1682
- *
1683
- * You can also pass the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`.
1684
- * Learn more in the File and Folder IDs article.
1685
- * @permissionId MEDIA.SITE_MEDIA_FILES_DOWNLOAD_URL
1686
- * @permissionScope Manage Stores
1687
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
1688
- * @permissionScope Manage Bookings Services and Settings
1689
- * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
1690
- * @permissionScope Manage Events
1691
- * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
1692
- * @permissionScope Manage Challenges
1693
- * @permissionScopeId SCOPE.CHALLENGES.MANAGE
1694
- * @permissionScope Manage Media Manager
1695
- * @permissionScopeId SCOPE.DC-MEDIA.MANAGE-MEDIAMANAGER
1696
- * @permissionScope Manage Portfolio
1697
- * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
1698
- * @permissionScope Access Verticals by Automations
1699
- * @permissionScopeId SCOPE.CRM.ACCESS-VERTICALS-BY-AUTOMATIONS
1700
- * @permissionScope Manage Restaurants - all permissions
1701
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1702
- * @permissionScope Set Up Automations
1703
- * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
1704
- * @applicableIdentity APP
1705
- * @fqn com.wix.media.site_media.v1.FilesService.GenerateFileDownloadUrl
1706
- */
1707
- export declare function generateFileDownloadUrl(fileId: string, options?: GenerateFileDownloadUrlOptions): Promise<NonNullablePaths<GenerateFileDownloadUrlResponse, `downloadUrls` | `downloadUrls.${number}.url` | `downloadUrls.${number}.assetKey`>>;
1708
- export interface GenerateFileDownloadUrlOptions {
1709
- /**
1710
- * Temporary file name used to identify the file type. For example, a file named "myFile.jpeg" identifies as an "image/jpeg" file type. <br />
1711
- *
1712
- * **Note:** The name that appears in the Media Manager is taken from the `filename` parameter in the Generate File Upload Url call.
1713
- * @maxLength 100
1714
- */
1715
- downloadFileName?: string | null;
1716
- /**
1717
- * The time that it takes in minutes for the download URL to expire. <br />
1718
- * Default: `600`. <br />
1719
- * Limit: `525600` (1 year).
1720
- * @min 1
1721
- */
1722
- expirationInMinutes?: number | null;
1723
- /**
1724
- * The redirect URL for when the temporary download URL with a token expires. <br />
1725
- * Default: A 403 Forbidden response page.
1726
- * @format WEB_URL
1727
- */
1728
- expirationRedirectUrl?: string | null;
1729
- /**
1730
- * Keys for downloading different assets (format and quality) of a file.
1731
- * Default: `src`, key representing the original file's format and quality.
1732
- * @maxSize 100
1733
- * @maxLength 100
1734
- */
1735
- assetKeys?: string[] | null;
1736
- /**
1737
- * Whether the link downloads the file or opens the file in the browser.
1738
- *
1739
- * - `ATTACHMENT`: The link downloads the file.
1740
- * - `INLINE`: The link opens the file in the browser.
1741
- *
1742
- * Default: `ATTACHMENT`
1743
- */
1744
- contentDisposition?: ContentDispositionWithLiterals;
1745
- }
1746
- /**
1747
- * Gets information about a specific file in the Media Manager.
1748
- * @public
1749
- * @requiredField fileId
1750
- * @param fileId - File ID.
1751
- *
1752
- * You can also pass the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`.
1753
- * Learn more in the File and Folder IDs article.
1754
- * @permissionId MEDIA.SITE_MEDIA_FILES_READ
1755
- * @permissionScope Manage Stores
1756
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
1757
- * @permissionScope Manage Bookings Services and Settings
1758
- * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
1759
- * @permissionScope Manage Events
1760
- * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
1761
- * @permissionScope Manage Challenges
1762
- * @permissionScopeId SCOPE.CHALLENGES.MANAGE
1763
- * @permissionScope Read Media Manager
1764
- * @permissionScopeId SCOPE.DC-MEDIA.READ-MEDIAMANAGER
1765
- * @permissionScope Manage Media Manager
1766
- * @permissionScopeId SCOPE.DC-MEDIA.MANAGE-MEDIAMANAGER
1767
- * @permissionScope Manage Portfolio
1768
- * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
1769
- * @permissionScope Access Verticals by Automations
1770
- * @permissionScopeId SCOPE.CRM.ACCESS-VERTICALS-BY-AUTOMATIONS
1771
- * @permissionScope Manage Restaurants - all permissions
1772
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1773
- * @permissionScope Set Up Automations
1774
- * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
1775
- * @applicableIdentity APP
1776
- * @returns Information about the file.
1777
- * @fqn com.wix.media.site_media.v1.FilesService.GetFileDescriptor
1778
- */
1779
- export declare function getFileDescriptor(fileId: string): Promise<NonNullablePaths<FileDescriptor, FileDescriptorNonNullablePaths>>;
1780
- /**
1781
- * Gets information about specific files in the Media Manager.
1782
- * @public
1783
- * @requiredField fileIds
1784
- * @param fileIds - File IDs.
1785
- *
1786
- * You can also pass the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`.
1787
- * Learn more in the File and Folder IDs article.
1788
- * @permissionId MEDIA.SITE_MEDIA_FILES_READ
1789
- * @permissionScope Manage Stores
1790
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
1791
- * @permissionScope Manage Bookings Services and Settings
1792
- * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
1793
- * @permissionScope Manage Events
1794
- * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
1795
- * @permissionScope Manage Challenges
1796
- * @permissionScopeId SCOPE.CHALLENGES.MANAGE
1797
- * @permissionScope Read Media Manager
1798
- * @permissionScopeId SCOPE.DC-MEDIA.READ-MEDIAMANAGER
1799
- * @permissionScope Manage Media Manager
1800
- * @permissionScopeId SCOPE.DC-MEDIA.MANAGE-MEDIAMANAGER
1801
- * @permissionScope Manage Portfolio
1802
- * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
1803
- * @permissionScope Access Verticals by Automations
1804
- * @permissionScopeId SCOPE.CRM.ACCESS-VERTICALS-BY-AUTOMATIONS
1805
- * @permissionScope Manage Restaurants - all permissions
1806
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1807
- * @permissionScope Set Up Automations
1808
- * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
1809
- * @applicableIdentity APP
1810
- * @fqn com.wix.media.site_media.v1.FilesService.GetFileDescriptors
1811
- */
1812
- export declare function getFileDescriptors(fileIds: string[]): Promise<NonNullablePaths<GetFileDescriptorsResponse, {
1813
- [P in FileDescriptorNonNullablePaths]: `files.${number}.${P}`;
1814
- }[FileDescriptorNonNullablePaths]>>;
1815
- /**
1816
- * Updates a file. <br />
1817
- *
1818
- * Specify the `parentFolderId` parameter to move a file from its current folder to a different folder.
1819
- * @param file - The file to update.
1820
- * @public
1821
- * @requiredField file
1822
- * @requiredField file._id
1823
- * @permissionId MEDIA.SITE_MEDIA_FILES_UPDATE
1824
- * @permissionScope Manage Stores
1825
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
1826
- * @permissionScope Manage Bookings Services and Settings
1827
- * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
1828
- * @permissionScope Manage Events
1829
- * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
1830
- * @permissionScope Manage Challenges
1831
- * @permissionScopeId SCOPE.CHALLENGES.MANAGE
1832
- * @permissionScope Manage Media Manager
1833
- * @permissionScopeId SCOPE.DC-MEDIA.MANAGE-MEDIAMANAGER
1834
- * @permissionScope Manage Portfolio
1835
- * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
1836
- * @permissionScope Access Verticals by Automations
1837
- * @permissionScopeId SCOPE.CRM.ACCESS-VERTICALS-BY-AUTOMATIONS
1838
- * @permissionScope Manage Restaurants - all permissions
1839
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1840
- * @permissionScope Set Up Automations
1841
- * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
1842
- * @applicableIdentity APP
1843
- * @returns Information about the updated file.
1844
- * @fqn com.wix.media.site_media.v1.FilesService.UpdateFileDescriptor
1845
- */
1846
- export declare function updateFileDescriptor(file: NonNullablePaths<FileDescriptor, `_id`>): Promise<NonNullablePaths<FileDescriptor, FileDescriptorNonNullablePaths>>;
1847
- /**
1848
- * Generates an upload URL to allow external clients to upload a file to the Media Manager. <br/>
1849
- *
1850
- * To learn how external clients can use the generated upload URL in the response to upload a file to the Media Manager, see Upload API ([SDK](https://dev.wix.com/docs/sdk/backend-modules/media/files/upload-api) | [REST](https://dev.wix.com/docs/rest/assets/media/media-manager/files/upload-api)).
1851
- * > **Notes:**
1852
- * > - When you upload a file, it's not immediately available, meaning you can't manage or use the file straight away. Learn more about knowing when a file is ready ([SDK](https://dev.wix.com/docs/sdk/backend-modules/media/files/importing-files#backend-modules_media_files_knowing-when-a-file-is-ready) | [REST](https://dev.wix.com/docs/rest/assets/media/media-manager/files/importing-files#knowing-when-a-file-is-ready)).
1853
- * > - Any interruption in the upload process stops the file upload. For files larger than 10MB, or when network connection is poor, call 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.
1854
- * @param mimeType - File mime type.
1855
- * @public
1856
- * @requiredField mimeType
1857
- * @param options - Options to use when generating a file's upload URL.
1858
- * @permissionId MEDIA.SITE_MEDIA_FILES_UPLOAD
1859
- * @permissionScope Manage Stores
1860
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
1861
- * @permissionScope Manage Bookings Services and Settings
1862
- * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
1863
- * @permissionScope Manage Events
1864
- * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
1865
- * @permissionScope Manage Challenges
1866
- * @permissionScopeId SCOPE.CHALLENGES.MANAGE
1867
- * @permissionScope Manage Media Manager
1868
- * @permissionScopeId SCOPE.DC-MEDIA.MANAGE-MEDIAMANAGER
1869
- * @permissionScope Manage Portfolio
1870
- * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
1871
- * @permissionScope Access Verticals by Automations
1872
- * @permissionScopeId SCOPE.CRM.ACCESS-VERTICALS-BY-AUTOMATIONS
1873
- * @permissionScope Manage Restaurants - all permissions
1874
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1875
- * @permissionScope Set Up Automations
1876
- * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
1877
- * @applicableIdentity APP
1878
- * @fqn com.wix.media.site_media.v1.FilesService.GenerateFileUploadUrl
1879
- */
1880
- export declare function generateFileUploadUrl(mimeType: string, options?: GenerateFileUploadUrlOptions): Promise<NonNullablePaths<GenerateFileUploadUrlResponse, `uploadUrl`>>;
1881
- export interface GenerateFileUploadUrlOptions {
1882
- /**
1883
- * Temporary file name used to identify the file type. For example, a file named "myFile.jpeg" identifies as an "image/jpeg" file type.
1884
- * <br /> **Note:** The name that appears in the Media Manager is taken from the `filename` parameter in the Generate File Upload Url call.
1885
- * @maxLength 200
1886
- */
1887
- fileName?: string | null;
1888
- /**
1889
- * File size in bytes.
1890
- * @readonly
1891
- * @format DECIMAL_VALUE
1892
- * @decimalValue options { gte:0, maxScale:0 }
1893
- */
1894
- sizeInBytes?: string | null;
1895
- /**
1896
- * ID of the file's parent folder. <br />
1897
- * This folder is the path root for the `filePath`.<br />
1898
- * Default: `media-root`.
1899
- * @maxLength 100
1900
- */
1901
- parentFolderId?: string | null;
1902
- /** Whether the file will be public or private. Learn more about private files ([SDK](https://dev.wix.com/docs/rest/assets/media/media-manager/files/private-files) | [REST](https://dev.wix.com/docs/sdk/backend-modules/media/files/private-files)). */
1903
- private?: boolean | null;
1904
- /**
1905
- * Labels assigned to media files that describe and categorize them. Provided by the Wix user, or generated by [Google Vision API](https://cloud.google.com/vision/docs/drag-and-drop) for images.
1906
- * @maxSize 50
1907
- * @maxLength 200
1908
- */
1909
- labels?: string[] | null;
1910
- /** A place to map an external entity to an uploaded file in the Wix Media Manager. */
1911
- externalInfo?: ExternalInfo;
1912
- /**
1913
- * Path to the folder where the file will be stored.
1914
- * For example, `/videos/2024/december`. <br/>
1915
- * If `parentFolderId` is defined, the parent folder is used as the path root. Otherwise, the root is `media-root`.
1916
- * The folders in the path will be created if they don't already exist. <br />
1917
- * @maxLength 100
1918
- */
1919
- filePath?: string | null;
1920
- }
1921
- /**
1922
- * Generates a resumable upload URL to allow external clients to easily upload large files over 10MB to the Media Manager. <br/>
1923
- *
1924
- * 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.
1925
- * To learn how external clients can use the generated upload URL in the response to upload large files to the Media Manager, see Resumable Upload API ([SDK](https://dev.wix.com/docs/sdk/backend-modules/media/files/resumable-upload-api) | [REST](https://dev.wix.com/docs/rest/assets/media/media-manager/files/resumable-upload-api)).
1926
- *
1927
- * > **Note:** When you upload a file, it's not immediately available, meaning you can't manage or use the file straight away. Learn more about knowing when a file is ready ([SDK](https://dev.wix.com/docs/sdk/backend-modules/media/files/importing-files#backend-modules_media_files_knowing-when-a-file-is-ready) | [REST](https://dev.wix.com/docs/rest/assets/media/media-manager/files/importing-files#knowing-when-a-file-is-ready)).
1928
- * @param mimeType - File mime type.
1929
- * @public
1930
- * @requiredField mimeType
1931
- * @param options - Options to use when generating a resumable upload URL.
1932
- * @permissionId MEDIA.SITE_MEDIA_FILES_UPLOAD
1933
- * @permissionScope Manage Stores
1934
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
1935
- * @permissionScope Manage Bookings Services and Settings
1936
- * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
1937
- * @permissionScope Manage Events
1938
- * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
1939
- * @permissionScope Manage Challenges
1940
- * @permissionScopeId SCOPE.CHALLENGES.MANAGE
1941
- * @permissionScope Manage Media Manager
1942
- * @permissionScopeId SCOPE.DC-MEDIA.MANAGE-MEDIAMANAGER
1943
- * @permissionScope Manage Portfolio
1944
- * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
1945
- * @permissionScope Access Verticals by Automations
1946
- * @permissionScopeId SCOPE.CRM.ACCESS-VERTICALS-BY-AUTOMATIONS
1947
- * @permissionScope Manage Restaurants - all permissions
1948
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1949
- * @permissionScope Set Up Automations
1950
- * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
1951
- * @applicableIdentity APP
1952
- * @fqn com.wix.media.site_media.v1.FilesService.GenerateFileResumableUploadUrl
1953
- */
1954
- export declare function generateFileResumableUploadUrl(mimeType: string, options?: GenerateFileResumableUploadUrlOptions): Promise<NonNullablePaths<GenerateFileResumableUploadUrlResponse, `uploadProtocol` | `uploadUrl` | `uploadToken`>>;
1955
- export interface GenerateFileResumableUploadUrlOptions {
1956
- /**
1957
- * Temporary file name used to identify the file type. For example, a file named "myFile.jpeg" identifies as an "image/jpeg" file type.
1958
- * <br /> **Note:** The name that appears in the Media Manager is taken from the `filename` parameter in the Generate File Upload Url call.
1959
- * @maxLength 200
1960
- */
1961
- fileName?: string | null;
1962
- /**
1963
- * File size in bytes.
1964
- * @readonly
1965
- * @format DECIMAL_VALUE
1966
- * @decimalValue options { gte:0, maxScale:0 }
1967
- */
1968
- sizeInBytes?: string | null;
1969
- /**
1970
- * ID of the file's parent folder. <br />
1971
- * This folder is the path root for the `filePath`.<br />
1972
- * Default: `media-root`.
1973
- * @maxLength 100
1974
- */
1975
- parentFolderId?: string | null;
1976
- /** Whether the file will be public or private. Learn more about private files ([SDK](https://dev.wix.com/docs/rest/assets/media/media-manager/files/private-files) | [REST](https://dev.wix.com/docs/sdk/backend-modules/media/files/private-files)). */
1977
- private?: boolean | null;
1978
- /**
1979
- * Labels assigned to media files that describe and categorize them. Provided by the Wix user, or generated by [Google Vision API](https://cloud.google.com/vision/docs/drag-and-drop) for images.
1980
- * @maxSize 500
1981
- * @maxLength 200
1982
- */
1983
- labels?: string[] | null;
1984
- /** The upload protocol to use for implementing the resumable upload. */
1985
- uploadProtocol?: UploadProtocolWithLiterals;
1986
- /**
1987
- * Path to the folder where the file will be stored.
1988
- * For example, `/videos/2024/december`. <br/>
1989
- * If `parentFolderId` is defined, the parent folder is used as the path root. Otherwise, the root is `media-root`.
1990
- * The folders in the path will be created if they don't already exist. <br />
1991
- * @maxLength 100
1992
- */
1993
- filePath?: string | null;
1994
- }
1995
- /**
1996
- * Imports a file to the Media Manager using an external url.
1997
- *
1998
- * Returns information about the imported file.
1999
- * Specify the `parentFolderId` and `filePath` parameters to specify which folder you want the file to be imported to.
2000
- * If no folder is specified, the file is imported to the `media-root` folder.
2001
- *
2002
- * >**Notes:**
2003
- * > - The `media` property isn't returned in the `files` response object.
2004
- * > - When you import a file, it's not immediately available, meaning you can't manage or use the file straight away. Learn more about knowing when a file is ready ([SDK](https://dev.wix.com/docs/sdk/backend-modules/media/files/importing-files#backend-modules_media_files_knowing-when-a-file-is-ready) | [REST](https://dev.wix.com/docs/rest/assets/media/media-manager/files/importing-files#knowing-when-a-file-is-ready)).
2005
- *
2006
- * To import a file, you need to do one of the following:
2007
- * - Specify its [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) in the `mimeType` field of the request. For example, `mimeType: 'image/jpeg'`.
2008
- * - Specify its extension in either the `displayName` or `url` field of the request. For example, `displayName: 'Example Image.jpeg` or `url: https://www.example.com/image.jpeg`.
2009
- * - Ensure the server hosting the file supports HEAD requests. In these cases the Wix servers can retrieve the MIME type from the hosting server.
2010
- * > **Note:** If you want to validate the media type, specify the file's expected media type in the optional `mediaType` field of the request. For example, `mediaType: 'IMAGE'`.
2011
- * @param url - Publicly accessible external file URL.
2012
- * @public
2013
- * @requiredField url
2014
- * @param options - Options to use when importing a single file.
2015
- * @permissionId MEDIA.SITE_MEDIA_FILES_IMPORT
2016
- * @permissionScope Manage Stores
2017
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
2018
- * @permissionScope Manage Bookings Services and Settings
2019
- * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
2020
- * @permissionScope Manage Events
2021
- * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
2022
- * @permissionScope Manage Challenges
2023
- * @permissionScopeId SCOPE.CHALLENGES.MANAGE
2024
- * @permissionScope Manage Media Manager
2025
- * @permissionScopeId SCOPE.DC-MEDIA.MANAGE-MEDIAMANAGER
2026
- * @permissionScope Manage Portfolio
2027
- * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
2028
- * @permissionScope Access Verticals by Automations
2029
- * @permissionScopeId SCOPE.CRM.ACCESS-VERTICALS-BY-AUTOMATIONS
2030
- * @permissionScope Manage Restaurants - all permissions
2031
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
2032
- * @permissionScope Set Up Automations
2033
- * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
2034
- * @applicableIdentity APP
2035
- * @fqn com.wix.media.site_media.v1.FilesService.ImportFile
2036
- */
2037
- export declare function importFile(url: string, options?: ImportFileOptions): Promise<NonNullablePaths<ImportFileResponse, {
2038
- [P in FileDescriptorNonNullablePaths]: `file.${P}`;
2039
- }[FileDescriptorNonNullablePaths]>>;
2040
- export interface ImportFileOptions {
2041
- /**
2042
- * Media type of the file to import.
2043
- * excluding: OTHER media type
2044
- */
2045
- mediaType?: MediaTypeWithLiterals;
2046
- /**
2047
- * File name that appears in the Media Manager.
2048
- * @maxLength 200
2049
- */
2050
- displayName?: string | null;
2051
- /**
2052
- * ID of the file's parent folder. <br />
2053
- * This folder is the path root for the `filePath`. <br />
2054
- * Default: `media-root`.
2055
- * @maxLength 100
2056
- */
2057
- parentFolderId?: string | null;
2058
- /** Whether the file will be public or private. Learn more about private files ([SDK](https://dev.wix.com/docs/rest/assets/media/media-manager/files/private-files) | [REST](https://dev.wix.com/docs/sdk/backend-modules/media/files/private-files)). */
2059
- private?: boolean | null;
2060
- /**
2061
- * Labels assigned to media files that describe and categorize them. Provided by the Wix user, or generated by [Google Vision API](https://cloud.google.com/vision/docs/drag-and-drop) for images.
2062
- * @maxSize 500
2063
- * @maxLength 200
2064
- */
2065
- labels?: string[] | null;
2066
- /**
2067
- * File mime type.
2068
- * @maxLength 100
2069
- */
2070
- mimeType?: string;
2071
- /** Information sent to the File Ready and File Failed events. See Importing Files ([SDK](https://dev.wix.com/docs/sdk/backend-modules/media/files/importing-files#backend-modules_media_files_using-externalinfo) | [REST](https://dev.wix.com/docs/rest/assets/media/media-manager/files/importing-files#using-externalinfo)) to learn more. */
2072
- externalInfo?: ExternalInfo;
2073
- /** Optional parameters that should be sent with the external URL. */
2074
- urlParams?: Record<string, any> | null;
2075
- /** Optional headers that should be sent with the external URL. */
2076
- urlHeaders?: Record<string, any> | null;
2077
- /**
2078
- * Path to the folder where the file will be stored.
2079
- * For example, `/videos/2024/december`. <br/>
2080
- * If `parentFolderId` is defined, the parent folder is used as the path root. Otherwise, the root is `media-root`.
2081
- * The folders in the path will be created if they don't already exist. <br />
2082
- * @maxLength 100
2083
- */
2084
- filePath?: string | null;
2085
- }
2086
- /**
2087
- * Imports a bulk of files to the Media Manager using external urls. <br/>
2088
- *
2089
- * Returns information about the imported files.
2090
- *
2091
- * Use the `parentFolderId` and `filePath` parameters to specify the folder you want each file to be imported to.
2092
- * If no folder is specified, the file is imported to the `media-root` folder.
2093
- *
2094
- * >**Notes:**
2095
- * > - The `media` property isn't returned in the `files` response object.
2096
- * > - When you import a file, it's not immediately available, meaning you can't manage or use the file straight away. Learn more about knowing when a file is ready ([SDK](https://dev.wix.com/docs/sdk/backend-modules/media/files/importing-files#backend-modules_media_files_knowing-when-a-file-is-ready) | [REST](https://dev.wix.com/docs/rest/assets/media/media-manager/files/importing-files#knowing-when-a-file-is-ready)).
2097
- *
2098
- * To import files, you need to do one of the following for each file:
2099
- * - Specify its [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) in the `mimeType` field of the request. For example, `mimeType: 'image/jpeg'`.
2100
- * - Include its extension in either the `displayName` or `url` field of the request. For example, `displayName: 'Example Image.jpeg` or `url: https://www.example.com/image.jpeg`.
2101
- * - Ensure the server hosting the file supports HEAD requests. In these cases the Wix servers can retrieve the MIME type from the hosting server.
2102
- * > **Note:** If you want to validate the media type, specify the file's expected media type in the optional `mediaType` field of the request. For example, `mediaType: 'IMAGE'`.
2103
- * @param importFileRequests - Information about the files to import.
2104
- * @public
2105
- * @requiredField importFileRequests
2106
- * @requiredField importFileRequests.url
2107
- * @param options - Options to use when uploading multiple files.
2108
- * @permissionId MEDIA.SITE_MEDIA_FILES_IMPORT
2109
- * @permissionScope Manage Stores
2110
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
2111
- * @permissionScope Manage Bookings Services and Settings
2112
- * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
2113
- * @permissionScope Manage Events
2114
- * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
2115
- * @permissionScope Manage Challenges
2116
- * @permissionScopeId SCOPE.CHALLENGES.MANAGE
2117
- * @permissionScope Manage Media Manager
2118
- * @permissionScopeId SCOPE.DC-MEDIA.MANAGE-MEDIAMANAGER
2119
- * @permissionScope Manage Portfolio
2120
- * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
2121
- * @permissionScope Access Verticals by Automations
2122
- * @permissionScopeId SCOPE.CRM.ACCESS-VERTICALS-BY-AUTOMATIONS
2123
- * @permissionScope Manage Restaurants - all permissions
2124
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
2125
- * @permissionScope Set Up Automations
2126
- * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
2127
- * @applicableIdentity APP
2128
- * @fqn com.wix.media.site_media.v1.FilesService.BulkImportFiles
2129
- * @deprecated
2130
- * @replacedBy com.wix.media.site_media.v1.FilesService.BulkImportFile
2131
- * @targetRemovalDate 2024-03-31
2132
- */
2133
- export declare function bulkImportFiles(importFileRequests: NonNullablePaths<ImportFileRequest, `url`>[]): Promise<NonNullablePaths<BulkImportFilesResponse, {
2134
- [P in FileDescriptorNonNullablePaths]: `files.${number}.${P}`;
2135
- }[FileDescriptorNonNullablePaths]>>;
2136
- /**
2137
- * Imports a bulk of files to the Media Manager using external urls. <br/>
2138
- *
2139
- * Returns information about the imported files.
2140
- *
2141
- * Specify the `parentFolderId` and `filePath` parameters to specify the folder you want each file to be imported to.
2142
- * If no folder is specified, the file is imported to the `media-root` folder.
2143
- *
2144
- * >**Notes:**
2145
- * > - The `media` property isn't returned in the `files` response object.
2146
- * > - When you import a file, it's not immediately available, meaning you can't manage or use the file straight away. Learn more about knowing when a file is ready ([SDK](https://dev.wix.com/docs/sdk/backend-modules/media/files/importing-files#backend-modules_media_files_knowing-when-a-file-is-ready) | [REST](https://dev.wix.com/docs/rest/assets/media/media-manager/files/importing-files#knowing-when-a-file-is-ready)).
2147
- *
2148
- * To import files, you need to do one of the following for each file:
2149
- * - Specify its [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) in the `mimeType` field of the request. For example, `mimeType: 'image/jpeg'`.
2150
- * - Include its extension in either the `displayName` or `url` field of the request. For example, `displayName: 'Example Image.jpeg` or `url: https://www.example.com/image.jpeg`.
2151
- * - Ensure the server hosting the file supports HEAD requests. In these cases the Wix servers can retrieve the MIME type from the hosting server.
2152
- * > **Note:** If you want to validate the media type, specify the file's expected media type in the optional `mediaType` field of the request. For example, `mediaType: 'IMAGE'`.
2153
- * @param importFileRequests - Information about the files to import.
2154
- * @public
2155
- * @requiredField importFileRequests
2156
- * @requiredField importFileRequests.url
2157
- * @param options - Options to include the file descriptor in the response.
2158
- * @permissionId MEDIA.SITE_MEDIA_FILES_IMPORT
2159
- * @permissionScope Manage Stores
2160
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
2161
- * @permissionScope Manage Bookings Services and Settings
2162
- * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
2163
- * @permissionScope Manage Events
2164
- * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
2165
- * @permissionScope Manage Challenges
2166
- * @permissionScopeId SCOPE.CHALLENGES.MANAGE
2167
- * @permissionScope Manage Media Manager
2168
- * @permissionScopeId SCOPE.DC-MEDIA.MANAGE-MEDIAMANAGER
2169
- * @permissionScope Manage Portfolio
2170
- * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
2171
- * @permissionScope Access Verticals by Automations
2172
- * @permissionScopeId SCOPE.CRM.ACCESS-VERTICALS-BY-AUTOMATIONS
2173
- * @permissionScope Manage Restaurants - all permissions
2174
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
2175
- * @permissionScope Set Up Automations
2176
- * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
2177
- * @applicableIdentity APP
2178
- * @fqn com.wix.media.site_media.v1.FilesService.BulkImportFile
2179
- */
2180
- export declare function bulkImportFile(importFileRequests: NonNullablePaths<ImportFileRequest, `url`>[], options?: BulkImportFileOptions): Promise<NonNullablePaths<BulkImportFileResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | {
2181
- [P in FileDescriptorNonNullablePaths]: `results.${number}.item.${P}`;
2182
- }[FileDescriptorNonNullablePaths] | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`>>;
2183
- export interface BulkImportFileOptions {
2184
- /** Default: `true` */
2185
- returnEntity?: boolean | null;
2186
- }
2187
- /**
2188
- * Retrieves a list of files in the Media Manager.
2189
- *
2190
- * To retrieve a list of files within a specific folder in the Media Manager, specify the folder's ID in the `parentFolderId` parameter. If no folder is specified, the method retrieves the list of files in the root folder of the Media Manager.
2191
- * @public
2192
- * @param options - Options to use when listing media files.
2193
- * @permissionId MEDIA.SITE_MEDIA_FILES_LIST
2194
- * @permissionScope Manage Stores
2195
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
2196
- * @permissionScope Manage Bookings Services and Settings
2197
- * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
2198
- * @permissionScope Manage Events
2199
- * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
2200
- * @permissionScope Manage Challenges
2201
- * @permissionScopeId SCOPE.CHALLENGES.MANAGE
2202
- * @permissionScope Read Media Manager
2203
- * @permissionScopeId SCOPE.DC-MEDIA.READ-MEDIAMANAGER
2204
- * @permissionScope Manage Media Manager
2205
- * @permissionScopeId SCOPE.DC-MEDIA.MANAGE-MEDIAMANAGER
2206
- * @permissionScope Manage Portfolio
2207
- * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
2208
- * @permissionScope Access Verticals by Automations
2209
- * @permissionScopeId SCOPE.CRM.ACCESS-VERTICALS-BY-AUTOMATIONS
2210
- * @permissionScope Manage Restaurants - all permissions
2211
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
2212
- * @permissionScope Set Up Automations
2213
- * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
2214
- * @applicableIdentity APP
2215
- * @fqn com.wix.media.site_media.v1.FilesService.ListFiles
2216
- */
2217
- export declare function listFiles(options?: ListFilesOptions): Promise<NonNullablePaths<ListFilesResponse, {
2218
- [P in FileDescriptorNonNullablePaths]: `files.${number}.${P}`;
2219
- }[FileDescriptorNonNullablePaths]>>;
2220
- export interface ListFilesOptions {
2221
- /**
2222
- * ID of the file's parent folder. <br />
2223
- * Default:`media-root`.
2224
- * @maxLength 100
2225
- */
2226
- parentFolderId?: string | null;
2227
- /**
2228
- * File media type.
2229
- * @maxSize 30
2230
- */
2231
- mediaTypes?: MediaTypeWithLiterals[];
2232
- /** \n`true`: Returns only private files. \n`false`: Returns only public files. \n`undefined`: Returns public and private files. \n Learn more about private files ([SDK](https://dev.wix.com/docs/rest/assets/media/media-manager/files/private-files) | [REST](https://dev.wix.com/docs/sdk/backend-modules/media/files/private-files)). */
2233
- private?: boolean | null;
2234
- /**
2235
- * Field name and order to sort by. One of: <br />
2236
- * * `displayName`
2237
- * * `updatedDate`
2238
- * * `sizeInBytes`
2239
- * Default: `updatedDate` in `desc` order.
2240
- */
2241
- sort?: Sorting;
2242
- /** Cursor and paging information. */
2243
- paging?: CursorPaging;
2244
- }
2245
- /**
2246
- * Searches all folders in the Media Manager and returns a list of files that match the terms specified in the parameters. <br/>
2247
- *
2248
- * If no parameters are specified, the endpoint returns all files in the `MEDIA_ROOT` folder.
2249
- * @public
2250
- * @param options - Options to specify which folders to search.
2251
- * @permissionId MEDIA.SITE_MEDIA_FILES_LIST
2252
- * @permissionScope Manage Stores
2253
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
2254
- * @permissionScope Manage Bookings Services and Settings
2255
- * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
2256
- * @permissionScope Manage Events
2257
- * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
2258
- * @permissionScope Manage Challenges
2259
- * @permissionScopeId SCOPE.CHALLENGES.MANAGE
2260
- * @permissionScope Read Media Manager
2261
- * @permissionScopeId SCOPE.DC-MEDIA.READ-MEDIAMANAGER
2262
- * @permissionScope Manage Media Manager
2263
- * @permissionScopeId SCOPE.DC-MEDIA.MANAGE-MEDIAMANAGER
2264
- * @permissionScope Manage Portfolio
2265
- * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
2266
- * @permissionScope Access Verticals by Automations
2267
- * @permissionScopeId SCOPE.CRM.ACCESS-VERTICALS-BY-AUTOMATIONS
2268
- * @permissionScope Manage Restaurants - all permissions
2269
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
2270
- * @permissionScope Set Up Automations
2271
- * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
2272
- * @applicableIdentity APP
2273
- * @fqn com.wix.media.site_media.v1.FilesService.SearchFiles
2274
- */
2275
- export declare function searchFiles(options?: SearchFilesOptions): Promise<NonNullablePaths<SearchFilesResponse, {
2276
- [P in FileDescriptorNonNullablePaths]: `files.${number}.${P}`;
2277
- }[FileDescriptorNonNullablePaths]>>;
2278
- export interface SearchFilesOptions {
2279
- /**
2280
- * Term to search for. Possible terms include the value of a file's
2281
- * `displayName`, `mimeType`, and `label`. <br />
2282
- * For example, if a file's label is cat, the search term is 'cat'.
2283
- * @maxLength 200
2284
- */
2285
- search?: string | null;
2286
- /**
2287
- * A root folder in the media manager to search in. <br />
2288
- * Default: `MEDIA_ROOT`.
2289
- */
2290
- rootFolder?: RootFolderWithLiterals;
2291
- /**
2292
- * File media type.
2293
- * @maxSize 30
2294
- */
2295
- mediaTypes?: MediaTypeWithLiterals[];
2296
- /** \n`true`: Returns only private files. \n`false`: Returns only public files. \n`undefined`: Returns public and private files. \n Learn more about private files ([SDK](https://dev.wix.com/docs/rest/assets/media/media-manager/files/private-files) | [REST](https://dev.wix.com/docs/sdk/backend-modules/media/files/private-files)). */
2297
- private?: boolean | null;
2298
- /**
2299
- * Field name and order to sort by. One of: <br />
2300
- * * `displayName`
2301
- * * `updatedDate`
2302
- * * `sizeInBytes`
2303
- * Default: `updatedDate` in `desc` order.
2304
- */
2305
- sort?: Sorting;
2306
- /** Cursor and paging information. */
2307
- paging?: CursorPaging;
2308
- }
2309
- /**
2310
- * Generates a URL for streaming a specific video file in the Media Manager. <br/>
2311
- *
2312
- * To stream different assets of the file, specify 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.
2313
- * @public
2314
- * @requiredField fileId
2315
- * @param options - Options to use when generating a video file's streaming URL.
2316
- * @param fileId - File ID.
2317
- *
2318
- * You can also pass the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`.
2319
- * Learn more in the File and Folder IDs article.
2320
- * @permissionId MEDIA.SITE_MEDIA_FILES_READ
2321
- * @permissionScope Manage Stores
2322
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
2323
- * @permissionScope Manage Bookings Services and Settings
2324
- * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
2325
- * @permissionScope Manage Events
2326
- * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
2327
- * @permissionScope Manage Challenges
2328
- * @permissionScopeId SCOPE.CHALLENGES.MANAGE
2329
- * @permissionScope Read Media Manager
2330
- * @permissionScopeId SCOPE.DC-MEDIA.READ-MEDIAMANAGER
2331
- * @permissionScope Manage Media Manager
2332
- * @permissionScopeId SCOPE.DC-MEDIA.MANAGE-MEDIAMANAGER
2333
- * @permissionScope Manage Portfolio
2334
- * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
2335
- * @permissionScope Access Verticals by Automations
2336
- * @permissionScopeId SCOPE.CRM.ACCESS-VERTICALS-BY-AUTOMATIONS
2337
- * @permissionScope Manage Restaurants - all permissions
2338
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
2339
- * @permissionScope Set Up Automations
2340
- * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
2341
- * @applicableIdentity APP
2342
- * @fqn com.wix.media.site_media.v1.FilesService.GenerateVideoStreamingUrl
2343
- */
2344
- export declare function generateVideoStreamingUrl(fileId: string, options?: GenerateVideoStreamingUrlOptions): Promise<NonNullablePaths<GenerateVideoStreamingUrlResponse, `downloadUrl.url` | `downloadUrl.assetKey`>>;
2345
- export interface GenerateVideoStreamingUrlOptions {
2346
- /** Video stream format. */
2347
- format?: StreamFormatWithLiterals;
2348
- }
2349
- /**
2350
- * Deletes the specified files from the Media Manager. <br/>
2351
- *
2352
- * The deleted files are moved to the Media Manager's trash bin (`TRASH-ROOT` folder) unless permanently deleted. To permanently delete files, specify 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.
2353
- *
2354
- * Note the following:
2355
- * * The specified files can be from different folders.
2356
- * * Moving multiple files at once is an asynchronous action, and may take time for the changes to appear in the Media Manager.
2357
- * * Attempting to delete files that are already in the trash bin doesn't result in an error.
2358
- * * If a site contains deleted media files, the deleted media files still appear on the site as the files are still in the Media Manager (in the trash bin).
2359
- * * You can use Bulk Restore Files From Trash Bin to restore files from the Media Manager's trash bin.
2360
- * @public
2361
- * @requiredField fileIds
2362
- * @param options - Options to use when deleting files.
2363
- * @param fileIds - IDs of the files to move to the Media Manager's trash bin.
2364
- *
2365
- * You can also pass the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`.
2366
- * Learn more in the File and Folder IDs article.
2367
- * @permissionId MEDIA.SITE_MEDIA_FILES_MOVE_TO_TRASH
2368
- * @permissionScope Manage Stores
2369
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
2370
- * @permissionScope Manage Bookings Services and Settings
2371
- * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
2372
- * @permissionScope Manage Events
2373
- * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
2374
- * @permissionScope Manage Challenges
2375
- * @permissionScopeId SCOPE.CHALLENGES.MANAGE
2376
- * @permissionScope Manage Media Manager
2377
- * @permissionScopeId SCOPE.DC-MEDIA.MANAGE-MEDIAMANAGER
2378
- * @permissionScope Manage Portfolio
2379
- * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
2380
- * @permissionScope Access Verticals by Automations
2381
- * @permissionScopeId SCOPE.CRM.ACCESS-VERTICALS-BY-AUTOMATIONS
2382
- * @permissionScope Manage Restaurants - all permissions
2383
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
2384
- * @permissionScope Set Up Automations
2385
- * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
2386
- * @applicableIdentity APP
2387
- * @fqn com.wix.media.site_media.v1.FilesService.BulkDeleteFiles
2388
- */
2389
- export declare function bulkDeleteFiles(fileIds: string[], options?: BulkDeleteFilesOptions): Promise<void>;
2390
- export interface BulkDeleteFilesOptions {
2391
- /**
2392
- * Whether the specified files are permanently deleted. <br />
2393
- * Default: `false`
2394
- */
2395
- permanent?: boolean;
2396
- }
2397
- /**
2398
- * Restores the specified files from the Media Manager's trash bin, and moves them to their original locations in the Media Manager.
2399
- * @public
2400
- * @requiredField fileIds
2401
- * @param fileIds - IDs of the files to restore from the Media Manager's trash bin.
2402
- *
2403
- * You can also pass the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`.
2404
- * Learn more in the File and Folder IDs article.
2405
- * @permissionId MEDIA.SITE_MEDIA_FILES_RESTORE_FROM_TRASH
2406
- * @permissionScope Manage Stores
2407
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
2408
- * @permissionScope Manage Bookings Services and Settings
2409
- * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
2410
- * @permissionScope Manage Events
2411
- * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
2412
- * @permissionScope Manage Challenges
2413
- * @permissionScopeId SCOPE.CHALLENGES.MANAGE
2414
- * @permissionScope Manage Media Manager
2415
- * @permissionScopeId SCOPE.DC-MEDIA.MANAGE-MEDIAMANAGER
2416
- * @permissionScope Manage Portfolio
2417
- * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
2418
- * @permissionScope Access Verticals by Automations
2419
- * @permissionScopeId SCOPE.CRM.ACCESS-VERTICALS-BY-AUTOMATIONS
2420
- * @permissionScope Manage Restaurants - all permissions
2421
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
2422
- * @permissionScope Set Up Automations
2423
- * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
2424
- * @applicableIdentity APP
2425
- * @fqn com.wix.media.site_media.v1.FilesService.BulkRestoreFilesFromTrashBin
2426
- */
2427
- export declare function bulkRestoreFilesFromTrashBin(fileIds: string[]): Promise<void>;
2428
- /**
2429
- * Retrieves a list of files in the Media Manager's trash bin. <br/>
2430
- *
2431
- * >**Note:** The Media Manager's trash bin (`TRASH-ROOT` folder) only contains temporarily deleted files, not permanently deleted files.
2432
- * @public
2433
- * @param options - Options to use when listing deleted files from the trash bin.
2434
- * @permissionId MEDIA.SITE_MEDIA_FILES_LIST_DELETED
2435
- * @permissionScope Manage Stores
2436
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
2437
- * @permissionScope Manage Bookings Services and Settings
2438
- * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
2439
- * @permissionScope Manage Events
2440
- * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
2441
- * @permissionScope Manage Challenges
2442
- * @permissionScopeId SCOPE.CHALLENGES.MANAGE
2443
- * @permissionScope Read Media Manager
2444
- * @permissionScopeId SCOPE.DC-MEDIA.READ-MEDIAMANAGER
2445
- * @permissionScope Manage Media Manager
2446
- * @permissionScopeId SCOPE.DC-MEDIA.MANAGE-MEDIAMANAGER
2447
- * @permissionScope Manage Portfolio
2448
- * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
2449
- * @permissionScope Access Verticals by Automations
2450
- * @permissionScopeId SCOPE.CRM.ACCESS-VERTICALS-BY-AUTOMATIONS
2451
- * @permissionScope Manage Restaurants - all permissions
2452
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
2453
- * @permissionScope Set Up Automations
2454
- * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
2455
- * @applicableIdentity APP
2456
- * @fqn com.wix.media.site_media.v1.FilesService.ListDeletedFiles
2457
- */
2458
- export declare function listDeletedFiles(options?: ListDeletedFilesOptions): Promise<NonNullablePaths<ListDeletedFilesResponse, {
2459
- [P in FileDescriptorNonNullablePaths]: `files.${number}.${P}`;
2460
- }[FileDescriptorNonNullablePaths]>>;
2461
- export interface ListDeletedFilesOptions {
2462
- /**
2463
- * ID of the file's parent folder. <br />
2464
- * Default: `media-root`.
2465
- * @maxLength 100
2466
- */
2467
- parentFolderId?: string | null;
2468
- /**
2469
- * File media type.
2470
- * @maxSize 30
2471
- */
2472
- mediaTypes?: MediaTypeWithLiterals[];
2473
- /** \n`true`: Returns only private files. \n`false`: Returns only public files. \n`undefined`: Returns public and private files. \n Learn more about private files ([SDK](https://dev.wix.com/docs/rest/assets/media/media-manager/files/private-files) | [REST](https://dev.wix.com/docs/sdk/backend-modules/media/files/private-files)). */
2474
- private?: boolean | null;
2475
- /**
2476
- * Field name and order to sort by. One of: <br />
2477
- * * `displayName`
2478
- * * `updatedDate`
2479
- * * `sizeInBytes`
2480
- * Default: `updatedDate` in `desc` order.
2481
- */
2482
- sort?: Sorting;
2483
- /** Cursor and paging information. */
2484
- paging?: CursorPaging;
2485
- }
2486
- export {};