@wix/media 1.0.62 → 1.0.64

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 (169) hide show
  1. package/build/cjs/context.d.ts +4 -4
  2. package/build/cjs/context.js +4 -4
  3. package/build/cjs/context.js.map +1 -1
  4. package/build/cjs/index.d.ts +4 -4
  5. package/build/cjs/index.js +4 -4
  6. package/build/cjs/index.js.map +1 -1
  7. package/build/cjs/meta.d.ts +4 -4
  8. package/build/cjs/meta.js +4 -4
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/context.d.ts +4 -4
  11. package/build/es/context.js +4 -4
  12. package/build/es/context.js.map +1 -1
  13. package/build/es/index.d.ts +4 -4
  14. package/build/es/index.js +4 -4
  15. package/build/es/index.js.map +1 -1
  16. package/build/es/meta.d.ts +4 -4
  17. package/build/es/meta.js +4 -4
  18. package/build/es/meta.js.map +1 -1
  19. package/package.json +14 -9
  20. package/build/cjs/index.typings.d.ts +0 -4
  21. package/build/cjs/index.typings.js +0 -31
  22. package/build/cjs/index.typings.js.map +0 -1
  23. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.context.d.ts +0 -8
  24. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.context.js +0 -77
  25. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.context.js.map +0 -1
  26. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.http.d.ts +0 -16
  27. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.http.js +0 -245
  28. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.http.js.map +0 -1
  29. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.meta.d.ts +0 -24
  30. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.meta.js +0 -142
  31. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.meta.js.map +0 -1
  32. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.public.d.ts +0 -26
  33. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.public.js +0 -49
  34. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.public.js.map +0 -1
  35. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.types.d.ts +0 -221
  36. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.types.js +0 -22
  37. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.types.js.map +0 -1
  38. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.universal.d.ts +0 -315
  39. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.universal.js +0 -407
  40. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.universal.js.map +0 -1
  41. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.context.d.ts +0 -13
  42. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.context.js +0 -137
  43. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.context.js.map +0 -1
  44. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.http.d.ts +0 -29
  45. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.http.js +0 -446
  46. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.http.js.map +0 -1
  47. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.meta.d.ts +0 -33
  48. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.meta.js +0 -237
  49. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.meta.js.map +0 -1
  50. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.public.d.ts +0 -59
  51. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.public.js +0 -81
  52. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.public.js.map +0 -1
  53. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.types.d.ts +0 -949
  54. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.types.js +0 -27
  55. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.types.js.map +0 -1
  56. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.universal.d.ts +0 -907
  57. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.universal.js +0 -748
  58. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.universal.js.map +0 -1
  59. package/build/cjs/src/media-site-media-v1-file-descriptor.context.d.ts +0 -18
  60. package/build/cjs/src/media-site-media-v1-file-descriptor.context.js +0 -197
  61. package/build/cjs/src/media-site-media-v1-file-descriptor.context.js.map +0 -1
  62. package/build/cjs/src/media-site-media-v1-file-descriptor.http.d.ts +0 -185
  63. package/build/cjs/src/media-site-media-v1-file-descriptor.http.js +0 -839
  64. package/build/cjs/src/media-site-media-v1-file-descriptor.http.js.map +0 -1
  65. package/build/cjs/src/media-site-media-v1-file-descriptor.meta.d.ts +0 -36
  66. package/build/cjs/src/media-site-media-v1-file-descriptor.meta.js +0 -332
  67. package/build/cjs/src/media-site-media-v1-file-descriptor.meta.js.map +0 -1
  68. package/build/cjs/src/media-site-media-v1-file-descriptor.public.d.ts +0 -136
  69. package/build/cjs/src/media-site-media-v1-file-descriptor.public.js +0 -118
  70. package/build/cjs/src/media-site-media-v1-file-descriptor.public.js.map +0 -1
  71. package/build/cjs/src/media-site-media-v1-file-descriptor.types.d.ts +0 -2017
  72. package/build/cjs/src/media-site-media-v1-file-descriptor.types.js +0 -99
  73. package/build/cjs/src/media-site-media-v1-file-descriptor.types.js.map +0 -1
  74. package/build/cjs/src/media-site-media-v1-file-descriptor.universal.d.ts +0 -2105
  75. package/build/cjs/src/media-site-media-v1-file-descriptor.universal.js +0 -1404
  76. package/build/cjs/src/media-site-media-v1-file-descriptor.universal.js.map +0 -1
  77. package/build/cjs/src/media-site-media-v1-folder.context.d.ts +0 -11
  78. package/build/cjs/src/media-site-media-v1-folder.context.js +0 -113
  79. package/build/cjs/src/media-site-media-v1-folder.context.js.map +0 -1
  80. package/build/cjs/src/media-site-media-v1-folder.http.d.ts +0 -81
  81. package/build/cjs/src/media-site-media-v1-folder.http.js +0 -364
  82. package/build/cjs/src/media-site-media-v1-folder.http.js.map +0 -1
  83. package/build/cjs/src/media-site-media-v1-folder.meta.d.ts +0 -27
  84. package/build/cjs/src/media-site-media-v1-folder.meta.js +0 -199
  85. package/build/cjs/src/media-site-media-v1-folder.meta.js.map +0 -1
  86. package/build/cjs/src/media-site-media-v1-folder.public.d.ts +0 -27
  87. package/build/cjs/src/media-site-media-v1-folder.public.js +0 -69
  88. package/build/cjs/src/media-site-media-v1-folder.public.js.map +0 -1
  89. package/build/cjs/src/media-site-media-v1-folder.types.d.ts +0 -335
  90. package/build/cjs/src/media-site-media-v1-folder.types.js +0 -50
  91. package/build/cjs/src/media-site-media-v1-folder.types.js.map +0 -1
  92. package/build/cjs/src/media-site-media-v1-folder.universal.d.ts +0 -603
  93. package/build/cjs/src/media-site-media-v1-folder.universal.js +0 -705
  94. package/build/cjs/src/media-site-media-v1-folder.universal.js.map +0 -1
  95. package/build/es/index.typings.d.ts +0 -4
  96. package/build/es/index.typings.js +0 -5
  97. package/build/es/index.typings.js.map +0 -1
  98. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.context.d.ts +0 -8
  99. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.context.js +0 -68
  100. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.context.js.map +0 -1
  101. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.http.d.ts +0 -16
  102. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.http.js +0 -236
  103. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.http.js.map +0 -1
  104. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.meta.d.ts +0 -24
  105. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.meta.js +0 -110
  106. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.meta.js.map +0 -1
  107. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.public.d.ts +0 -26
  108. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.public.js +0 -35
  109. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.public.js.map +0 -1
  110. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.types.d.ts +0 -221
  111. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.types.js +0 -19
  112. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.types.js.map +0 -1
  113. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.universal.d.ts +0 -315
  114. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.universal.js +0 -375
  115. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.universal.js.map +0 -1
  116. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.context.d.ts +0 -13
  117. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.context.js +0 -123
  118. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.context.js.map +0 -1
  119. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.http.d.ts +0 -29
  120. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.http.js +0 -432
  121. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.http.js.map +0 -1
  122. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.meta.d.ts +0 -33
  123. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.meta.js +0 -200
  124. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.meta.js.map +0 -1
  125. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.public.d.ts +0 -59
  126. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.public.js +0 -60
  127. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.public.js.map +0 -1
  128. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.types.d.ts +0 -949
  129. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.types.js +0 -24
  130. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.types.js.map +0 -1
  131. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.universal.d.ts +0 -907
  132. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.universal.js +0 -711
  133. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.universal.js.map +0 -1
  134. package/build/es/src/media-site-media-v1-file-descriptor.context.d.ts +0 -18
  135. package/build/es/src/media-site-media-v1-file-descriptor.context.js +0 -178
  136. package/build/es/src/media-site-media-v1-file-descriptor.context.js.map +0 -1
  137. package/build/es/src/media-site-media-v1-file-descriptor.http.d.ts +0 -185
  138. package/build/es/src/media-site-media-v1-file-descriptor.http.js +0 -820
  139. package/build/es/src/media-site-media-v1-file-descriptor.http.js.map +0 -1
  140. package/build/es/src/media-site-media-v1-file-descriptor.meta.d.ts +0 -36
  141. package/build/es/src/media-site-media-v1-file-descriptor.meta.js +0 -290
  142. package/build/es/src/media-site-media-v1-file-descriptor.meta.js.map +0 -1
  143. package/build/es/src/media-site-media-v1-file-descriptor.public.d.ts +0 -136
  144. package/build/es/src/media-site-media-v1-file-descriptor.public.js +0 -85
  145. package/build/es/src/media-site-media-v1-file-descriptor.public.js.map +0 -1
  146. package/build/es/src/media-site-media-v1-file-descriptor.types.d.ts +0 -2017
  147. package/build/es/src/media-site-media-v1-file-descriptor.types.js +0 -96
  148. package/build/es/src/media-site-media-v1-file-descriptor.types.js.map +0 -1
  149. package/build/es/src/media-site-media-v1-file-descriptor.universal.d.ts +0 -2105
  150. package/build/es/src/media-site-media-v1-file-descriptor.universal.js +0 -1362
  151. package/build/es/src/media-site-media-v1-file-descriptor.universal.js.map +0 -1
  152. package/build/es/src/media-site-media-v1-folder.context.d.ts +0 -11
  153. package/build/es/src/media-site-media-v1-folder.context.js +0 -101
  154. package/build/es/src/media-site-media-v1-folder.context.js.map +0 -1
  155. package/build/es/src/media-site-media-v1-folder.http.d.ts +0 -81
  156. package/build/es/src/media-site-media-v1-folder.http.js +0 -352
  157. package/build/es/src/media-site-media-v1-folder.http.js.map +0 -1
  158. package/build/es/src/media-site-media-v1-folder.meta.d.ts +0 -27
  159. package/build/es/src/media-site-media-v1-folder.meta.js +0 -164
  160. package/build/es/src/media-site-media-v1-folder.meta.js.map +0 -1
  161. package/build/es/src/media-site-media-v1-folder.public.d.ts +0 -27
  162. package/build/es/src/media-site-media-v1-folder.public.js +0 -50
  163. package/build/es/src/media-site-media-v1-folder.public.js.map +0 -1
  164. package/build/es/src/media-site-media-v1-folder.types.d.ts +0 -335
  165. package/build/es/src/media-site-media-v1-folder.types.js +0 -47
  166. package/build/es/src/media-site-media-v1-folder.types.js.map +0 -1
  167. package/build/es/src/media-site-media-v1-folder.universal.d.ts +0 -603
  168. package/build/es/src/media-site-media-v1-folder.universal.js +0 -670
  169. package/build/es/src/media-site-media-v1-folder.universal.js.map +0 -1
@@ -1,2105 +0,0 @@
1
- import { EventDefinition } 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
- */
7
- _id?: string;
8
- /** File name as it appears in the Media Manager. */
9
- displayName?: string;
10
- /**
11
- * Static URL of the file.
12
- * @readonly
13
- */
14
- url?: string;
15
- /** ID of the file's parent folder. */
16
- parentFolderId?: string | null;
17
- /**
18
- * File hash.
19
- * @readonly
20
- */
21
- hash?: string;
22
- /**
23
- * Size of the uploaded file in bytes.
24
- * @readonly
25
- */
26
- sizeInBytes?: string | null;
27
- /**
28
- * Whether the link to the uploaded file is public or private. Private links require a token.
29
- * @readonly
30
- */
31
- private?: boolean;
32
- /**
33
- * Media file type.
34
- *
35
- * Supported values: `"IMAGE"`, `"VIDEO"`, `"AUDIO"`, `"DOCUMENT"`, `"VECTOR"`, `"ARCHIVE"`, `"MODEL3D"`
36
- * @readonly
37
- */
38
- mediaType?: MediaType;
39
- /**
40
- * Media file content.
41
- * @readonly
42
- */
43
- media?: FileMedia;
44
- /**
45
- * Status of the file that was uploaded.
46
- *
47
- * Supported values: `"FAILED"`, `"READY"`, `"PENDING"`
48
- * * `FAILED`: The file failed to upload, for example, during media post processing.
49
- * * `READY`: The file uploaded, finished all processing, and is ready for use.
50
- * * `PENDING`: The file is processing and the URLs are not yet available. This response is returned when importing a file.
51
- * @readonly
52
- */
53
- operationStatus?: OperationStatus;
54
- /**
55
- * URL where the file was uploaded from.
56
- * @readonly
57
- */
58
- sourceUrl?: string | null;
59
- /**
60
- * URL of the file's thumbnail.
61
- * @readonly
62
- */
63
- thumbnailUrl?: string | null;
64
- /** Labels assigned to media files that describe and categorize them. Provided by the user, or generated by [Google Vision API](https://cloud.google.com/vision/docs/drag-and-drop) for images. */
65
- labels?: string[];
66
- /**
67
- * Date and time the file was created.
68
- * @readonly
69
- */
70
- _createdDate?: Date;
71
- /**
72
- * Date and time the file was updated.
73
- * @readonly
74
- */
75
- _updatedDate?: Date;
76
- /**
77
- * The Wix site ID where the media file is stored.
78
- * @readonly
79
- */
80
- siteId?: string;
81
- /**
82
- * State of the file.
83
- *
84
- * Supported values: `"OK"`, `"DELETED"`
85
- * @readonly
86
- */
87
- state?: State;
88
- }
89
- export declare enum MediaType {
90
- UNKNOWN = "UNKNOWN",
91
- IMAGE = "IMAGE",
92
- VIDEO = "VIDEO",
93
- AUDIO = "AUDIO",
94
- DOCUMENT = "DOCUMENT",
95
- VECTOR = "VECTOR",
96
- ARCHIVE = "ARCHIVE",
97
- MODEL3D = "MODEL3D",
98
- OTHER = "OTHER"
99
- }
100
- export interface FileMedia extends FileMediaMediaOneOf {
101
- /** Information about the image. */
102
- image?: ImageMedia;
103
- /** Information about the video. */
104
- video?: string;
105
- /** Information about the audio. */
106
- audio?: AudioV2;
107
- /** Information about the document. */
108
- document?: string;
109
- /** Information about the vector. */
110
- vector?: ImageMedia;
111
- /** Information about the archive. */
112
- archive?: Archive;
113
- /** Information about the 3D Model. */
114
- model3d?: Model3D;
115
- }
116
- /** @oneof */
117
- export interface FileMediaMediaOneOf {
118
- /** Information about the image. */
119
- image?: ImageMedia;
120
- /** Information about the video. */
121
- video?: string;
122
- /** Information about the audio. */
123
- audio?: AudioV2;
124
- /** Information about the document. */
125
- document?: string;
126
- /** Information about the vector. */
127
- vector?: ImageMedia;
128
- /** Information about the archive. */
129
- archive?: Archive;
130
- /** Information about the 3D Model. */
131
- model3d?: Model3D;
132
- }
133
- export interface ImageMedia {
134
- /** Image data. */
135
- image?: string;
136
- /** Image colors. */
137
- colors?: Colors;
138
- /** Information about faces in the image. Use to crop images without cutting out faces. */
139
- faces?: FaceRecognition[];
140
- /**
141
- * Information about the image preview.
142
- * You can use this to display a preview for private images.
143
- */
144
- previewImage?: string;
145
- /**
146
- * Optional, An AI generated description of the image
147
- * @readonly
148
- */
149
- caption?: string | null;
150
- }
151
- export interface Colors {
152
- /** Main color of the image. */
153
- prominent?: Color;
154
- /** Color palette of the image. */
155
- palette?: Color[];
156
- }
157
- export interface Color {
158
- /** HEX color. */
159
- hex?: string | null;
160
- /** RGB color. */
161
- rgb?: ColorRGB;
162
- }
163
- export interface ColorRGB {
164
- /** Red channel. */
165
- r?: number | null;
166
- /** Green channel. */
167
- g?: number | null;
168
- /** Blue channel. */
169
- b?: number | null;
170
- }
171
- /**
172
- * Using this object you can crop images while centering on faces
173
- * ------------------------
174
- * | |
175
- * | x,y |
176
- * | *-------- |
177
- * | | . . | |
178
- * | | | | height |
179
- * | | \ / | |
180
- * | | | |
181
- * | --------- |
182
- * | width |
183
- * | |
184
- * |______________________|
185
- */
186
- export interface FaceRecognition {
187
- /** The accuracy percentage of the face recognition. The likelihood that a face is detected. */
188
- confidence?: number;
189
- /** Top left x pixel coordinate of the face. */
190
- x?: number;
191
- /** Top left y pixel coordinate of the face. */
192
- y?: number;
193
- /** Face pixel height. */
194
- height?: number;
195
- /** Face pixel width. */
196
- width?: number;
197
- }
198
- export interface VideoResolution {
199
- /** Video URL. */
200
- url?: string;
201
- /** Video height. */
202
- height?: number;
203
- /** Video width. */
204
- width?: number;
205
- /**
206
- * Video format
207
- * Possible values: ['144p.mp4' '144p.webm' '240p.mp4' '240p.webm' '360p.mp4' '360p.webm' '480p.mp4' '480p.webm'
208
- * '720p.mp4' '720p.webm' '1080p.mp4' '1080p.webm', 'hls' ]
209
- */
210
- format?: string;
211
- }
212
- export interface AudioV2 {
213
- /** WixMedia ID. */
214
- _id?: string;
215
- /** Audio formats available for this file. */
216
- assets?: string[];
217
- /**
218
- * Audio bitrate.
219
- * @readonly
220
- */
221
- bitrate?: number | null;
222
- /**
223
- * Audio format.
224
- * @readonly
225
- */
226
- format?: string | null;
227
- /**
228
- * Audio duration in seconds.
229
- * @readonly
230
- */
231
- duration?: number | null;
232
- /**
233
- * Audio size in bytes.
234
- * @readonly
235
- */
236
- sizeInBytes?: string | null;
237
- }
238
- export interface Archive {
239
- /** WixMedia ID. */
240
- _id?: string;
241
- /** Archive URL. */
242
- url?: string;
243
- /**
244
- * Archive URL expiration date (when relevant).
245
- * @readonly
246
- */
247
- urlExpirationDate?: Date;
248
- /** Archive size in bytes. */
249
- sizeInBytes?: string | null;
250
- /** Archive filename. */
251
- filename?: string | null;
252
- }
253
- export interface Model3D {
254
- /** WixMedia 3D ID. */
255
- _id?: string;
256
- /** 3D URL. */
257
- url?: string;
258
- /** 3D thumbnail Image */
259
- thumbnail?: string;
260
- /** 3D alt text. */
261
- altText?: string | null;
262
- /**
263
- * 3D URL expiration date (when relevant).
264
- * @readonly
265
- */
266
- urlExpirationDate?: Date;
267
- /**
268
- * 3D filename.
269
- * @readonly
270
- */
271
- filename?: string | null;
272
- /**
273
- * 3D size in bytes.
274
- * @readonly
275
- */
276
- sizeInBytes?: string | null;
277
- }
278
- export interface OtherMedia {
279
- /** WixMedia ID. for use with Site Media APIs only */
280
- _id?: string;
281
- /**
282
- * The media type of the file: 'site_icon', 'swf', 'package', 'ufont'
283
- * @readonly
284
- */
285
- internalMediaType?: string | null;
286
- /**
287
- * size in bytes. Optional.
288
- * @readonly
289
- */
290
- sizeInBytes?: string | null;
291
- }
292
- export declare enum OperationStatus {
293
- /** File upload or processing failed */
294
- FAILED = "FAILED",
295
- /** File is ready for consumption */
296
- READY = "READY",
297
- /** File is waiting for processing or currently being processed */
298
- PENDING = "PENDING"
299
- }
300
- export declare enum State {
301
- /** File is ready for consumption */
302
- OK = "OK",
303
- /** Deleted file */
304
- DELETED = "DELETED"
305
- }
306
- export declare enum Namespace {
307
- NO_NAMESPACE = "NO_NAMESPACE",
308
- OTHERS = "OTHERS",
309
- /** ANY = 2; */
310
- WIX_VIDEO = "WIX_VIDEO",
311
- /** _nsWixMusic */
312
- WIX_MUSIC = "WIX_MUSIC",
313
- /** _nsArtStore */
314
- ALBUMS_AND_ART_STORE = "ALBUMS_AND_ART_STORE",
315
- /** _nsDigitalProduct */
316
- WIX_ECOM = "WIX_ECOM",
317
- /** _nsPhotoShareApp */
318
- PHOTO_SHARE_APP = "PHOTO_SHARE_APP",
319
- /** _nsSharingApp, */
320
- SHARING_APP = "SHARING_APP",
321
- /** engage */
322
- CHAT = "CHAT",
323
- /** logobuilder */
324
- LOGO_BUILDER = "LOGO_BUILDER",
325
- /** WixExposure */
326
- ALBUMS_OLD = "ALBUMS_OLD",
327
- /** chat-mobile-uploads */
328
- CHAT_MOBILE = "CHAT_MOBILE",
329
- /** _nsWixForms */
330
- WIX_FORMS = "WIX_FORMS"
331
- }
332
- export interface IdentityInfo {
333
- /** The type of the user that uploaded the file */
334
- identityType?: IdentityType;
335
- /** User Id. empty when UNKNOWN */
336
- identityId?: string | null;
337
- }
338
- export declare enum IdentityType {
339
- UNKNOWN = "UNKNOWN",
340
- ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
341
- MEMBER = "MEMBER",
342
- WIX_USER = "WIX_USER",
343
- APP = "APP"
344
- }
345
- export interface FileReady {
346
- /** File entity that is ready with full information */
347
- file?: FileDescriptor;
348
- /** External information passed in the file import or upload. */
349
- externalInfo?: ExternalInfo;
350
- /** The File was restored from the trash-bin */
351
- triggeredByUndelete?: boolean;
352
- }
353
- export interface ExternalInfo {
354
- /** External information to pass in the File Ready or File Failed events. */
355
- origin?: string;
356
- /** External IDs to pass in the File Ready or File Failed events. */
357
- externalIds?: string[];
358
- }
359
- export interface FileFailed {
360
- /** External information passed in the file import or upload. */
361
- externalInfo?: ExternalInfo;
362
- }
363
- export interface GenerateFilesDownloadUrlRequest {
364
- /** IDs of the files to download. */
365
- fileIds: string[];
366
- }
367
- export interface GenerateFilesDownloadUrlResponse {
368
- /** URL for downloading the compressed file containing the specified files in the Media Manager. */
369
- downloadUrl?: string;
370
- }
371
- export interface GenerateFileDownloadUrlRequest {
372
- /** File ID. */
373
- fileId: string;
374
- /**
375
- * Temporary file name used to identify the file type. For example, a file named "myFile.jpeg" identifies as an "image/jpeg" file type. <br />
376
- *
377
- * **Note:** The name that appears in the Media Manager is taken from the `filename` query parameter in the upload request.
378
- */
379
- downloadFileName?: string | null;
380
- /**
381
- * The time that it takes in minutes for the download URL to expire. <br />
382
- * Default: `600`. <br />
383
- * Limit: `525600` (1 year).
384
- */
385
- expirationInMinutes?: number | null;
386
- /**
387
- * The redirect URL for when the temporary download URL with a token expires. <br />
388
- * Default: A 403 Forbidden response page.
389
- */
390
- expirationRedirectUrl?: string | null;
391
- /**
392
- * Keys for downloading different assets (format and quality) of a file.
393
- * Default: `src`, key representing the original file's format and quality.
394
- */
395
- assetKeys?: string[] | null;
396
- /**
397
- * Whether the link downloads the file or opens the file in the browser.
398
- *
399
- * - `ATTACHMENT`: The link downloads the file.
400
- * - `INLINE`: The link opens the file in the browser.
401
- *
402
- * Default: `ATTACHMENT`
403
- */
404
- contentDisposition?: ContentDisposition;
405
- }
406
- export declare enum ContentDisposition {
407
- /** Using the link in the browser will download the file */
408
- ATTACHMENT = "ATTACHMENT",
409
- /** Using the link in the browser will open the file in the browser */
410
- INLINE = "INLINE"
411
- }
412
- export interface GenerateFileDownloadUrlResponse {
413
- /** URL for downloading a specific file in the Media Manager. */
414
- downloadUrls?: DownloadUrl[];
415
- }
416
- export interface DownloadUrl {
417
- /** The file download URL. */
418
- url?: string;
419
- /**
420
- * Key for downloading a different asset (format and quality) of a file.
421
- * Default: `src`, key representing the original file's format and quality.
422
- */
423
- assetKey?: string;
424
- }
425
- export interface GetFileDescriptorRequest {
426
- /** File ID. */
427
- fileId: string;
428
- }
429
- export interface GetFileDescriptorResponse {
430
- /** Information about the file. */
431
- file?: FileDescriptor;
432
- }
433
- export interface GetFileDescriptorsRequest {
434
- /** File IDs. */
435
- fileIds: string[];
436
- }
437
- export interface GetFileDescriptorsResponse {
438
- /** Information about the requested files. */
439
- files?: FileDescriptor[];
440
- }
441
- export interface UpdateFileRequest {
442
- /** ID of the file to update. */
443
- fileId?: string;
444
- /** File name that appears in the Media Manager. */
445
- displayName?: string | null;
446
- /**
447
- * ID of the file's parent folder. <br />
448
- * Default: `media-root`.
449
- */
450
- parentFolderId?: string | null;
451
- /** Labels assigned to media files that describe and categorize them. Provided by the user, or generated by [Google Vision API](https://cloud.google.com/vision/docs/drag-and-drop) for images. */
452
- labels?: string[] | null;
453
- }
454
- export interface UpdateFileResponse {
455
- /** Information about the updated file. */
456
- file?: FileDescriptor;
457
- }
458
- export interface UpdateFileDescriptorRequest {
459
- /** The file to update. */
460
- file: FileDescriptor;
461
- }
462
- export interface UpdateFileDescriptorResponse {
463
- /** Information about the updated file. */
464
- file?: FileDescriptor;
465
- }
466
- export interface GenerateFileUploadUrlRequest {
467
- /** File mime type. */
468
- mimeType: string | null;
469
- /**
470
- * Temporary file name used to identify the file type. For example, a file named "myFile.jpeg" identifies as an "image/jpeg" file type.
471
- * <br /> **Note:** The name that appears in the Media Manager is taken from the `filename` query parameter in the upload request.
472
- */
473
- fileName?: string | null;
474
- /**
475
- * File size in bytes.
476
- * @readonly
477
- */
478
- sizeInBytes?: string | null;
479
- /**
480
- * ID of the file's parent folder. <br />
481
- * Default: `media-root`.
482
- */
483
- parentFolderId?: string | null;
484
- /** Whether the link to the uploaded file is public or private. See `Private Files` in terminology. */
485
- private?: boolean | null;
486
- /** Labels assigned to media files that describe and categorize them. Provided by the user, or generated by [Google Vision API](https://cloud.google.com/vision/docs/drag-and-drop) for images. */
487
- labels?: string[] | null;
488
- /** A place to map an external entity to an uploaded file in the Wix Media Manager. */
489
- externalInfo?: ExternalInfo;
490
- }
491
- export interface GenerateFileUploadUrlResponse {
492
- /** The URL for uploading a file to the Media Manager. */
493
- uploadUrl?: string;
494
- }
495
- export interface GenerateFileResumableUploadUrlRequest {
496
- /** File mime type. */
497
- mimeType: string | null;
498
- /**
499
- * Temporary file name used to identify the file type. For example, a file named "myFile.jpeg" identifies as an "image/jpeg" file type.
500
- * <br /> **Note:** The name that appears in the Media Manager is taken from the `filename` query parameter in the upload request.
501
- */
502
- fileName?: string | null;
503
- /**
504
- * File size in bytes.
505
- * @readonly
506
- */
507
- sizeInBytes?: string | null;
508
- /**
509
- * ID of the file's parent folder. <br />
510
- * Default: `media-root`.
511
- */
512
- parentFolderId?: string | null;
513
- /** Whether the link to the imported file is public or private. See `Private Files` in terminology. */
514
- private?: boolean | null;
515
- /** Labels assigned to media files that describe and categorize them. Provided by the user, or generated by [Google Vision API](https://cloud.google.com/vision/docs/drag-and-drop) for images. */
516
- labels?: string[] | null;
517
- /** The upload protocol to use for implementing the resumable upload. */
518
- uploadProtocol?: UploadProtocol;
519
- }
520
- export declare enum UploadProtocol {
521
- /** The upload protocol to use for implementing the resumable upload. */
522
- TUS = "TUS"
523
- }
524
- export interface GenerateFileResumableUploadUrlResponse {
525
- /**
526
- * The upload protocol to use for implementing the resumable upload.
527
- *
528
- * Supported values: `"TUS"`
529
- */
530
- uploadProtocol?: UploadProtocol;
531
- /** The URL for uploading a file to the Media Manager. */
532
- uploadUrl?: string;
533
- /** Single-use upload token. */
534
- uploadToken?: string;
535
- }
536
- export interface ImportFileRequest {
537
- /** Publicly accessible external file URL. */
538
- url: string;
539
- /**
540
- * Media type of the file to import.
541
- *
542
- * Supported values: `"IMAGE"`, `"VIDEO"`, `"AUDIO"`, `"DOCUMENT"`, `"VECTOR"`, `"ARCHIVE"`, `"MODEL3D"`
543
- */
544
- mediaType?: MediaType;
545
- /** File name that appears in the Media Manager. */
546
- displayName?: string | null;
547
- /**
548
- * ID of the file's parent folder. <br />
549
- * Default: `media-root`.
550
- */
551
- parentFolderId?: string | null;
552
- /** Whether the link to the imported file is public or private. */
553
- private?: boolean | null;
554
- /** Labels assigned to media files that describe and categorize them. Provided by the user, or generated by [Google Vision API](https://cloud.google.com/vision/docs/drag-and-drop) for images. */
555
- labels?: string[] | null;
556
- /** File mime type. */
557
- mimeType?: string;
558
- /** A place to map an external entity to an imported file in the Wix Media Manager. */
559
- externalInfo?: ExternalInfo;
560
- /** Optional parameters that should be sent with the external URL. */
561
- urlParams?: Record<string, any> | null;
562
- /** Optional headers that should be sent with the external URL. */
563
- urlHeaders?: Record<string, any> | null;
564
- }
565
- export interface ImportFileResponse {
566
- /** Information about the imported file. */
567
- file?: FileDescriptor;
568
- }
569
- export interface BulkImportFilesRequest {
570
- /** Information about the files to import. */
571
- importFileRequests: ImportFileRequest[];
572
- }
573
- export interface BulkImportFilesResponse {
574
- /** Information about the imported files. */
575
- files?: FileDescriptor[];
576
- }
577
- export interface BulkImportFileRequest {
578
- /** Information about the files to import. */
579
- importFileRequests: ImportFileRequest[];
580
- /**
581
- * Whether to include the imported File Descriptor in the response. Set to `false` to exclude the File Descriptor from the returned object.
582
- *
583
- * Default: `true`
584
- */
585
- returnEntity?: boolean | null;
586
- }
587
- export interface BulkImportFileResponse {
588
- /** Items created by bulk action. */
589
- results?: BulkImportFileResult[];
590
- /** Bulk action metadata. */
591
- bulkActionMetadata?: BulkActionMetadata;
592
- }
593
- export interface BulkImportFileResult {
594
- /** Item metadata. */
595
- itemMetadata?: ItemMetadata;
596
- /** Imported file. This field is returned if the operation was successful and `returnEntity` is not set to `false`. */
597
- item?: FileDescriptor;
598
- }
599
- export interface ItemMetadata {
600
- /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
601
- _id?: string | null;
602
- /** Index of the item within the request array. Allows for correlation between request and response items. */
603
- originalIndex?: number;
604
- /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
605
- success?: boolean;
606
- /** Details about the error in case of failure. */
607
- error?: ApplicationError;
608
- }
609
- export interface ApplicationError {
610
- /** Error code. */
611
- code?: string;
612
- /** Description of the error. */
613
- description?: string;
614
- /** Data related to the error. */
615
- data?: Record<string, any> | null;
616
- }
617
- export interface BulkActionMetadata {
618
- /** Number of items that were successfully processed. */
619
- totalSuccesses?: number;
620
- /** Number of items that couldn't be processed. */
621
- totalFailures?: number;
622
- /** Number of failures without details because detailed failure threshold was exceeded. */
623
- undetailedFailures?: number;
624
- }
625
- export interface ListFilesRequest {
626
- /**
627
- * ID of the file's parent folder. <br />
628
- * Default:`media-root`.
629
- */
630
- parentFolderId?: string | null;
631
- /**
632
- * File media type.
633
- * excluding: OTHER media type
634
- */
635
- mediaTypes?: MediaType[];
636
- /** Whether the link to the imported file is public or private. */
637
- private?: boolean | null;
638
- /**
639
- * Field name and order to sort by. One of:
640
- *
641
- * - `displayName`
642
- * - `_updatedDate`
643
- * - `sizeInBytes`
644
- *
645
- * Default: `_updatedDate` in `"DESC"` order.
646
- */
647
- sort?: Sorting;
648
- /** Cursor and paging information. */
649
- paging?: CursorPaging;
650
- }
651
- export interface Sorting {
652
- /** Name of the field to sort by. */
653
- fieldName?: string;
654
- /**
655
- * Sort order
656
- *
657
- * Supported values: `"ASC"`, `"DESC"`
658
- */
659
- order?: SortOrder;
660
- }
661
- export declare enum SortOrder {
662
- ASC = "ASC",
663
- DESC = "DESC"
664
- }
665
- export interface CursorPaging {
666
- /** Maximum number of items to return in the results. */
667
- limit?: number | null;
668
- /**
669
- * Pointer to the next or previous page in the list of results.
670
- *
671
- * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
672
- * Not relevant for the first request.
673
- */
674
- cursor?: string | null;
675
- }
676
- export interface ListFilesResponse {
677
- /** List of files in the Media Manager. */
678
- files?: FileDescriptor[];
679
- /** The next cursor if it exists. */
680
- nextCursor?: PagingMetadataV2;
681
- }
682
- export interface PagingMetadataV2 {
683
- /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
684
- total?: number | null;
685
- /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
686
- cursors?: Cursors;
687
- }
688
- export interface Cursors {
689
- /** Cursor string pointing to the next page in the list of results. */
690
- next?: string | null;
691
- }
692
- export interface SearchFilesRequest {
693
- /**
694
- * Term to search for. Possible terms include the value of a file's
695
- * `displayName`, `mimeType`, and `label`. <br />
696
- * For example, if a file's label is cat, the search term is 'cat'.
697
- */
698
- search?: string | null;
699
- /**
700
- * A root folder in the media manager to search in. <br />
701
- * Default: `MEDIA_ROOT`.
702
- */
703
- rootFolder?: RootFolder;
704
- /**
705
- * File media type.
706
- * excluding: OTHER media type
707
- */
708
- mediaTypes?: MediaType[];
709
- /** Whether the link to the imported file is public or private. */
710
- private?: boolean | null;
711
- /**
712
- * Field name and order to sort by. One of:
713
- *
714
- * - `displayName`
715
- * - `_updatedDate`
716
- * - `sizeInBytes`
717
- *
718
- * Default: `_updatedDate` in `"DESC"` order.
719
- */
720
- sort?: Sorting;
721
- /** Cursor and paging information. */
722
- paging?: CursorPaging;
723
- }
724
- export declare enum RootFolder {
725
- /** Root of all site media */
726
- MEDIA_ROOT = "MEDIA_ROOT",
727
- /** Root of the trash system folder */
728
- TRASH_ROOT = "TRASH_ROOT",
729
- /** Root of all visitor uploads */
730
- VISITOR_UPLOADS_ROOT = "VISITOR_UPLOADS_ROOT"
731
- }
732
- export interface SearchFilesResponse {
733
- /** Files matching the query. */
734
- files?: FileDescriptor[];
735
- /** The next cursor if it exists. */
736
- nextCursor?: PagingMetadataV2;
737
- }
738
- export interface GenerateVideoStreamingUrlRequest {
739
- /** File ID. */
740
- fileId: string;
741
- /** Video stream format. */
742
- format?: StreamFormat;
743
- }
744
- export declare enum StreamFormat {
745
- UNKNOWN = "UNKNOWN",
746
- HLS = "HLS",
747
- DASH = "DASH"
748
- }
749
- export interface GenerateVideoStreamingUrlResponse {
750
- /** URL for streaming a specific file in the Media Manager. */
751
- downloadUrl?: DownloadUrl;
752
- }
753
- export interface GenerateWebSocketTokenRequest {
754
- }
755
- export interface GenerateWebSocketTokenResponse {
756
- /** The web socket token for the identity in the request */
757
- token?: string;
758
- }
759
- export interface BulkDeleteFilesRequest {
760
- /** IDs of the files to move to the Media Manager's trash bin. */
761
- fileIds: string[];
762
- /**
763
- * Whether the specified files are permanently deleted. <br />
764
- * Default: `false`
765
- */
766
- permanent?: boolean;
767
- }
768
- export interface BulkDeleteFilesResponse {
769
- }
770
- export interface BulkRestoreFilesFromTrashBinRequest {
771
- /** IDs of the files to restore from the Media Manager's trash bin. */
772
- fileIds: string[];
773
- }
774
- export interface BulkRestoreFilesFromTrashBinResponse {
775
- }
776
- export interface ListDeletedFilesRequest {
777
- /**
778
- * ID of the file's parent folder. <br />
779
- * Default: `media-root`.
780
- */
781
- parentFolderId?: string | null;
782
- /**
783
- * File media type.
784
- * excluding: OTHER media type
785
- */
786
- mediaTypes?: MediaType[];
787
- /** Whether the link to the imported file is public or private. */
788
- private?: boolean | null;
789
- /**
790
- * Field name and order to sort by. One of:
791
- *
792
- * - `displayName`
793
- * - `_updatedDate`
794
- * - `sizeInBytes`
795
- *
796
- * Default: `_updatedDate` in `"DESC"` order.
797
- */
798
- sort?: Sorting;
799
- /** Cursor and paging information. */
800
- paging?: CursorPaging;
801
- }
802
- export interface ListDeletedFilesResponse {
803
- /** List of files in the Media Manager's trash bin. */
804
- files?: FileDescriptor[];
805
- /** The next cursor if it exists. */
806
- nextCursor?: PagingMetadataV2;
807
- }
808
- export interface DomainEvent<T = string> extends DomainEventBodyOneOf<T> {
809
- createdEvent?: EntityCreatedEvent<T>;
810
- updatedEvent?: EntityUpdatedEvent<T>;
811
- deletedEvent?: EntityDeletedEvent<T>;
812
- actionEvent?: ActionEvent<T>;
813
- /**
814
- * Unique event ID.
815
- * Allows clients to ignore duplicate webhooks.
816
- */
817
- _id?: string;
818
- /**
819
- * Assumes actions are also always typed to an entity_type
820
- * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
821
- */
822
- entityFqdn?: string;
823
- /**
824
- * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
825
- * This is although the created/updated/deleted notion is duplication of the oneof types
826
- * Example: created/updated/deleted/started/completed/email_opened
827
- */
828
- slug?: string;
829
- /** ID of the entity associated with the event. */
830
- entityId?: string;
831
- /** Event timestamp. */
832
- eventTime?: Date;
833
- /**
834
- * Whether the event was triggered as a result of a privacy regulation application
835
- * (for example, GDPR).
836
- */
837
- triggeredByAnonymizeRequest?: boolean | null;
838
- /** If present, indicates the action that triggered the event. */
839
- originatedFrom?: string | null;
840
- /**
841
- * A sequence number defining the order of updates to the underlying entity.
842
- * For example, given that some entity was updated at 16:00 and than again at 16:01,
843
- * it is guaranteed that the sequence number of the second update is strictly higher than the first.
844
- * As the consumer, you can use this value to ensure that you handle messages in the correct order.
845
- * To do so, you will need to persist this number on your end, and compare the sequence number from the
846
- * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
847
- */
848
- entityEventSequence?: string | null;
849
- }
850
- export interface DomainCreatedEvent<T> extends Omit<DomainEvent<T>, 'deletedEvent' | 'updatedEvent' | 'actionEvent'> {
851
- }
852
- export interface DomainDeletedEvent<T> extends Omit<DomainEvent<T>, 'createdEvent' | 'updatedEvent' | 'actionEvent'> {
853
- }
854
- export interface DomainUpdatedEvent<T> extends Omit<DomainEvent<T>, 'createdEvent' | 'deletedEvent' | 'actionEvent'> {
855
- }
856
- export interface DomainActionEvent<T> extends Omit<DomainEvent<T>, 'createdEvent' | 'deletedEvent' | 'updatedEvent'> {
857
- }
858
- /** @oneof */
859
- export interface DomainEventBodyOneOf<T> {
860
- createdEvent?: EntityCreatedEvent<T>;
861
- updatedEvent?: EntityUpdatedEvent<T>;
862
- deletedEvent?: EntityDeletedEvent<T>;
863
- actionEvent?: ActionEvent<T>;
864
- }
865
- export interface EntityCreatedEvent<T> {
866
- entity?: T;
867
- }
868
- export interface EntityUpdatedEvent<T> {
869
- /**
870
- * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
871
- * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
872
- * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
873
- */
874
- currentEntity?: T;
875
- }
876
- export interface EntityDeletedEvent<T> {
877
- /** Entity that was deleted */
878
- deletedEntity?: T | null;
879
- }
880
- export interface ActionEvent<T> {
881
- body?: T;
882
- }
883
- export interface GenerateFilesDownloadUrlResponseNonNullableFields {
884
- downloadUrl: string;
885
- }
886
- export interface GenerateFileDownloadUrlResponseNonNullableFields {
887
- downloadUrls: {
888
- url: string;
889
- assetKey: string;
890
- }[];
891
- }
892
- export interface GetFileDescriptorResponseNonNullableFields {
893
- file?: {
894
- _id: string;
895
- displayName: string;
896
- url: string;
897
- hash: string;
898
- private: boolean;
899
- mediaType: MediaType;
900
- media?: {
901
- image?: {
902
- image: string;
903
- colors?: {
904
- palette: Color[];
905
- };
906
- faces: {
907
- confidence: number;
908
- x: number;
909
- y: number;
910
- height: number;
911
- width: number;
912
- }[];
913
- previewImage: string;
914
- };
915
- video: string;
916
- audio?: {
917
- _id: string;
918
- assets: string;
919
- };
920
- document: string;
921
- vector?: {
922
- image: string;
923
- colors?: {
924
- palette: Color[];
925
- };
926
- faces: {
927
- confidence: number;
928
- x: number;
929
- y: number;
930
- height: number;
931
- width: number;
932
- }[];
933
- previewImage: string;
934
- };
935
- archive?: {
936
- _id: string;
937
- url: string;
938
- };
939
- model3d?: {
940
- _id: string;
941
- url: string;
942
- thumbnail: string;
943
- };
944
- };
945
- operationStatus: OperationStatus;
946
- labels: string[];
947
- siteId: string;
948
- state: State;
949
- };
950
- }
951
- export interface GetFileDescriptorsResponseNonNullableFields {
952
- files: {
953
- _id: string;
954
- displayName: string;
955
- url: string;
956
- hash: string;
957
- private: boolean;
958
- mediaType: MediaType;
959
- media?: {
960
- image?: {
961
- image: string;
962
- colors?: {
963
- palette: Color[];
964
- };
965
- faces: {
966
- confidence: number;
967
- x: number;
968
- y: number;
969
- height: number;
970
- width: number;
971
- }[];
972
- previewImage: string;
973
- };
974
- video: string;
975
- audio?: {
976
- _id: string;
977
- assets: string;
978
- };
979
- document: string;
980
- vector?: {
981
- image: string;
982
- colors?: {
983
- palette: Color[];
984
- };
985
- faces: {
986
- confidence: number;
987
- x: number;
988
- y: number;
989
- height: number;
990
- width: number;
991
- }[];
992
- previewImage: string;
993
- };
994
- archive?: {
995
- _id: string;
996
- url: string;
997
- };
998
- model3d?: {
999
- _id: string;
1000
- url: string;
1001
- thumbnail: string;
1002
- };
1003
- };
1004
- operationStatus: OperationStatus;
1005
- labels: string[];
1006
- siteId: string;
1007
- state: State;
1008
- }[];
1009
- }
1010
- export interface UpdateFileDescriptorResponseNonNullableFields {
1011
- file?: {
1012
- _id: string;
1013
- displayName: string;
1014
- url: string;
1015
- hash: string;
1016
- private: boolean;
1017
- mediaType: MediaType;
1018
- media?: {
1019
- image?: {
1020
- image: string;
1021
- colors?: {
1022
- palette: Color[];
1023
- };
1024
- faces: {
1025
- confidence: number;
1026
- x: number;
1027
- y: number;
1028
- height: number;
1029
- width: number;
1030
- }[];
1031
- previewImage: string;
1032
- };
1033
- video: string;
1034
- audio?: {
1035
- _id: string;
1036
- assets: string;
1037
- };
1038
- document: string;
1039
- vector?: {
1040
- image: string;
1041
- colors?: {
1042
- palette: Color[];
1043
- };
1044
- faces: {
1045
- confidence: number;
1046
- x: number;
1047
- y: number;
1048
- height: number;
1049
- width: number;
1050
- }[];
1051
- previewImage: string;
1052
- };
1053
- archive?: {
1054
- _id: string;
1055
- url: string;
1056
- };
1057
- model3d?: {
1058
- _id: string;
1059
- url: string;
1060
- thumbnail: string;
1061
- };
1062
- };
1063
- operationStatus: OperationStatus;
1064
- labels: string[];
1065
- siteId: string;
1066
- state: State;
1067
- };
1068
- }
1069
- export interface GenerateFileUploadUrlResponseNonNullableFields {
1070
- uploadUrl: string;
1071
- }
1072
- export interface GenerateFileResumableUploadUrlResponseNonNullableFields {
1073
- uploadProtocol: UploadProtocol;
1074
- uploadUrl: string;
1075
- uploadToken: string;
1076
- }
1077
- export interface ImportFileResponseNonNullableFields {
1078
- file?: {
1079
- _id: string;
1080
- displayName: string;
1081
- url: string;
1082
- hash: string;
1083
- private: boolean;
1084
- mediaType: MediaType;
1085
- media?: {
1086
- image?: {
1087
- image: string;
1088
- colors?: {
1089
- palette: Color[];
1090
- };
1091
- faces: {
1092
- confidence: number;
1093
- x: number;
1094
- y: number;
1095
- height: number;
1096
- width: number;
1097
- }[];
1098
- previewImage: string;
1099
- };
1100
- video: string;
1101
- audio?: {
1102
- _id: string;
1103
- assets: string;
1104
- };
1105
- document: string;
1106
- vector?: {
1107
- image: string;
1108
- colors?: {
1109
- palette: Color[];
1110
- };
1111
- faces: {
1112
- confidence: number;
1113
- x: number;
1114
- y: number;
1115
- height: number;
1116
- width: number;
1117
- }[];
1118
- previewImage: string;
1119
- };
1120
- archive?: {
1121
- _id: string;
1122
- url: string;
1123
- };
1124
- model3d?: {
1125
- _id: string;
1126
- url: string;
1127
- thumbnail: string;
1128
- };
1129
- };
1130
- operationStatus: OperationStatus;
1131
- labels: string[];
1132
- siteId: string;
1133
- state: State;
1134
- };
1135
- }
1136
- export interface BulkImportFilesResponseNonNullableFields {
1137
- files: {
1138
- _id: string;
1139
- displayName: string;
1140
- url: string;
1141
- hash: string;
1142
- private: boolean;
1143
- mediaType: MediaType;
1144
- media?: {
1145
- image?: {
1146
- image: string;
1147
- colors?: {
1148
- palette: Color[];
1149
- };
1150
- faces: {
1151
- confidence: number;
1152
- x: number;
1153
- y: number;
1154
- height: number;
1155
- width: number;
1156
- }[];
1157
- previewImage: string;
1158
- };
1159
- video: string;
1160
- audio?: {
1161
- _id: string;
1162
- assets: string;
1163
- };
1164
- document: string;
1165
- vector?: {
1166
- image: string;
1167
- colors?: {
1168
- palette: Color[];
1169
- };
1170
- faces: {
1171
- confidence: number;
1172
- x: number;
1173
- y: number;
1174
- height: number;
1175
- width: number;
1176
- }[];
1177
- previewImage: string;
1178
- };
1179
- archive?: {
1180
- _id: string;
1181
- url: string;
1182
- };
1183
- model3d?: {
1184
- _id: string;
1185
- url: string;
1186
- thumbnail: string;
1187
- };
1188
- };
1189
- operationStatus: OperationStatus;
1190
- labels: string[];
1191
- siteId: string;
1192
- state: State;
1193
- }[];
1194
- }
1195
- export interface BulkImportFileResponseNonNullableFields {
1196
- results: {
1197
- itemMetadata?: {
1198
- originalIndex: number;
1199
- success: boolean;
1200
- error?: {
1201
- code: string;
1202
- description: string;
1203
- };
1204
- };
1205
- item?: {
1206
- _id: string;
1207
- displayName: string;
1208
- url: string;
1209
- hash: string;
1210
- private: boolean;
1211
- mediaType: MediaType;
1212
- media?: {
1213
- image?: {
1214
- image: string;
1215
- colors?: {
1216
- palette: Color[];
1217
- };
1218
- faces: {
1219
- confidence: number;
1220
- x: number;
1221
- y: number;
1222
- height: number;
1223
- width: number;
1224
- }[];
1225
- previewImage: string;
1226
- };
1227
- video: string;
1228
- audio?: {
1229
- _id: string;
1230
- assets: string;
1231
- };
1232
- document: string;
1233
- vector?: {
1234
- image: string;
1235
- colors?: {
1236
- palette: Color[];
1237
- };
1238
- faces: {
1239
- confidence: number;
1240
- x: number;
1241
- y: number;
1242
- height: number;
1243
- width: number;
1244
- }[];
1245
- previewImage: string;
1246
- };
1247
- archive?: {
1248
- _id: string;
1249
- url: string;
1250
- };
1251
- model3d?: {
1252
- _id: string;
1253
- url: string;
1254
- thumbnail: string;
1255
- };
1256
- };
1257
- operationStatus: OperationStatus;
1258
- labels: string[];
1259
- siteId: string;
1260
- state: State;
1261
- };
1262
- }[];
1263
- bulkActionMetadata?: {
1264
- totalSuccesses: number;
1265
- totalFailures: number;
1266
- undetailedFailures: number;
1267
- };
1268
- }
1269
- export interface ListFilesResponseNonNullableFields {
1270
- files: {
1271
- _id: string;
1272
- displayName: string;
1273
- url: string;
1274
- hash: string;
1275
- private: boolean;
1276
- mediaType: MediaType;
1277
- media?: {
1278
- image?: {
1279
- image: string;
1280
- colors?: {
1281
- palette: Color[];
1282
- };
1283
- faces: {
1284
- confidence: number;
1285
- x: number;
1286
- y: number;
1287
- height: number;
1288
- width: number;
1289
- }[];
1290
- previewImage: string;
1291
- };
1292
- video: string;
1293
- audio?: {
1294
- _id: string;
1295
- assets: string;
1296
- };
1297
- document: string;
1298
- vector?: {
1299
- image: string;
1300
- colors?: {
1301
- palette: Color[];
1302
- };
1303
- faces: {
1304
- confidence: number;
1305
- x: number;
1306
- y: number;
1307
- height: number;
1308
- width: number;
1309
- }[];
1310
- previewImage: string;
1311
- };
1312
- archive?: {
1313
- _id: string;
1314
- url: string;
1315
- };
1316
- model3d?: {
1317
- _id: string;
1318
- url: string;
1319
- thumbnail: string;
1320
- };
1321
- };
1322
- operationStatus: OperationStatus;
1323
- labels: string[];
1324
- siteId: string;
1325
- state: State;
1326
- }[];
1327
- }
1328
- export interface SearchFilesResponseNonNullableFields {
1329
- files: {
1330
- _id: string;
1331
- displayName: string;
1332
- url: string;
1333
- hash: string;
1334
- private: boolean;
1335
- mediaType: MediaType;
1336
- media?: {
1337
- image?: {
1338
- image: string;
1339
- colors?: {
1340
- palette: Color[];
1341
- };
1342
- faces: {
1343
- confidence: number;
1344
- x: number;
1345
- y: number;
1346
- height: number;
1347
- width: number;
1348
- }[];
1349
- previewImage: string;
1350
- };
1351
- video: string;
1352
- audio?: {
1353
- _id: string;
1354
- assets: string;
1355
- };
1356
- document: string;
1357
- vector?: {
1358
- image: string;
1359
- colors?: {
1360
- palette: Color[];
1361
- };
1362
- faces: {
1363
- confidence: number;
1364
- x: number;
1365
- y: number;
1366
- height: number;
1367
- width: number;
1368
- }[];
1369
- previewImage: string;
1370
- };
1371
- archive?: {
1372
- _id: string;
1373
- url: string;
1374
- };
1375
- model3d?: {
1376
- _id: string;
1377
- url: string;
1378
- thumbnail: string;
1379
- };
1380
- };
1381
- operationStatus: OperationStatus;
1382
- labels: string[];
1383
- siteId: string;
1384
- state: State;
1385
- }[];
1386
- }
1387
- export interface GenerateVideoStreamingUrlResponseNonNullableFields {
1388
- downloadUrl?: {
1389
- url: string;
1390
- assetKey: string;
1391
- };
1392
- }
1393
- export interface ListDeletedFilesResponseNonNullableFields {
1394
- files: {
1395
- _id: string;
1396
- displayName: string;
1397
- url: string;
1398
- hash: string;
1399
- private: boolean;
1400
- mediaType: MediaType;
1401
- media?: {
1402
- image?: {
1403
- image: string;
1404
- colors?: {
1405
- palette: Color[];
1406
- };
1407
- faces: {
1408
- confidence: number;
1409
- x: number;
1410
- y: number;
1411
- height: number;
1412
- width: number;
1413
- }[];
1414
- previewImage: string;
1415
- };
1416
- video: string;
1417
- audio?: {
1418
- _id: string;
1419
- assets: string;
1420
- };
1421
- document: string;
1422
- vector?: {
1423
- image: string;
1424
- colors?: {
1425
- palette: Color[];
1426
- };
1427
- faces: {
1428
- confidence: number;
1429
- x: number;
1430
- y: number;
1431
- height: number;
1432
- width: number;
1433
- }[];
1434
- previewImage: string;
1435
- };
1436
- archive?: {
1437
- _id: string;
1438
- url: string;
1439
- };
1440
- model3d?: {
1441
- _id: string;
1442
- url: string;
1443
- thumbnail: string;
1444
- };
1445
- };
1446
- operationStatus: OperationStatus;
1447
- labels: string[];
1448
- siteId: string;
1449
- state: State;
1450
- }[];
1451
- }
1452
- export declare const onFileDescriptorUpdated: EventDefinition<DomainUpdatedEvent<FileDescriptor>, "wix.media.site_media.v1.file_descriptor_updated">;
1453
- export declare const onFileDescriptorDeleted: EventDefinition<DomainDeletedEvent<FileDescriptor>, "wix.media.site_media.v1.file_descriptor_deleted">;
1454
- export declare const onFileDescriptorFileReady: EventDefinition<DomainActionEvent<FileReady>, "wix.media.site_media.v1.file_descriptor_file_ready">;
1455
- export declare const onFileDescriptorFileFailed: EventDefinition<DomainActionEvent<FileFailed>, "wix.media.site_media.v1.file_descriptor_file_failed">;
1456
- /**
1457
- * Generates a URL for downloading a compressed file containing specific files in the Media Manager.
1458
- *
1459
- * The `generateFilesDownloadUrl()` function returns a Promise that resolves to a download URL.
1460
- *
1461
- * The compressed file can contain up to 1000 files.
1462
- *
1463
- * To generate one or more temporary URLs for downloading a specific file in the Media Manager, use the `generateFileDownloadUrl()` function.
1464
- * You can use the `expirationInMinutes` parameter to set the URL expiration time, making it more secure than the `generateFilesDownloadUrl()` function.
1465
- * Therefore, to download private files, use the `generateFileDownloadUrl` function for each private file that you want to generate a download URL for.
1466
- * @param fileIds - IDs of the files to download.
1467
- * @public
1468
- * @requiredField fileIds
1469
- * @permissionScope Manage Bookings Services and Settings
1470
- * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
1471
- * @permissionScope Manage Media Manager
1472
- * @permissionScopeId SCOPE.DC-MEDIA.MANAGE-MEDIAMANAGER
1473
- * @applicableIdentity APP
1474
- */
1475
- export declare function generateFilesDownloadUrl(fileIds: string[]): Promise<GenerateFilesDownloadUrlResponse & GenerateFilesDownloadUrlResponseNonNullableFields>;
1476
- /**
1477
- * Generates one or more temporary URLs for downloading a specific file in the Media Manager.
1478
- *
1479
- * The `generateFileDownloadUrl()` function returns a Promise that resolves to an array containing download URLs for the assets specified in the options parameter.
1480
- *
1481
- * To download different assets of the file, use the `assetKeys` parameter which generates a download URL for each asset.
1482
- * If no asset key is specified, it defaults to `src`, which generates one download URL in the original file's format and quality.
1483
- *
1484
- * Use this function to grant external clients access to a private media file. Use the `expirationInMinutes` parameter to set the URL expiration time, and the `expirationRedirectUrl` parameter to add a redirect URL when the URL expires.
1485
- *
1486
- * To generate a permanent URL for downloading a compressed file that contains multiple files in the Media Manager, use the `generateFilesDownloadUrl()` function.
1487
- * Since this is a permanent URL, it is less secure. Therefore, to download private files, use the `generateFileDownloadUrl()` function for each private file that you want to generate a download URL for.
1488
- * @param fileId - File ID.
1489
- * @public
1490
- * @requiredField fileId
1491
- * @param options - Options to use when generating a file's download URL.
1492
- * @permissionScope Manage Bookings Services and Settings
1493
- * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
1494
- * @permissionScope Manage Media Manager
1495
- * @permissionScopeId SCOPE.DC-MEDIA.MANAGE-MEDIAMANAGER
1496
- * @applicableIdentity APP
1497
- */
1498
- export declare function generateFileDownloadUrl(fileId: string, options?: GenerateFileDownloadUrlOptions): Promise<GenerateFileDownloadUrlResponse & GenerateFileDownloadUrlResponseNonNullableFields>;
1499
- export interface GenerateFileDownloadUrlOptions {
1500
- /**
1501
- * Temporary file name used to identify the file type. For example, a file named "myFile.jpeg" identifies as an "image/jpeg" file type. <br />
1502
- *
1503
- * **Note:** The name that appears in the Media Manager is taken from the `filename` query parameter in the upload request.
1504
- */
1505
- downloadFileName?: string | null;
1506
- /**
1507
- * The time that it takes in minutes for the download URL to expire. <br />
1508
- * Default: `600`. <br />
1509
- * Limit: `525600` (1 year).
1510
- */
1511
- expirationInMinutes?: number | null;
1512
- /**
1513
- * The redirect URL for when the temporary download URL with a token expires. <br />
1514
- * Default: A 403 Forbidden response page.
1515
- */
1516
- expirationRedirectUrl?: string | null;
1517
- /**
1518
- * Keys for downloading different assets (format and quality) of a file.
1519
- * Default: `src`, key representing the original file's format and quality.
1520
- */
1521
- assetKeys?: string[] | null;
1522
- /**
1523
- * Whether the link downloads the file or opens the file in the browser.
1524
- *
1525
- * - `ATTACHMENT`: The link downloads the file.
1526
- * - `INLINE`: The link opens the file in the browser.
1527
- *
1528
- * Default: `ATTACHMENT`
1529
- */
1530
- contentDisposition?: ContentDisposition;
1531
- }
1532
- /**
1533
- * Gets information about the specified file in the Media Manager.
1534
- *
1535
- *
1536
- * The `getFileDescriptor()` function returns a Promise that resolves to the specified file's descriptor.
1537
- *
1538
- * Use `getFileDescriptors()` to get multiple file descriptors at once.
1539
- * @param fileId - File ID.
1540
- * @public
1541
- * @requiredField fileId
1542
- * @permissionScope Manage Bookings Services and Settings
1543
- * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
1544
- * @permissionScope Read Media Manager
1545
- * @permissionScopeId SCOPE.DC-MEDIA.READ-MEDIAMANAGER
1546
- * @permissionScope Manage Media Manager
1547
- * @permissionScopeId SCOPE.DC-MEDIA.MANAGE-MEDIAMANAGER
1548
- * @applicableIdentity APP
1549
- * @returns Information about the file.
1550
- */
1551
- export declare function getFileDescriptor(fileId: string): Promise<FileDescriptor & NonNullable<GetFileDescriptorResponseNonNullableFields>['file']>;
1552
- /**
1553
- * Gets information about the specified files in the Media Manager.
1554
- *
1555
- *
1556
- * The `getFileDescriptors()` function returns a Promise that resolves to an array containing the specified files' descriptors.
1557
- *
1558
- * Use `getFileDescriptor()` to get a single file descriptor.
1559
- * @param fileIds - File IDs.
1560
- * @public
1561
- * @requiredField fileIds
1562
- * @permissionScope Manage Bookings Services and Settings
1563
- * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
1564
- * @permissionScope Read Media Manager
1565
- * @permissionScopeId SCOPE.DC-MEDIA.READ-MEDIAMANAGER
1566
- * @permissionScope Manage Media Manager
1567
- * @permissionScopeId SCOPE.DC-MEDIA.MANAGE-MEDIAMANAGER
1568
- * @applicableIdentity APP
1569
- */
1570
- export declare function getFileDescriptors(fileIds: string[]): Promise<GetFileDescriptorsResponse & GetFileDescriptorsResponseNonNullableFields>;
1571
- /**
1572
- * Updates a file.
1573
- *
1574
- *
1575
- * The `updateFileDescriptor()` function returns a Promise that resolves to the updated file's descriptor.
1576
- *
1577
- * You can use the `parentFolderId` parameter to move a file from its current folder to a different folder.
1578
- * @param _id - File ID. Generated when a file is uploaded to the Media Manager.
1579
- * @public
1580
- * @requiredField _id
1581
- * @requiredField file
1582
- * @permissionScope Manage Bookings Services and Settings
1583
- * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
1584
- * @permissionScope Manage Media Manager
1585
- * @permissionScopeId SCOPE.DC-MEDIA.MANAGE-MEDIAMANAGER
1586
- * @applicableIdentity APP
1587
- * @returns Information about the updated file.
1588
- */
1589
- export declare function updateFileDescriptor(_id: string, file: UpdateFileDescriptorFile): Promise<FileDescriptor & NonNullable<UpdateFileDescriptorResponseNonNullableFields>['file']>;
1590
- export interface UpdateFileDescriptorFile {
1591
- /**
1592
- * File ID. Generated when a file is uploaded to the Media Manager.
1593
- * @readonly
1594
- */
1595
- _id?: string;
1596
- /** File name as it appears in the Media Manager. */
1597
- displayName?: string;
1598
- /**
1599
- * Static URL of the file.
1600
- * @readonly
1601
- */
1602
- url?: string;
1603
- /** ID of the file's parent folder. */
1604
- parentFolderId?: string | null;
1605
- /**
1606
- * File hash.
1607
- * @readonly
1608
- */
1609
- hash?: string;
1610
- /**
1611
- * Size of the uploaded file in bytes.
1612
- * @readonly
1613
- */
1614
- sizeInBytes?: string | null;
1615
- /**
1616
- * Whether the link to the uploaded file is public or private. Private links require a token.
1617
- * @readonly
1618
- */
1619
- private?: boolean;
1620
- /**
1621
- * Media file type.
1622
- *
1623
- * Supported values: `"IMAGE"`, `"VIDEO"`, `"AUDIO"`, `"DOCUMENT"`, `"VECTOR"`, `"ARCHIVE"`, `"MODEL3D"`
1624
- * @readonly
1625
- */
1626
- mediaType?: MediaType;
1627
- /**
1628
- * Media file content.
1629
- * @readonly
1630
- */
1631
- media?: FileMedia;
1632
- /**
1633
- * Status of the file that was uploaded.
1634
- *
1635
- * Supported values: `"FAILED"`, `"READY"`, `"PENDING"`
1636
- * * `FAILED`: The file failed to upload, for example, during media post processing.
1637
- * * `READY`: The file uploaded, finished all processing, and is ready for use.
1638
- * * `PENDING`: The file is processing and the URLs are not yet available. This response is returned when importing a file.
1639
- * @readonly
1640
- */
1641
- operationStatus?: OperationStatus;
1642
- /**
1643
- * URL where the file was uploaded from.
1644
- * @readonly
1645
- */
1646
- sourceUrl?: string | null;
1647
- /**
1648
- * URL of the file's thumbnail.
1649
- * @readonly
1650
- */
1651
- thumbnailUrl?: string | null;
1652
- /** Labels assigned to media files that describe and categorize them. Provided by the user, or generated by [Google Vision API](https://cloud.google.com/vision/docs/drag-and-drop) for images. */
1653
- labels?: string[];
1654
- /**
1655
- * Date and time the file was created.
1656
- * @readonly
1657
- */
1658
- _createdDate?: Date;
1659
- /**
1660
- * Date and time the file was updated.
1661
- * @readonly
1662
- */
1663
- _updatedDate?: Date;
1664
- /**
1665
- * The Wix site ID where the media file is stored.
1666
- * @readonly
1667
- */
1668
- siteId?: string;
1669
- /**
1670
- * State of the file.
1671
- *
1672
- * Supported values: `"OK"`, `"DELETED"`
1673
- * @readonly
1674
- */
1675
- state?: State;
1676
- }
1677
- /**
1678
- * Generates an upload URL to allow external clients to upload a file to the Media Manager.
1679
- *
1680
- * The `generateFileUploadUrl()` function returns a Promise that resolves to an upload URL.
1681
- *
1682
- * To learn how external clients can use the generated upload URL in the response to upload a file to the Media Manager, see the Upload API article.
1683
- *
1684
- * > **Note:** Any interruption in the upload process stops the file upload. For files larger than 10MB, or when network connection is poor, use `generateFileResumableUploadUrl()` instead. With the resumable upload URL, any interruption in the upload process pauses the file upload, and resumes the file upload process after the interruption.
1685
- * @param mimeType - File mime type.
1686
- * @public
1687
- * @requiredField mimeType
1688
- * @param options - Options to use when generating a file's upload URL.
1689
- * @permissionScope Manage Bookings Services and Settings
1690
- * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
1691
- * @permissionScope Manage Media Manager
1692
- * @permissionScopeId SCOPE.DC-MEDIA.MANAGE-MEDIAMANAGER
1693
- * @applicableIdentity APP
1694
- */
1695
- export declare function generateFileUploadUrl(mimeType: string | null, options?: GenerateFileUploadUrlOptions): Promise<GenerateFileUploadUrlResponse & GenerateFileUploadUrlResponseNonNullableFields>;
1696
- export interface GenerateFileUploadUrlOptions {
1697
- /**
1698
- * Temporary file name used to identify the file type. For example, a file named "myFile.jpeg" identifies as an "image/jpeg" file type.
1699
- * <br /> **Note:** The name that appears in the Media Manager is taken from the `filename` query parameter in the upload request.
1700
- */
1701
- fileName?: string | null;
1702
- /**
1703
- * File size in bytes.
1704
- * @readonly
1705
- */
1706
- sizeInBytes?: string | null;
1707
- /**
1708
- * ID of the file's parent folder. <br />
1709
- * Default: `media-root`.
1710
- */
1711
- parentFolderId?: string | null;
1712
- /** Whether the link to the uploaded file is public or private. See `Private Files` in terminology. */
1713
- private?: boolean | null;
1714
- /** Labels assigned to media files that describe and categorize them. Provided by the user, or generated by [Google Vision API](https://cloud.google.com/vision/docs/drag-and-drop) for images. */
1715
- labels?: string[] | null;
1716
- /** A place to map an external entity to an uploaded file in the Wix Media Manager. */
1717
- externalInfo?: ExternalInfo;
1718
- }
1719
- /**
1720
- * Generates a resumable upload URL to allow external clients to upload large files over 10MB to the Media Manager.
1721
- *
1722
- * The `generateFileResumableUploadUrl()` function returns a Promise that resolves to an upload URL, token, and protocol.
1723
- *
1724
- * When using the resumable upload URL, any interruptions will pause the file upload process, which automatically resumes once the interruption is resolved. The resumable upload URL is also helpful when network connection is poor.
1725
- *
1726
- * To learn how external clients can use the generated upload URL in the response to upload large files to the Media Manager, see the Resumable Upload API article.
1727
- * @param mimeType - File mime type.
1728
- * @public
1729
- * @requiredField mimeType
1730
- * @param options - Options to use when generating a resumable upload URL.
1731
- * @permissionScope Manage Bookings Services and Settings
1732
- * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
1733
- * @permissionScope Manage Media Manager
1734
- * @permissionScopeId SCOPE.DC-MEDIA.MANAGE-MEDIAMANAGER
1735
- * @applicableIdentity APP
1736
- */
1737
- export declare function generateFileResumableUploadUrl(mimeType: string | null, options?: GenerateFileResumableUploadUrlOptions): Promise<GenerateFileResumableUploadUrlResponse & GenerateFileResumableUploadUrlResponseNonNullableFields>;
1738
- export interface GenerateFileResumableUploadUrlOptions {
1739
- /**
1740
- * Temporary file name used to identify the file type. For example, a file named "myFile.jpeg" identifies as an "image/jpeg" file type.
1741
- * <br /> **Note:** The name that appears in the Media Manager is taken from the `filename` query parameter in the upload request.
1742
- */
1743
- fileName?: string | null;
1744
- /**
1745
- * File size in bytes.
1746
- * @readonly
1747
- */
1748
- sizeInBytes?: string | null;
1749
- /**
1750
- * ID of the file's parent folder. <br />
1751
- * Default: `media-root`.
1752
- */
1753
- parentFolderId?: string | null;
1754
- /** Whether the link to the imported file is public or private. See `Private Files` in terminology. */
1755
- private?: boolean | null;
1756
- /** Labels assigned to media files that describe and categorize them. Provided by the user, or generated by [Google Vision API](https://cloud.google.com/vision/docs/drag-and-drop) for images. */
1757
- labels?: string[] | null;
1758
- /**
1759
- * The upload protocol to use for implementing the resumable upload.
1760
- *
1761
- * Supported values: `"TUS"`
1762
- */
1763
- uploadProtocol?: UploadProtocol;
1764
- }
1765
- /**
1766
- * Imports a file to the Media Manager using an external URL.
1767
- *
1768
- * The `importFile()` function returns a Promise that resolves to the imported file's descriptor.
1769
- *
1770
- * This function returns information about the imported file. Importing a file is the method through which you can add files to the Media Manager.
1771
- * Use the `parentFolderId` parameter to specify which folder you want the file to be imported to.
1772
- * If no folder is specified, the file is imported to the `media-root` folder.
1773
- *
1774
- * To import a file, you need to do one of the following:
1775
- * - Pass 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'`.
1776
- * - 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`.
1777
- * - Ensure the server hosting the file supports HEAD requests. In these cases the Wix servers can retrieve the MIME type from the hosting server.
1778
- * > **Note:** If you want to validate the media type, pass the file's expected media type in the optional `mediaType` field of the request. For example, `mediaType: 'IMAGE'`.
1779
- * @param url - Publicly accessible external file URL.
1780
- * @public
1781
- * @requiredField url
1782
- * @param options - Options to use when importing a single file.
1783
- * @permissionScope Manage Bookings Services and Settings
1784
- * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
1785
- * @permissionScope Manage Media Manager
1786
- * @permissionScopeId SCOPE.DC-MEDIA.MANAGE-MEDIAMANAGER
1787
- * @applicableIdentity APP
1788
- */
1789
- export declare function importFile(url: string, options?: ImportFileOptions): Promise<ImportFileResponse & ImportFileResponseNonNullableFields>;
1790
- export interface ImportFileOptions {
1791
- /**
1792
- * Media type of the file to import.
1793
- *
1794
- * Supported values: `"IMAGE"`, `"VIDEO"`, `"AUDIO"`, `"DOCUMENT"`, `"VECTOR"`, `"ARCHIVE"`, `"MODEL3D"`
1795
- */
1796
- mediaType?: MediaType;
1797
- /** File name that appears in the Media Manager. */
1798
- displayName?: string | null;
1799
- /**
1800
- * ID of the file's parent folder. <br />
1801
- * Default: `media-root`.
1802
- */
1803
- parentFolderId?: string | null;
1804
- /** Whether the link to the imported file is public or private. */
1805
- private?: boolean | null;
1806
- /** Labels assigned to media files that describe and categorize them. Provided by the user, or generated by [Google Vision API](https://cloud.google.com/vision/docs/drag-and-drop) for images. */
1807
- labels?: string[] | null;
1808
- /** File mime type. */
1809
- mimeType?: string;
1810
- /** A place to map an external entity to an imported file in the Wix Media Manager. */
1811
- externalInfo?: ExternalInfo;
1812
- /** Optional parameters that should be sent with the external URL. */
1813
- urlParams?: Record<string, any> | null;
1814
- /** Optional headers that should be sent with the external URL. */
1815
- urlHeaders?: Record<string, any> | null;
1816
- }
1817
- /**
1818
- * > **Deprecated.**
1819
- * > This function has been replaced with `bulkImportFile()`, and will be removed on March 31, 2024.
1820
- *
1821
- *
1822
- * The `bulkImportFiles()` function returns a Promise that resolves to an array of the imported files' descriptors.
1823
- *
1824
- * Imports a bulk of files to the Media Manager using external urls.
1825
- *
1826
- * Returns information about the imported files. Use the `parentFolderId` parameter to specify in which folder you want each file to be imported.
1827
- * If no folder is specified, the file is imported to the `media-root` folder.
1828
- *
1829
- * >**Note:** The `media` property isn't returned in the `files` response object.
1830
- *
1831
- * To import files, you need to do one of the following for each file:
1832
- * - Pass 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'`.
1833
- * - 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`.
1834
- * - Ensure the server hosting the file supports HEAD requests. In these cases the Wix servers can retrieve the MIME type from the hosting server.
1835
- * > **Note:** If you want to validate the media type, pass the file's expected media type in the optional `mediaType` field of the request. For example, `mediaType: 'IMAGE'`.
1836
- * @param importFileRequests - Information about the files to import.
1837
- * @public
1838
- * @requiredField importFileRequests
1839
- * @requiredField importFileRequests.url
1840
- * @param options - Options to use when uploading multiple files.
1841
- * @permissionScope Manage Bookings Services and Settings
1842
- * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
1843
- * @permissionScope Manage Media Manager
1844
- * @permissionScopeId SCOPE.DC-MEDIA.MANAGE-MEDIAMANAGER
1845
- * @applicableIdentity APP
1846
- */
1847
- export declare function bulkImportFiles(importFileRequests: ImportFileRequest[]): Promise<BulkImportFilesResponse & BulkImportFilesResponseNonNullableFields>;
1848
- /**
1849
- * Imports a bulk of files to the Media Manager using external urls.
1850
- *
1851
- * The `bulkImportFile()` function returns a Promise that resolves to an object containing bulk import metadata and an array of imported files' descriptors and metadata.
1852
- *
1853
- * Returns information about the imported files. Use the `parentFolderId` parameter to specify in which folder you want each file to be imported.
1854
- * If no folder is specified, the file is imported to the `media-root` folder.
1855
- *
1856
- * To import files, you need to do one of the following for each file:
1857
- * - Pass 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'`.
1858
- * - 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`.
1859
- * - Ensure the server hosting the file supports HEAD requests. In these cases the Wix servers can retrieve the MIME type from the hosting server.
1860
- * > **Note:** If you want to validate the media type, pass the file's expected media type in the optional `mediaType` field of the request. For example, `mediaType: 'IMAGE'`.
1861
- * @param importFileRequests - Information about the files to import.
1862
- * @public
1863
- * @requiredField importFileRequests
1864
- * @requiredField importFileRequests.url
1865
- * @param options - Options to include the file descriptor in the response.
1866
- * @permissionScope Manage Bookings Services and Settings
1867
- * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
1868
- * @permissionScope Manage Media Manager
1869
- * @permissionScopeId SCOPE.DC-MEDIA.MANAGE-MEDIAMANAGER
1870
- * @applicableIdentity APP
1871
- */
1872
- export declare function bulkImportFile(importFileRequests: ImportFileRequest[], options?: BulkImportFileOptions): Promise<BulkImportFileResponse & BulkImportFileResponseNonNullableFields>;
1873
- export interface BulkImportFileOptions {
1874
- /**
1875
- * Whether to include the imported File Descriptor in the response. Set to `false` to exclude the File Descriptor from the returned object.
1876
- *
1877
- * Default: `true`
1878
- */
1879
- returnEntity?: boolean | null;
1880
- }
1881
- /**
1882
- * Retrieves a list of files in the Media Manager.
1883
- *
1884
- * The `listFiles()` function returns a Promise that resolves to an array of the specified files' descriptors and cursor information.
1885
- *
1886
- * To retrieve a list of files within a specific folder in the Media Manager, pass the folder's ID in the `parentFolderId` parameter. If no folder is specified, the function retrieves only the list of files in the root folder of the Media Manager.
1887
- *
1888
- * To retrieve a list of (non-permanently) deleted files, use the `listDeletedFiles()` function.
1889
- * @public
1890
- * @param options - Options to use when listing media files.
1891
- * @permissionScope Manage Bookings Services and Settings
1892
- * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
1893
- * @permissionScope Read Media Manager
1894
- * @permissionScopeId SCOPE.DC-MEDIA.READ-MEDIAMANAGER
1895
- * @permissionScope Manage Media Manager
1896
- * @permissionScopeId SCOPE.DC-MEDIA.MANAGE-MEDIAMANAGER
1897
- * @applicableIdentity APP
1898
- */
1899
- export declare function listFiles(options?: ListFilesOptions): Promise<ListFilesResponse & ListFilesResponseNonNullableFields>;
1900
- export interface ListFilesOptions {
1901
- /**
1902
- * ID of the file's parent folder. <br />
1903
- * Default:`media-root`.
1904
- */
1905
- parentFolderId?: string | null;
1906
- /**
1907
- * Media file type.
1908
- *
1909
- * Supported values: `"IMAGE"`, `"VIDEO"`, `"AUDIO"`, `"DOCUMENT"`, `"VECTOR"`, `"ARCHIVE"`, `"MODEL3D"`
1910
- */
1911
- mediaTypes?: MediaType[];
1912
- /** Whether the link to the imported file is public or private. */
1913
- private?: boolean | null;
1914
- /**
1915
- * Field name and order to sort by. One of:
1916
- *
1917
- * - `displayName`
1918
- * - `_updatedDate`
1919
- * - `sizeInBytes`
1920
- *
1921
- * Default: `_updatedDate` in `"DESC"` order.
1922
- */
1923
- sort?: Sorting;
1924
- /** Cursor and paging information. */
1925
- paging?: CursorPaging;
1926
- }
1927
- /**
1928
- * Searches all folders in the Media Manager and returns a list of files that match the terms specified in the optional parameters.
1929
- *
1930
- * The `searchFiles()` function returns a Promise that resolves to an array of the specified files' descriptors and cursor information.
1931
- *
1932
- * If no parameters are specified, the function returns all files in the `MEDIA_ROOT` folder.
1933
- * @public
1934
- * @param options - Options to specify which folders to search.
1935
- * @permissionScope Manage Bookings Services and Settings
1936
- * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
1937
- * @permissionScope Read Media Manager
1938
- * @permissionScopeId SCOPE.DC-MEDIA.READ-MEDIAMANAGER
1939
- * @permissionScope Manage Media Manager
1940
- * @permissionScopeId SCOPE.DC-MEDIA.MANAGE-MEDIAMANAGER
1941
- * @applicableIdentity APP
1942
- */
1943
- export declare function searchFiles(options?: SearchFilesOptions): Promise<SearchFilesResponse & SearchFilesResponseNonNullableFields>;
1944
- export interface SearchFilesOptions {
1945
- /**
1946
- * Term to search for. Possible terms include the value of a file's
1947
- * `displayName`, `mimeType`, and `label`. <br />
1948
- * For example, if a file's label is cat, the search term is 'cat'.
1949
- */
1950
- search?: string | null;
1951
- /**
1952
- * A root folder in the media manager to search in. <br />
1953
- *
1954
- * Supported values: `"MEDIA_ROOT"`, `"TRASH_ROOT"`, `"VISITOR_UPLOADS_ROOT"`
1955
- *
1956
- * Default: `MEDIA_ROOT`.
1957
- */
1958
- rootFolder?: RootFolder;
1959
- /**
1960
- * Media file type.
1961
- *
1962
- * Supported values: `"IMAGE"`, `"VIDEO"`, `"AUDIO"`, `"DOCUMENT"`, `"VECTOR"`, `"ARCHIVE"`, `"MODEL3D"`
1963
- */
1964
- mediaTypes?: MediaType[];
1965
- /**
1966
- * Whether the link to the imported file is public or private.
1967
- *
1968
- * Default: `false`.
1969
- */
1970
- private?: boolean | null;
1971
- /**
1972
- * Field name and order to sort by. One of:
1973
- *
1974
- * - `displayName`
1975
- * - `_updatedDate`
1976
- * - `sizeInBytes`
1977
- *
1978
- * Default: `_updatedDate` in `"DESC"` order.
1979
- */
1980
- sort?: Sorting;
1981
- /** Cursor and paging information. */
1982
- paging?: CursorPaging;
1983
- }
1984
- /**
1985
- * Generates a URL for streaming a specific video file in the Media Manager.
1986
- *
1987
- *
1988
- * The `generateVideoStreamingUrl()` function returns a Promise that resolves to a download URL and its asset key.
1989
- *
1990
- * To stream different assets of the file, use the `assetKeys` parameter which generates a video streaming URL for each asset. If no asset key is specified, it defaults to `src`, which generates one video streaming URL in the original file's format and quality.
1991
- * @param fileId - File ID.
1992
- * @public
1993
- * @requiredField fileId
1994
- * @param options - Options to use when generating a video file's streaming URL.
1995
- * @permissionScope Manage Bookings Services and Settings
1996
- * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
1997
- * @permissionScope Read Media Manager
1998
- * @permissionScopeId SCOPE.DC-MEDIA.READ-MEDIAMANAGER
1999
- * @permissionScope Manage Media Manager
2000
- * @permissionScopeId SCOPE.DC-MEDIA.MANAGE-MEDIAMANAGER
2001
- * @applicableIdentity APP
2002
- */
2003
- export declare function generateVideoStreamingUrl(fileId: string, options?: GenerateVideoStreamingUrlOptions): Promise<GenerateVideoStreamingUrlResponse & GenerateVideoStreamingUrlResponseNonNullableFields>;
2004
- export interface GenerateVideoStreamingUrlOptions {
2005
- /**
2006
- * Video stream format.
2007
- *
2008
- * Supported values: `"UNKNOWN"`, `"HLS"`, `"DASH"`
2009
- *
2010
- *
2011
- */
2012
- format?: StreamFormat;
2013
- }
2014
- /**
2015
- * Deletes the specified files from the Media Manager.
2016
- *
2017
- *
2018
- * The `bulkDeleteFiles()` function returns a Promise that resolves when the files are deleted.
2019
- *
2020
- * The deleted files are moved to the Media Manager's trash bin (`TRASH_ROOT` folder) unless permanently deleted. To permanently delete files, pass the `permanent` parameter with the value `true`. Permanently deleting files isn't reversible, so make sure that these files aren't being used in a site or in any other way as the files will no longer be accessible.
2021
- *
2022
- * >**Notes:**
2023
- * > - The specified files can be from different folders.
2024
- * > - Moving multiple files at once is an asynchronous action, and may take time for the changes to appear in the Media Manager.
2025
- * > - Attempting to delete files that are already in the trash bin doesn't result in an error.
2026
- * > - If your site contains deleted media files, the deleted media files still appear on your site as the files are still in the Media Manager (in the trash bin).
2027
- * > - You can use `bulkRestoreFilesFromTrashBin()` to restore files from the Media Manager's trash bin.
2028
- * @param fileIds - IDs of the files to move to the Media Manager's trash bin.
2029
- * @public
2030
- * @requiredField fileIds
2031
- * @param options - Options to use when deleting files.
2032
- * @permissionScope Manage Bookings Services and Settings
2033
- * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
2034
- * @permissionScope Manage Media Manager
2035
- * @permissionScopeId SCOPE.DC-MEDIA.MANAGE-MEDIAMANAGER
2036
- * @applicableIdentity APP
2037
- */
2038
- export declare function bulkDeleteFiles(fileIds: string[], options?: BulkDeleteFilesOptions): Promise<void>;
2039
- export interface BulkDeleteFilesOptions {
2040
- /**
2041
- * Whether the specified files are permanently deleted. <br />
2042
- * Default: `false`
2043
- */
2044
- permanent?: boolean;
2045
- }
2046
- /**
2047
- * Restores the specified files from the Media Manager's trash bin, and moves them to their original locations in the Media Manager.
2048
- *
2049
- * The `bulkRestoreFilesFromTrashBin()` function returns a Promise that resolves when the files have been restored.
2050
- * @param fileIds - IDs of the files to restore from the Media Manager's trash bin.
2051
- * @public
2052
- * @requiredField fileIds
2053
- * @permissionScope Manage Bookings Services and Settings
2054
- * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
2055
- * @permissionScope Manage Media Manager
2056
- * @permissionScopeId SCOPE.DC-MEDIA.MANAGE-MEDIAMANAGER
2057
- * @applicableIdentity APP
2058
- */
2059
- export declare function bulkRestoreFilesFromTrashBin(fileIds: string[]): Promise<void>;
2060
- /**
2061
- * Retrieves a list of files in the Media Manager's trash bin.
2062
- *
2063
- * The `listDeletedFiles()` function returns a Promise that resolves to an array of the specified deleted files' descriptors and cursor information.
2064
- *
2065
- * >**Note:** The Media Manager's trash bin (`TRASH_ROOT` folder) only contains temporarily deleted files, not permanently deleted files.
2066
- *
2067
- * To retrieve a list of non-deleted files, use the `listFiles()` function.
2068
- * @public
2069
- * @param options - Options to use when listing deleted files from the trash bin.
2070
- * @permissionScope Manage Bookings Services and Settings
2071
- * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
2072
- * @permissionScope Read Media Manager
2073
- * @permissionScopeId SCOPE.DC-MEDIA.READ-MEDIAMANAGER
2074
- * @permissionScope Manage Media Manager
2075
- * @permissionScopeId SCOPE.DC-MEDIA.MANAGE-MEDIAMANAGER
2076
- * @applicableIdentity APP
2077
- */
2078
- export declare function listDeletedFiles(options?: ListDeletedFilesOptions): Promise<ListDeletedFilesResponse & ListDeletedFilesResponseNonNullableFields>;
2079
- export interface ListDeletedFilesOptions {
2080
- /**
2081
- * ID of the file's parent folder. <br />
2082
- * Default: `media-root`.
2083
- */
2084
- parentFolderId?: string | null;
2085
- /**
2086
- * Media file type.
2087
- *
2088
- * Supported values: `"IMAGE"`, `"VIDEO"`, `"AUDIO"`, `"DOCUMENT"`, `"VECTOR"`, `"ARCHIVE"`, `"MODEL3D"`
2089
- */
2090
- mediaTypes?: MediaType[];
2091
- /** Whether the link to the imported file is public or private. */
2092
- private?: boolean | null;
2093
- /**
2094
- * Field name and order to sort by. One of:
2095
- *
2096
- * - `displayName`
2097
- * - `_updatedDate`
2098
- * - `sizeInBytes`
2099
- *
2100
- * Default: `_updatedDate` in `"DESC"` order.
2101
- */
2102
- sort?: Sorting;
2103
- /** Cursor and paging information. */
2104
- paging?: CursorPaging;
2105
- }