@wix/media 1.0.63 → 1.0.65

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.
Files changed (169) hide show
  1. package/build/cjs/context.d.ts +4 -4
  2. package/build/cjs/context.js +4 -4
  3. package/build/cjs/context.js.map +1 -1
  4. package/build/cjs/index.d.ts +4 -4
  5. package/build/cjs/index.js +4 -4
  6. package/build/cjs/index.js.map +1 -1
  7. package/build/cjs/meta.d.ts +4 -4
  8. package/build/cjs/meta.js +4 -4
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/context.d.ts +4 -4
  11. package/build/es/context.js +4 -4
  12. package/build/es/context.js.map +1 -1
  13. package/build/es/index.d.ts +4 -4
  14. package/build/es/index.js +4 -4
  15. package/build/es/index.js.map +1 -1
  16. package/build/es/meta.d.ts +4 -4
  17. package/build/es/meta.js +4 -4
  18. package/build/es/meta.js.map +1 -1
  19. package/package.json +14 -9
  20. package/build/cjs/index.typings.d.ts +0 -4
  21. package/build/cjs/index.typings.js +0 -31
  22. package/build/cjs/index.typings.js.map +0 -1
  23. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.context.d.ts +0 -8
  24. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.context.js +0 -107
  25. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.context.js.map +0 -1
  26. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.http.d.ts +0 -16
  27. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.http.js +0 -245
  28. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.http.js.map +0 -1
  29. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.meta.d.ts +0 -24
  30. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.meta.js +0 -142
  31. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.meta.js.map +0 -1
  32. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.public.d.ts +0 -26
  33. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.public.js +0 -49
  34. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.public.js.map +0 -1
  35. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.types.d.ts +0 -221
  36. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.types.js +0 -22
  37. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.types.js.map +0 -1
  38. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.universal.d.ts +0 -315
  39. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.universal.js +0 -421
  40. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-category.universal.js.map +0 -1
  41. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.context.d.ts +0 -13
  42. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.context.js +0 -192
  43. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.context.js.map +0 -1
  44. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.http.d.ts +0 -29
  45. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.http.js +0 -446
  46. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.http.js.map +0 -1
  47. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.meta.d.ts +0 -33
  48. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.meta.js +0 -237
  49. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.meta.js.map +0 -1
  50. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.public.d.ts +0 -59
  51. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.public.js +0 -81
  52. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.public.js.map +0 -1
  53. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.types.d.ts +0 -949
  54. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.types.js +0 -27
  55. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.types.js.map +0 -1
  56. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.universal.d.ts +0 -907
  57. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.universal.js +0 -763
  58. package/build/cjs/src/media-enterprise-public-media-v1-enterprise-item.universal.js.map +0 -1
  59. package/build/cjs/src/media-site-media-v1-file-descriptor.context.d.ts +0 -18
  60. package/build/cjs/src/media-site-media-v1-file-descriptor.context.js +0 -277
  61. package/build/cjs/src/media-site-media-v1-file-descriptor.context.js.map +0 -1
  62. package/build/cjs/src/media-site-media-v1-file-descriptor.http.d.ts +0 -185
  63. package/build/cjs/src/media-site-media-v1-file-descriptor.http.js +0 -839
  64. package/build/cjs/src/media-site-media-v1-file-descriptor.http.js.map +0 -1
  65. package/build/cjs/src/media-site-media-v1-file-descriptor.meta.d.ts +0 -36
  66. package/build/cjs/src/media-site-media-v1-file-descriptor.meta.js +0 -332
  67. package/build/cjs/src/media-site-media-v1-file-descriptor.meta.js.map +0 -1
  68. package/build/cjs/src/media-site-media-v1-file-descriptor.public.d.ts +0 -136
  69. package/build/cjs/src/media-site-media-v1-file-descriptor.public.js +0 -118
  70. package/build/cjs/src/media-site-media-v1-file-descriptor.public.js.map +0 -1
  71. package/build/cjs/src/media-site-media-v1-file-descriptor.types.d.ts +0 -2017
  72. package/build/cjs/src/media-site-media-v1-file-descriptor.types.js +0 -99
  73. package/build/cjs/src/media-site-media-v1-file-descriptor.types.js.map +0 -1
  74. package/build/cjs/src/media-site-media-v1-file-descriptor.universal.d.ts +0 -2105
  75. package/build/cjs/src/media-site-media-v1-file-descriptor.universal.js +0 -1442
  76. package/build/cjs/src/media-site-media-v1-file-descriptor.universal.js.map +0 -1
  77. package/build/cjs/src/media-site-media-v1-folder.context.d.ts +0 -11
  78. package/build/cjs/src/media-site-media-v1-folder.context.js +0 -158
  79. package/build/cjs/src/media-site-media-v1-folder.context.js.map +0 -1
  80. package/build/cjs/src/media-site-media-v1-folder.http.d.ts +0 -81
  81. package/build/cjs/src/media-site-media-v1-folder.http.js +0 -364
  82. package/build/cjs/src/media-site-media-v1-folder.http.js.map +0 -1
  83. package/build/cjs/src/media-site-media-v1-folder.meta.d.ts +0 -27
  84. package/build/cjs/src/media-site-media-v1-folder.meta.js +0 -199
  85. package/build/cjs/src/media-site-media-v1-folder.meta.js.map +0 -1
  86. package/build/cjs/src/media-site-media-v1-folder.public.d.ts +0 -27
  87. package/build/cjs/src/media-site-media-v1-folder.public.js +0 -69
  88. package/build/cjs/src/media-site-media-v1-folder.public.js.map +0 -1
  89. package/build/cjs/src/media-site-media-v1-folder.types.d.ts +0 -335
  90. package/build/cjs/src/media-site-media-v1-folder.types.js +0 -50
  91. package/build/cjs/src/media-site-media-v1-folder.types.js.map +0 -1
  92. package/build/cjs/src/media-site-media-v1-folder.universal.d.ts +0 -603
  93. package/build/cjs/src/media-site-media-v1-folder.universal.js +0 -718
  94. package/build/cjs/src/media-site-media-v1-folder.universal.js.map +0 -1
  95. package/build/es/index.typings.d.ts +0 -4
  96. package/build/es/index.typings.js +0 -5
  97. package/build/es/index.typings.js.map +0 -1
  98. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.context.d.ts +0 -8
  99. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.context.js +0 -98
  100. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.context.js.map +0 -1
  101. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.http.d.ts +0 -16
  102. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.http.js +0 -236
  103. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.http.js.map +0 -1
  104. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.meta.d.ts +0 -24
  105. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.meta.js +0 -110
  106. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.meta.js.map +0 -1
  107. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.public.d.ts +0 -26
  108. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.public.js +0 -35
  109. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.public.js.map +0 -1
  110. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.types.d.ts +0 -221
  111. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.types.js +0 -19
  112. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.types.js.map +0 -1
  113. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.universal.d.ts +0 -315
  114. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.universal.js +0 -389
  115. package/build/es/src/media-enterprise-public-media-v1-enterprise-category.universal.js.map +0 -1
  116. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.context.d.ts +0 -13
  117. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.context.js +0 -178
  118. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.context.js.map +0 -1
  119. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.http.d.ts +0 -29
  120. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.http.js +0 -432
  121. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.http.js.map +0 -1
  122. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.meta.d.ts +0 -33
  123. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.meta.js +0 -200
  124. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.meta.js.map +0 -1
  125. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.public.d.ts +0 -59
  126. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.public.js +0 -60
  127. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.public.js.map +0 -1
  128. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.types.d.ts +0 -949
  129. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.types.js +0 -24
  130. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.types.js.map +0 -1
  131. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.universal.d.ts +0 -907
  132. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.universal.js +0 -726
  133. package/build/es/src/media-enterprise-public-media-v1-enterprise-item.universal.js.map +0 -1
  134. package/build/es/src/media-site-media-v1-file-descriptor.context.d.ts +0 -18
  135. package/build/es/src/media-site-media-v1-file-descriptor.context.js +0 -258
  136. package/build/es/src/media-site-media-v1-file-descriptor.context.js.map +0 -1
  137. package/build/es/src/media-site-media-v1-file-descriptor.http.d.ts +0 -185
  138. package/build/es/src/media-site-media-v1-file-descriptor.http.js +0 -820
  139. package/build/es/src/media-site-media-v1-file-descriptor.http.js.map +0 -1
  140. package/build/es/src/media-site-media-v1-file-descriptor.meta.d.ts +0 -36
  141. package/build/es/src/media-site-media-v1-file-descriptor.meta.js +0 -290
  142. package/build/es/src/media-site-media-v1-file-descriptor.meta.js.map +0 -1
  143. package/build/es/src/media-site-media-v1-file-descriptor.public.d.ts +0 -136
  144. package/build/es/src/media-site-media-v1-file-descriptor.public.js +0 -85
  145. package/build/es/src/media-site-media-v1-file-descriptor.public.js.map +0 -1
  146. package/build/es/src/media-site-media-v1-file-descriptor.types.d.ts +0 -2017
  147. package/build/es/src/media-site-media-v1-file-descriptor.types.js +0 -96
  148. package/build/es/src/media-site-media-v1-file-descriptor.types.js.map +0 -1
  149. package/build/es/src/media-site-media-v1-file-descriptor.universal.d.ts +0 -2105
  150. package/build/es/src/media-site-media-v1-file-descriptor.universal.js +0 -1400
  151. package/build/es/src/media-site-media-v1-file-descriptor.universal.js.map +0 -1
  152. package/build/es/src/media-site-media-v1-folder.context.d.ts +0 -11
  153. package/build/es/src/media-site-media-v1-folder.context.js +0 -146
  154. package/build/es/src/media-site-media-v1-folder.context.js.map +0 -1
  155. package/build/es/src/media-site-media-v1-folder.http.d.ts +0 -81
  156. package/build/es/src/media-site-media-v1-folder.http.js +0 -352
  157. package/build/es/src/media-site-media-v1-folder.http.js.map +0 -1
  158. package/build/es/src/media-site-media-v1-folder.meta.d.ts +0 -27
  159. package/build/es/src/media-site-media-v1-folder.meta.js +0 -164
  160. package/build/es/src/media-site-media-v1-folder.meta.js.map +0 -1
  161. package/build/es/src/media-site-media-v1-folder.public.d.ts +0 -27
  162. package/build/es/src/media-site-media-v1-folder.public.js +0 -50
  163. package/build/es/src/media-site-media-v1-folder.public.js.map +0 -1
  164. package/build/es/src/media-site-media-v1-folder.types.d.ts +0 -335
  165. package/build/es/src/media-site-media-v1-folder.types.js +0 -47
  166. package/build/es/src/media-site-media-v1-folder.types.js.map +0 -1
  167. package/build/es/src/media-site-media-v1-folder.universal.d.ts +0 -603
  168. package/build/es/src/media-site-media-v1-folder.universal.js +0 -683
  169. package/build/es/src/media-site-media-v1-folder.universal.js.map +0 -1
@@ -1,907 +0,0 @@
1
- import { EventDefinition } from '@wix/sdk-types';
2
- /**
3
- * Duration for video fits better if there will be type specific media item.. however, is it ok to implement
4
- * an additional one of field called details?
5
- */
6
- export interface EnterpriseMediaItem {
7
- /**
8
- * Id of the item in public media
9
- * @readonly
10
- */
11
- _id?: string;
12
- /**
13
- * Media type of the item
14
- * @readonly
15
- */
16
- mediaType?: MediaType;
17
- /**
18
- * Size of the uploaded file in bytes.
19
- * @readonly
20
- */
21
- sizeInBytes?: string | null;
22
- /** The item title, part of searchable fields */
23
- title?: string | null;
24
- /**
25
- * The aspect ratio of the item
26
- * An object containing urls for different views of the item
27
- * @readonly
28
- */
29
- assets?: ItemAssets;
30
- /** Tags describing the image, part of searchable fields */
31
- displayTags?: string[] | null;
32
- /** Tags for internal client use, part of searchable fields */
33
- internalTags?: string[] | null;
34
- /**
35
- * Tags for filtering items in the search
36
- * @readonly
37
- */
38
- systemTags?: string[] | null;
39
- /**
40
- * Category ids this item belongs to
41
- * @readonly
42
- */
43
- parentCategoryIds?: string[] | null;
44
- /** Status of the item */
45
- publishStatus?: PublishStatus;
46
- /**
47
- * Date and time the item was created.
48
- * @readonly
49
- */
50
- _createdDate?: Date;
51
- /**
52
- * Date and time the item was updated.
53
- * @readonly
54
- */
55
- _updatedDate?: Date;
56
- /**
57
- * An internal id used with different wix media systems
58
- * @readonly
59
- */
60
- internalId?: string | null;
61
- }
62
- export declare enum MediaType {
63
- MIXED = "MIXED",
64
- IMAGE = "IMAGE",
65
- VIDEO = "VIDEO",
66
- AUDIO = "AUDIO",
67
- DOCUMENT = "DOCUMENT",
68
- VECTOR = "VECTOR",
69
- ARCHIVE = "ARCHIVE",
70
- MODEL3D = "MODEL3D"
71
- }
72
- export interface ItemAssets extends ItemAssetsAssetsOneOf {
73
- /** Assets for image media type */
74
- image?: string;
75
- /** Assets for video media type */
76
- video?: string;
77
- /** Assets for vector media type */
78
- vector?: string;
79
- /** Assets for audio media type */
80
- audio?: string;
81
- /** Assets for document media type */
82
- document?: string;
83
- /** Information about the archive. */
84
- archive?: Archive;
85
- /** Information about the 3D Model. */
86
- model3d?: Model3D;
87
- }
88
- /** @oneof */
89
- export interface ItemAssetsAssetsOneOf {
90
- /** Assets for image media type */
91
- image?: string;
92
- /** Assets for video media type */
93
- video?: string;
94
- /** Assets for vector media type */
95
- vector?: string;
96
- /** Assets for audio media type */
97
- audio?: string;
98
- /** Assets for document media type */
99
- document?: string;
100
- /** Information about the archive. */
101
- archive?: Archive;
102
- /** Information about the 3D Model. */
103
- model3d?: Model3D;
104
- }
105
- export interface VideoResolution {
106
- /** Video URL. */
107
- url?: string;
108
- /** Video height. */
109
- height?: number;
110
- /** Video width. */
111
- width?: number;
112
- /**
113
- * Video format
114
- * Possible values: ['144p.mp4' '144p.webm' '240p.mp4' '240p.webm' '360p.mp4' '360p.webm' '480p.mp4' '480p.webm'
115
- * '720p.mp4' '720p.webm' '1080p.mp4' '1080p.webm' ]
116
- */
117
- format?: string;
118
- }
119
- export interface Archive {
120
- /** WixMedia ID. */
121
- _id?: string;
122
- /** Archive URL. */
123
- url?: string;
124
- /**
125
- * Archive URL expiration date (when relevant).
126
- * @readonly
127
- */
128
- urlExpirationDate?: Date;
129
- /** Archive size in bytes. */
130
- sizeInBytes?: string | null;
131
- /** Archive filename. */
132
- filename?: string | null;
133
- }
134
- export interface Model3D {
135
- /** WixMedia 3D ID. */
136
- _id?: string;
137
- /** 3D URL. */
138
- url?: string;
139
- /** 3D thumbnail Image */
140
- thumbnail?: string;
141
- /** 3D alt text. */
142
- altText?: string | null;
143
- /**
144
- * 3D URL expiration date (when relevant).
145
- * @readonly
146
- */
147
- urlExpirationDate?: Date;
148
- /**
149
- * 3D filename.
150
- * @readonly
151
- */
152
- filename?: string | null;
153
- /**
154
- * 3D size in bytes.
155
- * @readonly
156
- */
157
- sizeInBytes?: string | null;
158
- }
159
- export declare enum PublishStatus {
160
- UNDEFINED = "UNDEFINED",
161
- UNPUBLISHED = "UNPUBLISHED",
162
- PUBLISHED = "PUBLISHED",
163
- WIX_ONLY = "WIX_ONLY"
164
- }
165
- export interface ItemCategoriesChanged {
166
- /** A list of the current item categories */
167
- itemCategoryIds?: string[] | null;
168
- /** A list of the categories that where unlinked from the item */
169
- unlinkedCategoryIds?: string[] | null;
170
- /** A list of the categories that where linked to the item */
171
- linkedCategoryIds?: string[] | null;
172
- }
173
- export interface ItemUploadCallbackRequest {
174
- /** The item id of the created item */
175
- itemId?: string;
176
- /** The callback passed to the upload endpoint */
177
- callbackToken?: string;
178
- }
179
- export interface ItemUploadCallbackResponse {
180
- }
181
- export interface GenerateFileUploadUrlRequest {
182
- /** The uploaded original file name including the extension */
183
- fileName?: string;
184
- /** The file mime-type - will be used to identify the type of media */
185
- contentType?: string;
186
- /** The file size in bytes */
187
- sizeInBytes?: number;
188
- /**
189
- * An optional list of categories to link the created item to
190
- * The item will be linked to the account category automatically
191
- */
192
- categoryIds?: string[] | null;
193
- }
194
- export interface GenerateFileUploadUrlResponse {
195
- /** The upload url to upload the file to */
196
- uploadUrl?: string;
197
- }
198
- export interface ImportFileRequest {
199
- /** The url to the file to be imported */
200
- url: string;
201
- /** The uploaded original file name including the extension - will be used as the initial display name */
202
- fileName?: string | null;
203
- /** The file mime-type - will be used to identify the type of media */
204
- contentType?: string | null;
205
- /** The file size in bytes */
206
- sizeInBytes?: number | null;
207
- /**
208
- * An optional list of categories to link the created item to
209
- * The item will be linked to the account category automatically
210
- */
211
- categoryIds?: string[] | null;
212
- /** The media type of the uploaded file */
213
- mediaType?: MediaType;
214
- /**
215
- * A unique identifier of the client that imported the file
216
- * This information will exist in the system_tags field prefixed by '_external_uploader:{uploader_system_tag}'
217
- */
218
- uploaderSystemTag?: string | null;
219
- /**
220
- * An additional container for external information
221
- * mostly used to pass identifying information of related entities in external services
222
- * This information will exist in the system_tags field prefixed by '_external_uploader_info:{uploader_info_system_tag}'
223
- */
224
- uploaderInfoSystemTag?: string | null;
225
- }
226
- export interface ImportFileResponse {
227
- /**
228
- * Partial item - without the assets
229
- * At this stage of implementation only the 'internal_id' will be filled
230
- * all other required values will be fake values
231
- */
232
- item?: EnterpriseMediaItem;
233
- }
234
- export interface SearchItemsRequest {
235
- /** Items search query */
236
- query?: Search;
237
- }
238
- export interface Search extends SearchPagingMethodOneOf {
239
- /** Pointer to page of results using offset. Can not be used together with 'cursor_paging' */
240
- paging?: Paging;
241
- /** A filter object. See documentation [here](https://bo.wix.com/wix-docs/rnd/platformization-guidelines/api-query-language#platformization-guidelines_api-query-language_defining-in-protobuf) */
242
- filter?: Record<string, any> | null;
243
- /** free text to match in searchable fields */
244
- search?: SearchDetails;
245
- }
246
- /** @oneof */
247
- export interface SearchPagingMethodOneOf {
248
- /** Pointer to page of results using offset. Can not be used together with 'cursor_paging' */
249
- paging?: Paging;
250
- }
251
- export interface SearchDetails {
252
- /** search term or expression */
253
- expression?: string | null;
254
- }
255
- export interface Paging {
256
- /** Number of items to load. */
257
- limit?: number | null;
258
- /** Number of items to skip in the current sort order. */
259
- offset?: number | null;
260
- }
261
- export interface SearchItemsResponse {
262
- /** A list of items matching the request */
263
- items?: EnterpriseMediaItem[];
264
- /** Information about the search results. */
265
- pagingMetadata?: PagingMetadataV2;
266
- }
267
- export interface PagingMetadataV2 {
268
- /** Number of items returned in the response. */
269
- count?: number | null;
270
- /** Offset that was requested. */
271
- offset?: number | null;
272
- /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
273
- total?: number | null;
274
- /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
275
- cursors?: Cursors;
276
- }
277
- export interface Cursors {
278
- /** Cursor pointing to next page in the list of results. */
279
- next?: string | null;
280
- }
281
- export interface QueryItemsRequest {
282
- /** Items query */
283
- query?: QueryV2;
284
- }
285
- export interface QueryV2 extends QueryV2PagingMethodOneOf {
286
- /** Paging options to limit and skip the number of items. */
287
- paging?: Paging;
288
- /**
289
- * Filter object in the following format:
290
- * `"filter" : {
291
- * "fieldName1": "value1",
292
- * "fieldName2":{"$operator":"value2"}
293
- * }`
294
- * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
295
- */
296
- filter?: Record<string, any> | null;
297
- /**
298
- * Sort object in the following format:
299
- * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
300
- */
301
- sort?: Sorting[];
302
- }
303
- /** @oneof */
304
- export interface QueryV2PagingMethodOneOf {
305
- /** Paging options to limit and skip the number of items. */
306
- paging?: Paging;
307
- }
308
- export interface Sorting {
309
- /** Name of the field to sort by. */
310
- fieldName?: string;
311
- /** Sort order. */
312
- order?: SortOrder;
313
- }
314
- export declare enum SortOrder {
315
- ASC = "ASC",
316
- DESC = "DESC"
317
- }
318
- export interface QueryItemsResponse {
319
- /** A list of items matching the request */
320
- items?: EnterpriseMediaItem[];
321
- /** Information for the next request. */
322
- pagingMetadata?: PagingMetadataV2;
323
- }
324
- export interface UpdateItemRequest {
325
- /** The category object that will be created */
326
- item: EnterpriseMediaItem;
327
- }
328
- export interface UpdateItemResponse {
329
- /** Updated item info */
330
- item?: EnterpriseMediaItem;
331
- }
332
- export interface PublishStatusChanged {
333
- /** The new item status */
334
- publishStatus?: PublishStatus;
335
- }
336
- export interface BulkUpdateItemRequest {
337
- /** Requests to update individual item */
338
- updateItemRequests: UpdateItemRequest[];
339
- /** Should the response return the updated item */
340
- returnEntity?: boolean;
341
- }
342
- export interface BulkUpdateItemResponse {
343
- /** Requests to update individual item */
344
- results?: BulkItemUpdateResult[];
345
- /** Metadata of the operation */
346
- bulkActionMetadata?: BulkActionMetadata;
347
- }
348
- export interface BulkItemUpdateResult {
349
- /** updated item metadata */
350
- itemMetadata?: ItemMetadata;
351
- /** only returned if operation was successful and if returnEntity flag was on */
352
- item?: EnterpriseMediaItem;
353
- }
354
- export interface ItemMetadata {
355
- /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
356
- _id?: string | null;
357
- /** Index of the item within the request array. Allows for correlation between request and response items. */
358
- originalIndex?: number;
359
- /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
360
- success?: boolean;
361
- /** Details about the error in case of failure. */
362
- error?: ApplicationError;
363
- }
364
- export interface ApplicationError {
365
- /** Error code. */
366
- code?: string;
367
- /** Description of the error. */
368
- description?: string;
369
- /** Data related to the error. */
370
- data?: Record<string, any> | null;
371
- }
372
- export interface BulkActionMetadata {
373
- /** Number of items that were successfully processed. */
374
- totalSuccesses?: number;
375
- /** Number of items that couldn't be processed. */
376
- totalFailures?: number;
377
- /** Number of failures without details because detailed failure threshold was exceeded. */
378
- undetailedFailures?: number;
379
- }
380
- export interface GetItemRequest {
381
- /** Item id */
382
- itemId: string;
383
- }
384
- export interface GetItemResponse {
385
- /** item info */
386
- item?: EnterpriseMediaItem;
387
- }
388
- export interface LinkItemToCategoriesRequest {
389
- /** The item id */
390
- itemId: string;
391
- /** The category ids that the item will be linked to */
392
- categoryIds?: string[];
393
- }
394
- export interface LinkItemToCategoriesResponse {
395
- /** The linked category ids */
396
- linkedCategoryIds?: string[] | null;
397
- }
398
- export interface UnlinkItemFromCategoriesRequest {
399
- /** The item id */
400
- itemId: string;
401
- /** The category ids that the item will be unlinked from */
402
- categoryIds?: string[];
403
- }
404
- export interface UnlinkItemFromCategoriesResponse {
405
- /** The unlinked category ids */
406
- unlinkedCategoryIds?: string[] | null;
407
- }
408
- export interface OverwriteItemCategoriesRequest {
409
- /** The item id */
410
- itemId: string;
411
- /** The category ids the item will be linked to after this operation */
412
- categoryIds?: string[];
413
- }
414
- export interface OverwriteItemCategoriesResponse {
415
- /** The linked category ids */
416
- linkedCategoryIds?: string[] | null;
417
- /** The unlinked category ids */
418
- unlinkedCategoryIds?: string[] | null;
419
- }
420
- export interface DomainEvent<T = string> extends DomainEventBodyOneOf<T> {
421
- createdEvent?: EntityCreatedEvent<T>;
422
- updatedEvent?: EntityUpdatedEvent<T>;
423
- deletedEvent?: EntityDeletedEvent<T>;
424
- actionEvent?: ActionEvent<T>;
425
- /**
426
- * Unique event ID.
427
- * Allows clients to ignore duplicate webhooks.
428
- */
429
- _id?: string;
430
- /**
431
- * Assumes actions are also always typed to an entity_type
432
- * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
433
- */
434
- entityFqdn?: string;
435
- /**
436
- * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
437
- * This is although the created/updated/deleted notion is duplication of the oneof types
438
- * Example: created/updated/deleted/started/completed/email_opened
439
- */
440
- slug?: string;
441
- /** ID of the entity associated with the event. */
442
- entityId?: string;
443
- /** Event timestamp. */
444
- eventTime?: Date;
445
- /**
446
- * Whether the event was triggered as a result of a privacy regulation application
447
- * (for example, GDPR).
448
- */
449
- triggeredByAnonymizeRequest?: boolean | null;
450
- /** If present, indicates the action that triggered the event. */
451
- originatedFrom?: string | null;
452
- /**
453
- * A sequence number defining the order of updates to the underlying entity.
454
- * For example, given that some entity was updated at 16:00 and than again at 16:01,
455
- * it is guaranteed that the sequence number of the second update is strictly higher than the first.
456
- * As the consumer, you can use this value to ensure that you handle messages in the correct order.
457
- * To do so, you will need to persist this number on your end, and compare the sequence number from the
458
- * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
459
- */
460
- entityEventSequence?: string | null;
461
- }
462
- export interface DomainCreatedEvent<T> extends Omit<DomainEvent<T>, 'deletedEvent' | 'updatedEvent' | 'actionEvent'> {
463
- }
464
- export interface DomainDeletedEvent<T> extends Omit<DomainEvent<T>, 'createdEvent' | 'updatedEvent' | 'actionEvent'> {
465
- }
466
- export interface DomainUpdatedEvent<T> extends Omit<DomainEvent<T>, 'createdEvent' | 'deletedEvent' | 'actionEvent'> {
467
- }
468
- export interface DomainActionEvent<T> extends Omit<DomainEvent<T>, 'createdEvent' | 'deletedEvent' | 'updatedEvent'> {
469
- }
470
- /** @oneof */
471
- export interface DomainEventBodyOneOf<T> {
472
- createdEvent?: EntityCreatedEvent<T>;
473
- updatedEvent?: EntityUpdatedEvent<T>;
474
- deletedEvent?: EntityDeletedEvent<T>;
475
- actionEvent?: ActionEvent<T>;
476
- }
477
- export interface EntityCreatedEvent<T> {
478
- entity?: T;
479
- }
480
- export interface EntityUpdatedEvent<T> {
481
- /**
482
- * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
483
- * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
484
- * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
485
- */
486
- currentEntity?: T;
487
- }
488
- export interface EntityDeletedEvent<T> {
489
- /** Entity that was deleted */
490
- deletedEntity?: T | null;
491
- }
492
- export interface ActionEvent<T> {
493
- body?: T;
494
- }
495
- export interface GenerateFileUploadUrlResponseNonNullableFields {
496
- uploadUrl: string;
497
- }
498
- export interface ImportFileResponseNonNullableFields {
499
- item?: {
500
- _id: string;
501
- mediaType: MediaType;
502
- assets?: {
503
- image: string;
504
- video: string;
505
- vector: string;
506
- audio: string;
507
- document: string;
508
- archive?: {
509
- _id: string;
510
- url: string;
511
- };
512
- model3d?: {
513
- _id: string;
514
- url: string;
515
- thumbnail: string;
516
- };
517
- };
518
- publishStatus: PublishStatus;
519
- };
520
- }
521
- export interface SearchItemsResponseNonNullableFields {
522
- items: {
523
- _id: string;
524
- mediaType: MediaType;
525
- assets?: {
526
- image: string;
527
- video: string;
528
- vector: string;
529
- audio: string;
530
- document: string;
531
- archive?: {
532
- _id: string;
533
- url: string;
534
- };
535
- model3d?: {
536
- _id: string;
537
- url: string;
538
- thumbnail: string;
539
- };
540
- };
541
- publishStatus: PublishStatus;
542
- }[];
543
- }
544
- export interface QueryItemsResponseNonNullableFields {
545
- items: {
546
- _id: string;
547
- mediaType: MediaType;
548
- assets?: {
549
- image: string;
550
- video: string;
551
- vector: string;
552
- audio: string;
553
- document: string;
554
- archive?: {
555
- _id: string;
556
- url: string;
557
- };
558
- model3d?: {
559
- _id: string;
560
- url: string;
561
- thumbnail: string;
562
- };
563
- };
564
- publishStatus: PublishStatus;
565
- }[];
566
- }
567
- export interface UpdateItemResponseNonNullableFields {
568
- item?: {
569
- _id: string;
570
- mediaType: MediaType;
571
- assets?: {
572
- image: string;
573
- video: string;
574
- vector: string;
575
- audio: string;
576
- document: string;
577
- archive?: {
578
- _id: string;
579
- url: string;
580
- };
581
- model3d?: {
582
- _id: string;
583
- url: string;
584
- thumbnail: string;
585
- };
586
- };
587
- publishStatus: PublishStatus;
588
- };
589
- }
590
- export interface BulkUpdateItemResponseNonNullableFields {
591
- results: {
592
- itemMetadata?: {
593
- originalIndex: number;
594
- success: boolean;
595
- error?: {
596
- code: string;
597
- description: string;
598
- };
599
- };
600
- item?: {
601
- _id: string;
602
- mediaType: MediaType;
603
- assets?: {
604
- image: string;
605
- video: string;
606
- vector: string;
607
- audio: string;
608
- document: string;
609
- archive?: {
610
- _id: string;
611
- url: string;
612
- };
613
- model3d?: {
614
- _id: string;
615
- url: string;
616
- thumbnail: string;
617
- };
618
- };
619
- publishStatus: PublishStatus;
620
- };
621
- }[];
622
- bulkActionMetadata?: {
623
- totalSuccesses: number;
624
- totalFailures: number;
625
- undetailedFailures: number;
626
- };
627
- }
628
- export interface GetItemResponseNonNullableFields {
629
- item?: {
630
- _id: string;
631
- mediaType: MediaType;
632
- assets?: {
633
- image: string;
634
- video: string;
635
- vector: string;
636
- audio: string;
637
- document: string;
638
- archive?: {
639
- _id: string;
640
- url: string;
641
- };
642
- model3d?: {
643
- _id: string;
644
- url: string;
645
- thumbnail: string;
646
- };
647
- };
648
- publishStatus: PublishStatus;
649
- };
650
- }
651
- export declare const onEnterpriseItemCreated: EventDefinition<DomainCreatedEvent<EnterpriseMediaItem>, "wix.media.enterprise_public_media.v1.enterprise_item_created">;
652
- export declare const onEnterpriseItemUpdated: EventDefinition<DomainUpdatedEvent<EnterpriseMediaItem>, "wix.media.enterprise_public_media.v1.enterprise_item_updated">;
653
- export declare const onEnterpriseItemItemCategoriesChanged: EventDefinition<DomainActionEvent<ItemCategoriesChanged>, "wix.media.enterprise_public_media.v1.enterprise_item_item_categories_changed">;
654
- export declare const onEnterpriseItemPublishStatusChanged: EventDefinition<DomainActionEvent<PublishStatusChanged>, "wix.media.enterprise_public_media.v1.enterprise_item_publish_status_changed">;
655
- /**
656
- * Internal API called by the public media backend, notify about a file that was created enterprise public media server
657
- * @public
658
- * @documentationMaturity preview
659
- */
660
- export declare function itemUploadCallback(options?: ItemUploadCallbackOptions): Promise<void>;
661
- export interface ItemUploadCallbackOptions {
662
- /** The item id of the created item */
663
- itemId?: string;
664
- /** The callback passed to the upload endpoint */
665
- callbackToken?: string;
666
- }
667
- /**
668
- * Generate an upload url that will make public media to call the enterprise callback endpoint
669
- * @public
670
- * @documentationMaturity preview
671
- */
672
- export declare function generateFileUploadUrl(options?: GenerateFileUploadUrlOptions): Promise<GenerateFileUploadUrlResponse & GenerateFileUploadUrlResponseNonNullableFields>;
673
- export interface GenerateFileUploadUrlOptions {
674
- /** The uploaded original file name including the extension */
675
- fileName?: string;
676
- /** The file mime-type - will be used to identify the type of media */
677
- contentType?: string;
678
- /** The file size in bytes */
679
- sizeInBytes?: number;
680
- /**
681
- * An optional list of categories to link the created item to
682
- * The item will be linked to the account category automatically
683
- */
684
- categoryIds?: string[] | null;
685
- }
686
- /**
687
- * Import a file using a url
688
- * @param url - The url to the file to be imported
689
- * @public
690
- * @documentationMaturity preview
691
- * @requiredField url
692
- */
693
- export declare function importFile(url: string, options?: ImportFileOptions): Promise<ImportFileResponse & ImportFileResponseNonNullableFields>;
694
- export interface ImportFileOptions {
695
- /** The uploaded original file name including the extension - will be used as the initial display name */
696
- fileName?: string | null;
697
- /** The file mime-type - will be used to identify the type of media */
698
- contentType?: string | null;
699
- /** The file size in bytes */
700
- sizeInBytes?: number | null;
701
- /**
702
- * An optional list of categories to link the created item to
703
- * The item will be linked to the account category automatically
704
- */
705
- categoryIds?: string[] | null;
706
- /** The media type of the uploaded file */
707
- mediaType?: MediaType;
708
- /**
709
- * A unique identifier of the client that imported the file
710
- * This information will exist in the system_tags field prefixed by '_external_uploader:{uploader_system_tag}'
711
- */
712
- uploaderSystemTag?: string | null;
713
- /**
714
- * An additional container for external information
715
- * mostly used to pass identifying information of related entities in external services
716
- * This information will exist in the system_tags field prefixed by '_external_uploader_info:{uploader_info_system_tag}'
717
- */
718
- uploaderInfoSystemTag?: string | null;
719
- }
720
- /**
721
- * Search items, all filters only support equality
722
- * Each query must contain a categoryId filter
723
- * @public
724
- * @documentationMaturity preview
725
- */
726
- export declare function searchItems(options?: SearchItemsOptions): Promise<SearchItemsResponse & SearchItemsResponseNonNullableFields>;
727
- export interface SearchItemsOptions {
728
- /** Items search query */
729
- query?: Search;
730
- }
731
- /**
732
- * Query items allowing to sort by specified fields, all filters only support equality
733
- * Each query must contain a categoryId filter
734
- * @public
735
- * @documentationMaturity preview
736
- */
737
- export declare function queryItems(): ItemsQueryBuilder;
738
- interface QueryOffsetResult {
739
- currentPage: number | undefined;
740
- totalPages: number | undefined;
741
- totalCount: number | undefined;
742
- hasNext: () => boolean;
743
- hasPrev: () => boolean;
744
- length: number;
745
- pageSize: number;
746
- }
747
- export interface ItemsQueryResult extends QueryOffsetResult {
748
- items: EnterpriseMediaItem[];
749
- query: ItemsQueryBuilder;
750
- next: () => Promise<ItemsQueryResult>;
751
- prev: () => Promise<ItemsQueryResult>;
752
- }
753
- export interface ItemsQueryBuilder {
754
- /** @param propertyName - Property whose value is compared with `value`.
755
- * @param value - Value to compare against.
756
- * @documentationMaturity preview
757
- */
758
- eq: (propertyName: 'sizeInBytes' | 'title' | '_createdDate' | '_updatedDate', value: any) => ItemsQueryBuilder;
759
- /** @param propertyName - Property whose value is compared with `values`.
760
- * @param values - List of values to compare against.
761
- * @documentationMaturity preview
762
- */
763
- hasSome: (propertyName: 'parentCategoryIds', value: any[]) => ItemsQueryBuilder;
764
- /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
765
- * @documentationMaturity preview
766
- */
767
- ascending: (...propertyNames: Array<'sizeInBytes' | 'title' | '_createdDate' | '_updatedDate'>) => ItemsQueryBuilder;
768
- /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
769
- * @documentationMaturity preview
770
- */
771
- descending: (...propertyNames: Array<'sizeInBytes' | 'title' | '_createdDate' | '_updatedDate'>) => ItemsQueryBuilder;
772
- /** @param limit - Number of items to return, which is also the `pageSize` of the results object.
773
- * @documentationMaturity preview
774
- */
775
- limit: (limit: number) => ItemsQueryBuilder;
776
- /** @param skip - Number of items to skip in the query results before returning the results.
777
- * @documentationMaturity preview
778
- */
779
- skip: (skip: number) => ItemsQueryBuilder;
780
- /** @documentationMaturity preview */
781
- find: () => Promise<ItemsQueryResult>;
782
- }
783
- /**
784
- * Update an item
785
- * @param _id - Id of the item in public media
786
- * @public
787
- * @documentationMaturity preview
788
- * @requiredField _id
789
- * @requiredField item
790
- * @returns Updated item info
791
- */
792
- export declare function updateItem(_id: string, item: UpdateItem): Promise<EnterpriseMediaItem & NonNullable<UpdateItemResponseNonNullableFields>['item']>;
793
- export interface UpdateItem {
794
- /**
795
- * Id of the item in public media
796
- * @readonly
797
- */
798
- _id?: string;
799
- /**
800
- * Media type of the item
801
- * @readonly
802
- */
803
- mediaType?: MediaType;
804
- /**
805
- * Size of the uploaded file in bytes.
806
- * @readonly
807
- */
808
- sizeInBytes?: string | null;
809
- /** The item title, part of searchable fields */
810
- title?: string | null;
811
- /**
812
- * The aspect ratio of the item
813
- * An object containing urls for different views of the item
814
- * @readonly
815
- */
816
- assets?: ItemAssets;
817
- /** Tags describing the image, part of searchable fields */
818
- displayTags?: string[] | null;
819
- /** Tags for internal client use, part of searchable fields */
820
- internalTags?: string[] | null;
821
- /**
822
- * Tags for filtering items in the search
823
- * @readonly
824
- */
825
- systemTags?: string[] | null;
826
- /**
827
- * Category ids this item belongs to
828
- * @readonly
829
- */
830
- parentCategoryIds?: string[] | null;
831
- /** Status of the item */
832
- publishStatus?: PublishStatus;
833
- /**
834
- * Date and time the item was created.
835
- * @readonly
836
- */
837
- _createdDate?: Date;
838
- /**
839
- * Date and time the item was updated.
840
- * @readonly
841
- */
842
- _updatedDate?: Date;
843
- /**
844
- * An internal id used with different wix media systems
845
- * @readonly
846
- */
847
- internalId?: string | null;
848
- }
849
- /**
850
- * Bulk update an item
851
- * @param updateItemRequests - Requests to update individual item
852
- * @public
853
- * @documentationMaturity preview
854
- * @requiredField updateItemRequests
855
- * @requiredField updateItemRequests.item._id
856
- */
857
- export declare function bulkUpdateItem(updateItemRequests: UpdateItemRequest[], options?: BulkUpdateItemOptions): Promise<BulkUpdateItemResponse & BulkUpdateItemResponseNonNullableFields>;
858
- export interface BulkUpdateItemOptions {
859
- /** Should the response return the updated item */
860
- returnEntity?: boolean;
861
- }
862
- /**
863
- * Get item details
864
- * @param itemId - Item id
865
- * @public
866
- * @documentationMaturity preview
867
- * @requiredField itemId
868
- * @returns item info
869
- */
870
- export declare function getItem(itemId: string): Promise<EnterpriseMediaItem & NonNullable<GetItemResponseNonNullableFields>['item']>;
871
- /**
872
- * Link the item to multiple categories
873
- * @param itemId - The item id
874
- * @public
875
- * @documentationMaturity preview
876
- * @requiredField itemId
877
- */
878
- export declare function linkItemToCategories(itemId: string, options?: LinkItemToCategoriesOptions): Promise<LinkItemToCategoriesResponse>;
879
- export interface LinkItemToCategoriesOptions {
880
- /** The category ids that the item will be linked to */
881
- categoryIds?: string[];
882
- }
883
- /**
884
- * Unlink the item from multiple categories
885
- * @param itemId - The item id
886
- * @public
887
- * @documentationMaturity preview
888
- * @requiredField itemId
889
- */
890
- export declare function unlinkItemFromCategories(itemId: string, options?: UnlinkItemFromCategoriesOptions): Promise<UnlinkItemFromCategoriesResponse>;
891
- export interface UnlinkItemFromCategoriesOptions {
892
- /** The category ids that the item will be unlinked from */
893
- categoryIds?: string[];
894
- }
895
- /**
896
- * Overwrite item categories
897
- * @param itemId - The item id
898
- * @public
899
- * @documentationMaturity preview
900
- * @requiredField itemId
901
- */
902
- export declare function overwriteItemCategories(itemId: string, options?: OverwriteItemCategoriesOptions): Promise<OverwriteItemCategoriesResponse>;
903
- export interface OverwriteItemCategoriesOptions {
904
- /** The category ids the item will be linked to after this operation */
905
- categoryIds?: string[];
906
- }
907
- export {};