@wix/auto_sdk_media_files 1.0.20 → 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.
@@ -169,32 +169,7 @@ interface ImageMedia {
169
169
  caption?: string | null;
170
170
  }
171
171
  interface Image {
172
- /**
173
- * enum TextDetection{
174
- * // No detection was made
175
- * UNKNOWN_TEXT_DETECTION = 0;
176
- * // The image contains text
177
- * CONTAINS_TEXT = 1;
178
- * // The image does not contain text
179
- * NO_TEXT = 2;
180
- * }
181
- * enum AnimationDetection{
182
- * // No detection was made
183
- * UNKNOWN_ANIMATION_DETECTION = 0;
184
- * // The image contains animation
185
- * CONTAINS_ANIMATION = 1;
186
- * // The image does not contain animation
187
- * NO_ANIMATION = 2;
188
- * }
189
- * message ImageContent{
190
- * option (.wix.api.decomposite_of) = "wix.common.ImageContent";
191
- * // Text detection
192
- * TextDetection text = 1;
193
- * // Animation detection
194
- * AnimationDetection animation = 2;
195
- * }
196
- * WixMedia image ID.
197
- */
172
+ /** WixMedia image ID. */
198
173
  id?: string;
199
174
  /** Image URL. */
200
175
  url?: string;
@@ -1,7 +1,8 @@
1
- import { HttpClient, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
1
+ import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
2
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.mjs';
3
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.mjs';
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,8 +39,8 @@ 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 | undefined): Promise<GenerateFileDownloadUrlResponse & {
42
- __validationErrorsType?: GenerateFileDownloadUrlValidationErrors | undefined;
42
+ (fileId: string, options?: GenerateFileDownloadUrlOptions): Promise<NonNullablePaths<GenerateFileDownloadUrlResponse, `downloadUrls` | `downloadUrls.${number}.url` | `downloadUrls.${number}.assetKey`> & {
43
+ __validationErrorsType?: GenerateFileDownloadUrlValidationErrors;
43
44
  }>;
44
45
  }
45
46
  declare function getFileDescriptor$1(httpClient: HttpClient): GetFileDescriptorSignature;
@@ -52,8 +53,8 @@ interface GetFileDescriptorSignature {
52
53
  * Learn more in the File and Folder IDs article.
53
54
  * @returns Information about the file.
54
55
  */
55
- (fileId: string): Promise<FileDescriptor & {
56
- __validationErrorsType?: GetFileDescriptorValidationErrors | undefined;
56
+ (fileId: string): Promise<NonNullablePaths<FileDescriptor, FileDescriptorNonNullablePaths> & {
57
+ __validationErrorsType?: GetFileDescriptorValidationErrors;
57
58
  }>;
58
59
  }
59
60
  declare function getFileDescriptors$1(httpClient: HttpClient): GetFileDescriptorsSignature;
@@ -65,8 +66,10 @@ interface GetFileDescriptorsSignature {
65
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"]`.
66
67
  * Learn more in the File and Folder IDs article.
67
68
  */
68
- (fileIds: string[]): Promise<GetFileDescriptorsResponse & {
69
- __validationErrorsType?: GetFileDescriptorsValidationErrors | undefined;
69
+ (fileIds: string[]): Promise<NonNullablePaths<GetFileDescriptorsResponse, {
70
+ [P in FileDescriptorNonNullablePaths]: `files.${number}.${P}`;
71
+ }[FileDescriptorNonNullablePaths]> & {
72
+ __validationErrorsType?: GetFileDescriptorsValidationErrors;
70
73
  }>;
71
74
  }
72
75
  declare function updateFileDescriptor$1(httpClient: HttpClient): UpdateFileDescriptorSignature;
@@ -78,8 +81,8 @@ interface UpdateFileDescriptorSignature {
78
81
  * @param - The file to update.
79
82
  * @returns Information about the updated file.
80
83
  */
81
- (file: FileDescriptor): Promise<FileDescriptor & {
82
- __validationErrorsType?: UpdateFileDescriptorValidationErrors | undefined;
84
+ (file: NonNullablePaths<FileDescriptor, `_id`>): Promise<NonNullablePaths<FileDescriptor, FileDescriptorNonNullablePaths> & {
85
+ __validationErrorsType?: UpdateFileDescriptorValidationErrors;
83
86
  }>;
84
87
  }
85
88
  declare function generateFileUploadUrl$1(httpClient: HttpClient): GenerateFileUploadUrlSignature;
@@ -94,8 +97,8 @@ interface GenerateFileUploadUrlSignature {
94
97
  * @param - File mime type.
95
98
  * @param - Options to use when generating a file's upload URL.
96
99
  */
97
- (mimeType: string, options?: GenerateFileUploadUrlOptions | undefined): Promise<GenerateFileUploadUrlResponse & {
98
- __validationErrorsType?: GenerateFileUploadUrlValidationErrors | undefined;
100
+ (mimeType: string, options?: GenerateFileUploadUrlOptions): Promise<NonNullablePaths<GenerateFileUploadUrlResponse, `uploadUrl`> & {
101
+ __validationErrorsType?: GenerateFileUploadUrlValidationErrors;
99
102
  }>;
100
103
  }
101
104
  declare function generateFileResumableUploadUrl$1(httpClient: HttpClient): GenerateFileResumableUploadUrlSignature;
@@ -110,8 +113,8 @@ interface GenerateFileResumableUploadUrlSignature {
110
113
  * @param - File mime type.
111
114
  * @param - Options to use when generating a resumable upload URL.
112
115
  */
113
- (mimeType: string, options?: GenerateFileResumableUploadUrlOptions | undefined): Promise<GenerateFileResumableUploadUrlResponse & {
114
- __validationErrorsType?: GenerateFileResumableUploadUrlValidationErrors | undefined;
116
+ (mimeType: string, options?: GenerateFileResumableUploadUrlOptions): Promise<NonNullablePaths<GenerateFileResumableUploadUrlResponse, `uploadProtocol` | `uploadUrl` | `uploadToken`> & {
117
+ __validationErrorsType?: GenerateFileResumableUploadUrlValidationErrors;
115
118
  }>;
116
119
  }
117
120
  declare function importFile$1(httpClient: HttpClient): ImportFileSignature;
@@ -135,8 +138,10 @@ interface ImportFileSignature {
135
138
  * @param - Publicly accessible external file URL.
136
139
  * @param - Options to use when importing a single file.
137
140
  */
138
- (url: string, options?: ImportFileOptions | undefined): Promise<ImportFileResponse & {
139
- __validationErrorsType?: ImportFileValidationErrors | undefined;
141
+ (url: string, options?: ImportFileOptions): Promise<NonNullablePaths<ImportFileResponse, {
142
+ [P in FileDescriptorNonNullablePaths]: `file.${P}`;
143
+ }[FileDescriptorNonNullablePaths]> & {
144
+ __validationErrorsType?: ImportFileValidationErrors;
140
145
  }>;
141
146
  }
142
147
  declare function bulkImportFiles$1(httpClient: HttpClient): BulkImportFilesSignature;
@@ -162,7 +167,9 @@ interface BulkImportFilesSignature {
162
167
  * @param - Options to use when uploading multiple files.
163
168
  * @deprecated
164
169
  */
165
- (importFileRequests: ImportFileRequest[]): Promise<BulkImportFilesResponse>;
170
+ (importFileRequests: NonNullablePaths<ImportFileRequest, `url`>[]): Promise<NonNullablePaths<BulkImportFilesResponse, {
171
+ [P in FileDescriptorNonNullablePaths]: `files.${number}.${P}`;
172
+ }[FileDescriptorNonNullablePaths]>>;
166
173
  }
167
174
  declare function bulkImportFile$1(httpClient: HttpClient): BulkImportFileSignature;
168
175
  interface BulkImportFileSignature {
@@ -186,7 +193,9 @@ interface BulkImportFileSignature {
186
193
  * @param - Information about the files to import.
187
194
  * @param - Options to include the file descriptor in the response.
188
195
  */
189
- (importFileRequests: ImportFileRequest[], options?: BulkImportFileOptions | undefined): Promise<BulkImportFileResponse>;
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`>>;
190
199
  }
191
200
  declare function listFiles$1(httpClient: HttpClient): ListFilesSignature;
192
201
  interface ListFilesSignature {
@@ -196,8 +205,10 @@ interface ListFilesSignature {
196
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.
197
206
  * @param - Options to use when listing media files.
198
207
  */
199
- (options?: ListFilesOptions | undefined): Promise<ListFilesResponse & {
200
- __validationErrorsType?: ListFilesValidationErrors | undefined;
208
+ (options?: ListFilesOptions): Promise<NonNullablePaths<ListFilesResponse, {
209
+ [P in FileDescriptorNonNullablePaths]: `files.${number}.${P}`;
210
+ }[FileDescriptorNonNullablePaths]> & {
211
+ __validationErrorsType?: ListFilesValidationErrors;
201
212
  }>;
202
213
  }
203
214
  declare function searchFiles$1(httpClient: HttpClient): SearchFilesSignature;
@@ -208,8 +219,10 @@ interface SearchFilesSignature {
208
219
  * If no parameters are specified, the endpoint returns all files in the `MEDIA_ROOT` folder.
209
220
  * @param - Options to specify which folders to search.
210
221
  */
211
- (options?: SearchFilesOptions | undefined): Promise<SearchFilesResponse & {
212
- __validationErrorsType?: SearchFilesValidationErrors | undefined;
222
+ (options?: SearchFilesOptions): Promise<NonNullablePaths<SearchFilesResponse, {
223
+ [P in FileDescriptorNonNullablePaths]: `files.${number}.${P}`;
224
+ }[FileDescriptorNonNullablePaths]> & {
225
+ __validationErrorsType?: SearchFilesValidationErrors;
213
226
  }>;
214
227
  }
215
228
  declare function generateVideoStreamingUrl$1(httpClient: HttpClient): GenerateVideoStreamingUrlSignature;
@@ -224,7 +237,7 @@ interface GenerateVideoStreamingUrlSignature {
224
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"]`.
225
238
  * Learn more in the File and Folder IDs article.
226
239
  */
227
- (fileId: string, options?: GenerateVideoStreamingUrlOptions | undefined): Promise<GenerateVideoStreamingUrlResponse>;
240
+ (fileId: string, options?: GenerateVideoStreamingUrlOptions): Promise<NonNullablePaths<GenerateVideoStreamingUrlResponse, `downloadUrl.url` | `downloadUrl.assetKey`>>;
228
241
  }
229
242
  declare function bulkDeleteFiles$1(httpClient: HttpClient): BulkDeleteFilesSignature;
230
243
  interface BulkDeleteFilesSignature {
@@ -245,7 +258,7 @@ interface BulkDeleteFilesSignature {
245
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"]`.
246
259
  * Learn more in the File and Folder IDs article.
247
260
  */
248
- (fileIds: string[], options?: BulkDeleteFilesOptions | undefined): Promise<void>;
261
+ (fileIds: string[], options?: BulkDeleteFilesOptions): Promise<void>;
249
262
  }
250
263
  declare function bulkRestoreFilesFromTrashBin$1(httpClient: HttpClient): BulkRestoreFilesFromTrashBinSignature;
251
264
  interface BulkRestoreFilesFromTrashBinSignature {
@@ -266,8 +279,10 @@ interface ListDeletedFilesSignature {
266
279
  * >**Note:** The Media Manager's trash bin (`TRASH-ROOT` folder) only contains temporarily deleted files, not permanently deleted files.
267
280
  * @param - Options to use when listing deleted files from the trash bin.
268
281
  */
269
- (options?: ListDeletedFilesOptions | undefined): Promise<ListDeletedFilesResponse & {
270
- __validationErrorsType?: ListDeletedFilesValidationErrors | undefined;
282
+ (options?: ListDeletedFilesOptions): Promise<NonNullablePaths<ListDeletedFilesResponse, {
283
+ [P in FileDescriptorNonNullablePaths]: `files.${number}.${P}`;
284
+ }[FileDescriptorNonNullablePaths]> & {
285
+ __validationErrorsType?: ListDeletedFilesValidationErrors;
271
286
  }>;
272
287
  }
273
288
  declare const onFileDescriptorDeleted$1: EventDefinition<FileDescriptorDeletedEnvelope, "wix.media.site_media.v1.file_descriptor_deleted">;