@wix/auto_sdk_media_files 1.0.19 → 1.0.21
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 +53 -18
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/{media-site-media-v1-file-descriptor-files.universal-C5dCrbUZ.d.ts → index.typings.d.ts} +498 -1
- package/build/cjs/index.typings.js +1938 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +3 -27
- package/build/es/index.d.mts +53 -18
- package/build/es/index.mjs.map +1 -1
- package/build/es/{media-site-media-v1-file-descriptor-files.universal-C5dCrbUZ.d.mts → index.typings.d.mts} +498 -1
- package/build/es/index.typings.mjs +1887 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/meta.d.mts +3 -27
- package/build/internal/cjs/index.d.ts +53 -18
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/{media-site-media-v1-file-descriptor-files.universal-C5dCrbUZ.d.ts → index.typings.d.ts} +498 -1
- package/build/internal/cjs/index.typings.js +1938 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +3 -27
- package/build/internal/es/index.d.mts +53 -18
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/{media-site-media-v1-file-descriptor-files.universal-C5dCrbUZ.d.mts → index.typings.d.mts} +498 -1
- package/build/internal/es/index.typings.mjs +1887 -0
- package/build/internal/es/index.typings.mjs.map +1 -0
- package/build/internal/es/meta.d.mts +3 -27
- package/package.json +4 -3
package/build/cjs/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { HttpClient, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
|
-
import {
|
|
3
|
-
export {
|
|
1
|
+
import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
|
+
import { GenerateFilesDownloadUrlResponse, GenerateFileDownloadUrlOptions, GenerateFileDownloadUrlResponse, GenerateFileDownloadUrlValidationErrors, FileDescriptor, GetFileDescriptorValidationErrors, GetFileDescriptorsResponse, GetFileDescriptorsValidationErrors, UpdateFileDescriptorValidationErrors, GenerateFileUploadUrlOptions, GenerateFileUploadUrlResponse, GenerateFileUploadUrlValidationErrors, GenerateFileResumableUploadUrlOptions, GenerateFileResumableUploadUrlResponse, GenerateFileResumableUploadUrlValidationErrors, ImportFileOptions, ImportFileResponse, ImportFileValidationErrors, ImportFileRequest, BulkImportFilesResponse, BulkImportFileOptions, BulkImportFileResponse, ListFilesOptions, ListFilesResponse, ListFilesValidationErrors, SearchFilesOptions, SearchFilesResponse, SearchFilesValidationErrors, GenerateVideoStreamingUrlOptions, GenerateVideoStreamingUrlResponse, BulkDeleteFilesOptions, ListDeletedFilesOptions, ListDeletedFilesResponse, ListDeletedFilesValidationErrors, FileDescriptorDeletedEnvelope, FileDescriptorFileFailedEnvelope, FileDescriptorFileReadyEnvelope, FileDescriptorUpdatedEnvelope } from './index.typings.js';
|
|
3
|
+
export { ActionEvent, ApplicationError, Archive, AudioV2, BaseEventMetadata, BulkActionMetadata, BulkAnnotateImageResult, BulkAnnotateImagesRequest, BulkAnnotateImagesResponse, BulkDeleteFilesRequest, BulkDeleteFilesResponse, BulkImportFileRequest, BulkImportFileResult, BulkImportFilesRequest, BulkPublishDraftFileResult, BulkPublishDraftFilesRequest, BulkPublishDraftFilesResponse, BulkRestoreFilesFromTrashBinRequest, BulkRestoreFilesFromTrashBinResponse, Color, ColorRGB, Colors, ContentDisposition, CursorPaging, Cursors, DomainEvent, DomainEventBodyOneOf, DownloadUrl, DraftFilePublished, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, ExternalInfo, FaceRecognition, FileFailed, FileMedia, FileMediaMediaOneOf, FileReady, FocalPoint, FontAsset, FontMedia, GenerateFileDownloadUrlRequest, GenerateFileResumableUploadUrlRequest, GenerateFileUploadUrlRequest, GenerateFilesDownloadUrlRequest, GenerateVideoStreamingUrlRequest, GenerateWebSocketTokenRequest, GenerateWebSocketTokenResponse, GetFileDescriptorRequest, GetFileDescriptorResponse, GetFileDescriptorsRequest, IdentificationData, IdentificationDataIdOneOf, IdentityInfo, IdentityType, ImageAnnotationConfigurations, ImageAnnotationType, ImageMedia, ItemMetadata, ListDeletedFilesRequest, ListFilesRequest, MediaType, MessageEnvelope, Model3D, Namespace, OperationStatus, OtherMedia, PagingMetadataV2, Plan, Plans, RestoreInfo, RootFolder, SearchFilesRequest, ServiceError, SiteQuotaExceededError, SortOrder, Sorting, State, StreamFormat, TotalQuota, UnsupportedRequestValueError, UpdateFileDescriptorRequest, UpdateFileDescriptorResponse, UpdateFileRequest, UpdateFileResponse, UploadProtocol, VideoResolution, WebhookIdentityType } from './index.typings.js';
|
|
4
4
|
|
|
5
|
+
type FileDescriptorNonNullablePaths = `_id` | `displayName` | `url` | `hash` | `private` | `mediaType` | `media.image.colors.palette` | `media.image.faces` | `media.image.faces.${number}.confidence` | `media.image.faces.${number}.x` | `media.image.faces.${number}.y` | `media.image.faces.${number}.height` | `media.image.faces.${number}.width` | `media.audio._id` | `media.audio.assets` | `media.archive._id` | `media.archive.url` | `media.model3d._id` | `media.model3d.url` | `operationStatus` | `labels` | `siteId` | `state`;
|
|
5
6
|
declare function generateFilesDownloadUrl$1(httpClient: HttpClient): GenerateFilesDownloadUrlSignature;
|
|
6
7
|
interface GenerateFilesDownloadUrlSignature {
|
|
7
8
|
/**
|
|
@@ -17,7 +18,7 @@ interface GenerateFilesDownloadUrlSignature {
|
|
|
17
18
|
* You can also pass the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`.
|
|
18
19
|
* Learn more in the File and Folder IDs article.
|
|
19
20
|
*/
|
|
20
|
-
(fileIds: string[]): Promise<GenerateFilesDownloadUrlResponse
|
|
21
|
+
(fileIds: string[]): Promise<NonNullablePaths<GenerateFilesDownloadUrlResponse, `downloadUrl`>>;
|
|
21
22
|
}
|
|
22
23
|
declare function generateFileDownloadUrl$1(httpClient: HttpClient): GenerateFileDownloadUrlSignature;
|
|
23
24
|
interface GenerateFileDownloadUrlSignature {
|
|
@@ -38,7 +39,9 @@ interface GenerateFileDownloadUrlSignature {
|
|
|
38
39
|
* You can also pass the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`.
|
|
39
40
|
* Learn more in the File and Folder IDs article.
|
|
40
41
|
*/
|
|
41
|
-
(fileId: string, options?: GenerateFileDownloadUrlOptions
|
|
42
|
+
(fileId: string, options?: GenerateFileDownloadUrlOptions): Promise<NonNullablePaths<GenerateFileDownloadUrlResponse, `downloadUrls` | `downloadUrls.${number}.url` | `downloadUrls.${number}.assetKey`> & {
|
|
43
|
+
__validationErrorsType?: GenerateFileDownloadUrlValidationErrors;
|
|
44
|
+
}>;
|
|
42
45
|
}
|
|
43
46
|
declare function getFileDescriptor$1(httpClient: HttpClient): GetFileDescriptorSignature;
|
|
44
47
|
interface GetFileDescriptorSignature {
|
|
@@ -50,7 +53,9 @@ interface GetFileDescriptorSignature {
|
|
|
50
53
|
* Learn more in the File and Folder IDs article.
|
|
51
54
|
* @returns Information about the file.
|
|
52
55
|
*/
|
|
53
|
-
(fileId: string): Promise<FileDescriptor
|
|
56
|
+
(fileId: string): Promise<NonNullablePaths<FileDescriptor, FileDescriptorNonNullablePaths> & {
|
|
57
|
+
__validationErrorsType?: GetFileDescriptorValidationErrors;
|
|
58
|
+
}>;
|
|
54
59
|
}
|
|
55
60
|
declare function getFileDescriptors$1(httpClient: HttpClient): GetFileDescriptorsSignature;
|
|
56
61
|
interface GetFileDescriptorsSignature {
|
|
@@ -61,7 +66,11 @@ interface GetFileDescriptorsSignature {
|
|
|
61
66
|
* You can also pass the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`.
|
|
62
67
|
* Learn more in the File and Folder IDs article.
|
|
63
68
|
*/
|
|
64
|
-
(fileIds: string[]): Promise<GetFileDescriptorsResponse
|
|
69
|
+
(fileIds: string[]): Promise<NonNullablePaths<GetFileDescriptorsResponse, {
|
|
70
|
+
[P in FileDescriptorNonNullablePaths]: `files.${number}.${P}`;
|
|
71
|
+
}[FileDescriptorNonNullablePaths]> & {
|
|
72
|
+
__validationErrorsType?: GetFileDescriptorsValidationErrors;
|
|
73
|
+
}>;
|
|
65
74
|
}
|
|
66
75
|
declare function updateFileDescriptor$1(httpClient: HttpClient): UpdateFileDescriptorSignature;
|
|
67
76
|
interface UpdateFileDescriptorSignature {
|
|
@@ -72,7 +81,9 @@ interface UpdateFileDescriptorSignature {
|
|
|
72
81
|
* @param - The file to update.
|
|
73
82
|
* @returns Information about the updated file.
|
|
74
83
|
*/
|
|
75
|
-
(file: FileDescriptor): Promise<FileDescriptor
|
|
84
|
+
(file: NonNullablePaths<FileDescriptor, `_id`>): Promise<NonNullablePaths<FileDescriptor, FileDescriptorNonNullablePaths> & {
|
|
85
|
+
__validationErrorsType?: UpdateFileDescriptorValidationErrors;
|
|
86
|
+
}>;
|
|
76
87
|
}
|
|
77
88
|
declare function generateFileUploadUrl$1(httpClient: HttpClient): GenerateFileUploadUrlSignature;
|
|
78
89
|
interface GenerateFileUploadUrlSignature {
|
|
@@ -86,7 +97,9 @@ interface GenerateFileUploadUrlSignature {
|
|
|
86
97
|
* @param - File mime type.
|
|
87
98
|
* @param - Options to use when generating a file's upload URL.
|
|
88
99
|
*/
|
|
89
|
-
(mimeType: string, options?: GenerateFileUploadUrlOptions
|
|
100
|
+
(mimeType: string, options?: GenerateFileUploadUrlOptions): Promise<NonNullablePaths<GenerateFileUploadUrlResponse, `uploadUrl`> & {
|
|
101
|
+
__validationErrorsType?: GenerateFileUploadUrlValidationErrors;
|
|
102
|
+
}>;
|
|
90
103
|
}
|
|
91
104
|
declare function generateFileResumableUploadUrl$1(httpClient: HttpClient): GenerateFileResumableUploadUrlSignature;
|
|
92
105
|
interface GenerateFileResumableUploadUrlSignature {
|
|
@@ -100,7 +113,9 @@ interface GenerateFileResumableUploadUrlSignature {
|
|
|
100
113
|
* @param - File mime type.
|
|
101
114
|
* @param - Options to use when generating a resumable upload URL.
|
|
102
115
|
*/
|
|
103
|
-
(mimeType: string, options?: GenerateFileResumableUploadUrlOptions
|
|
116
|
+
(mimeType: string, options?: GenerateFileResumableUploadUrlOptions): Promise<NonNullablePaths<GenerateFileResumableUploadUrlResponse, `uploadProtocol` | `uploadUrl` | `uploadToken`> & {
|
|
117
|
+
__validationErrorsType?: GenerateFileResumableUploadUrlValidationErrors;
|
|
118
|
+
}>;
|
|
104
119
|
}
|
|
105
120
|
declare function importFile$1(httpClient: HttpClient): ImportFileSignature;
|
|
106
121
|
interface ImportFileSignature {
|
|
@@ -123,7 +138,11 @@ interface ImportFileSignature {
|
|
|
123
138
|
* @param - Publicly accessible external file URL.
|
|
124
139
|
* @param - Options to use when importing a single file.
|
|
125
140
|
*/
|
|
126
|
-
(url: string, options?: ImportFileOptions
|
|
141
|
+
(url: string, options?: ImportFileOptions): Promise<NonNullablePaths<ImportFileResponse, {
|
|
142
|
+
[P in FileDescriptorNonNullablePaths]: `file.${P}`;
|
|
143
|
+
}[FileDescriptorNonNullablePaths]> & {
|
|
144
|
+
__validationErrorsType?: ImportFileValidationErrors;
|
|
145
|
+
}>;
|
|
127
146
|
}
|
|
128
147
|
declare function bulkImportFiles$1(httpClient: HttpClient): BulkImportFilesSignature;
|
|
129
148
|
interface BulkImportFilesSignature {
|
|
@@ -148,7 +167,9 @@ interface BulkImportFilesSignature {
|
|
|
148
167
|
* @param - Options to use when uploading multiple files.
|
|
149
168
|
* @deprecated
|
|
150
169
|
*/
|
|
151
|
-
(importFileRequests: ImportFileRequest[]): Promise<BulkImportFilesResponse
|
|
170
|
+
(importFileRequests: NonNullablePaths<ImportFileRequest, `url`>[]): Promise<NonNullablePaths<BulkImportFilesResponse, {
|
|
171
|
+
[P in FileDescriptorNonNullablePaths]: `files.${number}.${P}`;
|
|
172
|
+
}[FileDescriptorNonNullablePaths]>>;
|
|
152
173
|
}
|
|
153
174
|
declare function bulkImportFile$1(httpClient: HttpClient): BulkImportFileSignature;
|
|
154
175
|
interface BulkImportFileSignature {
|
|
@@ -172,7 +193,9 @@ interface BulkImportFileSignature {
|
|
|
172
193
|
* @param - Information about the files to import.
|
|
173
194
|
* @param - Options to include the file descriptor in the response.
|
|
174
195
|
*/
|
|
175
|
-
(importFileRequests: ImportFileRequest[], options?: BulkImportFileOptions
|
|
196
|
+
(importFileRequests: NonNullablePaths<ImportFileRequest, `url`>[], options?: BulkImportFileOptions): Promise<NonNullablePaths<BulkImportFileResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | {
|
|
197
|
+
[P in FileDescriptorNonNullablePaths]: `results.${number}.item.${P}`;
|
|
198
|
+
}[FileDescriptorNonNullablePaths] | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`>>;
|
|
176
199
|
}
|
|
177
200
|
declare function listFiles$1(httpClient: HttpClient): ListFilesSignature;
|
|
178
201
|
interface ListFilesSignature {
|
|
@@ -182,7 +205,11 @@ interface ListFilesSignature {
|
|
|
182
205
|
* To retrieve a list of files within a specific folder in the Media Manager, specify the folder's ID in the `parentFolderId` parameter. If no folder is specified, the method retrieves the list of files in the root folder of the Media Manager.
|
|
183
206
|
* @param - Options to use when listing media files.
|
|
184
207
|
*/
|
|
185
|
-
(options?: ListFilesOptions
|
|
208
|
+
(options?: ListFilesOptions): Promise<NonNullablePaths<ListFilesResponse, {
|
|
209
|
+
[P in FileDescriptorNonNullablePaths]: `files.${number}.${P}`;
|
|
210
|
+
}[FileDescriptorNonNullablePaths]> & {
|
|
211
|
+
__validationErrorsType?: ListFilesValidationErrors;
|
|
212
|
+
}>;
|
|
186
213
|
}
|
|
187
214
|
declare function searchFiles$1(httpClient: HttpClient): SearchFilesSignature;
|
|
188
215
|
interface SearchFilesSignature {
|
|
@@ -192,7 +219,11 @@ interface SearchFilesSignature {
|
|
|
192
219
|
* If no parameters are specified, the endpoint returns all files in the `MEDIA_ROOT` folder.
|
|
193
220
|
* @param - Options to specify which folders to search.
|
|
194
221
|
*/
|
|
195
|
-
(options?: SearchFilesOptions
|
|
222
|
+
(options?: SearchFilesOptions): Promise<NonNullablePaths<SearchFilesResponse, {
|
|
223
|
+
[P in FileDescriptorNonNullablePaths]: `files.${number}.${P}`;
|
|
224
|
+
}[FileDescriptorNonNullablePaths]> & {
|
|
225
|
+
__validationErrorsType?: SearchFilesValidationErrors;
|
|
226
|
+
}>;
|
|
196
227
|
}
|
|
197
228
|
declare function generateVideoStreamingUrl$1(httpClient: HttpClient): GenerateVideoStreamingUrlSignature;
|
|
198
229
|
interface GenerateVideoStreamingUrlSignature {
|
|
@@ -206,7 +237,7 @@ interface GenerateVideoStreamingUrlSignature {
|
|
|
206
237
|
* You can also pass the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`.
|
|
207
238
|
* Learn more in the File and Folder IDs article.
|
|
208
239
|
*/
|
|
209
|
-
(fileId: string, options?: GenerateVideoStreamingUrlOptions
|
|
240
|
+
(fileId: string, options?: GenerateVideoStreamingUrlOptions): Promise<NonNullablePaths<GenerateVideoStreamingUrlResponse, `downloadUrl.url` | `downloadUrl.assetKey`>>;
|
|
210
241
|
}
|
|
211
242
|
declare function bulkDeleteFiles$1(httpClient: HttpClient): BulkDeleteFilesSignature;
|
|
212
243
|
interface BulkDeleteFilesSignature {
|
|
@@ -227,7 +258,7 @@ interface BulkDeleteFilesSignature {
|
|
|
227
258
|
* You can also pass the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`.
|
|
228
259
|
* Learn more in the File and Folder IDs article.
|
|
229
260
|
*/
|
|
230
|
-
(fileIds: string[], options?: BulkDeleteFilesOptions
|
|
261
|
+
(fileIds: string[], options?: BulkDeleteFilesOptions): Promise<void>;
|
|
231
262
|
}
|
|
232
263
|
declare function bulkRestoreFilesFromTrashBin$1(httpClient: HttpClient): BulkRestoreFilesFromTrashBinSignature;
|
|
233
264
|
interface BulkRestoreFilesFromTrashBinSignature {
|
|
@@ -248,7 +279,11 @@ interface ListDeletedFilesSignature {
|
|
|
248
279
|
* >**Note:** The Media Manager's trash bin (`TRASH-ROOT` folder) only contains temporarily deleted files, not permanently deleted files.
|
|
249
280
|
* @param - Options to use when listing deleted files from the trash bin.
|
|
250
281
|
*/
|
|
251
|
-
(options?: ListDeletedFilesOptions
|
|
282
|
+
(options?: ListDeletedFilesOptions): Promise<NonNullablePaths<ListDeletedFilesResponse, {
|
|
283
|
+
[P in FileDescriptorNonNullablePaths]: `files.${number}.${P}`;
|
|
284
|
+
}[FileDescriptorNonNullablePaths]> & {
|
|
285
|
+
__validationErrorsType?: ListDeletedFilesValidationErrors;
|
|
286
|
+
}>;
|
|
252
287
|
}
|
|
253
288
|
declare const onFileDescriptorDeleted$1: EventDefinition<FileDescriptorDeletedEnvelope, "wix.media.site_media.v1.file_descriptor_deleted">;
|
|
254
289
|
declare const onFileDescriptorFileFailed$1: EventDefinition<FileDescriptorFileFailedEnvelope, "wix.media.site_media.v1.file_descriptor_file_failed">;
|