{"version":3,"sources":["jsdelivr-header.js","/npm/@wix/auto_sdk_data_sharing@1.0.15/index.ts","/npm/@wix/auto_sdk_data_sharing@1.0.15/src/data-v1-data-sharing-policy-sharing.public.ts","/npm/@wix/auto_sdk_data_sharing@1.0.15/src/data-v1-data-sharing-policy-sharing.universal.ts","/npm/@wix/auto_sdk_data_sharing@1.0.15/src/data-v1-data-sharing-policy-sharing.http.ts","/npm/@wix/auto_sdk_data_sharing@1.0.15/src/data-v1-data-sharing-policy-sharing.context.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,8iBCNA,cAAA,GAAA,SAAA,cAAA,CAAA,oBAAA,IAAA,oBAAA,0BAAA,IAAA,2BAAA,wBAAA,IAAA,yBAAA,wBAAA,IAAA,yBAAA,+BAAA,IAAA,gCAAA,qBAAA,IAAA,sBAAA,wBAAA,IAAA,yBAAA,0BAAA,IAAA,2BAAA,2BAAA,IAAA,4BAAA,2BAAA,IAAA,4BAAA,6CAAA,IAAA,8CAAA,gDAAA,IAAA,iDAAA,2BAAA,IAAA,4BAAA,wBAAA,IAAA,2BAAA,OAAA,QAAA,aAAA,eCAA,IAAA,+BAAwD,QAAA,2CACxD,kBAAqD,QAAA,8CACrD,wBAA+B,QAAA,oDAC/B,iBAA8D,QAAA,kBCH9D,uBAAoD,QAAA,oCACpD,8BAGO,QAAA,2CCJP,oBAAkC,QAAA,iCAClC,iBAAqD,QAAA,8CACrD,kBAAqD,QAAA,8CACrD,uBAA+B,QAAA,oDAC/B,qBAA2B,QAAA,iCAI3B,SAAS,mEACP,GAqWA,SAAO,qBAAA,YAAW,OAAO,OAAO,EAAM,CAAE,iBAnWf,CACvB,wBAAyB,CACvB,CACE,QAAS,cACT,SAAU,KAGd,qBAAsB,CACpB,CACE,QAAS,oCACT,SAAU,qBAEZ,CACE,QAAS,8BACT,SAAU,eAEZ,CACE,QAAS,gCACT,SAAU,iBAEZ,CACE,QAAS,8BACT,SAAU,qBAEZ,CACE,QAAS,w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AAe,EAAO,CACpB,CACE,YAAa,kBAAA,qCACb,MAAO,CACL,CAAE,KAAM,+BACR,CAAE,KAAM,+BACR,CAAE,KAAM,4BAXP,GAiBA,iDAAA,EAAkD,iBAAA,iBAC7D,kEACA,GACC,IAAA,EACC,+BAAA,0CAAA,EACE,wBAAA,gBAAe,EAAO,CACpB,CACE,YAAa,kBAAA,qCACb,MAAO,CACL,CAAE,KAAM,+BACR,CAAE,KAAM,+BACR,CAAE,KAAM,4BAXP,GAiBA,4BAAA,EAA6B,iBAAA,iBACxC,2CACA,GACC,IAAA,EACC,+BAAA,0CAAA,EACE,wBAAA,gBAAe,EAAO,CACpB,CACE,YAAa,kBAAA,qCACb,MAAO,CACL,CAAE,KAAM,sBACR,CAAE,KAAM,sBACR,CAAE,KAAM,4BAXP,GG5Vb,qBAAiC,QAAA,iCACjC,gCAAkC,QAAA,6CAYrB,0BAGK,EAAA,qBAAA,kBAAiB,0BACtB,0BAGK,EAAA,qBAAA,kBAAiB,0BACtB,0BAGK,EAAA,qBAAA,kBAAiB,0BACtB,uBAGK,EAAA,qBAAA,kBAAiB,uBACtB,0BAGK,EAAA,qBAAA,kBAAiB,0BACtB,4BAGK,EAAA,qBAAA,kBAAiB,4BACtB,4BAGK,EAAA,qBAAA,kBAAiB,4BACtB,iCAGK,EAAA,qBAAA,kBAAiB,iCAItB,+BAG+B,gCAAA,mBAC1C,4BAKW,+BAG+B,gCAAA,mBAC1C,4BAKW,iDAGiD,gCAAA,mBAC5D,8CAKW,oDAIX,gCAAA,mBAAkB,iDAIP,+BAG+B,gCAAA,mBAC1C","file":"/npm/@wix/auto_sdk_data_sharing@1.0.15/build/cjs/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@wix/auto_sdk_data_sharing@1.0.15/build/cjs/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","export * from './src/data-v1-data-sharing-policy-sharing.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n  ConnectToSharedCollectionApplicationErrors,\n  ConnectToSharedCollectionOptions,\n  ConnectToSharedCollectionResponse,\n  CreateDataSharingPolicyApplicationErrors,\n  CreateDataSharingPolicyOptions,\n  DataSharingPolicy,\n  DataSharingPolicyCreatedEnvelope,\n  DataSharingPolicyDeletedEnvelope,\n  DataSharingPolicySharedCollectionConnectedEnvelope,\n  DataSharingPolicySharedCollectionDisconnectedEnvelope,\n  DataSharingPolicyUpdatedEnvelope,\n  DeleteDataSharingPolicyApplicationErrors,\n  DisconnectFromSharedCollectionApplicationErrors,\n  DisconnectFromSharedCollectionOptions,\n  GetDataSharingPolicyApplicationErrors,\n  ListDataSharingPoliciesOptions,\n  ListDataSharingPoliciesResponse,\n  ListSharedDataCollectionsOptions,\n  ListSharedDataCollectionsResponse,\n  UpdateDataSharingPolicy,\n  UpdateDataSharingPolicyApplicationErrors,\n  connectToSharedCollection as universalConnectToSharedCollection,\n  createDataSharingPolicy as universalCreateDataSharingPolicy,\n  deleteDataSharingPolicy as universalDeleteDataSharingPolicy,\n  disconnectFromSharedCollection as universalDisconnectFromSharedCollection,\n  getDataSharingPolicy as universalGetDataSharingPolicy,\n  listDataSharingPolicies as universalListDataSharingPolicies,\n  listSharedDataCollections as universalListSharedDataCollections,\n  updateDataSharingPolicy as universalUpdateDataSharingPolicy,\n} from './data-v1-data-sharing-policy-sharing.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/data' };\n\nexport function createDataSharingPolicy(\n  httpClient: HttpClient\n): CreateDataSharingPolicySignature {\n  return (\n    options?: NonNullablePaths<\n      CreateDataSharingPolicyOptions,\n      `dataSharingPolicy.dataCollectionId`,\n      3\n    >\n  ) =>\n    universalCreateDataSharingPolicy(\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface CreateDataSharingPolicySignature {\n  /**\n   * Creates a data sharing policy for the specified collection.\n   *\n   * You can optionally filter which items in the collection can be shared. If no filters are specified, all items in the collection are shared. You can create multiple policies for the same collection with different filters.\n   *\n   * You can find which fields can be filtered for each collection by calling [Get Data Collection](https://dev.wix.com/docs/api-reference/business-solutions/cms/data-collections/get-data-collection). The supported filters are returned in the response under `collections.fields.capabilities.queryOperators`.\n   *\n   * <blockquote class=\"important\">\n   *\n   * __Important:__\n   * Only collections created in the CMS or with the [Data Collections API](https://dev.wix.com/docs/api-reference/business-solutions/cms/introduction) can be shared. External collections and Wix App collections can't be shared.\n   *\n   * </blockquote>\n   * @returns Created data sharing policy.\n   */\n  (\n    options?: NonNullablePaths<\n      CreateDataSharingPolicyOptions,\n      `dataSharingPolicy.dataCollectionId`,\n      3\n    >\n  ): Promise<\n    NonNullablePaths<DataSharingPolicy, `_id` | `dataCollectionId`, 2> & {\n      __applicationErrorsType?: CreateDataSharingPolicyApplicationErrors;\n    }\n  >;\n}\n\nexport function updateDataSharingPolicy(\n  httpClient: HttpClient\n): UpdateDataSharingPolicySignature {\n  return (_id: string, dataSharingPolicy: UpdateDataSharingPolicy) =>\n    universalUpdateDataSharingPolicy(\n      _id,\n      dataSharingPolicy,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface UpdateDataSharingPolicySignature {\n  /**\n   * Updates an existing data sharing policy.\n   *\n   * You can only update the `dataItemsFilter` field to change which items from the collection are shared.\n   * You can't change which collection is shared. If you want to share a different collection, create a new data sharing policy\n   *\n   * Any updates to the policy automatically apply to all sites connected using this policy.\n   * @param - Data sharing policy ID.\n   * @returns Updated data sharing policy.\n   */\n  (_id: string, dataSharingPolicy: UpdateDataSharingPolicy): Promise<\n    NonNullablePaths<DataSharingPolicy, `_id` | `dataCollectionId`, 2> & {\n      __applicationErrorsType?: UpdateDataSharingPolicyApplicationErrors;\n    }\n  >;\n}\n\nexport function deleteDataSharingPolicy(\n  httpClient: HttpClient\n): DeleteDataSharingPolicySignature {\n  return (dataSharingPolicyId: string) =>\n    universalDeleteDataSharingPolicy(\n      dataSharingPolicyId,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface DeleteDataSharingPolicySignature {\n  /**\n   * Deletes a data sharing policy and disconnects all associated connections.\n   *\n   * <blockquote class=\"warning\">\n   *\n   * __Warning:__\n   * When you delete a sharing policy, all target sites connected to the shared collection using this policy immediately lose access to the collection and its data. This can cause code in the target sites to break.\n   *\n   * </blockquote>\n   * @param - Data sharing policy ID.\n   */\n  (dataSharingPolicyId: string): Promise<\n    void & {\n      __applicationErrorsType?: DeleteDataSharingPolicyApplicationErrors;\n    }\n  >;\n}\n\nexport function getDataSharingPolicy(\n  httpClient: HttpClient\n): GetDataSharingPolicySignature {\n  return (dataSharingPolicyId: string) =>\n    universalGetDataSharingPolicy(\n      dataSharingPolicyId,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface GetDataSharingPolicySignature {\n  /**\n   * Retrieves a data sharing policy specified by ID.\n   * @param - Data sharing policy ID.\n   * @returns Retrieved data sharing policy.\n   */\n  (dataSharingPolicyId: string): Promise<\n    NonNullablePaths<DataSharingPolicy, `_id` | `dataCollectionId`, 2> & {\n      __applicationErrorsType?: GetDataSharingPolicyApplicationErrors;\n    }\n  >;\n}\n\nexport function listDataSharingPolicies(\n  httpClient: HttpClient\n): ListDataSharingPoliciesSignature {\n  return (options?: ListDataSharingPoliciesOptions) =>\n    universalListDataSharingPolicies(\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface ListDataSharingPoliciesSignature {\n  /**\n   * Retrieves a list of up to 1,000 data sharing policies on the current site.\n   *\n   * Specify `dataCollectionIds` to filter policies for specific collections.\n   */\n  (options?: ListDataSharingPoliciesOptions): Promise<\n    NonNullablePaths<\n      ListDataSharingPoliciesResponse,\n      | `dataSharingPolicies`\n      | `dataSharingPolicies.${number}._id`\n      | `dataSharingPolicies.${number}.dataCollectionId`,\n      4\n    >\n  >;\n}\n\nexport function listSharedDataCollections(\n  httpClient: HttpClient\n): ListSharedDataCollectionsSignature {\n  return (options?: ListSharedDataCollectionsOptions) =>\n    universalListSharedDataCollections(\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface ListSharedDataCollectionsSignature {\n  /**\n   * Retrieves a list of shared data collections.\n   *\n   * Returns either the collections that are either being shared by the current site or shared with the current site. Specify `sharedWithCurrentSite` to filter the direction.\n   */\n  (options?: ListSharedDataCollectionsOptions): Promise<\n    NonNullablePaths<\n      ListSharedDataCollectionsResponse,\n      | `connections`\n      | `connections.${number}.sourceDataCollectionId`\n      | `connections.${number}.sourceSiteId`\n      | `connections.${number}.targetDataCollectionId`\n      | `connections.${number}.targetSiteId`\n      | `connections.${number}.dataSharingPolicyId`,\n      4\n    >\n  >;\n}\n\nexport function connectToSharedCollection(\n  httpClient: HttpClient\n): ConnectToSharedCollectionSignature {\n  return (namespace: string, options?: ConnectToSharedCollectionOptions) =>\n    universalConnectToSharedCollection(\n      namespace,\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface ConnectToSharedCollectionSignature {\n  /**\n   * Connects the current site to a shared data collection.\n   *\n   * When you call this method, the shared collection appears in the current site's CMS under the specified namespace. You can also access the shared collection by using the [Data Items APIs](https://dev.wix.com/docs/api-reference/business-solutions/cms/data-items/introduction).\n   *\n   * > **Note:** The `namespace` is an identifier that serves as part of the collection ID when querying collection data. Therefore, it must be unique in a site.\n   * @param - Namespace to connect collection with on the target site.\n   * Must be unique in the site.\n   */\n  (namespace: string, options?: ConnectToSharedCollectionOptions): Promise<\n    NonNullablePaths<\n      ConnectToSharedCollectionResponse,\n      | `connection.sourceDataCollectionId`\n      | `connection.sourceSiteId`\n      | `connection.targetDataCollectionId`\n      | `connection.targetSiteId`\n      | `connection.dataSharingPolicyId`,\n      3\n    > & {\n      __applicationErrorsType?: ConnectToSharedCollectionApplicationErrors;\n    }\n  >;\n}\n\nexport function disconnectFromSharedCollection(\n  httpClient: HttpClient\n): DisconnectFromSharedCollectionSignature {\n  return (options?: DisconnectFromSharedCollectionOptions) =>\n    universalDisconnectFromSharedCollection(\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface DisconnectFromSharedCollectionSignature {\n  /**\n   * Disconnects the current site from a shared data collection.\n   *\n   * This method removes the local view of the shared collection from the current site. Once removed, the collection is no longer accessible through the CMS or Data Items APIs.\n   *\n   * > **Note:** This method doesn't affect the collection on the source site or other target sites that share the collection.\n   */\n  (options?: DisconnectFromSharedCollectionOptions): Promise<\n    void & {\n      __applicationErrorsType?: DisconnectFromSharedCollectionApplicationErrors;\n    }\n  >;\n}\n\nexport const onDataSharingPolicyCreated = EventDefinition(\n  'wix.data.v1.data_sharing_policy_created',\n  true,\n  (event: DataSharingPolicyCreatedEnvelope) =>\n    renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(event, [\n        {\n          transformFn: transformRESTTimestampToSDKTimestamp,\n          paths: [\n            { path: 'entity.createdDate' },\n            { path: 'entity.updatedDate' },\n            { path: 'metadata.eventTime' },\n          ],\n        },\n      ])\n    )\n)<DataSharingPolicyCreatedEnvelope>();\nexport const onDataSharingPolicyDeleted = EventDefinition(\n  'wix.data.v1.data_sharing_policy_deleted',\n  true,\n  (event: DataSharingPolicyDeletedEnvelope) =>\n    renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(event, [\n        {\n          transformFn: transformRESTTimestampToSDKTimestamp,\n          paths: [\n            { path: 'undefined.createdDate' },\n            { path: 'undefined.updatedDate' },\n            { path: 'metadata.eventTime' },\n          ],\n        },\n      ])\n    )\n)<DataSharingPolicyDeletedEnvelope>();\nexport const onDataSharingPolicySharedCollectionConnected = EventDefinition(\n  'wix.data.v1.data_sharing_policy_shared_collection_connected',\n  true,\n  (event: DataSharingPolicySharedCollectionConnectedEnvelope) =>\n    renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(event, [\n        {\n          transformFn: transformRESTTimestampToSDKTimestamp,\n          paths: [\n            { path: 'data.connection.createdDate' },\n            { path: 'data.connection.updatedDate' },\n            { path: 'metadata.eventTime' },\n          ],\n        },\n      ])\n    )\n)<DataSharingPolicySharedCollectionConnectedEnvelope>();\nexport const onDataSharingPolicySharedCollectionDisconnected = EventDefinition(\n  'wix.data.v1.data_sharing_policy_shared_collection_disconnected',\n  true,\n  (event: DataSharingPolicySharedCollectionDisconnectedEnvelope) =>\n    renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(event, [\n        {\n          transformFn: transformRESTTimestampToSDKTimestamp,\n          paths: [\n            { path: 'data.connection.createdDate' },\n            { path: 'data.connection.updatedDate' },\n            { path: 'metadata.eventTime' },\n          ],\n        },\n      ])\n    )\n)<DataSharingPolicySharedCollectionDisconnectedEnvelope>();\nexport const onDataSharingPolicyUpdated = EventDefinition(\n  'wix.data.v1.data_sharing_policy_updated',\n  true,\n  (event: DataSharingPolicyUpdatedEnvelope) =>\n    renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(event, [\n        {\n          transformFn: transformRESTTimestampToSDKTimestamp,\n          paths: [\n            { path: 'entity.createdDate' },\n            { path: 'entity.updatedDate' },\n            { path: 'metadata.eventTime' },\n          ],\n        },\n      ])\n    )\n)<DataSharingPolicyUpdatedEnvelope>();\n\nexport {\n  AccountInfo,\n  AccountInfoMetadata,\n  ActionEvent,\n  BaseEventMetadata,\n  ConnectToSharedCollectionOptions,\n  ConnectToSharedCollectionRequest,\n  ConnectToSharedCollectionResponse,\n  CreateDataSharingPolicyOptions,\n  CreateDataSharingPolicyRequest,\n  CreateDataSharingPolicyResponse,\n  CursorPaging,\n  CursorPagingMetadata,\n  Cursors,\n  DataSharingPolicy,\n  DataSharingPolicyCreatedEnvelope,\n  DataSharingPolicyDeletedEnvelope,\n  DataSharingPolicySharedCollectionConnectedEnvelope,\n  DataSharingPolicySharedCollectionDisconnectedEnvelope,\n  DataSharingPolicyUpdatedEnvelope,\n  DeleteDataSharingPolicyRequest,\n  DeleteDataSharingPolicyResponse,\n  DisconnectFromSharedCollectionOptions,\n  DisconnectFromSharedCollectionRequest,\n  DisconnectFromSharedCollectionResponse,\n  DomainEvent,\n  DomainEventBodyOneOf,\n  Empty,\n  EntityCreatedEvent,\n  EntityDeletedEvent,\n  EntityUpdatedEvent,\n  EventMetadata,\n  GetDataSharingPolicyRequest,\n  GetDataSharingPolicyResponse,\n  IdentificationData,\n  IdentificationDataIdOneOf,\n  ListDataSharingPoliciesOptions,\n  ListDataSharingPoliciesRequest,\n  ListDataSharingPoliciesResponse,\n  ListSharedDataCollectionsOptions,\n  ListSharedDataCollectionsRequest,\n  ListSharedDataCollectionsResponse,\n  MessageEnvelope,\n  RestoreInfo,\n  SharedCollectionConnectedEvent,\n  SharedCollectionDisconnectedEvent,\n  SharingConnection,\n  UpdateDataSharingPolicy,\n  UpdateDataSharingPolicyRequest,\n  UpdateDataSharingPolicyResponse,\n  WebhookIdentityType,\n} from './data-v1-data-sharing-policy-sharing.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n  renameKeysFromSDKRequestToRESTRequest,\n  renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixDataV1DataSharingPolicy from './data-v1-data-sharing-policy-sharing.http.js';\n\n/**\n * A data sharing policy defines how a data collection is shared between sites in the same Wix account.\n *\n * The policy specifies which collection to share, optional filtering rules to control which items are accessible, and serves as the access credential for other sites to connect to the shared collection. Multiple policies can be created for the same collection with different filtering rules or access patterns.\n */\nexport interface DataSharingPolicy {\n  /**\n   * Data sharing policy ID.\n   * @format GUID\n   * @readonly\n   */\n  _id?: string;\n  /**\n   * ID of the data collection to share.\n   * @immutable\n   * @maxLength 255\n   */\n  dataCollectionId?: string;\n  /**\n   * Filter to restrict which items from the collection are shared.\n   *\n   * Use [API Query Language syntax](https://dev.wix.com/api/rest/getting-started/api-query-language) to define filtering rules. If not specified,\n   * all items in the collection are shared.\n   */\n  dataItemsFilter?: Record<string, any> | null;\n  /**\n   * Date and time the data sharing policy was created.\n   * @readonly\n   */\n  _createdDate?: Date | null;\n  /**\n   * Date and time the data sharing policy was last updated.\n   * @readonly\n   */\n  _updatedDate?: Date | null;\n}\n\nexport interface SharedCollectionConnectedEvent {\n  /** Shared connection that was created. */\n  connection?: SharingConnection;\n}\n\n/**\n * A sharing connection represents the connection between 2 sites via a shared data collection.\n *\n * The connection is created when a site connects to a shared collection using a data sharing policy. It contains information about both the source site that owns the collection and created the policy, and the target site that the policy is shared with and now has access to the collection. It also includes the namespace used to access the shared data on the target site.\n */\nexport interface SharingConnection {\n  /**\n   * ID of the data collection owned and shared by the source site.\n   * @maxLength 255\n   */\n  sourceDataCollectionId?: string;\n  /**\n   * ID of the source site that owns the collection and created the policy.\n   * @format GUID\n   */\n  sourceSiteId?: string;\n  /**\n   * ID of the shared collection on the target site.\n   * The ID includes the namespace. For example, `\"namespace/collectionName\"`.\n   * @maxLength 255\n   */\n  targetDataCollectionId?: string;\n  /**\n   * ID of the target site that the collection is shared with.\n   * @format GUID\n   */\n  targetSiteId?: string;\n  /**\n   * Optional display name for the namespace that appears on the target site.\n   * @maxLength 100\n   */\n  targetDisplayNamespace?: string | null;\n  /**\n   * ID of the data sharing policy that controls this connection.\n   * @format GUID\n   */\n  dataSharingPolicyId?: string;\n  /**\n   * Date and time the connection was created.\n   * @readonly\n   */\n  _createdDate?: Date | null;\n  /**\n   * Date and time the connection was last updated.\n   * @readonly\n   */\n  _updatedDate?: Date | null;\n}\n\nexport interface SharedCollectionDisconnectedEvent {\n  /** Shared connection that was removed. */\n  connection?: SharingConnection;\n}\n\nexport interface CreateDataSharingPolicyRequest {\n  /** Data sharing policy to create. */\n  dataSharingPolicy?: DataSharingPolicy;\n}\n\nexport interface CreateDataSharingPolicyResponse {\n  /** Created data sharing policy. */\n  dataSharingPolicy?: DataSharingPolicy;\n}\n\nexport interface UpdateDataSharingPolicyRequest {\n  /** Data sharing policy to update. */\n  dataSharingPolicy: DataSharingPolicy;\n}\n\nexport interface UpdateDataSharingPolicyResponse {\n  /** Updated data sharing policy. */\n  dataSharingPolicy?: DataSharingPolicy;\n}\n\nexport interface DeleteDataSharingPolicyRequest {\n  /**\n   * Data sharing policy ID.\n   * @format GUID\n   */\n  dataSharingPolicyId: string;\n}\n\nexport interface DeleteDataSharingPolicyResponse {}\n\nexport interface GetDataSharingPolicyRequest {\n  /**\n   * Data sharing policy ID.\n   * @format GUID\n   */\n  dataSharingPolicyId: string;\n}\n\nexport interface GetDataSharingPolicyResponse {\n  /** Retrieved data sharing policy. */\n  dataSharingPolicy?: DataSharingPolicy;\n}\n\nexport interface ListDataSharingPoliciesRequest {\n  /**\n   * List of collection IDs to filter policies by.\n   *\n   * When provided, only returns policies for the specified collections.\n   * @maxSize 100\n   * @maxLength 255\n   */\n  dataCollectionIds?: string[];\n  /**\n   * Paging information.\n   * By default, policies are sorted by `id` in ascending order.\n   */\n  paging?: CursorPaging;\n}\n\nexport interface CursorPaging {\n  /**\n   * Number of items to load.\n   * @max 100\n   */\n  limit?: number | null;\n  /**\n   * Pointer to the next or previous page in the list of results.\n   *\n   * You can get the relevant cursor token\n   * from the `pagingMetadata` object in the previous call's response.\n   * Not relevant for the first request.\n   * @maxLength 16000\n   */\n  cursor?: string | null;\n}\n\nexport interface ListDataSharingPoliciesResponse {\n  /** List of data sharing policies. */\n  dataSharingPolicies?: DataSharingPolicy[];\n  /** Paging metadata. */\n  pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n  /** Number of items returned in the response. */\n  count?: number | null;\n  /** Offset that was requested. */\n  cursors?: Cursors;\n  /**\n   * Indicates if there are more results after the current page.\n   * If `true`, another page of results can be retrieved.\n   * If `false`, this is the last page.\n   */\n  hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n  /**\n   * Cursor pointing to next page in the list of results.\n   * @maxLength 16000\n   */\n  next?: string | null;\n  /**\n   * Cursor pointing to previous page in the list of results.\n   * @maxLength 16000\n   */\n  prev?: string | null;\n}\n\nexport interface ListSharedDataCollectionsRequest {\n  /**\n   * List of collection IDs to filter by.\n   *\n   * When provided, only returns shared connections for the specified collections.\n   * @maxSize 100\n   * @maxLength 255\n   */\n  dataCollectionIds?: string[];\n  /**\n   * Whether to list collections shared with the current site or shared from the current site.\n   * @deprecated\n   * @replacedBy shared_with_current_site\n   * @targetRemovalDate 2026-12-31\n   */\n  sharedWithCurrent?: boolean;\n  /**\n   * Paging information.\n   * By default, shared collections are sorted by `id` in ascending order.\n   */\n  paging?: CursorPaging;\n  /**\n   * Whether to list collections shared with the current site or shared from the current site.\n   * When `true`, lists collections shared with the current site. When `false`, lists collections shared from the current site's policies.\n   *\n   * Default: `false`\n   */\n  sharedWithCurrentSite?: boolean;\n}\n\nexport interface ListSharedDataCollectionsResponse {\n  /** List of shared collections. */\n  connections?: SharingConnection[];\n  /** Paging metadata. */\n  pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface ConnectToSharedCollectionRequest {\n  /**\n   * Namespace to connect collection with on the target site.\n   * Must be unique in the site.\n   * @minLength 1\n   * @maxLength 100\n   */\n  namespace: string;\n  /**\n   * Optional display name for the namespace that appears on the target site.\n   * @maxLength 100\n   */\n  displayNamespace?: string | null;\n  /**\n   * Data sharing policy ID to connect with.\n   * @format GUID\n   */\n  dataSharingPolicyId?: string;\n}\n\nexport interface ConnectToSharedCollectionResponse {\n  /** Created connection to shared data collection. */\n  connection?: SharingConnection;\n}\n\nexport interface DisconnectFromSharedCollectionRequest {\n  /**\n   * Shared data collection ID.\n   * @maxLength 255\n   * @deprecated\n   * @replacedBy target_data_collection_id\n   * @targetRemovalDate 2026-12-31\n   */\n  dataCollectionId?: string;\n  /**\n   * ID of the shared collection on the target site.\n   * @maxLength 255\n   */\n  targetDataCollectionId?: string;\n}\n\nexport interface DisconnectFromSharedCollectionResponse {}\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 Empty {}\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\n/** @docsIgnore */\nexport type CreateDataSharingPolicyApplicationErrors =\n  | {\n      code?: 'WDE0107';\n      description?: string;\n      data?: Record<string, any>;\n    }\n  | {\n      code?: 'WDE0025';\n      description?: string;\n      data?: Record<string, any>;\n    };\n/** @docsIgnore */\nexport type UpdateDataSharingPolicyApplicationErrors = {\n  code?: 'WDE0154';\n  description?: string;\n  data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type DeleteDataSharingPolicyApplicationErrors = {\n  code?: 'WDE0154';\n  description?: string;\n  data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type GetDataSharingPolicyApplicationErrors =\n  | {\n      code?: 'WDE0154';\n      description?: string;\n      data?: Record<string, any>;\n    }\n  | {\n      code?: 'WDE0144';\n      description?: string;\n      data?: Record<string, any>;\n    };\n/** @docsIgnore */\nexport type ConnectToSharedCollectionApplicationErrors =\n  | {\n      code?: 'WDE0154';\n      description?: string;\n      data?: Record<string, any>;\n    }\n  | {\n      code?: 'WDE0144';\n      description?: string;\n      data?: Record<string, any>;\n    }\n  | {\n      code?: 'WDE0104';\n      description?: string;\n      data?: Record<string, any>;\n    }\n  | {\n      code?: 'WDE0102';\n      description?: string;\n      data?: Record<string, any>;\n    }\n  | {\n      code?: 'WDE0155';\n      description?: string;\n      data?: Record<string, any>;\n    };\n/** @docsIgnore */\nexport type DisconnectFromSharedCollectionApplicationErrors = {\n  code?: 'WDE0156';\n  description?: string;\n  data?: Record<string, any>;\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 DataSharingPolicyCreatedEnvelope {\n  entity: DataSharingPolicy;\n  metadata: EventMetadata;\n}\n\n/**\n * Triggered when a new data sharing policy is created.\n * @permissionScope Manage Data Collection Sharing\n * @permissionScopeId SCOPE.DATA.MANAGE_COLLECTION_SHARING\n * @permissionId WIX_DATA.SHARED_DATA_COLLECTION_GET_POLICY\n * @webhook\n * @eventType wix.data.v1.data_sharing_policy_created\n * @slug created\n */\nexport declare function onDataSharingPolicyCreated(\n  handler: (event: DataSharingPolicyCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface DataSharingPolicyDeletedEnvelope {\n  metadata: EventMetadata;\n}\n\n/**\n * Triggered when a data sharing policy is deleted.\n * @permissionScope Manage Data Collection Sharing\n * @permissionScopeId SCOPE.DATA.MANAGE_COLLECTION_SHARING\n * @permissionId WIX_DATA.SHARED_DATA_COLLECTION_GET_POLICY\n * @webhook\n * @eventType wix.data.v1.data_sharing_policy_deleted\n * @slug deleted\n */\nexport declare function onDataSharingPolicyDeleted(\n  handler: (event: DataSharingPolicyDeletedEnvelope) => void | Promise<void>\n): void;\n\nexport interface DataSharingPolicySharedCollectionConnectedEnvelope {\n  data: SharedCollectionConnectedEvent;\n  metadata: EventMetadata;\n}\n\n/**\n * Triggered when a new connection is created, which means a collection is shared with another site.\n * @permissionScope Manage Data Collection Sharing\n * @permissionScopeId SCOPE.DATA.MANAGE_COLLECTION_SHARING\n * @permissionId WIX_DATA.SHARED_DATA_COLLECTION_GET_POLICY\n * @webhook\n * @eventType wix.data.v1.data_sharing_policy_shared_collection_connected\n * @slug shared_collection_connected\n */\nexport declare function onDataSharingPolicySharedCollectionConnected(\n  handler: (\n    event: DataSharingPolicySharedCollectionConnectedEnvelope\n  ) => void | Promise<void>\n): void;\n\nexport interface DataSharingPolicySharedCollectionDisconnectedEnvelope {\n  data: SharedCollectionDisconnectedEvent;\n  metadata: EventMetadata;\n}\n\n/**\n * Triggered when a connection is disconnected, which means a collection is removed from the site it was previously shared with.\n * @permissionScope Manage Data Collection Sharing\n * @permissionScopeId SCOPE.DATA.MANAGE_COLLECTION_SHARING\n * @permissionId WIX_DATA.SHARED_DATA_COLLECTION_GET_POLICY\n * @webhook\n * @eventType wix.data.v1.data_sharing_policy_shared_collection_disconnected\n * @slug shared_collection_disconnected\n */\nexport declare function onDataSharingPolicySharedCollectionDisconnected(\n  handler: (\n    event: DataSharingPolicySharedCollectionDisconnectedEnvelope\n  ) => void | Promise<void>\n): void;\n\nexport interface DataSharingPolicyUpdatedEnvelope {\n  entity: DataSharingPolicy;\n  metadata: EventMetadata;\n}\n\n/**\n * Triggered when a data sharing policy is updated.\n * @permissionScope Manage Data Collection Sharing\n * @permissionScopeId SCOPE.DATA.MANAGE_COLLECTION_SHARING\n * @permissionId WIX_DATA.SHARED_DATA_COLLECTION_GET_POLICY\n * @webhook\n * @eventType wix.data.v1.data_sharing_policy_updated\n * @slug updated\n */\nexport declare function onDataSharingPolicyUpdated(\n  handler: (event: DataSharingPolicyUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Creates a data sharing policy for the specified collection.\n *\n * You can optionally filter which items in the collection can be shared. If no filters are specified, all items in the collection are shared. You can create multiple policies for the same collection with different filters.\n *\n * You can find which fields can be filtered for each collection by calling [Get Data Collection](https://dev.wix.com/docs/api-reference/business-solutions/cms/data-collections/get-data-collection). The supported filters are returned in the response under `collections.fields.capabilities.queryOperators`.\n *\n * <blockquote class=\"important\">\n *\n * __Important:__\n * Only collections created in the CMS or with the [Data Collections API](https://dev.wix.com/docs/api-reference/business-solutions/cms/introduction) can be shared. External collections and Wix App collections can't be shared.\n *\n * </blockquote>\n * @public\n * @requiredField options.dataSharingPolicy.dataCollectionId\n * @permissionId WIX_DATA.SHARED_DATA_COLLECTION_CREATE_POLICY\n * @applicableIdentity APP\n * @returns Created data sharing policy.\n * @fqn com.wixpress.cloud.data.api.share.DataCollectionSharingService.CreateDataSharingPolicy\n */\nexport async function createDataSharingPolicy(\n  options?: NonNullablePaths<\n    CreateDataSharingPolicyOptions,\n    `dataSharingPolicy.dataCollectionId`,\n    3\n  >\n): Promise<\n  NonNullablePaths<DataSharingPolicy, `_id` | `dataCollectionId`, 2> & {\n    __applicationErrorsType?: CreateDataSharingPolicyApplicationErrors;\n  }\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    dataSharingPolicy: options?.dataSharingPolicy,\n  });\n\n  const reqOpts =\n    ambassadorWixDataV1DataSharingPolicy.createDataSharingPolicy(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)\n      ?.dataSharingPolicy!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          dataSharingPolicy: '$[0].dataSharingPolicy',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface CreateDataSharingPolicyOptions {\n  /** Data sharing policy to create. */\n  dataSharingPolicy?: DataSharingPolicy;\n}\n\n/**\n * Updates an existing data sharing policy.\n *\n * You can only update the `dataItemsFilter` field to change which items from the collection are shared.\n * You can't change which collection is shared. If you want to share a different collection, create a new data sharing policy\n *\n * Any updates to the policy automatically apply to all sites connected using this policy.\n * @param _id - Data sharing policy ID.\n * @public\n * @requiredField _id\n * @requiredField dataSharingPolicy\n * @permissionId WIX_DATA.SHARED_DATA_COLLECTION_UPDATE_POLICY\n * @applicableIdentity APP\n * @returns Updated data sharing policy.\n * @fqn com.wixpress.cloud.data.api.share.DataCollectionSharingService.UpdateDataSharingPolicy\n */\nexport async function updateDataSharingPolicy(\n  _id: string,\n  dataSharingPolicy: UpdateDataSharingPolicy\n): Promise<\n  NonNullablePaths<DataSharingPolicy, `_id` | `dataCollectionId`, 2> & {\n    __applicationErrorsType?: UpdateDataSharingPolicyApplicationErrors;\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    dataSharingPolicy: { ...dataSharingPolicy, id: _id },\n  });\n\n  const reqOpts =\n    ambassadorWixDataV1DataSharingPolicy.updateDataSharingPolicy(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)\n      ?.dataSharingPolicy!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: { dataSharingPolicy: '$[1]' },\n        explicitPathsToArguments: { 'dataSharingPolicy.id': '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['_id', 'dataSharingPolicy']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface UpdateDataSharingPolicy {\n  /**\n   * Data sharing policy ID.\n   * @format GUID\n   * @readonly\n   */\n  _id?: string;\n  /**\n   * ID of the data collection to share.\n   * @immutable\n   * @maxLength 255\n   */\n  dataCollectionId?: string;\n  /**\n   * Filter to restrict which items from the collection are shared.\n   *\n   * Use [API Query Language syntax](https://dev.wix.com/api/rest/getting-started/api-query-language) to define filtering rules. If not specified,\n   * all items in the collection are shared.\n   */\n  dataItemsFilter?: Record<string, any> | null;\n  /**\n   * Date and time the data sharing policy was created.\n   * @readonly\n   */\n  _createdDate?: Date | null;\n  /**\n   * Date and time the data sharing policy was last updated.\n   * @readonly\n   */\n  _updatedDate?: Date | null;\n}\n\n/**\n * Deletes a data sharing policy and disconnects all associated connections.\n *\n * <blockquote class=\"warning\">\n *\n * __Warning:__\n * When you delete a sharing policy, all target sites connected to the shared collection using this policy immediately lose access to the collection and its data. This can cause code in the target sites to break.\n *\n * </blockquote>\n * @param dataSharingPolicyId - Data sharing policy ID.\n * @public\n * @requiredField dataSharingPolicyId\n * @permissionId WIX_DATA.SHARED_DATA_COLLECTION_DELETE_POLICY\n * @applicableIdentity APP\n * @fqn com.wixpress.cloud.data.api.share.DataCollectionSharingService.DeleteDataSharingPolicy\n */\nexport async function deleteDataSharingPolicy(\n  dataSharingPolicyId: string\n): Promise<\n  void & {\n    __applicationErrorsType?: DeleteDataSharingPolicyApplicationErrors;\n  }\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    dataSharingPolicyId: dataSharingPolicyId,\n  });\n\n  const reqOpts =\n    ambassadorWixDataV1DataSharingPolicy.deleteDataSharingPolicy(payload);\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: { dataSharingPolicyId: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['dataSharingPolicyId']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Retrieves a data sharing policy specified by ID.\n * @param dataSharingPolicyId - Data sharing policy ID.\n * @public\n * @requiredField dataSharingPolicyId\n * @permissionId WIX_DATA.SHARED_DATA_COLLECTION_GET_POLICY\n * @applicableIdentity APP\n * @returns Retrieved data sharing policy.\n * @fqn com.wixpress.cloud.data.api.share.DataCollectionSharingService.GetDataSharingPolicy\n */\nexport async function getDataSharingPolicy(\n  dataSharingPolicyId: string\n): Promise<\n  NonNullablePaths<DataSharingPolicy, `_id` | `dataCollectionId`, 2> & {\n    __applicationErrorsType?: GetDataSharingPolicyApplicationErrors;\n  }\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    dataSharingPolicyId: dataSharingPolicyId,\n  });\n\n  const reqOpts =\n    ambassadorWixDataV1DataSharingPolicy.getDataSharingPolicy(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)\n      ?.dataSharingPolicy!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { dataSharingPolicyId: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['dataSharingPolicyId']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Retrieves a list of up to 1,000 data sharing policies on the current site.\n *\n * Specify `dataCollectionIds` to filter policies for specific collections.\n * @public\n * @permissionId WIX_DATA.SHARED_DATA_COLLECTION_LIST_POLICIES\n * @applicableIdentity APP\n * @fqn com.wixpress.cloud.data.api.share.DataCollectionSharingService.ListDataSharingPolicies\n */\nexport async function listDataSharingPolicies(\n  options?: ListDataSharingPoliciesOptions\n): Promise<\n  NonNullablePaths<\n    ListDataSharingPoliciesResponse,\n    | `dataSharingPolicies`\n    | `dataSharingPolicies.${number}._id`\n    | `dataSharingPolicies.${number}.dataCollectionId`,\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({\n    dataCollectionIds: options?.dataCollectionIds,\n    paging: options?.paging,\n  });\n\n  const reqOpts =\n    ambassadorWixDataV1DataSharingPolicy.listDataSharingPolicies(payload);\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          dataCollectionIds: '$[0].dataCollectionIds',\n          paging: '$[0].paging',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface ListDataSharingPoliciesOptions {\n  /**\n   * List of collection IDs to filter policies by.\n   *\n   * When provided, only returns policies for the specified collections.\n   * @maxSize 100\n   * @maxLength 255\n   */\n  dataCollectionIds?: string[];\n  /**\n   * Paging information.\n   * By default, policies are sorted by `id` in ascending order.\n   */\n  paging?: CursorPaging;\n}\n\n/**\n * Retrieves a list of shared data collections.\n *\n * Returns either the collections that are either being shared by the current site or shared with the current site. Specify `sharedWithCurrentSite` to filter the direction.\n * @public\n * @permissionId WIX_DATA.SHARED_DATA_COLLECTION_LIST\n * @applicableIdentity APP\n * @fqn com.wixpress.cloud.data.api.share.DataCollectionSharingService.ListSharedDataCollections\n */\nexport async function listSharedDataCollections(\n  options?: ListSharedDataCollectionsOptions\n): Promise<\n  NonNullablePaths<\n    ListSharedDataCollectionsResponse,\n    | `connections`\n    | `connections.${number}.sourceDataCollectionId`\n    | `connections.${number}.sourceSiteId`\n    | `connections.${number}.targetDataCollectionId`\n    | `connections.${number}.targetSiteId`\n    | `connections.${number}.dataSharingPolicyId`,\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({\n    dataCollectionIds: options?.dataCollectionIds,\n    sharedWithCurrent: options?.sharedWithCurrent,\n    paging: options?.paging,\n    sharedWithCurrentSite: options?.sharedWithCurrentSite,\n  });\n\n  const reqOpts =\n    ambassadorWixDataV1DataSharingPolicy.listSharedDataCollections(payload);\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          dataCollectionIds: '$[0].dataCollectionIds',\n          sharedWithCurrent: '$[0].sharedWithCurrent',\n          paging: '$[0].paging',\n          sharedWithCurrentSite: '$[0].sharedWithCurrentSite',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface ListSharedDataCollectionsOptions {\n  /**\n   * List of collection IDs to filter by.\n   *\n   * When provided, only returns shared connections for the specified collections.\n   * @maxSize 100\n   * @maxLength 255\n   */\n  dataCollectionIds?: string[];\n  /**\n   * Whether to list collections shared with the current site or shared from the current site.\n   * @deprecated\n   * @replacedBy shared_with_current_site\n   * @targetRemovalDate 2026-12-31\n   */\n  sharedWithCurrent?: boolean;\n  /**\n   * Paging information.\n   * By default, shared collections are sorted by `id` in ascending order.\n   */\n  paging?: CursorPaging;\n  /**\n   * Whether to list collections shared with the current site or shared from the current site.\n   * When `true`, lists collections shared with the current site. When `false`, lists collections shared from the current site's policies.\n   *\n   * Default: `false`\n   */\n  sharedWithCurrentSite?: boolean;\n}\n\n/**\n * Connects the current site to a shared data collection.\n *\n * When you call this method, the shared collection appears in the current site's CMS under the specified namespace. You can also access the shared collection by using the [Data Items APIs](https://dev.wix.com/docs/api-reference/business-solutions/cms/data-items/introduction).\n *\n * > **Note:** The `namespace` is an identifier that serves as part of the collection ID when querying collection data. Therefore, it must be unique in a site.\n * @param namespace - Namespace to connect collection with on the target site.\n * Must be unique in the site.\n * @public\n * @requiredField namespace\n * @permissionId WIX_DATA.SHARED_DATA_COLLECTION_CONNECT\n * @applicableIdentity APP\n * @fqn com.wixpress.cloud.data.api.share.DataCollectionSharingService.ConnectToSharedCollection\n */\nexport async function connectToSharedCollection(\n  namespace: string,\n  options?: ConnectToSharedCollectionOptions\n): Promise<\n  NonNullablePaths<\n    ConnectToSharedCollectionResponse,\n    | `connection.sourceDataCollectionId`\n    | `connection.sourceSiteId`\n    | `connection.targetDataCollectionId`\n    | `connection.targetSiteId`\n    | `connection.dataSharingPolicyId`,\n    3\n  > & {\n    __applicationErrorsType?: ConnectToSharedCollectionApplicationErrors;\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    namespace: namespace,\n    displayNamespace: options?.displayNamespace,\n    dataSharingPolicyId: options?.dataSharingPolicyId,\n  });\n\n  const reqOpts =\n    ambassadorWixDataV1DataSharingPolicy.connectToSharedCollection(payload);\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          namespace: '$[0]',\n          displayNamespace: '$[1].displayNamespace',\n          dataSharingPolicyId: '$[1].dataSharingPolicyId',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['namespace', 'options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface ConnectToSharedCollectionOptions {\n  /**\n   * Optional display name for the namespace that appears on the target site.\n   * @maxLength 100\n   */\n  displayNamespace?: string | null;\n  /**\n   * Data sharing policy ID to connect with.\n   * @format GUID\n   */\n  dataSharingPolicyId?: string;\n}\n\n/**\n * Disconnects the current site from a shared data collection.\n *\n * This method removes the local view of the shared collection from the current site. Once removed, the collection is no longer accessible through the CMS or Data Items APIs.\n *\n * > **Note:** This method doesn't affect the collection on the source site or other target sites that share the collection.\n * @public\n * @permissionId WIX_DATA.SHARED_DATA_COLLECTION_DELETE\n * @applicableIdentity APP\n * @fqn com.wixpress.cloud.data.api.share.DataCollectionSharingService.DisconnectFromSharedCollection\n */\nexport async function disconnectFromSharedCollection(\n  options?: DisconnectFromSharedCollectionOptions\n): Promise<\n  void & {\n    __applicationErrorsType?: DisconnectFromSharedCollectionApplicationErrors;\n  }\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    dataCollectionId: options?.dataCollectionId,\n    targetDataCollectionId: options?.targetDataCollectionId,\n  });\n\n  const reqOpts =\n    ambassadorWixDataV1DataSharingPolicy.disconnectFromSharedCollection(\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          dataCollectionId: '$[0].dataCollectionId',\n          targetDataCollectionId: '$[0].targetDataCollectionId',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface DisconnectFromSharedCollectionOptions {\n  /**\n   * Shared data collection ID.\n   * @maxLength 255\n   * @deprecated\n   * @replacedBy target_data_collection_id\n   * @targetRemovalDate 2026-12-31\n   */\n  dataCollectionId?: string;\n  /**\n   * ID of the shared collection on the target site.\n   * @maxLength 255\n   */\n  targetDataCollectionId?: 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 { 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 resolveComWixpressCloudDataApiShareDataCollectionSharingServiceUrl(\n  opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n  const domainToMappings = {\n    'api._api_base_domain_': [\n      {\n        srcPath: '/cloud-data',\n        destPath: '',\n      },\n    ],\n    'code._base_domain_': [\n      {\n        srcPath: '/_api/cloud-data/v1/data-settings',\n        destPath: '/v1/data-settings',\n      },\n      {\n        srcPath: '/_api/cloud-data/v1/schemas',\n        destPath: '/v1/schemas',\n      },\n      {\n        srcPath: '/_api/cloud-data/v1/connector',\n        destPath: '/v1/connector',\n      },\n      {\n        srcPath: '/_api/data/v1/data-settings',\n        destPath: '/v1/data-settings',\n      },\n      {\n        srcPath: '/_api/data/v1/schemas',\n        destPath: '/v1/schemas',\n      },\n      {\n        srcPath: '/_api/data/v1/connector',\n        destPath: '/v1/connector',\n      },\n      {\n        srcPath: '/_api/cloud-data/v1/wix-data',\n        destPath: '/v1/wix-data',\n      },\n    ],\n    'cloud-data.wix-code.com': [\n      {\n        srcPath: '',\n        destPath: '',\n      },\n    ],\n    _: [\n      {\n        srcPath: '/_api/cloud-data',\n        destPath: '',\n      },\n    ],\n    'www._base_domain_': [\n      {\n        srcPath: '/_api/cloud-data',\n        destPath: '',\n      },\n      {\n        srcPath: '/_api/data',\n        destPath: '',\n      },\n      {\n        srcPath: '/_api/cloud-data',\n        destPath: '',\n      },\n    ],\n    'dev._base_domain_': [\n      {\n        srcPath: '/_api/cloud-data',\n        destPath: '',\n      },\n    ],\n    'bo._base_domain_': [\n      {\n        srcPath: '/_api/cloud-data/v1',\n        destPath: '/v1',\n      },\n      {\n        srcPath: '/_api/cloud-data/v2',\n        destPath: '/v2',\n      },\n    ],\n    'wixbo.ai': [\n      {\n        srcPath: '/_api/cloud-data/v1',\n        destPath: '/v1',\n      },\n      {\n        srcPath: '/_api/cloud-data/v2',\n        destPath: '/v2',\n      },\n    ],\n    'wix-bo.com': [\n      {\n        srcPath: '/_api/cloud-data/v1',\n        destPath: '/v1',\n      },\n      {\n        srcPath: '/_api/cloud-data/v2',\n        destPath: '/v2',\n      },\n    ],\n    'manage._base_domain_': [\n      {\n        srcPath: '/_api/cloud-data',\n        destPath: '',\n      },\n      {\n        srcPath: '/_api/data',\n        destPath: '',\n      },\n      {\n        srcPath: '/_api/cloud-data',\n        destPath: '',\n      },\n    ],\n    'editor._base_domain_': [\n      {\n        srcPath: '/_api/cloud-data/v1/schemas',\n        destPath: '/v1/schemas',\n      },\n      {\n        srcPath: '/_api/cloud-data/dbs/tasks',\n        destPath: '/dbs/tasks',\n      },\n      {\n        srcPath: '/_api/data/v1/schemas',\n        destPath: '/v1/schemas',\n      },\n      {\n        srcPath: '/_api/data/dbs/tasks',\n        destPath: '/dbs/tasks',\n      },\n      {\n        srcPath: '/_api/cloud-data/v1/wix-data',\n        destPath: '/v1/wix-data',\n      },\n      {\n        srcPath: '/_api/cloud-data/v1/data-settings',\n        destPath: '/v1/data-settings',\n      },\n      {\n        srcPath: '/_api/data/v2/indexes',\n        destPath: '/v2/indexes',\n      },\n      {\n        srcPath: '/_api/cloud-data/v1/external-database-connections',\n        destPath: '/v1/external-database-connections',\n      },\n      {\n        srcPath: '/_api/data/v1/data-collection-sharing',\n        destPath: '/v1/data-collection-sharing',\n      },\n      {\n        srcPath: '/_api/cloud-data/v2/collections',\n        destPath: '/v2/collections',\n      },\n      {\n        srcPath: '/_api/cloud-data/v2/bulk',\n        destPath: '/v2/bulk',\n      },\n      {\n        srcPath: '/_api/cloud-data/v2/items',\n        destPath: '/v2/items',\n      },\n      {\n        srcPath: '/_api/cloud-data/v2/dbs/tasks',\n        destPath: '/v2/dbs/tasks',\n      },\n    ],\n    'blocks._base_domain_': [\n      {\n        srcPath: '/_api/cloud-data/v1/schemas',\n        destPath: '/v1/schemas',\n      },\n      {\n        srcPath: '/_api/cloud-data/dbs/tasks',\n        destPath: '/dbs/tasks',\n      },\n      {\n        srcPath: '/_api/data/v1/schemas',\n        destPath: '/v1/schemas',\n      },\n      {\n        srcPath: '/_api/data/dbs/tasks',\n        destPath: '/dbs/tasks',\n      },\n      {\n        srcPath: '/_api/cloud-data/v1/wix-data',\n        destPath: '/v1/wix-data',\n      },\n      {\n        srcPath: '/_api/cloud-data/v1/data-settings',\n        destPath: '/v1/data-settings',\n      },\n      {\n        srcPath: '/_api/data/v2/indexes',\n        destPath: '/v2/indexes',\n      },\n      {\n        srcPath: '/_api/cloud-data/v1/external-database-connections',\n        destPath: '/v1/external-database-connections',\n      },\n      {\n        srcPath: '/_api/data/v1/data-collection-sharing',\n        destPath: '/v1/data-collection-sharing',\n      },\n      {\n        srcPath: '/_api/cloud-data/v2/collections',\n        destPath: '/v2/collections',\n      },\n      {\n        srcPath: '/_api/cloud-data/v2/bulk',\n        destPath: '/v2/bulk',\n      },\n      {\n        srcPath: '/_api/cloud-data/v2/items',\n        destPath: '/v2/items',\n      },\n      {\n        srcPath: '/_api/cloud-data/v2/dbs/tasks',\n        destPath: '/v2/dbs/tasks',\n      },\n    ],\n    'create.editorx': [\n      {\n        srcPath: '/_api/cloud-data/v1/schemas',\n        destPath: '/v1/schemas',\n      },\n      {\n        srcPath: '/_api/cloud-data/dbs/tasks',\n        destPath: '/dbs/tasks',\n      },\n      {\n        srcPath: '/_api/data/v1/schemas',\n        destPath: '/v1/schemas',\n      },\n      {\n        srcPath: '/_api/data/dbs/tasks',\n        destPath: '/dbs/tasks',\n      },\n      {\n        srcPath: '/_api/cloud-data/v1/wix-data',\n        destPath: '/v1/wix-data',\n      },\n      {\n        srcPath: '/_api/cloud-data/v1/data-settings',\n        destPath: '/v1/data-settings',\n      },\n      {\n        srcPath: '/_api/data/v2/indexes',\n        destPath: '/v2/indexes',\n      },\n      {\n        srcPath: '/_api/cloud-data/v1/external-database-connections',\n        destPath: '/v1/external-database-connections',\n      },\n      {\n        srcPath: '/_api/data/v1/data-collection-sharing',\n        destPath: '/v1/data-collection-sharing',\n      },\n      {\n        srcPath: '/_api/cloud-data/v2/collections',\n        destPath: '/v2/collections',\n      },\n      {\n        srcPath: '/_api/cloud-data/v2/bulk',\n        destPath: '/v2/bulk',\n      },\n      {\n        srcPath: '/_api/cloud-data/v2/items',\n        destPath: '/v2/items',\n      },\n      {\n        srcPath: '/_api/cloud-data/v2/dbs/tasks',\n        destPath: '/v2/dbs/tasks',\n      },\n    ],\n    'www.wixapis.com': [\n      {\n        srcPath: '/wix-data/v1/collections',\n        destPath: '/v1/wix-data/collections',\n      },\n      {\n        srcPath: '/wix-data/v1/external-database-connections',\n        destPath: '/v1/external-database-connections',\n      },\n      {\n        srcPath: '/wix-data/v2/indexes',\n        destPath: '/v2/indexes',\n      },\n      {\n        srcPath: '/wix-data/v1/items',\n        destPath: '/v1/items',\n      },\n      {\n        srcPath: '/wix-data/v1/bulk',\n        destPath: '/v1/bulk',\n      },\n      {\n        srcPath: '/wix-data/v1/external-databases',\n        destPath: '/v1/external-databases',\n      },\n      {\n        srcPath: '/wix-data/v2',\n        destPath: '/v2',\n      },\n      {\n        srcPath: '/data/v2/collections',\n        destPath: '/v2/collections',\n      },\n      {\n        srcPath: '/data/v2/items',\n        destPath: '/v2/items',\n      },\n      {\n        srcPath: '/data/v2/bulk/items',\n        destPath: '/v2/bulk/items',\n      },\n      {\n        srcPath: '/data/v2/indexes',\n        destPath: '/v2/indexes',\n      },\n      {\n        srcPath: '/data/v1/external-database-connections',\n        destPath: '/v1/external-database-connections',\n      },\n      {\n        srcPath: '/data/v1/data-collection-sharing',\n        destPath: '/v1/data-collection-sharing',\n      },\n    ],\n    'www.wixgateway.com': [\n      {\n        srcPath: '/wix-data/v1/items',\n        destPath: '/v1/items',\n      },\n      {\n        srcPath: '/wix-data/v1/bulk',\n        destPath: '/v1/bulk',\n      },\n    ],\n    '*.dev.wix-code.com': [\n      {\n        srcPath: '/_api/cloud-data/v2',\n        destPath: '/v2',\n      },\n      {\n        srcPath: '/_api/cloud-data/v1/external-database-connections',\n        destPath: '/v1/external-database-connections',\n      },\n      {\n        srcPath: '/data/v1/data-collection-sharing',\n        destPath: '/v1/data-collection-sharing',\n      },\n    ],\n  };\n\n  return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_data_sharing';\n\n/**\n * Creates a data sharing policy for the specified collection.\n *\n * You can optionally filter which items in the collection can be shared. If no filters are specified, all items in the collection are shared. You can create multiple policies for the same collection with different filters.\n *\n * You can find which fields can be filtered for each collection by calling [Get Data Collection](https://dev.wix.com/docs/api-reference/business-solutions/cms/data-collections/get-data-collection). The supported filters are returned in the response under `collections.fields.capabilities.queryOperators`.\n *\n * <blockquote class=\"important\">\n *\n * __Important:__\n * Only collections created in the CMS or with the [Data Collections API](https://dev.wix.com/docs/api-reference/business-solutions/cms/introduction) can be shared. External collections and Wix App collections can't be shared.\n *\n * </blockquote>\n */\nexport function createDataSharingPolicy(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __createDataSharingPolicy({ host }: any) {\n    const serializedData = transformPaths(payload, [\n      {\n        transformFn: transformSDKTimestampToRESTTimestamp,\n        paths: [\n          { path: 'dataSharingPolicy.createdDate' },\n          { path: 'dataSharingPolicy.updatedDate' },\n        ],\n      },\n    ]);\n    const metadata = {\n      entityFqdn: 'wix.data.v1.data_sharing_policy',\n      method: 'POST' as any,\n      methodFqn:\n        'com.wixpress.cloud.data.api.share.DataCollectionSharingService.CreateDataSharingPolicy',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressCloudDataApiShareDataCollectionSharingServiceUrl({\n        protoPath: '/v1/data-collection-sharing/policies',\n        data: serializedData,\n        host,\n      }),\n      data: serializedData,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'dataSharingPolicy.createdDate' },\n              { path: 'dataSharingPolicy.updatedDate' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __createDataSharingPolicy;\n}\n\n/**\n * Updates an existing data sharing policy.\n *\n * You can only update the `dataItemsFilter` field to change which items from the collection are shared.\n * You can't change which collection is shared. If you want to share a different collection, create a new data sharing policy\n *\n * Any updates to the policy automatically apply to all sites connected using this policy.\n */\nexport function updateDataSharingPolicy(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __updateDataSharingPolicy({ host }: any) {\n    const serializedData = transformPaths(payload, [\n      {\n        transformFn: transformSDKTimestampToRESTTimestamp,\n        paths: [\n          { path: 'dataSharingPolicy.createdDate' },\n          { path: 'dataSharingPolicy.updatedDate' },\n        ],\n      },\n    ]);\n    const metadata = {\n      entityFqdn: 'wix.data.v1.data_sharing_policy',\n      method: 'POST' as any,\n      methodFqn:\n        'com.wixpress.cloud.data.api.share.DataCollectionSharingService.UpdateDataSharingPolicy',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressCloudDataApiShareDataCollectionSharingServiceUrl({\n        protoPath:\n          '/v1/data-collection-sharing/policies/{dataSharingPolicy.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: 'dataSharingPolicy.createdDate' },\n              { path: 'dataSharingPolicy.updatedDate' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __updateDataSharingPolicy;\n}\n\n/**\n * Deletes a data sharing policy and disconnects all associated connections.\n *\n * <blockquote class=\"warning\">\n *\n * __Warning:__\n * When you delete a sharing policy, all target sites connected to the shared collection using this policy immediately lose access to the collection and its data. This can cause code in the target sites to break.\n *\n * </blockquote>\n */\nexport function deleteDataSharingPolicy(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __deleteDataSharingPolicy({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.data.v1.data_sharing_policy',\n      method: 'DELETE' as any,\n      methodFqn:\n        'com.wixpress.cloud.data.api.share.DataCollectionSharingService.DeleteDataSharingPolicy',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressCloudDataApiShareDataCollectionSharingServiceUrl({\n        protoPath: '/v1/data-collection-sharing/policies/{dataSharingPolicyId}',\n        data: payload,\n        host,\n      }),\n      params: toURLSearchParams(payload),\n    };\n\n    return metadata;\n  }\n\n  return __deleteDataSharingPolicy;\n}\n\n/** Retrieves a data sharing policy specified by ID. */\nexport function getDataSharingPolicy(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __getDataSharingPolicy({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.data.v1.data_sharing_policy',\n      method: 'GET' as any,\n      methodFqn:\n        'com.wixpress.cloud.data.api.share.DataCollectionSharingService.GetDataSharingPolicy',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressCloudDataApiShareDataCollectionSharingServiceUrl({\n        protoPath: '/v1/data-collection-sharing/policies/{dataSharingPolicyId}',\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: 'dataSharingPolicy.createdDate' },\n              { path: 'dataSharingPolicy.updatedDate' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __getDataSharingPolicy;\n}\n\n/**\n * Retrieves a list of up to 1,000 data sharing policies on the current site.\n *\n * Specify `dataCollectionIds` to filter policies for specific collections.\n */\nexport function listDataSharingPolicies(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __listDataSharingPolicies({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.data.v1.data_sharing_policy',\n      method: 'GET' as any,\n      methodFqn:\n        'com.wixpress.cloud.data.api.share.DataCollectionSharingService.ListDataSharingPolicies',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressCloudDataApiShareDataCollectionSharingServiceUrl({\n        protoPath: '/v1/data-collection-sharing/policies',\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: 'dataSharingPolicies.createdDate' },\n              { path: 'dataSharingPolicies.updatedDate' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __listDataSharingPolicies;\n}\n\n/**\n * Retrieves a list of shared data collections.\n *\n * Returns either the collections that are either being shared by the current site or shared with the current site. Specify `sharedWithCurrentSite` to filter the direction.\n */\nexport function listSharedDataCollections(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __listSharedDataCollections({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.data.v1.data_sharing_policy',\n      method: 'GET' as any,\n      methodFqn:\n        'com.wixpress.cloud.data.api.share.DataCollectionSharingService.ListSharedDataCollections',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressCloudDataApiShareDataCollectionSharingServiceUrl({\n        protoPath: '/v1/data-collection-sharing/shared',\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: 'connections.createdDate' },\n              { path: 'connections.updatedDate' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __listSharedDataCollections;\n}\n\n/**\n * Connects the current site to a shared data collection.\n *\n * When you call this method, the shared collection appears in the current site's CMS under the specified namespace. You can also access the shared collection by using the [Data Items APIs](https://dev.wix.com/docs/api-reference/business-solutions/cms/data-items/introduction).\n *\n * > **Note:** The `namespace` is an identifier that serves as part of the collection ID when querying collection data. Therefore, it must be unique in a site.\n */\nexport function connectToSharedCollection(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __connectToSharedCollection({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.data.v1.data_sharing_policy',\n      method: 'POST' as any,\n      methodFqn:\n        'com.wixpress.cloud.data.api.share.DataCollectionSharingService.ConnectToSharedCollection',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressCloudDataApiShareDataCollectionSharingServiceUrl({\n        protoPath: '/v1/data-collection-sharing/connect-to-shared-collection',\n        data: payload,\n        host,\n      }),\n      data: payload,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'connection.createdDate' },\n              { path: 'connection.updatedDate' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __connectToSharedCollection;\n}\n\n/**\n * Disconnects the current site from a shared data collection.\n *\n * This method removes the local view of the shared collection from the current site. Once removed, the collection is no longer accessible through the CMS or Data Items APIs.\n *\n * > **Note:** This method doesn't affect the collection on the source site or other target sites that share the collection.\n */\nexport function disconnectFromSharedCollection(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __disconnectFromSharedCollection({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.data.v1.data_sharing_policy',\n      method: 'POST' as any,\n      methodFqn:\n        'com.wixpress.cloud.data.api.share.DataCollectionSharingService.DisconnectFromSharedCollection',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressCloudDataApiShareDataCollectionSharingServiceUrl({\n        protoPath:\n          '/v1/data-collection-sharing/disconnect-from-shared-collection',\n        data: payload,\n        host,\n      }),\n      data: payload,\n    };\n\n    return metadata;\n  }\n\n  return __disconnectFromSharedCollection;\n}\n","import {\n  createDataSharingPolicy as publicCreateDataSharingPolicy,\n  updateDataSharingPolicy as publicUpdateDataSharingPolicy,\n  deleteDataSharingPolicy as publicDeleteDataSharingPolicy,\n  getDataSharingPolicy as publicGetDataSharingPolicy,\n  listDataSharingPolicies as publicListDataSharingPolicies,\n  listSharedDataCollections as publicListSharedDataCollections,\n  connectToSharedCollection as publicConnectToSharedCollection,\n  disconnectFromSharedCollection as publicDisconnectFromSharedCollection,\n} from './data-v1-data-sharing-policy-sharing.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 { onDataSharingPolicyCreated as publicOnDataSharingPolicyCreated } from './data-v1-data-sharing-policy-sharing.public.js';\nimport { onDataSharingPolicyDeleted as publicOnDataSharingPolicyDeleted } from './data-v1-data-sharing-policy-sharing.public.js';\nimport { onDataSharingPolicySharedCollectionConnected as publicOnDataSharingPolicySharedCollectionConnected } from './data-v1-data-sharing-policy-sharing.public.js';\nimport { onDataSharingPolicySharedCollectionDisconnected as publicOnDataSharingPolicySharedCollectionDisconnected } from './data-v1-data-sharing-policy-sharing.public.js';\nimport { onDataSharingPolicyUpdated as publicOnDataSharingPolicyUpdated } from './data-v1-data-sharing-policy-sharing.public.js';\n\nexport const createDataSharingPolicy: MaybeContext<\n  BuildRESTFunction<typeof publicCreateDataSharingPolicy> &\n    typeof publicCreateDataSharingPolicy\n> = /*#__PURE__*/ createRESTModule(publicCreateDataSharingPolicy);\nexport const updateDataSharingPolicy: MaybeContext<\n  BuildRESTFunction<typeof publicUpdateDataSharingPolicy> &\n    typeof publicUpdateDataSharingPolicy\n> = /*#__PURE__*/ createRESTModule(publicUpdateDataSharingPolicy);\nexport const deleteDataSharingPolicy: MaybeContext<\n  BuildRESTFunction<typeof publicDeleteDataSharingPolicy> &\n    typeof publicDeleteDataSharingPolicy\n> = /*#__PURE__*/ createRESTModule(publicDeleteDataSharingPolicy);\nexport const getDataSharingPolicy: MaybeContext<\n  BuildRESTFunction<typeof publicGetDataSharingPolicy> &\n    typeof publicGetDataSharingPolicy\n> = /*#__PURE__*/ createRESTModule(publicGetDataSharingPolicy);\nexport const listDataSharingPolicies: MaybeContext<\n  BuildRESTFunction<typeof publicListDataSharingPolicies> &\n    typeof publicListDataSharingPolicies\n> = /*#__PURE__*/ createRESTModule(publicListDataSharingPolicies);\nexport const listSharedDataCollections: MaybeContext<\n  BuildRESTFunction<typeof publicListSharedDataCollections> &\n    typeof publicListSharedDataCollections\n> = /*#__PURE__*/ createRESTModule(publicListSharedDataCollections);\nexport const connectToSharedCollection: MaybeContext<\n  BuildRESTFunction<typeof publicConnectToSharedCollection> &\n    typeof publicConnectToSharedCollection\n> = /*#__PURE__*/ createRESTModule(publicConnectToSharedCollection);\nexport const disconnectFromSharedCollection: MaybeContext<\n  BuildRESTFunction<typeof publicDisconnectFromSharedCollection> &\n    typeof publicDisconnectFromSharedCollection\n> = /*#__PURE__*/ createRESTModule(publicDisconnectFromSharedCollection);\n/**\n * Triggered when a new data sharing policy is created.\n */\nexport const onDataSharingPolicyCreated: BuildEventDefinition<\n  typeof publicOnDataSharingPolicyCreated\n> &\n  typeof publicOnDataSharingPolicyCreated = createEventModule(\n  publicOnDataSharingPolicyCreated\n);\n/**\n * Triggered when a data sharing policy is deleted.\n */\nexport const onDataSharingPolicyDeleted: BuildEventDefinition<\n  typeof publicOnDataSharingPolicyDeleted\n> &\n  typeof publicOnDataSharingPolicyDeleted = createEventModule(\n  publicOnDataSharingPolicyDeleted\n);\n/**\n * Triggered when a new connection is created, which means a collection is shared with another site.\n */\nexport const onDataSharingPolicySharedCollectionConnected: BuildEventDefinition<\n  typeof publicOnDataSharingPolicySharedCollectionConnected\n> &\n  typeof publicOnDataSharingPolicySharedCollectionConnected = createEventModule(\n  publicOnDataSharingPolicySharedCollectionConnected\n);\n/**\n * Triggered when a connection is disconnected, which means a collection is removed from the site it was previously shared with.\n */\nexport const onDataSharingPolicySharedCollectionDisconnected: BuildEventDefinition<\n  typeof publicOnDataSharingPolicySharedCollectionDisconnected\n> &\n  typeof publicOnDataSharingPolicySharedCollectionDisconnected =\n  createEventModule(publicOnDataSharingPolicySharedCollectionDisconnected);\n/**\n * Triggered when a data sharing policy is updated.\n */\nexport const onDataSharingPolicyUpdated: BuildEventDefinition<\n  typeof publicOnDataSharingPolicyUpdated\n> &\n  typeof publicOnDataSharingPolicyUpdated = createEventModule(\n  publicOnDataSharingPolicyUpdated\n);\n\nexport { WebhookIdentityType } from './data-v1-data-sharing-policy-sharing.universal.js';\nexport {\n  DataSharingPolicy,\n  SharedCollectionConnectedEvent,\n  SharingConnection,\n  SharedCollectionDisconnectedEvent,\n  CreateDataSharingPolicyRequest,\n  CreateDataSharingPolicyResponse,\n  UpdateDataSharingPolicyRequest,\n  UpdateDataSharingPolicyResponse,\n  DeleteDataSharingPolicyRequest,\n  DeleteDataSharingPolicyResponse,\n  GetDataSharingPolicyRequest,\n  GetDataSharingPolicyResponse,\n  ListDataSharingPoliciesRequest,\n  CursorPaging,\n  ListDataSharingPoliciesResponse,\n  CursorPagingMetadata,\n  Cursors,\n  ListSharedDataCollectionsRequest,\n  ListSharedDataCollectionsResponse,\n  ConnectToSharedCollectionRequest,\n  ConnectToSharedCollectionResponse,\n  DisconnectFromSharedCollectionRequest,\n  DisconnectFromSharedCollectionResponse,\n  DomainEvent,\n  DomainEventBodyOneOf,\n  EntityCreatedEvent,\n  RestoreInfo,\n  EntityUpdatedEvent,\n  EntityDeletedEvent,\n  ActionEvent,\n  Empty,\n  MessageEnvelope,\n  IdentificationData,\n  IdentificationDataIdOneOf,\n  AccountInfo,\n  BaseEventMetadata,\n  EventMetadata,\n  AccountInfoMetadata,\n  DataSharingPolicyCreatedEnvelope,\n  DataSharingPolicyDeletedEnvelope,\n  DataSharingPolicySharedCollectionConnectedEnvelope,\n  DataSharingPolicySharedCollectionDisconnectedEnvelope,\n  DataSharingPolicyUpdatedEnvelope,\n  CreateDataSharingPolicyOptions,\n  UpdateDataSharingPolicy,\n  ListDataSharingPoliciesOptions,\n  ListSharedDataCollectionsOptions,\n  ConnectToSharedCollectionOptions,\n  DisconnectFromSharedCollectionOptions,\n} from './data-v1-data-sharing-policy-sharing.universal.js';\nexport {\n  WebhookIdentityTypeWithLiterals,\n  CreateDataSharingPolicyApplicationErrors,\n  UpdateDataSharingPolicyApplicationErrors,\n  DeleteDataSharingPolicyApplicationErrors,\n  GetDataSharingPolicyApplicationErrors,\n  ConnectToSharedCollectionApplicationErrors,\n  DisconnectFromSharedCollectionApplicationErrors,\n} from './data-v1-data-sharing-policy-sharing.universal.js';\n"]}