import { CreateFolderRequest as CreateFolderRequest$1, CreateFolderResponse as CreateFolderResponse$1, GetFolderRequest as GetFolderRequest$1, GetFolderResponse as GetFolderResponse$1, ListFoldersRequest as ListFoldersRequest$1, ListFoldersResponse as ListFoldersResponse$1, SearchFoldersRequest as SearchFoldersRequest$1, SearchFoldersResponse as SearchFoldersResponse$1, UpdateFolderRequest as UpdateFolderRequest$1, UpdateFolderResponse as UpdateFolderResponse$1, GenerateFolderDownloadUrlRequest as GenerateFolderDownloadUrlRequest$1, GenerateFolderDownloadUrlResponse as GenerateFolderDownloadUrlResponse$1, BulkDeleteFoldersRequest as BulkDeleteFoldersRequest$1, BulkDeleteFoldersResponse as BulkDeleteFoldersResponse$1, BulkRestoreFoldersFromTrashBinRequest as BulkRestoreFoldersFromTrashBinRequest$1, BulkRestoreFoldersFromTrashBinResponse as BulkRestoreFoldersFromTrashBinResponse$1, ListDeletedFoldersRequest as ListDeletedFoldersRequest$1, ListDeletedFoldersResponse as ListDeletedFoldersResponse$1, QueryFoldersRequest as QueryFoldersRequest$1, QueryFoldersResponse as QueryFoldersResponse$1 } from './index.typings.js'; import '@wix/sdk-types'; interface Folder { /** * Folder ID. Generated when a folder is created in the Media Manager. * @maxLength 100 */ id?: string; /** * Folder name as it appears in the Media Manager. * @maxLength 1000 */ displayName?: string; /** * ID of the folder's parent folder.
Default: `media-root` folder. * @maxLength 100 */ parentFolderId?: string; /** * Date the folder was created. * @readonly */ createdDate?: Date | null; /** * Date the folder was updated. * @readonly */ updatedDate?: Date | null; /** * State of the folder. * @readonly */ state?: StateWithLiterals; /** * Site ID the folder belongs to. * @readonly * @maxLength 100 */ siteId?: string; } declare enum State { OK = "OK", DELETED = "DELETED" } /** @enumType */ type StateWithLiterals = State | 'OK' | 'DELETED'; declare enum Namespace { /** No namespaces */ NO_NAMESPACE = "NO_NAMESPACE", /** Custom namespace */ OTHERS = "OTHERS", /** Wix videos */ WIX_VIDEO = "WIX_VIDEO", /** Wix music */ WIX_MUSIC = "WIX_MUSIC", /** Albums and art store */ ALBUMS_AND_ART_STORE = "ALBUMS_AND_ART_STORE", /** Wix ecom */ WIX_ECOM = "WIX_ECOM", /** Photo share */ PHOTO_SHARE_APP = "PHOTO_SHARE_APP", /** Sharing app */ SHARING_APP = "SHARING_APP", /** Chat (engage) */ CHAT = "CHAT", /** Logo builder */ LOGO_BUILDER = "LOGO_BUILDER", /** Albums old namespace */ ALBUMS_OLD = "ALBUMS_OLD", /** Mobile chat */ CHAT_MOBILE = "CHAT_MOBILE", /** Wix Forms */ WIX_FORMS = "WIX_FORMS", /** Wix legends */ WIX_LEGENDS = "WIX_LEGENDS", /** Portfolio */ PORTFOLIO = "PORTFOLIO", /** LOGOS */ LOGOS = "LOGOS" } /** @enumType */ type NamespaceWithLiterals = Namespace | 'NO_NAMESPACE' | 'OTHERS' | 'WIX_VIDEO' | 'WIX_MUSIC' | 'ALBUMS_AND_ART_STORE' | 'WIX_ECOM' | 'PHOTO_SHARE_APP' | 'SHARING_APP' | 'CHAT' | 'LOGO_BUILDER' | 'ALBUMS_OLD' | 'CHAT_MOBILE' | 'WIX_FORMS' | 'WIX_LEGENDS' | 'PORTFOLIO' | 'LOGOS'; interface CreateFolderRequest { /** * Folder name that appears in the Media Manager. * @maxLength 1000 */ displayName: string; /** * ID of the folder's parent folder. * @maxLength 100 */ parentFolderId?: string | null; } interface CreateFolderResponse { /** Information about the newly created folder. */ folder?: Folder; } interface GetFolderRequest { /** * Folder ID. * @maxLength 100 */ folderId: string; } interface GetFolderResponse { /** Information about the folder. */ folder?: Folder; } interface ListFoldersRequest { /** * ID of the folder's parent folder. * * Default: `media-root` folder. * @maxLength 100 */ parentFolderId?: string | null; /** * Field name and order to sort by. One of: * * `displayName` * `updatedDate` * * Default: `updatedDate` in `desc` order. */ sort?: CommonSorting; /** Cursor and paging information. */ paging?: CursorPaging; } interface CommonSorting { /** * Name of the field to sort by. * @maxLength 512 */ fieldName?: string; /** Sort order. */ order?: CommonSortOrderWithLiterals; /** * Origin point for geo-distance sorting on a GEO field * results are ordered by distance from this point (ASC = nearest first, DESC = farthest first). */ origin?: AddressLocation; } declare enum CommonSortOrder { ASC = "ASC", DESC = "DESC" } /** @enumType */ type CommonSortOrderWithLiterals = CommonSortOrder | 'ASC' | 'DESC'; interface AddressLocation { /** Address latitude. */ latitude?: number | null; /** Address longitude. */ longitude?: number | null; } interface CursorPaging { /** * Maximum number of items to return in the results. * @max 100 */ limit?: number | null; /** * Pointer to the next or previous page in the list of results. * * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. * @maxLength 16000 */ cursor?: string | null; } interface ListFoldersResponse { /** * Information about the folders in the requested folder. * @maxSize 200 */ folders?: Folder[]; /** The next cursor if it exists. */ nextCursor?: PagingMetadataV2; } interface PagingMetadataV2 { /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */ total?: number | null; /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */ cursors?: Cursors; } interface Cursors { /** * Cursor string pointing to the next page in the list of results. * @maxLength 16000 */ next?: string | null; } interface SearchFoldersRequest { /** * The root folder in the Media Manager to search in. * For more information, see Root Folders in [Terminology](https://dev.wix.com/docs/rest/assets/media/media-manager/introduction#terminology). * * * Default: `MEDIA_ROOT`. */ rootFolder?: RootFolderWithLiterals; /** * Field name and order to sort by. One of: * * `displayName` * `updatedDate` * * Default: `updatedDate` in `desc` order. */ sort?: CommonSorting; /** Cursor and paging information. */ paging?: CursorPaging; /** * Free text to match in searchable fields. * * For example, search for specific values in a folder's `displayName`. * @maxLength 200 */ search?: string | null; } declare enum RootFolder { /** Contains all files and folders in the Media Manager's **Site Files** tab in the UI. */ MEDIA_ROOT = "MEDIA_ROOT", /** Contains all files and folders in the Media Manager's **Trash** tab in the UI. */ TRASH_ROOT = "TRASH_ROOT", /** Contains all files and folders created by site visitors or members. */ VISITOR_UPLOADS_ROOT = "VISITOR_UPLOADS_ROOT" } /** @enumType */ type RootFolderWithLiterals = RootFolder | 'MEDIA_ROOT' | 'TRASH_ROOT' | 'VISITOR_UPLOADS_ROOT'; interface SearchFoldersResponse { /** * Retrieved folders that match the search criteria specified in the request. * * Each folder includes all standard folder information. * @maxSize 200 */ folders?: Folder[]; /** The next cursor if it exists. */ nextCursor?: PagingMetadataV2; } interface UpdateFolderRequest { /** Folder to update. */ folder: Folder; } interface UpdateFolderResponse { /** Information about the updated folder. */ folder?: Folder; } interface UnsupportedRequestValueError { /** * Optional A list of allowed values * @maxSize 100 * @maxLength 200 */ allowedValues?: string[]; /** * The unsupported value send in the request * @maxLength 200 */ requestValue?: string; } interface GenerateFolderDownloadUrlRequest { /** * Folder ID. * @maxLength 100 */ folderId: string; } interface GenerateFolderDownloadUrlResponse { /** * URL for downloading a specific folder in the Media Manager. * @format WEB_URL */ downloadUrl?: string; } interface BulkDeleteFoldersRequest { /** * IDs of the folders to move to the Media Manager's trash bin. * @maxSize 100 * @maxLength 100 */ folderIds: string[]; /** * Whether the specified folders are permanently deleted.
* Default: `false` */ permanent?: boolean; } interface BulkDeleteFoldersResponse { } interface BulkRestoreFoldersFromTrashBinRequest { /** * IDs of the folders to restore from the Media Manager's trash bin. * @maxSize 100 * @maxLength 100 */ folderIds: string[]; } interface BulkRestoreFoldersFromTrashBinResponse { } interface ListDeletedFoldersRequest { /** * ID of the folder's parent folder. * @maxLength 100 */ parentFolderId?: string | null; /** * Field name and order to sort by. One of: * * `displayName` * * `updatedDate` * Default: `updatedDate` in `desc` order. */ sort?: CommonSorting; /** Cursor and paging information. */ paging?: CursorPaging; } interface ListDeletedFoldersResponse { /** * List of folders in the Media Manager's trash bin. * @maxSize 200 */ folders?: Folder[]; /** The next cursor if it exists. */ nextCursor?: PagingMetadataV2; } interface QueryFoldersRequest { /** * Query options, including filter, sort, and cursor paging. * * See [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language) and * [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging) for more information. */ query?: CursorQuery; } interface CursorQuery extends CursorQueryPagingMethodOneOf { /** * Cursor paging options. * * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging). */ cursorPaging?: CursorPaging; /** * Filter object. * * Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters). */ filter?: Record | null; /** * Sort object. * * Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting). * @maxSize 1 */ sort?: Sorting[]; } /** @oneof */ interface CursorQueryPagingMethodOneOf { /** * Cursor paging options. * * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging). */ cursorPaging?: CursorPaging; } interface Sorting { /** * Name of the field to sort by. * @maxLength 512 */ fieldName?: string; /** * Sort order. Use `ASC` for ascending order or `DESC` for descending order. * * Default: `ASC` */ order?: SortOrderWithLiterals; } declare enum SortOrder { ASC = "ASC", DESC = "DESC" } /** @enumType */ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC'; interface QueryFoldersResponse { /** * Retrieved folders that match the query. * @maxSize 200 */ folders?: Folder[]; /** Paging metadata, including the cursors for the next and previous pages. */ pagingMetadata?: PagingMetadataV2; } interface DomainEvent extends DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; /** Event ID. With this ID you can easily spot duplicated events and ignore them. */ id?: string; /** * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities. * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`. */ entityFqdn?: string; /** * Event action name, placed at the top level to make it easier for users to dispatch messages. * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`. */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number. * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; } interface EntityCreatedEvent { entityAsJson?: string; /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */ restoreInfo?: RestoreInfo; } interface RestoreInfo { deletedDate?: Date | null; } interface EntityUpdatedEvent { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntityAsJson?: string; } interface EntityDeletedEvent { /** Entity that was deleted. */ deletedEntityAsJson?: string | null; } interface ActionEvent { bodyAsJson?: string; } interface MessageEnvelope { /** * App instance ID. * @format GUID */ instanceId?: string | null; /** * Event type. * @maxLength 150 */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Stringify payload. */ data?: string; /** Details related to the account */ accountInfo?: AccountInfo; } interface IdentificationData extends IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; /** @readonly */ identityType?: WebhookIdentityTypeWithLiterals; } /** @oneof */ interface IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; } declare enum WebhookIdentityType { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** @enumType */ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP'; interface AccountInfo { /** * ID of the Wix account associated with the event. * @format GUID */ accountId?: string | null; /** * ID of the parent Wix account. Only included when accountId belongs to a child account. * @format GUID */ parentAccountId?: string | null; /** * ID of the Wix site associated with the event. Only included when the event is tied to a specific site. * @format GUID */ siteId?: string | null; } /** @docsIgnore */ type UpdateFolderValidationErrors = { ruleName?: 'FIELD_MASK_IS_EMPTY_OR_MISSING'; }; type __PublicMethodMetaInfo = { getUrl: (context: any) => string; httpMethod: K; path: string; pathParams: M; __requestType: T; __originalRequestType: S; __responseType: Q; __originalResponseType: R; }; declare function createFolder(): __PublicMethodMetaInfo<'POST', {}, CreateFolderRequest$1, CreateFolderRequest, CreateFolderResponse$1, CreateFolderResponse>; declare function getFolder(): __PublicMethodMetaInfo<'GET', { folderId: string; }, GetFolderRequest$1, GetFolderRequest, GetFolderResponse$1, GetFolderResponse>; declare function listFolders(): __PublicMethodMetaInfo<'GET', {}, ListFoldersRequest$1, ListFoldersRequest, ListFoldersResponse$1, ListFoldersResponse>; declare function searchFolders(): __PublicMethodMetaInfo<'POST', {}, SearchFoldersRequest$1, SearchFoldersRequest, SearchFoldersResponse$1, SearchFoldersResponse>; declare function updateFolder(): __PublicMethodMetaInfo<'PATCH', { folderId: string; }, UpdateFolderRequest$1, UpdateFolderRequest, UpdateFolderResponse$1, UpdateFolderResponse>; declare function generateFolderDownloadUrl(): __PublicMethodMetaInfo<'POST', { folderId: string; }, GenerateFolderDownloadUrlRequest$1, GenerateFolderDownloadUrlRequest, GenerateFolderDownloadUrlResponse$1, GenerateFolderDownloadUrlResponse>; declare function bulkDeleteFolders(): __PublicMethodMetaInfo<'POST', {}, BulkDeleteFoldersRequest$1, BulkDeleteFoldersRequest, BulkDeleteFoldersResponse$1, BulkDeleteFoldersResponse>; declare function bulkRestoreFoldersFromTrashBin(): __PublicMethodMetaInfo<'POST', {}, BulkRestoreFoldersFromTrashBinRequest$1, BulkRestoreFoldersFromTrashBinRequest, BulkRestoreFoldersFromTrashBinResponse$1, BulkRestoreFoldersFromTrashBinResponse>; declare function listDeletedFolders(): __PublicMethodMetaInfo<'GET', {}, ListDeletedFoldersRequest$1, ListDeletedFoldersRequest, ListDeletedFoldersResponse$1, ListDeletedFoldersResponse>; declare function queryFolders(): __PublicMethodMetaInfo<'POST', {}, QueryFoldersRequest$1, QueryFoldersRequest, QueryFoldersResponse$1, QueryFoldersResponse>; export { type AccountInfo as AccountInfoOriginal, type ActionEvent as ActionEventOriginal, type AddressLocation as AddressLocationOriginal, type BulkDeleteFoldersRequest as BulkDeleteFoldersRequestOriginal, type BulkDeleteFoldersResponse as BulkDeleteFoldersResponseOriginal, type BulkRestoreFoldersFromTrashBinRequest as BulkRestoreFoldersFromTrashBinRequestOriginal, type BulkRestoreFoldersFromTrashBinResponse as BulkRestoreFoldersFromTrashBinResponseOriginal, CommonSortOrder as CommonSortOrderOriginal, type CommonSortOrderWithLiterals as CommonSortOrderWithLiteralsOriginal, type CommonSorting as CommonSortingOriginal, type CreateFolderRequest as CreateFolderRequestOriginal, type CreateFolderResponse as CreateFolderResponseOriginal, type CursorPaging as CursorPagingOriginal, type CursorQuery as CursorQueryOriginal, type CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOfOriginal, type Cursors as CursorsOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type Folder as FolderOriginal, type GenerateFolderDownloadUrlRequest as GenerateFolderDownloadUrlRequestOriginal, type GenerateFolderDownloadUrlResponse as GenerateFolderDownloadUrlResponseOriginal, type GetFolderRequest as GetFolderRequestOriginal, type GetFolderResponse as GetFolderResponseOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type ListDeletedFoldersRequest as ListDeletedFoldersRequestOriginal, type ListDeletedFoldersResponse as ListDeletedFoldersResponseOriginal, type ListFoldersRequest as ListFoldersRequestOriginal, type ListFoldersResponse as ListFoldersResponseOriginal, type MessageEnvelope as MessageEnvelopeOriginal, Namespace as NamespaceOriginal, type NamespaceWithLiterals as NamespaceWithLiteralsOriginal, type PagingMetadataV2 as PagingMetadataV2Original, type QueryFoldersRequest as QueryFoldersRequestOriginal, type QueryFoldersResponse as QueryFoldersResponseOriginal, type RestoreInfo as RestoreInfoOriginal, RootFolder as RootFolderOriginal, type RootFolderWithLiterals as RootFolderWithLiteralsOriginal, type SearchFoldersRequest as SearchFoldersRequestOriginal, type SearchFoldersResponse as SearchFoldersResponseOriginal, SortOrder as SortOrderOriginal, type SortOrderWithLiterals as SortOrderWithLiteralsOriginal, type Sorting as SortingOriginal, State as StateOriginal, type StateWithLiterals as StateWithLiteralsOriginal, type UnsupportedRequestValueError as UnsupportedRequestValueErrorOriginal, type UpdateFolderRequest as UpdateFolderRequestOriginal, type UpdateFolderResponse as UpdateFolderResponseOriginal, type UpdateFolderValidationErrors as UpdateFolderValidationErrorsOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, bulkDeleteFolders, bulkRestoreFoldersFromTrashBin, createFolder, generateFolderDownloadUrl, getFolder, listDeletedFolders, listFolders, queryFolders, searchFolders, updateFolder };