@wix/media 1.0.89 → 1.0.91

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.
@@ -0,0 +1,2772 @@
1
+ interface EnterpriseCategory {
2
+ /**
3
+ * Id of the category
4
+ * @readonly
5
+ */
6
+ _id?: string;
7
+ /** The display name that will be shown for the item */
8
+ displayName?: string | null;
9
+ /** Id of the parent category, will default to the account master category */
10
+ parentCategoryId?: string | null;
11
+ /** Sort order number of the category, will determine the order of the category with other categories under the same parent category */
12
+ sortOrder?: number | null;
13
+ /** Publish status of the category */
14
+ publishStatus?: PublishStatus$1;
15
+ /**
16
+ * Date and time the category was created.
17
+ * @readonly
18
+ */
19
+ _createdDate?: Date;
20
+ /**
21
+ * Date and time the category was updated.
22
+ * @readonly
23
+ */
24
+ _updatedDate?: Date;
25
+ }
26
+ declare enum PublishStatus$1 {
27
+ UNDEFINED = "UNDEFINED",
28
+ UNPUBLISHED = "UNPUBLISHED",
29
+ PUBLISHED = "PUBLISHED",
30
+ WIX_ONLY = "WIX_ONLY"
31
+ }
32
+ interface EnterpriseCategoryTree {
33
+ /** Category information */
34
+ category?: EnterpriseCategory;
35
+ /** Information about the sub categories */
36
+ subCategories?: EnterpriseCategoryTree[];
37
+ }
38
+ interface EnterpriseOnboardingResponse {
39
+ /** The enterprise category */
40
+ category?: EnterpriseCategory;
41
+ }
42
+ interface GetMediaManagerCategoriesResponse {
43
+ /** The category details */
44
+ category?: EnterpriseCategoryTree;
45
+ }
46
+ interface IdentificationData$3 extends IdentificationDataIdOneOf$3 {
47
+ /** ID of a site visitor that has not logged in to the site. */
48
+ anonymousVisitorId?: string;
49
+ /** ID of a site visitor that has logged in to the site. */
50
+ memberId?: string;
51
+ /** ID of a Wix user (site owner, contributor, etc.). */
52
+ wixUserId?: string;
53
+ /** ID of an app. */
54
+ appId?: string;
55
+ /** @readonly */
56
+ identityType?: WebhookIdentityType$3;
57
+ }
58
+ /** @oneof */
59
+ interface IdentificationDataIdOneOf$3 {
60
+ /** ID of a site visitor that has not logged in to the site. */
61
+ anonymousVisitorId?: string;
62
+ /** ID of a site visitor that has logged in to the site. */
63
+ memberId?: string;
64
+ /** ID of a Wix user (site owner, contributor, etc.). */
65
+ wixUserId?: string;
66
+ /** ID of an app. */
67
+ appId?: string;
68
+ }
69
+ declare enum WebhookIdentityType$3 {
70
+ UNKNOWN = "UNKNOWN",
71
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
72
+ MEMBER = "MEMBER",
73
+ WIX_USER = "WIX_USER",
74
+ APP = "APP"
75
+ }
76
+ interface EnterpriseOnboardingResponseNonNullableFields {
77
+ category?: {
78
+ _id: string;
79
+ publishStatus: PublishStatus$1;
80
+ };
81
+ }
82
+ interface GetMediaManagerCategoriesResponseNonNullableFields {
83
+ category?: {
84
+ category?: {
85
+ _id: string;
86
+ publishStatus: PublishStatus$1;
87
+ };
88
+ subCategories: NonNullable<GetMediaManagerCategoriesResponseNonNullableFields>['category'][];
89
+ };
90
+ }
91
+ interface BaseEventMetadata$3 {
92
+ /** App instance ID. */
93
+ instanceId?: string | null;
94
+ /** Event type. */
95
+ eventType?: string;
96
+ /** The identification type and identity data. */
97
+ identity?: IdentificationData$3;
98
+ }
99
+ interface EventMetadata$3 extends BaseEventMetadata$3 {
100
+ /**
101
+ * Unique event ID.
102
+ * Allows clients to ignore duplicate webhooks.
103
+ */
104
+ _id?: string;
105
+ /**
106
+ * Assumes actions are also always typed to an entity_type
107
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
108
+ */
109
+ entityFqdn?: string;
110
+ /**
111
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
112
+ * This is although the created/updated/deleted notion is duplication of the oneof types
113
+ * Example: created/updated/deleted/started/completed/email_opened
114
+ */
115
+ slug?: string;
116
+ /** ID of the entity associated with the event. */
117
+ entityId?: string;
118
+ /** Event timestamp. */
119
+ eventTime?: Date;
120
+ /**
121
+ * Whether the event was triggered as a result of a privacy regulation application
122
+ * (for example, GDPR).
123
+ */
124
+ triggeredByAnonymizeRequest?: boolean | null;
125
+ /** If present, indicates the action that triggered the event. */
126
+ originatedFrom?: string | null;
127
+ /**
128
+ * A sequence number defining the order of updates to the underlying entity.
129
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
130
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
131
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
132
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
133
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
134
+ */
135
+ entityEventSequence?: string | null;
136
+ }
137
+ interface EnterpriseCategoryCreatedEnvelope {
138
+ entity: EnterpriseCategory;
139
+ metadata: EventMetadata$3;
140
+ }
141
+ interface EnterpriseCategoryDeletedEnvelope {
142
+ metadata: EventMetadata$3;
143
+ }
144
+ interface EnterpriseCategoryUpdatedEnvelope {
145
+ entity: EnterpriseCategory;
146
+ metadata: EventMetadata$3;
147
+ }
148
+ interface UpdateCategory {
149
+ /**
150
+ * Id of the category
151
+ * @readonly
152
+ */
153
+ _id?: string;
154
+ /** The display name that will be shown for the item */
155
+ displayName?: string | null;
156
+ /** Id of the parent category, will default to the account master category */
157
+ parentCategoryId?: string | null;
158
+ /** Sort order number of the category, will determine the order of the category with other categories under the same parent category */
159
+ sortOrder?: number | null;
160
+ /** Publish status of the category */
161
+ publishStatus?: PublishStatus$1;
162
+ /**
163
+ * Date and time the category was created.
164
+ * @readonly
165
+ */
166
+ _createdDate?: Date;
167
+ /**
168
+ * Date and time the category was updated.
169
+ * @readonly
170
+ */
171
+ _updatedDate?: Date;
172
+ }
173
+ interface GetCategoryOptions {
174
+ /** number of sub category levels */
175
+ levels?: number | null;
176
+ /** filter categories by publish statuses. When empty will return PUBLISHED and UNPUBLISHED */
177
+ publishStatus?: PublishStatus$1;
178
+ }
179
+ interface EnterpriseOnboardingOptions {
180
+ /** The account name of the organization - will be used as the organization category name */
181
+ accountName?: string;
182
+ }
183
+
184
+ type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
185
+ interface HttpClient {
186
+ request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
187
+ }
188
+ type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
189
+ type HttpResponse<T = any> = {
190
+ data: T;
191
+ status: number;
192
+ statusText: string;
193
+ headers: any;
194
+ request?: any;
195
+ };
196
+ type RequestOptions<_TResponse = any, Data = any> = {
197
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
198
+ url: string;
199
+ data?: Data;
200
+ params?: URLSearchParams;
201
+ } & APIMetadata;
202
+ type APIMetadata = {
203
+ methodFqn?: string;
204
+ entityFqdn?: string;
205
+ packageName?: string;
206
+ };
207
+ type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
208
+ type EventDefinition<Payload = unknown, Type extends string = string> = {
209
+ __type: 'event-definition';
210
+ type: Type;
211
+ isDomainEvent?: boolean;
212
+ transformations?: unknown;
213
+ __payload: Payload;
214
+ };
215
+ declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, _transformations?: unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
216
+ type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
217
+ type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
218
+
219
+ declare function createCategory$1(httpClient: HttpClient): (category: EnterpriseCategory) => Promise<EnterpriseCategory & {
220
+ _id: string;
221
+ publishStatus: PublishStatus$1;
222
+ }>;
223
+ declare function deleteCategory$1(httpClient: HttpClient): (categoryId: string) => Promise<void>;
224
+ declare function updateCategory$1(httpClient: HttpClient): (_id: string, category: UpdateCategory) => Promise<EnterpriseCategory & {
225
+ _id: string;
226
+ publishStatus: PublishStatus$1;
227
+ }>;
228
+ declare function getCategory$1(httpClient: HttpClient): (categoryId: string, options?: GetCategoryOptions) => Promise<EnterpriseCategoryTree & {
229
+ category?: {
230
+ _id: string;
231
+ publishStatus: PublishStatus$1;
232
+ } | undefined;
233
+ subCategories: (any | undefined)[];
234
+ }>;
235
+ declare function enterpriseOnboarding$1(httpClient: HttpClient): (accountId: string, options?: EnterpriseOnboardingOptions) => Promise<EnterpriseOnboardingResponse & EnterpriseOnboardingResponseNonNullableFields>;
236
+ declare function getMediaManagerCategories$1(httpClient: HttpClient): () => Promise<GetMediaManagerCategoriesResponse & GetMediaManagerCategoriesResponseNonNullableFields>;
237
+ declare const onEnterpriseCategoryCreated$1: EventDefinition<EnterpriseCategoryCreatedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_category_created">;
238
+ declare const onEnterpriseCategoryDeleted$1: EventDefinition<EnterpriseCategoryDeletedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_category_deleted">;
239
+ declare const onEnterpriseCategoryUpdated$1: EventDefinition<EnterpriseCategoryUpdatedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_category_updated">;
240
+
241
+ declare const createCategory: BuildRESTFunction<typeof createCategory$1>;
242
+ declare const deleteCategory: BuildRESTFunction<typeof deleteCategory$1>;
243
+ declare const updateCategory: BuildRESTFunction<typeof updateCategory$1>;
244
+ declare const getCategory: BuildRESTFunction<typeof getCategory$1>;
245
+ declare const enterpriseOnboarding: BuildRESTFunction<typeof enterpriseOnboarding$1>;
246
+ declare const getMediaManagerCategories: BuildRESTFunction<typeof getMediaManagerCategories$1>;
247
+ declare const onEnterpriseCategoryCreated: BuildEventDefinition<typeof onEnterpriseCategoryCreated$1>;
248
+ declare const onEnterpriseCategoryDeleted: BuildEventDefinition<typeof onEnterpriseCategoryDeleted$1>;
249
+ declare const onEnterpriseCategoryUpdated: BuildEventDefinition<typeof onEnterpriseCategoryUpdated$1>;
250
+
251
+ declare const context$3_createCategory: typeof createCategory;
252
+ declare const context$3_deleteCategory: typeof deleteCategory;
253
+ declare const context$3_enterpriseOnboarding: typeof enterpriseOnboarding;
254
+ declare const context$3_getCategory: typeof getCategory;
255
+ declare const context$3_getMediaManagerCategories: typeof getMediaManagerCategories;
256
+ declare const context$3_onEnterpriseCategoryCreated: typeof onEnterpriseCategoryCreated;
257
+ declare const context$3_onEnterpriseCategoryDeleted: typeof onEnterpriseCategoryDeleted;
258
+ declare const context$3_onEnterpriseCategoryUpdated: typeof onEnterpriseCategoryUpdated;
259
+ declare const context$3_updateCategory: typeof updateCategory;
260
+ declare namespace context$3 {
261
+ export { context$3_createCategory as createCategory, context$3_deleteCategory as deleteCategory, context$3_enterpriseOnboarding as enterpriseOnboarding, context$3_getCategory as getCategory, context$3_getMediaManagerCategories as getMediaManagerCategories, context$3_onEnterpriseCategoryCreated as onEnterpriseCategoryCreated, context$3_onEnterpriseCategoryDeleted as onEnterpriseCategoryDeleted, context$3_onEnterpriseCategoryUpdated as onEnterpriseCategoryUpdated, context$3_updateCategory as updateCategory };
262
+ }
263
+
264
+ /**
265
+ * Duration for video fits better if there will be type specific media item.. however, is it ok to implement
266
+ * an additional one of field called details?
267
+ */
268
+ interface EnterpriseMediaItem {
269
+ /**
270
+ * Id of the item in public media
271
+ * @readonly
272
+ */
273
+ _id?: string;
274
+ /**
275
+ * Media type of the item
276
+ * @readonly
277
+ */
278
+ mediaType?: MediaType$1;
279
+ /**
280
+ * Size of the uploaded file in bytes.
281
+ * @readonly
282
+ */
283
+ sizeInBytes?: string | null;
284
+ /** The item title, part of searchable fields */
285
+ title?: string | null;
286
+ /**
287
+ * The aspect ratio of the item
288
+ * An object containing urls for different views of the item
289
+ * @readonly
290
+ */
291
+ assets?: ItemAssets;
292
+ /** Tags describing the image, part of searchable fields */
293
+ displayTags?: string[] | null;
294
+ /** Tags for internal client use, part of searchable fields */
295
+ internalTags?: string[] | null;
296
+ /**
297
+ * Tags for filtering items in the search
298
+ * @readonly
299
+ */
300
+ systemTags?: string[] | null;
301
+ /**
302
+ * Category ids this item belongs to
303
+ * @readonly
304
+ */
305
+ parentCategoryIds?: string[] | null;
306
+ /** Status of the item */
307
+ publishStatus?: PublishStatus;
308
+ /**
309
+ * Date and time the item was created.
310
+ * @readonly
311
+ */
312
+ _createdDate?: Date;
313
+ /**
314
+ * Date and time the item was updated.
315
+ * @readonly
316
+ */
317
+ _updatedDate?: Date;
318
+ /**
319
+ * An internal id used with different wix media systems
320
+ * @readonly
321
+ */
322
+ internalId?: string | null;
323
+ }
324
+ declare enum MediaType$1 {
325
+ MIXED = "MIXED",
326
+ IMAGE = "IMAGE",
327
+ VIDEO = "VIDEO",
328
+ AUDIO = "AUDIO",
329
+ DOCUMENT = "DOCUMENT",
330
+ VECTOR = "VECTOR",
331
+ ARCHIVE = "ARCHIVE",
332
+ MODEL3D = "MODEL3D"
333
+ }
334
+ interface ItemAssets extends ItemAssetsAssetsOneOf {
335
+ /** Assets for image media type */
336
+ image?: string;
337
+ /** Assets for video media type */
338
+ video?: string;
339
+ /** Assets for vector media type */
340
+ vector?: string;
341
+ /** Assets for audio media type */
342
+ audio?: string;
343
+ /** Assets for document media type */
344
+ document?: string;
345
+ /** Information about the archive. */
346
+ archive?: Archive$1;
347
+ /** Information about the 3D Model. */
348
+ model3d?: Model3D$1;
349
+ }
350
+ /** @oneof */
351
+ interface ItemAssetsAssetsOneOf {
352
+ /** Assets for image media type */
353
+ image?: string;
354
+ /** Assets for video media type */
355
+ video?: string;
356
+ /** Assets for vector media type */
357
+ vector?: string;
358
+ /** Assets for audio media type */
359
+ audio?: string;
360
+ /** Assets for document media type */
361
+ document?: string;
362
+ /** Information about the archive. */
363
+ archive?: Archive$1;
364
+ /** Information about the 3D Model. */
365
+ model3d?: Model3D$1;
366
+ }
367
+ interface Archive$1 {
368
+ /** WixMedia ID. */
369
+ _id?: string;
370
+ /** Archive URL. */
371
+ url?: string;
372
+ /**
373
+ * Archive URL expiration date (when relevant).
374
+ * @readonly
375
+ */
376
+ urlExpirationDate?: Date;
377
+ /** Archive size in bytes. */
378
+ sizeInBytes?: string | null;
379
+ /** Archive filename. */
380
+ filename?: string | null;
381
+ }
382
+ interface Model3D$1 {
383
+ /** WixMedia 3D ID. */
384
+ _id?: string;
385
+ /** 3D URL. */
386
+ url?: string;
387
+ /** 3D thumbnail Image */
388
+ thumbnail?: string;
389
+ /** 3D alt text. */
390
+ altText?: string | null;
391
+ /**
392
+ * 3D URL expiration date (when relevant).
393
+ * @readonly
394
+ */
395
+ urlExpirationDate?: Date;
396
+ /**
397
+ * 3D filename.
398
+ * @readonly
399
+ */
400
+ filename?: string | null;
401
+ /**
402
+ * 3D size in bytes.
403
+ * @readonly
404
+ */
405
+ sizeInBytes?: string | null;
406
+ }
407
+ declare enum PublishStatus {
408
+ UNDEFINED = "UNDEFINED",
409
+ UNPUBLISHED = "UNPUBLISHED",
410
+ PUBLISHED = "PUBLISHED",
411
+ WIX_ONLY = "WIX_ONLY"
412
+ }
413
+ interface ItemCategoriesChanged {
414
+ /** A list of the current item categories */
415
+ itemCategoryIds?: string[] | null;
416
+ /** A list of the categories that where unlinked from the item */
417
+ unlinkedCategoryIds?: string[] | null;
418
+ /** A list of the categories that where linked to the item */
419
+ linkedCategoryIds?: string[] | null;
420
+ /** The full updated item information */
421
+ entity?: EnterpriseMediaItem;
422
+ }
423
+ interface GenerateFileUploadUrlResponse$1 {
424
+ /** The upload url to upload the file to */
425
+ uploadUrl?: string;
426
+ }
427
+ interface ImportFileResponse$1 {
428
+ /**
429
+ * Partial item - without the assets
430
+ * At this stage of implementation only the 'internal_id' will be filled
431
+ * all other required values will be fake values
432
+ */
433
+ item?: EnterpriseMediaItem;
434
+ }
435
+ interface Search extends SearchPagingMethodOneOf {
436
+ /** Pointer to page of results using offset. Can not be used together with 'cursor_paging' */
437
+ paging?: Paging;
438
+ /** 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) */
439
+ filter?: Record<string, any> | null;
440
+ /** Sort object in the form [{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}] */
441
+ sort?: Sorting$2[];
442
+ /** free text to match in searchable fields */
443
+ search?: SearchDetails;
444
+ }
445
+ /** @oneof */
446
+ interface SearchPagingMethodOneOf {
447
+ /** Pointer to page of results using offset. Can not be used together with 'cursor_paging' */
448
+ paging?: Paging;
449
+ }
450
+ interface Sorting$2 {
451
+ /** Name of the field to sort by. */
452
+ fieldName?: string;
453
+ /** Sort order. */
454
+ order?: SortOrder$2;
455
+ }
456
+ declare enum SortOrder$2 {
457
+ ASC = "ASC",
458
+ DESC = "DESC"
459
+ }
460
+ interface SearchDetails {
461
+ /** search term or expression */
462
+ expression?: string | null;
463
+ }
464
+ interface Paging {
465
+ /** Number of items to load. */
466
+ limit?: number | null;
467
+ /** Number of items to skip in the current sort order. */
468
+ offset?: number | null;
469
+ }
470
+ interface SearchItemsResponse {
471
+ /** A list of items matching the request */
472
+ items?: EnterpriseMediaItem[];
473
+ /** Information about the search results. */
474
+ pagingMetadata?: PagingMetadataV2$2;
475
+ }
476
+ interface PagingMetadataV2$2 {
477
+ /** Number of items returned in the response. */
478
+ count?: number | null;
479
+ /** Offset that was requested. */
480
+ offset?: number | null;
481
+ /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
482
+ total?: number | null;
483
+ /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
484
+ cursors?: Cursors$2;
485
+ }
486
+ interface Cursors$2 {
487
+ /** Cursor pointing to next page in the list of results. */
488
+ next?: string | null;
489
+ }
490
+ interface UpdateItemRequest {
491
+ /** The category object that will be created */
492
+ item: EnterpriseMediaItem;
493
+ }
494
+ interface PublishStatusChanged {
495
+ /** The new item status */
496
+ publishStatus?: PublishStatus;
497
+ /** The full updated item information */
498
+ entity?: EnterpriseMediaItem;
499
+ }
500
+ interface BulkUpdateItemResponse {
501
+ /** Requests to update individual item */
502
+ results?: BulkItemUpdateResult[];
503
+ /** Metadata of the operation */
504
+ bulkActionMetadata?: BulkActionMetadata$1;
505
+ }
506
+ interface BulkItemUpdateResult {
507
+ /** updated item metadata */
508
+ itemMetadata?: ItemMetadata$1;
509
+ /** only returned if operation was successful and if returnEntity flag was on */
510
+ item?: EnterpriseMediaItem;
511
+ }
512
+ interface ItemMetadata$1 {
513
+ /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
514
+ _id?: string | null;
515
+ /** Index of the item within the request array. Allows for correlation between request and response items. */
516
+ originalIndex?: number;
517
+ /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
518
+ success?: boolean;
519
+ /** Details about the error in case of failure. */
520
+ error?: ApplicationError$1;
521
+ }
522
+ interface ApplicationError$1 {
523
+ /** Error code. */
524
+ code?: string;
525
+ /** Description of the error. */
526
+ description?: string;
527
+ /** Data related to the error. */
528
+ data?: Record<string, any> | null;
529
+ }
530
+ interface BulkActionMetadata$1 {
531
+ /** Number of items that were successfully processed. */
532
+ totalSuccesses?: number;
533
+ /** Number of items that couldn't be processed. */
534
+ totalFailures?: number;
535
+ /** Number of failures without details because detailed failure threshold was exceeded. */
536
+ undetailedFailures?: number;
537
+ }
538
+ interface LinkItemToCategoriesResponse {
539
+ /** The linked category ids */
540
+ linkedCategoryIds?: string[] | null;
541
+ }
542
+ interface UnlinkItemFromCategoriesResponse {
543
+ /** The unlinked category ids */
544
+ unlinkedCategoryIds?: string[] | null;
545
+ }
546
+ interface OverwriteItemCategoriesResponse {
547
+ /** The linked category ids */
548
+ linkedCategoryIds?: string[] | null;
549
+ /** The unlinked category ids */
550
+ unlinkedCategoryIds?: string[] | null;
551
+ }
552
+ interface IdentificationData$2 extends IdentificationDataIdOneOf$2 {
553
+ /** ID of a site visitor that has not logged in to the site. */
554
+ anonymousVisitorId?: string;
555
+ /** ID of a site visitor that has logged in to the site. */
556
+ memberId?: string;
557
+ /** ID of a Wix user (site owner, contributor, etc.). */
558
+ wixUserId?: string;
559
+ /** ID of an app. */
560
+ appId?: string;
561
+ /** @readonly */
562
+ identityType?: WebhookIdentityType$2;
563
+ }
564
+ /** @oneof */
565
+ interface IdentificationDataIdOneOf$2 {
566
+ /** ID of a site visitor that has not logged in to the site. */
567
+ anonymousVisitorId?: string;
568
+ /** ID of a site visitor that has logged in to the site. */
569
+ memberId?: string;
570
+ /** ID of a Wix user (site owner, contributor, etc.). */
571
+ wixUserId?: string;
572
+ /** ID of an app. */
573
+ appId?: string;
574
+ }
575
+ declare enum WebhookIdentityType$2 {
576
+ UNKNOWN = "UNKNOWN",
577
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
578
+ MEMBER = "MEMBER",
579
+ WIX_USER = "WIX_USER",
580
+ APP = "APP"
581
+ }
582
+ interface GenerateFileUploadUrlResponseNonNullableFields$1 {
583
+ uploadUrl: string;
584
+ }
585
+ interface ImportFileResponseNonNullableFields$1 {
586
+ item?: {
587
+ _id: string;
588
+ mediaType: MediaType$1;
589
+ assets?: {
590
+ image: string;
591
+ video: string;
592
+ vector: string;
593
+ audio: string;
594
+ document: string;
595
+ archive?: {
596
+ _id: string;
597
+ url: string;
598
+ };
599
+ model3d?: {
600
+ _id: string;
601
+ url: string;
602
+ thumbnail: string;
603
+ };
604
+ };
605
+ publishStatus: PublishStatus;
606
+ };
607
+ }
608
+ interface SearchItemsResponseNonNullableFields {
609
+ items: {
610
+ _id: string;
611
+ mediaType: MediaType$1;
612
+ assets?: {
613
+ image: string;
614
+ video: string;
615
+ vector: string;
616
+ audio: string;
617
+ document: string;
618
+ archive?: {
619
+ _id: string;
620
+ url: string;
621
+ };
622
+ model3d?: {
623
+ _id: string;
624
+ url: string;
625
+ thumbnail: string;
626
+ };
627
+ };
628
+ publishStatus: PublishStatus;
629
+ }[];
630
+ }
631
+ interface BulkUpdateItemResponseNonNullableFields {
632
+ results: {
633
+ itemMetadata?: {
634
+ originalIndex: number;
635
+ success: boolean;
636
+ error?: {
637
+ code: string;
638
+ description: string;
639
+ };
640
+ };
641
+ item?: {
642
+ _id: string;
643
+ mediaType: MediaType$1;
644
+ assets?: {
645
+ image: string;
646
+ video: string;
647
+ vector: string;
648
+ audio: string;
649
+ document: string;
650
+ archive?: {
651
+ _id: string;
652
+ url: string;
653
+ };
654
+ model3d?: {
655
+ _id: string;
656
+ url: string;
657
+ thumbnail: string;
658
+ };
659
+ };
660
+ publishStatus: PublishStatus;
661
+ };
662
+ }[];
663
+ bulkActionMetadata?: {
664
+ totalSuccesses: number;
665
+ totalFailures: number;
666
+ undetailedFailures: number;
667
+ };
668
+ }
669
+ interface BaseEventMetadata$2 {
670
+ /** App instance ID. */
671
+ instanceId?: string | null;
672
+ /** Event type. */
673
+ eventType?: string;
674
+ /** The identification type and identity data. */
675
+ identity?: IdentificationData$2;
676
+ }
677
+ interface EventMetadata$2 extends BaseEventMetadata$2 {
678
+ /**
679
+ * Unique event ID.
680
+ * Allows clients to ignore duplicate webhooks.
681
+ */
682
+ _id?: string;
683
+ /**
684
+ * Assumes actions are also always typed to an entity_type
685
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
686
+ */
687
+ entityFqdn?: string;
688
+ /**
689
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
690
+ * This is although the created/updated/deleted notion is duplication of the oneof types
691
+ * Example: created/updated/deleted/started/completed/email_opened
692
+ */
693
+ slug?: string;
694
+ /** ID of the entity associated with the event. */
695
+ entityId?: string;
696
+ /** Event timestamp. */
697
+ eventTime?: Date;
698
+ /**
699
+ * Whether the event was triggered as a result of a privacy regulation application
700
+ * (for example, GDPR).
701
+ */
702
+ triggeredByAnonymizeRequest?: boolean | null;
703
+ /** If present, indicates the action that triggered the event. */
704
+ originatedFrom?: string | null;
705
+ /**
706
+ * A sequence number defining the order of updates to the underlying entity.
707
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
708
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
709
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
710
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
711
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
712
+ */
713
+ entityEventSequence?: string | null;
714
+ }
715
+ interface EnterpriseItemCreatedEnvelope {
716
+ entity: EnterpriseMediaItem;
717
+ metadata: EventMetadata$2;
718
+ }
719
+ interface EnterpriseItemUpdatedEnvelope {
720
+ entity: EnterpriseMediaItem;
721
+ metadata: EventMetadata$2;
722
+ }
723
+ interface EnterpriseItemItemCategoriesChangedEnvelope {
724
+ data: ItemCategoriesChanged;
725
+ metadata: EventMetadata$2;
726
+ }
727
+ interface EnterpriseItemPublishStatusChangedEnvelope {
728
+ data: PublishStatusChanged;
729
+ metadata: EventMetadata$2;
730
+ }
731
+ interface ItemUploadCallbackOptions {
732
+ /** The item id of the created item */
733
+ itemId?: string;
734
+ /** The callback passed to the upload endpoint */
735
+ callbackToken?: string;
736
+ }
737
+ interface GenerateFileUploadUrlOptions$1 {
738
+ /** The uploaded original file name including the extension */
739
+ fileName?: string;
740
+ /** The file mime-type - will be used to identify the type of media */
741
+ contentType?: string;
742
+ /** The file size in bytes */
743
+ sizeInBytes?: number;
744
+ /**
745
+ * An optional list of categories to link the created item to
746
+ * The item will be linked to the account category automatically
747
+ */
748
+ categoryIds?: string[] | null;
749
+ }
750
+ interface ImportFileOptions$1 {
751
+ /** The uploaded original file name including the extension - will be used as the initial display name */
752
+ fileName?: string | null;
753
+ /** The file mime-type - will be used to identify the type of media */
754
+ contentType?: string | null;
755
+ /** The file size in bytes */
756
+ sizeInBytes?: number | null;
757
+ /**
758
+ * An optional list of categories to link the created item to
759
+ * The item will be linked to the account category automatically
760
+ */
761
+ categoryIds?: string[] | null;
762
+ /** The media type of the uploaded file */
763
+ mediaType?: MediaType$1;
764
+ /**
765
+ * A unique identifier of the client that imported the file
766
+ * This information will exist in the system_tags field prefixed by '_external_uploader:{uploader_system_tag}'
767
+ */
768
+ uploaderSystemTag?: string | null;
769
+ /**
770
+ * An additional container for external information
771
+ * mostly used to pass identifying information of related entities in external services
772
+ * This information will exist in the system_tags field prefixed by '_external_uploader_info:{uploader_info_system_tag}'
773
+ */
774
+ uploaderInfoSystemTag?: string | null;
775
+ }
776
+ interface SearchItemsOptions {
777
+ /** Items search query */
778
+ query?: Search;
779
+ }
780
+ interface QueryOffsetResult {
781
+ currentPage: number | undefined;
782
+ totalPages: number | undefined;
783
+ totalCount: number | undefined;
784
+ hasNext: () => boolean;
785
+ hasPrev: () => boolean;
786
+ length: number;
787
+ pageSize: number;
788
+ }
789
+ interface ItemsQueryResult extends QueryOffsetResult {
790
+ items: EnterpriseMediaItem[];
791
+ query: ItemsQueryBuilder;
792
+ next: () => Promise<ItemsQueryResult>;
793
+ prev: () => Promise<ItemsQueryResult>;
794
+ }
795
+ interface ItemsQueryBuilder {
796
+ /** @param propertyName - Property whose value is compared with `value`.
797
+ * @param value - Value to compare against.
798
+ * @documentationMaturity preview
799
+ */
800
+ eq: (propertyName: 'sizeInBytes' | 'title' | '_createdDate' | '_updatedDate', value: any) => ItemsQueryBuilder;
801
+ /** @param propertyName - Property whose value is compared with `values`.
802
+ * @param values - List of values to compare against.
803
+ * @documentationMaturity preview
804
+ */
805
+ hasSome: (propertyName: 'parentCategoryIds', value: any[]) => ItemsQueryBuilder;
806
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
807
+ * @documentationMaturity preview
808
+ */
809
+ ascending: (...propertyNames: Array<'sizeInBytes' | 'title' | '_createdDate' | '_updatedDate'>) => ItemsQueryBuilder;
810
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
811
+ * @documentationMaturity preview
812
+ */
813
+ descending: (...propertyNames: Array<'sizeInBytes' | 'title' | '_createdDate' | '_updatedDate'>) => ItemsQueryBuilder;
814
+ /** @param limit - Number of items to return, which is also the `pageSize` of the results object.
815
+ * @documentationMaturity preview
816
+ */
817
+ limit: (limit: number) => ItemsQueryBuilder;
818
+ /** @param skip - Number of items to skip in the query results before returning the results.
819
+ * @documentationMaturity preview
820
+ */
821
+ skip: (skip: number) => ItemsQueryBuilder;
822
+ /** @documentationMaturity preview */
823
+ find: () => Promise<ItemsQueryResult>;
824
+ }
825
+ interface UpdateItem {
826
+ /**
827
+ * Id of the item in public media
828
+ * @readonly
829
+ */
830
+ _id?: string;
831
+ /**
832
+ * Media type of the item
833
+ * @readonly
834
+ */
835
+ mediaType?: MediaType$1;
836
+ /**
837
+ * Size of the uploaded file in bytes.
838
+ * @readonly
839
+ */
840
+ sizeInBytes?: string | null;
841
+ /** The item title, part of searchable fields */
842
+ title?: string | null;
843
+ /**
844
+ * The aspect ratio of the item
845
+ * An object containing urls for different views of the item
846
+ * @readonly
847
+ */
848
+ assets?: ItemAssets;
849
+ /** Tags describing the image, part of searchable fields */
850
+ displayTags?: string[] | null;
851
+ /** Tags for internal client use, part of searchable fields */
852
+ internalTags?: string[] | null;
853
+ /**
854
+ * Tags for filtering items in the search
855
+ * @readonly
856
+ */
857
+ systemTags?: string[] | null;
858
+ /**
859
+ * Category ids this item belongs to
860
+ * @readonly
861
+ */
862
+ parentCategoryIds?: string[] | null;
863
+ /** Status of the item */
864
+ publishStatus?: PublishStatus;
865
+ /**
866
+ * Date and time the item was created.
867
+ * @readonly
868
+ */
869
+ _createdDate?: Date;
870
+ /**
871
+ * Date and time the item was updated.
872
+ * @readonly
873
+ */
874
+ _updatedDate?: Date;
875
+ /**
876
+ * An internal id used with different wix media systems
877
+ * @readonly
878
+ */
879
+ internalId?: string | null;
880
+ }
881
+ interface BulkUpdateItemOptions {
882
+ /** Should the response return the updated item */
883
+ returnEntity?: boolean;
884
+ }
885
+ interface LinkItemToCategoriesOptions {
886
+ /** The category ids that the item will be linked to */
887
+ categoryIds?: string[];
888
+ }
889
+ interface UnlinkItemFromCategoriesOptions {
890
+ /** The category ids that the item will be unlinked from */
891
+ categoryIds?: string[];
892
+ }
893
+ interface OverwriteItemCategoriesOptions {
894
+ /** The category ids the item will be linked to after this operation */
895
+ categoryIds?: string[];
896
+ }
897
+
898
+ declare function itemUploadCallback$1(httpClient: HttpClient): (options?: ItemUploadCallbackOptions) => Promise<void>;
899
+ declare function generateFileUploadUrl$3(httpClient: HttpClient): (options?: GenerateFileUploadUrlOptions$1) => Promise<GenerateFileUploadUrlResponse$1 & GenerateFileUploadUrlResponseNonNullableFields$1>;
900
+ declare function importFile$3(httpClient: HttpClient): (url: string, options?: ImportFileOptions$1) => Promise<ImportFileResponse$1 & ImportFileResponseNonNullableFields$1>;
901
+ declare function searchItems$1(httpClient: HttpClient): (options?: SearchItemsOptions) => Promise<SearchItemsResponse & SearchItemsResponseNonNullableFields>;
902
+ declare function queryItems$1(httpClient: HttpClient): () => ItemsQueryBuilder;
903
+ declare function updateItem$1(httpClient: HttpClient): (_id: string, item: UpdateItem) => Promise<EnterpriseMediaItem & {
904
+ _id: string;
905
+ mediaType: MediaType$1;
906
+ assets?: {
907
+ image: string;
908
+ video: string;
909
+ vector: string;
910
+ audio: string;
911
+ document: string;
912
+ archive?: {
913
+ _id: string;
914
+ url: string;
915
+ } | undefined;
916
+ model3d?: {
917
+ _id: string;
918
+ url: string;
919
+ thumbnail: string;
920
+ } | undefined;
921
+ } | undefined;
922
+ publishStatus: PublishStatus;
923
+ }>;
924
+ declare function bulkUpdateItem$1(httpClient: HttpClient): (updateItemRequests: UpdateItemRequest[], options?: BulkUpdateItemOptions) => Promise<BulkUpdateItemResponse & BulkUpdateItemResponseNonNullableFields>;
925
+ declare function getItem$1(httpClient: HttpClient): (itemId: string) => Promise<EnterpriseMediaItem & {
926
+ _id: string;
927
+ mediaType: MediaType$1;
928
+ assets?: {
929
+ image: string;
930
+ video: string;
931
+ vector: string;
932
+ audio: string;
933
+ document: string;
934
+ archive?: {
935
+ _id: string;
936
+ url: string;
937
+ } | undefined;
938
+ model3d?: {
939
+ _id: string;
940
+ url: string;
941
+ thumbnail: string;
942
+ } | undefined;
943
+ } | undefined;
944
+ publishStatus: PublishStatus;
945
+ }>;
946
+ declare function linkItemToCategories$1(httpClient: HttpClient): (itemId: string, options?: LinkItemToCategoriesOptions) => Promise<LinkItemToCategoriesResponse>;
947
+ declare function unlinkItemFromCategories$1(httpClient: HttpClient): (itemId: string, options?: UnlinkItemFromCategoriesOptions) => Promise<UnlinkItemFromCategoriesResponse>;
948
+ declare function overwriteItemCategories$1(httpClient: HttpClient): (itemId: string, options?: OverwriteItemCategoriesOptions) => Promise<OverwriteItemCategoriesResponse>;
949
+ declare const onEnterpriseItemCreated$1: EventDefinition<EnterpriseItemCreatedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_item_created">;
950
+ declare const onEnterpriseItemUpdated$1: EventDefinition<EnterpriseItemUpdatedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_item_updated">;
951
+ declare const onEnterpriseItemItemCategoriesChanged$1: EventDefinition<EnterpriseItemItemCategoriesChangedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_item_item_categories_changed">;
952
+ declare const onEnterpriseItemPublishStatusChanged$1: EventDefinition<EnterpriseItemPublishStatusChangedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_item_publish_status_changed">;
953
+
954
+ declare const itemUploadCallback: BuildRESTFunction<typeof itemUploadCallback$1>;
955
+ declare const generateFileUploadUrl$2: BuildRESTFunction<typeof generateFileUploadUrl$3>;
956
+ declare const importFile$2: BuildRESTFunction<typeof importFile$3>;
957
+ declare const searchItems: BuildRESTFunction<typeof searchItems$1>;
958
+ declare const queryItems: BuildRESTFunction<typeof queryItems$1>;
959
+ declare const updateItem: BuildRESTFunction<typeof updateItem$1>;
960
+ declare const bulkUpdateItem: BuildRESTFunction<typeof bulkUpdateItem$1>;
961
+ declare const getItem: BuildRESTFunction<typeof getItem$1>;
962
+ declare const linkItemToCategories: BuildRESTFunction<typeof linkItemToCategories$1>;
963
+ declare const unlinkItemFromCategories: BuildRESTFunction<typeof unlinkItemFromCategories$1>;
964
+ declare const overwriteItemCategories: BuildRESTFunction<typeof overwriteItemCategories$1>;
965
+ declare const onEnterpriseItemCreated: BuildEventDefinition<typeof onEnterpriseItemCreated$1>;
966
+ declare const onEnterpriseItemUpdated: BuildEventDefinition<typeof onEnterpriseItemUpdated$1>;
967
+ declare const onEnterpriseItemItemCategoriesChanged: BuildEventDefinition<typeof onEnterpriseItemItemCategoriesChanged$1>;
968
+ declare const onEnterpriseItemPublishStatusChanged: BuildEventDefinition<typeof onEnterpriseItemPublishStatusChanged$1>;
969
+
970
+ declare const context$2_bulkUpdateItem: typeof bulkUpdateItem;
971
+ declare const context$2_getItem: typeof getItem;
972
+ declare const context$2_itemUploadCallback: typeof itemUploadCallback;
973
+ declare const context$2_linkItemToCategories: typeof linkItemToCategories;
974
+ declare const context$2_onEnterpriseItemCreated: typeof onEnterpriseItemCreated;
975
+ declare const context$2_onEnterpriseItemItemCategoriesChanged: typeof onEnterpriseItemItemCategoriesChanged;
976
+ declare const context$2_onEnterpriseItemPublishStatusChanged: typeof onEnterpriseItemPublishStatusChanged;
977
+ declare const context$2_onEnterpriseItemUpdated: typeof onEnterpriseItemUpdated;
978
+ declare const context$2_overwriteItemCategories: typeof overwriteItemCategories;
979
+ declare const context$2_queryItems: typeof queryItems;
980
+ declare const context$2_searchItems: typeof searchItems;
981
+ declare const context$2_unlinkItemFromCategories: typeof unlinkItemFromCategories;
982
+ declare const context$2_updateItem: typeof updateItem;
983
+ declare namespace context$2 {
984
+ export { context$2_bulkUpdateItem as bulkUpdateItem, generateFileUploadUrl$2 as generateFileUploadUrl, context$2_getItem as getItem, importFile$2 as importFile, context$2_itemUploadCallback as itemUploadCallback, context$2_linkItemToCategories as linkItemToCategories, context$2_onEnterpriseItemCreated as onEnterpriseItemCreated, context$2_onEnterpriseItemItemCategoriesChanged as onEnterpriseItemItemCategoriesChanged, context$2_onEnterpriseItemPublishStatusChanged as onEnterpriseItemPublishStatusChanged, context$2_onEnterpriseItemUpdated as onEnterpriseItemUpdated, context$2_overwriteItemCategories as overwriteItemCategories, context$2_queryItems as queryItems, context$2_searchItems as searchItems, context$2_unlinkItemFromCategories as unlinkItemFromCategories, context$2_updateItem as updateItem };
985
+ }
986
+
987
+ interface FileDescriptor {
988
+ /**
989
+ * File ID. Generated when a file is uploaded to the Media Manager.
990
+ * @readonly
991
+ */
992
+ _id?: string;
993
+ /** File name as it appears in the Media Manager. */
994
+ displayName?: string;
995
+ /**
996
+ * Static URL of the file.
997
+ * @readonly
998
+ */
999
+ url?: string;
1000
+ /** ID of the file's parent folder. */
1001
+ parentFolderId?: string | null;
1002
+ /**
1003
+ * File hash.
1004
+ * @readonly
1005
+ */
1006
+ hash?: string;
1007
+ /**
1008
+ * Size of the uploaded file in bytes.
1009
+ * @readonly
1010
+ */
1011
+ sizeInBytes?: string | null;
1012
+ /**
1013
+ * Whether the link to the uploaded file is public or private. Private links require a token.
1014
+ * @readonly
1015
+ */
1016
+ private?: boolean;
1017
+ /**
1018
+ * Media file type.
1019
+ * @readonly
1020
+ */
1021
+ mediaType?: MediaType;
1022
+ /**
1023
+ * Media file content.
1024
+ * @readonly
1025
+ */
1026
+ media?: FileMedia;
1027
+ /**
1028
+ * Status of the file that was uploaded.
1029
+ * * `FAILED`: The file failed to upload, for example, during media post processing.
1030
+ * * `READY`: The file uploaded, finished all processing, and is ready for use.
1031
+ * * `PENDING`: The file is processing and the URLs are not yet available. This response is returned when importing a file.
1032
+ * @readonly
1033
+ */
1034
+ operationStatus?: OperationStatus;
1035
+ /**
1036
+ * URL where the file was uploaded from.
1037
+ * @readonly
1038
+ */
1039
+ sourceUrl?: string | null;
1040
+ /**
1041
+ * URL of the file's thumbnail.
1042
+ * @readonly
1043
+ */
1044
+ thumbnailUrl?: string | null;
1045
+ /** 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. */
1046
+ labels?: string[];
1047
+ /**
1048
+ * Date and time the file was created.
1049
+ * @readonly
1050
+ */
1051
+ _createdDate?: Date;
1052
+ /**
1053
+ * Date and time the file was updated.
1054
+ * @readonly
1055
+ */
1056
+ _updatedDate?: Date;
1057
+ /**
1058
+ * The Wix site ID where the media file is stored.
1059
+ * @readonly
1060
+ */
1061
+ siteId?: string;
1062
+ /**
1063
+ * State of the file.
1064
+ * @readonly
1065
+ */
1066
+ state?: State$1;
1067
+ }
1068
+ declare enum MediaType {
1069
+ UNKNOWN = "UNKNOWN",
1070
+ IMAGE = "IMAGE",
1071
+ VIDEO = "VIDEO",
1072
+ AUDIO = "AUDIO",
1073
+ DOCUMENT = "DOCUMENT",
1074
+ VECTOR = "VECTOR",
1075
+ ARCHIVE = "ARCHIVE",
1076
+ MODEL3D = "MODEL3D",
1077
+ OTHER = "OTHER"
1078
+ }
1079
+ interface FileMedia extends FileMediaMediaOneOf {
1080
+ /** Information about the image. */
1081
+ image?: ImageMedia;
1082
+ /** Information about the video. */
1083
+ video?: string;
1084
+ /** Information about the audio. */
1085
+ audio?: AudioV2;
1086
+ /** Information about the document. */
1087
+ document?: string;
1088
+ /** Information about the vector. */
1089
+ vector?: ImageMedia;
1090
+ /** Information about the archive. */
1091
+ archive?: Archive;
1092
+ /** Information about the 3D Model. */
1093
+ model3d?: Model3D;
1094
+ }
1095
+ /** @oneof */
1096
+ interface FileMediaMediaOneOf {
1097
+ /** Information about the image. */
1098
+ image?: ImageMedia;
1099
+ /** Information about the video. */
1100
+ video?: string;
1101
+ /** Information about the audio. */
1102
+ audio?: AudioV2;
1103
+ /** Information about the document. */
1104
+ document?: string;
1105
+ /** Information about the vector. */
1106
+ vector?: ImageMedia;
1107
+ /** Information about the archive. */
1108
+ archive?: Archive;
1109
+ /** Information about the 3D Model. */
1110
+ model3d?: Model3D;
1111
+ }
1112
+ interface ImageMedia {
1113
+ /** Image data. */
1114
+ image?: string;
1115
+ /** Image colors. */
1116
+ colors?: Colors;
1117
+ /** Information about faces in the image. Use to crop images without cutting out faces. */
1118
+ faces?: FaceRecognition[];
1119
+ /**
1120
+ * Information about the image preview.
1121
+ * You can use this to display a preview for private images.
1122
+ */
1123
+ previewImage?: string;
1124
+ /**
1125
+ * Optional, An AI generated description of the image
1126
+ * @readonly
1127
+ */
1128
+ caption?: string | null;
1129
+ }
1130
+ interface Colors {
1131
+ /** Main color of the image. */
1132
+ prominent?: Color;
1133
+ /** Color palette of the image. */
1134
+ palette?: Color[];
1135
+ }
1136
+ interface Color {
1137
+ /** HEX color. */
1138
+ hex?: string | null;
1139
+ /** RGB color. */
1140
+ rgb?: ColorRGB;
1141
+ }
1142
+ interface ColorRGB {
1143
+ /** Red channel. */
1144
+ r?: number | null;
1145
+ /** Green channel. */
1146
+ g?: number | null;
1147
+ /** Blue channel. */
1148
+ b?: number | null;
1149
+ }
1150
+ /**
1151
+ * Using this object you can crop images while centering on faces
1152
+ * ------------------------
1153
+ * | |
1154
+ * | x,y |
1155
+ * | *-------- |
1156
+ * | | . . | |
1157
+ * | | | | height |
1158
+ * | | \ / | |
1159
+ * | | | |
1160
+ * | --------- |
1161
+ * | width |
1162
+ * | |
1163
+ * |______________________|
1164
+ */
1165
+ interface FaceRecognition {
1166
+ /** The accuracy percentage of the face recognition. The likelihood that a face is detected. */
1167
+ confidence?: number;
1168
+ /** Top left x pixel coordinate of the face. */
1169
+ x?: number;
1170
+ /** Top left y pixel coordinate of the face. */
1171
+ y?: number;
1172
+ /** Face pixel height. */
1173
+ height?: number;
1174
+ /** Face pixel width. */
1175
+ width?: number;
1176
+ }
1177
+ interface AudioV2 {
1178
+ /** WixMedia ID. */
1179
+ _id?: string;
1180
+ /** Audio formats available for this file. */
1181
+ assets?: string[];
1182
+ /**
1183
+ * Audio bitrate.
1184
+ * @readonly
1185
+ */
1186
+ bitrate?: number | null;
1187
+ /**
1188
+ * Audio format.
1189
+ * @readonly
1190
+ */
1191
+ format?: string | null;
1192
+ /**
1193
+ * Audio duration in seconds.
1194
+ * @readonly
1195
+ */
1196
+ duration?: number | null;
1197
+ /**
1198
+ * Audio size in bytes.
1199
+ * @readonly
1200
+ */
1201
+ sizeInBytes?: string | null;
1202
+ }
1203
+ interface Archive {
1204
+ /** WixMedia ID. */
1205
+ _id?: string;
1206
+ /** Archive URL. */
1207
+ url?: string;
1208
+ /**
1209
+ * Archive URL expiration date (when relevant).
1210
+ * @readonly
1211
+ */
1212
+ urlExpirationDate?: Date;
1213
+ /** Archive size in bytes. */
1214
+ sizeInBytes?: string | null;
1215
+ /** Archive filename. */
1216
+ filename?: string | null;
1217
+ }
1218
+ interface Model3D {
1219
+ /** WixMedia 3D ID. */
1220
+ _id?: string;
1221
+ /** 3D URL. */
1222
+ url?: string;
1223
+ /** 3D thumbnail Image */
1224
+ thumbnail?: string;
1225
+ /** 3D alt text. */
1226
+ altText?: string | null;
1227
+ /**
1228
+ * 3D URL expiration date (when relevant).
1229
+ * @readonly
1230
+ */
1231
+ urlExpirationDate?: Date;
1232
+ /**
1233
+ * 3D filename.
1234
+ * @readonly
1235
+ */
1236
+ filename?: string | null;
1237
+ /**
1238
+ * 3D size in bytes.
1239
+ * @readonly
1240
+ */
1241
+ sizeInBytes?: string | null;
1242
+ }
1243
+ declare enum OperationStatus {
1244
+ /** File upload or processing failed */
1245
+ FAILED = "FAILED",
1246
+ /** File is ready for consumption */
1247
+ READY = "READY",
1248
+ /** File is waiting for processing or currently being processed */
1249
+ PENDING = "PENDING"
1250
+ }
1251
+ declare enum State$1 {
1252
+ /** File is ready for consumption */
1253
+ OK = "OK",
1254
+ /** Deleted file */
1255
+ DELETED = "DELETED"
1256
+ }
1257
+ interface FileReady {
1258
+ /** File entity that is ready with full information */
1259
+ file?: FileDescriptor;
1260
+ /** External information passed in the file import or upload. */
1261
+ externalInfo?: ExternalInfo;
1262
+ /** The File was restored from the trash-bin */
1263
+ triggeredByUndelete?: boolean;
1264
+ }
1265
+ interface ExternalInfo {
1266
+ /** External information to pass in the File Ready or File Failed events. */
1267
+ origin?: string;
1268
+ /** External IDs to pass in the File Ready or File Failed events. */
1269
+ externalIds?: string[];
1270
+ }
1271
+ interface FileFailed {
1272
+ /** External information passed in the file import or upload. */
1273
+ externalInfo?: ExternalInfo;
1274
+ }
1275
+ interface GenerateFilesDownloadUrlResponse {
1276
+ /** URL for downloading the compressed file containing the specified files in the Media Manager. */
1277
+ downloadUrl?: string;
1278
+ }
1279
+ declare enum ContentDisposition {
1280
+ /** Using the link in the browser will download the file */
1281
+ ATTACHMENT = "ATTACHMENT",
1282
+ /** Using the link in the browser will open the file in the browser */
1283
+ INLINE = "INLINE"
1284
+ }
1285
+ interface GenerateFileDownloadUrlResponse {
1286
+ /** URL for downloading a specific file in the Media Manager. */
1287
+ downloadUrls?: DownloadUrl[];
1288
+ }
1289
+ interface DownloadUrl {
1290
+ /** The file download URL. */
1291
+ url?: string;
1292
+ /**
1293
+ * Key for downloading a different asset (format and quality) of a file.
1294
+ * Default: `src`, key representing the original file's format and quality.
1295
+ */
1296
+ assetKey?: string;
1297
+ }
1298
+ interface GetFileDescriptorsResponse {
1299
+ /** Information about the requested files. */
1300
+ files?: FileDescriptor[];
1301
+ }
1302
+ interface GenerateFileUploadUrlResponse {
1303
+ /** The URL for uploading a file to the Media Manager. */
1304
+ uploadUrl?: string;
1305
+ }
1306
+ declare enum UploadProtocol {
1307
+ /** The upload protocol to use for implementing the resumable upload. */
1308
+ TUS = "TUS"
1309
+ }
1310
+ interface GenerateFileResumableUploadUrlResponse {
1311
+ /**
1312
+ * The upload protocol to use for implementing the resumable upload.
1313
+ *
1314
+ * Supported values: `"TUS"`
1315
+ */
1316
+ uploadProtocol?: UploadProtocol;
1317
+ /** The URL for uploading a file to the Media Manager. */
1318
+ uploadUrl?: string;
1319
+ /** Single-use upload token. */
1320
+ uploadToken?: string;
1321
+ }
1322
+ interface ImportFileRequest {
1323
+ /** Publicly accessible external file URL. */
1324
+ url: string;
1325
+ /** Media type of the file to import. */
1326
+ mediaType?: MediaType;
1327
+ /** File name that appears in the Media Manager. */
1328
+ displayName?: string | null;
1329
+ /**
1330
+ * ID of the file's parent folder. <br />
1331
+ * Default: `media-root`.
1332
+ */
1333
+ parentFolderId?: string | null;
1334
+ /** Whether the link to the imported file is public or private. */
1335
+ private?: boolean | null;
1336
+ /** 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. */
1337
+ labels?: string[] | null;
1338
+ /** File mime type. */
1339
+ mimeType?: string;
1340
+ /** A place to map an external entity to an imported file in the Wix Media Manager. */
1341
+ externalInfo?: ExternalInfo;
1342
+ /** Optional parameters that should be sent with the external URL. */
1343
+ urlParams?: Record<string, any> | null;
1344
+ /** Optional headers that should be sent with the external URL. */
1345
+ urlHeaders?: Record<string, any> | null;
1346
+ /**
1347
+ * The path by folder names to create the file under.
1348
+ * In case a folder in the path does not exist it will be created
1349
+ * If multiple folders with the same name exist, the first one will be used
1350
+ * If `parentFolderId` is provided, the path will be nested under the folder specified by the `parentFolderId`
1351
+ * example: 'videos/2024/december'
1352
+ */
1353
+ filePath?: string | null;
1354
+ }
1355
+ interface ImportFileResponse {
1356
+ /** Information about the imported file. */
1357
+ file?: FileDescriptor;
1358
+ }
1359
+ interface BulkImportFilesResponse {
1360
+ /** Information about the imported files. */
1361
+ files?: FileDescriptor[];
1362
+ }
1363
+ interface BulkImportFileResponse {
1364
+ /** Items created by bulk action. */
1365
+ results?: BulkImportFileResult[];
1366
+ /** Bulk action metadata. */
1367
+ bulkActionMetadata?: BulkActionMetadata;
1368
+ }
1369
+ interface BulkImportFileResult {
1370
+ /** Item metadata. */
1371
+ itemMetadata?: ItemMetadata;
1372
+ /** Imported file. This field is returned if the operation was successful and `returnEntity` is not set to `false`. */
1373
+ item?: FileDescriptor;
1374
+ }
1375
+ interface ItemMetadata {
1376
+ /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
1377
+ _id?: string | null;
1378
+ /** Index of the item within the request array. Allows for correlation between request and response items. */
1379
+ originalIndex?: number;
1380
+ /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
1381
+ success?: boolean;
1382
+ /** Details about the error in case of failure. */
1383
+ error?: ApplicationError;
1384
+ }
1385
+ interface ApplicationError {
1386
+ /** Error code. */
1387
+ code?: string;
1388
+ /** Description of the error. */
1389
+ description?: string;
1390
+ /** Data related to the error. */
1391
+ data?: Record<string, any> | null;
1392
+ }
1393
+ interface BulkActionMetadata {
1394
+ /** Number of items that were successfully processed. */
1395
+ totalSuccesses?: number;
1396
+ /** Number of items that couldn't be processed. */
1397
+ totalFailures?: number;
1398
+ /** Number of failures without details because detailed failure threshold was exceeded. */
1399
+ undetailedFailures?: number;
1400
+ }
1401
+ interface Sorting$1 {
1402
+ /** Name of the field to sort by. */
1403
+ fieldName?: string;
1404
+ /** Sort order. */
1405
+ order?: SortOrder$1;
1406
+ }
1407
+ declare enum SortOrder$1 {
1408
+ ASC = "ASC",
1409
+ DESC = "DESC"
1410
+ }
1411
+ interface CursorPaging$1 {
1412
+ /** Maximum number of items to return in the results. */
1413
+ limit?: number | null;
1414
+ /**
1415
+ * Pointer to the next or previous page in the list of results.
1416
+ *
1417
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
1418
+ * Not relevant for the first request.
1419
+ */
1420
+ cursor?: string | null;
1421
+ }
1422
+ interface ListFilesResponse {
1423
+ /** List of files in the Media Manager. */
1424
+ files?: FileDescriptor[];
1425
+ /** The next cursor if it exists. */
1426
+ nextCursor?: PagingMetadataV2$1;
1427
+ }
1428
+ interface PagingMetadataV2$1 {
1429
+ /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
1430
+ total?: number | null;
1431
+ /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
1432
+ cursors?: Cursors$1;
1433
+ }
1434
+ interface Cursors$1 {
1435
+ /** Cursor string pointing to the next page in the list of results. */
1436
+ next?: string | null;
1437
+ }
1438
+ declare enum RootFolder$1 {
1439
+ /** Root of all site media */
1440
+ MEDIA_ROOT = "MEDIA_ROOT",
1441
+ /** Root of the trash system folder */
1442
+ TRASH_ROOT = "TRASH_ROOT",
1443
+ /** Root of all visitor uploads */
1444
+ VISITOR_UPLOADS_ROOT = "VISITOR_UPLOADS_ROOT"
1445
+ }
1446
+ interface SearchFilesResponse {
1447
+ /** Files matching the query. */
1448
+ files?: FileDescriptor[];
1449
+ /** The next cursor if it exists. */
1450
+ nextCursor?: PagingMetadataV2$1;
1451
+ }
1452
+ declare enum StreamFormat {
1453
+ UNKNOWN = "UNKNOWN",
1454
+ HLS = "HLS",
1455
+ DASH = "DASH"
1456
+ }
1457
+ interface GenerateVideoStreamingUrlResponse {
1458
+ /** URL for streaming a specific file in the Media Manager. */
1459
+ downloadUrl?: DownloadUrl;
1460
+ }
1461
+ interface ListDeletedFilesResponse {
1462
+ /** List of files in the Media Manager's trash bin. */
1463
+ files?: FileDescriptor[];
1464
+ /** The next cursor if it exists. */
1465
+ nextCursor?: PagingMetadataV2$1;
1466
+ }
1467
+ interface IdentificationData$1 extends IdentificationDataIdOneOf$1 {
1468
+ /** ID of a site visitor that has not logged in to the site. */
1469
+ anonymousVisitorId?: string;
1470
+ /** ID of a site visitor that has logged in to the site. */
1471
+ memberId?: string;
1472
+ /** ID of a Wix user (site owner, contributor, etc.). */
1473
+ wixUserId?: string;
1474
+ /** ID of an app. */
1475
+ appId?: string;
1476
+ /** @readonly */
1477
+ identityType?: WebhookIdentityType$1;
1478
+ }
1479
+ /** @oneof */
1480
+ interface IdentificationDataIdOneOf$1 {
1481
+ /** ID of a site visitor that has not logged in to the site. */
1482
+ anonymousVisitorId?: string;
1483
+ /** ID of a site visitor that has logged in to the site. */
1484
+ memberId?: string;
1485
+ /** ID of a Wix user (site owner, contributor, etc.). */
1486
+ wixUserId?: string;
1487
+ /** ID of an app. */
1488
+ appId?: string;
1489
+ }
1490
+ declare enum WebhookIdentityType$1 {
1491
+ UNKNOWN = "UNKNOWN",
1492
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
1493
+ MEMBER = "MEMBER",
1494
+ WIX_USER = "WIX_USER",
1495
+ APP = "APP"
1496
+ }
1497
+ interface GenerateFilesDownloadUrlResponseNonNullableFields {
1498
+ downloadUrl: string;
1499
+ }
1500
+ interface GenerateFileDownloadUrlResponseNonNullableFields {
1501
+ downloadUrls: {
1502
+ url: string;
1503
+ assetKey: string;
1504
+ }[];
1505
+ }
1506
+ interface GetFileDescriptorsResponseNonNullableFields {
1507
+ files: {
1508
+ _id: string;
1509
+ displayName: string;
1510
+ url: string;
1511
+ hash: string;
1512
+ private: boolean;
1513
+ mediaType: MediaType;
1514
+ media?: {
1515
+ image?: {
1516
+ image: string;
1517
+ colors?: {
1518
+ palette: Color[];
1519
+ };
1520
+ faces: {
1521
+ confidence: number;
1522
+ x: number;
1523
+ y: number;
1524
+ height: number;
1525
+ width: number;
1526
+ }[];
1527
+ previewImage: string;
1528
+ };
1529
+ video: string;
1530
+ audio?: {
1531
+ _id: string;
1532
+ assets: string;
1533
+ };
1534
+ document: string;
1535
+ vector?: {
1536
+ image: string;
1537
+ colors?: {
1538
+ palette: Color[];
1539
+ };
1540
+ faces: {
1541
+ confidence: number;
1542
+ x: number;
1543
+ y: number;
1544
+ height: number;
1545
+ width: number;
1546
+ }[];
1547
+ previewImage: string;
1548
+ };
1549
+ archive?: {
1550
+ _id: string;
1551
+ url: string;
1552
+ };
1553
+ model3d?: {
1554
+ _id: string;
1555
+ url: string;
1556
+ thumbnail: string;
1557
+ };
1558
+ };
1559
+ operationStatus: OperationStatus;
1560
+ labels: string[];
1561
+ siteId: string;
1562
+ state: State$1;
1563
+ }[];
1564
+ }
1565
+ interface GenerateFileUploadUrlResponseNonNullableFields {
1566
+ uploadUrl: string;
1567
+ }
1568
+ interface GenerateFileResumableUploadUrlResponseNonNullableFields {
1569
+ uploadProtocol: UploadProtocol;
1570
+ uploadUrl: string;
1571
+ uploadToken: string;
1572
+ }
1573
+ interface ImportFileResponseNonNullableFields {
1574
+ file?: {
1575
+ _id: string;
1576
+ displayName: string;
1577
+ url: string;
1578
+ hash: string;
1579
+ private: boolean;
1580
+ mediaType: MediaType;
1581
+ media?: {
1582
+ image?: {
1583
+ image: string;
1584
+ colors?: {
1585
+ palette: Color[];
1586
+ };
1587
+ faces: {
1588
+ confidence: number;
1589
+ x: number;
1590
+ y: number;
1591
+ height: number;
1592
+ width: number;
1593
+ }[];
1594
+ previewImage: string;
1595
+ };
1596
+ video: string;
1597
+ audio?: {
1598
+ _id: string;
1599
+ assets: string;
1600
+ };
1601
+ document: string;
1602
+ vector?: {
1603
+ image: string;
1604
+ colors?: {
1605
+ palette: Color[];
1606
+ };
1607
+ faces: {
1608
+ confidence: number;
1609
+ x: number;
1610
+ y: number;
1611
+ height: number;
1612
+ width: number;
1613
+ }[];
1614
+ previewImage: string;
1615
+ };
1616
+ archive?: {
1617
+ _id: string;
1618
+ url: string;
1619
+ };
1620
+ model3d?: {
1621
+ _id: string;
1622
+ url: string;
1623
+ thumbnail: string;
1624
+ };
1625
+ };
1626
+ operationStatus: OperationStatus;
1627
+ labels: string[];
1628
+ siteId: string;
1629
+ state: State$1;
1630
+ };
1631
+ }
1632
+ interface BulkImportFilesResponseNonNullableFields {
1633
+ files: {
1634
+ _id: string;
1635
+ displayName: string;
1636
+ url: string;
1637
+ hash: string;
1638
+ private: boolean;
1639
+ mediaType: MediaType;
1640
+ media?: {
1641
+ image?: {
1642
+ image: string;
1643
+ colors?: {
1644
+ palette: Color[];
1645
+ };
1646
+ faces: {
1647
+ confidence: number;
1648
+ x: number;
1649
+ y: number;
1650
+ height: number;
1651
+ width: number;
1652
+ }[];
1653
+ previewImage: string;
1654
+ };
1655
+ video: string;
1656
+ audio?: {
1657
+ _id: string;
1658
+ assets: string;
1659
+ };
1660
+ document: string;
1661
+ vector?: {
1662
+ image: string;
1663
+ colors?: {
1664
+ palette: Color[];
1665
+ };
1666
+ faces: {
1667
+ confidence: number;
1668
+ x: number;
1669
+ y: number;
1670
+ height: number;
1671
+ width: number;
1672
+ }[];
1673
+ previewImage: string;
1674
+ };
1675
+ archive?: {
1676
+ _id: string;
1677
+ url: string;
1678
+ };
1679
+ model3d?: {
1680
+ _id: string;
1681
+ url: string;
1682
+ thumbnail: string;
1683
+ };
1684
+ };
1685
+ operationStatus: OperationStatus;
1686
+ labels: string[];
1687
+ siteId: string;
1688
+ state: State$1;
1689
+ }[];
1690
+ }
1691
+ interface BulkImportFileResponseNonNullableFields {
1692
+ results: {
1693
+ itemMetadata?: {
1694
+ originalIndex: number;
1695
+ success: boolean;
1696
+ error?: {
1697
+ code: string;
1698
+ description: string;
1699
+ };
1700
+ };
1701
+ item?: {
1702
+ _id: string;
1703
+ displayName: string;
1704
+ url: string;
1705
+ hash: string;
1706
+ private: boolean;
1707
+ mediaType: MediaType;
1708
+ media?: {
1709
+ image?: {
1710
+ image: string;
1711
+ colors?: {
1712
+ palette: Color[];
1713
+ };
1714
+ faces: {
1715
+ confidence: number;
1716
+ x: number;
1717
+ y: number;
1718
+ height: number;
1719
+ width: number;
1720
+ }[];
1721
+ previewImage: string;
1722
+ };
1723
+ video: string;
1724
+ audio?: {
1725
+ _id: string;
1726
+ assets: string;
1727
+ };
1728
+ document: string;
1729
+ vector?: {
1730
+ image: string;
1731
+ colors?: {
1732
+ palette: Color[];
1733
+ };
1734
+ faces: {
1735
+ confidence: number;
1736
+ x: number;
1737
+ y: number;
1738
+ height: number;
1739
+ width: number;
1740
+ }[];
1741
+ previewImage: string;
1742
+ };
1743
+ archive?: {
1744
+ _id: string;
1745
+ url: string;
1746
+ };
1747
+ model3d?: {
1748
+ _id: string;
1749
+ url: string;
1750
+ thumbnail: string;
1751
+ };
1752
+ };
1753
+ operationStatus: OperationStatus;
1754
+ labels: string[];
1755
+ siteId: string;
1756
+ state: State$1;
1757
+ };
1758
+ }[];
1759
+ bulkActionMetadata?: {
1760
+ totalSuccesses: number;
1761
+ totalFailures: number;
1762
+ undetailedFailures: number;
1763
+ };
1764
+ }
1765
+ interface ListFilesResponseNonNullableFields {
1766
+ files: {
1767
+ _id: string;
1768
+ displayName: string;
1769
+ url: string;
1770
+ hash: string;
1771
+ private: boolean;
1772
+ mediaType: MediaType;
1773
+ media?: {
1774
+ image?: {
1775
+ image: string;
1776
+ colors?: {
1777
+ palette: Color[];
1778
+ };
1779
+ faces: {
1780
+ confidence: number;
1781
+ x: number;
1782
+ y: number;
1783
+ height: number;
1784
+ width: number;
1785
+ }[];
1786
+ previewImage: string;
1787
+ };
1788
+ video: string;
1789
+ audio?: {
1790
+ _id: string;
1791
+ assets: string;
1792
+ };
1793
+ document: string;
1794
+ vector?: {
1795
+ image: string;
1796
+ colors?: {
1797
+ palette: Color[];
1798
+ };
1799
+ faces: {
1800
+ confidence: number;
1801
+ x: number;
1802
+ y: number;
1803
+ height: number;
1804
+ width: number;
1805
+ }[];
1806
+ previewImage: string;
1807
+ };
1808
+ archive?: {
1809
+ _id: string;
1810
+ url: string;
1811
+ };
1812
+ model3d?: {
1813
+ _id: string;
1814
+ url: string;
1815
+ thumbnail: string;
1816
+ };
1817
+ };
1818
+ operationStatus: OperationStatus;
1819
+ labels: string[];
1820
+ siteId: string;
1821
+ state: State$1;
1822
+ }[];
1823
+ }
1824
+ interface SearchFilesResponseNonNullableFields {
1825
+ files: {
1826
+ _id: string;
1827
+ displayName: string;
1828
+ url: string;
1829
+ hash: string;
1830
+ private: boolean;
1831
+ mediaType: MediaType;
1832
+ media?: {
1833
+ image?: {
1834
+ image: string;
1835
+ colors?: {
1836
+ palette: Color[];
1837
+ };
1838
+ faces: {
1839
+ confidence: number;
1840
+ x: number;
1841
+ y: number;
1842
+ height: number;
1843
+ width: number;
1844
+ }[];
1845
+ previewImage: string;
1846
+ };
1847
+ video: string;
1848
+ audio?: {
1849
+ _id: string;
1850
+ assets: string;
1851
+ };
1852
+ document: string;
1853
+ vector?: {
1854
+ image: string;
1855
+ colors?: {
1856
+ palette: Color[];
1857
+ };
1858
+ faces: {
1859
+ confidence: number;
1860
+ x: number;
1861
+ y: number;
1862
+ height: number;
1863
+ width: number;
1864
+ }[];
1865
+ previewImage: string;
1866
+ };
1867
+ archive?: {
1868
+ _id: string;
1869
+ url: string;
1870
+ };
1871
+ model3d?: {
1872
+ _id: string;
1873
+ url: string;
1874
+ thumbnail: string;
1875
+ };
1876
+ };
1877
+ operationStatus: OperationStatus;
1878
+ labels: string[];
1879
+ siteId: string;
1880
+ state: State$1;
1881
+ }[];
1882
+ }
1883
+ interface GenerateVideoStreamingUrlResponseNonNullableFields {
1884
+ downloadUrl?: {
1885
+ url: string;
1886
+ assetKey: string;
1887
+ };
1888
+ }
1889
+ interface ListDeletedFilesResponseNonNullableFields {
1890
+ files: {
1891
+ _id: string;
1892
+ displayName: string;
1893
+ url: string;
1894
+ hash: string;
1895
+ private: boolean;
1896
+ mediaType: MediaType;
1897
+ media?: {
1898
+ image?: {
1899
+ image: string;
1900
+ colors?: {
1901
+ palette: Color[];
1902
+ };
1903
+ faces: {
1904
+ confidence: number;
1905
+ x: number;
1906
+ y: number;
1907
+ height: number;
1908
+ width: number;
1909
+ }[];
1910
+ previewImage: string;
1911
+ };
1912
+ video: string;
1913
+ audio?: {
1914
+ _id: string;
1915
+ assets: string;
1916
+ };
1917
+ document: string;
1918
+ vector?: {
1919
+ image: string;
1920
+ colors?: {
1921
+ palette: Color[];
1922
+ };
1923
+ faces: {
1924
+ confidence: number;
1925
+ x: number;
1926
+ y: number;
1927
+ height: number;
1928
+ width: number;
1929
+ }[];
1930
+ previewImage: string;
1931
+ };
1932
+ archive?: {
1933
+ _id: string;
1934
+ url: string;
1935
+ };
1936
+ model3d?: {
1937
+ _id: string;
1938
+ url: string;
1939
+ thumbnail: string;
1940
+ };
1941
+ };
1942
+ operationStatus: OperationStatus;
1943
+ labels: string[];
1944
+ siteId: string;
1945
+ state: State$1;
1946
+ }[];
1947
+ }
1948
+ interface BaseEventMetadata$1 {
1949
+ /** App instance ID. */
1950
+ instanceId?: string | null;
1951
+ /** Event type. */
1952
+ eventType?: string;
1953
+ /** The identification type and identity data. */
1954
+ identity?: IdentificationData$1;
1955
+ }
1956
+ interface EventMetadata$1 extends BaseEventMetadata$1 {
1957
+ /**
1958
+ * Unique event ID.
1959
+ * Allows clients to ignore duplicate webhooks.
1960
+ */
1961
+ _id?: string;
1962
+ /**
1963
+ * Assumes actions are also always typed to an entity_type
1964
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
1965
+ */
1966
+ entityFqdn?: string;
1967
+ /**
1968
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
1969
+ * This is although the created/updated/deleted notion is duplication of the oneof types
1970
+ * Example: created/updated/deleted/started/completed/email_opened
1971
+ */
1972
+ slug?: string;
1973
+ /** ID of the entity associated with the event. */
1974
+ entityId?: string;
1975
+ /** Event timestamp. */
1976
+ eventTime?: Date;
1977
+ /**
1978
+ * Whether the event was triggered as a result of a privacy regulation application
1979
+ * (for example, GDPR).
1980
+ */
1981
+ triggeredByAnonymizeRequest?: boolean | null;
1982
+ /** If present, indicates the action that triggered the event. */
1983
+ originatedFrom?: string | null;
1984
+ /**
1985
+ * A sequence number defining the order of updates to the underlying entity.
1986
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
1987
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
1988
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
1989
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
1990
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
1991
+ */
1992
+ entityEventSequence?: string | null;
1993
+ }
1994
+ interface FileDescriptorUpdatedEnvelope {
1995
+ entity: FileDescriptor;
1996
+ metadata: EventMetadata$1;
1997
+ }
1998
+ interface FileDescriptorDeletedEnvelope {
1999
+ metadata: EventMetadata$1;
2000
+ }
2001
+ interface FileDescriptorFileReadyEnvelope {
2002
+ data: FileReady;
2003
+ metadata: EventMetadata$1;
2004
+ }
2005
+ interface FileDescriptorFileFailedEnvelope {
2006
+ data: FileFailed;
2007
+ metadata: EventMetadata$1;
2008
+ }
2009
+ interface GenerateFileDownloadUrlOptions {
2010
+ /**
2011
+ * Temporary file name used to identify the file type. For example, a file named "myFile.jpeg" identifies as an "image/jpeg" file type. <br />
2012
+ *
2013
+ * **Note:** The name that appears in the Media Manager is taken from the `filename` query parameter in the upload request.
2014
+ */
2015
+ downloadFileName?: string | null;
2016
+ /**
2017
+ * The time that it takes in minutes for the download URL to expire. <br />
2018
+ * Default: `600`. <br />
2019
+ * Limit: `525600` (1 year).
2020
+ */
2021
+ expirationInMinutes?: number | null;
2022
+ /**
2023
+ * The redirect URL for when the temporary download URL with a token expires. <br />
2024
+ * Default: A 403 Forbidden response page.
2025
+ */
2026
+ expirationRedirectUrl?: string | null;
2027
+ /**
2028
+ * Keys for downloading different assets (format and quality) of a file.
2029
+ * Default: `src`, key representing the original file's format and quality.
2030
+ */
2031
+ assetKeys?: string[] | null;
2032
+ /**
2033
+ * Whether the link downloads the file or opens the file in the browser.
2034
+ *
2035
+ * - `ATTACHMENT`: The link downloads the file.
2036
+ * - `INLINE`: The link opens the file in the browser.
2037
+ *
2038
+ * Default: `ATTACHMENT`
2039
+ */
2040
+ contentDisposition?: ContentDisposition;
2041
+ }
2042
+ interface GenerateFileUploadUrlOptions {
2043
+ /**
2044
+ * Temporary file name used to identify the file type. For example, a file named "myFile.jpeg" identifies as an "image/jpeg" file type.
2045
+ * <br /> **Note:** The name that appears in the Media Manager is taken from the `filename` query parameter in the upload request.
2046
+ */
2047
+ fileName?: string | null;
2048
+ /**
2049
+ * File size in bytes.
2050
+ * @readonly
2051
+ */
2052
+ sizeInBytes?: string | null;
2053
+ /**
2054
+ * ID of the file's parent folder. <br />
2055
+ * Default: `media-root`.
2056
+ */
2057
+ parentFolderId?: string | null;
2058
+ /** Whether the link to the uploaded file is public or private. See `Private Files` in terminology. */
2059
+ private?: boolean | null;
2060
+ /** 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. */
2061
+ labels?: string[] | null;
2062
+ /** A place to map an external entity to an uploaded file in the Wix Media Manager. */
2063
+ externalInfo?: ExternalInfo;
2064
+ /**
2065
+ * The path by folder names to create the file under.
2066
+ * In case a folder in the path does not exist it will be created
2067
+ * If multiple folders with the same name exist, the first one will be used
2068
+ * If `parentFolderId` is provided, the path will be nested under the folder specified by the `parentFolderId`
2069
+ * example: 'videos/2024/december'
2070
+ */
2071
+ filePath?: string | null;
2072
+ }
2073
+ interface GenerateFileResumableUploadUrlOptions {
2074
+ /**
2075
+ * Temporary file name used to identify the file type. For example, a file named "myFile.jpeg" identifies as an "image/jpeg" file type.
2076
+ * <br /> **Note:** The name that appears in the Media Manager is taken from the `filename` query parameter in the upload request.
2077
+ */
2078
+ fileName?: string | null;
2079
+ /**
2080
+ * File size in bytes.
2081
+ * @readonly
2082
+ */
2083
+ sizeInBytes?: string | null;
2084
+ /**
2085
+ * ID of the file's parent folder. <br />
2086
+ * Default: `media-root`.
2087
+ */
2088
+ parentFolderId?: string | null;
2089
+ /** Whether the link to the imported file is public or private. See `Private Files` in terminology. */
2090
+ private?: boolean | null;
2091
+ /** 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. */
2092
+ labels?: string[] | null;
2093
+ /**
2094
+ * The upload protocol to use for implementing the resumable upload.
2095
+ *
2096
+ * Supported values: `"TUS"`
2097
+ */
2098
+ uploadProtocol?: UploadProtocol;
2099
+ /**
2100
+ * The path by folder names to create the file under.
2101
+ * In case a folder in the path does not exist it will be created
2102
+ * If multiple folders with the same name exist, the first one will be used
2103
+ * If `parentFolderId` is provided, the path will be nested under the folder specified by the `parentFolderId`
2104
+ * example: 'videos/2024/december'
2105
+ */
2106
+ filePath?: string | null;
2107
+ }
2108
+ interface ImportFileOptions {
2109
+ /** Media type of the file to import. */
2110
+ mediaType?: MediaType;
2111
+ /** File name that appears in the Media Manager. */
2112
+ displayName?: string | null;
2113
+ /**
2114
+ * ID of the file's parent folder. <br />
2115
+ * Default: `media-root`.
2116
+ */
2117
+ parentFolderId?: string | null;
2118
+ /** Whether the link to the imported file is public or private. */
2119
+ private?: boolean | null;
2120
+ /** 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. */
2121
+ labels?: string[] | null;
2122
+ /** File mime type. */
2123
+ mimeType?: string;
2124
+ /** A place to map an external entity to an imported file in the Wix Media Manager. */
2125
+ externalInfo?: ExternalInfo;
2126
+ /** Optional parameters that should be sent with the external URL. */
2127
+ urlParams?: Record<string, any> | null;
2128
+ /** Optional headers that should be sent with the external URL. */
2129
+ urlHeaders?: Record<string, any> | null;
2130
+ /**
2131
+ * The path by folder names to create the file under.
2132
+ * In case a folder in the path does not exist it will be created
2133
+ * If multiple folders with the same name exist, the first one will be used
2134
+ * If `parentFolderId` is provided, the path will be nested under the folder specified by the `parentFolderId`
2135
+ * example: 'videos/2024/december'
2136
+ */
2137
+ filePath?: string | null;
2138
+ }
2139
+ interface BulkImportFileOptions {
2140
+ /**
2141
+ * Whether to include the imported File Descriptor in the response. Set to `false` to exclude the File Descriptor from the returned object.
2142
+ *
2143
+ * Default: `true`
2144
+ */
2145
+ returnEntity?: boolean | null;
2146
+ }
2147
+ interface ListFilesOptions {
2148
+ /**
2149
+ * ID of the file's parent folder. <br />
2150
+ * Default:`media-root`.
2151
+ */
2152
+ parentFolderId?: string | null;
2153
+ /** Media file type. */
2154
+ mediaTypes?: MediaType[];
2155
+ /** Whether the link to the imported file is public or private. */
2156
+ private?: boolean | null;
2157
+ /**
2158
+ * Field name and order to sort by. One of:
2159
+ *
2160
+ * - `displayName`
2161
+ * - `_updatedDate`
2162
+ * - `sizeInBytes`
2163
+ *
2164
+ * Default: `_updatedDate` in `"DESC"` order.
2165
+ */
2166
+ sort?: Sorting$1;
2167
+ /** Cursor and paging information. */
2168
+ paging?: CursorPaging$1;
2169
+ }
2170
+ interface SearchFilesOptions {
2171
+ /**
2172
+ * Term to search for. Possible terms include the value of a file's
2173
+ * `displayName`, `mimeType`, and `label`. <br />
2174
+ * For example, if a file's label is cat, the search term is 'cat'.
2175
+ */
2176
+ search?: string | null;
2177
+ /**
2178
+ * A root folder in the media manager to search in.
2179
+ *
2180
+ * Default: `MEDIA_ROOT`.
2181
+ */
2182
+ rootFolder?: RootFolder$1;
2183
+ /** Media file type. */
2184
+ mediaTypes?: MediaType[];
2185
+ /**
2186
+ * Whether the link to the imported file is public or private.
2187
+ *
2188
+ * Default: `false`.
2189
+ */
2190
+ private?: boolean | null;
2191
+ /**
2192
+ * Field name and order to sort by. One of:
2193
+ *
2194
+ * - `displayName`
2195
+ * - `_updatedDate`
2196
+ * - `sizeInBytes`
2197
+ *
2198
+ * Default: `_updatedDate` in `"DESC"` order.
2199
+ */
2200
+ sort?: Sorting$1;
2201
+ /** Cursor and paging information. */
2202
+ paging?: CursorPaging$1;
2203
+ }
2204
+ interface GenerateVideoStreamingUrlOptions {
2205
+ /** Video stream format. */
2206
+ format?: StreamFormat;
2207
+ }
2208
+ interface BulkDeleteFilesOptions {
2209
+ /**
2210
+ * Whether the specified files are permanently deleted. <br />
2211
+ * Default: `false`
2212
+ */
2213
+ permanent?: boolean;
2214
+ }
2215
+ interface ListDeletedFilesOptions {
2216
+ /**
2217
+ * ID of the file's parent folder. <br />
2218
+ * Default: `media-root`.
2219
+ */
2220
+ parentFolderId?: string | null;
2221
+ /** Media file type. */
2222
+ mediaTypes?: MediaType[];
2223
+ /** Whether the link to the imported file is public or private. */
2224
+ private?: boolean | null;
2225
+ /**
2226
+ * Field name and order to sort by. One of:
2227
+ *
2228
+ * - `displayName`
2229
+ * - `_updatedDate`
2230
+ * - `sizeInBytes`
2231
+ *
2232
+ * Default: `_updatedDate` in `"DESC"` order.
2233
+ */
2234
+ sort?: Sorting$1;
2235
+ /** Cursor and paging information. */
2236
+ paging?: CursorPaging$1;
2237
+ }
2238
+
2239
+ declare function generateFilesDownloadUrl$1(httpClient: HttpClient): (fileIds: string[]) => Promise<GenerateFilesDownloadUrlResponse & GenerateFilesDownloadUrlResponseNonNullableFields>;
2240
+ declare function generateFileDownloadUrl$1(httpClient: HttpClient): (fileId: string, options?: GenerateFileDownloadUrlOptions) => Promise<GenerateFileDownloadUrlResponse & GenerateFileDownloadUrlResponseNonNullableFields>;
2241
+ declare function getFileDescriptor$1(httpClient: HttpClient): (fileId: string) => Promise<FileDescriptor & {
2242
+ _id: string;
2243
+ displayName: string;
2244
+ url: string;
2245
+ hash: string;
2246
+ private: boolean;
2247
+ mediaType: MediaType;
2248
+ media?: {
2249
+ image?: {
2250
+ image: string;
2251
+ colors?: {
2252
+ palette: Color[];
2253
+ } | undefined;
2254
+ faces: {
2255
+ confidence: number;
2256
+ x: number;
2257
+ y: number;
2258
+ height: number;
2259
+ width: number;
2260
+ }[];
2261
+ previewImage: string;
2262
+ } | undefined;
2263
+ video: string;
2264
+ audio?: {
2265
+ _id: string;
2266
+ assets: string;
2267
+ } | undefined;
2268
+ document: string;
2269
+ vector?: {
2270
+ image: string;
2271
+ colors?: {
2272
+ palette: Color[];
2273
+ } | undefined;
2274
+ faces: {
2275
+ confidence: number;
2276
+ x: number;
2277
+ y: number;
2278
+ height: number;
2279
+ width: number;
2280
+ }[];
2281
+ previewImage: string;
2282
+ } | undefined;
2283
+ archive?: {
2284
+ _id: string;
2285
+ url: string;
2286
+ } | undefined;
2287
+ model3d?: {
2288
+ _id: string;
2289
+ url: string;
2290
+ thumbnail: string;
2291
+ } | undefined;
2292
+ } | undefined;
2293
+ operationStatus: OperationStatus;
2294
+ labels: string[];
2295
+ siteId: string;
2296
+ state: State$1;
2297
+ }>;
2298
+ declare function getFileDescriptors$1(httpClient: HttpClient): (fileIds: string[]) => Promise<GetFileDescriptorsResponse & GetFileDescriptorsResponseNonNullableFields>;
2299
+ declare function updateFileDescriptor$1(httpClient: HttpClient): (file: FileDescriptor) => Promise<FileDescriptor & {
2300
+ _id: string;
2301
+ displayName: string;
2302
+ url: string;
2303
+ hash: string;
2304
+ private: boolean;
2305
+ mediaType: MediaType;
2306
+ media?: {
2307
+ image?: {
2308
+ image: string;
2309
+ colors?: {
2310
+ palette: Color[];
2311
+ } | undefined;
2312
+ faces: {
2313
+ confidence: number;
2314
+ x: number;
2315
+ y: number;
2316
+ height: number;
2317
+ width: number;
2318
+ }[];
2319
+ previewImage: string;
2320
+ } | undefined;
2321
+ video: string;
2322
+ audio?: {
2323
+ _id: string;
2324
+ assets: string;
2325
+ } | undefined;
2326
+ document: string;
2327
+ vector?: {
2328
+ image: string;
2329
+ colors?: {
2330
+ palette: Color[];
2331
+ } | undefined;
2332
+ faces: {
2333
+ confidence: number;
2334
+ x: number;
2335
+ y: number;
2336
+ height: number;
2337
+ width: number;
2338
+ }[];
2339
+ previewImage: string;
2340
+ } | undefined;
2341
+ archive?: {
2342
+ _id: string;
2343
+ url: string;
2344
+ } | undefined;
2345
+ model3d?: {
2346
+ _id: string;
2347
+ url: string;
2348
+ thumbnail: string;
2349
+ } | undefined;
2350
+ } | undefined;
2351
+ operationStatus: OperationStatus;
2352
+ labels: string[];
2353
+ siteId: string;
2354
+ state: State$1;
2355
+ }>;
2356
+ declare function generateFileUploadUrl$1(httpClient: HttpClient): (mimeType: string | null, options?: GenerateFileUploadUrlOptions) => Promise<GenerateFileUploadUrlResponse & GenerateFileUploadUrlResponseNonNullableFields>;
2357
+ declare function generateFileResumableUploadUrl$1(httpClient: HttpClient): (mimeType: string | null, options?: GenerateFileResumableUploadUrlOptions) => Promise<GenerateFileResumableUploadUrlResponse & GenerateFileResumableUploadUrlResponseNonNullableFields>;
2358
+ declare function importFile$1(httpClient: HttpClient): (url: string, options?: ImportFileOptions) => Promise<ImportFileResponse & ImportFileResponseNonNullableFields>;
2359
+ declare function bulkImportFiles$1(httpClient: HttpClient): (importFileRequests: ImportFileRequest[]) => Promise<BulkImportFilesResponse & BulkImportFilesResponseNonNullableFields>;
2360
+ declare function bulkImportFile$1(httpClient: HttpClient): (importFileRequests: ImportFileRequest[], options?: BulkImportFileOptions) => Promise<BulkImportFileResponse & BulkImportFileResponseNonNullableFields>;
2361
+ declare function listFiles$1(httpClient: HttpClient): (options?: ListFilesOptions) => Promise<ListFilesResponse & ListFilesResponseNonNullableFields>;
2362
+ declare function searchFiles$1(httpClient: HttpClient): (options?: SearchFilesOptions) => Promise<SearchFilesResponse & SearchFilesResponseNonNullableFields>;
2363
+ declare function generateVideoStreamingUrl$1(httpClient: HttpClient): (fileId: string, options?: GenerateVideoStreamingUrlOptions) => Promise<GenerateVideoStreamingUrlResponse & GenerateVideoStreamingUrlResponseNonNullableFields>;
2364
+ declare function bulkDeleteFiles$1(httpClient: HttpClient): (fileIds: string[], options?: BulkDeleteFilesOptions) => Promise<void>;
2365
+ declare function bulkRestoreFilesFromTrashBin$1(httpClient: HttpClient): (fileIds: string[]) => Promise<void>;
2366
+ declare function listDeletedFiles$1(httpClient: HttpClient): (options?: ListDeletedFilesOptions) => Promise<ListDeletedFilesResponse & ListDeletedFilesResponseNonNullableFields>;
2367
+ declare const onFileDescriptorUpdated$1: EventDefinition<FileDescriptorUpdatedEnvelope, "wix.media.site_media.v1.file_descriptor_updated">;
2368
+ declare const onFileDescriptorDeleted$1: EventDefinition<FileDescriptorDeletedEnvelope, "wix.media.site_media.v1.file_descriptor_deleted">;
2369
+ declare const onFileDescriptorFileReady$1: EventDefinition<FileDescriptorFileReadyEnvelope, "wix.media.site_media.v1.file_descriptor_file_ready">;
2370
+ declare const onFileDescriptorFileFailed$1: EventDefinition<FileDescriptorFileFailedEnvelope, "wix.media.site_media.v1.file_descriptor_file_failed">;
2371
+
2372
+ declare const generateFilesDownloadUrl: BuildRESTFunction<typeof generateFilesDownloadUrl$1>;
2373
+ declare const generateFileDownloadUrl: BuildRESTFunction<typeof generateFileDownloadUrl$1>;
2374
+ declare const getFileDescriptor: BuildRESTFunction<typeof getFileDescriptor$1>;
2375
+ declare const getFileDescriptors: BuildRESTFunction<typeof getFileDescriptors$1>;
2376
+ declare const updateFileDescriptor: BuildRESTFunction<typeof updateFileDescriptor$1>;
2377
+ declare const generateFileUploadUrl: BuildRESTFunction<typeof generateFileUploadUrl$1>;
2378
+ declare const generateFileResumableUploadUrl: BuildRESTFunction<typeof generateFileResumableUploadUrl$1>;
2379
+ declare const importFile: BuildRESTFunction<typeof importFile$1>;
2380
+ declare const bulkImportFiles: BuildRESTFunction<typeof bulkImportFiles$1>;
2381
+ declare const bulkImportFile: BuildRESTFunction<typeof bulkImportFile$1>;
2382
+ declare const listFiles: BuildRESTFunction<typeof listFiles$1>;
2383
+ declare const searchFiles: BuildRESTFunction<typeof searchFiles$1>;
2384
+ declare const generateVideoStreamingUrl: BuildRESTFunction<typeof generateVideoStreamingUrl$1>;
2385
+ declare const bulkDeleteFiles: BuildRESTFunction<typeof bulkDeleteFiles$1>;
2386
+ declare const bulkRestoreFilesFromTrashBin: BuildRESTFunction<typeof bulkRestoreFilesFromTrashBin$1>;
2387
+ declare const listDeletedFiles: BuildRESTFunction<typeof listDeletedFiles$1>;
2388
+ declare const onFileDescriptorUpdated: BuildEventDefinition<typeof onFileDescriptorUpdated$1>;
2389
+ declare const onFileDescriptorDeleted: BuildEventDefinition<typeof onFileDescriptorDeleted$1>;
2390
+ declare const onFileDescriptorFileReady: BuildEventDefinition<typeof onFileDescriptorFileReady$1>;
2391
+ declare const onFileDescriptorFileFailed: BuildEventDefinition<typeof onFileDescriptorFileFailed$1>;
2392
+
2393
+ declare const context$1_bulkDeleteFiles: typeof bulkDeleteFiles;
2394
+ declare const context$1_bulkImportFile: typeof bulkImportFile;
2395
+ declare const context$1_bulkImportFiles: typeof bulkImportFiles;
2396
+ declare const context$1_bulkRestoreFilesFromTrashBin: typeof bulkRestoreFilesFromTrashBin;
2397
+ declare const context$1_generateFileDownloadUrl: typeof generateFileDownloadUrl;
2398
+ declare const context$1_generateFileResumableUploadUrl: typeof generateFileResumableUploadUrl;
2399
+ declare const context$1_generateFileUploadUrl: typeof generateFileUploadUrl;
2400
+ declare const context$1_generateFilesDownloadUrl: typeof generateFilesDownloadUrl;
2401
+ declare const context$1_generateVideoStreamingUrl: typeof generateVideoStreamingUrl;
2402
+ declare const context$1_getFileDescriptor: typeof getFileDescriptor;
2403
+ declare const context$1_getFileDescriptors: typeof getFileDescriptors;
2404
+ declare const context$1_importFile: typeof importFile;
2405
+ declare const context$1_listDeletedFiles: typeof listDeletedFiles;
2406
+ declare const context$1_listFiles: typeof listFiles;
2407
+ declare const context$1_onFileDescriptorDeleted: typeof onFileDescriptorDeleted;
2408
+ declare const context$1_onFileDescriptorFileFailed: typeof onFileDescriptorFileFailed;
2409
+ declare const context$1_onFileDescriptorFileReady: typeof onFileDescriptorFileReady;
2410
+ declare const context$1_onFileDescriptorUpdated: typeof onFileDescriptorUpdated;
2411
+ declare const context$1_searchFiles: typeof searchFiles;
2412
+ declare const context$1_updateFileDescriptor: typeof updateFileDescriptor;
2413
+ declare namespace context$1 {
2414
+ export { context$1_bulkDeleteFiles as bulkDeleteFiles, context$1_bulkImportFile as bulkImportFile, context$1_bulkImportFiles as bulkImportFiles, context$1_bulkRestoreFilesFromTrashBin as bulkRestoreFilesFromTrashBin, context$1_generateFileDownloadUrl as generateFileDownloadUrl, context$1_generateFileResumableUploadUrl as generateFileResumableUploadUrl, context$1_generateFileUploadUrl as generateFileUploadUrl, context$1_generateFilesDownloadUrl as generateFilesDownloadUrl, context$1_generateVideoStreamingUrl as generateVideoStreamingUrl, context$1_getFileDescriptor as getFileDescriptor, context$1_getFileDescriptors as getFileDescriptors, context$1_importFile as importFile, context$1_listDeletedFiles as listDeletedFiles, context$1_listFiles as listFiles, context$1_onFileDescriptorDeleted as onFileDescriptorDeleted, context$1_onFileDescriptorFileFailed as onFileDescriptorFileFailed, context$1_onFileDescriptorFileReady as onFileDescriptorFileReady, context$1_onFileDescriptorUpdated as onFileDescriptorUpdated, context$1_searchFiles as searchFiles, context$1_updateFileDescriptor as updateFileDescriptor };
2415
+ }
2416
+
2417
+ interface Folder {
2418
+ /** Folder ID. Generated when a folder is created in the Media Manager. */
2419
+ _id?: string;
2420
+ /** Folder name as it appears in the Media Manager. */
2421
+ displayName?: string;
2422
+ /** ID of the folder's parent folder. <br /> Default: `media-root` folder. */
2423
+ parentFolderId?: string;
2424
+ /**
2425
+ * Date the folder was created.
2426
+ * @readonly
2427
+ */
2428
+ _createdDate?: Date;
2429
+ /**
2430
+ * Date the folder was updated.
2431
+ * @readonly
2432
+ */
2433
+ _updatedDate?: Date;
2434
+ /**
2435
+ * State of the folder.
2436
+ * @readonly
2437
+ */
2438
+ state?: State;
2439
+ }
2440
+ declare enum State {
2441
+ OK = "OK",
2442
+ DELETED = "DELETED"
2443
+ }
2444
+ interface CreateFolderResponse {
2445
+ /** Information about the newly created folder. */
2446
+ folder?: Folder;
2447
+ }
2448
+ interface Sorting {
2449
+ /** Name of the field to sort by. */
2450
+ fieldName?: string;
2451
+ /** Sort order. */
2452
+ order?: SortOrder;
2453
+ }
2454
+ declare enum SortOrder {
2455
+ ASC = "ASC",
2456
+ DESC = "DESC"
2457
+ }
2458
+ interface CursorPaging {
2459
+ /** Maximum number of items to return in the results. */
2460
+ limit?: number | null;
2461
+ /**
2462
+ * Pointer to the next or previous page in the list of results.
2463
+ *
2464
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
2465
+ * Not relevant for the first request.
2466
+ */
2467
+ cursor?: string | null;
2468
+ }
2469
+ interface ListFoldersResponse {
2470
+ /** Information about the folders in the requested folder. */
2471
+ folders?: Folder[];
2472
+ /** The next cursor if it exists. */
2473
+ nextCursor?: PagingMetadataV2;
2474
+ }
2475
+ interface PagingMetadataV2 {
2476
+ /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
2477
+ total?: number | null;
2478
+ /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
2479
+ cursors?: Cursors;
2480
+ }
2481
+ interface Cursors {
2482
+ /** Cursor string pointing to the next page in the list of results. */
2483
+ next?: string | null;
2484
+ }
2485
+ declare enum RootFolder {
2486
+ /** Root of all site media */
2487
+ MEDIA_ROOT = "MEDIA_ROOT",
2488
+ /** Root of the trash system folder */
2489
+ TRASH_ROOT = "TRASH_ROOT",
2490
+ /** Root of all visitor uploads */
2491
+ VISITOR_UPLOADS_ROOT = "VISITOR_UPLOADS_ROOT"
2492
+ }
2493
+ interface SearchFoldersResponse {
2494
+ /** Information about the folders in the requested folder. */
2495
+ folders?: Folder[];
2496
+ /** The next cursor if it exists. */
2497
+ nextCursor?: PagingMetadataV2;
2498
+ }
2499
+ interface GenerateFolderDownloadUrlResponse {
2500
+ /** URL for downloading a specific folder in the Media Manager. */
2501
+ downloadUrl?: string;
2502
+ }
2503
+ interface ListDeletedFoldersResponse {
2504
+ /** List of folders in the Media Manager's trash bin. */
2505
+ folders?: Folder[];
2506
+ /** The next cursor if it exists. */
2507
+ nextCursor?: PagingMetadataV2;
2508
+ }
2509
+ interface IdentificationData extends IdentificationDataIdOneOf {
2510
+ /** ID of a site visitor that has not logged in to the site. */
2511
+ anonymousVisitorId?: string;
2512
+ /** ID of a site visitor that has logged in to the site. */
2513
+ memberId?: string;
2514
+ /** ID of a Wix user (site owner, contributor, etc.). */
2515
+ wixUserId?: string;
2516
+ /** ID of an app. */
2517
+ appId?: string;
2518
+ /** @readonly */
2519
+ identityType?: WebhookIdentityType;
2520
+ }
2521
+ /** @oneof */
2522
+ interface IdentificationDataIdOneOf {
2523
+ /** ID of a site visitor that has not logged in to the site. */
2524
+ anonymousVisitorId?: string;
2525
+ /** ID of a site visitor that has logged in to the site. */
2526
+ memberId?: string;
2527
+ /** ID of a Wix user (site owner, contributor, etc.). */
2528
+ wixUserId?: string;
2529
+ /** ID of an app. */
2530
+ appId?: string;
2531
+ }
2532
+ declare enum WebhookIdentityType {
2533
+ UNKNOWN = "UNKNOWN",
2534
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
2535
+ MEMBER = "MEMBER",
2536
+ WIX_USER = "WIX_USER",
2537
+ APP = "APP"
2538
+ }
2539
+ interface CreateFolderResponseNonNullableFields {
2540
+ folder?: {
2541
+ _id: string;
2542
+ displayName: string;
2543
+ parentFolderId: string;
2544
+ state: State;
2545
+ };
2546
+ }
2547
+ interface ListFoldersResponseNonNullableFields {
2548
+ folders: {
2549
+ _id: string;
2550
+ displayName: string;
2551
+ parentFolderId: string;
2552
+ state: State;
2553
+ }[];
2554
+ }
2555
+ interface SearchFoldersResponseNonNullableFields {
2556
+ folders: {
2557
+ _id: string;
2558
+ displayName: string;
2559
+ parentFolderId: string;
2560
+ state: State;
2561
+ }[];
2562
+ }
2563
+ interface GenerateFolderDownloadUrlResponseNonNullableFields {
2564
+ downloadUrl: string;
2565
+ }
2566
+ interface ListDeletedFoldersResponseNonNullableFields {
2567
+ folders: {
2568
+ _id: string;
2569
+ displayName: string;
2570
+ parentFolderId: string;
2571
+ state: State;
2572
+ }[];
2573
+ }
2574
+ interface BaseEventMetadata {
2575
+ /** App instance ID. */
2576
+ instanceId?: string | null;
2577
+ /** Event type. */
2578
+ eventType?: string;
2579
+ /** The identification type and identity data. */
2580
+ identity?: IdentificationData;
2581
+ }
2582
+ interface EventMetadata extends BaseEventMetadata {
2583
+ /**
2584
+ * Unique event ID.
2585
+ * Allows clients to ignore duplicate webhooks.
2586
+ */
2587
+ _id?: string;
2588
+ /**
2589
+ * Assumes actions are also always typed to an entity_type
2590
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
2591
+ */
2592
+ entityFqdn?: string;
2593
+ /**
2594
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
2595
+ * This is although the created/updated/deleted notion is duplication of the oneof types
2596
+ * Example: created/updated/deleted/started/completed/email_opened
2597
+ */
2598
+ slug?: string;
2599
+ /** ID of the entity associated with the event. */
2600
+ entityId?: string;
2601
+ /** Event timestamp. */
2602
+ eventTime?: Date;
2603
+ /**
2604
+ * Whether the event was triggered as a result of a privacy regulation application
2605
+ * (for example, GDPR).
2606
+ */
2607
+ triggeredByAnonymizeRequest?: boolean | null;
2608
+ /** If present, indicates the action that triggered the event. */
2609
+ originatedFrom?: string | null;
2610
+ /**
2611
+ * A sequence number defining the order of updates to the underlying entity.
2612
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
2613
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
2614
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
2615
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
2616
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
2617
+ */
2618
+ entityEventSequence?: string | null;
2619
+ }
2620
+ interface FolderCreatedEnvelope {
2621
+ entity: Folder;
2622
+ metadata: EventMetadata;
2623
+ }
2624
+ interface FolderUpdatedEnvelope {
2625
+ entity: Folder;
2626
+ metadata: EventMetadata;
2627
+ }
2628
+ interface FolderDeletedEnvelope {
2629
+ metadata: EventMetadata;
2630
+ }
2631
+ interface CreateFolderOptions {
2632
+ /** ID of the folder's parent folder. */
2633
+ parentFolderId?: string | null;
2634
+ }
2635
+ interface ListFoldersOptions {
2636
+ /**
2637
+ * ID of the folder's parent folder.
2638
+ * <br /> Default: `media-root` folder.
2639
+ */
2640
+ parentFolderId?: string | null;
2641
+ /**
2642
+ * Field name and order to sort by. One of:
2643
+ * - `displayName`
2644
+ * - `_updatedDate`
2645
+ *
2646
+ * Default: `_updatedDate` in `"DESC"` order.
2647
+ */
2648
+ sort?: Sorting;
2649
+ /** Cursor and paging information. */
2650
+ paging?: CursorPaging;
2651
+ }
2652
+ interface SearchFoldersOptions {
2653
+ /**
2654
+ * A root folder in the media manager to search in. <br />
2655
+ * Default: `MEDIA_ROOT`.
2656
+ */
2657
+ rootFolder?: RootFolder;
2658
+ /**
2659
+ * Field name and order to sort by. One of:
2660
+ * - `displayName`
2661
+ * - `_updatedDate`
2662
+ *
2663
+ * Default: `_updatedDate` in `"DESC"` order.
2664
+ */
2665
+ sort?: Sorting;
2666
+ /** Cursor and paging information. */
2667
+ paging?: CursorPaging;
2668
+ /**
2669
+ * Term to search for, such as the value of a folder's `displayName`.
2670
+ *
2671
+ * For example, if a folder's `displayName` is 'my-videos-folder', the search term is `'my-videos-folder'`.
2672
+ */
2673
+ search?: string | null;
2674
+ }
2675
+ interface UpdateFolder {
2676
+ /** Folder ID. Generated when a folder is created in the Media Manager. */
2677
+ _id?: string;
2678
+ /** Folder name as it appears in the Media Manager. */
2679
+ displayName?: string;
2680
+ /** ID of the folder's parent folder. <br /> Default: `media-root` folder. */
2681
+ parentFolderId?: string;
2682
+ /**
2683
+ * Date the folder was created.
2684
+ * @readonly
2685
+ */
2686
+ _createdDate?: Date;
2687
+ /**
2688
+ * Date the folder was updated.
2689
+ * @readonly
2690
+ */
2691
+ _updatedDate?: Date;
2692
+ /**
2693
+ * State of the folder.
2694
+ * @readonly
2695
+ */
2696
+ state?: State;
2697
+ }
2698
+ interface BulkDeleteFoldersOptions {
2699
+ /**
2700
+ * Whether the specified folders are permanently deleted. <br />
2701
+ * Default: `false`
2702
+ */
2703
+ permanent?: boolean;
2704
+ }
2705
+ interface ListDeletedFoldersOptions {
2706
+ /** ID of the folder's parent folder. */
2707
+ parentFolderId?: string | null;
2708
+ /**
2709
+ * Field name and order to sort by. One of:
2710
+ * - `displayName`
2711
+ * - `_updatedDate`
2712
+ *
2713
+ * Default: `_updatedDate` in `"DESC"` order.
2714
+ */
2715
+ sort?: Sorting;
2716
+ /** Cursor and paging information. */
2717
+ paging?: CursorPaging;
2718
+ }
2719
+
2720
+ declare function createFolder$1(httpClient: HttpClient): (displayName: string, options?: CreateFolderOptions) => Promise<CreateFolderResponse & CreateFolderResponseNonNullableFields>;
2721
+ declare function getFolder$1(httpClient: HttpClient): (folderId: string) => Promise<Folder & {
2722
+ _id: string;
2723
+ displayName: string;
2724
+ parentFolderId: string;
2725
+ state: State;
2726
+ }>;
2727
+ declare function listFolders$1(httpClient: HttpClient): (options?: ListFoldersOptions) => Promise<ListFoldersResponse & ListFoldersResponseNonNullableFields>;
2728
+ declare function searchFolders$1(httpClient: HttpClient): (options?: SearchFoldersOptions) => Promise<SearchFoldersResponse & SearchFoldersResponseNonNullableFields>;
2729
+ declare function updateFolder$1(httpClient: HttpClient): (_id: string, folder: UpdateFolder) => Promise<Folder & {
2730
+ _id: string;
2731
+ displayName: string;
2732
+ parentFolderId: string;
2733
+ state: State;
2734
+ }>;
2735
+ declare function generateFolderDownloadUrl$1(httpClient: HttpClient): (folderId: string) => Promise<GenerateFolderDownloadUrlResponse & GenerateFolderDownloadUrlResponseNonNullableFields>;
2736
+ declare function bulkDeleteFolders$1(httpClient: HttpClient): (folderIds: string[], options?: BulkDeleteFoldersOptions) => Promise<void>;
2737
+ declare function bulkRestoreFoldersFromTrashBin$1(httpClient: HttpClient): (folderIds: string[]) => Promise<void>;
2738
+ declare function listDeletedFolders$1(httpClient: HttpClient): (options?: ListDeletedFoldersOptions) => Promise<ListDeletedFoldersResponse & ListDeletedFoldersResponseNonNullableFields>;
2739
+ declare const onFolderCreated$1: EventDefinition<FolderCreatedEnvelope, "wix.media.site_media.v1.folder_created">;
2740
+ declare const onFolderUpdated$1: EventDefinition<FolderUpdatedEnvelope, "wix.media.site_media.v1.folder_updated">;
2741
+ declare const onFolderDeleted$1: EventDefinition<FolderDeletedEnvelope, "wix.media.site_media.v1.folder_deleted">;
2742
+
2743
+ declare const createFolder: BuildRESTFunction<typeof createFolder$1>;
2744
+ declare const getFolder: BuildRESTFunction<typeof getFolder$1>;
2745
+ declare const listFolders: BuildRESTFunction<typeof listFolders$1>;
2746
+ declare const searchFolders: BuildRESTFunction<typeof searchFolders$1>;
2747
+ declare const updateFolder: BuildRESTFunction<typeof updateFolder$1>;
2748
+ declare const generateFolderDownloadUrl: BuildRESTFunction<typeof generateFolderDownloadUrl$1>;
2749
+ declare const bulkDeleteFolders: BuildRESTFunction<typeof bulkDeleteFolders$1>;
2750
+ declare const bulkRestoreFoldersFromTrashBin: BuildRESTFunction<typeof bulkRestoreFoldersFromTrashBin$1>;
2751
+ declare const listDeletedFolders: BuildRESTFunction<typeof listDeletedFolders$1>;
2752
+ declare const onFolderCreated: BuildEventDefinition<typeof onFolderCreated$1>;
2753
+ declare const onFolderUpdated: BuildEventDefinition<typeof onFolderUpdated$1>;
2754
+ declare const onFolderDeleted: BuildEventDefinition<typeof onFolderDeleted$1>;
2755
+
2756
+ declare const context_bulkDeleteFolders: typeof bulkDeleteFolders;
2757
+ declare const context_bulkRestoreFoldersFromTrashBin: typeof bulkRestoreFoldersFromTrashBin;
2758
+ declare const context_createFolder: typeof createFolder;
2759
+ declare const context_generateFolderDownloadUrl: typeof generateFolderDownloadUrl;
2760
+ declare const context_getFolder: typeof getFolder;
2761
+ declare const context_listDeletedFolders: typeof listDeletedFolders;
2762
+ declare const context_listFolders: typeof listFolders;
2763
+ declare const context_onFolderCreated: typeof onFolderCreated;
2764
+ declare const context_onFolderDeleted: typeof onFolderDeleted;
2765
+ declare const context_onFolderUpdated: typeof onFolderUpdated;
2766
+ declare const context_searchFolders: typeof searchFolders;
2767
+ declare const context_updateFolder: typeof updateFolder;
2768
+ declare namespace context {
2769
+ export { context_bulkDeleteFolders as bulkDeleteFolders, context_bulkRestoreFoldersFromTrashBin as bulkRestoreFoldersFromTrashBin, context_createFolder as createFolder, context_generateFolderDownloadUrl as generateFolderDownloadUrl, context_getFolder as getFolder, context_listDeletedFolders as listDeletedFolders, context_listFolders as listFolders, context_onFolderCreated as onFolderCreated, context_onFolderDeleted as onFolderDeleted, context_onFolderUpdated as onFolderUpdated, context_searchFolders as searchFolders, context_updateFolder as updateFolder };
2770
+ }
2771
+
2772
+ export { context$3 as enterpriseMediaCategories, context$2 as enterpriseMediaItems, context$1 as files, context as folders };