@wix/auto_sdk_media_files 1.0.18 → 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.
- package/build/cjs/index.d.ts +295 -1
- package/build/cjs/index.js +2264 -15
- package/build/cjs/index.js.map +1 -1
- 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
- package/build/cjs/meta.d.ts +1052 -1
- package/build/cjs/meta.js +1326 -15
- package/build/cjs/meta.js.map +1 -1
- package/build/{cjs/src/media-site-media-v1-file-descriptor-files.public.d.ts → es/index.d.mts} +63 -26
- package/build/es/index.mjs +2212 -0
- package/build/es/index.mjs.map +1 -0
- 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
- package/build/es/meta.d.mts +1052 -0
- package/build/es/meta.mjs +1287 -0
- package/build/es/meta.mjs.map +1 -0
- package/build/internal/cjs/index.d.ts +295 -1
- package/build/internal/cjs/index.js +2264 -15
- package/build/internal/cjs/index.js.map +1 -1
- 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
- package/build/internal/cjs/meta.d.ts +1052 -1
- package/build/internal/cjs/meta.js +1326 -15
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/{es/src/media-site-media-v1-file-descriptor-files.public.d.ts → internal/es/index.d.mts} +63 -26
- package/build/internal/es/index.mjs +2212 -0
- package/build/internal/es/index.mjs.map +1 -0
- 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
- package/build/internal/es/meta.d.mts +1052 -0
- package/build/internal/es/meta.mjs +1287 -0
- package/build/internal/es/meta.mjs.map +1 -0
- package/package.json +9 -8
- package/build/cjs/index.typings.d.ts +0 -1
- package/build/cjs/index.typings.js +0 -18
- package/build/cjs/index.typings.js.map +0 -1
- package/build/cjs/src/media-site-media-v1-file-descriptor-files.context.d.ts +0 -45
- package/build/cjs/src/media-site-media-v1-file-descriptor-files.context.js +0 -60
- package/build/cjs/src/media-site-media-v1-file-descriptor-files.context.js.map +0 -1
- package/build/cjs/src/media-site-media-v1-file-descriptor-files.http.d.ts +0 -148
- package/build/cjs/src/media-site-media-v1-file-descriptor-files.http.js +0 -1118
- package/build/cjs/src/media-site-media-v1-file-descriptor-files.http.js.map +0 -1
- package/build/cjs/src/media-site-media-v1-file-descriptor-files.meta.d.ts +0 -28
- package/build/cjs/src/media-site-media-v1-file-descriptor-files.meta.js +0 -332
- package/build/cjs/src/media-site-media-v1-file-descriptor-files.meta.js.map +0 -1
- package/build/cjs/src/media-site-media-v1-file-descriptor-files.public.js +0 -265
- package/build/cjs/src/media-site-media-v1-file-descriptor-files.public.js.map +0 -1
- package/build/cjs/src/media-site-media-v1-file-descriptor-files.types.js +0 -119
- package/build/cjs/src/media-site-media-v1-file-descriptor-files.types.js.map +0 -1
- package/build/cjs/src/media-site-media-v1-file-descriptor-files.universal.d.ts +0 -2526
- package/build/cjs/src/media-site-media-v1-file-descriptor-files.universal.js +0 -1483
- package/build/cjs/src/media-site-media-v1-file-descriptor-files.universal.js.map +0 -1
- package/build/es/index.d.ts +0 -1
- package/build/es/index.js +0 -2
- package/build/es/index.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -1
- package/build/es/index.typings.js +0 -2
- package/build/es/index.typings.js.map +0 -1
- package/build/es/meta.d.ts +0 -1
- package/build/es/meta.js +0 -2
- package/build/es/meta.js.map +0 -1
- package/build/es/src/media-site-media-v1-file-descriptor-files.context.d.ts +0 -45
- package/build/es/src/media-site-media-v1-file-descriptor-files.context.js +0 -45
- package/build/es/src/media-site-media-v1-file-descriptor-files.context.js.map +0 -1
- package/build/es/src/media-site-media-v1-file-descriptor-files.http.d.ts +0 -148
- package/build/es/src/media-site-media-v1-file-descriptor-files.http.js +0 -1099
- package/build/es/src/media-site-media-v1-file-descriptor-files.http.js.map +0 -1
- package/build/es/src/media-site-media-v1-file-descriptor-files.meta.d.ts +0 -28
- package/build/es/src/media-site-media-v1-file-descriptor-files.meta.js +0 -290
- package/build/es/src/media-site-media-v1-file-descriptor-files.meta.js.map +0 -1
- package/build/es/src/media-site-media-v1-file-descriptor-files.public.js +0 -234
- package/build/es/src/media-site-media-v1-file-descriptor-files.public.js.map +0 -1
- package/build/es/src/media-site-media-v1-file-descriptor-files.types.js +0 -116
- package/build/es/src/media-site-media-v1-file-descriptor-files.types.js.map +0 -1
- package/build/es/src/media-site-media-v1-file-descriptor-files.universal.d.ts +0 -2526
- package/build/es/src/media-site-media-v1-file-descriptor-files.universal.js +0 -1441
- package/build/es/src/media-site-media-v1-file-descriptor-files.universal.js.map +0 -1
- package/build/internal/cjs/index.typings.d.ts +0 -1
- package/build/internal/cjs/index.typings.js +0 -18
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/src/media-site-media-v1-file-descriptor-files.context.d.ts +0 -45
- package/build/internal/cjs/src/media-site-media-v1-file-descriptor-files.context.js +0 -60
- package/build/internal/cjs/src/media-site-media-v1-file-descriptor-files.context.js.map +0 -1
- package/build/internal/cjs/src/media-site-media-v1-file-descriptor-files.http.d.ts +0 -148
- package/build/internal/cjs/src/media-site-media-v1-file-descriptor-files.http.js +0 -1118
- package/build/internal/cjs/src/media-site-media-v1-file-descriptor-files.http.js.map +0 -1
- package/build/internal/cjs/src/media-site-media-v1-file-descriptor-files.meta.d.ts +0 -28
- package/build/internal/cjs/src/media-site-media-v1-file-descriptor-files.meta.js +0 -332
- package/build/internal/cjs/src/media-site-media-v1-file-descriptor-files.meta.js.map +0 -1
- package/build/internal/cjs/src/media-site-media-v1-file-descriptor-files.public.d.ts +0 -258
- package/build/internal/cjs/src/media-site-media-v1-file-descriptor-files.public.js +0 -265
- package/build/internal/cjs/src/media-site-media-v1-file-descriptor-files.public.js.map +0 -1
- package/build/internal/cjs/src/media-site-media-v1-file-descriptor-files.types.js +0 -119
- package/build/internal/cjs/src/media-site-media-v1-file-descriptor-files.types.js.map +0 -1
- package/build/internal/cjs/src/media-site-media-v1-file-descriptor-files.universal.d.ts +0 -2526
- package/build/internal/cjs/src/media-site-media-v1-file-descriptor-files.universal.js +0 -1483
- package/build/internal/cjs/src/media-site-media-v1-file-descriptor-files.universal.js.map +0 -1
- package/build/internal/es/index.d.ts +0 -1
- package/build/internal/es/index.js +0 -2
- package/build/internal/es/index.js.map +0 -1
- package/build/internal/es/index.typings.d.ts +0 -1
- package/build/internal/es/index.typings.js +0 -2
- package/build/internal/es/index.typings.js.map +0 -1
- package/build/internal/es/meta.d.ts +0 -1
- package/build/internal/es/meta.js +0 -2
- package/build/internal/es/meta.js.map +0 -1
- package/build/internal/es/src/media-site-media-v1-file-descriptor-files.context.d.ts +0 -45
- package/build/internal/es/src/media-site-media-v1-file-descriptor-files.context.js +0 -45
- package/build/internal/es/src/media-site-media-v1-file-descriptor-files.context.js.map +0 -1
- package/build/internal/es/src/media-site-media-v1-file-descriptor-files.http.d.ts +0 -148
- package/build/internal/es/src/media-site-media-v1-file-descriptor-files.http.js +0 -1099
- package/build/internal/es/src/media-site-media-v1-file-descriptor-files.http.js.map +0 -1
- package/build/internal/es/src/media-site-media-v1-file-descriptor-files.meta.d.ts +0 -28
- package/build/internal/es/src/media-site-media-v1-file-descriptor-files.meta.js +0 -290
- package/build/internal/es/src/media-site-media-v1-file-descriptor-files.meta.js.map +0 -1
- package/build/internal/es/src/media-site-media-v1-file-descriptor-files.public.d.ts +0 -258
- package/build/internal/es/src/media-site-media-v1-file-descriptor-files.public.js +0 -234
- package/build/internal/es/src/media-site-media-v1-file-descriptor-files.public.js.map +0 -1
- package/build/internal/es/src/media-site-media-v1-file-descriptor-files.types.js +0 -116
- package/build/internal/es/src/media-site-media-v1-file-descriptor-files.types.js.map +0 -1
- package/build/internal/es/src/media-site-media-v1-file-descriptor-files.universal.d.ts +0 -2526
- package/build/internal/es/src/media-site-media-v1-file-descriptor-files.universal.js +0 -1441
- package/build/internal/es/src/media-site-media-v1-file-descriptor-files.universal.js.map +0 -1
package/build/cjs/meta.d.ts
CHANGED
|
@@ -1 +1,1052 @@
|
|
|
1
|
-
|
|
1
|
+
import { ac as GenerateFilesDownloadUrlRequest$1, G as GenerateFilesDownloadUrlResponse$1, ad as GenerateFileDownloadUrlRequest$1, b as GenerateFileDownloadUrlResponse$1, ag as GetFileDescriptorRequest$1, ah as GetFileDescriptorResponse$1, ai as GetFileDescriptorsRequest$1, c as GetFileDescriptorsResponse$1, aj as UpdateFileDescriptorRequest$1, ak as UpdateFileDescriptorResponse$1, am as GenerateFileUploadUrlRequest$1, e as GenerateFileUploadUrlResponse$1, as as GenerateFileResumableUploadUrlRequest$1, g as GenerateFileResumableUploadUrlResponse$1, i as ImportFileRequest$1, h as ImportFileResponse$1, at as BulkImportFilesRequest$1, B as BulkImportFilesResponse$1, au as BulkImportFileRequest$1, k as BulkImportFileResponse$1, aw as ListFilesRequest$1, l as ListFilesResponse$1, aB as SearchFilesRequest$1, m as SearchFilesResponse$1, aC as GenerateVideoStreamingUrlRequest$1, o as GenerateVideoStreamingUrlResponse$1, aF as BulkDeleteFilesRequest$1, aG as BulkDeleteFilesResponse$1, aH as BulkRestoreFilesFromTrashBinRequest$1, aI as BulkRestoreFilesFromTrashBinResponse$1, aJ as ListDeletedFilesRequest$1, r as ListDeletedFilesResponse$1 } from './media-site-media-v1-file-descriptor-files.universal-C5dCrbUZ.js';
|
|
2
|
+
|
|
3
|
+
interface FileDescriptor {
|
|
4
|
+
/**
|
|
5
|
+
* File ID. Generated when a file is uploaded to the Media Manager.
|
|
6
|
+
* @readonly
|
|
7
|
+
* @maxLength 1000
|
|
8
|
+
*/
|
|
9
|
+
id?: string;
|
|
10
|
+
/**
|
|
11
|
+
* File name as it appears in the Media Manager.
|
|
12
|
+
* @maxLength 200
|
|
13
|
+
*/
|
|
14
|
+
displayName?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Static URL of the file.
|
|
17
|
+
* @readonly
|
|
18
|
+
* @format WEB_URL
|
|
19
|
+
*/
|
|
20
|
+
url?: string;
|
|
21
|
+
/**
|
|
22
|
+
* ID of the file's parent folder.
|
|
23
|
+
* @maxLength 100
|
|
24
|
+
*/
|
|
25
|
+
parentFolderId?: string | null;
|
|
26
|
+
/**
|
|
27
|
+
* File hash.
|
|
28
|
+
* @readonly
|
|
29
|
+
* @maxLength 100
|
|
30
|
+
*/
|
|
31
|
+
hash?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Size of the uploaded file in bytes.
|
|
34
|
+
* @readonly
|
|
35
|
+
* @format DECIMAL_VALUE
|
|
36
|
+
* @decimalValue options { maxScale:0 }
|
|
37
|
+
*/
|
|
38
|
+
sizeInBytes?: string | null;
|
|
39
|
+
/**
|
|
40
|
+
* 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)).
|
|
41
|
+
* @readonly
|
|
42
|
+
*/
|
|
43
|
+
private?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Media file type.
|
|
46
|
+
* @readonly
|
|
47
|
+
*/
|
|
48
|
+
mediaType?: MediaTypeWithLiterals;
|
|
49
|
+
/**
|
|
50
|
+
* Media file content.
|
|
51
|
+
* @readonly
|
|
52
|
+
*/
|
|
53
|
+
media?: FileMedia;
|
|
54
|
+
/**
|
|
55
|
+
* Status of the file that was uploaded.
|
|
56
|
+
* * `FAILED`: The file failed to upload, for example, during media post processing.
|
|
57
|
+
* * `READY`: The file uploaded, finished all processing, and is ready for use.
|
|
58
|
+
* * `PENDING`: The file is processing and the URLs are not yet available. This response is returned when importing a file.
|
|
59
|
+
* @readonly
|
|
60
|
+
*/
|
|
61
|
+
operationStatus?: OperationStatusWithLiterals;
|
|
62
|
+
/**
|
|
63
|
+
* URL where the file was uploaded from.
|
|
64
|
+
* @readonly
|
|
65
|
+
* @format WEB_URL
|
|
66
|
+
*/
|
|
67
|
+
sourceUrl?: string | null;
|
|
68
|
+
/**
|
|
69
|
+
* URL of the file's thumbnail.
|
|
70
|
+
* @readonly
|
|
71
|
+
* @format WEB_URL
|
|
72
|
+
*/
|
|
73
|
+
thumbnailUrl?: string | null;
|
|
74
|
+
/**
|
|
75
|
+
* 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.
|
|
76
|
+
* @maxSize 100
|
|
77
|
+
* @maxLength 200
|
|
78
|
+
*/
|
|
79
|
+
labels?: string[];
|
|
80
|
+
/**
|
|
81
|
+
* Date and time the file was created.
|
|
82
|
+
* @readonly
|
|
83
|
+
*/
|
|
84
|
+
createdDate?: Date | null;
|
|
85
|
+
/**
|
|
86
|
+
* Date and time the file was updated.
|
|
87
|
+
* @readonly
|
|
88
|
+
*/
|
|
89
|
+
updatedDate?: Date | null;
|
|
90
|
+
/**
|
|
91
|
+
* The Wix site ID where the media file is stored.
|
|
92
|
+
* @readonly
|
|
93
|
+
* @maxLength 100
|
|
94
|
+
*/
|
|
95
|
+
siteId?: string;
|
|
96
|
+
/**
|
|
97
|
+
* State of the file.
|
|
98
|
+
* @readonly
|
|
99
|
+
*/
|
|
100
|
+
state?: StateWithLiterals;
|
|
101
|
+
}
|
|
102
|
+
declare enum MediaType {
|
|
103
|
+
UNKNOWN = "UNKNOWN",
|
|
104
|
+
IMAGE = "IMAGE",
|
|
105
|
+
VIDEO = "VIDEO",
|
|
106
|
+
AUDIO = "AUDIO",
|
|
107
|
+
DOCUMENT = "DOCUMENT",
|
|
108
|
+
VECTOR = "VECTOR",
|
|
109
|
+
ARCHIVE = "ARCHIVE",
|
|
110
|
+
MODEL3D = "MODEL3D",
|
|
111
|
+
OTHER = "OTHER"
|
|
112
|
+
}
|
|
113
|
+
/** @enumType */
|
|
114
|
+
type MediaTypeWithLiterals = MediaType | 'UNKNOWN' | 'IMAGE' | 'VIDEO' | 'AUDIO' | 'DOCUMENT' | 'VECTOR' | 'ARCHIVE' | 'MODEL3D' | 'OTHER';
|
|
115
|
+
interface FileMedia extends FileMediaMediaOneOf {
|
|
116
|
+
/** Information about the image. */
|
|
117
|
+
image?: ImageMedia;
|
|
118
|
+
/** Information about the video. */
|
|
119
|
+
video?: VideoV2;
|
|
120
|
+
/** Information about the audio. */
|
|
121
|
+
audio?: AudioV2;
|
|
122
|
+
/** Information about the document. */
|
|
123
|
+
document?: Document;
|
|
124
|
+
/** Information about the vector. */
|
|
125
|
+
vector?: ImageMedia;
|
|
126
|
+
/** Information about the archive. */
|
|
127
|
+
archive?: Archive;
|
|
128
|
+
/** Information about the 3D Model. */
|
|
129
|
+
model3d?: Model3D;
|
|
130
|
+
}
|
|
131
|
+
/** @oneof */
|
|
132
|
+
interface FileMediaMediaOneOf {
|
|
133
|
+
/** Information about the image. */
|
|
134
|
+
image?: ImageMedia;
|
|
135
|
+
/** Information about the video. */
|
|
136
|
+
video?: VideoV2;
|
|
137
|
+
/** Information about the audio. */
|
|
138
|
+
audio?: AudioV2;
|
|
139
|
+
/** Information about the document. */
|
|
140
|
+
document?: Document;
|
|
141
|
+
/** Information about the vector. */
|
|
142
|
+
vector?: ImageMedia;
|
|
143
|
+
/** Information about the archive. */
|
|
144
|
+
archive?: Archive;
|
|
145
|
+
/** Information about the 3D Model. */
|
|
146
|
+
model3d?: Model3D;
|
|
147
|
+
}
|
|
148
|
+
interface ImageMedia {
|
|
149
|
+
/** Image data. */
|
|
150
|
+
image?: Image;
|
|
151
|
+
/** Image colors. */
|
|
152
|
+
colors?: Colors;
|
|
153
|
+
/**
|
|
154
|
+
* Information about faces in the image. Use to crop images without cutting out faces.
|
|
155
|
+
* @maxSize 100
|
|
156
|
+
*/
|
|
157
|
+
faces?: FaceRecognition[];
|
|
158
|
+
/**
|
|
159
|
+
* Information about the image preview.
|
|
160
|
+
* You can use this to display a preview for private images.
|
|
161
|
+
*/
|
|
162
|
+
previewImage?: Image;
|
|
163
|
+
/**
|
|
164
|
+
* Optional, An AI generated description of the image
|
|
165
|
+
* @readonly
|
|
166
|
+
* @maxLength 300
|
|
167
|
+
*/
|
|
168
|
+
caption?: string | null;
|
|
169
|
+
}
|
|
170
|
+
interface Image {
|
|
171
|
+
/**
|
|
172
|
+
* enum TextDetection{
|
|
173
|
+
* // No detection was made
|
|
174
|
+
* UNKNOWN_TEXT_DETECTION = 0;
|
|
175
|
+
* // The image contains text
|
|
176
|
+
* CONTAINS_TEXT = 1;
|
|
177
|
+
* // The image does not contain text
|
|
178
|
+
* NO_TEXT = 2;
|
|
179
|
+
* }
|
|
180
|
+
* enum AnimationDetection{
|
|
181
|
+
* // No detection was made
|
|
182
|
+
* UNKNOWN_ANIMATION_DETECTION = 0;
|
|
183
|
+
* // The image contains animation
|
|
184
|
+
* CONTAINS_ANIMATION = 1;
|
|
185
|
+
* // The image does not contain animation
|
|
186
|
+
* NO_ANIMATION = 2;
|
|
187
|
+
* }
|
|
188
|
+
* message ImageContent{
|
|
189
|
+
* option (.wix.api.decomposite_of) = "wix.common.ImageContent";
|
|
190
|
+
* // Text detection
|
|
191
|
+
* TextDetection text = 1;
|
|
192
|
+
* // Animation detection
|
|
193
|
+
* AnimationDetection animation = 2;
|
|
194
|
+
* }
|
|
195
|
+
* WixMedia image ID.
|
|
196
|
+
*/
|
|
197
|
+
id?: string;
|
|
198
|
+
/** Image URL. */
|
|
199
|
+
url?: string;
|
|
200
|
+
/**
|
|
201
|
+
* Original image height.
|
|
202
|
+
* @readonly
|
|
203
|
+
*/
|
|
204
|
+
height?: number;
|
|
205
|
+
/**
|
|
206
|
+
* Original image width.
|
|
207
|
+
* @readonly
|
|
208
|
+
*/
|
|
209
|
+
width?: number;
|
|
210
|
+
/** Image alt text. */
|
|
211
|
+
altText?: string | null;
|
|
212
|
+
/**
|
|
213
|
+
* Image filename.
|
|
214
|
+
* @readonly
|
|
215
|
+
*/
|
|
216
|
+
filename?: string | null;
|
|
217
|
+
}
|
|
218
|
+
interface Colors {
|
|
219
|
+
/** Main color of the image. */
|
|
220
|
+
prominent?: Color;
|
|
221
|
+
/**
|
|
222
|
+
* Color palette of the image.
|
|
223
|
+
* @maxSize 100
|
|
224
|
+
*/
|
|
225
|
+
palette?: Color[];
|
|
226
|
+
}
|
|
227
|
+
interface Color {
|
|
228
|
+
/**
|
|
229
|
+
* HEX color.
|
|
230
|
+
* @format COLOR_HEX
|
|
231
|
+
*/
|
|
232
|
+
hex?: string | null;
|
|
233
|
+
/** RGB color. */
|
|
234
|
+
rgb?: ColorRGB;
|
|
235
|
+
}
|
|
236
|
+
interface ColorRGB {
|
|
237
|
+
/**
|
|
238
|
+
* Red channel.
|
|
239
|
+
* @max 255
|
|
240
|
+
*/
|
|
241
|
+
r?: number | null;
|
|
242
|
+
/**
|
|
243
|
+
* Green channel.
|
|
244
|
+
* @max 255
|
|
245
|
+
*/
|
|
246
|
+
g?: number | null;
|
|
247
|
+
/**
|
|
248
|
+
* Blue channel.
|
|
249
|
+
* @max 255
|
|
250
|
+
*/
|
|
251
|
+
b?: number | null;
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* Using this object you can crop images while centering on faces
|
|
255
|
+
* ------------------------
|
|
256
|
+
* | |
|
|
257
|
+
* | x,y |
|
|
258
|
+
* | *-------- |
|
|
259
|
+
* | | . . | |
|
|
260
|
+
* | | | | height |
|
|
261
|
+
* | | \ / | |
|
|
262
|
+
* | | | |
|
|
263
|
+
* | --------- |
|
|
264
|
+
* | width |
|
|
265
|
+
* | |
|
|
266
|
+
* |______________________|
|
|
267
|
+
*/
|
|
268
|
+
interface FaceRecognition {
|
|
269
|
+
/** The accuracy percentage of the face recognition. The likelihood that a face is detected. */
|
|
270
|
+
confidence?: number;
|
|
271
|
+
/** Top left x pixel coordinate of the face. */
|
|
272
|
+
x?: number;
|
|
273
|
+
/** Top left y pixel coordinate of the face. */
|
|
274
|
+
y?: number;
|
|
275
|
+
/** Face pixel height. */
|
|
276
|
+
height?: number;
|
|
277
|
+
/** Face pixel width. */
|
|
278
|
+
width?: number;
|
|
279
|
+
}
|
|
280
|
+
interface VideoV2 {
|
|
281
|
+
/** WixMedia ID. */
|
|
282
|
+
id?: string;
|
|
283
|
+
/**
|
|
284
|
+
* Available resolutions for the video, starting with the optimal resolution.
|
|
285
|
+
* @readonly
|
|
286
|
+
* @maxSize 100
|
|
287
|
+
*/
|
|
288
|
+
resolutions?: VideoResolution[];
|
|
289
|
+
/**
|
|
290
|
+
* Video filename.
|
|
291
|
+
* @readonly
|
|
292
|
+
*/
|
|
293
|
+
filename?: string | null;
|
|
294
|
+
}
|
|
295
|
+
interface VideoResolution {
|
|
296
|
+
/** Video URL. */
|
|
297
|
+
url?: string;
|
|
298
|
+
/** Video height. */
|
|
299
|
+
height?: number;
|
|
300
|
+
/** Video width. */
|
|
301
|
+
width?: number;
|
|
302
|
+
/**
|
|
303
|
+
* Video format
|
|
304
|
+
* Possible values: ['144p.mp4' '144p.webm' '240p.mp4' '240p.webm' '360p.mp4' '360p.webm' '480p.mp4' '480p.webm'
|
|
305
|
+
* '720p.mp4' '720p.webm' '1080p.mp4' '1080p.webm', 'hls' ]
|
|
306
|
+
*/
|
|
307
|
+
format?: string;
|
|
308
|
+
}
|
|
309
|
+
interface AudioV2 {
|
|
310
|
+
/**
|
|
311
|
+
* WixMedia ID.
|
|
312
|
+
* @maxLength 200
|
|
313
|
+
*/
|
|
314
|
+
id?: string;
|
|
315
|
+
/**
|
|
316
|
+
* Audio formats available for this file.
|
|
317
|
+
* @maxSize 100
|
|
318
|
+
*/
|
|
319
|
+
assets?: Audio[];
|
|
320
|
+
/**
|
|
321
|
+
* Audio bitrate.
|
|
322
|
+
* @readonly
|
|
323
|
+
*/
|
|
324
|
+
bitrate?: number | null;
|
|
325
|
+
/**
|
|
326
|
+
* Audio format.
|
|
327
|
+
* @readonly
|
|
328
|
+
* @maxLength 100
|
|
329
|
+
*/
|
|
330
|
+
format?: string | null;
|
|
331
|
+
/**
|
|
332
|
+
* Audio duration in seconds.
|
|
333
|
+
* @readonly
|
|
334
|
+
*/
|
|
335
|
+
duration?: number | null;
|
|
336
|
+
/**
|
|
337
|
+
* Audio size in bytes.
|
|
338
|
+
* @readonly
|
|
339
|
+
* @format DECIMAL_VALUE
|
|
340
|
+
* @decimalValue options { maxScale:0 }
|
|
341
|
+
*/
|
|
342
|
+
sizeInBytes?: string | null;
|
|
343
|
+
}
|
|
344
|
+
interface Audio {
|
|
345
|
+
/** WixMedia ID. */
|
|
346
|
+
id?: string;
|
|
347
|
+
/** Audio URL. */
|
|
348
|
+
url?: string;
|
|
349
|
+
/**
|
|
350
|
+
* Audio filename.
|
|
351
|
+
* @readonly
|
|
352
|
+
*/
|
|
353
|
+
filename?: string | null;
|
|
354
|
+
}
|
|
355
|
+
interface Document {
|
|
356
|
+
/** WixMedia ID. */
|
|
357
|
+
id?: string;
|
|
358
|
+
/** Document URL. */
|
|
359
|
+
url?: string;
|
|
360
|
+
/** Document filename. */
|
|
361
|
+
filename?: string | null;
|
|
362
|
+
}
|
|
363
|
+
interface Archive {
|
|
364
|
+
/** WixMedia ID. */
|
|
365
|
+
id?: string;
|
|
366
|
+
/** Archive URL. */
|
|
367
|
+
url?: string;
|
|
368
|
+
/**
|
|
369
|
+
* Archive URL expiration date (when relevant).
|
|
370
|
+
* @readonly
|
|
371
|
+
*/
|
|
372
|
+
urlExpirationDate?: Date | null;
|
|
373
|
+
/**
|
|
374
|
+
* Archive size in bytes.
|
|
375
|
+
* @format DECIMAL_VALUE
|
|
376
|
+
*/
|
|
377
|
+
sizeInBytes?: string | null;
|
|
378
|
+
/** Archive filename. */
|
|
379
|
+
filename?: string | null;
|
|
380
|
+
}
|
|
381
|
+
interface Model3D {
|
|
382
|
+
/** WixMedia 3D ID. */
|
|
383
|
+
id?: string;
|
|
384
|
+
/** 3D URL. */
|
|
385
|
+
url?: string;
|
|
386
|
+
/** 3D thumbnail Image */
|
|
387
|
+
thumbnail?: Image;
|
|
388
|
+
/** 3D alt text. */
|
|
389
|
+
altText?: string | null;
|
|
390
|
+
/**
|
|
391
|
+
* 3D URL expiration date (when relevant).
|
|
392
|
+
* @readonly
|
|
393
|
+
*/
|
|
394
|
+
urlExpirationDate?: Date | null;
|
|
395
|
+
/**
|
|
396
|
+
* 3D filename.
|
|
397
|
+
* @readonly
|
|
398
|
+
*/
|
|
399
|
+
filename?: string | null;
|
|
400
|
+
/**
|
|
401
|
+
* 3D size in bytes.
|
|
402
|
+
* @readonly
|
|
403
|
+
* @format DECIMAL_VALUE
|
|
404
|
+
*/
|
|
405
|
+
sizeInBytes?: string | null;
|
|
406
|
+
}
|
|
407
|
+
declare enum OperationStatus {
|
|
408
|
+
/** File upload or processing failed */
|
|
409
|
+
FAILED = "FAILED",
|
|
410
|
+
/** File is ready for consumption */
|
|
411
|
+
READY = "READY",
|
|
412
|
+
/** File is waiting for processing or currently being processed */
|
|
413
|
+
PENDING = "PENDING"
|
|
414
|
+
}
|
|
415
|
+
/** @enumType */
|
|
416
|
+
type OperationStatusWithLiterals = OperationStatus | 'FAILED' | 'READY' | 'PENDING';
|
|
417
|
+
declare enum State {
|
|
418
|
+
/** File is ready for consumption */
|
|
419
|
+
OK = "OK",
|
|
420
|
+
/** Deleted file */
|
|
421
|
+
DELETED = "DELETED"
|
|
422
|
+
}
|
|
423
|
+
/** @enumType */
|
|
424
|
+
type StateWithLiterals = State | 'OK' | 'DELETED';
|
|
425
|
+
interface ExternalInfo {
|
|
426
|
+
/**
|
|
427
|
+
* External information to specify in the File Ready or File Failed events.
|
|
428
|
+
* @maxLength 1000
|
|
429
|
+
*/
|
|
430
|
+
origin?: string;
|
|
431
|
+
/**
|
|
432
|
+
* External IDs to specify in the File Ready or File Failed events.
|
|
433
|
+
* @maxSize 30
|
|
434
|
+
* @maxLength 4000
|
|
435
|
+
*/
|
|
436
|
+
externalIds?: string[];
|
|
437
|
+
}
|
|
438
|
+
interface ApplicationError {
|
|
439
|
+
/** Error code. */
|
|
440
|
+
code?: string;
|
|
441
|
+
/** Description of the error. */
|
|
442
|
+
description?: string;
|
|
443
|
+
/** Data related to the error. */
|
|
444
|
+
data?: Record<string, any> | null;
|
|
445
|
+
}
|
|
446
|
+
interface ItemMetadata {
|
|
447
|
+
/** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
|
|
448
|
+
id?: string | null;
|
|
449
|
+
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
450
|
+
originalIndex?: number;
|
|
451
|
+
/** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
|
|
452
|
+
success?: boolean;
|
|
453
|
+
/** Details about the error in case of failure. */
|
|
454
|
+
error?: ApplicationError;
|
|
455
|
+
}
|
|
456
|
+
interface BulkActionMetadata {
|
|
457
|
+
/** Number of items that were successfully processed. */
|
|
458
|
+
totalSuccesses?: number;
|
|
459
|
+
/** Number of items that couldn't be processed. */
|
|
460
|
+
totalFailures?: number;
|
|
461
|
+
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
462
|
+
undetailedFailures?: number;
|
|
463
|
+
}
|
|
464
|
+
interface GenerateFilesDownloadUrlRequest {
|
|
465
|
+
/**
|
|
466
|
+
* IDs of the files to download.
|
|
467
|
+
*
|
|
468
|
+
* You can also specify the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`.
|
|
469
|
+
* 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)).
|
|
470
|
+
* @minSize 1
|
|
471
|
+
* @maxSize 1000
|
|
472
|
+
* @maxLength 1000
|
|
473
|
+
*/
|
|
474
|
+
fileIds: string[];
|
|
475
|
+
}
|
|
476
|
+
interface GenerateFilesDownloadUrlResponse {
|
|
477
|
+
/**
|
|
478
|
+
* URL for downloading the compressed file containing the specified files in the Media Manager.
|
|
479
|
+
* @format WEB_URL
|
|
480
|
+
*/
|
|
481
|
+
downloadUrl?: string;
|
|
482
|
+
}
|
|
483
|
+
interface GenerateFileDownloadUrlRequest {
|
|
484
|
+
/**
|
|
485
|
+
* File ID.
|
|
486
|
+
*
|
|
487
|
+
* 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`.
|
|
488
|
+
* 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)).
|
|
489
|
+
* @maxLength 1000
|
|
490
|
+
*/
|
|
491
|
+
fileId: string;
|
|
492
|
+
/**
|
|
493
|
+
* Temporary file name used to identify the file type. For example, a file named "myFile.jpeg" identifies as an "image/jpeg" file type. <br />
|
|
494
|
+
*
|
|
495
|
+
* **Note:** The name that appears in the Media Manager is taken from the `filename` parameter in the Generate File Upload Url call.
|
|
496
|
+
* @maxLength 100
|
|
497
|
+
*/
|
|
498
|
+
downloadFileName?: string | null;
|
|
499
|
+
/**
|
|
500
|
+
* The time that it takes in minutes for the download URL to expire. <br />
|
|
501
|
+
* Default: `600`. <br />
|
|
502
|
+
* Limit: `525600` (1 year).
|
|
503
|
+
* @min 1
|
|
504
|
+
*/
|
|
505
|
+
expirationInMinutes?: number | null;
|
|
506
|
+
/**
|
|
507
|
+
* The redirect URL for when the temporary download URL with a token expires. <br />
|
|
508
|
+
* Default: A 403 Forbidden response page.
|
|
509
|
+
* @format WEB_URL
|
|
510
|
+
*/
|
|
511
|
+
expirationRedirectUrl?: string | null;
|
|
512
|
+
/**
|
|
513
|
+
* Keys for downloading different assets (format and quality) of a file.
|
|
514
|
+
* Default: `src`, key representing the original file's format and quality.
|
|
515
|
+
* @maxSize 100
|
|
516
|
+
* @maxLength 100
|
|
517
|
+
*/
|
|
518
|
+
assetKeys?: string[] | null;
|
|
519
|
+
/**
|
|
520
|
+
* Whether the link downloads the file or opens the file in the browser.
|
|
521
|
+
*
|
|
522
|
+
* - `ATTACHMENT`: The link downloads the file.
|
|
523
|
+
* - `INLINE`: The link opens the file in the browser.
|
|
524
|
+
*
|
|
525
|
+
* Default: `ATTACHMENT`
|
|
526
|
+
*/
|
|
527
|
+
contentDisposition?: ContentDispositionWithLiterals;
|
|
528
|
+
}
|
|
529
|
+
declare enum ContentDisposition {
|
|
530
|
+
/** Using the link in the browser will download the file */
|
|
531
|
+
ATTACHMENT = "ATTACHMENT",
|
|
532
|
+
/** Using the link in the browser will open the file in the browser */
|
|
533
|
+
INLINE = "INLINE"
|
|
534
|
+
}
|
|
535
|
+
/** @enumType */
|
|
536
|
+
type ContentDispositionWithLiterals = ContentDisposition | 'ATTACHMENT' | 'INLINE';
|
|
537
|
+
interface GenerateFileDownloadUrlResponse {
|
|
538
|
+
/**
|
|
539
|
+
* URL for downloading a specific file in the Media Manager.
|
|
540
|
+
* @maxSize 100
|
|
541
|
+
*/
|
|
542
|
+
downloadUrls?: DownloadUrl[];
|
|
543
|
+
}
|
|
544
|
+
interface DownloadUrl {
|
|
545
|
+
/**
|
|
546
|
+
* The file download URL.
|
|
547
|
+
* @format WEB_URL
|
|
548
|
+
*/
|
|
549
|
+
url?: string;
|
|
550
|
+
/**
|
|
551
|
+
* Key for downloading a different asset (format and quality) of a file.
|
|
552
|
+
* Default: `src`, key representing the original file's format and quality.
|
|
553
|
+
* @maxLength 100
|
|
554
|
+
*/
|
|
555
|
+
assetKey?: string;
|
|
556
|
+
}
|
|
557
|
+
interface GetFileDescriptorRequest {
|
|
558
|
+
/**
|
|
559
|
+
* File ID.
|
|
560
|
+
*
|
|
561
|
+
* 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`.
|
|
562
|
+
* 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)).
|
|
563
|
+
*
|
|
564
|
+
* 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`.
|
|
565
|
+
* @maxLength 1000
|
|
566
|
+
*/
|
|
567
|
+
fileId: string;
|
|
568
|
+
}
|
|
569
|
+
interface GetFileDescriptorResponse {
|
|
570
|
+
/** Information about the file. */
|
|
571
|
+
file?: FileDescriptor;
|
|
572
|
+
}
|
|
573
|
+
interface GetFileDescriptorsRequest {
|
|
574
|
+
/**
|
|
575
|
+
* File IDs.
|
|
576
|
+
*
|
|
577
|
+
* You can also specify the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`.
|
|
578
|
+
* 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)).
|
|
579
|
+
* @minSize 1
|
|
580
|
+
* @maxSize 100
|
|
581
|
+
* @maxLength 1000
|
|
582
|
+
*/
|
|
583
|
+
fileIds: string[];
|
|
584
|
+
}
|
|
585
|
+
interface GetFileDescriptorsResponse {
|
|
586
|
+
/**
|
|
587
|
+
* Information about the requested files.
|
|
588
|
+
* @maxSize 100
|
|
589
|
+
*/
|
|
590
|
+
files?: FileDescriptor[];
|
|
591
|
+
}
|
|
592
|
+
interface UpdateFileDescriptorRequest {
|
|
593
|
+
/** The file to update. */
|
|
594
|
+
file: FileDescriptor;
|
|
595
|
+
}
|
|
596
|
+
interface UpdateFileDescriptorResponse {
|
|
597
|
+
/** Information about the updated file. */
|
|
598
|
+
file?: FileDescriptor;
|
|
599
|
+
}
|
|
600
|
+
interface GenerateFileUploadUrlRequest {
|
|
601
|
+
/**
|
|
602
|
+
* File mime type.
|
|
603
|
+
* @maxLength 100
|
|
604
|
+
*/
|
|
605
|
+
mimeType: string | null;
|
|
606
|
+
/**
|
|
607
|
+
* Temporary file name used to identify the file type. For example, a file named "myFile.jpeg" identifies as an "image/jpeg" file type.
|
|
608
|
+
* <br /> **Note:** The name that appears in the Media Manager is taken from the `filename` parameter in the Generate File Upload Url call.
|
|
609
|
+
* @maxLength 200
|
|
610
|
+
*/
|
|
611
|
+
fileName?: string | null;
|
|
612
|
+
/**
|
|
613
|
+
* File size in bytes.
|
|
614
|
+
* @readonly
|
|
615
|
+
* @format DECIMAL_VALUE
|
|
616
|
+
* @decimalValue options { gte:0, maxScale:0 }
|
|
617
|
+
*/
|
|
618
|
+
sizeInBytes?: string | null;
|
|
619
|
+
/**
|
|
620
|
+
* ID of the file's parent folder. <br />
|
|
621
|
+
* This folder is the path root for the `filePath`.<br />
|
|
622
|
+
* Default: `media-root`.
|
|
623
|
+
* @maxLength 100
|
|
624
|
+
*/
|
|
625
|
+
parentFolderId?: string | null;
|
|
626
|
+
/** 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)). */
|
|
627
|
+
private?: boolean | null;
|
|
628
|
+
/**
|
|
629
|
+
* 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.
|
|
630
|
+
* @maxSize 50
|
|
631
|
+
* @maxLength 200
|
|
632
|
+
*/
|
|
633
|
+
labels?: string[] | null;
|
|
634
|
+
/** A place to map an external entity to an uploaded file in the Wix Media Manager. */
|
|
635
|
+
externalInfo?: ExternalInfo;
|
|
636
|
+
/**
|
|
637
|
+
* Path to the folder where the file will be stored.
|
|
638
|
+
* For example, `/videos/2024/december`. <br/>
|
|
639
|
+
* If `parentFolderId` is defined, the parent folder is used as the path root. Otherwise, the root is `media-root`.
|
|
640
|
+
* The folders in the path will be created if they don't already exist. <br />
|
|
641
|
+
* @maxLength 100
|
|
642
|
+
*/
|
|
643
|
+
filePath?: string | null;
|
|
644
|
+
}
|
|
645
|
+
interface GenerateFileUploadUrlResponse {
|
|
646
|
+
/**
|
|
647
|
+
* The URL for uploading a file to the Media Manager.
|
|
648
|
+
* @format WEB_URL
|
|
649
|
+
*/
|
|
650
|
+
uploadUrl?: string;
|
|
651
|
+
}
|
|
652
|
+
interface GenerateFileResumableUploadUrlRequest {
|
|
653
|
+
/**
|
|
654
|
+
* File mime type.
|
|
655
|
+
* @maxLength 100
|
|
656
|
+
*/
|
|
657
|
+
mimeType: string | null;
|
|
658
|
+
/**
|
|
659
|
+
* Temporary file name used to identify the file type. For example, a file named "myFile.jpeg" identifies as an "image/jpeg" file type.
|
|
660
|
+
* <br /> **Note:** The name that appears in the Media Manager is taken from the `filename` parameter in the Generate File Upload Url call.
|
|
661
|
+
* @maxLength 200
|
|
662
|
+
*/
|
|
663
|
+
fileName?: string | null;
|
|
664
|
+
/**
|
|
665
|
+
* File size in bytes.
|
|
666
|
+
* @readonly
|
|
667
|
+
* @format DECIMAL_VALUE
|
|
668
|
+
* @decimalValue options { gte:0, maxScale:0 }
|
|
669
|
+
*/
|
|
670
|
+
sizeInBytes?: string | null;
|
|
671
|
+
/**
|
|
672
|
+
* ID of the file's parent folder. <br />
|
|
673
|
+
* This folder is the path root for the `filePath`.<br />
|
|
674
|
+
* Default: `media-root`.
|
|
675
|
+
* @maxLength 100
|
|
676
|
+
*/
|
|
677
|
+
parentFolderId?: string | null;
|
|
678
|
+
/** 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)). */
|
|
679
|
+
private?: boolean | null;
|
|
680
|
+
/**
|
|
681
|
+
* 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.
|
|
682
|
+
* @maxSize 500
|
|
683
|
+
* @maxLength 200
|
|
684
|
+
*/
|
|
685
|
+
labels?: string[] | null;
|
|
686
|
+
/** The upload protocol to use for implementing the resumable upload. */
|
|
687
|
+
uploadProtocol?: UploadProtocolWithLiterals;
|
|
688
|
+
/**
|
|
689
|
+
* Path to the folder where the file will be stored.
|
|
690
|
+
* For example, `/videos/2024/december`. <br/>
|
|
691
|
+
* If `parentFolderId` is defined, the parent folder is used as the path root. Otherwise, the root is `media-root`.
|
|
692
|
+
* The folders in the path will be created if they don't already exist. <br />
|
|
693
|
+
* @maxLength 100
|
|
694
|
+
*/
|
|
695
|
+
filePath?: string | null;
|
|
696
|
+
}
|
|
697
|
+
declare enum UploadProtocol {
|
|
698
|
+
/** The upload protocol to use for implementing the resumable upload. */
|
|
699
|
+
TUS = "TUS"
|
|
700
|
+
}
|
|
701
|
+
/** @enumType */
|
|
702
|
+
type UploadProtocolWithLiterals = UploadProtocol | 'TUS';
|
|
703
|
+
interface GenerateFileResumableUploadUrlResponse {
|
|
704
|
+
/** The upload protocol to use for implementing the resumable upload. */
|
|
705
|
+
uploadProtocol?: UploadProtocolWithLiterals;
|
|
706
|
+
/**
|
|
707
|
+
* The URL for uploading a file to the Media Manager.
|
|
708
|
+
* @format WEB_URL
|
|
709
|
+
*/
|
|
710
|
+
uploadUrl?: string;
|
|
711
|
+
/**
|
|
712
|
+
* Single-use upload token.
|
|
713
|
+
* @maxLength 2000
|
|
714
|
+
*/
|
|
715
|
+
uploadToken?: string;
|
|
716
|
+
}
|
|
717
|
+
interface ImportFileRequest {
|
|
718
|
+
/**
|
|
719
|
+
* Publicly accessible external file URL.
|
|
720
|
+
* @format WEB_URL
|
|
721
|
+
*/
|
|
722
|
+
url: string;
|
|
723
|
+
/**
|
|
724
|
+
* Media type of the file to import.
|
|
725
|
+
* excluding: OTHER media type
|
|
726
|
+
*/
|
|
727
|
+
mediaType?: MediaTypeWithLiterals;
|
|
728
|
+
/**
|
|
729
|
+
* File name that appears in the Media Manager.
|
|
730
|
+
* @maxLength 200
|
|
731
|
+
*/
|
|
732
|
+
displayName?: string | null;
|
|
733
|
+
/**
|
|
734
|
+
* ID of the file's parent folder. <br />
|
|
735
|
+
* This folder is the path root for the `filePath`. <br />
|
|
736
|
+
* Default: `media-root`.
|
|
737
|
+
* @maxLength 100
|
|
738
|
+
*/
|
|
739
|
+
parentFolderId?: string | null;
|
|
740
|
+
/** 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)). */
|
|
741
|
+
private?: boolean | null;
|
|
742
|
+
/**
|
|
743
|
+
* 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.
|
|
744
|
+
* @maxSize 500
|
|
745
|
+
* @maxLength 200
|
|
746
|
+
*/
|
|
747
|
+
labels?: string[] | null;
|
|
748
|
+
/**
|
|
749
|
+
* File mime type.
|
|
750
|
+
* @maxLength 100
|
|
751
|
+
*/
|
|
752
|
+
mimeType?: string;
|
|
753
|
+
/** 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. */
|
|
754
|
+
externalInfo?: ExternalInfo;
|
|
755
|
+
/** Optional parameters that should be sent with the external URL. */
|
|
756
|
+
urlParams?: Record<string, any> | null;
|
|
757
|
+
/** Optional headers that should be sent with the external URL. */
|
|
758
|
+
urlHeaders?: Record<string, any> | null;
|
|
759
|
+
/**
|
|
760
|
+
* Path to the folder where the file will be stored.
|
|
761
|
+
* For example, `/videos/2024/december`. <br/>
|
|
762
|
+
* If `parentFolderId` is defined, the parent folder is used as the path root. Otherwise, the root is `media-root`.
|
|
763
|
+
* The folders in the path will be created if they don't already exist. <br />
|
|
764
|
+
* @maxLength 100
|
|
765
|
+
*/
|
|
766
|
+
filePath?: string | null;
|
|
767
|
+
}
|
|
768
|
+
interface ImportFileResponse {
|
|
769
|
+
/** Information about the imported file. */
|
|
770
|
+
file?: FileDescriptor;
|
|
771
|
+
}
|
|
772
|
+
interface BulkImportFilesRequest {
|
|
773
|
+
/**
|
|
774
|
+
* Information about the files to import.
|
|
775
|
+
* @minSize 1
|
|
776
|
+
* @maxSize 100
|
|
777
|
+
*/
|
|
778
|
+
importFileRequests: ImportFileRequest[];
|
|
779
|
+
}
|
|
780
|
+
interface BulkImportFilesResponse {
|
|
781
|
+
/**
|
|
782
|
+
* Information about the imported files.
|
|
783
|
+
* @maxSize 100
|
|
784
|
+
*/
|
|
785
|
+
files?: FileDescriptor[];
|
|
786
|
+
}
|
|
787
|
+
interface BulkImportFileRequest {
|
|
788
|
+
/**
|
|
789
|
+
* Information about the files to import.
|
|
790
|
+
* @minSize 1
|
|
791
|
+
* @maxSize 100
|
|
792
|
+
*/
|
|
793
|
+
importFileRequests: ImportFileRequest[];
|
|
794
|
+
/** Default: `true` */
|
|
795
|
+
returnEntity?: boolean | null;
|
|
796
|
+
}
|
|
797
|
+
interface BulkImportFileResponse {
|
|
798
|
+
/** Items created by bulk action. */
|
|
799
|
+
results?: BulkImportFileResult[];
|
|
800
|
+
/** Bulk action metadata. */
|
|
801
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
802
|
+
}
|
|
803
|
+
interface BulkImportFileResult {
|
|
804
|
+
/** Item metadata. */
|
|
805
|
+
itemMetadata?: ItemMetadata;
|
|
806
|
+
/** Imported file. This field is included in the response if the operation was successful and `returnEntity` is not set to `false`. */
|
|
807
|
+
item?: FileDescriptor;
|
|
808
|
+
}
|
|
809
|
+
interface ListFilesRequest {
|
|
810
|
+
/**
|
|
811
|
+
* ID of the file's parent folder. <br />
|
|
812
|
+
* Default:`media-root`.
|
|
813
|
+
* @maxLength 100
|
|
814
|
+
*/
|
|
815
|
+
parentFolderId?: string | null;
|
|
816
|
+
/**
|
|
817
|
+
* File media type.
|
|
818
|
+
* @maxSize 30
|
|
819
|
+
*/
|
|
820
|
+
mediaTypes?: MediaTypeWithLiterals[];
|
|
821
|
+
/** \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)). */
|
|
822
|
+
private?: boolean | null;
|
|
823
|
+
/**
|
|
824
|
+
* Field name and order to sort by. One of: <br />
|
|
825
|
+
* * `displayName`
|
|
826
|
+
* * `updatedDate`
|
|
827
|
+
* * `sizeInBytes`
|
|
828
|
+
* Default: `updatedDate` in `desc` order.
|
|
829
|
+
*/
|
|
830
|
+
sort?: Sorting;
|
|
831
|
+
/** Cursor and paging information. */
|
|
832
|
+
paging?: CursorPaging;
|
|
833
|
+
}
|
|
834
|
+
interface Sorting {
|
|
835
|
+
/**
|
|
836
|
+
* Name of the field to sort by.
|
|
837
|
+
* @maxLength 512
|
|
838
|
+
*/
|
|
839
|
+
fieldName?: string;
|
|
840
|
+
/** Sort order. */
|
|
841
|
+
order?: SortOrderWithLiterals;
|
|
842
|
+
}
|
|
843
|
+
declare enum SortOrder {
|
|
844
|
+
ASC = "ASC",
|
|
845
|
+
DESC = "DESC"
|
|
846
|
+
}
|
|
847
|
+
/** @enumType */
|
|
848
|
+
type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
|
|
849
|
+
interface CursorPaging {
|
|
850
|
+
/**
|
|
851
|
+
* Maximum number of items to return in the results.
|
|
852
|
+
* @max 100
|
|
853
|
+
*/
|
|
854
|
+
limit?: number | null;
|
|
855
|
+
/**
|
|
856
|
+
* Pointer to the next or previous page in the list of results.
|
|
857
|
+
*
|
|
858
|
+
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
859
|
+
* Not relevant for the first request.
|
|
860
|
+
* @maxLength 16000
|
|
861
|
+
*/
|
|
862
|
+
cursor?: string | null;
|
|
863
|
+
}
|
|
864
|
+
interface ListFilesResponse {
|
|
865
|
+
/**
|
|
866
|
+
* List of files in the Media Manager.
|
|
867
|
+
* @maxSize 200
|
|
868
|
+
*/
|
|
869
|
+
files?: FileDescriptor[];
|
|
870
|
+
/** The next cursor if it exists. */
|
|
871
|
+
nextCursor?: PagingMetadataV2;
|
|
872
|
+
}
|
|
873
|
+
interface PagingMetadataV2 {
|
|
874
|
+
/** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
|
|
875
|
+
total?: number | null;
|
|
876
|
+
/** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
|
|
877
|
+
cursors?: Cursors;
|
|
878
|
+
}
|
|
879
|
+
interface Cursors {
|
|
880
|
+
/**
|
|
881
|
+
* Cursor string pointing to the next page in the list of results.
|
|
882
|
+
* @maxLength 16000
|
|
883
|
+
*/
|
|
884
|
+
next?: string | null;
|
|
885
|
+
}
|
|
886
|
+
interface SearchFilesRequest {
|
|
887
|
+
/**
|
|
888
|
+
* Term to search for. Possible terms include the value of a file's
|
|
889
|
+
* `displayName`, `mimeType`, and `label`. <br />
|
|
890
|
+
* For example, if a file's label is cat, the search term is 'cat'.
|
|
891
|
+
* @maxLength 200
|
|
892
|
+
*/
|
|
893
|
+
search?: string | null;
|
|
894
|
+
/**
|
|
895
|
+
* A root folder in the media manager to search in. <br />
|
|
896
|
+
* Default: `MEDIA_ROOT`.
|
|
897
|
+
*/
|
|
898
|
+
rootFolder?: RootFolderWithLiterals;
|
|
899
|
+
/**
|
|
900
|
+
* File media type.
|
|
901
|
+
* @maxSize 30
|
|
902
|
+
*/
|
|
903
|
+
mediaTypes?: MediaTypeWithLiterals[];
|
|
904
|
+
/** \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)). */
|
|
905
|
+
private?: boolean | null;
|
|
906
|
+
/**
|
|
907
|
+
* Field name and order to sort by. One of: <br />
|
|
908
|
+
* * `displayName`
|
|
909
|
+
* * `updatedDate`
|
|
910
|
+
* * `sizeInBytes`
|
|
911
|
+
* Default: `updatedDate` in `desc` order.
|
|
912
|
+
*/
|
|
913
|
+
sort?: Sorting;
|
|
914
|
+
/** Cursor and paging information. */
|
|
915
|
+
paging?: CursorPaging;
|
|
916
|
+
}
|
|
917
|
+
declare enum RootFolder {
|
|
918
|
+
/** Root of all site media */
|
|
919
|
+
MEDIA_ROOT = "MEDIA_ROOT",
|
|
920
|
+
/** Root of the trash system folder */
|
|
921
|
+
TRASH_ROOT = "TRASH_ROOT",
|
|
922
|
+
/** Root of all visitor uploads */
|
|
923
|
+
VISITOR_UPLOADS_ROOT = "VISITOR_UPLOADS_ROOT"
|
|
924
|
+
}
|
|
925
|
+
/** @enumType */
|
|
926
|
+
type RootFolderWithLiterals = RootFolder | 'MEDIA_ROOT' | 'TRASH_ROOT' | 'VISITOR_UPLOADS_ROOT';
|
|
927
|
+
interface SearchFilesResponse {
|
|
928
|
+
/**
|
|
929
|
+
* Files matching the query.
|
|
930
|
+
* @maxSize 200
|
|
931
|
+
*/
|
|
932
|
+
files?: FileDescriptor[];
|
|
933
|
+
/** The next cursor if it exists. */
|
|
934
|
+
nextCursor?: PagingMetadataV2;
|
|
935
|
+
}
|
|
936
|
+
interface GenerateVideoStreamingUrlRequest {
|
|
937
|
+
/**
|
|
938
|
+
* File ID.
|
|
939
|
+
*
|
|
940
|
+
* 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`.
|
|
941
|
+
* 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)).
|
|
942
|
+
* @maxLength 1000
|
|
943
|
+
*/
|
|
944
|
+
fileId: string;
|
|
945
|
+
/** Video stream format. */
|
|
946
|
+
format?: StreamFormatWithLiterals;
|
|
947
|
+
}
|
|
948
|
+
declare enum StreamFormat {
|
|
949
|
+
UNKNOWN = "UNKNOWN",
|
|
950
|
+
HLS = "HLS",
|
|
951
|
+
DASH = "DASH"
|
|
952
|
+
}
|
|
953
|
+
/** @enumType */
|
|
954
|
+
type StreamFormatWithLiterals = StreamFormat | 'UNKNOWN' | 'HLS' | 'DASH';
|
|
955
|
+
interface GenerateVideoStreamingUrlResponse {
|
|
956
|
+
/** URL for streaming a specific file in the Media Manager. */
|
|
957
|
+
downloadUrl?: DownloadUrl;
|
|
958
|
+
}
|
|
959
|
+
interface BulkDeleteFilesRequest {
|
|
960
|
+
/**
|
|
961
|
+
* IDs of the files to move to the Media Manager's trash bin.
|
|
962
|
+
*
|
|
963
|
+
* You can also specify the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`.
|
|
964
|
+
* 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)).
|
|
965
|
+
* @maxSize 1000
|
|
966
|
+
* @maxLength 1000
|
|
967
|
+
*/
|
|
968
|
+
fileIds: string[];
|
|
969
|
+
/**
|
|
970
|
+
* Whether the specified files are permanently deleted. <br />
|
|
971
|
+
* Default: `false`
|
|
972
|
+
*/
|
|
973
|
+
permanent?: boolean;
|
|
974
|
+
}
|
|
975
|
+
interface BulkDeleteFilesResponse {
|
|
976
|
+
}
|
|
977
|
+
interface BulkRestoreFilesFromTrashBinRequest {
|
|
978
|
+
/**
|
|
979
|
+
* IDs of the files to restore from the Media Manager's trash bin.
|
|
980
|
+
*
|
|
981
|
+
* You can also specify the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`.
|
|
982
|
+
* 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)).
|
|
983
|
+
* @maxSize 1000
|
|
984
|
+
* @maxLength 1000
|
|
985
|
+
*/
|
|
986
|
+
fileIds: string[];
|
|
987
|
+
}
|
|
988
|
+
interface BulkRestoreFilesFromTrashBinResponse {
|
|
989
|
+
}
|
|
990
|
+
interface ListDeletedFilesRequest {
|
|
991
|
+
/**
|
|
992
|
+
* ID of the file's parent folder. <br />
|
|
993
|
+
* Default: `media-root`.
|
|
994
|
+
* @maxLength 100
|
|
995
|
+
*/
|
|
996
|
+
parentFolderId?: string | null;
|
|
997
|
+
/**
|
|
998
|
+
* File media type.
|
|
999
|
+
* @maxSize 30
|
|
1000
|
+
*/
|
|
1001
|
+
mediaTypes?: MediaTypeWithLiterals[];
|
|
1002
|
+
/** \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)). */
|
|
1003
|
+
private?: boolean | null;
|
|
1004
|
+
/**
|
|
1005
|
+
* Field name and order to sort by. One of: <br />
|
|
1006
|
+
* * `displayName`
|
|
1007
|
+
* * `updatedDate`
|
|
1008
|
+
* * `sizeInBytes`
|
|
1009
|
+
* Default: `updatedDate` in `desc` order.
|
|
1010
|
+
*/
|
|
1011
|
+
sort?: Sorting;
|
|
1012
|
+
/** Cursor and paging information. */
|
|
1013
|
+
paging?: CursorPaging;
|
|
1014
|
+
}
|
|
1015
|
+
interface ListDeletedFilesResponse {
|
|
1016
|
+
/**
|
|
1017
|
+
* List of files in the Media Manager's trash bin.
|
|
1018
|
+
* @maxSize 200
|
|
1019
|
+
*/
|
|
1020
|
+
files?: FileDescriptor[];
|
|
1021
|
+
/** The next cursor if it exists. */
|
|
1022
|
+
nextCursor?: PagingMetadataV2;
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
1026
|
+
getUrl: (context: any) => string;
|
|
1027
|
+
httpMethod: K;
|
|
1028
|
+
path: string;
|
|
1029
|
+
pathParams: M;
|
|
1030
|
+
__requestType: T;
|
|
1031
|
+
__originalRequestType: S;
|
|
1032
|
+
__responseType: Q;
|
|
1033
|
+
__originalResponseType: R;
|
|
1034
|
+
};
|
|
1035
|
+
declare function generateFilesDownloadUrl(): __PublicMethodMetaInfo<'POST', {}, GenerateFilesDownloadUrlRequest$1, GenerateFilesDownloadUrlRequest, GenerateFilesDownloadUrlResponse$1, GenerateFilesDownloadUrlResponse>;
|
|
1036
|
+
declare function generateFileDownloadUrl(): __PublicMethodMetaInfo<'POST', {}, GenerateFileDownloadUrlRequest$1, GenerateFileDownloadUrlRequest, GenerateFileDownloadUrlResponse$1, GenerateFileDownloadUrlResponse>;
|
|
1037
|
+
declare function getFileDescriptor(): __PublicMethodMetaInfo<'GET', {}, GetFileDescriptorRequest$1, GetFileDescriptorRequest, GetFileDescriptorResponse$1, GetFileDescriptorResponse>;
|
|
1038
|
+
declare function getFileDescriptors(): __PublicMethodMetaInfo<'POST', {}, GetFileDescriptorsRequest$1, GetFileDescriptorsRequest, GetFileDescriptorsResponse$1, GetFileDescriptorsResponse>;
|
|
1039
|
+
declare function updateFileDescriptor(): __PublicMethodMetaInfo<'PATCH', {}, UpdateFileDescriptorRequest$1, UpdateFileDescriptorRequest, UpdateFileDescriptorResponse$1, UpdateFileDescriptorResponse>;
|
|
1040
|
+
declare function generateFileUploadUrl(): __PublicMethodMetaInfo<'POST', {}, GenerateFileUploadUrlRequest$1, GenerateFileUploadUrlRequest, GenerateFileUploadUrlResponse$1, GenerateFileUploadUrlResponse>;
|
|
1041
|
+
declare function generateFileResumableUploadUrl(): __PublicMethodMetaInfo<'POST', {}, GenerateFileResumableUploadUrlRequest$1, GenerateFileResumableUploadUrlRequest, GenerateFileResumableUploadUrlResponse$1, GenerateFileResumableUploadUrlResponse>;
|
|
1042
|
+
declare function importFile(): __PublicMethodMetaInfo<'POST', {}, ImportFileRequest$1, ImportFileRequest, ImportFileResponse$1, ImportFileResponse>;
|
|
1043
|
+
declare function bulkImportFiles(): __PublicMethodMetaInfo<'POST', {}, BulkImportFilesRequest$1, BulkImportFilesRequest, BulkImportFilesResponse$1, BulkImportFilesResponse>;
|
|
1044
|
+
declare function bulkImportFile(): __PublicMethodMetaInfo<'POST', {}, BulkImportFileRequest$1, BulkImportFileRequest, BulkImportFileResponse$1, BulkImportFileResponse>;
|
|
1045
|
+
declare function listFiles(): __PublicMethodMetaInfo<'GET', {}, ListFilesRequest$1, ListFilesRequest, ListFilesResponse$1, ListFilesResponse>;
|
|
1046
|
+
declare function searchFiles(): __PublicMethodMetaInfo<'POST', {}, SearchFilesRequest$1, SearchFilesRequest, SearchFilesResponse$1, SearchFilesResponse>;
|
|
1047
|
+
declare function generateVideoStreamingUrl(): __PublicMethodMetaInfo<'POST', {}, GenerateVideoStreamingUrlRequest$1, GenerateVideoStreamingUrlRequest, GenerateVideoStreamingUrlResponse$1, GenerateVideoStreamingUrlResponse>;
|
|
1048
|
+
declare function bulkDeleteFiles(): __PublicMethodMetaInfo<'POST', {}, BulkDeleteFilesRequest$1, BulkDeleteFilesRequest, BulkDeleteFilesResponse$1, BulkDeleteFilesResponse>;
|
|
1049
|
+
declare function bulkRestoreFilesFromTrashBin(): __PublicMethodMetaInfo<'POST', {}, BulkRestoreFilesFromTrashBinRequest$1, BulkRestoreFilesFromTrashBinRequest, BulkRestoreFilesFromTrashBinResponse$1, BulkRestoreFilesFromTrashBinResponse>;
|
|
1050
|
+
declare function listDeletedFiles(): __PublicMethodMetaInfo<'GET', {}, ListDeletedFilesRequest$1, ListDeletedFilesRequest, ListDeletedFilesResponse$1, ListDeletedFilesResponse>;
|
|
1051
|
+
|
|
1052
|
+
export { type __PublicMethodMetaInfo, bulkDeleteFiles, bulkImportFile, bulkImportFiles, bulkRestoreFilesFromTrashBin, generateFileDownloadUrl, generateFileResumableUploadUrl, generateFileUploadUrl, generateFilesDownloadUrl, generateVideoStreamingUrl, getFileDescriptor, getFileDescriptors, importFile, listDeletedFiles, listFiles, searchFiles, updateFileDescriptor };
|