@wix/media 1.0.110 → 1.0.111

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.
@@ -1,3 +1,47 @@
1
+ type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
2
+ interface HttpClient {
3
+ request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
4
+ fetchWithAuth: typeof fetch;
5
+ wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
6
+ }
7
+ type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
8
+ type HttpResponse<T = any> = {
9
+ data: T;
10
+ status: number;
11
+ statusText: string;
12
+ headers: any;
13
+ request?: any;
14
+ };
15
+ type RequestOptions<_TResponse = any, Data = any> = {
16
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
17
+ url: string;
18
+ data?: Data;
19
+ params?: URLSearchParams;
20
+ } & APIMetadata;
21
+ type APIMetadata = {
22
+ methodFqn?: string;
23
+ entityFqdn?: string;
24
+ packageName?: string;
25
+ };
26
+ type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
27
+ type EventDefinition<Payload = unknown, Type extends string = string> = {
28
+ __type: 'event-definition';
29
+ type: Type;
30
+ isDomainEvent?: boolean;
31
+ transformations?: (envelope: unknown) => Payload;
32
+ __payload: Payload;
33
+ };
34
+ declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
35
+ type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
36
+ type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
37
+
38
+ declare global {
39
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
40
+ interface SymbolConstructor {
41
+ readonly observable: symbol;
42
+ }
43
+ }
44
+
1
45
  interface EnterpriseCategory {
2
46
  /**
3
47
  * Id of the category
@@ -336,56 +380,57 @@ interface EnterpriseOnboardingOptions {
336
380
  accountName?: string;
337
381
  }
338
382
 
339
- type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
340
- interface HttpClient {
341
- request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
342
- fetchWithAuth: typeof fetch;
343
- wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
383
+ declare function createCategory$1(httpClient: HttpClient): CreateCategorySignature;
384
+ interface CreateCategorySignature {
385
+ /**
386
+ * Fetch a list of random media from different providers, using site information to customize results when available
387
+ * @param - The category object that will be created
388
+ * @returns A list of items matching the request
389
+ */
390
+ (category: EnterpriseCategory): Promise<EnterpriseCategory & EnterpriseCategoryNonNullableFields>;
344
391
  }
345
- type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
346
- type HttpResponse<T = any> = {
347
- data: T;
348
- status: number;
349
- statusText: string;
350
- headers: any;
351
- request?: any;
352
- };
353
- type RequestOptions<_TResponse = any, Data = any> = {
354
- method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
355
- url: string;
356
- data?: Data;
357
- params?: URLSearchParams;
358
- } & APIMetadata;
359
- type APIMetadata = {
360
- methodFqn?: string;
361
- entityFqdn?: string;
362
- packageName?: string;
363
- };
364
- type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
365
- type EventDefinition<Payload = unknown, Type extends string = string> = {
366
- __type: 'event-definition';
367
- type: Type;
368
- isDomainEvent?: boolean;
369
- transformations?: (envelope: unknown) => Payload;
370
- __payload: Payload;
371
- };
372
- declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
373
- type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
374
- type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
375
-
376
- declare global {
377
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
378
- interface SymbolConstructor {
379
- readonly observable: symbol;
380
- }
392
+ declare function deleteCategory$1(httpClient: HttpClient): DeleteCategorySignature;
393
+ interface DeleteCategorySignature {
394
+ /**
395
+ * Delete a category including all its subcategories - but not the items
396
+ * @param - Category id
397
+ */
398
+ (categoryId: string): Promise<void>;
399
+ }
400
+ declare function updateCategory$1(httpClient: HttpClient): UpdateCategorySignature;
401
+ interface UpdateCategorySignature {
402
+ /**
403
+ * Update category details
404
+ * @param - Id of the category
405
+ * @returns The updated category
406
+ */
407
+ (_id: string, category: UpdateCategory): Promise<EnterpriseCategory & EnterpriseCategoryNonNullableFields>;
408
+ }
409
+ declare function getCategory$1(httpClient: HttpClient): GetCategorySignature;
410
+ interface GetCategorySignature {
411
+ /**
412
+ * Get information about a specific category
413
+ * @param - Category id
414
+ * @returns The category details
415
+ */
416
+ (categoryId: string, options?: GetCategoryOptions | undefined): Promise<EnterpriseCategoryTree & EnterpriseCategoryTreeNonNullableFields>;
417
+ }
418
+ declare function enterpriseOnboarding$1(httpClient: HttpClient): EnterpriseOnboardingSignature;
419
+ interface EnterpriseOnboardingSignature {
420
+ /**
421
+ * Create the enterprise category under "enterprise-media" main category
422
+ * the caller identity must be have the same accountId of the request
423
+ * @param - The account id of the organization - will be used as the organization category id
424
+ */
425
+ (accountId: string, options?: EnterpriseOnboardingOptions | undefined): Promise<EnterpriseOnboardingResponse & EnterpriseOnboardingResponseNonNullableFields>;
426
+ }
427
+ declare function getMediaManagerCategories$1(httpClient: HttpClient): GetMediaManagerCategoriesSignature;
428
+ interface GetMediaManagerCategoriesSignature {
429
+ /**
430
+ * Get the account category tree details
431
+ */
432
+ (): Promise<GetMediaManagerCategoriesResponse & GetMediaManagerCategoriesResponseNonNullableFields>;
381
433
  }
382
-
383
- declare function createCategory$1(httpClient: HttpClient): (category: EnterpriseCategory) => Promise<EnterpriseCategory & EnterpriseCategoryNonNullableFields>;
384
- declare function deleteCategory$1(httpClient: HttpClient): (categoryId: string) => Promise<void>;
385
- declare function updateCategory$1(httpClient: HttpClient): (_id: string, category: UpdateCategory) => Promise<EnterpriseCategory & EnterpriseCategoryNonNullableFields>;
386
- declare function getCategory$1(httpClient: HttpClient): (categoryId: string, options?: GetCategoryOptions) => Promise<EnterpriseCategoryTree & EnterpriseCategoryTreeNonNullableFields>;
387
- declare function enterpriseOnboarding$1(httpClient: HttpClient): (accountId: string, options?: EnterpriseOnboardingOptions) => Promise<EnterpriseOnboardingResponse & EnterpriseOnboardingResponseNonNullableFields>;
388
- declare function getMediaManagerCategories$1(httpClient: HttpClient): () => Promise<GetMediaManagerCategoriesResponse & GetMediaManagerCategoriesResponseNonNullableFields>;
389
434
  declare const onEnterpriseCategoryCreated$1: EventDefinition<EnterpriseCategoryCreatedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_category_created">;
390
435
  declare const onEnterpriseCategoryDeleted$1: EventDefinition<EnterpriseCategoryDeletedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_category_deleted">;
391
436
  declare const onEnterpriseCategoryUpdated$1: EventDefinition<EnterpriseCategoryUpdatedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_category_updated">;
@@ -408,12 +453,15 @@ type _publicGetMediaManagerCategoriesType = typeof getMediaManagerCategories$1;
408
453
  declare const getMediaManagerCategories: ReturnType<typeof createRESTModule$3<_publicGetMediaManagerCategoriesType>>;
409
454
 
410
455
  type _publicOnEnterpriseCategoryCreatedType = typeof onEnterpriseCategoryCreated$1;
456
+ /** */
411
457
  declare const onEnterpriseCategoryCreated: ReturnType<typeof createEventModule$3<_publicOnEnterpriseCategoryCreatedType>>;
412
458
 
413
459
  type _publicOnEnterpriseCategoryDeletedType = typeof onEnterpriseCategoryDeleted$1;
460
+ /** */
414
461
  declare const onEnterpriseCategoryDeleted: ReturnType<typeof createEventModule$3<_publicOnEnterpriseCategoryDeletedType>>;
415
462
 
416
463
  type _publicOnEnterpriseCategoryUpdatedType = typeof onEnterpriseCategoryUpdated$1;
464
+ /** */
417
465
  declare const onEnterpriseCategoryUpdated: ReturnType<typeof createEventModule$3<_publicOnEnterpriseCategoryUpdatedType>>;
418
466
 
419
467
  type index_d$3_CreateCategoryRequest = CreateCategoryRequest;
@@ -1296,17 +1344,94 @@ interface OverwriteItemCategoriesOptions {
1296
1344
  categoryIds?: string[];
1297
1345
  }
1298
1346
 
1299
- declare function itemUploadCallback$1(httpClient: HttpClient): (options?: ItemUploadCallbackOptions) => Promise<void>;
1300
- declare function generateFileUploadUrl$3(httpClient: HttpClient): (options?: GenerateFileUploadUrlOptions$1) => Promise<GenerateFileUploadUrlResponse$1 & GenerateFileUploadUrlResponseNonNullableFields$1>;
1301
- declare function importFile$3(httpClient: HttpClient): (url: string, options?: ImportFileOptions$1) => Promise<ImportFileResponse$1 & ImportFileResponseNonNullableFields$1>;
1302
- declare function searchItems$1(httpClient: HttpClient): (options?: SearchItemsOptions) => Promise<SearchItemsResponse & SearchItemsResponseNonNullableFields>;
1303
- declare function queryItems$1(httpClient: HttpClient): () => ItemsQueryBuilder;
1304
- declare function updateItem$1(httpClient: HttpClient): (_id: string, item: UpdateItem) => Promise<EnterpriseMediaItem & EnterpriseMediaItemNonNullableFields>;
1305
- declare function bulkUpdateItem$1(httpClient: HttpClient): (updateItemRequests: UpdateItemRequest[], options?: BulkUpdateItemOptions) => Promise<BulkUpdateItemResponse & BulkUpdateItemResponseNonNullableFields>;
1306
- declare function getItem$1(httpClient: HttpClient): (itemId: string) => Promise<EnterpriseMediaItem & EnterpriseMediaItemNonNullableFields>;
1307
- declare function linkItemToCategories$1(httpClient: HttpClient): (itemId: string, options?: LinkItemToCategoriesOptions) => Promise<LinkItemToCategoriesResponse>;
1308
- declare function unlinkItemFromCategories$1(httpClient: HttpClient): (itemId: string, options?: UnlinkItemFromCategoriesOptions) => Promise<UnlinkItemFromCategoriesResponse>;
1309
- declare function overwriteItemCategories$1(httpClient: HttpClient): (itemId: string, options?: OverwriteItemCategoriesOptions) => Promise<OverwriteItemCategoriesResponse>;
1347
+ declare function itemUploadCallback$1(httpClient: HttpClient): ItemUploadCallbackSignature;
1348
+ interface ItemUploadCallbackSignature {
1349
+ /**
1350
+ * Internal API called by the public media backend, notify about a file that was created enterprise public media server
1351
+ */
1352
+ (options?: ItemUploadCallbackOptions | undefined): Promise<void>;
1353
+ }
1354
+ declare function generateFileUploadUrl$3(httpClient: HttpClient): GenerateFileUploadUrlSignature$1;
1355
+ interface GenerateFileUploadUrlSignature$1 {
1356
+ /**
1357
+ * Generate an upload url that will make public media to call the enterprise callback endpoint
1358
+ */
1359
+ (options?: GenerateFileUploadUrlOptions$1 | undefined): Promise<GenerateFileUploadUrlResponse$1 & GenerateFileUploadUrlResponseNonNullableFields$1>;
1360
+ }
1361
+ declare function importFile$3(httpClient: HttpClient): ImportFileSignature$1;
1362
+ interface ImportFileSignature$1 {
1363
+ /**
1364
+ * Import a file using a url
1365
+ * @param - The url to the file to be imported
1366
+ */
1367
+ (url: string, options?: ImportFileOptions$1 | undefined): Promise<ImportFileResponse$1 & ImportFileResponseNonNullableFields$1>;
1368
+ }
1369
+ declare function searchItems$1(httpClient: HttpClient): SearchItemsSignature;
1370
+ interface SearchItemsSignature {
1371
+ /**
1372
+ * Search items, all filters only support equality
1373
+ * Each query must contain a categoryId filter
1374
+ */
1375
+ (options?: SearchItemsOptions | undefined): Promise<SearchItemsResponse & SearchItemsResponseNonNullableFields>;
1376
+ }
1377
+ declare function queryItems$1(httpClient: HttpClient): QueryItemsSignature;
1378
+ interface QueryItemsSignature {
1379
+ /**
1380
+ * Query items allowing to sort by specified fields, all filters only support equality
1381
+ * Each query must contain a categoryId filter
1382
+ */
1383
+ (): ItemsQueryBuilder;
1384
+ }
1385
+ declare function updateItem$1(httpClient: HttpClient): UpdateItemSignature;
1386
+ interface UpdateItemSignature {
1387
+ /**
1388
+ * Update an item
1389
+ * @param - Id of the item in public media
1390
+ * @returns Updated item info
1391
+ */
1392
+ (_id: string, item: UpdateItem): Promise<EnterpriseMediaItem & EnterpriseMediaItemNonNullableFields>;
1393
+ }
1394
+ declare function bulkUpdateItem$1(httpClient: HttpClient): BulkUpdateItemSignature;
1395
+ interface BulkUpdateItemSignature {
1396
+ /**
1397
+ * Bulk update an item
1398
+ * @param - Requests to update individual item
1399
+ */
1400
+ (updateItemRequests: UpdateItemRequest[], options?: BulkUpdateItemOptions | undefined): Promise<BulkUpdateItemResponse & BulkUpdateItemResponseNonNullableFields>;
1401
+ }
1402
+ declare function getItem$1(httpClient: HttpClient): GetItemSignature;
1403
+ interface GetItemSignature {
1404
+ /**
1405
+ * Get item details
1406
+ * @param - Item id
1407
+ * @returns item info
1408
+ */
1409
+ (itemId: string): Promise<EnterpriseMediaItem & EnterpriseMediaItemNonNullableFields>;
1410
+ }
1411
+ declare function linkItemToCategories$1(httpClient: HttpClient): LinkItemToCategoriesSignature;
1412
+ interface LinkItemToCategoriesSignature {
1413
+ /**
1414
+ * Link the item to multiple categories
1415
+ * @param - The item id
1416
+ */
1417
+ (itemId: string, options?: LinkItemToCategoriesOptions | undefined): Promise<LinkItemToCategoriesResponse>;
1418
+ }
1419
+ declare function unlinkItemFromCategories$1(httpClient: HttpClient): UnlinkItemFromCategoriesSignature;
1420
+ interface UnlinkItemFromCategoriesSignature {
1421
+ /**
1422
+ * Unlink the item from multiple categories
1423
+ * @param - The item id
1424
+ */
1425
+ (itemId: string, options?: UnlinkItemFromCategoriesOptions | undefined): Promise<UnlinkItemFromCategoriesResponse>;
1426
+ }
1427
+ declare function overwriteItemCategories$1(httpClient: HttpClient): OverwriteItemCategoriesSignature;
1428
+ interface OverwriteItemCategoriesSignature {
1429
+ /**
1430
+ * Overwrite item categories
1431
+ * @param - The item id
1432
+ */
1433
+ (itemId: string, options?: OverwriteItemCategoriesOptions | undefined): Promise<OverwriteItemCategoriesResponse>;
1434
+ }
1310
1435
  declare const onEnterpriseItemCreated$1: EventDefinition<EnterpriseItemCreatedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_item_created">;
1311
1436
  declare const onEnterpriseItemUpdated$1: EventDefinition<EnterpriseItemUpdatedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_item_updated">;
1312
1437
  declare const onEnterpriseItemItemCategoriesChanged$1: EventDefinition<EnterpriseItemItemCategoriesChangedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_item_item_categories_changed">;
@@ -1340,15 +1465,27 @@ type _publicOverwriteItemCategoriesType = typeof overwriteItemCategories$1;
1340
1465
  declare const overwriteItemCategories: ReturnType<typeof createRESTModule$2<_publicOverwriteItemCategoriesType>>;
1341
1466
 
1342
1467
  type _publicOnEnterpriseItemCreatedType = typeof onEnterpriseItemCreated$1;
1468
+ /**
1469
+ * Triggered when an item is created.
1470
+ */
1343
1471
  declare const onEnterpriseItemCreated: ReturnType<typeof createEventModule$2<_publicOnEnterpriseItemCreatedType>>;
1344
1472
 
1345
1473
  type _publicOnEnterpriseItemUpdatedType = typeof onEnterpriseItemUpdated$1;
1474
+ /**
1475
+ * Triggered when an item is updated, including when an item is archived or linked to a category
1476
+ */
1346
1477
  declare const onEnterpriseItemUpdated: ReturnType<typeof createEventModule$2<_publicOnEnterpriseItemUpdatedType>>;
1347
1478
 
1348
1479
  type _publicOnEnterpriseItemItemCategoriesChangedType = typeof onEnterpriseItemItemCategoriesChanged$1;
1480
+ /**
1481
+ * Triggered when an is linked to a category or unlinked from a category
1482
+ */
1349
1483
  declare const onEnterpriseItemItemCategoriesChanged: ReturnType<typeof createEventModule$2<_publicOnEnterpriseItemItemCategoriesChangedType>>;
1350
1484
 
1351
1485
  type _publicOnEnterpriseItemPublishStatusChangedType = typeof onEnterpriseItemPublishStatusChanged$1;
1486
+ /**
1487
+ * Triggered when an item is Published or Unpublished
1488
+ */
1352
1489
  declare const onEnterpriseItemPublishStatusChanged: ReturnType<typeof createEventModule$2<_publicOnEnterpriseItemPublishStatusChangedType>>;
1353
1490
 
1354
1491
  type index_d$2_BulkItemUpdateResult = BulkItemUpdateResult;
@@ -2816,22 +2953,294 @@ interface ListDeletedFilesOptions {
2816
2953
  paging?: CursorPaging$1;
2817
2954
  }
2818
2955
 
2819
- declare function generateFilesDownloadUrl$1(httpClient: HttpClient): (fileIds: string[]) => Promise<GenerateFilesDownloadUrlResponse & GenerateFilesDownloadUrlResponseNonNullableFields>;
2820
- declare function generateFileDownloadUrl$1(httpClient: HttpClient): (fileId: string, options?: GenerateFileDownloadUrlOptions) => Promise<GenerateFileDownloadUrlResponse & GenerateFileDownloadUrlResponseNonNullableFields>;
2821
- declare function getFileDescriptor$1(httpClient: HttpClient): (fileId: string) => Promise<FileDescriptor & FileDescriptorNonNullableFields>;
2822
- declare function getFileDescriptors$1(httpClient: HttpClient): (fileIds: string[]) => Promise<GetFileDescriptorsResponse & GetFileDescriptorsResponseNonNullableFields>;
2823
- declare function updateFileDescriptor$1(httpClient: HttpClient): (file: FileDescriptor) => Promise<FileDescriptor & FileDescriptorNonNullableFields>;
2824
- declare function generateFileUploadUrl$1(httpClient: HttpClient): (mimeType: string | null, options?: GenerateFileUploadUrlOptions) => Promise<GenerateFileUploadUrlResponse & GenerateFileUploadUrlResponseNonNullableFields>;
2825
- declare function generateFileResumableUploadUrl$1(httpClient: HttpClient): (mimeType: string | null, options?: GenerateFileResumableUploadUrlOptions) => Promise<GenerateFileResumableUploadUrlResponse & GenerateFileResumableUploadUrlResponseNonNullableFields>;
2826
- declare function importFile$1(httpClient: HttpClient): (url: string, options?: ImportFileOptions) => Promise<ImportFileResponse & ImportFileResponseNonNullableFields>;
2827
- declare function bulkImportFiles$1(httpClient: HttpClient): (importFileRequests: ImportFileRequest[]) => Promise<BulkImportFilesResponse & BulkImportFilesResponseNonNullableFields>;
2828
- declare function bulkImportFile$1(httpClient: HttpClient): (importFileRequests: ImportFileRequest[], options?: BulkImportFileOptions) => Promise<BulkImportFileResponse & BulkImportFileResponseNonNullableFields>;
2829
- declare function listFiles$1(httpClient: HttpClient): (options?: ListFilesOptions) => Promise<ListFilesResponse & ListFilesResponseNonNullableFields>;
2830
- declare function searchFiles$1(httpClient: HttpClient): (options?: SearchFilesOptions) => Promise<SearchFilesResponse & SearchFilesResponseNonNullableFields>;
2831
- declare function generateVideoStreamingUrl$1(httpClient: HttpClient): (fileId: string, options?: GenerateVideoStreamingUrlOptions) => Promise<GenerateVideoStreamingUrlResponse & GenerateVideoStreamingUrlResponseNonNullableFields>;
2832
- declare function bulkDeleteFiles$1(httpClient: HttpClient): (fileIds: string[], options?: BulkDeleteFilesOptions) => Promise<void>;
2833
- declare function bulkRestoreFilesFromTrashBin$1(httpClient: HttpClient): (fileIds: string[]) => Promise<void>;
2834
- declare function listDeletedFiles$1(httpClient: HttpClient): (options?: ListDeletedFilesOptions) => Promise<ListDeletedFilesResponse & ListDeletedFilesResponseNonNullableFields>;
2956
+ declare function generateFilesDownloadUrl$1(httpClient: HttpClient): GenerateFilesDownloadUrlSignature;
2957
+ interface GenerateFilesDownloadUrlSignature {
2958
+ /**
2959
+ * Generates a URL for downloading a compressed file containing specific files in the Media Manager.
2960
+ *
2961
+ * The `generateFilesDownloadUrl()` function returns a Promise that resolves to a download URL.
2962
+ *
2963
+ * The compressed file can contain up to 1000 files.
2964
+ *
2965
+ * To generate one or more temporary URLs for downloading a specific file in the Media Manager, use the `generateFileDownloadUrl()` function.
2966
+ * You can use the `expirationInMinutes` parameter to set the URL expiration time, making it more secure than the `generateFilesDownloadUrl()` function.
2967
+ * Therefore, to download private files, use the `generateFileDownloadUrl` function for each private file that you want to generate a download URL for.
2968
+ * @param - IDs of the files to download.
2969
+ *
2970
+ * You can also pass the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`.
2971
+ * Learn more in the File and Folder IDs article.
2972
+ */
2973
+ (fileIds: string[]): Promise<GenerateFilesDownloadUrlResponse & GenerateFilesDownloadUrlResponseNonNullableFields>;
2974
+ }
2975
+ declare function generateFileDownloadUrl$1(httpClient: HttpClient): GenerateFileDownloadUrlSignature;
2976
+ interface GenerateFileDownloadUrlSignature {
2977
+ /**
2978
+ * Generates one or more temporary URLs for downloading a specific file in the Media Manager.
2979
+ *
2980
+ * The `generateFileDownloadUrl()` function returns a Promise that resolves to an array containing download URLs for the assets specified in the options parameter.
2981
+ *
2982
+ * To download different assets of the file, use the `assetKeys` parameter which generates a download URL for each asset.
2983
+ * If no asset key is specified, it defaults to `src`, which generates one download URL in the original file's format and quality.
2984
+ *
2985
+ * Use this function to grant external clients access to a private media file. Use the `expirationInMinutes` parameter to set the URL expiration time, and the `expirationRedirectUrl` parameter to add a redirect URL when the URL expires.
2986
+ *
2987
+ * To generate a permanent URL for downloading a compressed file that contains multiple files in the Media Manager, use the `generateFilesDownloadUrl()` function.
2988
+ * Since this is a permanent URL, it is less secure. Therefore, to download private files, use the `generateFileDownloadUrl()` function for each private file that you want to generate a download URL for.
2989
+ * @param - Options to use when generating a file's download URL.
2990
+ * @param - File ID.
2991
+ *
2992
+ * You can also pass the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`.
2993
+ * Learn more in the File and Folder IDs article.
2994
+ */
2995
+ (fileId: string, options?: GenerateFileDownloadUrlOptions | undefined): Promise<GenerateFileDownloadUrlResponse & GenerateFileDownloadUrlResponseNonNullableFields>;
2996
+ }
2997
+ declare function getFileDescriptor$1(httpClient: HttpClient): GetFileDescriptorSignature;
2998
+ interface GetFileDescriptorSignature {
2999
+ /**
3000
+ * Gets information about the specified file in the Media Manager.
3001
+ *
3002
+ *
3003
+ * The `getFileDescriptor()` function returns a Promise that resolves to the specified file's descriptor.
3004
+ *
3005
+ * Use `getFileDescriptors()` to get multiple file descriptors at once.
3006
+ * @param - File ID.
3007
+ *
3008
+ * You can also pass the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`.
3009
+ * Learn more in the File and Folder IDs article.
3010
+ * @returns Information about the file.
3011
+ */
3012
+ (fileId: string): Promise<FileDescriptor & FileDescriptorNonNullableFields>;
3013
+ }
3014
+ declare function getFileDescriptors$1(httpClient: HttpClient): GetFileDescriptorsSignature;
3015
+ interface GetFileDescriptorsSignature {
3016
+ /**
3017
+ * Gets information about the specified files in the Media Manager.
3018
+ *
3019
+ *
3020
+ * The `getFileDescriptors()` function returns a Promise that resolves to an array containing the specified files' descriptors.
3021
+ *
3022
+ * Use `getFileDescriptor()` to get a single file descriptor.
3023
+ * @param - File IDs.
3024
+ *
3025
+ * You can also pass the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`.
3026
+ * Learn more in the File and Folder IDs article.
3027
+ */
3028
+ (fileIds: string[]): Promise<GetFileDescriptorsResponse & GetFileDescriptorsResponseNonNullableFields>;
3029
+ }
3030
+ declare function updateFileDescriptor$1(httpClient: HttpClient): UpdateFileDescriptorSignature;
3031
+ interface UpdateFileDescriptorSignature {
3032
+ /**
3033
+ * Updates a file.
3034
+ *
3035
+ *
3036
+ * The `updateFileDescriptor()` function returns a Promise that resolves to the updated file's descriptor.
3037
+ *
3038
+ * You can use the `parentFolderId` parameter to move a file from its current folder to a different folder.
3039
+ * @param - The file to update.
3040
+ * @returns Information about the updated file.
3041
+ */
3042
+ (file: FileDescriptor): Promise<FileDescriptor & FileDescriptorNonNullableFields>;
3043
+ }
3044
+ declare function generateFileUploadUrl$1(httpClient: HttpClient): GenerateFileUploadUrlSignature;
3045
+ interface GenerateFileUploadUrlSignature {
3046
+ /**
3047
+ * Generates an upload URL to allow external clients to upload a file to the Media Manager.
3048
+ *
3049
+ * The `generateFileUploadUrl()` function returns a Promise that resolves to an upload URL.
3050
+ *
3051
+ * To learn how external clients can use the generated upload URL in the response to upload a file to the Media Manager, see the Upload API article.
3052
+ *
3053
+ * > **Notes:**
3054
+ * > - When you upload a file, it's not immediately available, meaning you can't manage or use the file straight away. Learn more about [knowing when a file is ready](/files/importing-files).
3055
+ * > - Any interruption in the upload process stops the file upload. For files larger than 10MB, or when network connection is poor, use `generateFileResumableUploadUrl()` instead. With the resumable upload URL, any interruption in the upload process pauses the file upload, and resumes the file upload process after the interruption.
3056
+ * @param - File mime type.
3057
+ * @param - Options to use when generating a file's upload URL.
3058
+ */
3059
+ (mimeType: string | null, options?: GenerateFileUploadUrlOptions | undefined): Promise<GenerateFileUploadUrlResponse & GenerateFileUploadUrlResponseNonNullableFields>;
3060
+ }
3061
+ declare function generateFileResumableUploadUrl$1(httpClient: HttpClient): GenerateFileResumableUploadUrlSignature;
3062
+ interface GenerateFileResumableUploadUrlSignature {
3063
+ /**
3064
+ * Generates a resumable upload URL to allow external clients to upload large files over 10MB to the Media Manager.
3065
+ *
3066
+ * The `generateFileResumableUploadUrl()` function returns a Promise that resolves to an upload URL, token, and protocol.
3067
+ *
3068
+ * When using the resumable upload URL, any interruptions will pause the file upload process, which automatically resumes once the interruption is resolved. The resumable upload URL is also helpful when network connection is poor.
3069
+ *
3070
+ * To learn how external clients can use the generated upload URL in the response to upload large files to the Media Manager, see the Resumable Upload API article.
3071
+ *
3072
+ * > **Note:** When you upload a file, it's not immediately available, meaning you can't manage or use the file straight away. Learn more about [knowing when a file is ready](/files/importing-files).
3073
+ * @param - File mime type.
3074
+ * @param - Options to use when generating a resumable upload URL.
3075
+ */
3076
+ (mimeType: string | null, options?: GenerateFileResumableUploadUrlOptions | undefined): Promise<GenerateFileResumableUploadUrlResponse & GenerateFileResumableUploadUrlResponseNonNullableFields>;
3077
+ }
3078
+ declare function importFile$1(httpClient: HttpClient): ImportFileSignature;
3079
+ interface ImportFileSignature {
3080
+ /**
3081
+ * Imports a file to the Media Manager using an external URL.
3082
+ *
3083
+ * The `importFile()` function returns a Promise that resolves to the imported file's descriptor.
3084
+ *
3085
+ * This function returns information about the imported file. Importing a file is the method through which you can add files to the Media Manager.
3086
+ * Use the `parentFolderId` and `filePath` parameters to specify which folder you want the file to be imported to.
3087
+ * If no folder is specified, the file is imported to the `media-root` folder.
3088
+ *
3089
+ * > **Note:** When you import a file, it's not immediately available, meaning you can't manage or use the file straight away. Learn more about [knowing when a file is ready](/files/importing-files).
3090
+ *
3091
+ * To import a file, you need to do one of the following:
3092
+ * - Pass its [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) in the `mimeType` field of the request. For example, `mimeType: 'image/jpeg'`.
3093
+ * - Include its extension in either the `displayName` or `url` field of the request. For example, `displayName: 'Example Image.jpeg` or `url: https://www.example.com/image.jpeg`.
3094
+ * - Ensure the server hosting the file supports HEAD requests. In these cases the Wix servers can retrieve the MIME type from the hosting server.
3095
+ * > **Note:** If you want to validate the media type, pass the file's expected media type in the optional `mediaType` field of the request. For example, `mediaType: 'IMAGE'`.
3096
+ * @param - Publicly accessible external file URL.
3097
+ * @param - Options to use when importing a single file.
3098
+ */
3099
+ (url: string, options?: ImportFileOptions | undefined): Promise<ImportFileResponse & ImportFileResponseNonNullableFields>;
3100
+ }
3101
+ declare function bulkImportFiles$1(httpClient: HttpClient): BulkImportFilesSignature;
3102
+ interface BulkImportFilesSignature {
3103
+ /**
3104
+ * > **Deprecated.**
3105
+ * > This function has been replaced with `bulkImportFile()`, and will be removed on March 31, 2024.
3106
+ *
3107
+ *
3108
+ * The `bulkImportFiles()` function returns a Promise that resolves to an array of the imported files' descriptors.
3109
+ *
3110
+ * Imports a bulk of files to the Media Manager using external urls.
3111
+ *
3112
+ * Returns information about the imported files. Use the `parentFolderId` and `filePath` parameters to specify in which folder you want each file to be imported.
3113
+ * If no folder is specified, the file is imported to the `media-root` folder.
3114
+ *
3115
+ * >**Note:** The `media` property isn't returned in the `files` response object.
3116
+ *
3117
+ * To import files, you need to do one of the following for each file:
3118
+ * - Pass its [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) in the `mimeType` field of the request. For example, `mimeType: 'image/jpeg'`.
3119
+ * - Include its extension in either the `displayName` or `url` field of the request. For example, `displayName: 'Example Image.jpeg` or `url: https://www.example.com/image.jpeg`.
3120
+ * - Ensure the server hosting the file supports HEAD requests. In these cases the Wix servers can retrieve the MIME type from the hosting server.
3121
+ * > **Note:** If you want to validate the media type, pass the file's expected media type in the optional `mediaType` field of the request. For example, `mediaType: 'IMAGE'`.
3122
+ * @param - Information about the files to import.
3123
+ * @param - Options to use when uploading multiple files.
3124
+ * @deprecated
3125
+ */
3126
+ (importFileRequests: ImportFileRequest[]): Promise<BulkImportFilesResponse & BulkImportFilesResponseNonNullableFields>;
3127
+ }
3128
+ declare function bulkImportFile$1(httpClient: HttpClient): BulkImportFileSignature;
3129
+ interface BulkImportFileSignature {
3130
+ /**
3131
+ * Imports a bulk of files to the Media Manager using external urls.
3132
+ *
3133
+ * The `bulkImportFile()` function returns a Promise that resolves to an object containing bulk import metadata and an array of imported files' descriptors and metadata.
3134
+ *
3135
+ * Returns information about the imported files. Use the `parentFolderId` and `filePath` parameters to specify in which folder you want each file to be imported.
3136
+ * If no folder is specified, the file is imported to the `media-root` folder.
3137
+ *
3138
+ * > **Note:** When you import a file, it's not immediately available, meaning you can't manage or use the file straight away. Learn more about [knowing when a file is ready](/files/importing-files).
3139
+ *
3140
+ * To import files, you need to do one of the following for each file:
3141
+ * - Pass its [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) in the `mimeType` field of the request. For example, `mimeType: 'image/jpeg'`.
3142
+ * - Include its extension in either the `displayName` or `url` field of the request. For example, `displayName: 'Example Image.jpeg` or `url: https://www.example.com/image.jpeg`.
3143
+ * - Ensure the server hosting the file supports HEAD requests. In these cases the Wix servers can retrieve the MIME type from the hosting server.
3144
+ * > **Note:** If you want to validate the media type, pass the file's expected media type in the optional `mediaType` field of the request. For example, `mediaType: 'IMAGE'`.
3145
+ * @param - Information about the files to import.
3146
+ * @param - Options to include the file descriptor in the response.
3147
+ */
3148
+ (importFileRequests: ImportFileRequest[], options?: BulkImportFileOptions | undefined): Promise<BulkImportFileResponse & BulkImportFileResponseNonNullableFields>;
3149
+ }
3150
+ declare function listFiles$1(httpClient: HttpClient): ListFilesSignature;
3151
+ interface ListFilesSignature {
3152
+ /**
3153
+ * Retrieves a list of files in the Media Manager.
3154
+ *
3155
+ * The `listFiles()` function returns a Promise that resolves to an array of the specified files' descriptors and cursor information.
3156
+ *
3157
+ * To retrieve a list of files within a specific folder in the Media Manager, pass the folder's ID in the `parentFolderId` parameter. If no folder is specified, the function retrieves only the files in the root folder of the Media Manager.
3158
+ *
3159
+ * To retrieve a list of (non-permanently) deleted files, use the `listDeletedFiles()` function.
3160
+ * @param - Options to use when listing media files.
3161
+ */
3162
+ (options?: ListFilesOptions | undefined): Promise<ListFilesResponse & ListFilesResponseNonNullableFields>;
3163
+ }
3164
+ declare function searchFiles$1(httpClient: HttpClient): SearchFilesSignature;
3165
+ interface SearchFilesSignature {
3166
+ /**
3167
+ * Searches all folders in the Media Manager and returns a list of files that match the terms specified in the optional parameters.
3168
+ *
3169
+ * The `searchFiles()` function returns a Promise that resolves to an array of the specified files' descriptors and cursor information.
3170
+ *
3171
+ * If no parameters are specified, the function returns all files in the `MEDIA_ROOT` folder.
3172
+ * @param - Options to specify which folders to search.
3173
+ */
3174
+ (options?: SearchFilesOptions | undefined): Promise<SearchFilesResponse & SearchFilesResponseNonNullableFields>;
3175
+ }
3176
+ declare function generateVideoStreamingUrl$1(httpClient: HttpClient): GenerateVideoStreamingUrlSignature;
3177
+ interface GenerateVideoStreamingUrlSignature {
3178
+ /**
3179
+ * Generates a URL for streaming a specific video file in the Media Manager.
3180
+ *
3181
+ *
3182
+ * The `generateVideoStreamingUrl()` function returns a Promise that resolves to a download URL and its asset key.
3183
+ *
3184
+ * To stream different assets of the file, use the `assetKeys` parameter which generates a video streaming URL for each asset. If no asset key is specified, it defaults to `src`, which generates one video streaming URL in the original file's format and quality.
3185
+ * @param - Options to use when generating a video file's streaming URL.
3186
+ * @param - File ID.
3187
+ *
3188
+ * You can also pass the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`.
3189
+ * Learn more in the File and Folder IDs article.
3190
+ */
3191
+ (fileId: string, options?: GenerateVideoStreamingUrlOptions | undefined): Promise<GenerateVideoStreamingUrlResponse & GenerateVideoStreamingUrlResponseNonNullableFields>;
3192
+ }
3193
+ declare function bulkDeleteFiles$1(httpClient: HttpClient): BulkDeleteFilesSignature;
3194
+ interface BulkDeleteFilesSignature {
3195
+ /**
3196
+ * Deletes the specified files from the Media Manager.
3197
+ *
3198
+ *
3199
+ * The `bulkDeleteFiles()` function returns a Promise that resolves when the files are deleted.
3200
+ *
3201
+ * The deleted files are moved to the Media Manager's trash bin (`TRASH_ROOT` folder) unless permanently deleted. To permanently delete files, pass the `permanent` parameter with the value `true`. Permanently deleting files isn't reversible, so make sure that these files aren't being used in a site or in any other way as the files will no longer be accessible.
3202
+ *
3203
+ * >**Notes:**
3204
+ * > - The specified files can be from different folders.
3205
+ * > - Moving multiple files at once is an asynchronous action, and may take time for the changes to appear in the Media Manager.
3206
+ * > - Attempting to delete files that are already in the trash bin doesn't result in an error.
3207
+ * > - If your site contains deleted media files, the deleted media files still appear on your site as the files are still in the Media Manager (in the trash bin).
3208
+ * > - You can use `bulkRestoreFilesFromTrashBin()` to restore files from the Media Manager's trash bin.
3209
+ * @param - Options to use when deleting files.
3210
+ * @param - IDs of the files to move to the Media Manager's trash bin.
3211
+ *
3212
+ * You can also pass the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`.
3213
+ * Learn more in the File and Folder IDs article.
3214
+ */
3215
+ (fileIds: string[], options?: BulkDeleteFilesOptions | undefined): Promise<void>;
3216
+ }
3217
+ declare function bulkRestoreFilesFromTrashBin$1(httpClient: HttpClient): BulkRestoreFilesFromTrashBinSignature;
3218
+ interface BulkRestoreFilesFromTrashBinSignature {
3219
+ /**
3220
+ * Restores the specified files from the Media Manager's trash bin, and moves them to their original locations in the Media Manager.
3221
+ *
3222
+ * The `bulkRestoreFilesFromTrashBin()` function returns a Promise that resolves when the files have been restored.
3223
+ * @param - IDs of the files to restore from the Media Manager's trash bin.
3224
+ *
3225
+ * You can also pass the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`.
3226
+ * Learn more in the File and Folder IDs article.
3227
+ */
3228
+ (fileIds: string[]): Promise<void>;
3229
+ }
3230
+ declare function listDeletedFiles$1(httpClient: HttpClient): ListDeletedFilesSignature;
3231
+ interface ListDeletedFilesSignature {
3232
+ /**
3233
+ * Retrieves a list of files in the Media Manager's trash bin.
3234
+ *
3235
+ * The `listDeletedFiles()` function returns a Promise that resolves to an array of the specified deleted files' descriptors and cursor information.
3236
+ *
3237
+ * >**Note:** The Media Manager's trash bin (`TRASH_ROOT` folder) only contains temporarily deleted files, not permanently deleted files.
3238
+ *
3239
+ * To retrieve a list of non-deleted files, use the `listFiles()` function.
3240
+ * @param - Options to use when listing deleted files from the trash bin.
3241
+ */
3242
+ (options?: ListDeletedFilesOptions | undefined): Promise<ListDeletedFilesResponse & ListDeletedFilesResponseNonNullableFields>;
3243
+ }
2835
3244
  declare const onFileDescriptorUpdated$1: EventDefinition<FileDescriptorUpdatedEnvelope, "wix.media.site_media.v1.file_descriptor_updated">;
2836
3245
  declare const onFileDescriptorDeleted$1: EventDefinition<FileDescriptorDeletedEnvelope, "wix.media.site_media.v1.file_descriptor_deleted">;
2837
3246
  declare const onFileDescriptorFileReady$1: EventDefinition<FileDescriptorFileReadyEnvelope, "wix.media.site_media.v1.file_descriptor_file_ready">;
@@ -2875,15 +3284,19 @@ type _publicListDeletedFilesType = typeof listDeletedFiles$1;
2875
3284
  declare const listDeletedFiles: ReturnType<typeof createRESTModule$1<_publicListDeletedFilesType>>;
2876
3285
 
2877
3286
  type _publicOnFileDescriptorUpdatedType = typeof onFileDescriptorUpdated$1;
3287
+ /** */
2878
3288
  declare const onFileDescriptorUpdated: ReturnType<typeof createEventModule$1<_publicOnFileDescriptorUpdatedType>>;
2879
3289
 
2880
3290
  type _publicOnFileDescriptorDeletedType = typeof onFileDescriptorDeleted$1;
3291
+ /** */
2881
3292
  declare const onFileDescriptorDeleted: ReturnType<typeof createEventModule$1<_publicOnFileDescriptorDeletedType>>;
2882
3293
 
2883
3294
  type _publicOnFileDescriptorFileReadyType = typeof onFileDescriptorFileReady$1;
3295
+ /** */
2884
3296
  declare const onFileDescriptorFileReady: ReturnType<typeof createEventModule$1<_publicOnFileDescriptorFileReadyType>>;
2885
3297
 
2886
3298
  type _publicOnFileDescriptorFileFailedType = typeof onFileDescriptorFileFailed$1;
3299
+ /** */
2887
3300
  declare const onFileDescriptorFileFailed: ReturnType<typeof createEventModule$1<_publicOnFileDescriptorFileFailedType>>;
2888
3301
 
2889
3302
  type index_d$1_ApplicationError = ApplicationError;
@@ -3526,15 +3939,127 @@ interface ListDeletedFoldersOptions {
3526
3939
  paging?: CursorPaging;
3527
3940
  }
3528
3941
 
3529
- declare function createFolder$1(httpClient: HttpClient): (displayName: string, options?: CreateFolderOptions) => Promise<CreateFolderResponse & CreateFolderResponseNonNullableFields>;
3530
- declare function getFolder$1(httpClient: HttpClient): (folderId: string) => Promise<Folder & FolderNonNullableFields>;
3531
- declare function listFolders$1(httpClient: HttpClient): (options?: ListFoldersOptions) => Promise<ListFoldersResponse & ListFoldersResponseNonNullableFields>;
3532
- declare function searchFolders$1(httpClient: HttpClient): (options?: SearchFoldersOptions) => Promise<SearchFoldersResponse & SearchFoldersResponseNonNullableFields>;
3533
- declare function updateFolder$1(httpClient: HttpClient): (_id: string, folder: UpdateFolder) => Promise<Folder & FolderNonNullableFields>;
3534
- declare function generateFolderDownloadUrl$1(httpClient: HttpClient): (folderId: string) => Promise<GenerateFolderDownloadUrlResponse & GenerateFolderDownloadUrlResponseNonNullableFields>;
3535
- declare function bulkDeleteFolders$1(httpClient: HttpClient): (folderIds: string[], options?: BulkDeleteFoldersOptions) => Promise<void>;
3536
- declare function bulkRestoreFoldersFromTrashBin$1(httpClient: HttpClient): (folderIds: string[]) => Promise<void>;
3537
- declare function listDeletedFolders$1(httpClient: HttpClient): (options?: ListDeletedFoldersOptions) => Promise<ListDeletedFoldersResponse & ListDeletedFoldersResponseNonNullableFields>;
3942
+ declare function createFolder$1(httpClient: HttpClient): CreateFolderSignature;
3943
+ interface CreateFolderSignature {
3944
+ /**
3945
+ * Creates a new folder in the Media Manager.
3946
+ *
3947
+ * The `createFolder()` function returns a Promise that resolves to the created folder.
3948
+ *
3949
+ * Use the `parentFolderId` parameter to specify in which existing folder you want the new folder to be created.
3950
+ * If no folder is specified, the new folder is created in the `media-root` folder.
3951
+ * @param - Folder name that appears in the Media Manager.
3952
+ * @param - Options for specifying where to create a folder.
3953
+ */
3954
+ (displayName: string, options?: CreateFolderOptions | undefined): Promise<CreateFolderResponse & CreateFolderResponseNonNullableFields>;
3955
+ }
3956
+ declare function getFolder$1(httpClient: HttpClient): GetFolderSignature;
3957
+ interface GetFolderSignature {
3958
+ /**
3959
+ * Gets information from the specified folder in the Media Manager.
3960
+ *
3961
+ * The `getFolder()` function returns a Promise that resolves to information about the specified folder.
3962
+ * @param - Folder ID.
3963
+ * @returns Information about the folder.
3964
+ */
3965
+ (folderId: string): Promise<Folder & FolderNonNullableFields>;
3966
+ }
3967
+ declare function listFolders$1(httpClient: HttpClient): ListFoldersSignature;
3968
+ interface ListFoldersSignature {
3969
+ /**
3970
+ * Retrieves a list of folders in the Media Manager.
3971
+ *
3972
+ * The `listFolders()` function returns a Promise that resolves to information about the specified folders and cursor information.
3973
+ *
3974
+ * To retrieve a list of folders within a specific folder in the Media Manager, pass the specific folder's ID in the `parentFolderId` parameter. If no folder is specified, the function retrieves only the list of folders within the root folder of the Media Manager.
3975
+ *
3976
+ * To retrieve a list of (non-permanently) deleted folders, use the `listDeletedFolders()` function.
3977
+ * @param - Options to use when listing folders from the Media Manager.
3978
+ */
3979
+ (options?: ListFoldersOptions | undefined): Promise<ListFoldersResponse & ListFoldersResponseNonNullableFields>;
3980
+ }
3981
+ declare function searchFolders$1(httpClient: HttpClient): SearchFoldersSignature;
3982
+ interface SearchFoldersSignature {
3983
+ /**
3984
+ * Searches the Media Manager and returns a list of folders that match the terms specified in the parameters.
3985
+ *
3986
+ * The `searchFolders()` function returns a Promise that resolves to information about the specified folders and cursor information.
3987
+ *
3988
+ * If no parameters are specified, the function returns all folders in the `MEDIA_ROOT` folder.
3989
+ * @param - Options specifying which folders to search.
3990
+ */
3991
+ (options?: SearchFoldersOptions | undefined): Promise<SearchFoldersResponse & SearchFoldersResponseNonNullableFields>;
3992
+ }
3993
+ declare function updateFolder$1(httpClient: HttpClient): UpdateFolderSignature;
3994
+ interface UpdateFolderSignature {
3995
+ /**
3996
+ * Updates a folder.
3997
+ *
3998
+ * The `updateFolder()` function returns a Promise that resolves to information about the updated folder.
3999
+ *
4000
+ * You can use the `parentFolderId` parameter to move a folder from its current parent folder to a different parent folder.
4001
+ * @param - Folder ID. Generated when a folder is created in the Media Manager.
4002
+ * @param - Folder to update.
4003
+ * @returns Information about the updated folder.
4004
+ */
4005
+ (_id: string, folder: UpdateFolder): Promise<Folder & FolderNonNullableFields>;
4006
+ }
4007
+ declare function generateFolderDownloadUrl$1(httpClient: HttpClient): GenerateFolderDownloadUrlSignature;
4008
+ interface GenerateFolderDownloadUrlSignature {
4009
+ /**
4010
+ * Generates a URL for downloading a compressed file containing a specific folder in the Media Manager.
4011
+ *
4012
+ * The `generateFolderDownloadUrl()` function returns a Promise that resolves to a download URL.
4013
+ *
4014
+ * The compressed file can contain sub-folders, and up to 1000 files.
4015
+ * @param - Folder ID.
4016
+ */
4017
+ (folderId: string): Promise<GenerateFolderDownloadUrlResponse & GenerateFolderDownloadUrlResponseNonNullableFields>;
4018
+ }
4019
+ declare function bulkDeleteFolders$1(httpClient: HttpClient): BulkDeleteFoldersSignature;
4020
+ interface BulkDeleteFoldersSignature {
4021
+ /**
4022
+ * Temporarily deletes the specified folders from the Media Manager.
4023
+ *
4024
+ * The `bulkDeleteFolders()` function returns a Promise that resolves when the folders are deleted.
4025
+ *
4026
+ * The deleted folders are moved to the Media Manager's `TRASH_ROOT` folder (trash bin) unless permanently deleted. To permanently delete folders, pass the `permanent` parameter with the value `true`. Permanently deleting folders isn't reversible, so make sure that the files in these folders aren't being used in a site or in any other way as the files will no longer be accessible.
4027
+ *
4028
+ * >**Notes:**
4029
+ * > - When a folder is deleted, the files in that folder are deleted.
4030
+ * > - The specified folders can be from different parent folders.
4031
+ * > - Moving multiple folders at once is an asynchronous action, and may take time for the changes to appear in the Media Manager.
4032
+ * > - Attempting to delete folders that are already in the trash bin doesn't result in an error.
4033
+ * > - If your site contains files from a non-permanently deleted media folder, the files still appear on your site as the deleted folder is still in the Media Manager (in the trash bin).
4034
+ * > - You can use the `bulkRestoreFoldersFromTrashBin()` function to restore folders from the Media Manager's trash bin.
4035
+ * @param - IDs of the folders to move to the Media Manager's trash bin.
4036
+ * @param - Options to use when deleting folders.
4037
+ */
4038
+ (folderIds: string[], options?: BulkDeleteFoldersOptions | undefined): Promise<void>;
4039
+ }
4040
+ declare function bulkRestoreFoldersFromTrashBin$1(httpClient: HttpClient): BulkRestoreFoldersFromTrashBinSignature;
4041
+ interface BulkRestoreFoldersFromTrashBinSignature {
4042
+ /**
4043
+ * Restores the specified folders from the Media Manager's trash bin, and moves them to their original locations in the Media Manager.
4044
+ *
4045
+ *
4046
+ * The `bulkRestoreFoldersFromTrashBin()` function returns a Promise that resolves when the folders have been restored.
4047
+ * @param - IDs of the folders to restore from the Media Manager's trash bin.
4048
+ */
4049
+ (folderIds: string[]): Promise<void>;
4050
+ }
4051
+ declare function listDeletedFolders$1(httpClient: HttpClient): ListDeletedFoldersSignature;
4052
+ interface ListDeletedFoldersSignature {
4053
+ /**
4054
+ * Retrieves a list of deleted folders from the trash bin.
4055
+ *
4056
+ * The `listDeletedFolders()` function returns a Promise that resolves to information about the specified deleted folders and cursor information.
4057
+ *
4058
+ * To retrieve a list of non-deleted folders, use the `listFolders()` function.
4059
+ * @param - Options to use when listing deleted folders from the trash bin.
4060
+ */
4061
+ (options?: ListDeletedFoldersOptions | undefined): Promise<ListDeletedFoldersResponse & ListDeletedFoldersResponseNonNullableFields>;
4062
+ }
3538
4063
  declare const onFolderCreated$1: EventDefinition<FolderCreatedEnvelope, "wix.media.site_media.v1.folder_created">;
3539
4064
  declare const onFolderUpdated$1: EventDefinition<FolderUpdatedEnvelope, "wix.media.site_media.v1.folder_updated">;
3540
4065
  declare const onFolderDeleted$1: EventDefinition<FolderDeletedEnvelope, "wix.media.site_media.v1.folder_deleted">;
@@ -3563,12 +4088,15 @@ type _publicListDeletedFoldersType = typeof listDeletedFolders$1;
3563
4088
  declare const listDeletedFolders: ReturnType<typeof createRESTModule<_publicListDeletedFoldersType>>;
3564
4089
 
3565
4090
  type _publicOnFolderCreatedType = typeof onFolderCreated$1;
4091
+ /** */
3566
4092
  declare const onFolderCreated: ReturnType<typeof createEventModule<_publicOnFolderCreatedType>>;
3567
4093
 
3568
4094
  type _publicOnFolderUpdatedType = typeof onFolderUpdated$1;
4095
+ /** */
3569
4096
  declare const onFolderUpdated: ReturnType<typeof createEventModule<_publicOnFolderUpdatedType>>;
3570
4097
 
3571
4098
  type _publicOnFolderDeletedType = typeof onFolderDeleted$1;
4099
+ /** */
3572
4100
  declare const onFolderDeleted: ReturnType<typeof createEventModule<_publicOnFolderDeletedType>>;
3573
4101
 
3574
4102
  type index_d_ActionEvent = ActionEvent;