@wix/media 1.0.9 → 1.0.11
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/src/media-site-media-v1-file-descriptor.http.d.ts +7 -1
- package/build/cjs/src/media-site-media-v1-file-descriptor.http.js +58 -5
- package/build/cjs/src/media-site-media-v1-file-descriptor.http.js.map +1 -1
- package/build/cjs/src/media-site-media-v1-file-descriptor.public.d.ts +5 -4
- package/build/cjs/src/media-site-media-v1-file-descriptor.public.js +9 -3
- package/build/cjs/src/media-site-media-v1-file-descriptor.public.js.map +1 -1
- package/build/cjs/src/media-site-media-v1-file-descriptor.types.d.ts +74 -16
- package/build/cjs/src/media-site-media-v1-file-descriptor.types.js.map +1 -1
- package/build/cjs/src/media-site-media-v1-file-descriptor.universal.d.ts +186 -23
- package/build/cjs/src/media-site-media-v1-file-descriptor.universal.js +77 -13
- package/build/cjs/src/media-site-media-v1-file-descriptor.universal.js.map +1 -1
- package/build/cjs/src/media-site-media-v1-folder.http.js +9 -6
- package/build/cjs/src/media-site-media-v1-folder.http.js.map +1 -1
- package/build/cjs/src/media-site-media-v1-folder.public.d.ts +1 -1
- package/build/cjs/src/media-site-media-v1-folder.public.js +1 -1
- package/build/cjs/src/media-site-media-v1-folder.public.js.map +1 -1
- package/build/cjs/src/media-site-media-v1-folder.types.d.ts +29 -7
- package/build/cjs/src/media-site-media-v1-folder.types.js.map +1 -1
- package/build/cjs/src/media-site-media-v1-folder.universal.d.ts +68 -9
- package/build/cjs/src/media-site-media-v1-folder.universal.js +10 -7
- package/build/cjs/src/media-site-media-v1-folder.universal.js.map +1 -1
- package/build/es/src/media-site-media-v1-file-descriptor.http.d.ts +7 -1
- package/build/es/src/media-site-media-v1-file-descriptor.http.js +56 -4
- package/build/es/src/media-site-media-v1-file-descriptor.http.js.map +1 -1
- package/build/es/src/media-site-media-v1-file-descriptor.public.d.ts +5 -4
- package/build/es/src/media-site-media-v1-file-descriptor.public.js +8 -3
- package/build/es/src/media-site-media-v1-file-descriptor.public.js.map +1 -1
- package/build/es/src/media-site-media-v1-file-descriptor.types.d.ts +74 -16
- package/build/es/src/media-site-media-v1-file-descriptor.types.js.map +1 -1
- package/build/es/src/media-site-media-v1-file-descriptor.universal.d.ts +186 -23
- package/build/es/src/media-site-media-v1-file-descriptor.universal.js +75 -12
- package/build/es/src/media-site-media-v1-file-descriptor.universal.js.map +1 -1
- package/build/es/src/media-site-media-v1-folder.http.js +9 -6
- package/build/es/src/media-site-media-v1-folder.http.js.map +1 -1
- package/build/es/src/media-site-media-v1-folder.public.d.ts +1 -1
- package/build/es/src/media-site-media-v1-folder.public.js +1 -1
- package/build/es/src/media-site-media-v1-folder.public.js.map +1 -1
- package/build/es/src/media-site-media-v1-folder.types.d.ts +29 -7
- package/build/es/src/media-site-media-v1-folder.types.js.map +1 -1
- package/build/es/src/media-site-media-v1-folder.universal.d.ts +68 -9
- package/build/es/src/media-site-media-v1-folder.universal.js +10 -7
- package/build/es/src/media-site-media-v1-folder.universal.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media-site-media-v1-file-descriptor.public.js","sourceRoot":"","sources":["../../../src/media-site-media-v1-file-descriptor.public.ts"],"names":[],"mappings":"AACA,OAAO,EACL,wBAAwB,IAAI,iCAAiC,EAC7D,uBAAuB,IAAI,gCAAgC,EAC3D,iBAAiB,IAAI,0BAA0B,EAC/C,kBAAkB,IAAI,2BAA2B,EACjD,UAAU,IAAI,mBAAmB,EACjC,qBAAqB,IAAI,8BAA8B,EACvD,8BAA8B,IAAI,uCAAuC,EACzE,UAAU,IAAI,mBAAmB,EACjC,eAAe,IAAI,wBAAwB,EAC3C,SAAS,IAAI,kBAAkB,EAC/B,WAAW,IAAI,oBAAoB,EACnC,yBAAyB,IAAI,kCAAkC,EAC/D,eAAe,IAAI,wBAAwB,EAC3C,4BAA4B,IAAI,qCAAqC,EACrE,gBAAgB,IAAI,yBAAyB,
|
|
1
|
+
{"version":3,"file":"media-site-media-v1-file-descriptor.public.js","sourceRoot":"","sources":["../../../src/media-site-media-v1-file-descriptor.public.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,43 +1,91 @@
|
|
|
1
1
|
export interface FileDescriptor {
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* File ID. Generated when a file is uploaded to the Media Manager.
|
|
4
|
+
* @readonly
|
|
5
|
+
*/
|
|
3
6
|
id?: string;
|
|
4
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* File name as it appears in the Media Manager.
|
|
9
|
+
* @readonly
|
|
10
|
+
*/
|
|
5
11
|
displayName?: string;
|
|
6
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* Static URL of the file.
|
|
14
|
+
* @readonly
|
|
15
|
+
*/
|
|
7
16
|
url?: string;
|
|
8
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* ID of the file's parent folder.
|
|
19
|
+
* @readonly
|
|
20
|
+
*/
|
|
9
21
|
parentFolderId?: string | null;
|
|
10
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* File hash.
|
|
24
|
+
* @readonly
|
|
25
|
+
*/
|
|
11
26
|
hash?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Size of the uploaded file in bytes.
|
|
29
|
+
* @readonly
|
|
30
|
+
*/
|
|
31
|
+
sizeInBytes?: string | null;
|
|
12
32
|
/**
|
|
13
33
|
* Whether the link to the uploaded file is public or private. Private links require a token.
|
|
14
34
|
* @readonly
|
|
15
35
|
*/
|
|
16
36
|
private?: boolean;
|
|
17
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* Media file type.
|
|
39
|
+
* @readonly
|
|
40
|
+
*/
|
|
18
41
|
mediaType?: MediaType;
|
|
19
|
-
/**
|
|
42
|
+
/**
|
|
43
|
+
* Media file content.
|
|
44
|
+
* @readonly
|
|
45
|
+
*/
|
|
20
46
|
media?: FileMedia;
|
|
21
47
|
/**
|
|
22
48
|
* Status of the file that was uploaded.
|
|
23
49
|
* * `FAILED`: The file failed to upload, for example, during media post processing.
|
|
24
50
|
* * `READY`: The file uploaded, finished all processing, and is ready for use.
|
|
25
51
|
* * `PENDING`: The file is processing and the URLs are not yet available. This response is returned when importing a file.
|
|
52
|
+
* @readonly
|
|
26
53
|
*/
|
|
27
54
|
operationStatus?: OperationStatus;
|
|
28
|
-
/**
|
|
55
|
+
/**
|
|
56
|
+
* URL where the file was uploaded from.
|
|
57
|
+
* @readonly
|
|
58
|
+
*/
|
|
29
59
|
sourceUrl?: string | null;
|
|
30
|
-
/**
|
|
60
|
+
/**
|
|
61
|
+
* URL of the file's thumbnail.
|
|
62
|
+
* @readonly
|
|
63
|
+
*/
|
|
31
64
|
thumbnailUrl?: string | null;
|
|
32
|
-
/**
|
|
65
|
+
/**
|
|
66
|
+
* 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.
|
|
67
|
+
* @readonly
|
|
68
|
+
*/
|
|
33
69
|
labels?: string[];
|
|
34
|
-
/**
|
|
70
|
+
/**
|
|
71
|
+
* Date and time the file was created.
|
|
72
|
+
* @readonly
|
|
73
|
+
*/
|
|
35
74
|
createdDate?: Date;
|
|
36
|
-
/**
|
|
75
|
+
/**
|
|
76
|
+
* Date and time the file was updated.
|
|
77
|
+
* @readonly
|
|
78
|
+
*/
|
|
37
79
|
updatedDate?: Date;
|
|
38
|
-
/**
|
|
80
|
+
/**
|
|
81
|
+
* The Wix site ID where the media file is stored.
|
|
82
|
+
* @readonly
|
|
83
|
+
*/
|
|
39
84
|
siteId?: string;
|
|
40
|
-
/**
|
|
85
|
+
/**
|
|
86
|
+
* State of the file.
|
|
87
|
+
* @readonly
|
|
88
|
+
*/
|
|
41
89
|
state?: State;
|
|
42
90
|
}
|
|
43
91
|
export declare enum MediaType {
|
|
@@ -315,6 +363,16 @@ export interface UpdateFileResponse {
|
|
|
315
363
|
/** Information about the updated file. */
|
|
316
364
|
file?: FileDescriptor;
|
|
317
365
|
}
|
|
366
|
+
export interface UpdateFileDescriptorRequest {
|
|
367
|
+
/** A partial file object, see updatable properties in the FileDescriptor object */
|
|
368
|
+
file: FileDescriptor;
|
|
369
|
+
/** field mask */
|
|
370
|
+
fieldMask?: string[];
|
|
371
|
+
}
|
|
372
|
+
export interface UpdateFileDescriptorResponse {
|
|
373
|
+
/** Information about the updated file. */
|
|
374
|
+
file?: FileDescriptor;
|
|
375
|
+
}
|
|
318
376
|
export interface GenerateFileUploadUrlRequest {
|
|
319
377
|
/** File mime type. */
|
|
320
378
|
mimeType: string | null;
|
|
@@ -406,7 +464,7 @@ export interface ImportFileResponse {
|
|
|
406
464
|
}
|
|
407
465
|
export interface BulkImportFilesRequest {
|
|
408
466
|
/** Information about the files to import. */
|
|
409
|
-
importFileRequests
|
|
467
|
+
importFileRequests: ImportFileRequest[];
|
|
410
468
|
}
|
|
411
469
|
export interface BulkImportFilesResponse {
|
|
412
470
|
/** Information about the imported files. */
|
|
@@ -531,7 +589,7 @@ export interface GenerateWebSocketTokenResponse {
|
|
|
531
589
|
}
|
|
532
590
|
export interface BulkDeleteFilesRequest {
|
|
533
591
|
/** IDs of the files to move to the Media Manager's trash bin. */
|
|
534
|
-
fileIds
|
|
592
|
+
fileIds: string[];
|
|
535
593
|
/**
|
|
536
594
|
* Whether the specified files are permanently deleted. <br />
|
|
537
595
|
* Default: `false`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media-site-media-v1-file-descriptor.types.js","sourceRoot":"","sources":["../../../src/media-site-media-v1-file-descriptor.types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"media-site-media-v1-file-descriptor.types.js","sourceRoot":"","sources":["../../../src/media-site-media-v1-file-descriptor.types.ts"],"names":[],"mappings":"AA2FA,MAAM,CAAN,IAAY,SAOX;AAPD,WAAY,SAAS;IACnB,gCAAmB,CAAA;IACnB,4BAAe,CAAA;IACf,4BAAe,CAAA;IACf,4BAAe,CAAA;IACf,kCAAqB,CAAA;IACrB,8BAAiB,CAAA;AACnB,CAAC,EAPW,SAAS,KAAT,SAAS,QAOpB;AA4KD,MAAM,CAAN,IAAY,eAOX;AAPD,WAAY,eAAe;IACzB,uCAAuC;IACvC,oCAAiB,CAAA;IACjB,oCAAoC;IACpC,kCAAe,CAAA;IACf,kEAAkE;IAClE,sCAAmB,CAAA;AACrB,CAAC,EAPW,eAAe,KAAf,eAAe,QAO1B;AAED,MAAM,CAAN,IAAY,KAGX;AAHD,WAAY,KAAK;IACf,kBAAS,CAAA;IACT,4BAAmB,CAAA;AACrB,CAAC,EAHW,KAAK,KAAL,KAAK,QAGhB;AAiLD,MAAM,CAAN,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,wEAAwE;IACxE,6BAAW,CAAA;AACb,CAAC,EAHW,cAAc,KAAd,cAAc,QAGzB;AAgFD,MAAM,CAAN,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB;AA2DD,MAAM,CAAN,IAAY,UAOX;AAPD,WAAY,UAAU;IACpB,6BAA6B;IAC7B,uCAAyB,CAAA;IACzB,sCAAsC;IACtC,uCAAyB,CAAA;IACzB,kCAAkC;IAClC,2DAA6C,CAAA;AAC/C,CAAC,EAPW,UAAU,KAAV,UAAU,QAOrB;AAgBD,MAAM,CAAN,IAAY,YAIX;AAJD,WAAY,YAAY;IACtB,mCAAmB,CAAA;IACnB,2BAAW,CAAA;IACX,6BAAa,CAAA;AACf,CAAC,EAJW,YAAY,KAAZ,YAAY,QAIvB"}
|
|
@@ -5,16 +5,36 @@ export declare const __debug: {
|
|
|
5
5
|
};
|
|
6
6
|
};
|
|
7
7
|
export interface FileDescriptor {
|
|
8
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* File ID. Generated when a file is uploaded to the Media Manager.
|
|
10
|
+
* @readonly
|
|
11
|
+
*/
|
|
9
12
|
_id?: string;
|
|
10
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* File name as it appears in the Media Manager.
|
|
15
|
+
* @readonly
|
|
16
|
+
*/
|
|
11
17
|
displayName?: string;
|
|
12
|
-
/**
|
|
18
|
+
/**
|
|
19
|
+
* Static URL of the file.
|
|
20
|
+
* @readonly
|
|
21
|
+
*/
|
|
13
22
|
url?: string;
|
|
14
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* ID of the file's parent folder.
|
|
25
|
+
* @readonly
|
|
26
|
+
*/
|
|
15
27
|
parentFolderId?: string | null;
|
|
16
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* File hash.
|
|
30
|
+
* @readonly
|
|
31
|
+
*/
|
|
17
32
|
hash?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Size of the uploaded file in bytes.
|
|
35
|
+
* @readonly
|
|
36
|
+
*/
|
|
37
|
+
sizeInBytes?: string | null;
|
|
18
38
|
/**
|
|
19
39
|
* Whether the link to the uploaded file is public or private. Private links require a token.
|
|
20
40
|
* @readonly
|
|
@@ -24,9 +44,13 @@ export interface FileDescriptor {
|
|
|
24
44
|
* Media file type.
|
|
25
45
|
*
|
|
26
46
|
* Supported values: `"IMAGE"`, `"VIDEO"`, `"AUDIO"`, `"DOCUMENT"`, `"VECTOR"`
|
|
47
|
+
* @readonly
|
|
27
48
|
*/
|
|
28
49
|
mediaType?: MediaType;
|
|
29
|
-
/**
|
|
50
|
+
/**
|
|
51
|
+
* Media file content.
|
|
52
|
+
* @readonly
|
|
53
|
+
*/
|
|
30
54
|
media?: FileMedia;
|
|
31
55
|
/**
|
|
32
56
|
* Status of the file that was uploaded.
|
|
@@ -35,24 +59,44 @@ export interface FileDescriptor {
|
|
|
35
59
|
* * `FAILED`: The file failed to upload, for example, during media post processing.
|
|
36
60
|
* * `READY`: The file uploaded, finished all processing, and is ready for use.
|
|
37
61
|
* * `PENDING`: The file is processing and the URLs are not yet available. This response is returned when importing a file.
|
|
62
|
+
* @readonly
|
|
38
63
|
*/
|
|
39
64
|
operationStatus?: OperationStatus;
|
|
40
|
-
/**
|
|
65
|
+
/**
|
|
66
|
+
* URL where the file was uploaded from.
|
|
67
|
+
* @readonly
|
|
68
|
+
*/
|
|
41
69
|
sourceUrl?: string | null;
|
|
42
|
-
/**
|
|
70
|
+
/**
|
|
71
|
+
* URL of the file's thumbnail.
|
|
72
|
+
* @readonly
|
|
73
|
+
*/
|
|
43
74
|
thumbnailUrl?: string | null;
|
|
44
|
-
/**
|
|
75
|
+
/**
|
|
76
|
+
* 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.
|
|
77
|
+
* @readonly
|
|
78
|
+
*/
|
|
45
79
|
labels?: string[];
|
|
46
|
-
/**
|
|
80
|
+
/**
|
|
81
|
+
* Date and time the file was created.
|
|
82
|
+
* @readonly
|
|
83
|
+
*/
|
|
47
84
|
_createdDate?: Date;
|
|
48
|
-
/**
|
|
85
|
+
/**
|
|
86
|
+
* Date and time the file was updated.
|
|
87
|
+
* @readonly
|
|
88
|
+
*/
|
|
49
89
|
_updatedDate?: Date;
|
|
50
|
-
/**
|
|
90
|
+
/**
|
|
91
|
+
* The Wix site ID where the media file is stored.
|
|
92
|
+
* @readonly
|
|
93
|
+
*/
|
|
51
94
|
siteId?: string;
|
|
52
95
|
/**
|
|
53
96
|
* State of the file.
|
|
54
97
|
*
|
|
55
98
|
* Supported values: `"OK"`, `"DELETED"`
|
|
99
|
+
* @readonly
|
|
56
100
|
*/
|
|
57
101
|
state?: State;
|
|
58
102
|
}
|
|
@@ -275,6 +319,16 @@ export interface UpdateFileResponse {
|
|
|
275
319
|
/** Information about the updated file. */
|
|
276
320
|
file?: FileDescriptor;
|
|
277
321
|
}
|
|
322
|
+
export interface UpdateFileDescriptorRequest {
|
|
323
|
+
/** A partial file object, see updatable properties in the FileDescriptor object */
|
|
324
|
+
file: FileDescriptor;
|
|
325
|
+
/** field mask */
|
|
326
|
+
fieldMask?: string[];
|
|
327
|
+
}
|
|
328
|
+
export interface UpdateFileDescriptorResponse {
|
|
329
|
+
/** Information about the updated file. */
|
|
330
|
+
file?: FileDescriptor;
|
|
331
|
+
}
|
|
278
332
|
export interface GenerateFileUploadUrlRequest {
|
|
279
333
|
/** File mime type. */
|
|
280
334
|
mimeType: string | null;
|
|
@@ -374,7 +428,7 @@ export interface ImportFileResponse {
|
|
|
374
428
|
}
|
|
375
429
|
export interface BulkImportFilesRequest {
|
|
376
430
|
/** Information about the files to import. */
|
|
377
|
-
importFileRequests
|
|
431
|
+
importFileRequests: ImportFileRequest[];
|
|
378
432
|
}
|
|
379
433
|
export interface BulkImportFilesResponse {
|
|
380
434
|
/** Information about the imported files. */
|
|
@@ -503,7 +557,7 @@ export interface GenerateWebSocketTokenResponse {
|
|
|
503
557
|
}
|
|
504
558
|
export interface BulkDeleteFilesRequest {
|
|
505
559
|
/** IDs of the files to move to the Media Manager's trash bin. */
|
|
506
|
-
fileIds
|
|
560
|
+
fileIds: string[];
|
|
507
561
|
/**
|
|
508
562
|
* Whether the specified files are permanently deleted. <br />
|
|
509
563
|
* Default: `false`
|
|
@@ -638,6 +692,117 @@ export interface UpdateFileOptions {
|
|
|
638
692
|
/** 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. */
|
|
639
693
|
labels?: string[] | null;
|
|
640
694
|
}
|
|
695
|
+
/**
|
|
696
|
+
* Updates a file. <br />
|
|
697
|
+
* Supported fields: displayName, parentFolderId, labels. Any unsupported field will be ignored
|
|
698
|
+
* You can use the `parentFolderId` parameter to move a file from its current folder to a different folder.
|
|
699
|
+
* @param _id - File ID. Generated when a file is uploaded to the Media Manager.
|
|
700
|
+
* @public
|
|
701
|
+
* @documentationMaturity preview
|
|
702
|
+
* @requiredField _id
|
|
703
|
+
* @requiredField file
|
|
704
|
+
*/
|
|
705
|
+
export declare function updateFileDescriptor(_id: string, file: UpdateFileDescriptorFile, options?: UpdateFileDescriptorOptions): Promise<UpdateFileDescriptorResponse>;
|
|
706
|
+
export interface UpdateFileDescriptorFile {
|
|
707
|
+
/**
|
|
708
|
+
* File ID. Generated when a file is uploaded to the Media Manager.
|
|
709
|
+
* @readonly
|
|
710
|
+
*/
|
|
711
|
+
_id?: string;
|
|
712
|
+
/**
|
|
713
|
+
* File name as it appears in the Media Manager.
|
|
714
|
+
* @readonly
|
|
715
|
+
*/
|
|
716
|
+
displayName?: string;
|
|
717
|
+
/**
|
|
718
|
+
* Static URL of the file.
|
|
719
|
+
* @readonly
|
|
720
|
+
*/
|
|
721
|
+
url?: string;
|
|
722
|
+
/**
|
|
723
|
+
* ID of the file's parent folder.
|
|
724
|
+
* @readonly
|
|
725
|
+
*/
|
|
726
|
+
parentFolderId?: string | null;
|
|
727
|
+
/**
|
|
728
|
+
* File hash.
|
|
729
|
+
* @readonly
|
|
730
|
+
*/
|
|
731
|
+
hash?: string;
|
|
732
|
+
/**
|
|
733
|
+
* Size of the uploaded file in bytes.
|
|
734
|
+
* @readonly
|
|
735
|
+
*/
|
|
736
|
+
sizeInBytes?: string | null;
|
|
737
|
+
/**
|
|
738
|
+
* Whether the link to the uploaded file is public or private. Private links require a token.
|
|
739
|
+
* @readonly
|
|
740
|
+
*/
|
|
741
|
+
private?: boolean;
|
|
742
|
+
/**
|
|
743
|
+
* Media file type.
|
|
744
|
+
*
|
|
745
|
+
* Supported values: `"IMAGE"`, `"VIDEO"`, `"AUDIO"`, `"DOCUMENT"`, `"VECTOR"`
|
|
746
|
+
* @readonly
|
|
747
|
+
*/
|
|
748
|
+
mediaType?: MediaType;
|
|
749
|
+
/**
|
|
750
|
+
* Media file content.
|
|
751
|
+
* @readonly
|
|
752
|
+
*/
|
|
753
|
+
media?: FileMedia;
|
|
754
|
+
/**
|
|
755
|
+
* Status of the file that was uploaded.
|
|
756
|
+
*
|
|
757
|
+
* Supported values: `"FAILED"`, `"READY"`, `"PENDING"`
|
|
758
|
+
* * `FAILED`: The file failed to upload, for example, during media post processing.
|
|
759
|
+
* * `READY`: The file uploaded, finished all processing, and is ready for use.
|
|
760
|
+
* * `PENDING`: The file is processing and the URLs are not yet available. This response is returned when importing a file.
|
|
761
|
+
* @readonly
|
|
762
|
+
*/
|
|
763
|
+
operationStatus?: OperationStatus;
|
|
764
|
+
/**
|
|
765
|
+
* URL where the file was uploaded from.
|
|
766
|
+
* @readonly
|
|
767
|
+
*/
|
|
768
|
+
sourceUrl?: string | null;
|
|
769
|
+
/**
|
|
770
|
+
* URL of the file's thumbnail.
|
|
771
|
+
* @readonly
|
|
772
|
+
*/
|
|
773
|
+
thumbnailUrl?: string | null;
|
|
774
|
+
/**
|
|
775
|
+
* 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.
|
|
776
|
+
* @readonly
|
|
777
|
+
*/
|
|
778
|
+
labels?: string[];
|
|
779
|
+
/**
|
|
780
|
+
* Date and time the file was created.
|
|
781
|
+
* @readonly
|
|
782
|
+
*/
|
|
783
|
+
_createdDate?: Date;
|
|
784
|
+
/**
|
|
785
|
+
* Date and time the file was updated.
|
|
786
|
+
* @readonly
|
|
787
|
+
*/
|
|
788
|
+
_updatedDate?: Date;
|
|
789
|
+
/**
|
|
790
|
+
* The Wix site ID where the media file is stored.
|
|
791
|
+
* @readonly
|
|
792
|
+
*/
|
|
793
|
+
siteId?: string;
|
|
794
|
+
/**
|
|
795
|
+
* State of the file.
|
|
796
|
+
*
|
|
797
|
+
* Supported values: `"OK"`, `"DELETED"`
|
|
798
|
+
* @readonly
|
|
799
|
+
*/
|
|
800
|
+
state?: State;
|
|
801
|
+
}
|
|
802
|
+
export interface UpdateFileDescriptorOptions {
|
|
803
|
+
/** field mask */
|
|
804
|
+
fieldMask?: string[];
|
|
805
|
+
}
|
|
641
806
|
/**
|
|
642
807
|
* Generates an upload URL to allow external clients to upload a file to the Media Manager.
|
|
643
808
|
*
|
|
@@ -775,16 +940,14 @@ export interface ImportFileOptions {
|
|
|
775
940
|
* >**Notes:**
|
|
776
941
|
* > - This function is restricted and only runs if you elevate permissions using the [`wix-auth.elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function.
|
|
777
942
|
* > - The `media` property isn't returned in the `files` response object.
|
|
943
|
+
* @param importFileRequests - Information about the files to import.
|
|
778
944
|
* @public
|
|
779
945
|
* @documentationMaturity preview
|
|
780
|
-
* @requiredField
|
|
946
|
+
* @requiredField importFileRequests
|
|
947
|
+
* @requiredField importFileRequests.url
|
|
781
948
|
* @param options - Options to use when uploading multiple files.
|
|
782
949
|
*/
|
|
783
|
-
export declare function bulkImportFiles(
|
|
784
|
-
export interface BulkImportFilesOptions {
|
|
785
|
-
/** Information about the files to import. */
|
|
786
|
-
importFileRequests?: ImportFileRequest[];
|
|
787
|
-
}
|
|
950
|
+
export declare function bulkImportFiles(importFileRequests: ImportFileRequest[]): Promise<BulkImportFilesResponse>;
|
|
788
951
|
/**
|
|
789
952
|
* Retrieves a list of files in the Media Manager.
|
|
790
953
|
*
|
|
@@ -899,14 +1062,14 @@ export interface GenerateVideoStreamingUrlOptions {
|
|
|
899
1062
|
*
|
|
900
1063
|
*
|
|
901
1064
|
* >**Note:** This function is restricted and only runs if you elevate permissions using the [`wix-auth.elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function.
|
|
1065
|
+
* @param fileIds - IDs of the files to move to the Media Manager's trash bin.
|
|
902
1066
|
* @public
|
|
903
1067
|
* @documentationMaturity preview
|
|
1068
|
+
* @requiredField fileIds
|
|
904
1069
|
* @param options - Options to use when deleting files.
|
|
905
1070
|
*/
|
|
906
|
-
export declare function bulkDeleteFiles(options?: BulkDeleteFilesOptions): Promise<void>;
|
|
1071
|
+
export declare function bulkDeleteFiles(fileIds: string[], options?: BulkDeleteFilesOptions): Promise<void>;
|
|
907
1072
|
export interface BulkDeleteFilesOptions {
|
|
908
|
-
/** IDs of the files to move to the Media Manager's trash bin. */
|
|
909
|
-
fileIds?: string[];
|
|
910
1073
|
/**
|
|
911
1074
|
* Whether the specified files are permanently deleted. <br />
|
|
912
1075
|
* Default: `false`
|
|
@@ -113,6 +113,8 @@ const _listFilesRequest = {};
|
|
|
113
113
|
const _listFilesResponse = { files: '_fileDescriptor' };
|
|
114
114
|
const _searchFilesRequest = {};
|
|
115
115
|
const _searchFilesResponse = { files: '_fileDescriptor' };
|
|
116
|
+
const _updateFileDescriptorRequest = { file: '_fileDescriptor' };
|
|
117
|
+
const _updateFileDescriptorResponse = { file: '_fileDescriptor' };
|
|
116
118
|
const _updateFileRequest = {};
|
|
117
119
|
const _updateFileResponse = { file: '_fileDescriptor' };
|
|
118
120
|
/**
|
|
@@ -397,6 +399,64 @@ export function updateFile(fileId, options) {
|
|
|
397
399
|
}
|
|
398
400
|
});
|
|
399
401
|
}
|
|
402
|
+
/**
|
|
403
|
+
* Updates a file. <br />
|
|
404
|
+
* Supported fields: displayName, parentFolderId, labels. Any unsupported field will be ignored
|
|
405
|
+
* You can use the `parentFolderId` parameter to move a file from its current folder to a different folder.
|
|
406
|
+
* @param _id - File ID. Generated when a file is uploaded to the Media Manager.
|
|
407
|
+
* @public
|
|
408
|
+
* @documentationMaturity preview
|
|
409
|
+
* @requiredField _id
|
|
410
|
+
* @requiredField file
|
|
411
|
+
*/
|
|
412
|
+
export function updateFileDescriptor(_id, file, options) {
|
|
413
|
+
var _a, _b, _c;
|
|
414
|
+
return __awaiter(this, arguments, void 0, function* () {
|
|
415
|
+
const requestTransformation = {
|
|
416
|
+
file: { '*': '$[1]', id: '$[0]' },
|
|
417
|
+
fieldMask: '$[2].fieldMask',
|
|
418
|
+
};
|
|
419
|
+
const responseTransformation = '$';
|
|
420
|
+
// @ts-ignore
|
|
421
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
422
|
+
const { toAmbassadorRequest } = serializer({
|
|
423
|
+
rootSchema: _updateFileDescriptorRequest,
|
|
424
|
+
depSchemas: { _audioV2, _fileDescriptor, _fileMedia, _imageMedia },
|
|
425
|
+
fqdnTransformation: {
|
|
426
|
+
paths: [...['file']],
|
|
427
|
+
transformation: _fromVeloEntity,
|
|
428
|
+
},
|
|
429
|
+
customTransformation: requestTransformation,
|
|
430
|
+
});
|
|
431
|
+
const { fromJSON } = serializer({
|
|
432
|
+
rootSchema: _updateFileDescriptorResponse,
|
|
433
|
+
depSchemas: { _audioV2, _fileDescriptor, _fileMedia, _imageMedia },
|
|
434
|
+
fqdnTransformation: {
|
|
435
|
+
paths: [...['file']],
|
|
436
|
+
transformation: _toVeloEntity,
|
|
437
|
+
},
|
|
438
|
+
customTransformation: responseTransformation,
|
|
439
|
+
});
|
|
440
|
+
const payload = toAmbassadorRequest([_id, file, options]);
|
|
441
|
+
const reqOpts = ambassadorWixMediaSiteMediaV1FileDescriptor.updateFileDescriptor(payload);
|
|
442
|
+
__log(`"UpdateFileDescriptor" sending request with: ${__inspect(reqOpts)}`);
|
|
443
|
+
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
444
|
+
try {
|
|
445
|
+
const result = yield httpClient.request(reqOpts);
|
|
446
|
+
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
447
|
+
return fromJSON(result.data);
|
|
448
|
+
}
|
|
449
|
+
catch (err) {
|
|
450
|
+
const transformedError = transformError(err, requestTransformation, [
|
|
451
|
+
'_id',
|
|
452
|
+
'file',
|
|
453
|
+
'options',
|
|
454
|
+
]);
|
|
455
|
+
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
456
|
+
throw transformedError;
|
|
457
|
+
}
|
|
458
|
+
});
|
|
459
|
+
}
|
|
400
460
|
/**
|
|
401
461
|
* Generates an upload URL to allow external clients to upload a file to the Media Manager.
|
|
402
462
|
*
|
|
@@ -619,17 +679,17 @@ export function importFile(url, options) {
|
|
|
619
679
|
* >**Notes:**
|
|
620
680
|
* > - This function is restricted and only runs if you elevate permissions using the [`wix-auth.elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function.
|
|
621
681
|
* > - The `media` property isn't returned in the `files` response object.
|
|
682
|
+
* @param importFileRequests - Information about the files to import.
|
|
622
683
|
* @public
|
|
623
684
|
* @documentationMaturity preview
|
|
624
|
-
* @requiredField
|
|
685
|
+
* @requiredField importFileRequests
|
|
686
|
+
* @requiredField importFileRequests.url
|
|
625
687
|
* @param options - Options to use when uploading multiple files.
|
|
626
688
|
*/
|
|
627
|
-
export function bulkImportFiles(
|
|
689
|
+
export function bulkImportFiles(importFileRequests) {
|
|
628
690
|
var _a, _b, _c;
|
|
629
691
|
return __awaiter(this, arguments, void 0, function* () {
|
|
630
|
-
const requestTransformation = {
|
|
631
|
-
importFileRequests: '$[0].importFileRequests',
|
|
632
|
-
};
|
|
692
|
+
const requestTransformation = { importFileRequests: '$[0]' };
|
|
633
693
|
const responseTransformation = '$';
|
|
634
694
|
// @ts-ignore
|
|
635
695
|
const { httpClient, sideEffects } = arguments[1];
|
|
@@ -651,7 +711,7 @@ export function bulkImportFiles(options) {
|
|
|
651
711
|
},
|
|
652
712
|
customTransformation: responseTransformation,
|
|
653
713
|
});
|
|
654
|
-
const payload = toAmbassadorRequest([
|
|
714
|
+
const payload = toAmbassadorRequest([importFileRequests]);
|
|
655
715
|
const reqOpts = ambassadorWixMediaSiteMediaV1FileDescriptor.bulkImportFiles(payload);
|
|
656
716
|
__log(`"BulkImportFiles" sending request with: ${__inspect(reqOpts)}`);
|
|
657
717
|
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
@@ -662,7 +722,7 @@ export function bulkImportFiles(options) {
|
|
|
662
722
|
}
|
|
663
723
|
catch (err) {
|
|
664
724
|
const transformedError = transformError(err, requestTransformation, [
|
|
665
|
-
'
|
|
725
|
+
'importFileRequests',
|
|
666
726
|
]);
|
|
667
727
|
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
668
728
|
throw transformedError;
|
|
@@ -859,20 +919,22 @@ export function generateVideoStreamingUrl(fileId, options) {
|
|
|
859
919
|
*
|
|
860
920
|
*
|
|
861
921
|
* >**Note:** This function is restricted and only runs if you elevate permissions using the [`wix-auth.elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function.
|
|
922
|
+
* @param fileIds - IDs of the files to move to the Media Manager's trash bin.
|
|
862
923
|
* @public
|
|
863
924
|
* @documentationMaturity preview
|
|
925
|
+
* @requiredField fileIds
|
|
864
926
|
* @param options - Options to use when deleting files.
|
|
865
927
|
*/
|
|
866
|
-
export function bulkDeleteFiles(options) {
|
|
928
|
+
export function bulkDeleteFiles(fileIds, options) {
|
|
867
929
|
var _a, _b, _c;
|
|
868
930
|
return __awaiter(this, arguments, void 0, function* () {
|
|
869
931
|
const requestTransformation = {
|
|
870
|
-
fileIds: '$[0]
|
|
871
|
-
permanent: '$[
|
|
932
|
+
fileIds: '$[0]',
|
|
933
|
+
permanent: '$[1].permanent',
|
|
872
934
|
};
|
|
873
935
|
const responseTransformation = '$';
|
|
874
936
|
// @ts-ignore
|
|
875
|
-
const { httpClient, sideEffects } = arguments[
|
|
937
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
876
938
|
const { toAmbassadorRequest } = serializer({
|
|
877
939
|
rootSchema: _bulkDeleteFilesRequest,
|
|
878
940
|
depSchemas: {},
|
|
@@ -891,7 +953,7 @@ export function bulkDeleteFiles(options) {
|
|
|
891
953
|
},
|
|
892
954
|
customTransformation: responseTransformation,
|
|
893
955
|
});
|
|
894
|
-
const payload = toAmbassadorRequest([options]);
|
|
956
|
+
const payload = toAmbassadorRequest([fileIds, options]);
|
|
895
957
|
const reqOpts = ambassadorWixMediaSiteMediaV1FileDescriptor.bulkDeleteFiles(payload);
|
|
896
958
|
__log(`"BulkDeleteFiles" sending request with: ${__inspect(reqOpts)}`);
|
|
897
959
|
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
@@ -902,6 +964,7 @@ export function bulkDeleteFiles(options) {
|
|
|
902
964
|
}
|
|
903
965
|
catch (err) {
|
|
904
966
|
const transformedError = transformError(err, requestTransformation, [
|
|
967
|
+
'fileIds',
|
|
905
968
|
'options',
|
|
906
969
|
]);
|
|
907
970
|
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|