@wix/bex-utils 2.30.0 → 2.31.0
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/@wix/ambassador-media-site-media-v1-file-descriptor/build/cjs/builders.impl.d.ts +89 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/build/cjs/builders.impl.js +2249 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/build/cjs/builders.impl.js.map +1 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/build/cjs/crud/http.impl.d.ts +1 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/build/cjs/crud/http.impl.js +5 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/build/cjs/crud/http.impl.js.map +1 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/build/cjs/crud/rpc.impl.d.ts +6 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/build/cjs/crud/rpc.impl.js +24 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/build/cjs/crud/rpc.impl.js.map +1 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/build/cjs/http.impl.d.ts +180 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/build/cjs/http.impl.js +971 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/build/cjs/http.impl.js.map +1 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/build/cjs/meta.impl.d.ts +30 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/build/cjs/meta.impl.js +385 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/build/cjs/meta.impl.js.map +1 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/build/cjs/proto/client/proto-generated.d.ts +10010 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/build/cjs/proto/client/proto-generated.js +2 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/build/cjs/proto/proto-generated.d.ts +5002 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/build/cjs/proto/proto-generated.js +78224 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/build/cjs/proto/server/proto-generated.d.ts +9973 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/build/cjs/proto/server/proto-generated.js +2 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/build/cjs/rpc.impl.d.ts +189 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/build/cjs/rpc.impl.js +431 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/build/cjs/rpc.impl.js.map +1 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/build/cjs/types.impl.d.ts +1387 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/build/cjs/types.impl.js +117 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/build/cjs/types.impl.js.map +1 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/build/es/builders.impl.d.ts +89 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/build/es/builders.impl.js +2145 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/build/es/builders.impl.js.map +1 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/build/es/crud/http.impl.d.ts +1 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/build/es/crud/http.impl.js +2 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/build/es/crud/http.impl.js.map +1 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/build/es/crud/rpc.impl.d.ts +6 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/build/es/crud/rpc.impl.js +19 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/build/es/crud/rpc.impl.js.map +1 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/build/es/http.impl.d.ts +180 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/build/es/http.impl.js +949 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/build/es/http.impl.js.map +1 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/build/es/meta.impl.d.ts +30 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/build/es/meta.impl.js +344 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/build/es/meta.impl.js.map +1 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/build/es/rpc.impl.d.ts +189 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/build/es/rpc.impl.js +390 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/build/es/rpc.impl.js.map +1 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/build/es/types.impl.d.ts +1387 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/build/es/types.impl.js +114 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/build/es/types.impl.js.map +1 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/builders/package.json +7 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/crud/http/package.json +7 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/crud/rpc/package.json +6 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/http/package.json +7 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/meta/package.json +7 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/package.json +53 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/rpc/package.json +6 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/media_manager/v1/media_manager_entity.proto +17 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/media_manager/v1/media_manager_service.proto +121 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/media_manager/v1/search_result.proto +17 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/media_manager/v1/search_service.proto +76 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/media_quota_api.proto +159 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/site_media/upstream/wix/common/identification.proto +41 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/site_media/upstream/wix/common/media.proto +242 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/site_media/upstream/wix/common/paging.proto +121 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/site_media/v1/audio_v2.proto +31 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/site_media/v1/content_disposition.proto +11 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/site_media/v1/download_url.proto +12 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/site_media/v1/error_code.proto +49 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/site_media/v1/errors.proto +41 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/site_media/v1/file_descriptor.proto +140 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/site_media/v1/files_service.proto +1030 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/site_media/v1/folder.proto +48 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/site_media/v1/folders_service.proto +367 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/site_media/v1/identity_info.proto +13 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/site_media/v1/image_media.proto +84 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/site_media/v1/media_type.proto +15 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/site_media/v1/namespace.proto +21 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/site_media/v1/operation_status.proto +27 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/site_media/v1/other_media.proto +22 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/site_media/v1/root_folders.proto +12 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/site_media/v1/storage_info.proto +24 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/site_media/v1/storage_service.proto +179 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/site_media/v1/upload_protocol.proto +9 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/api/action_payload.proto +33 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/api/annotations.proto +393 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/api/api_errors.proto +117 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/api/callback.proto +156 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/api/context.proto +19 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/api/entity.proto +122 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/api/errors.proto +119 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/api/idempotency.proto +25 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/api/permissions.proto +40 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/api/sla.proto +24 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/api/subscription.proto +32 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/api/validations.proto +137 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/common/address.proto +148 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/common/bulk.proto +53 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/common/identification.proto +40 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/common/image.proto +8 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/common/media.proto +236 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/common/money.proto +32 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/common/pageurl.proto +32 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/common/paging.proto +121 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/common/query.proto +795 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/common/sorting.proto +36 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/common/spi.proto +85 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/common/tags.proto +55 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/common/wixlink.proto +201 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/graphql/definitions.proto +13 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/http/field_mask.proto +46 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/sdk/definitions.proto +191 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/spi/definitions.proto +186 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/spi/http_error_status.proto +24 -0
- package/@wix/ambassador-media-site-media-v1-file-descriptor/types/package.json +7 -0
- package/package.json +3 -2
|
@@ -0,0 +1,1030 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package com.wix.media.site_media.v1;
|
|
4
|
+
|
|
5
|
+
import "wix/api/validations.proto";
|
|
6
|
+
import "wix/api/permissions.proto";
|
|
7
|
+
import "wix/api/annotations.proto";
|
|
8
|
+
import "google/api/annotations.proto";
|
|
9
|
+
import "google/protobuf/field_mask.proto";
|
|
10
|
+
import "google/protobuf/wrappers.proto";
|
|
11
|
+
import "com/wix/media/site_media/v1/file_descriptor.proto";
|
|
12
|
+
import "com/wix/media/site_media/v1/download_url.proto";
|
|
13
|
+
import "com/wix/media/site_media/v1/media_type.proto";
|
|
14
|
+
import "com/wix/media/site_media/v1/namespace.proto";
|
|
15
|
+
import "com/wix/media/site_media/v1/upload_protocol.proto";
|
|
16
|
+
import "com/wix/media/site_media/v1/root_folders.proto";
|
|
17
|
+
import "com/wix/media/site_media/v1/content_disposition.proto";
|
|
18
|
+
import "wix/api/entity.proto";
|
|
19
|
+
import "com/wix/media/site_media/upstream/wix/common/paging.proto";
|
|
20
|
+
import "wix/api/callback.proto";
|
|
21
|
+
import "wix/common/sorting.proto";
|
|
22
|
+
import "wix/api/api_errors.proto";
|
|
23
|
+
import "google/protobuf/struct.proto";
|
|
24
|
+
import "wix/http/field_mask.proto";
|
|
25
|
+
import "wix/common/bulk.proto";
|
|
26
|
+
import "wix/sdk/definitions.proto";
|
|
27
|
+
import "wix/api/errors.proto";
|
|
28
|
+
|
|
29
|
+
message GenerateFilesDownloadUrlRequest {
|
|
30
|
+
// IDs of the files to download.
|
|
31
|
+
//
|
|
32
|
+
// You can also pass the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`.
|
|
33
|
+
// Learn more about the [file ID parameter](https://dev.wix.com/docs/rest/assets/media/media-manager/files/file-id#file-id-as-a-parameter).
|
|
34
|
+
repeated string file_ids = 1 [(.wix.api.minSize) = 1, (.wix.api.maxSize) = 1000, (.wix.api.maxLength) = 1000];
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
message GenerateFilesDownloadUrlResponse {
|
|
38
|
+
// URL for downloading the compressed file containing the specified files in the Media Manager.
|
|
39
|
+
string download_url = 1 [(.wix.api.format) = WEB_URL];
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
message GenerateFileDownloadUrlRequest {
|
|
43
|
+
// File ID.
|
|
44
|
+
//
|
|
45
|
+
// You can also pass the file's Wix media URL. For example, `wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032`.
|
|
46
|
+
// Learn more about the [file ID parameter](https://dev.wix.com/docs/rest/assets/media/media-manager/files/file-id#file-id-as-a-parameter).
|
|
47
|
+
string file_id = 1 [(.wix.api.maxLength) = 1000];
|
|
48
|
+
// Temporary file name used to identify the file type. For example, a file named "myFile.jpeg" identifies as an "image/jpeg" file type. <br />
|
|
49
|
+
//
|
|
50
|
+
// **Note:** The name that appears in the Media Manager is taken from the `filename` query parameter in the upload request.
|
|
51
|
+
google.protobuf.StringValue download_file_name = 2 [(.wix.api.maxLength) = 100];
|
|
52
|
+
// The time that it takes in minutes for the download URL to expire. <br />
|
|
53
|
+
// Default: `600`. <br />
|
|
54
|
+
// Limit: `525600` (1 year).
|
|
55
|
+
google.protobuf.Int32Value expiration_in_minutes = 3 [(.wix.api.min) = 1];
|
|
56
|
+
// The redirect URL for when the temporary download URL with a token expires. <br />
|
|
57
|
+
// Default: A 403 Forbidden response page.
|
|
58
|
+
google.protobuf.StringValue expiration_redirect_url = 4 [(.wix.api.format) = WEB_URL];
|
|
59
|
+
// Keys for downloading different assets (format and quality) of a file.
|
|
60
|
+
// Default: `src`, key representing the original file's format and quality.
|
|
61
|
+
repeated google.protobuf.StringValue asset_keys = 5 [(.wix.api.maxSize) = 100, (.wix.api.maxLength) = 100];
|
|
62
|
+
// Whether the link downloads the file or opens the file in the browser.
|
|
63
|
+
//
|
|
64
|
+
// - `ATTACHMENT`: The link downloads the file.
|
|
65
|
+
// - `INLINE`: The link opens the file in the browser.
|
|
66
|
+
//
|
|
67
|
+
// Default: `ATTACHMENT`
|
|
68
|
+
ContentDisposition content_disposition = 6;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
message GenerateFileDownloadUrlResponse {
|
|
72
|
+
// URL for downloading a specific file in the Media Manager.
|
|
73
|
+
repeated DownloadUrl download_urls = 1 [(.wix.api.maxSize) = 100];
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
message UpdateFileRequest {
|
|
77
|
+
// ID of the file to update.
|
|
78
|
+
//
|
|
79
|
+
// You can also pass the file's Wix media URL. For example, `wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032`.
|
|
80
|
+
// Learn more about the [file ID parameter](https://dev.wix.com/docs/rest/assets/media/media-manager/files/file-id#file-id-as-a-parameter).
|
|
81
|
+
string file_id = 1 [(.wix.api.maxLength) = 1000];
|
|
82
|
+
// File name that appears in the Media Manager.
|
|
83
|
+
google.protobuf.StringValue display_name = 2 [(.wix.api.maxLength) = 200];
|
|
84
|
+
/* ID of the file's parent folder. <br />
|
|
85
|
+
Default: `media-root`.
|
|
86
|
+
*/
|
|
87
|
+
google.protobuf.StringValue parent_folder_id = 3 [(.wix.api.maxLength) = 100];
|
|
88
|
+
// 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.
|
|
89
|
+
repeated google.protobuf.StringValue labels = 4 [(.wix.api.maxSize) = 500, (.wix.api.maxLength) = 200];
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
message UpdateFileResponse {
|
|
93
|
+
// Information about the updated file.
|
|
94
|
+
FileDescriptor file = 1;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
message UpdateFileDescriptorRequest {
|
|
100
|
+
// The file to update.
|
|
101
|
+
FileDescriptor file = 1;
|
|
102
|
+
// Set of fields to update. Fields that aren't included in `fieldMask.paths` are ignored.
|
|
103
|
+
google.protobuf.FieldMask field_mask = 2 [(.wix.api.field_exposure) = INTERNAL];
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
message UpdateFileDescriptorResponse {
|
|
107
|
+
// Information about the updated file.
|
|
108
|
+
FileDescriptor file = 1;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
message GenerateFileUploadUrlRequest {
|
|
114
|
+
// File mime type.
|
|
115
|
+
google.protobuf.StringValue mime_type = 1 [(.wix.api.maxLength) = 100];
|
|
116
|
+
|
|
117
|
+
// Temporary file name used to identify the file type. For example, a file named "myFile.jpeg" identifies as an "image/jpeg" file type.
|
|
118
|
+
// <br /> **Note:** The name that appears in the Media Manager is taken from the `filename` query parameter in the upload request.
|
|
119
|
+
google.protobuf.StringValue file_name = 2 [(.wix.api.maxLength) = 200];
|
|
120
|
+
|
|
121
|
+
// File size in bytes.
|
|
122
|
+
google.protobuf.StringValue size_in_bytes = 3 [(.wix.api.readOnly) = true, (.wix.api.format) = DECIMAL_VALUE, (.wix.api.decimalValue) = {gte: "0", maxScale: 0}];;
|
|
123
|
+
|
|
124
|
+
/* ID of the file's parent folder. <br />
|
|
125
|
+
This folder is the path root for the `filePath`.<br />
|
|
126
|
+
Default: `media-root`.
|
|
127
|
+
*/
|
|
128
|
+
google.protobuf.StringValue parent_folder_id = 4 [(.wix.api.maxLength) = 100];
|
|
129
|
+
|
|
130
|
+
// Whether the file will be public or private. Learn more about [private files](https://dev.wix.com/docs/rest/assets/media/media-manager/files/private-files).
|
|
131
|
+
google.protobuf.BoolValue private = 5;
|
|
132
|
+
|
|
133
|
+
// 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.
|
|
134
|
+
repeated google.protobuf.StringValue labels = 6 [(.wix.api.maxSize) = 50, (.wix.api.maxLength) = 200];
|
|
135
|
+
|
|
136
|
+
// A place to map an external entity to an uploaded file in the Wix Media Manager.
|
|
137
|
+
ExternalInfo external_info = 9;
|
|
138
|
+
|
|
139
|
+
// The uploaded file will be created under this namespace
|
|
140
|
+
google.protobuf.StringValue raw_namespace = 11 [(.wix.api.field_exposure) = INTERNAL, (.wix.api.maxLength) = 100];
|
|
141
|
+
|
|
142
|
+
// The uploaded file will be created under this namespace
|
|
143
|
+
// Note - Namespace value `Others` is not supported and will produce an error
|
|
144
|
+
Namespace namespace = 12 [(.wix.api.field_exposure) = INTERNAL];
|
|
145
|
+
|
|
146
|
+
// Path to the folder where the file will be stored.
|
|
147
|
+
// For example, `/videos/2024/december`. <br/>
|
|
148
|
+
// If `parentFolderId` is defined, the parent folder is used as the path root. Otherwise, the root is `media-root`.
|
|
149
|
+
// The folders in the path will be created if they don't already exist. <br />
|
|
150
|
+
google.protobuf.StringValue file_path = 13 [(.wix.api.maxLength) = 100];
|
|
151
|
+
|
|
152
|
+
// Internal tags describing the item, can be used in specific clients use cases
|
|
153
|
+
repeated string internal_tags = 14 [(.wix.api.field_exposure) = INTERNAL, (.wix.api.maxSize) = 100, (.wix.api.maxLength) = 200];
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
message GenerateFileUploadUrlResponse {
|
|
157
|
+
// The URL for uploading a file to the Media Manager.
|
|
158
|
+
string upload_url = 1 [(.wix.api.format) = WEB_URL];
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
message GenerateFileResumableUploadUrlRequest {
|
|
163
|
+
// File mime type.
|
|
164
|
+
google.protobuf.StringValue mime_type = 1 [(.wix.api.maxLength) = 100];
|
|
165
|
+
// Temporary file name used to identify the file type. For example, a file named "myFile.jpeg" identifies as an "image/jpeg" file type.
|
|
166
|
+
// <br /> **Note:** The name that appears in the Media Manager is taken from the `filename` query parameter in the upload request.
|
|
167
|
+
google.protobuf.StringValue file_name = 2 [(.wix.api.maxLength) = 200];
|
|
168
|
+
|
|
169
|
+
// File size in bytes.
|
|
170
|
+
google.protobuf.StringValue size_in_bytes = 3 [(.wix.api.readOnly) = true, (.wix.api.format) = DECIMAL_VALUE, (.wix.api.decimalValue) = {gte: "0", maxScale: 0}];;
|
|
171
|
+
|
|
172
|
+
/* ID of the file's parent folder. <br />
|
|
173
|
+
This folder is the path root for the `filePath`.<br />
|
|
174
|
+
Default: `media-root`.
|
|
175
|
+
*/
|
|
176
|
+
google.protobuf.StringValue parent_folder_id = 4 [(.wix.api.maxLength) = 100];
|
|
177
|
+
|
|
178
|
+
// Whether the file will be public or private. Learn more about [private files](https://dev.wix.com/docs/rest/assets/media/media-manager/files/private-files).
|
|
179
|
+
google.protobuf.BoolValue private = 5;
|
|
180
|
+
// 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.
|
|
181
|
+
repeated google.protobuf.StringValue labels = 6 [(.wix.api.maxSize) = 500, (.wix.api.maxLength) = 200];
|
|
182
|
+
|
|
183
|
+
// The upload protocol to use for implementing the resumable upload.
|
|
184
|
+
UploadProtocol upload_protocol = 10;
|
|
185
|
+
|
|
186
|
+
// The uploaded file will be created under this namespace
|
|
187
|
+
google.protobuf.StringValue raw_namespace = 11 [(.wix.api.field_exposure) = INTERNAL, (.wix.api.maxLength) = 100];
|
|
188
|
+
|
|
189
|
+
// The uploaded file will be created under this namespace
|
|
190
|
+
// Note - Namespace value `Others` is not supported and will produce an error
|
|
191
|
+
Namespace namespace = 12 [(.wix.api.field_exposure) = INTERNAL];
|
|
192
|
+
|
|
193
|
+
// Path to the folder where the file will be stored.
|
|
194
|
+
// For example, `/videos/2024/december`. <br/>
|
|
195
|
+
// If `parentFolderId` is defined, the parent folder is used as the path root. Otherwise, the root is `media-root`.
|
|
196
|
+
// The folders in the path will be created if they don't already exist. <br />
|
|
197
|
+
google.protobuf.StringValue file_path = 13 [(.wix.api.maxLength) = 100];
|
|
198
|
+
|
|
199
|
+
// Internal tags describing the item, can be used in specific clients use cases
|
|
200
|
+
repeated string internal_tags = 14 [(.wix.api.field_exposure) = INTERNAL, (.wix.api.maxSize) = 100, (.wix.api.maxLength) = 200];
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
message GenerateFileResumableUploadUrlResponse {
|
|
204
|
+
// The upload protocol to use for implementing the resumable upload.
|
|
205
|
+
UploadProtocol upload_protocol = 1;
|
|
206
|
+
// The URL for uploading a file to the Media Manager.
|
|
207
|
+
string upload_url = 2 [(.wix.api.format) = WEB_URL];
|
|
208
|
+
// Single-use upload token.
|
|
209
|
+
string upload_token = 3 [(.wix.api.maxLength) = 2000];
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
message ImportFileRequest {
|
|
215
|
+
// Publicly accessible external file URL.
|
|
216
|
+
string url = 1 [(.wix.api.format) = WEB_URL];
|
|
217
|
+
|
|
218
|
+
// Media type of the file to import.
|
|
219
|
+
// excluding: OTHER media type
|
|
220
|
+
MediaType media_type = 2;
|
|
221
|
+
|
|
222
|
+
// File name that appears in the Media Manager.
|
|
223
|
+
google.protobuf.StringValue display_name = 3 [(.wix.api.maxLength) = 200];
|
|
224
|
+
/* ID of the file's parent folder. <br />
|
|
225
|
+
This folder is the path root for the `filePath`. <br />
|
|
226
|
+
Default: `media-root`.
|
|
227
|
+
*/
|
|
228
|
+
google.protobuf.StringValue parent_folder_id = 5 [(.wix.api.maxLength) = 100];
|
|
229
|
+
// Whether the file will be public or private. Learn more about [private files](https://dev.wix.com/docs/rest/assets/media/media-manager/files/private-files).
|
|
230
|
+
google.protobuf.BoolValue private = 6;
|
|
231
|
+
// 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.
|
|
232
|
+
repeated google.protobuf.StringValue labels = 7 [(.wix.api.maxSize) = 500, (.wix.api.maxLength) = 200];
|
|
233
|
+
// File mime type.
|
|
234
|
+
string mime_type = 8 [(.wix.api.maxLength) = 100];
|
|
235
|
+
|
|
236
|
+
// Information sent to the [File Ready](https://dev.wix.com/docs/rest/assets/media/media-manager/files/file-ready) and [File Failed](https://dev.wix.com/docs/rest/assets/media/media-manager/files/file-failed) webhooks. See [Importing Files](/files/importing-files#using-externalinfo) to learn more.
|
|
237
|
+
ExternalInfo external_info = 9;
|
|
238
|
+
|
|
239
|
+
// Optional parameters that should be sent with the external URL.
|
|
240
|
+
google.protobuf.Struct url_params = 10;
|
|
241
|
+
|
|
242
|
+
// Optional headers that should be sent with the external URL.
|
|
243
|
+
google.protobuf.Struct url_headers = 11;
|
|
244
|
+
|
|
245
|
+
// The imported file will be created under this namespace
|
|
246
|
+
google.protobuf.StringValue raw_namespace = 12 [(.wix.api.field_exposure) = INTERNAL, (.wix.api.maxLength) = 100];
|
|
247
|
+
|
|
248
|
+
// The imported file will be created under this namespace
|
|
249
|
+
// Note - Namespace value `Others` is not supported and will produce an error
|
|
250
|
+
Namespace namespace = 13 [(.wix.api.field_exposure) = INTERNAL];
|
|
251
|
+
|
|
252
|
+
// Path to the folder where the file will be stored.
|
|
253
|
+
// For example, `/videos/2024/december`. <br/>
|
|
254
|
+
// If `parentFolderId` is defined, the parent folder is used as the path root. Otherwise, the root is `media-root`.
|
|
255
|
+
// The folders in the path will be created if they don't already exist. <br />
|
|
256
|
+
google.protobuf.StringValue file_path = 14 [(.wix.api.maxLength) = 100];
|
|
257
|
+
|
|
258
|
+
// Internal tags describing the item, can be used in specific clients use cases
|
|
259
|
+
repeated string internal_tags = 15 [(.wix.api.field_exposure) = INTERNAL, (.wix.api.maxSize) = 100, (.wix.api.maxLength) = 200];
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
message ImportFileResponse {
|
|
263
|
+
// Information about the imported file.
|
|
264
|
+
FileDescriptor file = 1;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
message BulkImportFilesRequest {
|
|
269
|
+
// Information about the files to import.
|
|
270
|
+
repeated ImportFileRequest import_file_requests = 1 [(.wix.api.minSize) = 1, (.wix.api.maxSize) = 100];
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
message BulkImportFilesResponse {
|
|
274
|
+
// Information about the imported files.
|
|
275
|
+
repeated FileDescriptor files = 1 [(.wix.api.maxSize) = 100];
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
message BulkImportFileRequest {
|
|
279
|
+
// Information about the files to import.
|
|
280
|
+
repeated ImportFileRequest import_file_requests = 1 [(.wix.api.minSize) = 1, (.wix.api.maxSize) = 100];
|
|
281
|
+
// Whether to include the imported File Descriptor in the response. Set to `false` to exclude the File Descriptor from the returned object.
|
|
282
|
+
//
|
|
283
|
+
// Default: `true`
|
|
284
|
+
google.protobuf.BoolValue return_entity = 2;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
message BulkImportFileResult {
|
|
288
|
+
// Item metadata.
|
|
289
|
+
.wix.common.ItemMetadata item_metadata = 1;
|
|
290
|
+
|
|
291
|
+
// Imported file. This field is returned if the operation was successful and `returnEntity` is not set to `false`.
|
|
292
|
+
FileDescriptor item = 2;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
message BulkImportFileResponse {
|
|
296
|
+
// Items created by bulk action.
|
|
297
|
+
repeated BulkImportFileResult results = 1;
|
|
298
|
+
// Bulk action metadata.
|
|
299
|
+
.wix.common.BulkActionMetadata bulk_action_metadata = 2;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
message GetFileDescriptorRequest {
|
|
305
|
+
// File ID.
|
|
306
|
+
//
|
|
307
|
+
// You can also pass the file's Wix media URL. For example, `wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032`.
|
|
308
|
+
// Learn more about the [file ID parameter](https://dev.wix.com/docs/rest/assets/media/media-manager/files/file-id#file-id-as-a-parameter).
|
|
309
|
+
//
|
|
310
|
+
// Note that you must encode the Wix media URL to pass 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`.
|
|
311
|
+
string file_id = 1 [(.wix.api.maxLength) = 1000];
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
message GetFileDescriptorResponse {
|
|
315
|
+
// Information about the file.
|
|
316
|
+
FileDescriptor file = 1;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
message GetFileDescriptorsRequest {
|
|
321
|
+
// File IDs.
|
|
322
|
+
//
|
|
323
|
+
// You can also pass the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`.
|
|
324
|
+
// Learn more about the [file ID parameter](https://dev.wix.com/docs/rest/assets/media/media-manager/files/file-id#file-id-as-a-parameter).
|
|
325
|
+
repeated string file_ids = 1 [(.wix.api.minSize) = 1, (.wix.api.maxSize) = 100, (.wix.api.maxLength) = 1000];
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
message GetFileDescriptorsResponse {
|
|
329
|
+
// Information about the requested files.
|
|
330
|
+
repeated FileDescriptor files = 1 [(.wix.api.maxSize) = 100];
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
message ListFilesRequest {
|
|
335
|
+
/* ID of the file's parent folder. <br />
|
|
336
|
+
Default:`media-root`.
|
|
337
|
+
*/
|
|
338
|
+
google.protobuf.StringValue parent_folder_id = 1 [(.wix.api.maxLength) = 100];
|
|
339
|
+
// File media type.
|
|
340
|
+
// excluding: OTHER media type
|
|
341
|
+
repeated MediaType media_types = 3 [(.wix.api.maxSize) = 30];
|
|
342
|
+
// \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](https://dev.wix.com/docs/rest/assets/media/media-manager/files/private-files).
|
|
343
|
+
google.protobuf.BoolValue private = 4;
|
|
344
|
+
// Field name and order to sort by. One of: <br />
|
|
345
|
+
// * `displayName`
|
|
346
|
+
// * `updatedDate`
|
|
347
|
+
// * `sizeInBytes`
|
|
348
|
+
// Default: `updatedDate` in `desc` order.
|
|
349
|
+
.wix.common.Sorting sort = 5;
|
|
350
|
+
// Cursor and paging information.
|
|
351
|
+
com.wix.media.site_media.upstream.wix.common.CursorPaging paging = 6;
|
|
352
|
+
|
|
353
|
+
// List files of the specified namespace
|
|
354
|
+
google.protobuf.StringValue raw_namespace = 12 [(.wix.api.field_exposure) = INTERNAL, (.wix.api.maxLength) = 100];
|
|
355
|
+
|
|
356
|
+
// List files of the specified namespace
|
|
357
|
+
// Note - Namespace value `Others` is not supported and will produce an error
|
|
358
|
+
Namespace namespace = 13 [(.wix.api.field_exposure) = INTERNAL];
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
message ListFilesResponse {
|
|
362
|
+
// List of files in the Media Manager.
|
|
363
|
+
repeated FileDescriptor files = 1 [(.wix.api.maxSize) = 200];
|
|
364
|
+
// The next cursor if it exists.
|
|
365
|
+
com.wix.media.site_media.upstream.wix.common.PagingMetadataV2 next_cursor = 2;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
|
|
369
|
+
message SearchFilesRequest {
|
|
370
|
+
|
|
371
|
+
// Term to search for. Possible terms include the value of a file's
|
|
372
|
+
// `displayName`, `mimeType`, and `label`. <br />
|
|
373
|
+
// For example, if a file's label is cat, the search term is 'cat'.
|
|
374
|
+
google.protobuf.StringValue search = 1 [(.wix.api.maxLength) = 200];
|
|
375
|
+
|
|
376
|
+
// A root folder in the media manager to search in. <br />
|
|
377
|
+
// Default: `MEDIA_ROOT`.
|
|
378
|
+
RootFolder root_folder = 2;
|
|
379
|
+
|
|
380
|
+
// File media type.
|
|
381
|
+
// excluding: OTHER media type
|
|
382
|
+
repeated MediaType media_types = 3 [(.wix.api.maxSize) = 30];
|
|
383
|
+
|
|
384
|
+
// \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](https://dev.wix.com/docs/rest/assets/media/media-manager/files/private-files).
|
|
385
|
+
google.protobuf.BoolValue private = 4;
|
|
386
|
+
|
|
387
|
+
// Field name and order to sort by. One of: <br />
|
|
388
|
+
// * `displayName`
|
|
389
|
+
// * `updatedDate`
|
|
390
|
+
// * `sizeInBytes`
|
|
391
|
+
// Default: `updatedDate` in `desc` order.
|
|
392
|
+
.wix.common.Sorting sort = 5;
|
|
393
|
+
|
|
394
|
+
// Cursor and paging information.
|
|
395
|
+
com.wix.media.site_media.upstream.wix.common.CursorPaging paging = 6;
|
|
396
|
+
|
|
397
|
+
// search by an internal tag that describe the item - for internal wix use only
|
|
398
|
+
google.protobuf.StringValue internal_tag = 7 [(.wix.api.field_exposure) = INTERNAL, (.wix.api.maxLength) = 200];
|
|
399
|
+
|
|
400
|
+
// Search files of the specified namespace
|
|
401
|
+
google.protobuf.StringValue raw_namespace = 8 [(.wix.api.field_exposure) = INTERNAL, (.wix.api.maxLength) = 100];
|
|
402
|
+
|
|
403
|
+
// Search files of the specified namespace <br/>
|
|
404
|
+
// Note - Namespace value `Others` is not supported in this request and will produce an error
|
|
405
|
+
Namespace namespace = 9 [(.wix.api.field_exposure) = INTERNAL];
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
message SearchFilesResponse {
|
|
409
|
+
// Files matching the query.
|
|
410
|
+
repeated FileDescriptor files = 1 [(.wix.api.maxSize) = 200];
|
|
411
|
+
// The next cursor if it exists.
|
|
412
|
+
com.wix.media.site_media.upstream.wix.common.PagingMetadataV2 next_cursor = 2;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
message GenerateVideoStreamingUrlRequest {
|
|
416
|
+
enum StreamFormat {
|
|
417
|
+
UNKNOWN = 0;
|
|
418
|
+
HLS = 1;
|
|
419
|
+
DASH = 2;
|
|
420
|
+
}
|
|
421
|
+
// File ID.
|
|
422
|
+
//
|
|
423
|
+
// You can also pass the file's Wix media URL. For example, `wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032`.
|
|
424
|
+
// Learn more about the [file ID parameter](https://dev.wix.com/docs/rest/assets/media/media-manager/files/file-id#file-id-as-a-parameter).
|
|
425
|
+
string file_id = 1 [(.wix.api.maxLength) = 1000];
|
|
426
|
+
// Video stream format.
|
|
427
|
+
StreamFormat format = 2;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
message GenerateVideoStreamingUrlResponse {
|
|
431
|
+
// URL for streaming a specific file in the Media Manager.
|
|
432
|
+
DownloadUrl download_url = 1;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
message GenerateWebSocketTokenRequest {
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
message GenerateWebSocketTokenResponse {
|
|
439
|
+
// The web socket token for the identity in the request
|
|
440
|
+
string token = 1 [(.wix.api.maxLength) = 2000];
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
|
|
444
|
+
message BulkDeleteFilesRequest {
|
|
445
|
+
// IDs of the files to move to the Media Manager's trash bin.
|
|
446
|
+
//
|
|
447
|
+
// You can also pass the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`.
|
|
448
|
+
// Learn more about the [file ID parameter](https://dev.wix.com/docs/rest/assets/media/media-manager/files/file-id#file-id-as-a-parameter).
|
|
449
|
+
repeated string file_ids = 1 [(.wix.api.maxSize) = 1000, (.wix.api.maxLength) = 1000];
|
|
450
|
+
|
|
451
|
+
// Whether the specified files are permanently deleted. <br />
|
|
452
|
+
// Default: `false`
|
|
453
|
+
bool permanent = 2;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
message BulkDeleteFilesResponse {
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
message BulkRestoreFilesFromTrashBinRequest {
|
|
460
|
+
// IDs of the files to restore from the Media Manager's trash bin.
|
|
461
|
+
//
|
|
462
|
+
// You can also pass the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`.
|
|
463
|
+
// Learn more about the [file ID parameter](https://dev.wix.com/docs/rest/assets/media/media-manager/files/file-id#file-id-as-a-parameter).
|
|
464
|
+
repeated string file_ids = 1 [(.wix.api.maxSize) = 1000, (.wix.api.maxLength) = 1000];
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
message BulkRestoreFilesFromTrashBinResponse {
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
message ListDeletedFilesRequest {
|
|
471
|
+
/* ID of the file's parent folder. <br />
|
|
472
|
+
Default: `media-root`.
|
|
473
|
+
*/
|
|
474
|
+
google.protobuf.StringValue parent_folder_id = 1 [(.wix.api.maxLength) = 100];
|
|
475
|
+
// File media type.
|
|
476
|
+
// excluding: OTHER media type
|
|
477
|
+
repeated MediaType media_types = 3 [(.wix.api.maxSize) = 30];
|
|
478
|
+
// \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](https://dev.wix.com/docs/rest/assets/media/media-manager/files/private-files).
|
|
479
|
+
google.protobuf.BoolValue private = 4;
|
|
480
|
+
// Field name and order to sort by. One of: <br />
|
|
481
|
+
// * `displayName`
|
|
482
|
+
// * `updatedDate`
|
|
483
|
+
// * `sizeInBytes`
|
|
484
|
+
// Default: `updatedDate` in `desc` order.
|
|
485
|
+
.wix.common.Sorting sort = 5;
|
|
486
|
+
// Cursor and paging information.
|
|
487
|
+
com.wix.media.site_media.upstream.wix.common.CursorPaging paging = 6;
|
|
488
|
+
|
|
489
|
+
// List files of the specified namespace
|
|
490
|
+
google.protobuf.StringValue raw_namespace = 7 [(.wix.api.field_exposure) = INTERNAL, (.wix.api.maxLength) = 100];
|
|
491
|
+
|
|
492
|
+
// List files of the specified namespace
|
|
493
|
+
// Note - Namespace value `Others` is not supported and will produce an error
|
|
494
|
+
Namespace namespace = 8 [(.wix.api.field_exposure) = INTERNAL];
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
message ListDeletedFilesResponse {
|
|
498
|
+
// List of files in the Media Manager's trash bin.
|
|
499
|
+
repeated FileDescriptor files = 1 [(.wix.api.maxSize) = 200];
|
|
500
|
+
// The next cursor if it exists.
|
|
501
|
+
com.wix.media.site_media.upstream.wix.common.PagingMetadataV2 next_cursor = 2;
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
message FileFailed {
|
|
505
|
+
// External information passed in the file import or upload.
|
|
506
|
+
ExternalInfo external_info = 1;
|
|
507
|
+
// Error information
|
|
508
|
+
.wix.api.ApplicationError error = 2;
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
message ExternalInfo{
|
|
512
|
+
// External information to pass in the [File Ready](https://dev.wix.com/docs/rest/assets/media/media-manager/files/file-ready) or [File Failed](https://dev.wix.com/docs/rest/assets/media/media-manager/files/file-failed) events.
|
|
513
|
+
string origin = 1 [(.wix.api.maxLength) = 1000];
|
|
514
|
+
// External IDs to pass in the [File Ready](https://dev.wix.com/docs/rest/assets/media/media-manager/files/file-ready) or [File Failed](https://dev.wix.com/docs/rest/assets/media/media-manager/files/file-failed) events.
|
|
515
|
+
repeated string external_ids = 2 [(.wix.api.maxSize) = 30, (.wix.api.maxLength) = 4000];
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
message FileReady {
|
|
519
|
+
// File entity that is ready with full information
|
|
520
|
+
FileDescriptor file = 1;
|
|
521
|
+
// External information passed in the file import or upload.
|
|
522
|
+
ExternalInfo external_info = 2;
|
|
523
|
+
// The File was restored from the trash-bin
|
|
524
|
+
bool triggered_by_undelete = 3;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
|
|
528
|
+
message BulkAnnotateImagesRequest {
|
|
529
|
+
enum ImageAnnotationType{
|
|
530
|
+
UnknownAnnotationType = 0;
|
|
531
|
+
CONTAINS_TEXT = 1;
|
|
532
|
+
IS_ANIMATED = 2;
|
|
533
|
+
FACES = 3;
|
|
534
|
+
LABELS = 4;
|
|
535
|
+
COLORS = 5;
|
|
536
|
+
CAPTION = 6;
|
|
537
|
+
}
|
|
538
|
+
// The file ids to run detection on
|
|
539
|
+
repeated string file_ids = 1 [(.wix.api.minSize) = 1, (.wix.api.maxSize) = 10, (.wix.api.maxLength) = 1000];
|
|
540
|
+
// A list of detections types to fill for the image
|
|
541
|
+
repeated ImageAnnotationType annotation_types = 2 [(.wix.api.minSize) = 1, (.wix.api.maxSize) = 10];
|
|
542
|
+
// When true the endpoint will detect listed information even if the image has this information
|
|
543
|
+
google.protobuf.BoolValue overwrite = 3;
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
message BulkAnnotateImagesResponse {
|
|
547
|
+
// The updated file info
|
|
548
|
+
repeated FileDescriptor files = 1 [(.wix.api.maxSize) = 10];
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
service FilesService {
|
|
552
|
+
option (.wix.api.service_maturity) = GA;
|
|
553
|
+
option (.wix.api.service_exposure) = PUBLIC;
|
|
554
|
+
option (.wix.api.service_entity).message = "com.wix.media.site_media.v1.FileDescriptor";
|
|
555
|
+
|
|
556
|
+
// Run Image Annotation process on provided list of file ids
|
|
557
|
+
// Note - the processes of this endpoint are synchronous and may take time to complete
|
|
558
|
+
rpc BulkAnnotateImages (BulkAnnotateImagesRequest) returns (BulkAnnotateImagesResponse) {
|
|
559
|
+
option (.wix.api.exposure) = INTERNAL;
|
|
560
|
+
option (.wix.api.required) = "BulkAnnotateImagesRequest.file_ids";
|
|
561
|
+
option (.wix.api.required) = "BulkAnnotateImagesRequest.annotation_types";
|
|
562
|
+
option (google.api.http) = {post: "/v1/bulk/files/images/annotate"};
|
|
563
|
+
option (.wix.api.permission).name = "MEDIA.SITE_MEDIA_FILES_IMAGE_DETECTION";
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
|
|
567
|
+
// Generates a URL for downloading a compressed file containing specific files in the Media Manager.
|
|
568
|
+
//
|
|
569
|
+
// The compressed file can contain up to 1000 files.
|
|
570
|
+
//
|
|
571
|
+
// To generate one or more temporary URLs for downloading a specific file in the Media Manager, use the [Generate File Download URL](/generate-file-download-url) endpoint.
|
|
572
|
+
// You can use the `expirationInMinutes` parameter to set the URL expiration time, making it more secure than the Generate Files Download URL endpoint.
|
|
573
|
+
// Therefore, to download private files, use the Generate File Download URL endpoint for each private file that you want to generate a download URL for.
|
|
574
|
+
rpc GenerateFilesDownloadUrl (GenerateFilesDownloadUrlRequest) returns (GenerateFilesDownloadUrlResponse) {
|
|
575
|
+
option (.wix.api.required) = "GenerateFilesDownloadUrlRequest.file_ids";
|
|
576
|
+
option (google.api.http) = {post: "/v1/files/generate-download-url"};
|
|
577
|
+
option (.wix.api.permission).name = "MEDIA.SITE_MEDIA_FILES_DOWNLOAD";
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
// Generates one or more temporary URLs for downloading a specific file in the Media Manager.
|
|
581
|
+
//
|
|
582
|
+
// To download different assets of the file, use the `assetKeys` parameter which generates a download URL for each asset.
|
|
583
|
+
// If no `assetKey` is specified, it defaults to `src`, which generates one download URL in the original file's format and quality.
|
|
584
|
+
//
|
|
585
|
+
// Use this endpoint to grant external clients access to a private media file. Use the `expirationInMinutes` parameter to set the URL expiration time, and the `expirationRedirectUrl` parameter to add a redirect url when the URL expires.
|
|
586
|
+
//
|
|
587
|
+
// To generate a permanent URL for downloading a compressed file that contains multiple files in the Media Manager, use the [Generate Files Download URL](/generate-files-download-url) endpoint.
|
|
588
|
+
// Since this is a permanent URL, it is less secure.
|
|
589
|
+
// Therefore, to download private files, use the Generate File Download URL endpoint for each private file that you want to generate a download URL for.
|
|
590
|
+
rpc GenerateFileDownloadUrl (GenerateFileDownloadUrlRequest) returns (GenerateFileDownloadUrlResponse) {
|
|
591
|
+
option (.wix.api.required) = "GenerateFileDownloadUrlRequest.file_id";
|
|
592
|
+
option (google.api.http) = {
|
|
593
|
+
post: "/v1/files/generate-file-download-url"
|
|
594
|
+
additional_bindings: {
|
|
595
|
+
post: "/v1/files/{file_id}/generate-download-url"
|
|
596
|
+
}
|
|
597
|
+
};
|
|
598
|
+
|
|
599
|
+
option (.wix.api.permission).name = "MEDIA.SITE_MEDIA_FILES_DOWNLOAD_URL";
|
|
600
|
+
|
|
601
|
+
// When one or more asset keys are unsupported
|
|
602
|
+
option (.wix.api.custom_validation_error) = {
|
|
603
|
+
rule_name: "INVALID_ASSET_KEY"
|
|
604
|
+
data: "com.wix.media.site_media.v1.ServiceError"
|
|
605
|
+
};
|
|
606
|
+
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
// Gets information about a specific file in the Media Manager.
|
|
610
|
+
rpc GetFileDescriptor (GetFileDescriptorRequest) returns (GetFileDescriptorResponse) {
|
|
611
|
+
option (.wix.api.required) = "GetFileDescriptorRequest.file_id";
|
|
612
|
+
option (google.api.http) = {
|
|
613
|
+
get: "/v1/files/get-file-by-id"
|
|
614
|
+
additional_bindings: {
|
|
615
|
+
get: "/v1/files/{file_id}"
|
|
616
|
+
}
|
|
617
|
+
};
|
|
618
|
+
option (.wix.api.permission).name = "MEDIA.SITE_MEDIA_FILES_READ";
|
|
619
|
+
// File could not be found
|
|
620
|
+
option (.wix.api.custom_validation_error) = {
|
|
621
|
+
rule_name: "RESOURCE_NOT_FOUND"
|
|
622
|
+
data: "com.wix.media.site_media.v1.ServiceError"
|
|
623
|
+
};
|
|
624
|
+
option (.wix.api.crud) = {
|
|
625
|
+
method: GET_ITEM
|
|
626
|
+
get_options: {
|
|
627
|
+
id_field: "file_id"
|
|
628
|
+
item_field: "file"
|
|
629
|
+
}
|
|
630
|
+
};
|
|
631
|
+
}
|
|
632
|
+
// Gets information about specific files in the Media Manager.
|
|
633
|
+
rpc GetFileDescriptors (GetFileDescriptorsRequest) returns (GetFileDescriptorsResponse) {
|
|
634
|
+
option (.wix.api.required) = "GetFileDescriptorsRequest.file_ids";
|
|
635
|
+
option (google.api.http) = {post: "/v1/files/get-files"};
|
|
636
|
+
option (.wix.api.permission).name = "MEDIA.SITE_MEDIA_FILES_READ";
|
|
637
|
+
// File could not be found
|
|
638
|
+
option (.wix.api.custom_validation_error) = {
|
|
639
|
+
rule_name: "RESOURCE_NOT_FOUND"
|
|
640
|
+
data: "com.wix.media.site_media.v1.ServiceError"
|
|
641
|
+
};
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
// Updates a file. <br />
|
|
645
|
+
//
|
|
646
|
+
// You can use the `parentFolderId` parameter to move a file from its current folder to a different folder.
|
|
647
|
+
rpc UpdateFileDescriptor (UpdateFileDescriptorRequest) returns (UpdateFileDescriptorResponse) {
|
|
648
|
+
option (.wix.api.callback) = {
|
|
649
|
+
event_type: UPDATED
|
|
650
|
+
};
|
|
651
|
+
option (.wix.api.required) = "UpdateFileDescriptorRequest.file.id";
|
|
652
|
+
option (.wix.api.required) = "UpdateFileDescriptorRequest.file";
|
|
653
|
+
|
|
654
|
+
option (google.api.http) = {
|
|
655
|
+
patch: "/v1/files/update-file-descriptor"
|
|
656
|
+
additional_bindings: {
|
|
657
|
+
patch: "/v1/files/{file.id}/update"
|
|
658
|
+
}
|
|
659
|
+
};
|
|
660
|
+
option (.wix.api.permission).name = "MEDIA.SITE_MEDIA_FILES_UPDATE";
|
|
661
|
+
option (.wix.http.infer_fieldmask) = {
|
|
662
|
+
from: "file"
|
|
663
|
+
fieldmask: "field_mask"
|
|
664
|
+
};
|
|
665
|
+
// Field mask field is empty or missing from the request
|
|
666
|
+
option (.wix.api.custom_validation_error) = {
|
|
667
|
+
rule_name: "FIELD_MASK_IS_EMPTY_OR_MISSING"
|
|
668
|
+
data: "com.wix.media.site_media.v1.UnsupportedRequestValueError"
|
|
669
|
+
};
|
|
670
|
+
|
|
671
|
+
option (.wix.api.crud) = {
|
|
672
|
+
method: UPDATE
|
|
673
|
+
update_options: {
|
|
674
|
+
item_field: "file"
|
|
675
|
+
fieldmask_field: "field_mask"
|
|
676
|
+
}
|
|
677
|
+
};
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
// Generates an upload URL to allow external clients to upload a file to the Media Manager. <br/>
|
|
681
|
+
//
|
|
682
|
+
// To learn how external clients can use the generated upload URL in the response to upload a file to the Media Manager, see the [Upload API](https://dev.wix.com/docs/rest/assets/media/media-manager/files/upload-api) article.
|
|
683
|
+
// > **Notes:**
|
|
684
|
+
// > - When you upload a file, it's not immediately available, meaning you can't manage or use the file straight away. Learn more about [knowing when a file is ready](/media-manager/files/importing-files#knowing-when-a-file-is-ready).
|
|
685
|
+
// > - Any interruption in the upload process stops the file upload. For files larger than 10MB, or when network connection is poor, use the [Generate File Resumable Upload URL](https://dev.wix.com/api/rest/media/media-manager/files/generate-file-resumable-upload-url) instead. With the resumable upload URL, any interruption in the upload process pauses the file upload, and resumes the file upload process after the interruption.
|
|
686
|
+
rpc GenerateFileUploadUrl (GenerateFileUploadUrlRequest) returns (GenerateFileUploadUrlResponse) {
|
|
687
|
+
option (.wix.api.required) = "GenerateFileUploadUrlRequest.mime_type";
|
|
688
|
+
option (google.api.http) = {post: "/v1/files/generate-upload-url"};
|
|
689
|
+
option (.wix.api.permission).name = "MEDIA.SITE_MEDIA_FILES_UPLOAD";
|
|
690
|
+
|
|
691
|
+
// MimeType is not matching the file extension
|
|
692
|
+
option (.wix.api.custom_validation_error) = {
|
|
693
|
+
rule_name: "MISMATCH_MIME_TYPE"
|
|
694
|
+
data: "com.wix.media.site_media.v1.ServiceError"
|
|
695
|
+
};
|
|
696
|
+
|
|
697
|
+
// File size is zero
|
|
698
|
+
option (.wix.api.custom_validation_error) = {
|
|
699
|
+
rule_name: "ZERO_FILE_SIZE"
|
|
700
|
+
data: "com.wix.media.site_media.v1.ServiceError"
|
|
701
|
+
};
|
|
702
|
+
|
|
703
|
+
// File format is recognized but unsupported
|
|
704
|
+
option (.wix.api.custom_validation_error) = {
|
|
705
|
+
rule_name: "UNSUPPORTED_FILE_FORMAT"
|
|
706
|
+
data: "com.wix.media.site_media.v1.ServiceError"
|
|
707
|
+
};
|
|
708
|
+
|
|
709
|
+
// File size is over allowed size for the media type
|
|
710
|
+
option (.wix.api.custom_validation_error) = {
|
|
711
|
+
rule_name: "FILE_SIZE_OVER_LIMIT"
|
|
712
|
+
data: "com.wix.media.site_media.v1.ServiceError"
|
|
713
|
+
};
|
|
714
|
+
// The site quota is or will exceed the limit
|
|
715
|
+
option (.wix.api.custom_validation_error) = {
|
|
716
|
+
rule_name: "SITE_QUOTA_EXCEEDED"
|
|
717
|
+
data: "com.wix.media.site_media.v1.SiteQuotaExceededError"
|
|
718
|
+
};
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
// Generates a resumable upload URL to allow external clients to easily upload large files over 10MB to the Media Manager. <br/>
|
|
722
|
+
//
|
|
723
|
+
// With the resumable upload URL, any interruptions in the upload process pauses the file upload, and resumes the file upload process after the interruption. The resumable upload URL is also helpful when network connection is poor.
|
|
724
|
+
// To learn how external clients can use the generated upload URL in the response to upload large files to the Media Manager, see the [Resumable Upload API](https://dev.wix.com/api/rest/media/media-manager/files/resumable-upload-api) article.
|
|
725
|
+
//
|
|
726
|
+
// > **Note:** When you upload a file, it's not immediately available, meaning you can't manage or use the file straight away. Learn more about [knowing when a file is ready](/media-manager/files/importing-files#knowing-when-a-file-is-ready).
|
|
727
|
+
rpc GenerateFileResumableUploadUrl (GenerateFileResumableUploadUrlRequest) returns (GenerateFileResumableUploadUrlResponse) {
|
|
728
|
+
option (.wix.api.required) = "GenerateFileResumableUploadUrlRequest.mime_type";
|
|
729
|
+
option (google.api.http) = {post: "/v1/files/generate-resumable-upload-url"};
|
|
730
|
+
option (.wix.api.permission).name = "MEDIA.SITE_MEDIA_FILES_UPLOAD";
|
|
731
|
+
|
|
732
|
+
// MimeType is not matching the file extension
|
|
733
|
+
option (.wix.api.custom_validation_error) = {
|
|
734
|
+
rule_name: "MISMATCH_MIME_TYPE"
|
|
735
|
+
data: "com.wix.media.site_media.v1.ServiceError"
|
|
736
|
+
};
|
|
737
|
+
|
|
738
|
+
// File size is zero
|
|
739
|
+
option (.wix.api.custom_validation_error) = {
|
|
740
|
+
rule_name: "ZERO_FILE_SIZE"
|
|
741
|
+
data: "com.wix.media.site_media.v1.ServiceError"
|
|
742
|
+
};
|
|
743
|
+
|
|
744
|
+
// File format is recognized but unsupported
|
|
745
|
+
option (.wix.api.custom_validation_error) = {
|
|
746
|
+
rule_name: "UNSUPPORTED_FILE_FORMAT"
|
|
747
|
+
data: "com.wix.media.site_media.v1.ServiceError"
|
|
748
|
+
};
|
|
749
|
+
|
|
750
|
+
// File size is over allowed size for the media type
|
|
751
|
+
option (.wix.api.custom_validation_error) = {
|
|
752
|
+
rule_name: "FILE_SIZE_OVER_LIMIT"
|
|
753
|
+
data: "com.wix.media.site_media.v1.ServiceError"
|
|
754
|
+
};
|
|
755
|
+
}
|
|
756
|
+
// Imports a file to the Media Manager using an external url.
|
|
757
|
+
//
|
|
758
|
+
// Returns information about the imported file.
|
|
759
|
+
// Use the `parentFolderId` and `filePath` parameters to specify which folder you want the file to be imported to.
|
|
760
|
+
// If no folder is specified, the file is imported to the `media-root` folder.
|
|
761
|
+
//
|
|
762
|
+
// >**Notes:**
|
|
763
|
+
// > - The `media` property isn't returned in the `files` response object.
|
|
764
|
+
// > - When you import a file, it's not immediately available, meaning you can't manage or use the file straight away. Learn more about [knowing when a file is ready](/media-manager/files/importing-files#knowing-when-a-file-is-ready).
|
|
765
|
+
//
|
|
766
|
+
// To import a file, you need to do one of the following:
|
|
767
|
+
// - Pass its [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) in the `mimeType` field of the request. For example, `mimeType: 'image/jpeg'`.
|
|
768
|
+
// - Include its extension in either the `displayName` or `url` field of the request. For example, `displayName: 'Example Image.jpeg` or `url: https://www.example.com/image.jpeg`.
|
|
769
|
+
// - Ensure the server hosting the file supports HEAD requests. In these cases the Wix servers can retrieve the MIME type from the hosting server.
|
|
770
|
+
// > **Note:** If you want to validate the media type, pass the file's expected media type in the optional `mediaType` field of the request. For example, `mediaType: 'IMAGE'`.
|
|
771
|
+
rpc ImportFile (ImportFileRequest) returns (ImportFileResponse) {
|
|
772
|
+
option (.wix.api.callback) = {
|
|
773
|
+
event_type: ACTION
|
|
774
|
+
payload: "com.wix.media.site_media.v1.FileReady"
|
|
775
|
+
};
|
|
776
|
+
option (.wix.api.callback) = {
|
|
777
|
+
event_type: ACTION
|
|
778
|
+
payload: "com.wix.media.site_media.v1.FileFailed"
|
|
779
|
+
};
|
|
780
|
+
option (.wix.api.required) = "ImportFileRequest.url";
|
|
781
|
+
option (google.api.http) = {post: "/v1/files/import"};
|
|
782
|
+
option (.wix.api.permission).name = "MEDIA.SITE_MEDIA_FILES_IMPORT";
|
|
783
|
+
// The filter media type is not supported
|
|
784
|
+
option (.wix.api.custom_validation_error) = {
|
|
785
|
+
rule_name: "SITE_QUOTA_EXCEEDED"
|
|
786
|
+
data: "com.wix.media.site_media.v1.SiteQuotaExceededError"
|
|
787
|
+
};
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
// Imports a bulk of files to the Media Manager using external urls. <br/>
|
|
791
|
+
// <blockquote class='warning'>
|
|
792
|
+
//
|
|
793
|
+
// __Deprecation Notice:__
|
|
794
|
+
//
|
|
795
|
+
// This endpoint has been replaced with [Bulk Import File](https://dev.wix.com/api/rest/media/media-manager/files/bulk-import-file) and will be removed on March 31, 2024.
|
|
796
|
+
//
|
|
797
|
+
// </blockquote>
|
|
798
|
+
// Returns information about the imported files.
|
|
799
|
+
//
|
|
800
|
+
// Use the `parentFolderId` and `filePath` parameters to specify the folder you want each file to be imported to.
|
|
801
|
+
// If no folder is specified, the file is imported to the `media-root` folder.
|
|
802
|
+
//
|
|
803
|
+
// >**Note:** The `media` property isn't returned in the `files` response object.
|
|
804
|
+
//
|
|
805
|
+
// To import files, you need to do one of the following for each file:
|
|
806
|
+
// - Pass its [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) in the `mimeType` field of the request. For example, `mimeType: 'image/jpeg'`.
|
|
807
|
+
// - Include its extension in either the `displayName` or `url` field of the request. For example, `displayName: 'Example Image.jpeg` or `url: https://www.example.com/image.jpeg`.
|
|
808
|
+
// - Ensure the server hosting the file supports HEAD requests. In these cases the Wix servers can retrieve the MIME type from the hosting server.
|
|
809
|
+
//
|
|
810
|
+
// > **Note:** If you want to validate the media type, pass the file's expected media type in the optional `mediaType` field of the request. For example, `mediaType: 'IMAGE'`.
|
|
811
|
+
rpc BulkImportFiles (BulkImportFilesRequest) returns (BulkImportFilesResponse) {
|
|
812
|
+
option (.wix.api.required) = "BulkImportFilesRequest.import_file_requests";
|
|
813
|
+
option (.wix.api.required) = "BulkImportFilesRequest.import_file_requests.url";
|
|
814
|
+
option (google.api.http) = {post: "/v1/bulk/files/import"};
|
|
815
|
+
option (.wix.api.permission).name = "MEDIA.SITE_MEDIA_FILES_IMPORT";
|
|
816
|
+
option (.wix.api.deprecated) = {
|
|
817
|
+
replaced_by: "com.wix.media.site_media.v1.FilesService.BulkImportFile" // relative, or: "entity_fqdn.action" as absolute identifier
|
|
818
|
+
target_removal_date: "2024-03-31"
|
|
819
|
+
};
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
|
|
823
|
+
// Imports a bulk of files to the Media Manager using external urls. <br/>
|
|
824
|
+
//
|
|
825
|
+
// Returns information about the imported files.
|
|
826
|
+
//
|
|
827
|
+
// Use the `parentFolderId` and `filePath` parameters to specify the folder you want each file to be imported to.
|
|
828
|
+
// If no folder is specified, the file is imported to the `media-root` folder.
|
|
829
|
+
//
|
|
830
|
+
// >**Notes:**
|
|
831
|
+
// > - The `media` property isn't returned in the `files` response object.
|
|
832
|
+
// > - When you import a file, it's not immediately available, meaning you can't manage or use the file straight away. Learn more about [knowing when a file is ready](/media-manager/files/importing-files#knowing-when-a-file-is-ready).
|
|
833
|
+
//
|
|
834
|
+
// To import files, you need to do one of the following for each file:
|
|
835
|
+
// - Pass its [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) in the `mimeType` field of the request. For example, `mimeType: 'image/jpeg'`.
|
|
836
|
+
// - Include its extension in either the `displayName` or `url` field of the request. For example, `displayName: 'Example Image.jpeg` or `url: https://www.example.com/image.jpeg`.
|
|
837
|
+
// - Ensure the server hosting the file supports HEAD requests. In these cases the Wix servers can retrieve the MIME type from the hosting server.
|
|
838
|
+
// > **Note:** If you want to validate the media type, pass the file's expected media type in the optional `mediaType` field of the request. For example, `mediaType: 'IMAGE'`.
|
|
839
|
+
rpc BulkImportFile (BulkImportFileRequest) returns (BulkImportFileResponse) {
|
|
840
|
+
option (.wix.api.callback) = {
|
|
841
|
+
event_type: ACTION
|
|
842
|
+
payload: "com.wix.media.site_media.v1.FileReady"
|
|
843
|
+
};
|
|
844
|
+
option (.wix.api.callback) = {
|
|
845
|
+
event_type: ACTION
|
|
846
|
+
payload: "com.wix.media.site_media.v1.FileFailed"
|
|
847
|
+
};
|
|
848
|
+
option (.wix.api.required) = "BulkImportFileRequest.import_file_requests";
|
|
849
|
+
option (.wix.api.required) = "BulkImportFileRequest.import_file_requests.url";
|
|
850
|
+
option (google.api.http) = {post: "/v1/bulk/files/import-v2"};
|
|
851
|
+
option (.wix.api.permission).name = "MEDIA.SITE_MEDIA_FILES_IMPORT";
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
|
|
855
|
+
// Retrieves a list of files in the Media Manager.
|
|
856
|
+
//
|
|
857
|
+
// To retrieve a list of files within a specific folder in the Media Manager, pass the folder's ID in the `parentFolderId` parameter. If no folder is specified, the endpoint retrieves the list of files in the root folder of the Media Manager.
|
|
858
|
+
rpc ListFiles (ListFilesRequest) returns (ListFilesResponse){
|
|
859
|
+
option (google.api.http) = {get: "/v1/files"};
|
|
860
|
+
option (.wix.api.permission).name = "MEDIA.SITE_MEDIA_FILES_LIST";
|
|
861
|
+
|
|
862
|
+
// The filter media type is not supported
|
|
863
|
+
option (.wix.api.custom_validation_error) = {
|
|
864
|
+
rule_name: "UNSUPPORTED_MEDIA_TYPE"
|
|
865
|
+
data: "com.wix.media.site_media.v1.UnsupportedRequestValueError"
|
|
866
|
+
};
|
|
867
|
+
// Sort value is not supported
|
|
868
|
+
option (.wix.api.custom_validation_error) = {
|
|
869
|
+
rule_name: "UNSUPPORTED_SORT_VALUE"
|
|
870
|
+
data: "com.wix.media.site_media.v1.UnsupportedRequestValueError"
|
|
871
|
+
};
|
|
872
|
+
// cannot add CRUD annotations because we don't use a query object
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
// Searches all folders in the Media Manager and returns a list of files that match the terms specified in the parameters. <br/>
|
|
876
|
+
//
|
|
877
|
+
// If no parameters are specified, the endpoint returns all files in the `MEDIA_ROOT` folder.
|
|
878
|
+
rpc SearchFiles (SearchFilesRequest) returns (SearchFilesResponse){
|
|
879
|
+
option (google.api.http) = {post: "/v1/files/search"};
|
|
880
|
+
option (.wix.api.permission).name = "MEDIA.SITE_MEDIA_FILES_LIST";
|
|
881
|
+
|
|
882
|
+
// The filter media type is not supported
|
|
883
|
+
option (.wix.api.custom_validation_error) = {
|
|
884
|
+
rule_name: "UNSUPPORTED_MEDIA_TYPE"
|
|
885
|
+
data: "com.wix.media.site_media.v1.UnsupportedRequestValueError"
|
|
886
|
+
};
|
|
887
|
+
// Sort value is not supported
|
|
888
|
+
option (.wix.api.custom_validation_error) = {
|
|
889
|
+
rule_name: "UNSUPPORTED_SORT_VALUE"
|
|
890
|
+
data: "com.wix.media.site_media.v1.UnsupportedRequestValueError"
|
|
891
|
+
};
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
// Generates a URL for streaming a specific video file in the Media Manager. <br/>
|
|
895
|
+
//
|
|
896
|
+
// To stream different assets of the file, use the `assetKeys` parameter which generates a video streaming URL for each asset. If no assetKey is specified, it defaults to `src`, which generates one video streaming URL in the original file's format and quality.
|
|
897
|
+
rpc GenerateVideoStreamingUrl (GenerateVideoStreamingUrlRequest) returns (GenerateVideoStreamingUrlResponse){
|
|
898
|
+
option (.wix.api.required) = "GenerateVideoStreamingUrlRequest.file_id";
|
|
899
|
+
option (google.api.http) = {
|
|
900
|
+
post: "/v1/files/generate-video-stream-url"
|
|
901
|
+
additional_bindings: {
|
|
902
|
+
post: "/v1/files/video/{file_id}/generate-stream-url"
|
|
903
|
+
}
|
|
904
|
+
};
|
|
905
|
+
option (.wix.api.permission).name = "MEDIA.SITE_MEDIA_FILES_READ";
|
|
906
|
+
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
// Return a token for a direct web socket notification channel
|
|
910
|
+
// This API is not platformized (Contact the Media team for use instructions)
|
|
911
|
+
// This API should be internal only
|
|
912
|
+
rpc GenerateWebSocketToken (GenerateWebSocketTokenRequest) returns (GenerateWebSocketTokenResponse){
|
|
913
|
+
option (.wix.api.exposure) = INTERNAL;
|
|
914
|
+
option (google.api.http) = {post: "/v1/files/generate-web-socket-token"};
|
|
915
|
+
option (.wix.api.permission).name = "MEDIA.SITE_MEDIA_WEB_NOTIFICATIONS_TOKEN";
|
|
916
|
+
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
// Deletes the specified files from the Media Manager. <br/>
|
|
920
|
+
//
|
|
921
|
+
// The deleted files are moved to the Media Manager's trash bin (`TRASH-ROOT` folder) unless permanently deleted. To permanently delete files, pass the `permanent` parameter with the value `true`. Permanently deleting files isn't reversible, so make sure that these files aren't being used in a site or in any other way as the files will no longer be accessible.
|
|
922
|
+
//
|
|
923
|
+
// Note the following:
|
|
924
|
+
// * The specified files can be from different folders.
|
|
925
|
+
// * Moving multiple files at once is an asynchronous action, and may take time for the changes to appear in the Media Manager.
|
|
926
|
+
// * Attempting to delete files that are already in the trash bin doesn't result in an error.
|
|
927
|
+
// * If your site contains deleted media files, the deleted media files still appear on your site as the files are still in the Media Manager (in the trash bin).
|
|
928
|
+
// * You can use the [Bulk Restore Files From Trash Bin](https://dev.wix.com/api/rest/media/media-manager/files/bulk-restore-files-from-trash-bin) endpoint to restore files from the Media Manager's trash bin.
|
|
929
|
+
rpc BulkDeleteFiles (BulkDeleteFilesRequest) returns (BulkDeleteFilesResponse) {
|
|
930
|
+
option (.wix.api.callback) = {
|
|
931
|
+
event_type: DELETED
|
|
932
|
+
};
|
|
933
|
+
option (.wix.api.required) = "BulkDeleteFilesRequest.file_ids";
|
|
934
|
+
option (google.api.http) = {post: "/v1/bulk/files/delete"};
|
|
935
|
+
option (.wix.api.permission).name = "MEDIA.SITE_MEDIA_FILES_MOVE_TO_TRASH";
|
|
936
|
+
option (.wix.api.crud) = {
|
|
937
|
+
method: BULK_DELETE
|
|
938
|
+
bulk_delete_options: {
|
|
939
|
+
ids_field: "file_ids"
|
|
940
|
+
}
|
|
941
|
+
};
|
|
942
|
+
}
|
|
943
|
+
|
|
944
|
+
// Restores the specified files from the Media Manager's trash bin, and moves them to their original locations in the Media Manager.
|
|
945
|
+
rpc BulkRestoreFilesFromTrashBin(BulkRestoreFilesFromTrashBinRequest) returns (BulkRestoreFilesFromTrashBinResponse) {
|
|
946
|
+
option (.wix.api.callback) = {
|
|
947
|
+
event_type: ACTION
|
|
948
|
+
payload: "com.wix.media.site_media.v1.FileReady"
|
|
949
|
+
};
|
|
950
|
+
option (.wix.api.required) = "BulkRestoreFilesFromTrashBinRequest.file_ids";
|
|
951
|
+
option (google.api.http) = {
|
|
952
|
+
post : "/v1/bulk/trash-bin/files/restore"
|
|
953
|
+
};
|
|
954
|
+
option (.wix.api.permission).name = "MEDIA.SITE_MEDIA_FILES_RESTORE_FROM_TRASH";
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
// Retrieves a list of files in the Media Manager's trash bin. <br/>
|
|
958
|
+
//
|
|
959
|
+
// >**Note:** The Media Manager's trash bin (`TRASH-ROOT` folder) only contains temporarily deleted files, not permanently deleted files.
|
|
960
|
+
rpc ListDeletedFiles(ListDeletedFilesRequest) returns (ListDeletedFilesResponse) {
|
|
961
|
+
option (google.api.http) = {
|
|
962
|
+
get : "/v1/trash-bin/files"
|
|
963
|
+
};
|
|
964
|
+
option (.wix.api.permission).name = "MEDIA.SITE_MEDIA_FILES_LIST_DELETED";
|
|
965
|
+
// The filter media type is not supported
|
|
966
|
+
option (.wix.api.custom_validation_error) = {
|
|
967
|
+
rule_name: "UNSUPPORTED_MEDIA_TYPE"
|
|
968
|
+
data: "com.wix.media.site_media.v1.UnsupportedRequestValueError"
|
|
969
|
+
};
|
|
970
|
+
option (.wix.api.custom_validation_error) = {
|
|
971
|
+
rule_name: "UNSUPPORTED_SORT_VALUE"
|
|
972
|
+
data: "com.wix.media.site_media.v1.UnsupportedRequestValueError"
|
|
973
|
+
};
|
|
974
|
+
// cannot add CRUD annotations because we don't use a query object
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
/* Updates a file.
|
|
978
|
+
|
|
979
|
+
<blockquote class='warning'>
|
|
980
|
+
|
|
981
|
+
__Deprecation Notice:__
|
|
982
|
+
|
|
983
|
+
This endpoint has been replaced with [Update File Descriptor](https://dev.wix.com/api/rest/media/media-manager/files/update-file-descriptor) and will be removed on March 31, 2023.
|
|
984
|
+
|
|
985
|
+
</blockquote>
|
|
986
|
+
|
|
987
|
+
You can use the `parentFolderId` parameter to move a file from its current folder to a different folder.
|
|
988
|
+
*/
|
|
989
|
+
rpc UpdateFile (UpdateFileRequest) returns (UpdateFileResponse) {
|
|
990
|
+
// method is deprecated due to standard aligning
|
|
991
|
+
option (.wix.api.deprecated) = {
|
|
992
|
+
replaced_by: "com.wix.media.site_media.v1.filesService.UpdateFileDescriptor"
|
|
993
|
+
target_removal_date: "2023-03-31"
|
|
994
|
+
};
|
|
995
|
+
option (.wix.api.required) = "UpdateFileRequest.file_id";
|
|
996
|
+
option (google.api.http) = {
|
|
997
|
+
patch: "/v1/files/update-file"
|
|
998
|
+
additional_bindings: {
|
|
999
|
+
patch: "/v1/files/{file_id}"
|
|
1000
|
+
}
|
|
1001
|
+
};
|
|
1002
|
+
option (.wix.api.permission).name = "MEDIA.SITE_MEDIA_FILES_UPDATE";
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
// Triggered when a file is updated, including when a file is moved to a different folder.
|
|
1006
|
+
option (.wix.api.event) = {
|
|
1007
|
+
event_type: UPDATED
|
|
1008
|
+
};
|
|
1009
|
+
|
|
1010
|
+
// Triggered when a file is deleted.
|
|
1011
|
+
//
|
|
1012
|
+
// If the `movedToTrash` property in the event object `true`, the file was moved to the Media Manager's trash bin. If the `movedToTrash` property in the event object is `false`, the file was permanently deleted.
|
|
1013
|
+
option (.wix.api.event) = {
|
|
1014
|
+
event_type: DELETED
|
|
1015
|
+
};
|
|
1016
|
+
|
|
1017
|
+
// Triggered when a file is ready to be used, after any post-upload processing.
|
|
1018
|
+
//
|
|
1019
|
+
// This event is also triggred when a file is restored from the Media Manager's trash bin.
|
|
1020
|
+
option (.wix.api.event) = {
|
|
1021
|
+
event_type: ACTION
|
|
1022
|
+
payload: "com.wix.media.site_media.v1.FileReady"
|
|
1023
|
+
};
|
|
1024
|
+
|
|
1025
|
+
// Triggered when a file fails during essential post-upload processing.
|
|
1026
|
+
option (.wix.api.event) = {
|
|
1027
|
+
event_type: ACTION
|
|
1028
|
+
payload: "com.wix.media.site_media.v1.FileFailed"
|
|
1029
|
+
};
|
|
1030
|
+
}
|