{"version":3,"sources":["../../src/media-enterprise-public-media-v1-enterprise-item-enterprise-media-items.public.ts","../../src/media-enterprise-public-media-v1-enterprise-item-enterprise-media-items.universal.ts","../../src/media-enterprise-public-media-v1-enterprise-item-enterprise-media-items.http.ts","../../src/media-enterprise-public-media-v1-enterprise-item-enterprise-media-items.context.ts"],"sourcesContent":["import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTAudioToSDKAudio } from '@wix/sdk-runtime/transformations/audio';\nimport { transformRESTDocumentToSDKDocument } from '@wix/sdk-runtime/transformations/document';\nimport { transformRESTImageToSDKImage } from '@wix/sdk-runtime/transformations/image';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { transformRESTVideoV2ToSDKVideoV2 } from '@wix/sdk-runtime/transformations/video-v2';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n  BulkImportFilesOptions,\n  BulkImportFilesResponse,\n  BulkUpdateItemOptions,\n  BulkUpdateItemResponse,\n  EnterpriseItemCreatedEnvelope,\n  EnterpriseItemItemCategoriesChangedEnvelope,\n  EnterpriseItemPublishStatusChangedEnvelope,\n  EnterpriseItemUpdatedEnvelope,\n  EnterpriseMediaItem,\n  EnterpriseMediaItemQuery,\n  EnterpriseMediaItemSearch,\n  GenerateFileUploadUrlOptions,\n  GenerateFileUploadUrlResponse,\n  ImportFileOptions,\n  ImportFileRequest,\n  ImportFileResponse,\n  ItemUploadCallbackOptions,\n  ItemUploadCallbackResponse,\n  ItemsQueryBuilder,\n  LinkItemToCategoriesOptions,\n  LinkItemToCategoriesResponse,\n  OverwriteItemCategoriesOptions,\n  OverwriteItemCategoriesResponse,\n  QueryItemsResponse,\n  SearchItemsResponse,\n  UnlinkItemFromCategoriesOptions,\n  UnlinkItemFromCategoriesResponse,\n  UpdateItem,\n  UpdateItemRequest,\n  bulkImportFiles as universalBulkImportFiles,\n  bulkUpdateItem as universalBulkUpdateItem,\n  generateFileUploadUrl as universalGenerateFileUploadUrl,\n  getItem as universalGetItem,\n  importFile as universalImportFile,\n  itemUploadCallback as universalItemUploadCallback,\n  linkItemToCategories as universalLinkItemToCategories,\n  overwriteItemCategories as universalOverwriteItemCategories,\n  queryItems as universalQueryItems,\n  searchItems as universalSearchItems,\n  typedQueryItems as universalTypedQueryItems,\n  unlinkItemFromCategories as universalUnlinkItemFromCategories,\n  updateItem as universalUpdateItem,\n} from './media-enterprise-public-media-v1-enterprise-item-enterprise-media-items.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/media' };\n\nexport function itemUploadCallback(\n  httpClient: HttpClient\n): ItemUploadCallbackSignature {\n  return (options?: ItemUploadCallbackOptions) =>\n    universalItemUploadCallback(\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface ItemUploadCallbackSignature {\n  /**\n   * Internal endpoint called by the public media backend when a file is created. Creates domain events for the Enterprise Public Media system.\n   */\n  (options?: ItemUploadCallbackOptions): Promise<ItemUploadCallbackResponse>;\n}\n\nexport function generateFileUploadUrl(\n  httpClient: HttpClient\n): GenerateFileUploadUrlSignature {\n  return (options?: GenerateFileUploadUrlOptions) =>\n    universalGenerateFileUploadUrl(\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface GenerateFileUploadUrlSignature {\n  /**\n   * Generates an upload URL for uploading local files to the Enterprise Public Media system. After uploading the file to the returned URL, the system processes it asynchronously. The item becomes available once processing completes.\n   */\n  (options?: GenerateFileUploadUrlOptions): Promise<\n    NonNullablePaths<GenerateFileUploadUrlResponse, `uploadUrl`, 2>\n  >;\n}\n\nexport function importFile(httpClient: HttpClient): ImportFileSignature {\n  return (url: string, options?: ImportFileOptions) =>\n    universalImportFile(\n      url,\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface ImportFileSignature {\n  /**\n   * Imports a file from a URL into the Enterprise Public Media system.\n   *\n   * To import a single file from your local machine, call [Generate File Upload Url](https://dev.wix.com/docs/api-reference/assets/media/enterprise-media/enterprise-item/generate-file-upload-url).\n   * @param - URL of the file to import.\n   */\n  (url: string, options?: ImportFileOptions): Promise<\n    NonNullablePaths<\n      ImportFileResponse,\n      | `item._id`\n      | `item.mediaType`\n      | `item.assets.archive._id`\n      | `item.assets.archive.url`\n      | `item.assets.model3d._id`\n      | `item.assets.model3d.url`\n      | `item.displayTags`\n      | `item.internalTags`\n      | `item.systemTags`\n      | `item.parentCategoryIds`\n      | `item.publishStatus`,\n      5\n    >\n  >;\n}\n\nexport function bulkImportFiles(\n  httpClient: HttpClient\n): BulkImportFilesSignature {\n  return (\n    importFileRequests: NonNullablePaths<ImportFileRequest, `url`, 2>[],\n    options?: BulkImportFilesOptions\n  ) =>\n    universalBulkImportFiles(\n      importFileRequests,\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface BulkImportFilesSignature {\n  /**\n   * Imports multiple files from URLs in a single API call. Check the `itemMetadata` in each result to identify successes and failures, and use `bulkActionMetadata` for an overview of total succeeded and failed operations.\n   *\n   * To import a single file from a URL, call [Import File](https://dev.wix.com/docs/api-reference/assets/media/enterprise-media/enterprise-item/import-file).\n   * @param - List of files to import.\n   */\n  (\n    importFileRequests: NonNullablePaths<ImportFileRequest, `url`, 2>[],\n    options?: BulkImportFilesOptions\n  ): Promise<\n    NonNullablePaths<\n      BulkImportFilesResponse,\n      | `results`\n      | `results.${number}.itemMetadata.originalIndex`\n      | `results.${number}.itemMetadata.success`\n      | `results.${number}.itemMetadata.error.code`\n      | `results.${number}.itemMetadata.error.description`\n      | `results.${number}.item._id`\n      | `results.${number}.item.mediaType`\n      | `results.${number}.item.publishStatus`\n      | `bulkActionMetadata.totalSuccesses`\n      | `bulkActionMetadata.totalFailures`\n      | `bulkActionMetadata.undetailedFailures`,\n      6\n    >\n  >;\n}\n\nexport function searchItems(httpClient: HttpClient): SearchItemsSignature {\n  return (query: EnterpriseMediaItemSearch) =>\n    universalSearchItems(\n      query,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface SearchItemsSignature {\n  /**\n   * Searches for items using text-based search criteria.\n   *\n   * Search Items runs with these defaults, which you can override:\n   *\n   * - `paging.limit` is `50`\n   * - `paging.offset` is `0`\n   *\n   * All filters support equality only. Each search must include a `categoryId` filter. Use this endpoint when you need to search for items by text. For retrieving items with custom sorting, use [Query Items](https://dev.wix.com/docs/api-reference/assets/media/enterprise-media/enterprise-item/query-items).\n   *\n   * To learn about working with search methods, 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).\n   * @param - Search query for text-based matching across item `title`, `displayTags`, and `internalTags` fields. Partial matching is supported for `title` and `displayTags`. `internalTags` require a full exact match. All filters support equality only. Each query must include a `categoryId` filter.\n   */\n  (query: EnterpriseMediaItemSearch): Promise<\n    NonNullablePaths<\n      SearchItemsResponse,\n      | `items`\n      | `items.${number}._id`\n      | `items.${number}.mediaType`\n      | `items.${number}.assets.archive._id`\n      | `items.${number}.assets.archive.url`\n      | `items.${number}.assets.model3d._id`\n      | `items.${number}.assets.model3d.url`\n      | `items.${number}.publishStatus`,\n      6\n    >\n  >;\n}\n\nexport function queryItems(httpClient: HttpClient): QueryItemsSignature {\n  return () =>\n    universalQueryItems(\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface QueryItemsSignature {\n  /**\n   * Retrieves a list of up to 200 items, given the provided paging, filtering, and sorting.\n   *\n   * Query Items runs with these defaults, which you can override:\n   *\n   * - Sorted by curation order\n   * - `paging.limit` is `50`\n   * - `paging.offset` is `0`\n   *\n   * Each query must include a `categoryId` filter. For text-based search, use [Search Items](https://dev.wix.com/docs/api-reference/assets/media/enterprise-media/enterprise-item/search-items).\n   *\n   * To learn about working with Query methods, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language), [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging), and [Field Projection](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-field-projection).\n   */\n  (): ItemsQueryBuilder;\n}\n\nexport function typedQueryItems(\n  httpClient: HttpClient\n): TypedQueryItemsSignature {\n  return (query: EnterpriseMediaItemQuery) =>\n    universalTypedQueryItems(\n      query,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface TypedQueryItemsSignature {\n  /** */\n  (query: EnterpriseMediaItemQuery): Promise<\n    NonNullablePaths<\n      QueryItemsResponse,\n      | `items`\n      | `items.${number}._id`\n      | `items.${number}.mediaType`\n      | `items.${number}.assets.archive._id`\n      | `items.${number}.assets.archive.url`\n      | `items.${number}.assets.model3d._id`\n      | `items.${number}.assets.model3d.url`\n      | `items.${number}.publishStatus`,\n      6\n    >\n  >;\n}\n\nexport function updateItem(httpClient: HttpClient): UpdateItemSignature {\n  return (_id: string, item: UpdateItem) =>\n    universalUpdateItem(\n      _id,\n      item,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface UpdateItemSignature {\n  /**\n   * Updates an item.\n   * To update multiple items in a single API call, call [Bulk Update Item](https://dev.wix.com/docs/api-reference/assets/media/enterprise-media/enterprise-item/bulk-update-item).\n   * @param - Item ID.\n   * @returns Updated item.\n   */\n  (_id: string, item: UpdateItem): Promise<\n    NonNullablePaths<\n      EnterpriseMediaItem,\n      | `_id`\n      | `mediaType`\n      | `assets.archive._id`\n      | `assets.archive.url`\n      | `assets.model3d._id`\n      | `assets.model3d.url`\n      | `displayTags`\n      | `internalTags`\n      | `systemTags`\n      | `parentCategoryIds`\n      | `publishStatus`,\n      4\n    >\n  >;\n}\n\nexport function bulkUpdateItem(\n  httpClient: HttpClient\n): BulkUpdateItemSignature {\n  return (\n    updateItemRequests: NonNullablePaths<UpdateItemRequest, `item._id`, 3>[],\n    options?: BulkUpdateItemOptions\n  ) =>\n    universalBulkUpdateItem(\n      updateItemRequests,\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface BulkUpdateItemSignature {\n  /**\n   * Updates multiple items in a single API call.\n   *\n   * To update a single item, call [Update Item](https://dev.wix.com/docs/api-reference/assets/media/enterprise-media/enterprise-item/update-item).\n   * @param - List of items to update. Each item must include an ID.\n   */\n  (\n    updateItemRequests: NonNullablePaths<UpdateItemRequest, `item._id`, 3>[],\n    options?: BulkUpdateItemOptions\n  ): Promise<\n    NonNullablePaths<\n      BulkUpdateItemResponse,\n      | `results`\n      | `results.${number}.itemMetadata.originalIndex`\n      | `results.${number}.itemMetadata.success`\n      | `results.${number}.itemMetadata.error.code`\n      | `results.${number}.itemMetadata.error.description`\n      | `results.${number}.item._id`\n      | `results.${number}.item.mediaType`\n      | `results.${number}.item.publishStatus`\n      | `bulkActionMetadata.totalSuccesses`\n      | `bulkActionMetadata.totalFailures`\n      | `bulkActionMetadata.undetailedFailures`,\n      6\n    >\n  >;\n}\n\nexport function getItem(httpClient: HttpClient): GetItemSignature {\n  return (itemId: string) =>\n    universalGetItem(\n      itemId,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface GetItemSignature {\n  /**\n   * Retrieves an item by ID.\n   * @param - Item ID.\n   * @returns Retrieved item.\n   */\n  (itemId: string): Promise<\n    NonNullablePaths<\n      EnterpriseMediaItem,\n      | `_id`\n      | `mediaType`\n      | `assets.archive._id`\n      | `assets.archive.url`\n      | `assets.model3d._id`\n      | `assets.model3d.url`\n      | `displayTags`\n      | `internalTags`\n      | `systemTags`\n      | `parentCategoryIds`\n      | `publishStatus`,\n      4\n    >\n  >;\n}\n\nexport function linkItemToCategories(\n  httpClient: HttpClient\n): LinkItemToCategoriesSignature {\n  return (itemId: string, options?: LinkItemToCategoriesOptions) =>\n    universalLinkItemToCategories(\n      itemId,\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface LinkItemToCategoriesSignature {\n  /**\n   * Links an item to multiple categories. Adds to existing category links without removing them.\n   *\n   * To replace all category links, call [Overwrite Item Categories](https://dev.wix.com/docs/api-reference/assets/media/enterprise-media/enterprise-item/overwrite-item-categories). To remove specific category links, call [Unlink Item From Categories](https://dev.wix.com/docs/api-reference/assets/media/enterprise-media/enterprise-item/unlink-item-from-categories).\n   * @param - Item ID.\n   */\n  (itemId: string, options?: LinkItemToCategoriesOptions): Promise<\n    NonNullablePaths<LinkItemToCategoriesResponse, `linkedCategoryIds`, 2>\n  >;\n}\n\nexport function unlinkItemFromCategories(\n  httpClient: HttpClient\n): UnlinkItemFromCategoriesSignature {\n  return (itemId: string, options?: UnlinkItemFromCategoriesOptions) =>\n    universalUnlinkItemFromCategories(\n      itemId,\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface UnlinkItemFromCategoriesSignature {\n  /**\n   * Unlinks an item from multiple categories. Removes specified category links while keeping others.\n   *\n   * To replace all category links, call [Overwrite Item Categories](https://dev.wix.com/docs/api-reference/assets/media/enterprise-media/enterprise-item/overwrite-item-categories). To add category links, call [Link Item To Categories](https://dev.wix.com/docs/api-reference/assets/media/enterprise-media/enterprise-item/link-item-to-categories).\n   * @param - Item ID.\n   */\n  (itemId: string, options?: UnlinkItemFromCategoriesOptions): Promise<\n    NonNullablePaths<UnlinkItemFromCategoriesResponse, `unlinkedCategoryIds`, 2>\n  >;\n}\n\nexport function overwriteItemCategories(\n  httpClient: HttpClient\n): OverwriteItemCategoriesSignature {\n  return (itemId: string, options?: OverwriteItemCategoriesOptions) =>\n    universalOverwriteItemCategories(\n      itemId,\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface OverwriteItemCategoriesSignature {\n  /**\n   * Replaces all existing category links with the specified categories.\n   *\n   * To add category links without removing existing ones, call [Link Item To Categories](https://dev.wix.com/docs/api-reference/assets/media/enterprise-media/enterprise-item/link-item-to-categories). To remove specific category links, call [Unlink Item From Categories](https://dev.wix.com/docs/api-reference/assets/media/enterprise-media/enterprise-item/unlink-item-from-categories).\n   * @param - Item ID.\n   */\n  (itemId: string, options?: OverwriteItemCategoriesOptions): Promise<\n    NonNullablePaths<\n      OverwriteItemCategoriesResponse,\n      `linkedCategoryIds` | `unlinkedCategoryIds`,\n      2\n    >\n  >;\n}\n\nexport const onEnterpriseItemCreated = EventDefinition(\n  'wix.media.enterprise_public_media.v1.enterprise_item_created',\n  true,\n  (event: EnterpriseItemCreatedEnvelope) =>\n    renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(event, [\n        {\n          transformFn: transformRESTTimestampToSDKTimestamp,\n          paths: [\n            { path: 'entity.createdDate' },\n            { path: 'entity.updatedDate' },\n            { path: 'entity.assets.archive.urlExpirationDate' },\n            { path: 'entity.assets.model3d.urlExpirationDate' },\n            { path: 'metadata.eventTime' },\n          ],\n        },\n        {\n          transformFn: transformRESTImageToSDKImage,\n          paths: [\n            { path: 'entity.assets.image' },\n            { path: 'entity.assets.vector' },\n            { path: 'entity.assets.model3d.thumbnail' },\n          ],\n        },\n        {\n          transformFn: transformRESTVideoV2ToSDKVideoV2,\n          paths: [{ path: 'entity.assets.video' }],\n        },\n        {\n          transformFn: transformRESTAudioToSDKAudio,\n          paths: [{ path: 'entity.assets.audio' }],\n        },\n        {\n          transformFn: transformRESTDocumentToSDKDocument,\n          paths: [{ path: 'entity.assets.document' }],\n        },\n      ])\n    )\n)<EnterpriseItemCreatedEnvelope>();\nexport const onEnterpriseItemItemCategoriesChanged = EventDefinition(\n  'wix.media.enterprise_public_media.v1.enterprise_item_item_categories_changed',\n  true,\n  (event: EnterpriseItemItemCategoriesChangedEnvelope) =>\n    renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(event, [\n        {\n          transformFn: transformRESTTimestampToSDKTimestamp,\n          paths: [\n            { path: 'data.entity.createdDate' },\n            { path: 'data.entity.updatedDate' },\n            { path: 'data.entity.assets.archive.urlExpirationDate' },\n            { path: 'data.entity.assets.model3d.urlExpirationDate' },\n            { path: 'metadata.eventTime' },\n          ],\n        },\n        {\n          transformFn: transformRESTImageToSDKImage,\n          paths: [\n            { path: 'data.entity.assets.image' },\n            { path: 'data.entity.assets.vector' },\n            { path: 'data.entity.assets.model3d.thumbnail' },\n          ],\n        },\n        {\n          transformFn: transformRESTVideoV2ToSDKVideoV2,\n          paths: [{ path: 'data.entity.assets.video' }],\n        },\n        {\n          transformFn: transformRESTAudioToSDKAudio,\n          paths: [{ path: 'data.entity.assets.audio' }],\n        },\n        {\n          transformFn: transformRESTDocumentToSDKDocument,\n          paths: [{ path: 'data.entity.assets.document' }],\n        },\n      ])\n    )\n)<EnterpriseItemItemCategoriesChangedEnvelope>();\nexport const onEnterpriseItemPublishStatusChanged = EventDefinition(\n  'wix.media.enterprise_public_media.v1.enterprise_item_publish_status_changed',\n  true,\n  (event: EnterpriseItemPublishStatusChangedEnvelope) =>\n    renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(event, [\n        {\n          transformFn: transformRESTTimestampToSDKTimestamp,\n          paths: [\n            { path: 'data.entity.createdDate' },\n            { path: 'data.entity.updatedDate' },\n            { path: 'data.entity.assets.archive.urlExpirationDate' },\n            { path: 'data.entity.assets.model3d.urlExpirationDate' },\n            { path: 'metadata.eventTime' },\n          ],\n        },\n        {\n          transformFn: transformRESTImageToSDKImage,\n          paths: [\n            { path: 'data.entity.assets.image' },\n            { path: 'data.entity.assets.vector' },\n            { path: 'data.entity.assets.model3d.thumbnail' },\n          ],\n        },\n        {\n          transformFn: transformRESTVideoV2ToSDKVideoV2,\n          paths: [{ path: 'data.entity.assets.video' }],\n        },\n        {\n          transformFn: transformRESTAudioToSDKAudio,\n          paths: [{ path: 'data.entity.assets.audio' }],\n        },\n        {\n          transformFn: transformRESTDocumentToSDKDocument,\n          paths: [{ path: 'data.entity.assets.document' }],\n        },\n      ])\n    )\n)<EnterpriseItemPublishStatusChangedEnvelope>();\nexport const onEnterpriseItemUpdated = EventDefinition(\n  'wix.media.enterprise_public_media.v1.enterprise_item_updated',\n  true,\n  (event: EnterpriseItemUpdatedEnvelope) =>\n    renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(event, [\n        {\n          transformFn: transformRESTTimestampToSDKTimestamp,\n          paths: [\n            { path: 'entity.createdDate' },\n            { path: 'entity.updatedDate' },\n            { path: 'entity.assets.archive.urlExpirationDate' },\n            { path: 'entity.assets.model3d.urlExpirationDate' },\n            { path: 'metadata.eventTime' },\n          ],\n        },\n        {\n          transformFn: transformRESTImageToSDKImage,\n          paths: [\n            { path: 'entity.assets.image' },\n            { path: 'entity.assets.vector' },\n            { path: 'entity.assets.model3d.thumbnail' },\n          ],\n        },\n        {\n          transformFn: transformRESTVideoV2ToSDKVideoV2,\n          paths: [{ path: 'entity.assets.video' }],\n        },\n        {\n          transformFn: transformRESTAudioToSDKAudio,\n          paths: [{ path: 'entity.assets.audio' }],\n        },\n        {\n          transformFn: transformRESTDocumentToSDKDocument,\n          paths: [{ path: 'entity.assets.document' }],\n        },\n      ])\n    )\n)<EnterpriseItemUpdatedEnvelope>();\n\nexport {\n  AccountInfo,\n  AccountInfoMetadata,\n  ActionEvent,\n  ApplicationError,\n  Archive,\n  BaseEventMetadata,\n  BulkActionMetadata,\n  BulkImportFilesOptions,\n  BulkImportFilesRequest,\n  BulkImportFilesResponse,\n  BulkImportFilesResult,\n  BulkItemUpdateResult,\n  BulkUpdateItemOptions,\n  BulkUpdateItemRequest,\n  BulkUpdateItemResponse,\n  Cursors,\n  DomainEvent,\n  DomainEventBodyOneOf,\n  EnterpriseItemCreatedEnvelope,\n  EnterpriseItemItemCategoriesChangedEnvelope,\n  EnterpriseItemPublishStatusChangedEnvelope,\n  EnterpriseItemUpdatedEnvelope,\n  EnterpriseMediaItem,\n  EnterpriseMediaItemQuerySpec,\n  EnterpriseMediaItemSearchSpec,\n  EntityCreatedEvent,\n  EntityDeletedEvent,\n  EntityUpdatedEvent,\n  EventMetadata,\n  GenerateFileUploadUrlOptions,\n  GenerateFileUploadUrlRequest,\n  GenerateFileUploadUrlResponse,\n  GetItemRequest,\n  GetItemResponse,\n  IdentificationData,\n  IdentificationDataIdOneOf,\n  ImportFileOptions,\n  ImportFileRequest,\n  ImportFileResponse,\n  ItemAssets,\n  ItemAssetsAssetsOneOf,\n  ItemCategoriesChanged,\n  ItemMetadata,\n  ItemUploadCallbackOptions,\n  ItemUploadCallbackRequest,\n  ItemUploadCallbackResponse,\n  ItemsQueryBuilder,\n  ItemsQueryResult,\n  LinkItemToCategoriesOptions,\n  LinkItemToCategoriesRequest,\n  LinkItemToCategoriesResponse,\n  MediaType,\n  MessageEnvelope,\n  Model3D,\n  OverwriteItemCategoriesOptions,\n  OverwriteItemCategoriesRequest,\n  OverwriteItemCategoriesResponse,\n  Paging,\n  PagingMetadataV2,\n  PublishStatus,\n  PublishStatusChanged,\n  QueryItemsRequest,\n  QueryItemsResponse,\n  QueryV2,\n  QueryV2PagingMethodOneOf,\n  RestoreInfo,\n  Search,\n  SearchDetails,\n  SearchItemsRequest,\n  SearchItemsResponse,\n  SearchPagingMethodOneOf,\n  SortOrder,\n  Sorting,\n  UnlinkItemFromCategoriesOptions,\n  UnlinkItemFromCategoriesRequest,\n  UnlinkItemFromCategoriesResponse,\n  UpdateItem,\n  UpdateItemRequest,\n  UpdateItemResponse,\n  VideoResolution,\n  WebhookIdentityType,\n  utils,\n} from './media-enterprise-public-media-v1-enterprise-item-enterprise-media-items.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n  renameKeysFromSDKRequestToRESTRequest,\n  renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport {\n  HttpClient,\n  HttpResponse,\n  Search as SearchSdkType,\n  NonNullablePaths,\n  SearchSpec,\n  QuerySpec,\n  Query as QuerySdkType,\n} from '@wix/sdk-types';\nimport * as ambassadorWixMediaEnterprisePublicMediaV1EnterpriseItem from './media-enterprise-public-media-v1-enterprise-item-enterprise-media-items.http.js';\n// @ts-ignore\nimport { transformSDKAudioToRESTAudio } from '@wix/sdk-runtime/transformations/audio';\nimport { transformRESTAudioToSDKAudio } from '@wix/sdk-runtime/transformations/audio';\nimport { transformSDKImageToRESTImage } from '@wix/sdk-runtime/transformations/image';\nimport { transformRESTImageToSDKImage } from '@wix/sdk-runtime/transformations/image';\nimport { transformSDKVideoV2ToRESTVideoV2 } from '@wix/sdk-runtime/transformations/video-v2';\nimport { transformRESTVideoV2ToSDKVideoV2 } from '@wix/sdk-runtime/transformations/video-v2';\nimport { transformSDKDocumentToRESTDocument } from '@wix/sdk-runtime/transformations/document';\nimport { transformRESTDocumentToSDKDocument } from '@wix/sdk-runtime/transformations/document';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { createSearchUtils } from '@wix/sdk-runtime/search-builder-utils';\nimport { createQueryUtils } from '@wix/sdk-runtime/query-builder-utils';\n\n/**\n * Duration for video fits better if there will be type specific media item.. however, is it ok to implement\n * an additional one of field called details?\n * A media item in the Enterprise Public Media system. Items can be organized into categories and shared with child accounts by setting their `publishStatus` to `PUBLISHED`.\n */\nexport interface EnterpriseMediaItem {\n  /**\n   * Item ID.\n   * @maxLength 100\n   * @readonly\n   */\n  _id?: string;\n  /**\n   * Media type of the item.\n   * @readonly\n   */\n  mediaType?: MediaTypeWithLiterals;\n  /**\n   * Size of the uploaded file in bytes.\n   * @readonly\n   * @maxLength 1000\n   */\n  sizeInBytes?: string | null;\n  /**\n   * Title of the item. Used for searching and displaying the item.\n   * @maxLength 1000\n   */\n  title?: string | null;\n  /**\n   * Item assets including URLs for different renditions and formats.\n   * @readonly\n   */\n  assets?: ItemAssets;\n  /**\n   * User-facing tags describing the item. Indexed for text search; supports partial matching.\n   * @maxSize 100\n   * @maxLength 100\n   */\n  displayTags?: string[] | null;\n  /**\n   * Tags for custom categorization by client applications. Searchable with exact match only.\n   * @maxSize 100\n   * @maxLength 100\n   */\n  internalTags?: string[] | null;\n  /**\n   * Read-only tags generated by the system. Includes information about the uploader (via `uploaderSystemTag`) and external source references (via `uploaderInfoSystemTag`). Use these tags to filter items by their source.\n   * @maxSize 100\n   * @maxLength 100\n   * @readonly\n   */\n  systemTags?: string[] | null;\n  /**\n   * IDs of categories the item belongs to. To modify category assignments, call [Link Item To Categories](https://dev.wix.com/docs/api-reference/assets/media/enterprise-media/enterprise-item/link-item-to-categories), [Unlink Item From Categories](https://dev.wix.com/docs/api-reference/assets/media/enterprise-media/enterprise-item/unlink-item-from-categories), or [Overwrite Item Categories](https://dev.wix.com/docs/api-reference/assets/media/enterprise-media/enterprise-item/overwrite-item-categories).\n   * @maxSize 100\n   * @maxLength 100\n   * @readonly\n   */\n  parentCategoryIds?: string[] | null;\n  /** Publish status of the item. When `PUBLISHED`, the item is visible in child accounts' media managers. When `UNPUBLISHED`, the item is only visible in the account dashboard. */\n  publishStatus?: PublishStatusWithLiterals;\n  /**\n   * Date and time the item was created.\n   * @readonly\n   */\n  _createdDate?: Date | null;\n  /**\n   * Date and time the item was updated.\n   * @readonly\n   */\n  _updatedDate?: Date | null;\n  /**\n   * Internal ID used to reference the item within Wix media systems.\n   * @maxLength 100\n   * @readonly\n   */\n  internalId?: string | null;\n}\n\nexport enum MediaType {\n  /** Mixed media types. Used for categories that contain multiple types of media. Individual items should use specific media types (IMAGE, VIDEO, etc.) rather than MIXED. */\n  MIXED = 'MIXED',\n  /** Image file. */\n  IMAGE = 'IMAGE',\n  /** Video file. */\n  VIDEO = 'VIDEO',\n  /** Audio file. */\n  AUDIO = 'AUDIO',\n  /** Document file. */\n  DOCUMENT = 'DOCUMENT',\n  /** Vector image file. */\n  VECTOR = 'VECTOR',\n  /** Archive file. Supported formats: ZIP, RAR, TAR, TAR.GZ, GZ, GZIP, JAR, 7Z, FGZ, and WEBARCHIVE. Maximum file size: 4000MB. */\n  ARCHIVE = 'ARCHIVE',\n  /** 3D model file. */\n  MODEL3D = 'MODEL3D',\n}\n\n/** @enumType */\nexport type MediaTypeWithLiterals =\n  | MediaType\n  | 'MIXED'\n  | 'IMAGE'\n  | 'VIDEO'\n  | 'AUDIO'\n  | 'DOCUMENT'\n  | 'VECTOR'\n  | 'ARCHIVE'\n  | 'MODEL3D';\n\n/** Contains media-specific asset information based on the item's `mediaType`. Only one asset field is populated per item. During initial upload or import, this field may be empty until processing completes. */\nexport interface ItemAssets extends ItemAssetsAssetsOneOf {\n  /** Image assets and metadata. */\n  image?: string;\n  /** Video assets and metadata. */\n  video?: string;\n  /** Vector image assets and metadata. */\n  vector?: string;\n  /** Audio assets and metadata. */\n  audio?: string;\n  /** Document assets and metadata. */\n  document?: string;\n  /** Archive file metadata. */\n  archive?: Archive;\n  /** 3D model metadata. */\n  model3d?: Model3D;\n}\n\n/** @oneof */\nexport interface ItemAssetsAssetsOneOf {\n  /** Image assets and metadata. */\n  image?: string;\n  /** Video assets and metadata. */\n  video?: string;\n  /** Vector image assets and metadata. */\n  vector?: string;\n  /** Audio assets and metadata. */\n  audio?: string;\n  /** Document assets and metadata. */\n  document?: string;\n  /** Archive file metadata. */\n  archive?: Archive;\n  /** 3D model metadata. */\n  model3d?: Model3D;\n}\n\nexport interface VideoResolution {\n  /** Video URL. */\n  url?: string;\n  /** Video height. */\n  height?: number;\n  /** Video width. */\n  width?: number;\n  /**\n   * Video format\n   * Possible values: ['144p.mp4' '144p.webm' '240p.mp4' '240p.webm' '360p.mp4' '360p.webm' '480p.mp4' '480p.webm'\n   * '720p.mp4' '720p.webm' '1080p.mp4' '1080p.webm' ]\n   */\n  format?: string;\n}\n\nexport interface Archive {\n  /** WixMedia ID. */\n  _id?: string;\n  /** Archive URL. */\n  url?: string;\n  /**\n   * Archive URL expiration date (when relevant).\n   * @readonly\n   */\n  urlExpirationDate?: Date | null;\n  /**\n   * Archive size in bytes.\n   * @format DECIMAL_VALUE\n   */\n  sizeInBytes?: string | null;\n  /** Archive filename. */\n  filename?: string | null;\n}\n\nexport interface Model3D {\n  /** WixMedia 3D ID. */\n  _id?: string;\n  /** 3D URL. */\n  url?: string;\n  /** 3D thumbnail Image */\n  thumbnail?: string;\n  /** 3D alt text. */\n  altText?: string | null;\n  /**\n   * 3D URL expiration date (when relevant).\n   * @readonly\n   */\n  urlExpirationDate?: Date | null;\n  /**\n   * 3D filename.\n   * @readonly\n   */\n  filename?: string | null;\n  /**\n   * 3D size in bytes.\n   * @readonly\n   * @format DECIMAL_VALUE\n   */\n  sizeInBytes?: string | null;\n}\n\nexport enum PublishStatus {\n  /** Unknown publish status. */\n  UNDEFINED = 'UNDEFINED',\n  /** Not published. Visible only in the account dashboard. */\n  UNPUBLISHED = 'UNPUBLISHED',\n  /** Published. Visible in child accounts' media managers. */\n  PUBLISHED = 'PUBLISHED',\n}\n\n/** @enumType */\nexport type PublishStatusWithLiterals =\n  | PublishStatus\n  | 'UNDEFINED'\n  | 'UNPUBLISHED'\n  | 'PUBLISHED';\n\n/** Triggered when an item's category links change. Also triggers an UPDATED domain event. */\nexport interface ItemCategoriesChanged {\n  /**\n   * Current category IDs linked to the item.\n   * @maxLength 100\n   * @maxSize 100\n   */\n  itemCategoryIds?: string[] | null;\n  /**\n   * IDs of categories that were unlinked from the item.\n   * @maxLength 100\n   * @maxSize 20\n   */\n  unlinkedCategoryIds?: string[] | null;\n  /**\n   * IDs of categories that were linked to the item.\n   * @maxLength 100\n   * @maxSize 20\n   */\n  linkedCategoryIds?: string[] | null;\n  /** Updated item. */\n  entity?: EnterpriseMediaItem;\n}\n\nexport interface ItemUploadCallbackRequest {\n  /**\n   * ID of the created item.\n   * @maxLength 100\n   */\n  itemId?: string;\n  /**\n   * Callback token provided to the upload endpoint.\n   * @maxLength 10000\n   */\n  callbackToken?: string;\n}\n\nexport interface ItemUploadCallbackResponse {\n  /** Message describing the callback result. */\n  message?: string | null;\n}\n\nexport interface GenerateFileUploadUrlRequest {\n  /**\n   * Original file name including the extension. Used as the initial display name for the created item.\n   * @maxLength 1000\n   */\n  fileName?: string;\n  /**\n   * MIME type of the file. Used to identify the media type.\n   * @maxLength 1000\n   */\n  contentType?: string;\n  /** File size in bytes. */\n  sizeInBytes?: number;\n  /**\n   * IDs of additional categories to link the created item to. The item is automatically linked to the root account category and to any categories specified here.\n   * @maxLength 100\n   * @maxSize 20\n   */\n  categoryIds?: string[] | null;\n}\n\nexport interface GenerateFileUploadUrlResponse {\n  /**\n   * Upload URL where the file should be uploaded.\n   * @maxLength 10000\n   */\n  uploadUrl?: string;\n}\n\nexport interface ImportFileRequest {\n  /**\n   * URL of the file to import.\n   * @format WEB_URL\n   */\n  url: string;\n  /**\n   * Original file name including the extension. Used as the initial display name for the created item.\n   * @maxLength 1000\n   */\n  fileName?: string | null;\n  /**\n   * MIME type of the file. Used to identify the media type.\n   * @maxLength 1000\n   */\n  contentType?: string | null;\n  /** File size in bytes. */\n  sizeInBytes?: number | null;\n  /**\n   * IDs of categories to link the created item to. The item will be automatically linked to the root account category.\n   * @maxLength 100\n   * @maxSize 20\n   */\n  categoryIds?: string[] | null;\n  /** Media type of the file. */\n  mediaType?: MediaTypeWithLiterals;\n  /**\n   * Identifier of the external app or system that imported the file. Used to filter items by uploader. For example, if multiple apps upload to the same account, each app can use its own identifier to retrieve only items it created. Stored in `systemTags` prefixed by `_external_uploader:`.\n   * @maxLength 100\n   */\n  uploaderSystemTag?: string | null;\n  /**\n   * Additional metadata about the external source. Use this to store identifiers of related entities in external systems, such as external item IDs, source URLs, or reference numbers. This complements `uploaderSystemTag`, which identifies the importing app itself. Stored in `systemTags` prefixed by `_external_uploader_info:`.\n   * @maxLength 1000\n   */\n  uploaderInfoSystemTag?: string | null;\n}\n\nexport interface ImportFileResponse {\n  /** Partial item information. At this stage, only `internalId` is populated. All other required fields contain placeholder values. */\n  item?: EnterpriseMediaItem;\n}\n\nexport interface BulkImportFilesRequest {\n  /**\n   * List of files to import.\n   * @minSize 1\n   * @maxSize 100\n   */\n  importFileRequests: ImportFileRequest[];\n  /**\n   * Whether to include the imported item in the response. Set to `false` to exclude the item from the returned object.\n   *\n   * Default: `true`\n   */\n  returnEntity?: boolean | null;\n  /**\n   * IDs of categories to link all imported items to, in addition to any categories specified in individual `importFileRequests`. Items are also automatically linked to the root account category.\n   * @maxLength 100\n   * @maxSize 20\n   */\n  categoryIds?: string[] | null;\n}\n\nexport interface BulkImportFilesResponse {\n  /** Results for each individual file import operation. */\n  results?: BulkImportFilesResult[];\n  /** Metadata about the bulk operation. */\n  bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkImportFilesResult {\n  /** Metadata about the import operation result. */\n  itemMetadata?: ItemMetadata;\n  /** Imported item. Returned only if the operation was successful and `returnEntity` is not set to `false`. */\n  item?: EnterpriseMediaItem;\n}\n\nexport interface ItemMetadata {\n  /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */\n  _id?: string | null;\n  /** Index of the item within the request array. Allows for correlation between request and response items. */\n  originalIndex?: number;\n  /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */\n  success?: boolean;\n  /** Details about the error in case of failure. */\n  error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n  /** Error code. */\n  code?: string;\n  /** Description of the error. */\n  description?: string;\n  /** Data related to the error. */\n  data?: Record<string, any> | null;\n}\n\nexport interface BulkActionMetadata {\n  /** Number of items that were successfully processed. */\n  totalSuccesses?: number;\n  /** Number of items that couldn't be processed. */\n  totalFailures?: number;\n  /** Number of failures without details because detailed failure threshold was exceeded. */\n  undetailedFailures?: number;\n}\n\nexport interface SearchItemsRequest {\n  /** Search query for text-based matching across item `title`, `displayTags`, and `internalTags` fields. Partial matching is supported for `title` and `displayTags`. `internalTags` require a full exact match. All filters support equality only. Each query must include a `categoryId` filter. */\n  query?: Search;\n}\n\nexport interface Search extends SearchPagingMethodOneOf {\n  /** Pointer to page of results using offset. Can not be used together with 'cursor_paging' */\n  paging?: Paging;\n  /** 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) */\n  filter?: Record<string, any> | null;\n  /**\n   * Sort object in the form [{\"fieldName\":\"sortField1\"},{\"fieldName\":\"sortField2\",\"direction\":\"DESC\"}]\n   * @maxSize 50\n   */\n  sort?: Sorting[];\n  /** free text to match in searchable fields */\n  search?: SearchDetails;\n}\n\n/** @oneof */\nexport interface SearchPagingMethodOneOf {\n  /** Pointer to page of results using offset. Can not be used together with 'cursor_paging' */\n  paging?: Paging;\n}\n\nexport interface Sorting {\n  /** Name of the field to sort by. */\n  fieldName?: string;\n  /** Sort order. */\n  order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n  ASC = 'ASC',\n  DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface SearchDetails {\n  /** search term or expression */\n  expression?: string | null;\n}\n\nexport interface Paging {\n  /** Number of items to load. */\n  limit?: number | null;\n  /** Number of items to skip in the current sort order. */\n  offset?: number | null;\n}\n\nexport interface SearchItemsResponse {\n  /**\n   * List of items matching the search query.\n   * @maxSize 200\n   */\n  items?: EnterpriseMediaItem[];\n  /** Paging information for the search results. */\n  pagingMetadata?: PagingMetadataV2;\n}\n\nexport interface PagingMetadataV2 {\n  /** Number of items returned in the response. */\n  count?: number | null;\n  /** Offset that was requested. */\n  offset?: number | null;\n  /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */\n  total?: number | null;\n  /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */\n  cursors?: Cursors;\n}\n\nexport interface Cursors {\n  /** Cursor pointing to next page in the list of results. */\n  next?: string | null;\n}\n\nexport interface QueryItemsRequest {\n  /** Query parameters to filter, sort, and page items. All filters support equality only. Each query must include a `categoryId` filter. Supported sort fields: `createdDate`, `updatedDate`, `title`, `sizeInBytes`. */\n  query?: QueryV2;\n}\n\nexport interface QueryV2 extends QueryV2PagingMethodOneOf {\n  /** Paging options to limit and skip the number of items. */\n  paging?: Paging;\n  /**\n   * Filter object in the following format:\n   * `\"filter\" : {\n   * \"fieldName1\": \"value1\",\n   * \"fieldName2\":{\"$operator\":\"value2\"}\n   * }`\n   * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`\n   */\n  filter?: Record<string, any> | null;\n  /**\n   * Sort object in the following format:\n   * `[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]`\n   */\n  sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface QueryV2PagingMethodOneOf {\n  /** Paging options to limit and skip the number of items. */\n  paging?: Paging;\n}\n\nexport interface QueryItemsResponse {\n  /**\n   * List of items matching the query.\n   * @maxSize 200\n   */\n  items?: EnterpriseMediaItem[];\n  /** Paging information for the query results. */\n  pagingMetadata?: PagingMetadataV2;\n}\n\nexport interface UpdateItemRequest {\n  /** Item to update. */\n  item: EnterpriseMediaItem;\n}\n\nexport interface UpdateItemResponse {\n  /** Updated item. */\n  item?: EnterpriseMediaItem;\n}\n\n/** Triggered when an item's `publishStatus` changes. Also triggers an UPDATED domain event. */\nexport interface PublishStatusChanged {\n  /** New publish status of the item. */\n  publishStatus?: PublishStatusWithLiterals;\n  /** Updated item. */\n  entity?: EnterpriseMediaItem;\n}\n\nexport interface BulkUpdateItemRequest {\n  /**\n   * List of items to update. Each item must include an ID.\n   * @maxSize 20\n   * @minSize 1\n   */\n  updateItemRequests: UpdateItemRequest[];\n  /** Whether to return the updated items in the response. */\n  returnEntity?: boolean;\n}\n\nexport interface BulkUpdateItemResponse {\n  /** Results for each individual item update operation. */\n  results?: BulkItemUpdateResult[];\n  /** Metadata about the bulk operation. */\n  bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkItemUpdateResult {\n  /** Metadata about the update operation result. */\n  itemMetadata?: ItemMetadata;\n  /** Updated item. Returned only if the operation was successful and `returnEntity` was set to `true`. */\n  item?: EnterpriseMediaItem;\n}\n\nexport interface GetItemRequest {\n  /**\n   * Item ID.\n   * @maxLength 100\n   */\n  itemId: string;\n}\n\nexport interface GetItemResponse {\n  /** Retrieved item. */\n  item?: EnterpriseMediaItem;\n}\n\nexport interface LinkItemToCategoriesRequest {\n  /**\n   * Item ID.\n   * @maxLength 100\n   */\n  itemId: string;\n  /**\n   * IDs of categories to link to the item.\n   * @maxLength 100\n   * @maxSize 20\n   */\n  categoryIds?: string[];\n}\n\nexport interface LinkItemToCategoriesResponse {\n  /**\n   * IDs of categories that were successfully linked to the item.\n   * @maxLength 100\n   * @maxSize 20\n   */\n  linkedCategoryIds?: string[] | null;\n}\n\nexport interface UnlinkItemFromCategoriesRequest {\n  /**\n   * Item ID.\n   * @maxLength 100\n   */\n  itemId: string;\n  /**\n   * IDs of categories to unlink from the item.\n   * @maxLength 100\n   * @maxSize 20\n   */\n  categoryIds?: string[];\n}\n\nexport interface UnlinkItemFromCategoriesResponse {\n  /**\n   * IDs of categories that were successfully unlinked from the item.\n   * @maxLength 100\n   * @maxSize 20\n   */\n  unlinkedCategoryIds?: string[] | null;\n}\n\nexport interface OverwriteItemCategoriesRequest {\n  /**\n   * Item ID.\n   * @maxLength 100\n   */\n  itemId: string;\n  /**\n   * IDs of categories the item will be linked to after this operation. All existing category links will be replaced.\n   * @maxLength 100\n   * @maxSize 20\n   */\n  categoryIds?: string[];\n}\n\nexport interface OverwriteItemCategoriesResponse {\n  /**\n   * IDs of categories that were linked to the item.\n   * @maxLength 100\n   * @maxSize 20\n   */\n  linkedCategoryIds?: string[] | null;\n  /**\n   * IDs of categories that were unlinked from the item.\n   * @maxLength 100\n   * @maxSize 20\n   */\n  unlinkedCategoryIds?: string[] | null;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n  createdEvent?: EntityCreatedEvent;\n  updatedEvent?: EntityUpdatedEvent;\n  deletedEvent?: EntityDeletedEvent;\n  actionEvent?: ActionEvent;\n  /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n  _id?: string;\n  /**\n   * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n   * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n   */\n  entityFqdn?: string;\n  /**\n   * Event action name, placed at the top level to make it easier for users to dispatch messages.\n   * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n   */\n  slug?: string;\n  /** ID of the entity associated with the event. */\n  entityId?: string;\n  /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n  eventTime?: Date | null;\n  /**\n   * Whether the event was triggered as a result of a privacy regulation application\n   * (for example, GDPR).\n   */\n  triggeredByAnonymizeRequest?: boolean | null;\n  /** If present, indicates the action that triggered the event. */\n  originatedFrom?: string | null;\n  /**\n   * 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.\n   * 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.\n   */\n  entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n  createdEvent?: EntityCreatedEvent;\n  updatedEvent?: EntityUpdatedEvent;\n  deletedEvent?: EntityDeletedEvent;\n  actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n  entity?: string;\n}\n\nexport interface RestoreInfo {\n  deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n  /**\n   * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n   * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n   * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n   */\n  currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n  /** Entity that was deleted. */\n  deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n  body?: string;\n}\n\nexport interface MessageEnvelope {\n  /**\n   * App instance ID.\n   * @format GUID\n   */\n  instanceId?: string | null;\n  /**\n   * Event type.\n   * @maxLength 150\n   */\n  eventType?: string;\n  /** The identification type and identity data. */\n  identity?: IdentificationData;\n  /** Stringify payload. */\n  data?: string;\n  /** Details related to the account */\n  accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n  /**\n   * ID of a site visitor that has not logged in to the site.\n   * @format GUID\n   */\n  anonymousVisitorId?: string;\n  /**\n   * ID of a site visitor that has logged in to the site.\n   * @format GUID\n   */\n  memberId?: string;\n  /**\n   * ID of a Wix user (site owner, contributor, etc.).\n   * @format GUID\n   */\n  wixUserId?: string;\n  /**\n   * ID of an app.\n   * @format GUID\n   */\n  appId?: string;\n  /** @readonly */\n  identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n  /**\n   * ID of a site visitor that has not logged in to the site.\n   * @format GUID\n   */\n  anonymousVisitorId?: string;\n  /**\n   * ID of a site visitor that has logged in to the site.\n   * @format GUID\n   */\n  memberId?: string;\n  /**\n   * ID of a Wix user (site owner, contributor, etc.).\n   * @format GUID\n   */\n  wixUserId?: string;\n  /**\n   * ID of an app.\n   * @format GUID\n   */\n  appId?: string;\n}\n\nexport enum WebhookIdentityType {\n  UNKNOWN = 'UNKNOWN',\n  ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n  MEMBER = 'MEMBER',\n  WIX_USER = 'WIX_USER',\n  APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n  | WebhookIdentityType\n  | 'UNKNOWN'\n  | 'ANONYMOUS_VISITOR'\n  | 'MEMBER'\n  | 'WIX_USER'\n  | 'APP';\n\nexport interface AccountInfo {\n  /**\n   * ID of the Wix account associated with the event.\n   * @format GUID\n   */\n  accountId?: string | null;\n  /**\n   * ID of the parent Wix account. Only included when accountId belongs to a child account.\n   * @format GUID\n   */\n  parentAccountId?: string | null;\n  /**\n   * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n   * @format GUID\n   */\n  siteId?: string | null;\n}\n\nexport interface BaseEventMetadata {\n  /**\n   * App instance ID.\n   * @format GUID\n   */\n  instanceId?: string | null;\n  /**\n   * Event type.\n   * @maxLength 150\n   */\n  eventType?: string;\n  /** The identification type and identity data. */\n  identity?: IdentificationData;\n  /** Details related to the account */\n  accountInfo?: AccountInfo;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n  /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n  _id?: string;\n  /**\n   * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n   * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n   */\n  entityFqdn?: string;\n  /**\n   * Event action name, placed at the top level to make it easier for users to dispatch messages.\n   * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n   */\n  slug?: string;\n  /** ID of the entity associated with the event. */\n  entityId?: string;\n  /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n  eventTime?: Date | null;\n  /**\n   * Whether the event was triggered as a result of a privacy regulation application\n   * (for example, GDPR).\n   */\n  triggeredByAnonymizeRequest?: boolean | null;\n  /** If present, indicates the action that triggered the event. */\n  originatedFrom?: string | null;\n  /**\n   * 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.\n   * 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.\n   */\n  entityEventSequence?: string | null;\n  accountInfo?: AccountInfoMetadata;\n}\n\nexport interface AccountInfoMetadata {\n  /** ID of the Wix account associated with the event */\n  accountId: string;\n  /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */\n  siteId?: string;\n  /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */\n  parentAccountId?: string;\n}\n\nexport interface EnterpriseItemCreatedEnvelope {\n  entity: EnterpriseMediaItem;\n  metadata: EventMetadata;\n}\n\n/**\n * Triggered when an item is created.\n * @webhook\n * @eventType wix.media.enterprise_public_media.v1.enterprise_item_created\n * @serviceIdentifier com.wix.media.enterprise_public_media.v1.EnterpriseItemsService\n * @slug created\n * @documentationMaturity preview\n */\nexport declare function onEnterpriseItemCreated(\n  handler: (event: EnterpriseItemCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface EnterpriseItemItemCategoriesChangedEnvelope {\n  data: ItemCategoriesChanged;\n  metadata: EventMetadata;\n}\n\n/**\n * Triggered when an item's category links change.\n * @webhook\n * @eventType wix.media.enterprise_public_media.v1.enterprise_item_item_categories_changed\n * @serviceIdentifier com.wix.media.enterprise_public_media.v1.EnterpriseItemsService\n * @slug item_categories_changed\n * @documentationMaturity preview\n */\nexport declare function onEnterpriseItemItemCategoriesChanged(\n  handler: (\n    event: EnterpriseItemItemCategoriesChangedEnvelope\n  ) => void | Promise<void>\n): void;\n\nexport interface EnterpriseItemPublishStatusChangedEnvelope {\n  data: PublishStatusChanged;\n  metadata: EventMetadata;\n}\n\n/**\n * Triggered when an item's `publishStatus` changes.\n * @webhook\n * @eventType wix.media.enterprise_public_media.v1.enterprise_item_publish_status_changed\n * @serviceIdentifier com.wix.media.enterprise_public_media.v1.EnterpriseItemsService\n * @slug publish_status_changed\n * @documentationMaturity preview\n */\nexport declare function onEnterpriseItemPublishStatusChanged(\n  handler: (\n    event: EnterpriseItemPublishStatusChangedEnvelope\n  ) => void | Promise<void>\n): void;\n\nexport interface EnterpriseItemUpdatedEnvelope {\n  entity: EnterpriseMediaItem;\n  metadata: EventMetadata;\n}\n\n/**\n * Triggered when an item is updated.\n * @webhook\n * @eventType wix.media.enterprise_public_media.v1.enterprise_item_updated\n * @serviceIdentifier com.wix.media.enterprise_public_media.v1.EnterpriseItemsService\n * @slug updated\n * @documentationMaturity preview\n */\nexport declare function onEnterpriseItemUpdated(\n  handler: (event: EnterpriseItemUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Internal endpoint called by the public media backend when a file is created. Creates domain events for the Enterprise Public Media system.\n * @public\n * @documentationMaturity preview\n * @fqn com.wix.media.enterprise_public_media.v1.EnterpriseItemsService.ItemUploadCallback\n */\nexport async function itemUploadCallback(\n  options?: ItemUploadCallbackOptions\n): Promise<ItemUploadCallbackResponse> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    itemId: options?.itemId,\n    callbackToken: options?.callbackToken,\n  });\n\n  const reqOpts =\n    ambassadorWixMediaEnterprisePublicMediaV1EnterpriseItem.itemUploadCallback(\n      payload\n    );\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          itemId: '$[0].itemId',\n          callbackToken: '$[0].callbackToken',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface ItemUploadCallbackOptions {\n  /**\n   * ID of the created item.\n   * @maxLength 100\n   */\n  itemId?: string;\n  /**\n   * Callback token provided to the upload endpoint.\n   * @maxLength 10000\n   */\n  callbackToken?: string;\n}\n\n/**\n * Generates an upload URL for uploading local files to the Enterprise Public Media system. After uploading the file to the returned URL, the system processes it asynchronously. The item becomes available once processing completes.\n * @public\n * @documentationMaturity preview\n * @permissionId MEDIA.ENTERPRISE_MEDIA_ITEMS_GENERATE_UPLOAD_URL\n * @applicableIdentity APP\n * @fqn com.wix.media.enterprise_public_media.v1.EnterpriseItemsService.GenerateFileUploadUrl\n */\nexport async function generateFileUploadUrl(\n  options?: GenerateFileUploadUrlOptions\n): Promise<NonNullablePaths<GenerateFileUploadUrlResponse, `uploadUrl`, 2>> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    fileName: options?.fileName,\n    contentType: options?.contentType,\n    sizeInBytes: options?.sizeInBytes,\n    categoryIds: options?.categoryIds,\n  });\n\n  const reqOpts =\n    ambassadorWixMediaEnterprisePublicMediaV1EnterpriseItem.generateFileUploadUrl(\n      payload\n    );\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          fileName: '$[0].fileName',\n          contentType: '$[0].contentType',\n          sizeInBytes: '$[0].sizeInBytes',\n          categoryIds: '$[0].categoryIds',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface GenerateFileUploadUrlOptions {\n  /**\n   * Original file name including the extension. Used as the initial display name for the created item.\n   * @maxLength 1000\n   */\n  fileName?: string;\n  /**\n   * MIME type of the file. Used to identify the media type.\n   * @maxLength 1000\n   */\n  contentType?: string;\n  /** File size in bytes. */\n  sizeInBytes?: number;\n  /**\n   * IDs of additional categories to link the created item to. The item is automatically linked to the root account category and to any categories specified here.\n   * @maxLength 100\n   * @maxSize 20\n   */\n  categoryIds?: string[] | null;\n}\n\n/**\n * Imports a file from a URL into the Enterprise Public Media system.\n *\n * To import a single file from your local machine, call [Generate File Upload Url](https://dev.wix.com/docs/api-reference/assets/media/enterprise-media/enterprise-item/generate-file-upload-url).\n * @param url - URL of the file to import.\n * @public\n * @documentationMaturity preview\n * @requiredField url\n * @permissionId MEDIA.ENTERPRISE_MEDIA_ITEMS_IMPORT\n * @applicableIdentity APP\n * @fqn com.wix.media.enterprise_public_media.v1.EnterpriseItemsService.ImportFile\n */\nexport async function importFile(\n  url: string,\n  options?: ImportFileOptions\n): Promise<\n  NonNullablePaths<\n    ImportFileResponse,\n    | `item._id`\n    | `item.mediaType`\n    | `item.assets.archive._id`\n    | `item.assets.archive.url`\n    | `item.assets.model3d._id`\n    | `item.assets.model3d.url`\n    | `item.displayTags`\n    | `item.internalTags`\n    | `item.systemTags`\n    | `item.parentCategoryIds`\n    | `item.publishStatus`,\n    5\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[2] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    url: url,\n    fileName: options?.fileName,\n    contentType: options?.contentType,\n    sizeInBytes: options?.sizeInBytes,\n    categoryIds: options?.categoryIds,\n    mediaType: options?.mediaType,\n    uploaderSystemTag: options?.uploaderSystemTag,\n    uploaderInfoSystemTag: options?.uploaderInfoSystemTag,\n  });\n\n  const reqOpts =\n    ambassadorWixMediaEnterprisePublicMediaV1EnterpriseItem.importFile(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(result.data, [\n        {\n          transformFn: transformRESTImageToSDKImage,\n          paths: [\n            { path: 'item.assets.image' },\n            { path: 'item.assets.vector' },\n            { path: 'item.assets.model3d.thumbnail' },\n          ],\n        },\n        {\n          transformFn: transformRESTVideoV2ToSDKVideoV2,\n          paths: [{ path: 'item.assets.video' }],\n        },\n        {\n          transformFn: transformRESTAudioToSDKAudio,\n          paths: [{ path: 'item.assets.audio' }],\n        },\n        {\n          transformFn: transformRESTDocumentToSDKDocument,\n          paths: [{ path: 'item.assets.document' }],\n        },\n      ])\n    )!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          url: '$[0]',\n          fileName: '$[1].fileName',\n          contentType: '$[1].contentType',\n          sizeInBytes: '$[1].sizeInBytes',\n          categoryIds: '$[1].categoryIds',\n          mediaType: '$[1].mediaType',\n          uploaderSystemTag: '$[1].uploaderSystemTag',\n          uploaderInfoSystemTag: '$[1].uploaderInfoSystemTag',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['url', 'options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface ImportFileOptions {\n  /**\n   * Original file name including the extension. Used as the initial display name for the created item.\n   * @maxLength 1000\n   */\n  fileName?: string | null;\n  /**\n   * MIME type of the file. Used to identify the media type.\n   * @maxLength 1000\n   */\n  contentType?: string | null;\n  /** File size in bytes. */\n  sizeInBytes?: number | null;\n  /**\n   * IDs of categories to link the created item to. The item will be automatically linked to the root account category.\n   * @maxLength 100\n   * @maxSize 20\n   */\n  categoryIds?: string[] | null;\n  /** Media type of the file. */\n  mediaType?: MediaTypeWithLiterals;\n  /**\n   * Identifier of the external app or system that imported the file. Used to filter items by uploader. For example, if multiple apps upload to the same account, each app can use its own identifier to retrieve only items it created. Stored in `systemTags` prefixed by `_external_uploader:`.\n   * @maxLength 100\n   */\n  uploaderSystemTag?: string | null;\n  /**\n   * Additional metadata about the external source. Use this to store identifiers of related entities in external systems, such as external item IDs, source URLs, or reference numbers. This complements `uploaderSystemTag`, which identifies the importing app itself. Stored in `systemTags` prefixed by `_external_uploader_info:`.\n   * @maxLength 1000\n   */\n  uploaderInfoSystemTag?: string | null;\n}\n\n/**\n * Imports multiple files from URLs in a single API call. Check the `itemMetadata` in each result to identify successes and failures, and use `bulkActionMetadata` for an overview of total succeeded and failed operations.\n *\n * To import a single file from a URL, call [Import File](https://dev.wix.com/docs/api-reference/assets/media/enterprise-media/enterprise-item/import-file).\n * @param importFileRequests - List of files to import.\n * @public\n * @documentationMaturity preview\n * @requiredField importFileRequests\n * @requiredField importFileRequests.url\n * @permissionId MEDIA.ENTERPRISE_MEDIA_ITEMS_IMPORT\n * @applicableIdentity APP\n * @fqn com.wix.media.enterprise_public_media.v1.EnterpriseItemsService.BulkImportFiles\n */\nexport async function bulkImportFiles(\n  importFileRequests: NonNullablePaths<ImportFileRequest, `url`, 2>[],\n  options?: BulkImportFilesOptions\n): Promise<\n  NonNullablePaths<\n    BulkImportFilesResponse,\n    | `results`\n    | `results.${number}.itemMetadata.originalIndex`\n    | `results.${number}.itemMetadata.success`\n    | `results.${number}.itemMetadata.error.code`\n    | `results.${number}.itemMetadata.error.description`\n    | `results.${number}.item._id`\n    | `results.${number}.item.mediaType`\n    | `results.${number}.item.publishStatus`\n    | `bulkActionMetadata.totalSuccesses`\n    | `bulkActionMetadata.totalFailures`\n    | `bulkActionMetadata.undetailedFailures`,\n    6\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[2] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    importFileRequests: importFileRequests,\n    returnEntity: options?.returnEntity,\n    categoryIds: options?.categoryIds,\n  });\n\n  const reqOpts =\n    ambassadorWixMediaEnterprisePublicMediaV1EnterpriseItem.bulkImportFiles(\n      payload\n    );\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(result.data, [\n        {\n          transformFn: transformRESTImageToSDKImage,\n          paths: [\n            { path: 'results.item.assets.image' },\n            { path: 'results.item.assets.vector' },\n            { path: 'results.item.assets.model3d.thumbnail' },\n          ],\n        },\n        {\n          transformFn: transformRESTVideoV2ToSDKVideoV2,\n          paths: [{ path: 'results.item.assets.video' }],\n        },\n        {\n          transformFn: transformRESTAudioToSDKAudio,\n          paths: [{ path: 'results.item.assets.audio' }],\n        },\n        {\n          transformFn: transformRESTDocumentToSDKDocument,\n          paths: [{ path: 'results.item.assets.document' }],\n        },\n      ])\n    )!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          importFileRequests: '$[0]',\n          returnEntity: '$[1].returnEntity',\n          categoryIds: '$[1].categoryIds',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['importFileRequests', 'options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface BulkImportFilesOptions {\n  /**\n   * Whether to include the imported item in the response. Set to `false` to exclude the item from the returned object.\n   *\n   * Default: `true`\n   */\n  returnEntity?: boolean | null;\n  /**\n   * IDs of categories to link all imported items to, in addition to any categories specified in individual `importFileRequests`. Items are also automatically linked to the root account category.\n   * @maxLength 100\n   * @maxSize 20\n   */\n  categoryIds?: string[] | null;\n}\n\n/**\n * Searches for items using text-based search criteria.\n *\n * Search Items runs with these defaults, which you can override:\n *\n * - `paging.limit` is `50`\n * - `paging.offset` is `0`\n *\n * All filters support equality only. Each search must include a `categoryId` filter. Use this endpoint when you need to search for items by text. For retrieving items with custom sorting, use [Query Items](https://dev.wix.com/docs/api-reference/assets/media/enterprise-media/enterprise-item/query-items).\n *\n * To learn about working with search methods, 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).\n * @param query - Search query for text-based matching across item `title`, `displayTags`, and `internalTags` fields. Partial matching is supported for `title` and `displayTags`. `internalTags` require a full exact match. All filters support equality only. Each query must include a `categoryId` filter.\n * @public\n * @documentationMaturity preview\n * @requiredField query\n * @permissionId MEDIA.ENTERPRISE_MEDIA_ITEMS_READ\n * @applicableIdentity APP\n * @fqn com.wix.media.enterprise_public_media.v1.EnterpriseItemsService.SearchItems\n */\nexport async function searchItems(\n  query: EnterpriseMediaItemSearch\n): Promise<\n  NonNullablePaths<\n    SearchItemsResponse,\n    | `items`\n    | `items.${number}._id`\n    | `items.${number}.mediaType`\n    | `items.${number}.assets.archive._id`\n    | `items.${number}.assets.archive.url`\n    | `items.${number}.assets.model3d._id`\n    | `items.${number}.assets.model3d.url`\n    | `items.${number}.publishStatus`,\n    6\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({ query: query });\n\n  const reqOpts =\n    ambassadorWixMediaEnterprisePublicMediaV1EnterpriseItem.searchItems(\n      payload\n    );\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(result.data, [\n        {\n          transformFn: transformRESTImageToSDKImage,\n          paths: [\n            { path: 'items.assets.image' },\n            { path: 'items.assets.vector' },\n            { path: 'items.assets.model3d.thumbnail' },\n          ],\n        },\n        {\n          transformFn: transformRESTVideoV2ToSDKVideoV2,\n          paths: [{ path: 'items.assets.video' }],\n        },\n        {\n          transformFn: transformRESTAudioToSDKAudio,\n          paths: [{ path: 'items.assets.audio' }],\n        },\n        {\n          transformFn: transformRESTDocumentToSDKDocument,\n          paths: [{ path: 'items.assets.document' }],\n        },\n      ])\n    )!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { query: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['query']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface EnterpriseMediaItemSearchSpec extends SearchSpec {\n  paging: 'offset';\n  wql: [\n    {\n      operators: ['$hasSome'];\n      fields: ['parentCategoryIds'];\n      sort: 'NONE';\n    },\n    {\n      operators: ['$eq'];\n      fields: ['_createdDate', '_updatedDate', 'sizeInBytes', 'title'];\n      sort: 'BOTH';\n    }\n  ];\n}\n\nexport type CommonSearchWithEntityContext = SearchSdkType<\n  EnterpriseMediaItem,\n  EnterpriseMediaItemSearchSpec\n>;\nexport type EnterpriseMediaItemSearch = {\n  /** \n  Pointer to page of results using offset. Can not be used together with 'cursor_paging'  \n  */\n  paging?: {\n    /** \n  Number of items to load.  \n  */\n    limit?:\n      | NonNullable<CommonSearchWithEntityContext['paging']>['limit']\n      | null;\n    /** \n  Number of items to skip in the current sort order.  \n  */\n    offset?:\n      | NonNullable<CommonSearchWithEntityContext['paging']>['offset']\n      | null;\n  };\n  /** \n  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)  \n  */\n  filter?: CommonSearchWithEntityContext['filter'] | null;\n  /** \n  Sort object in the form [{\"fieldName\":\"sortField1\"},{\"fieldName\":\"sortField2\",\"direction\":\"DESC\"}] \n  @maxSize: 50 \n  */\n  sort?: {\n    /** \n  Name of the field to sort by.  \n  */\n    fieldName?: NonNullable<\n      CommonSearchWithEntityContext['sort']\n    >[number]['fieldName'];\n    /** \n  Sort order.  \n  */\n    order?: NonNullable<CommonSearchWithEntityContext['sort']>[number]['order'];\n  }[];\n  /** \n  free text to match in searchable fields  \n  */\n  search?: {\n    /** \n  search term or expression  \n  */\n    expression?:\n      | NonNullable<CommonSearchWithEntityContext['search']>['expression']\n      | null;\n  };\n};\n\nexport const utils = {\n  search: {\n    ...createSearchUtils<\n      EnterpriseMediaItem,\n      EnterpriseMediaItemSearchSpec,\n      EnterpriseMediaItemSearch\n    >(),\n  },\n  query: {\n    ...createQueryUtils<\n      EnterpriseMediaItem,\n      EnterpriseMediaItemQuerySpec,\n      EnterpriseMediaItemQuery\n    >(),\n  },\n};\n\n/**\n * Retrieves a list of up to 200 items, given the provided paging, filtering, and sorting.\n *\n * Query Items runs with these defaults, which you can override:\n *\n * - Sorted by curation order\n * - `paging.limit` is `50`\n * - `paging.offset` is `0`\n *\n * Each query must include a `categoryId` filter. For text-based search, use [Search Items](https://dev.wix.com/docs/api-reference/assets/media/enterprise-media/enterprise-item/search-items).\n *\n * To learn about working with Query methods, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language), [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging), and [Field Projection](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-field-projection).\n * @public\n * @documentationMaturity preview\n * @permissionId MEDIA.ENTERPRISE_MEDIA_ITEMS_READ\n * @applicableIdentity APP\n * @fqn com.wix.media.enterprise_public_media.v1.EnterpriseItemsService.QueryItems\n */\nexport function queryItems(): ItemsQueryBuilder {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[0] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  return queryBuilder<\n    EnterpriseMediaItem,\n    'OFFSET',\n    QueryItemsRequest,\n    QueryItemsResponse\n  >({\n    func: async (payload: QueryItemsRequest) => {\n      const reqOpts =\n        ambassadorWixMediaEnterprisePublicMediaV1EnterpriseItem.queryItems(\n          payload\n        );\n\n      sideEffects?.onSiteCall?.();\n      try {\n        const result = await httpClient.request(reqOpts);\n        sideEffects?.onSuccess?.(result);\n        return result;\n      } catch (err) {\n        sideEffects?.onError?.(err);\n        throw err;\n      }\n    },\n    requestTransformer: (query: QueryItemsRequest['query']) => {\n      const args = [query, {}] as [QueryItemsRequest['query'], {}];\n      return renameKeysFromSDKRequestToRESTRequest({\n        ...args?.[1],\n        query: args?.[0],\n      });\n    },\n    responseTransformer: ({ data }: HttpResponse<QueryItemsResponse>) => {\n      const transformedData = renameKeysFromRESTResponseToSDKResponse(\n        transformPaths(data, [\n          {\n            transformFn: transformRESTImageToSDKImage,\n            paths: [\n              { path: 'items.assets.image' },\n              { path: 'items.assets.vector' },\n              { path: 'items.assets.model3d.thumbnail' },\n            ],\n          },\n          {\n            transformFn: transformRESTVideoV2ToSDKVideoV2,\n            paths: [{ path: 'items.assets.video' }],\n          },\n          {\n            transformFn: transformRESTAudioToSDKAudio,\n            paths: [{ path: 'items.assets.audio' }],\n          },\n          {\n            transformFn: transformRESTDocumentToSDKDocument,\n            paths: [{ path: 'items.assets.document' }],\n          },\n        ])\n      );\n\n      return {\n        items: transformedData?.items,\n        pagingMetadata: transformedData?.pagingMetadata,\n      };\n    },\n    errorTransformer: (err: unknown) => {\n      const transformedError = sdkTransformError(err, {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { query: '$[0]' },\n        singleArgumentUnchanged: false,\n      });\n\n      throw transformedError;\n    },\n    pagingMethod: 'OFFSET',\n    transformationPaths: {},\n  });\n}\n\ninterface QueryOffsetResult {\n  currentPage: number | undefined;\n  totalPages: number | undefined;\n  totalCount: number | undefined;\n  hasNext: () => boolean;\n  hasPrev: () => boolean;\n  length: number;\n  pageSize: number;\n}\n\nexport interface ItemsQueryResult extends QueryOffsetResult {\n  items: EnterpriseMediaItem[];\n  query: ItemsQueryBuilder;\n  next: () => Promise<ItemsQueryResult>;\n  prev: () => Promise<ItemsQueryResult>;\n}\n\nexport interface ItemsQueryBuilder {\n  /** @param propertyName - Property whose value is compared with `value`.\n   * @param value - Value to compare against.\n   * @documentationMaturity preview\n   */\n  eq: (\n    propertyName: 'sizeInBytes' | 'title' | '_createdDate' | '_updatedDate',\n    value: any\n  ) => ItemsQueryBuilder;\n  /** @param propertyName - Property whose value is compared with `values`.\n   * @param values - List of values to compare against.\n   * @documentationMaturity preview\n   */\n  hasSome: (\n    propertyName: 'parentCategoryIds',\n    value: any[]\n  ) => ItemsQueryBuilder;\n  /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n   * @documentationMaturity preview\n   */\n  ascending: (\n    ...propertyNames: Array<\n      'sizeInBytes' | 'title' | '_createdDate' | '_updatedDate'\n    >\n  ) => ItemsQueryBuilder;\n  /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n   * @documentationMaturity preview\n   */\n  descending: (\n    ...propertyNames: Array<\n      'sizeInBytes' | 'title' | '_createdDate' | '_updatedDate'\n    >\n  ) => ItemsQueryBuilder;\n  /** @param limit - Number of items to return, which is also the `pageSize` of the results object.\n   * @documentationMaturity preview\n   */\n  limit: (limit: number) => ItemsQueryBuilder;\n  /** @param skip - Number of items to skip in the query results before returning the results.\n   * @documentationMaturity preview\n   */\n  skip: (skip: number) => ItemsQueryBuilder;\n  /** @documentationMaturity preview */\n  find: () => Promise<ItemsQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn com.wix.media.enterprise_public_media.v1.EnterpriseItemsService.QueryItems\n * @requiredField query\n */\nexport async function typedQueryItems(\n  query: EnterpriseMediaItemQuery\n): Promise<\n  NonNullablePaths<\n    QueryItemsResponse,\n    | `items`\n    | `items.${number}._id`\n    | `items.${number}.mediaType`\n    | `items.${number}.assets.archive._id`\n    | `items.${number}.assets.archive.url`\n    | `items.${number}.assets.model3d._id`\n    | `items.${number}.assets.model3d.url`\n    | `items.${number}.publishStatus`,\n    6\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({ query: query });\n\n  const reqOpts =\n    ambassadorWixMediaEnterprisePublicMediaV1EnterpriseItem.queryItems(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(result.data, [\n        {\n          transformFn: transformRESTImageToSDKImage,\n          paths: [\n            { path: 'items.assets.image' },\n            { path: 'items.assets.vector' },\n            { path: 'items.assets.model3d.thumbnail' },\n          ],\n        },\n        {\n          transformFn: transformRESTVideoV2ToSDKVideoV2,\n          paths: [{ path: 'items.assets.video' }],\n        },\n        {\n          transformFn: transformRESTAudioToSDKAudio,\n          paths: [{ path: 'items.assets.audio' }],\n        },\n        {\n          transformFn: transformRESTDocumentToSDKDocument,\n          paths: [{ path: 'items.assets.document' }],\n        },\n      ])\n    )!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { query: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['query']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface EnterpriseMediaItemQuerySpec extends QuerySpec {\n  paging: 'offset';\n  wql: [\n    {\n      fields: ['parentCategoryIds'];\n      operators: ['$hasSome'];\n      sort: 'NONE';\n    },\n    {\n      fields: ['_createdDate', '_updatedDate', 'sizeInBytes', 'title'];\n      operators: ['$eq'];\n      sort: 'BOTH';\n    }\n  ];\n}\n\nexport type CommonQueryWithEntityContext = QuerySdkType<\n  EnterpriseMediaItem,\n  EnterpriseMediaItemQuerySpec\n>;\nexport type EnterpriseMediaItemQuery = {\n  /** \n  Paging options to limit and skip the number of items.  \n  */\n  paging?: {\n    /** \n  Number of items to load.  \n  */\n    limit?: NonNullable<CommonQueryWithEntityContext['paging']>['limit'] | null;\n    /** \n  Number of items to skip in the current sort order.  \n  */\n    offset?:\n      | NonNullable<CommonQueryWithEntityContext['paging']>['offset']\n      | null;\n  };\n  /** \n  Filter object in the following format:\n  `\"filter\" : {\n  \"fieldName1\": \"value1\",\n  \"fieldName2\":{\"$operator\":\"value2\"}\n  }`\n  Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`  \n  */\n  filter?: CommonQueryWithEntityContext['filter'] | null;\n  /** \n  Sort object in the following format:\n  `[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]`  \n  */\n  sort?: {\n    /** \n  Name of the field to sort by.  \n  */\n    fieldName?: NonNullable<\n      CommonQueryWithEntityContext['sort']\n    >[number]['fieldName'];\n    /** \n  Sort order.  \n  */\n    order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];\n  }[];\n};\n\n/**\n * Updates an item.\n * To update multiple items in a single API call, call [Bulk Update Item](https://dev.wix.com/docs/api-reference/assets/media/enterprise-media/enterprise-item/bulk-update-item).\n * @param _id - Item ID.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField item\n * @permissionId MEDIA.ENTERPRISE_MEDIA_ITEMS_UPDATE\n * @applicableIdentity APP\n * @returns Updated item.\n * @fqn com.wix.media.enterprise_public_media.v1.EnterpriseItemsService.UpdateItem\n */\nexport async function updateItem(\n  _id: string,\n  item: UpdateItem\n): Promise<\n  NonNullablePaths<\n    EnterpriseMediaItem,\n    | `_id`\n    | `mediaType`\n    | `assets.archive._id`\n    | `assets.archive.url`\n    | `assets.model3d._id`\n    | `assets.model3d.url`\n    | `displayTags`\n    | `internalTags`\n    | `systemTags`\n    | `parentCategoryIds`\n    | `publishStatus`,\n    4\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[2] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = transformPaths(\n    renameKeysFromSDKRequestToRESTRequest({ item: { ...item, id: _id } }),\n    [\n      {\n        transformFn: transformSDKImageToRESTImage,\n        paths: [\n          { path: 'item.assets.image' },\n          { path: 'item.assets.vector' },\n          { path: 'item.assets.model3d.thumbnail' },\n        ],\n      },\n      {\n        transformFn: transformSDKVideoV2ToRESTVideoV2,\n        paths: [{ path: 'item.assets.video' }],\n      },\n      {\n        transformFn: transformSDKAudioToRESTAudio,\n        paths: [{ path: 'item.assets.audio' }],\n      },\n      {\n        transformFn: transformSDKDocumentToRESTDocument,\n        paths: [{ path: 'item.assets.document' }],\n      },\n    ]\n  );\n\n  const reqOpts =\n    ambassadorWixMediaEnterprisePublicMediaV1EnterpriseItem.updateItem(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(result.data, [\n        {\n          transformFn: transformRESTImageToSDKImage,\n          paths: [\n            { path: 'item.assets.image' },\n            { path: 'item.assets.vector' },\n            { path: 'item.assets.model3d.thumbnail' },\n          ],\n        },\n        {\n          transformFn: transformRESTVideoV2ToSDKVideoV2,\n          paths: [{ path: 'item.assets.video' }],\n        },\n        {\n          transformFn: transformRESTAudioToSDKAudio,\n          paths: [{ path: 'item.assets.audio' }],\n        },\n        {\n          transformFn: transformRESTDocumentToSDKDocument,\n          paths: [{ path: 'item.assets.document' }],\n        },\n      ])\n    )?.item!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: { item: '$[1]' },\n        explicitPathsToArguments: { 'item.id': '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['_id', 'item']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface UpdateItem {\n  /**\n   * Item ID.\n   * @maxLength 100\n   * @readonly\n   */\n  _id?: string;\n  /**\n   * Media type of the item.\n   * @readonly\n   */\n  mediaType?: MediaTypeWithLiterals;\n  /**\n   * Size of the uploaded file in bytes.\n   * @readonly\n   * @maxLength 1000\n   */\n  sizeInBytes?: string | null;\n  /**\n   * Title of the item. Used for searching and displaying the item.\n   * @maxLength 1000\n   */\n  title?: string | null;\n  /**\n   * Item assets including URLs for different renditions and formats.\n   * @readonly\n   */\n  assets?: ItemAssets;\n  /**\n   * User-facing tags describing the item. Indexed for text search; supports partial matching.\n   * @maxSize 100\n   * @maxLength 100\n   */\n  displayTags?: string[] | null;\n  /**\n   * Tags for custom categorization by client applications. Searchable with exact match only.\n   * @maxSize 100\n   * @maxLength 100\n   */\n  internalTags?: string[] | null;\n  /**\n   * Read-only tags generated by the system. Includes information about the uploader (via `uploaderSystemTag`) and external source references (via `uploaderInfoSystemTag`). Use these tags to filter items by their source.\n   * @maxSize 100\n   * @maxLength 100\n   * @readonly\n   */\n  systemTags?: string[] | null;\n  /**\n   * IDs of categories the item belongs to. To modify category assignments, call [Link Item To Categories](https://dev.wix.com/docs/api-reference/assets/media/enterprise-media/enterprise-item/link-item-to-categories), [Unlink Item From Categories](https://dev.wix.com/docs/api-reference/assets/media/enterprise-media/enterprise-item/unlink-item-from-categories), or [Overwrite Item Categories](https://dev.wix.com/docs/api-reference/assets/media/enterprise-media/enterprise-item/overwrite-item-categories).\n   * @maxSize 100\n   * @maxLength 100\n   * @readonly\n   */\n  parentCategoryIds?: string[] | null;\n  /** Publish status of the item. When `PUBLISHED`, the item is visible in child accounts' media managers. When `UNPUBLISHED`, the item is only visible in the account dashboard. */\n  publishStatus?: PublishStatusWithLiterals;\n  /**\n   * Date and time the item was created.\n   * @readonly\n   */\n  _createdDate?: Date | null;\n  /**\n   * Date and time the item was updated.\n   * @readonly\n   */\n  _updatedDate?: Date | null;\n  /**\n   * Internal ID used to reference the item within Wix media systems.\n   * @maxLength 100\n   * @readonly\n   */\n  internalId?: string | null;\n}\n\n/**\n * Updates multiple items in a single API call.\n *\n * To update a single item, call [Update Item](https://dev.wix.com/docs/api-reference/assets/media/enterprise-media/enterprise-item/update-item).\n * @param updateItemRequests - List of items to update. Each item must include an ID.\n * @public\n * @documentationMaturity preview\n * @requiredField updateItemRequests\n * @requiredField updateItemRequests.item._id\n * @permissionId MEDIA.ENTERPRISE_MEDIA_ITEMS_UPDATE\n * @applicableIdentity APP\n * @fqn com.wix.media.enterprise_public_media.v1.EnterpriseItemsService.BulkUpdateItem\n */\nexport async function bulkUpdateItem(\n  updateItemRequests: NonNullablePaths<UpdateItemRequest, `item._id`, 3>[],\n  options?: BulkUpdateItemOptions\n): Promise<\n  NonNullablePaths<\n    BulkUpdateItemResponse,\n    | `results`\n    | `results.${number}.itemMetadata.originalIndex`\n    | `results.${number}.itemMetadata.success`\n    | `results.${number}.itemMetadata.error.code`\n    | `results.${number}.itemMetadata.error.description`\n    | `results.${number}.item._id`\n    | `results.${number}.item.mediaType`\n    | `results.${number}.item.publishStatus`\n    | `bulkActionMetadata.totalSuccesses`\n    | `bulkActionMetadata.totalFailures`\n    | `bulkActionMetadata.undetailedFailures`,\n    6\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[2] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = transformPaths(\n    renameKeysFromSDKRequestToRESTRequest({\n      updateItemRequests: updateItemRequests,\n      returnEntity: options?.returnEntity,\n    }),\n    [\n      {\n        transformFn: transformSDKImageToRESTImage,\n        paths: [\n          { path: 'updateItemRequests.item.assets.image' },\n          { path: 'updateItemRequests.item.assets.vector' },\n          { path: 'updateItemRequests.item.assets.model3d.thumbnail' },\n        ],\n      },\n      {\n        transformFn: transformSDKVideoV2ToRESTVideoV2,\n        paths: [{ path: 'updateItemRequests.item.assets.video' }],\n      },\n      {\n        transformFn: transformSDKAudioToRESTAudio,\n        paths: [{ path: 'updateItemRequests.item.assets.audio' }],\n      },\n      {\n        transformFn: transformSDKDocumentToRESTDocument,\n        paths: [{ path: 'updateItemRequests.item.assets.document' }],\n      },\n    ]\n  );\n\n  const reqOpts =\n    ambassadorWixMediaEnterprisePublicMediaV1EnterpriseItem.bulkUpdateItem(\n      payload\n    );\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(result.data, [\n        {\n          transformFn: transformRESTImageToSDKImage,\n          paths: [\n            { path: 'results.item.assets.image' },\n            { path: 'results.item.assets.vector' },\n            { path: 'results.item.assets.model3d.thumbnail' },\n          ],\n        },\n        {\n          transformFn: transformRESTVideoV2ToSDKVideoV2,\n          paths: [{ path: 'results.item.assets.video' }],\n        },\n        {\n          transformFn: transformRESTAudioToSDKAudio,\n          paths: [{ path: 'results.item.assets.audio' }],\n        },\n        {\n          transformFn: transformRESTDocumentToSDKDocument,\n          paths: [{ path: 'results.item.assets.document' }],\n        },\n      ])\n    )!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          updateItemRequests: '$[0]',\n          returnEntity: '$[1].returnEntity',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['updateItemRequests', 'options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface BulkUpdateItemOptions {\n  /** Whether to return the updated items in the response. */\n  returnEntity?: boolean;\n}\n\n/**\n * Retrieves an item by ID.\n * @param itemId - Item ID.\n * @public\n * @documentationMaturity preview\n * @requiredField itemId\n * @permissionId MEDIA.ENTERPRISE_MEDIA_ITEMS_READ\n * @applicableIdentity APP\n * @returns Retrieved item.\n * @fqn com.wix.media.enterprise_public_media.v1.EnterpriseItemsService.GetItem\n */\nexport async function getItem(\n  itemId: string\n): Promise<\n  NonNullablePaths<\n    EnterpriseMediaItem,\n    | `_id`\n    | `mediaType`\n    | `assets.archive._id`\n    | `assets.archive.url`\n    | `assets.model3d._id`\n    | `assets.model3d.url`\n    | `displayTags`\n    | `internalTags`\n    | `systemTags`\n    | `parentCategoryIds`\n    | `publishStatus`,\n    4\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({ itemId: itemId });\n\n  const reqOpts =\n    ambassadorWixMediaEnterprisePublicMediaV1EnterpriseItem.getItem(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(result.data, [\n        {\n          transformFn: transformRESTImageToSDKImage,\n          paths: [\n            { path: 'item.assets.image' },\n            { path: 'item.assets.vector' },\n            { path: 'item.assets.model3d.thumbnail' },\n          ],\n        },\n        {\n          transformFn: transformRESTVideoV2ToSDKVideoV2,\n          paths: [{ path: 'item.assets.video' }],\n        },\n        {\n          transformFn: transformRESTAudioToSDKAudio,\n          paths: [{ path: 'item.assets.audio' }],\n        },\n        {\n          transformFn: transformRESTDocumentToSDKDocument,\n          paths: [{ path: 'item.assets.document' }],\n        },\n      ])\n    )?.item!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { itemId: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['itemId']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Links an item to multiple categories. Adds to existing category links without removing them.\n *\n * To replace all category links, call [Overwrite Item Categories](https://dev.wix.com/docs/api-reference/assets/media/enterprise-media/enterprise-item/overwrite-item-categories). To remove specific category links, call [Unlink Item From Categories](https://dev.wix.com/docs/api-reference/assets/media/enterprise-media/enterprise-item/unlink-item-from-categories).\n * @param itemId - Item ID.\n * @public\n * @documentationMaturity preview\n * @requiredField itemId\n * @permissionId MEDIA.ENTERPRISE_MEDIA_ITEMS_UPDATE_CATEGORIES\n * @applicableIdentity APP\n * @fqn com.wix.media.enterprise_public_media.v1.EnterpriseItemsService.LinkItemToCategories\n */\nexport async function linkItemToCategories(\n  itemId: string,\n  options?: LinkItemToCategoriesOptions\n): Promise<\n  NonNullablePaths<LinkItemToCategoriesResponse, `linkedCategoryIds`, 2>\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[2] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    itemId: itemId,\n    categoryIds: options?.categoryIds,\n  });\n\n  const reqOpts =\n    ambassadorWixMediaEnterprisePublicMediaV1EnterpriseItem.linkItemToCategories(\n      payload\n    );\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          itemId: '$[0]',\n          categoryIds: '$[1].categoryIds',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['itemId', 'options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface LinkItemToCategoriesOptions {\n  /**\n   * IDs of categories to link to the item.\n   * @maxLength 100\n   * @maxSize 20\n   */\n  categoryIds?: string[];\n}\n\n/**\n * Unlinks an item from multiple categories. Removes specified category links while keeping others.\n *\n * To replace all category links, call [Overwrite Item Categories](https://dev.wix.com/docs/api-reference/assets/media/enterprise-media/enterprise-item/overwrite-item-categories). To add category links, call [Link Item To Categories](https://dev.wix.com/docs/api-reference/assets/media/enterprise-media/enterprise-item/link-item-to-categories).\n * @param itemId - Item ID.\n * @public\n * @documentationMaturity preview\n * @requiredField itemId\n * @permissionId MEDIA.ENTERPRISE_MEDIA_ITEMS_UPDATE_CATEGORIES\n * @applicableIdentity APP\n * @fqn com.wix.media.enterprise_public_media.v1.EnterpriseItemsService.UnlinkItemFromCategories\n */\nexport async function unlinkItemFromCategories(\n  itemId: string,\n  options?: UnlinkItemFromCategoriesOptions\n): Promise<\n  NonNullablePaths<UnlinkItemFromCategoriesResponse, `unlinkedCategoryIds`, 2>\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[2] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    itemId: itemId,\n    categoryIds: options?.categoryIds,\n  });\n\n  const reqOpts =\n    ambassadorWixMediaEnterprisePublicMediaV1EnterpriseItem.unlinkItemFromCategories(\n      payload\n    );\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          itemId: '$[0]',\n          categoryIds: '$[1].categoryIds',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['itemId', 'options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface UnlinkItemFromCategoriesOptions {\n  /**\n   * IDs of categories to unlink from the item.\n   * @maxLength 100\n   * @maxSize 20\n   */\n  categoryIds?: string[];\n}\n\n/**\n * Replaces all existing category links with the specified categories.\n *\n * To add category links without removing existing ones, call [Link Item To Categories](https://dev.wix.com/docs/api-reference/assets/media/enterprise-media/enterprise-item/link-item-to-categories). To remove specific category links, call [Unlink Item From Categories](https://dev.wix.com/docs/api-reference/assets/media/enterprise-media/enterprise-item/unlink-item-from-categories).\n * @param itemId - Item ID.\n * @public\n * @documentationMaturity preview\n * @requiredField itemId\n * @permissionId MEDIA.ENTERPRISE_MEDIA_ITEMS_UPDATE_CATEGORIES\n * @applicableIdentity APP\n * @fqn com.wix.media.enterprise_public_media.v1.EnterpriseItemsService.OverwriteItemCategories\n */\nexport async function overwriteItemCategories(\n  itemId: string,\n  options?: OverwriteItemCategoriesOptions\n): Promise<\n  NonNullablePaths<\n    OverwriteItemCategoriesResponse,\n    `linkedCategoryIds` | `unlinkedCategoryIds`,\n    2\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[2] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    itemId: itemId,\n    categoryIds: options?.categoryIds,\n  });\n\n  const reqOpts =\n    ambassadorWixMediaEnterprisePublicMediaV1EnterpriseItem.overwriteItemCategories(\n      payload\n    );\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          itemId: '$[0]',\n          categoryIds: '$[1].categoryIds',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['itemId', 'options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface OverwriteItemCategoriesOptions {\n  /**\n   * IDs of categories the item will be linked to after this operation. All existing category links will be replaced.\n   * @maxLength 100\n   * @maxSize 20\n   */\n  categoryIds?: string[];\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixMediaEnterprisePublicMediaV1EnterpriseItemsServiceUrl(\n  opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n  const domainToMappings = {\n    'manage._base_domain_': [\n      {\n        srcPath: '/_api/enterprise-public-media-server',\n        destPath: '',\n      },\n    ],\n    'bo._base_domain_': [\n      {\n        srcPath: '/_api/enterprise-public-media-server',\n        destPath: '',\n      },\n    ],\n    'wixbo.ai': [\n      {\n        srcPath: '/_api/enterprise-public-media-server',\n        destPath: '',\n      },\n    ],\n    'wix-bo.com': [\n      {\n        srcPath: '/_api/enterprise-public-media-server',\n        destPath: '',\n      },\n    ],\n    'apps._base_domain_': [\n      {\n        srcPath: '/_api/enterprise-public-media-server',\n        destPath: '',\n      },\n    ],\n    'editor._base_domain_': [\n      {\n        srcPath: '/_api/enterprise-public-media-server',\n        destPath: '',\n      },\n    ],\n    'blocks._base_domain_': [\n      {\n        srcPath: '/_api/enterprise-public-media-server',\n        destPath: '',\n      },\n    ],\n    'create.editorx': [\n      {\n        srcPath: '/_api/enterprise-public-media-server',\n        destPath: '',\n      },\n    ],\n  };\n\n  return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_media_enterprise-media-items';\n\n/** Internal endpoint called by the public media backend when a file is created. Creates domain events for the Enterprise Public Media system. */\nexport function itemUploadCallback(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __itemUploadCallback({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.media.enterprise_public_media.v1.enterprise_item',\n      method: 'POST' as any,\n      methodFqn:\n        'com.wix.media.enterprise_public_media.v1.EnterpriseItemsService.ItemUploadCallback',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixMediaEnterprisePublicMediaV1EnterpriseItemsServiceUrl({\n        protoPath: '/v1/enterprise/items/upload/callback',\n        data: payload,\n        host,\n      }),\n      data: payload,\n    };\n\n    return metadata;\n  }\n\n  return __itemUploadCallback;\n}\n\n/** Generates an upload URL for uploading local files to the Enterprise Public Media system. After uploading the file to the returned URL, the system processes it asynchronously. The item becomes available once processing completes. */\nexport function generateFileUploadUrl(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __generateFileUploadUrl({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.media.enterprise_public_media.v1.enterprise_item',\n      method: 'POST' as any,\n      methodFqn:\n        'com.wix.media.enterprise_public_media.v1.EnterpriseItemsService.GenerateFileUploadUrl',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixMediaEnterprisePublicMediaV1EnterpriseItemsServiceUrl({\n        protoPath: '/v1/enterprise/items/upload/generate-url',\n        data: payload,\n        host,\n      }),\n      data: payload,\n    };\n\n    return metadata;\n  }\n\n  return __generateFileUploadUrl;\n}\n\n/**\n * Imports a file from a URL into the Enterprise Public Media system.\n *\n * To import a single file from your local machine, call [Generate File Upload Url](https://dev.wix.com/docs/api-reference/assets/media/enterprise-media/enterprise-item/generate-file-upload-url).\n */\nexport function importFile(payload: object): RequestOptionsFactory<any> {\n  function __importFile({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.media.enterprise_public_media.v1.enterprise_item',\n      method: 'POST' as any,\n      methodFqn:\n        'com.wix.media.enterprise_public_media.v1.EnterpriseItemsService.ImportFile',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixMediaEnterprisePublicMediaV1EnterpriseItemsServiceUrl({\n        protoPath: '/v1/enterprise/items/upload/import',\n        data: payload,\n        host,\n      }),\n      data: payload,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'item.createdDate' },\n              { path: 'item.updatedDate' },\n              { path: 'item.assets.image.urlExpirationDate' },\n              { path: 'item.assets.video.urlExpirationDate' },\n              { path: 'item.assets.video.resolutions.urlExpirationDate' },\n              {\n                path: 'item.assets.video.resolutions.poster.urlExpirationDate',\n              },\n              { path: 'item.assets.video.posters.urlExpirationDate' },\n              { path: 'item.assets.vector.urlExpirationDate' },\n              { path: 'item.assets.audio.urlExpirationDate' },\n              { path: 'item.assets.document.urlExpirationDate' },\n              { path: 'item.assets.archive.urlExpirationDate' },\n              { path: 'item.assets.model3d.urlExpirationDate' },\n              { path: 'item.assets.model3d.thumbnail.urlExpirationDate' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __importFile;\n}\n\n/**\n * Imports multiple files from URLs in a single API call. Check the `itemMetadata` in each result to identify successes and failures, and use `bulkActionMetadata` for an overview of total succeeded and failed operations.\n *\n * To import a single file from a URL, call [Import File](https://dev.wix.com/docs/api-reference/assets/media/enterprise-media/enterprise-item/import-file).\n */\nexport function bulkImportFiles(payload: object): RequestOptionsFactory<any> {\n  function __bulkImportFiles({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.media.enterprise_public_media.v1.enterprise_item',\n      method: 'POST' as any,\n      methodFqn:\n        'com.wix.media.enterprise_public_media.v1.EnterpriseItemsService.BulkImportFiles',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixMediaEnterprisePublicMediaV1EnterpriseItemsServiceUrl({\n        protoPath: '/v1/bulk/files/import',\n        data: payload,\n        host,\n      }),\n      data: payload,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'results.item.createdDate' },\n              { path: 'results.item.updatedDate' },\n              { path: 'results.item.assets.image.urlExpirationDate' },\n              { path: 'results.item.assets.video.urlExpirationDate' },\n              {\n                path: 'results.item.assets.video.resolutions.urlExpirationDate',\n              },\n              {\n                path: 'results.item.assets.video.resolutions.poster.urlExpirationDate',\n              },\n              { path: 'results.item.assets.video.posters.urlExpirationDate' },\n              { path: 'results.item.assets.vector.urlExpirationDate' },\n              { path: 'results.item.assets.audio.urlExpirationDate' },\n              { path: 'results.item.assets.document.urlExpirationDate' },\n              { path: 'results.item.assets.archive.urlExpirationDate' },\n              { path: 'results.item.assets.model3d.urlExpirationDate' },\n              {\n                path: 'results.item.assets.model3d.thumbnail.urlExpirationDate',\n              },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __bulkImportFiles;\n}\n\n/**\n * Searches for items using text-based search criteria.\n *\n * Search Items runs with these defaults, which you can override:\n *\n * - `paging.limit` is `50`\n * - `paging.offset` is `0`\n *\n * All filters support equality only. Each search must include a `categoryId` filter. Use this endpoint when you need to search for items by text. For retrieving items with custom sorting, use [Query Items](https://dev.wix.com/docs/api-reference/assets/media/enterprise-media/enterprise-item/query-items).\n *\n * To learn about working with search methods, 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).\n */\nexport function searchItems(payload: object): RequestOptionsFactory<any> {\n  function __searchItems({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.media.enterprise_public_media.v1.enterprise_item',\n      method: 'POST' as any,\n      methodFqn:\n        'com.wix.media.enterprise_public_media.v1.EnterpriseItemsService.SearchItems',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixMediaEnterprisePublicMediaV1EnterpriseItemsServiceUrl({\n        protoPath: '/v1/enterprise/items/search',\n        data: payload,\n        host,\n      }),\n      data: payload,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'items.createdDate' },\n              { path: 'items.updatedDate' },\n              { path: 'items.assets.image.urlExpirationDate' },\n              { path: 'items.assets.video.urlExpirationDate' },\n              { path: 'items.assets.video.resolutions.urlExpirationDate' },\n              {\n                path: 'items.assets.video.resolutions.poster.urlExpirationDate',\n              },\n              { path: 'items.assets.video.posters.urlExpirationDate' },\n              { path: 'items.assets.vector.urlExpirationDate' },\n              { path: 'items.assets.audio.urlExpirationDate' },\n              { path: 'items.assets.document.urlExpirationDate' },\n              { path: 'items.assets.archive.urlExpirationDate' },\n              { path: 'items.assets.model3d.urlExpirationDate' },\n              { path: 'items.assets.model3d.thumbnail.urlExpirationDate' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __searchItems;\n}\n\n/**\n * Retrieves a list of up to 200 items, given the provided paging, filtering, and sorting.\n *\n * Query Items runs with these defaults, which you can override:\n *\n * - Sorted by curation order\n * - `paging.limit` is `50`\n * - `paging.offset` is `0`\n *\n * Each query must include a `categoryId` filter. For text-based search, use [Search Items](https://dev.wix.com/docs/api-reference/assets/media/enterprise-media/enterprise-item/search-items).\n *\n * To learn about working with Query methods, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language), [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging), and [Field Projection](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-field-projection).\n */\nexport function queryItems(payload: object): RequestOptionsFactory<any> {\n  function __queryItems({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.media.enterprise_public_media.v1.enterprise_item',\n      method: 'POST' as any,\n      methodFqn:\n        'com.wix.media.enterprise_public_media.v1.EnterpriseItemsService.QueryItems',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixMediaEnterprisePublicMediaV1EnterpriseItemsServiceUrl({\n        protoPath: '/v1/enterprise/items/query',\n        data: payload,\n        host,\n      }),\n      data: payload,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'items.createdDate' },\n              { path: 'items.updatedDate' },\n              { path: 'items.assets.image.urlExpirationDate' },\n              { path: 'items.assets.video.urlExpirationDate' },\n              { path: 'items.assets.video.resolutions.urlExpirationDate' },\n              {\n                path: 'items.assets.video.resolutions.poster.urlExpirationDate',\n              },\n              { path: 'items.assets.video.posters.urlExpirationDate' },\n              { path: 'items.assets.vector.urlExpirationDate' },\n              { path: 'items.assets.audio.urlExpirationDate' },\n              { path: 'items.assets.document.urlExpirationDate' },\n              { path: 'items.assets.archive.urlExpirationDate' },\n              { path: 'items.assets.model3d.urlExpirationDate' },\n              { path: 'items.assets.model3d.thumbnail.urlExpirationDate' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __queryItems;\n}\n\n/**\n * Updates an item.\n * To update multiple items in a single API call, call [Bulk Update Item](https://dev.wix.com/docs/api-reference/assets/media/enterprise-media/enterprise-item/bulk-update-item).\n */\nexport function updateItem(payload: object): RequestOptionsFactory<any> {\n  function __updateItem({ host }: any) {\n    const serializedData = transformPaths(payload, [\n      {\n        transformFn: transformSDKFieldMaskToRESTFieldMask,\n        paths: [{ path: 'fieldMask' }],\n      },\n      {\n        transformFn: transformSDKTimestampToRESTTimestamp,\n        paths: [\n          { path: 'item.createdDate' },\n          { path: 'item.updatedDate' },\n          { path: 'item.assets.image.urlExpirationDate' },\n          { path: 'item.assets.video.urlExpirationDate' },\n          { path: 'item.assets.video.resolutions.urlExpirationDate' },\n          { path: 'item.assets.video.resolutions.poster.urlExpirationDate' },\n          { path: 'item.assets.video.posters.urlExpirationDate' },\n          { path: 'item.assets.vector.urlExpirationDate' },\n          { path: 'item.assets.audio.urlExpirationDate' },\n          { path: 'item.assets.document.urlExpirationDate' },\n          { path: 'item.assets.archive.urlExpirationDate' },\n          { path: 'item.assets.model3d.urlExpirationDate' },\n          { path: 'item.assets.model3d.thumbnail.urlExpirationDate' },\n        ],\n      },\n    ]);\n    const metadata = {\n      entityFqdn: 'wix.media.enterprise_public_media.v1.enterprise_item',\n      method: 'PATCH' as any,\n      methodFqn:\n        'com.wix.media.enterprise_public_media.v1.EnterpriseItemsService.UpdateItem',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixMediaEnterprisePublicMediaV1EnterpriseItemsServiceUrl({\n        protoPath: '/v1/enterprise/items/{item.id}',\n        data: serializedData,\n        host,\n      }),\n      data: serializedData,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'item.createdDate' },\n              { path: 'item.updatedDate' },\n              { path: 'item.assets.image.urlExpirationDate' },\n              { path: 'item.assets.video.urlExpirationDate' },\n              { path: 'item.assets.video.resolutions.urlExpirationDate' },\n              {\n                path: 'item.assets.video.resolutions.poster.urlExpirationDate',\n              },\n              { path: 'item.assets.video.posters.urlExpirationDate' },\n              { path: 'item.assets.vector.urlExpirationDate' },\n              { path: 'item.assets.audio.urlExpirationDate' },\n              { path: 'item.assets.document.urlExpirationDate' },\n              { path: 'item.assets.archive.urlExpirationDate' },\n              { path: 'item.assets.model3d.urlExpirationDate' },\n              { path: 'item.assets.model3d.thumbnail.urlExpirationDate' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __updateItem;\n}\n\n/**\n * Updates multiple items in a single API call.\n *\n * To update a single item, call [Update Item](https://dev.wix.com/docs/api-reference/assets/media/enterprise-media/enterprise-item/update-item).\n */\nexport function bulkUpdateItem(payload: object): RequestOptionsFactory<any> {\n  function __bulkUpdateItem({ host }: any) {\n    const serializedData = transformPaths(payload, [\n      {\n        transformFn: transformSDKFieldMaskToRESTFieldMask,\n        paths: [{ path: 'updateItemRequests.fieldMask' }],\n      },\n      {\n        transformFn: transformSDKTimestampToRESTTimestamp,\n        paths: [\n          { path: 'updateItemRequests.item.createdDate' },\n          { path: 'updateItemRequests.item.updatedDate' },\n          { path: 'updateItemRequests.item.assets.image.urlExpirationDate' },\n          { path: 'updateItemRequests.item.assets.video.urlExpirationDate' },\n          {\n            path: 'updateItemRequests.item.assets.video.resolutions.urlExpirationDate',\n          },\n          {\n            path: 'updateItemRequests.item.assets.video.resolutions.poster.urlExpirationDate',\n          },\n          {\n            path: 'updateItemRequests.item.assets.video.posters.urlExpirationDate',\n          },\n          { path: 'updateItemRequests.item.assets.vector.urlExpirationDate' },\n          { path: 'updateItemRequests.item.assets.audio.urlExpirationDate' },\n          { path: 'updateItemRequests.item.assets.document.urlExpirationDate' },\n          { path: 'updateItemRequests.item.assets.archive.urlExpirationDate' },\n          { path: 'updateItemRequests.item.assets.model3d.urlExpirationDate' },\n          {\n            path: 'updateItemRequests.item.assets.model3d.thumbnail.urlExpirationDate',\n          },\n        ],\n      },\n    ]);\n    const metadata = {\n      entityFqdn: 'wix.media.enterprise_public_media.v1.enterprise_item',\n      method: 'PATCH' as any,\n      methodFqn:\n        'com.wix.media.enterprise_public_media.v1.EnterpriseItemsService.BulkUpdateItem',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixMediaEnterprisePublicMediaV1EnterpriseItemsServiceUrl({\n        protoPath: '/v1/bulk/enterprise/items/update',\n        data: serializedData,\n        host,\n      }),\n      data: serializedData,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'results.item.createdDate' },\n              { path: 'results.item.updatedDate' },\n              { path: 'results.item.assets.image.urlExpirationDate' },\n              { path: 'results.item.assets.video.urlExpirationDate' },\n              {\n                path: 'results.item.assets.video.resolutions.urlExpirationDate',\n              },\n              {\n                path: 'results.item.assets.video.resolutions.poster.urlExpirationDate',\n              },\n              { path: 'results.item.assets.video.posters.urlExpirationDate' },\n              { path: 'results.item.assets.vector.urlExpirationDate' },\n              { path: 'results.item.assets.audio.urlExpirationDate' },\n              { path: 'results.item.assets.document.urlExpirationDate' },\n              { path: 'results.item.assets.archive.urlExpirationDate' },\n              { path: 'results.item.assets.model3d.urlExpirationDate' },\n              {\n                path: 'results.item.assets.model3d.thumbnail.urlExpirationDate',\n              },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __bulkUpdateItem;\n}\n\n/** Retrieves an item by ID. */\nexport function getItem(payload: object): RequestOptionsFactory<any> {\n  function __getItem({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.media.enterprise_public_media.v1.enterprise_item',\n      method: 'GET' as any,\n      methodFqn:\n        'com.wix.media.enterprise_public_media.v1.EnterpriseItemsService.GetItem',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixMediaEnterprisePublicMediaV1EnterpriseItemsServiceUrl({\n        protoPath: '/v1/enterprise/items/{itemId}',\n        data: payload,\n        host,\n      }),\n      params: toURLSearchParams(payload),\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'item.createdDate' },\n              { path: 'item.updatedDate' },\n              { path: 'item.assets.image.urlExpirationDate' },\n              { path: 'item.assets.video.urlExpirationDate' },\n              { path: 'item.assets.video.resolutions.urlExpirationDate' },\n              {\n                path: 'item.assets.video.resolutions.poster.urlExpirationDate',\n              },\n              { path: 'item.assets.video.posters.urlExpirationDate' },\n              { path: 'item.assets.vector.urlExpirationDate' },\n              { path: 'item.assets.audio.urlExpirationDate' },\n              { path: 'item.assets.document.urlExpirationDate' },\n              { path: 'item.assets.archive.urlExpirationDate' },\n              { path: 'item.assets.model3d.urlExpirationDate' },\n              { path: 'item.assets.model3d.thumbnail.urlExpirationDate' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __getItem;\n}\n\n/**\n * Links an item to multiple categories. Adds to existing category links without removing them.\n *\n * To replace all category links, call [Overwrite Item Categories](https://dev.wix.com/docs/api-reference/assets/media/enterprise-media/enterprise-item/overwrite-item-categories). To remove specific category links, call [Unlink Item From Categories](https://dev.wix.com/docs/api-reference/assets/media/enterprise-media/enterprise-item/unlink-item-from-categories).\n */\nexport function linkItemToCategories(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __linkItemToCategories({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.media.enterprise_public_media.v1.enterprise_item',\n      method: 'POST' as any,\n      methodFqn:\n        'com.wix.media.enterprise_public_media.v1.EnterpriseItemsService.LinkItemToCategories',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixMediaEnterprisePublicMediaV1EnterpriseItemsServiceUrl({\n        protoPath: '/v1/enterprise/items/{itemId}/link-categories',\n        data: payload,\n        host,\n      }),\n      data: payload,\n    };\n\n    return metadata;\n  }\n\n  return __linkItemToCategories;\n}\n\n/**\n * Unlinks an item from multiple categories. Removes specified category links while keeping others.\n *\n * To replace all category links, call [Overwrite Item Categories](https://dev.wix.com/docs/api-reference/assets/media/enterprise-media/enterprise-item/overwrite-item-categories). To add category links, call [Link Item To Categories](https://dev.wix.com/docs/api-reference/assets/media/enterprise-media/enterprise-item/link-item-to-categories).\n */\nexport function unlinkItemFromCategories(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __unlinkItemFromCategories({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.media.enterprise_public_media.v1.enterprise_item',\n      method: 'POST' as any,\n      methodFqn:\n        'com.wix.media.enterprise_public_media.v1.EnterpriseItemsService.UnlinkItemFromCategories',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixMediaEnterprisePublicMediaV1EnterpriseItemsServiceUrl({\n        protoPath: '/v1/enterprise/items/{itemId}/unlink-categories',\n        data: payload,\n        host,\n      }),\n      data: payload,\n    };\n\n    return metadata;\n  }\n\n  return __unlinkItemFromCategories;\n}\n\n/**\n * Replaces all existing category links with the specified categories.\n *\n * To add category links without removing existing ones, call [Link Item To Categories](https://dev.wix.com/docs/api-reference/assets/media/enterprise-media/enterprise-item/link-item-to-categories). To remove specific category links, call [Unlink Item From Categories](https://dev.wix.com/docs/api-reference/assets/media/enterprise-media/enterprise-item/unlink-item-from-categories).\n */\nexport function overwriteItemCategories(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __overwriteItemCategories({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.media.enterprise_public_media.v1.enterprise_item',\n      method: 'POST' as any,\n      methodFqn:\n        'com.wix.media.enterprise_public_media.v1.EnterpriseItemsService.OverwriteItemCategories',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixMediaEnterprisePublicMediaV1EnterpriseItemsServiceUrl({\n        protoPath: '/v1/enterprise/items/{itemId}/overwrite-categories',\n        data: payload,\n        host,\n      }),\n      data: payload,\n    };\n\n    return metadata;\n  }\n\n  return __overwriteItemCategories;\n}\n","import {\n  itemUploadCallback as publicItemUploadCallback,\n  generateFileUploadUrl as publicGenerateFileUploadUrl,\n  importFile as publicImportFile,\n  bulkImportFiles as publicBulkImportFiles,\n  searchItems as publicSearchItems,\n  queryItems as publicQueryItems,\n  typedQueryItems as publicTypedQueryItems,\n  updateItem as publicUpdateItem,\n  bulkUpdateItem as publicBulkUpdateItem,\n  getItem as publicGetItem,\n  linkItemToCategories as publicLinkItemToCategories,\n  unlinkItemFromCategories as publicUnlinkItemFromCategories,\n  overwriteItemCategories as publicOverwriteItemCategories,\n} from './media-enterprise-public-media-v1-enterprise-item-enterprise-media-items.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n  BuildRESTFunction,\n  MaybeContext,\n  BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { HttpClient } from '@wix/sdk-types';\nimport { createQueryOverloadRouter } from '@wix/sdk-runtime/query-method-router';\nimport {\n  EnterpriseMediaItemQuery,\n  ItemsQueryBuilder,\n  typedQueryItems as universalTypedQueryItems,\n} from './media-enterprise-public-media-v1-enterprise-item-enterprise-media-items.universal.js';\nimport { onEnterpriseItemCreated as publicOnEnterpriseItemCreated } from './media-enterprise-public-media-v1-enterprise-item-enterprise-media-items.public.js';\nimport { onEnterpriseItemItemCategoriesChanged as publicOnEnterpriseItemItemCategoriesChanged } from './media-enterprise-public-media-v1-enterprise-item-enterprise-media-items.public.js';\nimport { onEnterpriseItemPublishStatusChanged as publicOnEnterpriseItemPublishStatusChanged } from './media-enterprise-public-media-v1-enterprise-item-enterprise-media-items.public.js';\nimport { onEnterpriseItemUpdated as publicOnEnterpriseItemUpdated } from './media-enterprise-public-media-v1-enterprise-item-enterprise-media-items.public.js';\n\nfunction customQueryItems(httpClient: HttpClient) {\n  const router = createQueryOverloadRouter({\n    builderQueryFunction: () => publicQueryItems(httpClient)(),\n    typedQueryFunction: (query: EnterpriseMediaItemQuery) =>\n      publicTypedQueryItems(httpClient)(query),\n    hasOptionsParameter: false,\n  });\n\n  function overloadedQuery(): ItemsQueryBuilder;\n  function overloadedQuery(\n    query: EnterpriseMediaItemQuery\n  ): ReturnType<typeof universalTypedQueryItems>;\n  function overloadedQuery(query?: EnterpriseMediaItemQuery): any {\n    return router(...arguments);\n  }\n\n  return overloadedQuery;\n}\n\nexport const itemUploadCallback: MaybeContext<\n  BuildRESTFunction<typeof publicItemUploadCallback> &\n    typeof publicItemUploadCallback\n> = /*#__PURE__*/ createRESTModule(publicItemUploadCallback);\nexport const generateFileUploadUrl: MaybeContext<\n  BuildRESTFunction<typeof publicGenerateFileUploadUrl> &\n    typeof publicGenerateFileUploadUrl\n> = /*#__PURE__*/ createRESTModule(publicGenerateFileUploadUrl);\nexport const importFile: MaybeContext<\n  BuildRESTFunction<typeof publicImportFile> & typeof publicImportFile\n> = /*#__PURE__*/ createRESTModule(publicImportFile);\nexport const bulkImportFiles: MaybeContext<\n  BuildRESTFunction<typeof publicBulkImportFiles> & typeof publicBulkImportFiles\n> = /*#__PURE__*/ createRESTModule(publicBulkImportFiles);\nexport const searchItems: MaybeContext<\n  BuildRESTFunction<typeof publicSearchItems> & typeof publicSearchItems\n> = /*#__PURE__*/ createRESTModule(publicSearchItems);\nexport const updateItem: MaybeContext<\n  BuildRESTFunction<typeof publicUpdateItem> & typeof publicUpdateItem\n> = /*#__PURE__*/ createRESTModule(publicUpdateItem);\nexport const bulkUpdateItem: MaybeContext<\n  BuildRESTFunction<typeof publicBulkUpdateItem> & typeof publicBulkUpdateItem\n> = /*#__PURE__*/ createRESTModule(publicBulkUpdateItem);\nexport const getItem: MaybeContext<\n  BuildRESTFunction<typeof publicGetItem> & typeof publicGetItem\n> = /*#__PURE__*/ createRESTModule(publicGetItem);\nexport const linkItemToCategories: MaybeContext<\n  BuildRESTFunction<typeof publicLinkItemToCategories> &\n    typeof publicLinkItemToCategories\n> = /*#__PURE__*/ createRESTModule(publicLinkItemToCategories);\nexport const unlinkItemFromCategories: MaybeContext<\n  BuildRESTFunction<typeof publicUnlinkItemFromCategories> &\n    typeof publicUnlinkItemFromCategories\n> = /*#__PURE__*/ createRESTModule(publicUnlinkItemFromCategories);\nexport const overwriteItemCategories: MaybeContext<\n  BuildRESTFunction<typeof publicOverwriteItemCategories> &\n    typeof publicOverwriteItemCategories\n> = /*#__PURE__*/ createRESTModule(publicOverwriteItemCategories);\nexport const queryItems: MaybeContext<\n  BuildRESTFunction<typeof customQueryItems> & typeof customQueryItems\n> = /*#__PURE__*/ createRESTModule(customQueryItems);\n/**\n * Triggered when an item is created.\n */\nexport const onEnterpriseItemCreated: BuildEventDefinition<\n  typeof publicOnEnterpriseItemCreated\n> &\n  typeof publicOnEnterpriseItemCreated = createEventModule(\n  publicOnEnterpriseItemCreated\n);\n/**\n * Triggered when an item's category links change.\n */\nexport const onEnterpriseItemItemCategoriesChanged: BuildEventDefinition<\n  typeof publicOnEnterpriseItemItemCategoriesChanged\n> &\n  typeof publicOnEnterpriseItemItemCategoriesChanged = createEventModule(\n  publicOnEnterpriseItemItemCategoriesChanged\n);\n/**\n * Triggered when an item's `publishStatus` changes.\n */\nexport const onEnterpriseItemPublishStatusChanged: BuildEventDefinition<\n  typeof publicOnEnterpriseItemPublishStatusChanged\n> &\n  typeof publicOnEnterpriseItemPublishStatusChanged = createEventModule(\n  publicOnEnterpriseItemPublishStatusChanged\n);\n/**\n * Triggered when an item is updated.\n */\nexport const onEnterpriseItemUpdated: BuildEventDefinition<\n  typeof publicOnEnterpriseItemUpdated\n> &\n  typeof publicOnEnterpriseItemUpdated = createEventModule(\n  publicOnEnterpriseItemUpdated\n);\n\nexport {\n  MediaType,\n  PublishStatus,\n  SortOrder,\n  WebhookIdentityType,\n} from './media-enterprise-public-media-v1-enterprise-item-enterprise-media-items.universal.js';\nexport {\n  EnterpriseMediaItem,\n  ItemAssets,\n  ItemAssetsAssetsOneOf,\n  VideoResolution,\n  Archive,\n  Model3D,\n  ItemCategoriesChanged,\n  ItemUploadCallbackRequest,\n  ItemUploadCallbackResponse,\n  GenerateFileUploadUrlRequest,\n  GenerateFileUploadUrlResponse,\n  ImportFileRequest,\n  ImportFileResponse,\n  BulkImportFilesRequest,\n  BulkImportFilesResponse,\n  BulkImportFilesResult,\n  ItemMetadata,\n  ApplicationError,\n  BulkActionMetadata,\n  SearchItemsRequest,\n  Search,\n  SearchPagingMethodOneOf,\n  Sorting,\n  SearchDetails,\n  Paging,\n  SearchItemsResponse,\n  PagingMetadataV2,\n  Cursors,\n  QueryItemsRequest,\n  QueryV2,\n  QueryV2PagingMethodOneOf,\n  QueryItemsResponse,\n  UpdateItemRequest,\n  UpdateItemResponse,\n  PublishStatusChanged,\n  BulkUpdateItemRequest,\n  BulkUpdateItemResponse,\n  BulkItemUpdateResult,\n  GetItemRequest,\n  GetItemResponse,\n  LinkItemToCategoriesRequest,\n  LinkItemToCategoriesResponse,\n  UnlinkItemFromCategoriesRequest,\n  UnlinkItemFromCategoriesResponse,\n  OverwriteItemCategoriesRequest,\n  OverwriteItemCategoriesResponse,\n  DomainEvent,\n  DomainEventBodyOneOf,\n  EntityCreatedEvent,\n  RestoreInfo,\n  EntityUpdatedEvent,\n  EntityDeletedEvent,\n  ActionEvent,\n  MessageEnvelope,\n  IdentificationData,\n  IdentificationDataIdOneOf,\n  AccountInfo,\n  BaseEventMetadata,\n  EventMetadata,\n  AccountInfoMetadata,\n  EnterpriseItemCreatedEnvelope,\n  EnterpriseItemItemCategoriesChangedEnvelope,\n  EnterpriseItemPublishStatusChangedEnvelope,\n  EnterpriseItemUpdatedEnvelope,\n  ItemUploadCallbackOptions,\n  GenerateFileUploadUrlOptions,\n  ImportFileOptions,\n  BulkImportFilesOptions,\n  EnterpriseMediaItemSearchSpec,\n  ItemsQueryResult,\n  ItemsQueryBuilder,\n  EnterpriseMediaItemQuerySpec,\n  UpdateItem,\n  BulkUpdateItemOptions,\n  LinkItemToCategoriesOptions,\n  UnlinkItemFromCategoriesOptions,\n  OverwriteItemCategoriesOptions,\n} from './media-enterprise-public-media-v1-enterprise-item-enterprise-media-items.universal.js';\nexport { utils } from './media-enterprise-public-media-v1-enterprise-item-enterprise-media-items.universal.js';\nexport {\n  MediaTypeWithLiterals,\n  PublishStatusWithLiterals,\n  SortOrderWithLiterals,\n  WebhookIdentityTypeWithLiterals,\n  CommonSearchWithEntityContext,\n  EnterpriseMediaItemSearch,\n  CommonQueryWithEntityContext,\n  EnterpriseMediaItemQuery,\n} from './media-enterprise-public-media-v1-enterprise-item-enterprise-media-items.universal.js';\n"],"mappings":";AAAA,SAAS,2CAAAA,gDAA+C;AACxD,SAAS,gCAAAC,qCAAoC;AAC7C,SAAS,sCAAAC,2CAA0C;AACnD,SAAS,gCAAAC,qCAAoC;AAC7C,SAAS,wCAAAC,6CAA4C;AACrD,SAAS,kBAAAC,uBAAsB;AAC/B,SAAS,oCAAAC,yCAAwC;AACjD,SAAS,uBAAqD;;;ACP9D,SAAS,kBAAkB,yBAAyB;AACpD,SAAS,oBAAoB;AAC7B;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACLP,SAAS,yBAAyB;AAClC,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,mEACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,oBAAoB;AAAA,MAClB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,YAAY;AAAA,MACV;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,cAAc;AAAA,MACZ;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE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BAAwB;AACpD,IAAMC,yBAGK,iCAAiBA,sBAA2B;AACvD,IAAMC,cAEK,iCAAiBA,WAAgB;AAC5C,IAAMC,mBAEK,iCAAiBA,gBAAqB;AACjD,IAAMC,eAEK,iCAAiBA,YAAiB;AAC7C,IAAMC,cAEK,iCAAiBA,WAAgB;AAC5C,IAAMC,kBAEK,iCAAiBA,eAAoB;AAChD,IAAMC,WAEK,iCAAiBA,QAAa;AACzC,IAAMC,wBAGK,iCAAiBA,qBAA0B;AACtD,IAAMC,4BAGK,iCAAiBA,yBAA8B;AAC1D,IAAMC,2BAGK,iCAAiBA,wBAA6B;AACzD,IAAMZ,cAEK,iCAAiB,gBAAgB;AAI5C,IAAMa,2BAG4B;AAAA,EACvC;AACF;AAIO,IAAMC,yCAG0C;AAAA,EACrD;AACF;AAIO,IAAMC,wCAGyC;AAAA,EACpD;AACF;AAIO,IAAMC,2BAG4B;AAAA,EACvC;AACF;","names":["renameKeysFromRESTResponseToSDKResponse","transformRESTAudioToSDKAudio","transformRESTDocumentToSDKDocument","transformRESTImageToSDKImage","transformRESTTimestampToSDKTimestamp","transformPaths","transformRESTVideoV2ToSDKVideoV2","payload","transformPaths","MediaType","PublishStatus","SortOrder","WebhookIdentityType","itemUploadCallback","generateFileUploadUrl","importFile","bulkImportFiles","searchItems","queryItems","updateItem","bulkUpdateItem","getItem","linkItemToCategories","unlinkItemFromCategories","overwriteItemCategories","itemUploadCallback","generateFileUploadUrl","importFile","bulkImportFiles","searchItems","queryItems","typedQueryItems","updateItem","bulkUpdateItem","getItem","linkItemToCategories","unlinkItemFromCategories","overwriteItemCategories","renameKeysFromRESTResponseToSDKResponse","transformPaths","transformRESTTimestampToSDKTimestamp","transformRESTImageToSDKImage","transformRESTVideoV2ToSDKVideoV2","transformRESTAudioToSDKAudio","transformRESTDocumentToSDKDocument","queryItems","typedQueryItems","itemUploadCallback","generateFileUploadUrl","importFile","bulkImportFiles","searchItems","updateItem","bulkUpdateItem","getItem","linkItemToCategories","unlinkItemFromCategories","overwriteItemCategories","onEnterpriseItemCreated","onEnterpriseItemItemCategoriesChanged","onEnterpriseItemPublishStatusChanged","onEnterpriseItemUpdated"]}