@wix/auto_sdk_b2btransfer_b-2-b-transfer 1.0.8 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +0 -1
- package/build/cjs/index.typings.js.map +1 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +0 -1
- package/build/es/index.typings.mjs.map +1 -1
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +0 -1
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +0 -1
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/package.json +4 -4
package/build/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.ts","../../src/premium-business-v1-business-site-transfer-b-2-b-transfer.universal.ts","../../src/premium-business-v1-business-site-transfer-b-2-b-transfer.http.ts","../../src/premium-business-v1-business-site-transfer-b-2-b-transfer.public.ts","../../src/premium-business-v1-business-site-transfer-b-2-b-transfer.context.ts"],"sourcesContent":["export * from './src/premium-business-v1-business-site-transfer-b-2-b-transfer.context.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 ambassadorWixPremiumBusinessV1BusinessSiteTransfer from './premium-business-v1-business-site-transfer-b-2-b-transfer.http.js';\n\n/** The B2B Site Transfer object contains information about a site transfer. */\nexport interface SiteTransfer {\n /**\n * ID of the site. See the\n * [Sites API](https://dev.wix.com/api/rest/account-level-apis/sites/query-sites)\n * for more details.\n * @format GUID\n */\n siteId?: string;\n /**\n * ID of the source account.\n * Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more\n * information about supported source accounts.\n * @format GUID\n */\n sourceAccountId?: string;\n /**\n * Whether the site owner receives an email notification from Wix about the\n * successful site transfer. Site owners don't receive email notifications\n * about failed transfers. Default: `false`.\n */\n enableNotifications?: boolean;\n}\n\nexport interface TransferSiteRequest {\n /** Information about the site transfer. */\n siteTransfer: SiteTransfer;\n}\n\nexport interface TransferSiteResponse {\n /** Information about the site transfer. */\n siteTransfer?: SiteTransfer;\n}\n\n/**\n * Transfers a Wix site from the source account to the target account.\n *\n * > **Note:** You must pass the ID of the target account in the header of the call.\n *\n * Only strategic partners of Wix services can transfer sites. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to learn how to become a strategic partner.\n *\n * Not all Wix accounts are supported as source accounts and you can transfer a site only to your main account or one of its sub-accounts. It isn’t possible to transfer a site to an unrelated account. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more information.\n *\n * Only sites that don’t include paid Wix services can be transferred. After transferring the site, you can use the [Resellers API](https://dev.wix.com/docs/sdk/account-level-modules/resellers/introduction) to offer paid Wix services to your customers.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n * @param siteTransfer - Information about the site transfer.\n * @public\n * @documentationMaturity preview\n * @requiredField siteTransfer\n * @permissionId PREMIUM.BUSINESS_SITE_TRANSFER\n * @fqn com.wixpress.premium.b2b.transfer.v1.B2bSiteTransferService.TransferSite\n */\nexport async function transferSite(\n siteTransfer: SiteTransfer\n): Promise<\n NonNullablePaths<\n TransferSiteResponse,\n | `siteTransfer.siteId`\n | `siteTransfer.sourceAccountId`\n | `siteTransfer.enableNotifications`,\n 3\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 siteTransfer: siteTransfer,\n });\n\n const reqOpts =\n ambassadorWixPremiumBusinessV1BusinessSiteTransfer.transferSite(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: { siteTransfer: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['siteTransfer']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressPremiumB2BTransferV1B2BSiteTransferServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www.wixapis.com': [\n {\n srcPath: '/b2b-site-management/resellers/v1/transferSite',\n destPath: '/resellers/v1/transferSite',\n },\n {\n srcPath: '/b2b-site-management/v1/transferSite',\n destPath: '/v1/transferSite',\n },\n {\n srcPath: '/b2b-site-management/v1/transfer-site',\n destPath: '/v1/transfer-site',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_b2btransfer_b-2-b-transfer';\n\n/**\n * Transfers a Wix site from the source account to the target account.\n *\n * > **Note:** You must pass the ID of the target account in the header of the call.\n *\n * Only strategic partners of Wix services can transfer sites. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to learn how to become a strategic partner.\n *\n * Not all Wix accounts are supported as source accounts and you can transfer a site only to your main account or one of its sub-accounts. It isn’t possible to transfer a site to an unrelated account. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more information.\n *\n * Only sites that don’t include paid Wix services can be transferred. After transferring the site, you can use the [Resellers API](https://dev.wix.com/docs/sdk/account-level-modules/resellers/introduction) to offer paid Wix services to your customers.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n */\nexport function transferSite(payload: object): RequestOptionsFactory<any> {\n function __transferSite({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.premium.business.v1.business_site_transfer',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.premium.b2b.transfer.v1.B2bSiteTransferService.TransferSite',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPremiumB2BTransferV1B2BSiteTransferServiceUrl({\n protoPath: '/v1/transfer-site',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __transferSite;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n SiteTransfer,\n TransferSiteResponse,\n transferSite as universalTransferSite,\n} from './premium-business-v1-business-site-transfer-b-2-b-transfer.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/b2btransfer' };\n\nexport function transferSite(httpClient: HttpClient): TransferSiteSignature {\n return (siteTransfer: SiteTransfer) =>\n universalTransferSite(\n siteTransfer,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface TransferSiteSignature {\n /**\n * Transfers a Wix site from the source account to the target account.\n *\n * > **Note:** You must pass the ID of the target account in the header of the call.\n *\n * Only strategic partners of Wix services can transfer sites. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to learn how to become a strategic partner.\n *\n * Not all Wix accounts are supported as source accounts and you can transfer a site only to your main account or one of its sub-accounts. It isn’t possible to transfer a site to an unrelated account. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more information.\n *\n * Only sites that don’t include paid Wix services can be transferred. After transferring the site, you can use the [Resellers API](https://dev.wix.com/docs/sdk/account-level-modules/resellers/introduction) to offer paid Wix services to your customers.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n * @param - Information about the site transfer.\n */\n (siteTransfer: SiteTransfer): Promise<\n NonNullablePaths<\n TransferSiteResponse,\n | `siteTransfer.siteId`\n | `siteTransfer.sourceAccountId`\n | `siteTransfer.enableNotifications`,\n 3\n >\n >;\n}\n\nexport {\n SiteTransfer,\n TransferSiteRequest,\n TransferSiteResponse,\n} from './premium-business-v1-business-site-transfer-b-2-b-transfer.universal.js';\n","import { transferSite as publicTransferSite } from './premium-business-v1-business-site-transfer-b-2-b-transfer.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const transferSite: MaybeContext<\n BuildRESTFunction<typeof publicTransferSite> & typeof publicTransferSite\n> = /*#__PURE__*/ createRESTModule(publicTransferSite);\n\nexport {\n SiteTransfer,\n TransferSiteRequest,\n TransferSiteResponse,\n} from './premium-business-v1-business-site-transfer-b-2-b-transfer.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,sBAAAA;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAA2B;AAI3B,SAAS,gEACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,aAAO,gCAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAed,SAAS,aAAa,SAA6C;AACxE,WAAS,eAAe,EAAE,KAAK,GAAQ;AACrC,UAAM,WAAW;AAAA,MACf,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,WACE;AAAA,MACF,aAAa;AAAA,MACb,kBAAkB;AAAA,QAChB,wBAAwB;AAAA,MAC1B;AAAA,MACA,KAAK,gEAAgE;AAAA,QACnE,WAAW;AAAA,QACX,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,MACD,MAAM;AAAA,IACR;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;;;ADJA,eAAsBC,cACpB,cASA;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC;AAAA,IACpD;AAAA,EACF,CAAC;AAED,QAAM,UAC+C,aAAa,OAAO;AAEzE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAC;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,cAAc,OAAO;AAAA,QACjD,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,cAAc;AAAA,IACjB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AEhGO,SAASC,cAAa,YAA+C;AAC1E,SAAO,CAAC,iBACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACfA,IAAAC,uBAAiC;AAG1B,IAAMC,gBAEK,2DAAiBA,aAAkB;","names":["transferSite","transferSite","sdkTransformError","transferSite","import_rest_modules","transferSite"]}
|
|
1
|
+
{"version":3,"sources":["../../index.ts","../../src/premium-business-v1-business-site-transfer-b-2-b-transfer.universal.ts","../../src/premium-business-v1-business-site-transfer-b-2-b-transfer.http.ts","../../src/premium-business-v1-business-site-transfer-b-2-b-transfer.public.ts","../../src/premium-business-v1-business-site-transfer-b-2-b-transfer.context.ts"],"sourcesContent":["export * from './src/premium-business-v1-business-site-transfer-b-2-b-transfer.context.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 ambassadorWixPremiumBusinessV1BusinessSiteTransfer from './premium-business-v1-business-site-transfer-b-2-b-transfer.http.js';\n\n/** The B2B Site Transfer object contains information about a site transfer. */\nexport interface SiteTransfer {\n /**\n * ID of the site. See the\n * [Sites API](https://dev.wix.com/api/rest/account-level-apis/sites/query-sites)\n * for more details.\n * @format GUID\n */\n siteId?: string;\n /**\n * ID of the source account.\n * Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more\n * information about supported source accounts.\n * @format GUID\n */\n sourceAccountId?: string;\n /**\n * Whether the site owner receives an email notification from Wix about the\n * successful site transfer. Site owners don't receive email notifications\n * about failed transfers. Default: `false`.\n */\n enableNotifications?: boolean;\n}\n\nexport interface TransferSiteRequest {\n /** Information about the site transfer. */\n siteTransfer: SiteTransfer;\n}\n\nexport interface TransferSiteResponse {\n /** Information about the site transfer. */\n siteTransfer?: SiteTransfer;\n}\n\n/**\n * Transfers a Wix site from the source account to the target account.\n *\n * > **Note:** You must pass the ID of the target account in the header of the call.\n *\n * Only strategic partners of Wix services can transfer sites. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to learn how to become a strategic partner.\n *\n * Not all Wix accounts are supported as source accounts and you can transfer a site only to your main account or one of its sub-accounts. It isn’t possible to transfer a site to an unrelated account. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more information.\n *\n * Only sites that don’t include paid Wix services can be transferred. After transferring the site, you can use the [Resellers API](https://dev.wix.com/docs/sdk/account-level-modules/resellers/introduction) to offer paid Wix services to your customers.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n * @param siteTransfer - Information about the site transfer.\n * @public\n * @requiredField siteTransfer\n * @permissionId PREMIUM.BUSINESS_SITE_TRANSFER\n * @fqn com.wixpress.premium.b2b.transfer.v1.B2bSiteTransferService.TransferSite\n */\nexport async function transferSite(\n siteTransfer: SiteTransfer\n): Promise<\n NonNullablePaths<\n TransferSiteResponse,\n | `siteTransfer.siteId`\n | `siteTransfer.sourceAccountId`\n | `siteTransfer.enableNotifications`,\n 3\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 siteTransfer: siteTransfer,\n });\n\n const reqOpts =\n ambassadorWixPremiumBusinessV1BusinessSiteTransfer.transferSite(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: { siteTransfer: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['siteTransfer']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressPremiumB2BTransferV1B2BSiteTransferServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www.wixapis.com': [\n {\n srcPath: '/b2b-site-management/resellers/v1/transferSite',\n destPath: '/resellers/v1/transferSite',\n },\n {\n srcPath: '/b2b-site-management/v1/transferSite',\n destPath: '/v1/transferSite',\n },\n {\n srcPath: '/b2b-site-management/v1/transfer-site',\n destPath: '/v1/transfer-site',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_b2btransfer_b-2-b-transfer';\n\n/**\n * Transfers a Wix site from the source account to the target account.\n *\n * > **Note:** You must pass the ID of the target account in the header of the call.\n *\n * Only strategic partners of Wix services can transfer sites. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to learn how to become a strategic partner.\n *\n * Not all Wix accounts are supported as source accounts and you can transfer a site only to your main account or one of its sub-accounts. It isn’t possible to transfer a site to an unrelated account. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more information.\n *\n * Only sites that don’t include paid Wix services can be transferred. After transferring the site, you can use the [Resellers API](https://dev.wix.com/docs/sdk/account-level-modules/resellers/introduction) to offer paid Wix services to your customers.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n */\nexport function transferSite(payload: object): RequestOptionsFactory<any> {\n function __transferSite({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.premium.business.v1.business_site_transfer',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.premium.b2b.transfer.v1.B2bSiteTransferService.TransferSite',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPremiumB2BTransferV1B2BSiteTransferServiceUrl({\n protoPath: '/v1/transfer-site',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __transferSite;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n SiteTransfer,\n TransferSiteResponse,\n transferSite as universalTransferSite,\n} from './premium-business-v1-business-site-transfer-b-2-b-transfer.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/b2btransfer' };\n\nexport function transferSite(httpClient: HttpClient): TransferSiteSignature {\n return (siteTransfer: SiteTransfer) =>\n universalTransferSite(\n siteTransfer,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface TransferSiteSignature {\n /**\n * Transfers a Wix site from the source account to the target account.\n *\n * > **Note:** You must pass the ID of the target account in the header of the call.\n *\n * Only strategic partners of Wix services can transfer sites. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to learn how to become a strategic partner.\n *\n * Not all Wix accounts are supported as source accounts and you can transfer a site only to your main account or one of its sub-accounts. It isn’t possible to transfer a site to an unrelated account. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more information.\n *\n * Only sites that don’t include paid Wix services can be transferred. After transferring the site, you can use the [Resellers API](https://dev.wix.com/docs/sdk/account-level-modules/resellers/introduction) to offer paid Wix services to your customers.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n * @param - Information about the site transfer.\n */\n (siteTransfer: SiteTransfer): Promise<\n NonNullablePaths<\n TransferSiteResponse,\n | `siteTransfer.siteId`\n | `siteTransfer.sourceAccountId`\n | `siteTransfer.enableNotifications`,\n 3\n >\n >;\n}\n\nexport {\n SiteTransfer,\n TransferSiteRequest,\n TransferSiteResponse,\n} from './premium-business-v1-business-site-transfer-b-2-b-transfer.universal.js';\n","import { transferSite as publicTransferSite } from './premium-business-v1-business-site-transfer-b-2-b-transfer.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const transferSite: MaybeContext<\n BuildRESTFunction<typeof publicTransferSite> & typeof publicTransferSite\n> = /*#__PURE__*/ createRESTModule(publicTransferSite);\n\nexport {\n SiteTransfer,\n TransferSiteRequest,\n TransferSiteResponse,\n} from './premium-business-v1-business-site-transfer-b-2-b-transfer.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,sBAAAA;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAA2B;AAI3B,SAAS,gEACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,aAAO,gCAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAed,SAAS,aAAa,SAA6C;AACxE,WAAS,eAAe,EAAE,KAAK,GAAQ;AACrC,UAAM,WAAW;AAAA,MACf,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,WACE;AAAA,MACF,aAAa;AAAA,MACb,kBAAkB;AAAA,QAChB,wBAAwB;AAAA,MAC1B;AAAA,MACA,KAAK,gEAAgE;AAAA,QACnE,WAAW;AAAA,QACX,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,MACD,MAAM;AAAA,IACR;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;;;ADLA,eAAsBC,cACpB,cASA;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC;AAAA,IACpD;AAAA,EACF,CAAC;AAED,QAAM,UAC+C,aAAa,OAAO;AAEzE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAC;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,cAAc,OAAO;AAAA,QACjD,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,cAAc;AAAA,IACjB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AE/FO,SAASC,cAAa,YAA+C;AAC1E,SAAO,CAAC,iBACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACfA,IAAAC,uBAAiC;AAG1B,IAAMC,gBAEK,2DAAiBA,aAAkB;","names":["transferSite","transferSite","sdkTransformError","transferSite","import_rest_modules","transferSite"]}
|
|
@@ -45,7 +45,6 @@ interface TransferSiteResponse {
|
|
|
45
45
|
* > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.
|
|
46
46
|
* @param siteTransfer - Information about the site transfer.
|
|
47
47
|
* @public
|
|
48
|
-
* @documentationMaturity preview
|
|
49
48
|
* @requiredField siteTransfer
|
|
50
49
|
* @permissionId PREMIUM.BUSINESS_SITE_TRANSFER
|
|
51
50
|
* @fqn com.wixpress.premium.b2b.transfer.v1.B2bSiteTransferService.TransferSite
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.typings.ts","../../src/premium-business-v1-business-site-transfer-b-2-b-transfer.universal.ts","../../src/premium-business-v1-business-site-transfer-b-2-b-transfer.http.ts"],"sourcesContent":["export * from './src/premium-business-v1-business-site-transfer-b-2-b-transfer.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 ambassadorWixPremiumBusinessV1BusinessSiteTransfer from './premium-business-v1-business-site-transfer-b-2-b-transfer.http.js';\n\n/** The B2B Site Transfer object contains information about a site transfer. */\nexport interface SiteTransfer {\n /**\n * ID of the site. See the\n * [Sites API](https://dev.wix.com/api/rest/account-level-apis/sites/query-sites)\n * for more details.\n * @format GUID\n */\n siteId?: string;\n /**\n * ID of the source account.\n * Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more\n * information about supported source accounts.\n * @format GUID\n */\n sourceAccountId?: string;\n /**\n * Whether the site owner receives an email notification from Wix about the\n * successful site transfer. Site owners don't receive email notifications\n * about failed transfers. Default: `false`.\n */\n enableNotifications?: boolean;\n}\n\nexport interface TransferSiteRequest {\n /** Information about the site transfer. */\n siteTransfer: SiteTransfer;\n}\n\nexport interface TransferSiteResponse {\n /** Information about the site transfer. */\n siteTransfer?: SiteTransfer;\n}\n\n/**\n * Transfers a Wix site from the source account to the target account.\n *\n * > **Note:** You must pass the ID of the target account in the header of the call.\n *\n * Only strategic partners of Wix services can transfer sites. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to learn how to become a strategic partner.\n *\n * Not all Wix accounts are supported as source accounts and you can transfer a site only to your main account or one of its sub-accounts. It isn’t possible to transfer a site to an unrelated account. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more information.\n *\n * Only sites that don’t include paid Wix services can be transferred. After transferring the site, you can use the [Resellers API](https://dev.wix.com/docs/sdk/account-level-modules/resellers/introduction) to offer paid Wix services to your customers.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n * @param siteTransfer - Information about the site transfer.\n * @public\n * @
|
|
1
|
+
{"version":3,"sources":["../../index.typings.ts","../../src/premium-business-v1-business-site-transfer-b-2-b-transfer.universal.ts","../../src/premium-business-v1-business-site-transfer-b-2-b-transfer.http.ts"],"sourcesContent":["export * from './src/premium-business-v1-business-site-transfer-b-2-b-transfer.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 ambassadorWixPremiumBusinessV1BusinessSiteTransfer from './premium-business-v1-business-site-transfer-b-2-b-transfer.http.js';\n\n/** The B2B Site Transfer object contains information about a site transfer. */\nexport interface SiteTransfer {\n /**\n * ID of the site. See the\n * [Sites API](https://dev.wix.com/api/rest/account-level-apis/sites/query-sites)\n * for more details.\n * @format GUID\n */\n siteId?: string;\n /**\n * ID of the source account.\n * Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more\n * information about supported source accounts.\n * @format GUID\n */\n sourceAccountId?: string;\n /**\n * Whether the site owner receives an email notification from Wix about the\n * successful site transfer. Site owners don't receive email notifications\n * about failed transfers. Default: `false`.\n */\n enableNotifications?: boolean;\n}\n\nexport interface TransferSiteRequest {\n /** Information about the site transfer. */\n siteTransfer: SiteTransfer;\n}\n\nexport interface TransferSiteResponse {\n /** Information about the site transfer. */\n siteTransfer?: SiteTransfer;\n}\n\n/**\n * Transfers a Wix site from the source account to the target account.\n *\n * > **Note:** You must pass the ID of the target account in the header of the call.\n *\n * Only strategic partners of Wix services can transfer sites. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to learn how to become a strategic partner.\n *\n * Not all Wix accounts are supported as source accounts and you can transfer a site only to your main account or one of its sub-accounts. It isn’t possible to transfer a site to an unrelated account. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more information.\n *\n * Only sites that don’t include paid Wix services can be transferred. After transferring the site, you can use the [Resellers API](https://dev.wix.com/docs/sdk/account-level-modules/resellers/introduction) to offer paid Wix services to your customers.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n * @param siteTransfer - Information about the site transfer.\n * @public\n * @requiredField siteTransfer\n * @permissionId PREMIUM.BUSINESS_SITE_TRANSFER\n * @fqn com.wixpress.premium.b2b.transfer.v1.B2bSiteTransferService.TransferSite\n */\nexport async function transferSite(\n siteTransfer: SiteTransfer\n): Promise<\n NonNullablePaths<\n TransferSiteResponse,\n | `siteTransfer.siteId`\n | `siteTransfer.sourceAccountId`\n | `siteTransfer.enableNotifications`,\n 3\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 siteTransfer: siteTransfer,\n });\n\n const reqOpts =\n ambassadorWixPremiumBusinessV1BusinessSiteTransfer.transferSite(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: { siteTransfer: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['siteTransfer']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressPremiumB2BTransferV1B2BSiteTransferServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www.wixapis.com': [\n {\n srcPath: '/b2b-site-management/resellers/v1/transferSite',\n destPath: '/resellers/v1/transferSite',\n },\n {\n srcPath: '/b2b-site-management/v1/transferSite',\n destPath: '/v1/transferSite',\n },\n {\n srcPath: '/b2b-site-management/v1/transfer-site',\n destPath: '/v1/transfer-site',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_b2btransfer_b-2-b-transfer';\n\n/**\n * Transfers a Wix site from the source account to the target account.\n *\n * > **Note:** You must pass the ID of the target account in the header of the call.\n *\n * Only strategic partners of Wix services can transfer sites. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to learn how to become a strategic partner.\n *\n * Not all Wix accounts are supported as source accounts and you can transfer a site only to your main account or one of its sub-accounts. It isn’t possible to transfer a site to an unrelated account. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more information.\n *\n * Only sites that don’t include paid Wix services can be transferred. After transferring the site, you can use the [Resellers API](https://dev.wix.com/docs/sdk/account-level-modules/resellers/introduction) to offer paid Wix services to your customers.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n */\nexport function transferSite(payload: object): RequestOptionsFactory<any> {\n function __transferSite({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.premium.business.v1.business_site_transfer',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.premium.b2b.transfer.v1.B2bSiteTransferService.TransferSite',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPremiumB2BTransferV1B2BSiteTransferServiceUrl({\n protoPath: '/v1/transfer-site',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __transferSite;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,sBAAAA;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAA2B;AAI3B,SAAS,gEACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,aAAO,gCAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAed,SAAS,aAAa,SAA6C;AACxE,WAAS,eAAe,EAAE,KAAK,GAAQ;AACrC,UAAM,WAAW;AAAA,MACf,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,WACE;AAAA,MACF,aAAa;AAAA,MACb,kBAAkB;AAAA,QAChB,wBAAwB;AAAA,MAC1B;AAAA,MACA,KAAK,gEAAgE;AAAA,QACnE,WAAW;AAAA,QACX,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,MACD,MAAM;AAAA,IACR;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;;;ADLA,eAAsBC,cACpB,cASA;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC;AAAA,IACpD;AAAA,EACF,CAAC;AAED,QAAM,UAC+C,aAAa,OAAO;AAEzE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAC;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,cAAc,OAAO;AAAA,QACjD,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,cAAc;AAAA,IACjB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["transferSite","transferSite","sdkTransformError"]}
|
package/build/es/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/premium-business-v1-business-site-transfer-b-2-b-transfer.universal.ts","../../src/premium-business-v1-business-site-transfer-b-2-b-transfer.http.ts","../../src/premium-business-v1-business-site-transfer-b-2-b-transfer.public.ts","../../src/premium-business-v1-business-site-transfer-b-2-b-transfer.context.ts"],"sourcesContent":["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 ambassadorWixPremiumBusinessV1BusinessSiteTransfer from './premium-business-v1-business-site-transfer-b-2-b-transfer.http.js';\n\n/** The B2B Site Transfer object contains information about a site transfer. */\nexport interface SiteTransfer {\n /**\n * ID of the site. See the\n * [Sites API](https://dev.wix.com/api/rest/account-level-apis/sites/query-sites)\n * for more details.\n * @format GUID\n */\n siteId?: string;\n /**\n * ID of the source account.\n * Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more\n * information about supported source accounts.\n * @format GUID\n */\n sourceAccountId?: string;\n /**\n * Whether the site owner receives an email notification from Wix about the\n * successful site transfer. Site owners don't receive email notifications\n * about failed transfers. Default: `false`.\n */\n enableNotifications?: boolean;\n}\n\nexport interface TransferSiteRequest {\n /** Information about the site transfer. */\n siteTransfer: SiteTransfer;\n}\n\nexport interface TransferSiteResponse {\n /** Information about the site transfer. */\n siteTransfer?: SiteTransfer;\n}\n\n/**\n * Transfers a Wix site from the source account to the target account.\n *\n * > **Note:** You must pass the ID of the target account in the header of the call.\n *\n * Only strategic partners of Wix services can transfer sites. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to learn how to become a strategic partner.\n *\n * Not all Wix accounts are supported as source accounts and you can transfer a site only to your main account or one of its sub-accounts. It isn’t possible to transfer a site to an unrelated account. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more information.\n *\n * Only sites that don’t include paid Wix services can be transferred. After transferring the site, you can use the [Resellers API](https://dev.wix.com/docs/sdk/account-level-modules/resellers/introduction) to offer paid Wix services to your customers.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n * @param siteTransfer - Information about the site transfer.\n * @public\n * @documentationMaturity preview\n * @requiredField siteTransfer\n * @permissionId PREMIUM.BUSINESS_SITE_TRANSFER\n * @fqn com.wixpress.premium.b2b.transfer.v1.B2bSiteTransferService.TransferSite\n */\nexport async function transferSite(\n siteTransfer: SiteTransfer\n): Promise<\n NonNullablePaths<\n TransferSiteResponse,\n | `siteTransfer.siteId`\n | `siteTransfer.sourceAccountId`\n | `siteTransfer.enableNotifications`,\n 3\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 siteTransfer: siteTransfer,\n });\n\n const reqOpts =\n ambassadorWixPremiumBusinessV1BusinessSiteTransfer.transferSite(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: { siteTransfer: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['siteTransfer']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressPremiumB2BTransferV1B2BSiteTransferServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www.wixapis.com': [\n {\n srcPath: '/b2b-site-management/resellers/v1/transferSite',\n destPath: '/resellers/v1/transferSite',\n },\n {\n srcPath: '/b2b-site-management/v1/transferSite',\n destPath: '/v1/transferSite',\n },\n {\n srcPath: '/b2b-site-management/v1/transfer-site',\n destPath: '/v1/transfer-site',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_b2btransfer_b-2-b-transfer';\n\n/**\n * Transfers a Wix site from the source account to the target account.\n *\n * > **Note:** You must pass the ID of the target account in the header of the call.\n *\n * Only strategic partners of Wix services can transfer sites. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to learn how to become a strategic partner.\n *\n * Not all Wix accounts are supported as source accounts and you can transfer a site only to your main account or one of its sub-accounts. It isn’t possible to transfer a site to an unrelated account. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more information.\n *\n * Only sites that don’t include paid Wix services can be transferred. After transferring the site, you can use the [Resellers API](https://dev.wix.com/docs/sdk/account-level-modules/resellers/introduction) to offer paid Wix services to your customers.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n */\nexport function transferSite(payload: object): RequestOptionsFactory<any> {\n function __transferSite({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.premium.business.v1.business_site_transfer',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.premium.b2b.transfer.v1.B2bSiteTransferService.TransferSite',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPremiumB2BTransferV1B2BSiteTransferServiceUrl({\n protoPath: '/v1/transfer-site',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __transferSite;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n SiteTransfer,\n TransferSiteResponse,\n transferSite as universalTransferSite,\n} from './premium-business-v1-business-site-transfer-b-2-b-transfer.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/b2btransfer' };\n\nexport function transferSite(httpClient: HttpClient): TransferSiteSignature {\n return (siteTransfer: SiteTransfer) =>\n universalTransferSite(\n siteTransfer,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface TransferSiteSignature {\n /**\n * Transfers a Wix site from the source account to the target account.\n *\n * > **Note:** You must pass the ID of the target account in the header of the call.\n *\n * Only strategic partners of Wix services can transfer sites. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to learn how to become a strategic partner.\n *\n * Not all Wix accounts are supported as source accounts and you can transfer a site only to your main account or one of its sub-accounts. It isn’t possible to transfer a site to an unrelated account. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more information.\n *\n * Only sites that don’t include paid Wix services can be transferred. After transferring the site, you can use the [Resellers API](https://dev.wix.com/docs/sdk/account-level-modules/resellers/introduction) to offer paid Wix services to your customers.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n * @param - Information about the site transfer.\n */\n (siteTransfer: SiteTransfer): Promise<\n NonNullablePaths<\n TransferSiteResponse,\n | `siteTransfer.siteId`\n | `siteTransfer.sourceAccountId`\n | `siteTransfer.enableNotifications`,\n 3\n >\n >;\n}\n\nexport {\n SiteTransfer,\n TransferSiteRequest,\n TransferSiteResponse,\n} from './premium-business-v1-business-site-transfer-b-2-b-transfer.universal.js';\n","import { transferSite as publicTransferSite } from './premium-business-v1-business-site-transfer-b-2-b-transfer.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const transferSite: MaybeContext<\n BuildRESTFunction<typeof publicTransferSite> & typeof publicTransferSite\n> = /*#__PURE__*/ createRESTModule(publicTransferSite);\n\nexport {\n SiteTransfer,\n TransferSiteRequest,\n TransferSiteResponse,\n} from './premium-business-v1-business-site-transfer-b-2-b-transfer.universal.js';\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,kBAAkB;AAI3B,SAAS,gEACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,SAAO,WAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAed,SAAS,aAAa,SAA6C;AACxE,WAAS,eAAe,EAAE,KAAK,GAAQ;AACrC,UAAM,WAAW;AAAA,MACf,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,WACE;AAAA,MACF,aAAa;AAAA,MACb,kBAAkB;AAAA,QAChB,wBAAwB;AAAA,MAC1B;AAAA,MACA,KAAK,gEAAgE;AAAA,QACnE,WAAW;AAAA,QACX,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,MACD,MAAM;AAAA,IACR;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;;;ADJA,eAAsBA,cACpB,cASA;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,UAAU,sCAAsC;AAAA,IACpD;AAAA,EACF,CAAC;AAED,QAAM,UAC+C,aAAa,OAAO;AAEzE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,WAAO,wCAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,mBAAmB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,cAAc,OAAO;AAAA,QACjD,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,cAAc;AAAA,IACjB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AEhGO,SAASC,cAAa,YAA+C;AAC1E,SAAO,CAAC,iBACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACfA,SAAS,wBAAwB;AAG1B,IAAMC,gBAEK,iCAAiBA,aAAkB;","names":["transferSite","transferSite","transferSite"]}
|
|
1
|
+
{"version":3,"sources":["../../src/premium-business-v1-business-site-transfer-b-2-b-transfer.universal.ts","../../src/premium-business-v1-business-site-transfer-b-2-b-transfer.http.ts","../../src/premium-business-v1-business-site-transfer-b-2-b-transfer.public.ts","../../src/premium-business-v1-business-site-transfer-b-2-b-transfer.context.ts"],"sourcesContent":["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 ambassadorWixPremiumBusinessV1BusinessSiteTransfer from './premium-business-v1-business-site-transfer-b-2-b-transfer.http.js';\n\n/** The B2B Site Transfer object contains information about a site transfer. */\nexport interface SiteTransfer {\n /**\n * ID of the site. See the\n * [Sites API](https://dev.wix.com/api/rest/account-level-apis/sites/query-sites)\n * for more details.\n * @format GUID\n */\n siteId?: string;\n /**\n * ID of the source account.\n * Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more\n * information about supported source accounts.\n * @format GUID\n */\n sourceAccountId?: string;\n /**\n * Whether the site owner receives an email notification from Wix about the\n * successful site transfer. Site owners don't receive email notifications\n * about failed transfers. Default: `false`.\n */\n enableNotifications?: boolean;\n}\n\nexport interface TransferSiteRequest {\n /** Information about the site transfer. */\n siteTransfer: SiteTransfer;\n}\n\nexport interface TransferSiteResponse {\n /** Information about the site transfer. */\n siteTransfer?: SiteTransfer;\n}\n\n/**\n * Transfers a Wix site from the source account to the target account.\n *\n * > **Note:** You must pass the ID of the target account in the header of the call.\n *\n * Only strategic partners of Wix services can transfer sites. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to learn how to become a strategic partner.\n *\n * Not all Wix accounts are supported as source accounts and you can transfer a site only to your main account or one of its sub-accounts. It isn’t possible to transfer a site to an unrelated account. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more information.\n *\n * Only sites that don’t include paid Wix services can be transferred. After transferring the site, you can use the [Resellers API](https://dev.wix.com/docs/sdk/account-level-modules/resellers/introduction) to offer paid Wix services to your customers.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n * @param siteTransfer - Information about the site transfer.\n * @public\n * @requiredField siteTransfer\n * @permissionId PREMIUM.BUSINESS_SITE_TRANSFER\n * @fqn com.wixpress.premium.b2b.transfer.v1.B2bSiteTransferService.TransferSite\n */\nexport async function transferSite(\n siteTransfer: SiteTransfer\n): Promise<\n NonNullablePaths<\n TransferSiteResponse,\n | `siteTransfer.siteId`\n | `siteTransfer.sourceAccountId`\n | `siteTransfer.enableNotifications`,\n 3\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 siteTransfer: siteTransfer,\n });\n\n const reqOpts =\n ambassadorWixPremiumBusinessV1BusinessSiteTransfer.transferSite(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: { siteTransfer: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['siteTransfer']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressPremiumB2BTransferV1B2BSiteTransferServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www.wixapis.com': [\n {\n srcPath: '/b2b-site-management/resellers/v1/transferSite',\n destPath: '/resellers/v1/transferSite',\n },\n {\n srcPath: '/b2b-site-management/v1/transferSite',\n destPath: '/v1/transferSite',\n },\n {\n srcPath: '/b2b-site-management/v1/transfer-site',\n destPath: '/v1/transfer-site',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_b2btransfer_b-2-b-transfer';\n\n/**\n * Transfers a Wix site from the source account to the target account.\n *\n * > **Note:** You must pass the ID of the target account in the header of the call.\n *\n * Only strategic partners of Wix services can transfer sites. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to learn how to become a strategic partner.\n *\n * Not all Wix accounts are supported as source accounts and you can transfer a site only to your main account or one of its sub-accounts. It isn’t possible to transfer a site to an unrelated account. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more information.\n *\n * Only sites that don’t include paid Wix services can be transferred. After transferring the site, you can use the [Resellers API](https://dev.wix.com/docs/sdk/account-level-modules/resellers/introduction) to offer paid Wix services to your customers.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n */\nexport function transferSite(payload: object): RequestOptionsFactory<any> {\n function __transferSite({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.premium.business.v1.business_site_transfer',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.premium.b2b.transfer.v1.B2bSiteTransferService.TransferSite',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPremiumB2BTransferV1B2BSiteTransferServiceUrl({\n protoPath: '/v1/transfer-site',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __transferSite;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n SiteTransfer,\n TransferSiteResponse,\n transferSite as universalTransferSite,\n} from './premium-business-v1-business-site-transfer-b-2-b-transfer.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/b2btransfer' };\n\nexport function transferSite(httpClient: HttpClient): TransferSiteSignature {\n return (siteTransfer: SiteTransfer) =>\n universalTransferSite(\n siteTransfer,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface TransferSiteSignature {\n /**\n * Transfers a Wix site from the source account to the target account.\n *\n * > **Note:** You must pass the ID of the target account in the header of the call.\n *\n * Only strategic partners of Wix services can transfer sites. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to learn how to become a strategic partner.\n *\n * Not all Wix accounts are supported as source accounts and you can transfer a site only to your main account or one of its sub-accounts. It isn’t possible to transfer a site to an unrelated account. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more information.\n *\n * Only sites that don’t include paid Wix services can be transferred. After transferring the site, you can use the [Resellers API](https://dev.wix.com/docs/sdk/account-level-modules/resellers/introduction) to offer paid Wix services to your customers.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n * @param - Information about the site transfer.\n */\n (siteTransfer: SiteTransfer): Promise<\n NonNullablePaths<\n TransferSiteResponse,\n | `siteTransfer.siteId`\n | `siteTransfer.sourceAccountId`\n | `siteTransfer.enableNotifications`,\n 3\n >\n >;\n}\n\nexport {\n SiteTransfer,\n TransferSiteRequest,\n TransferSiteResponse,\n} from './premium-business-v1-business-site-transfer-b-2-b-transfer.universal.js';\n","import { transferSite as publicTransferSite } from './premium-business-v1-business-site-transfer-b-2-b-transfer.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const transferSite: MaybeContext<\n BuildRESTFunction<typeof publicTransferSite> & typeof publicTransferSite\n> = /*#__PURE__*/ createRESTModule(publicTransferSite);\n\nexport {\n SiteTransfer,\n TransferSiteRequest,\n TransferSiteResponse,\n} from './premium-business-v1-business-site-transfer-b-2-b-transfer.universal.js';\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,kBAAkB;AAI3B,SAAS,gEACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,SAAO,WAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAed,SAAS,aAAa,SAA6C;AACxE,WAAS,eAAe,EAAE,KAAK,GAAQ;AACrC,UAAM,WAAW;AAAA,MACf,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,WACE;AAAA,MACF,aAAa;AAAA,MACb,kBAAkB;AAAA,QAChB,wBAAwB;AAAA,MAC1B;AAAA,MACA,KAAK,gEAAgE;AAAA,QACnE,WAAW;AAAA,QACX,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,MACD,MAAM;AAAA,IACR;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;;;ADLA,eAAsBA,cACpB,cASA;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,UAAU,sCAAsC;AAAA,IACpD;AAAA,EACF,CAAC;AAED,QAAM,UAC+C,aAAa,OAAO;AAEzE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,WAAO,wCAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,mBAAmB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,cAAc,OAAO;AAAA,QACjD,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,cAAc;AAAA,IACjB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AE/FO,SAASC,cAAa,YAA+C;AAC1E,SAAO,CAAC,iBACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACfA,SAAS,wBAAwB;AAG1B,IAAMC,gBAEK,iCAAiBA,aAAkB;","names":["transferSite","transferSite","transferSite"]}
|
|
@@ -45,7 +45,6 @@ interface TransferSiteResponse {
|
|
|
45
45
|
* > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.
|
|
46
46
|
* @param siteTransfer - Information about the site transfer.
|
|
47
47
|
* @public
|
|
48
|
-
* @documentationMaturity preview
|
|
49
48
|
* @requiredField siteTransfer
|
|
50
49
|
* @permissionId PREMIUM.BUSINESS_SITE_TRANSFER
|
|
51
50
|
* @fqn com.wixpress.premium.b2b.transfer.v1.B2bSiteTransferService.TransferSite
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/premium-business-v1-business-site-transfer-b-2-b-transfer.universal.ts","../../src/premium-business-v1-business-site-transfer-b-2-b-transfer.http.ts"],"sourcesContent":["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 ambassadorWixPremiumBusinessV1BusinessSiteTransfer from './premium-business-v1-business-site-transfer-b-2-b-transfer.http.js';\n\n/** The B2B Site Transfer object contains information about a site transfer. */\nexport interface SiteTransfer {\n /**\n * ID of the site. See the\n * [Sites API](https://dev.wix.com/api/rest/account-level-apis/sites/query-sites)\n * for more details.\n * @format GUID\n */\n siteId?: string;\n /**\n * ID of the source account.\n * Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more\n * information about supported source accounts.\n * @format GUID\n */\n sourceAccountId?: string;\n /**\n * Whether the site owner receives an email notification from Wix about the\n * successful site transfer. Site owners don't receive email notifications\n * about failed transfers. Default: `false`.\n */\n enableNotifications?: boolean;\n}\n\nexport interface TransferSiteRequest {\n /** Information about the site transfer. */\n siteTransfer: SiteTransfer;\n}\n\nexport interface TransferSiteResponse {\n /** Information about the site transfer. */\n siteTransfer?: SiteTransfer;\n}\n\n/**\n * Transfers a Wix site from the source account to the target account.\n *\n * > **Note:** You must pass the ID of the target account in the header of the call.\n *\n * Only strategic partners of Wix services can transfer sites. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to learn how to become a strategic partner.\n *\n * Not all Wix accounts are supported as source accounts and you can transfer a site only to your main account or one of its sub-accounts. It isn’t possible to transfer a site to an unrelated account. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more information.\n *\n * Only sites that don’t include paid Wix services can be transferred. After transferring the site, you can use the [Resellers API](https://dev.wix.com/docs/sdk/account-level-modules/resellers/introduction) to offer paid Wix services to your customers.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n * @param siteTransfer - Information about the site transfer.\n * @public\n * @
|
|
1
|
+
{"version":3,"sources":["../../src/premium-business-v1-business-site-transfer-b-2-b-transfer.universal.ts","../../src/premium-business-v1-business-site-transfer-b-2-b-transfer.http.ts"],"sourcesContent":["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 ambassadorWixPremiumBusinessV1BusinessSiteTransfer from './premium-business-v1-business-site-transfer-b-2-b-transfer.http.js';\n\n/** The B2B Site Transfer object contains information about a site transfer. */\nexport interface SiteTransfer {\n /**\n * ID of the site. See the\n * [Sites API](https://dev.wix.com/api/rest/account-level-apis/sites/query-sites)\n * for more details.\n * @format GUID\n */\n siteId?: string;\n /**\n * ID of the source account.\n * Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more\n * information about supported source accounts.\n * @format GUID\n */\n sourceAccountId?: string;\n /**\n * Whether the site owner receives an email notification from Wix about the\n * successful site transfer. Site owners don't receive email notifications\n * about failed transfers. Default: `false`.\n */\n enableNotifications?: boolean;\n}\n\nexport interface TransferSiteRequest {\n /** Information about the site transfer. */\n siteTransfer: SiteTransfer;\n}\n\nexport interface TransferSiteResponse {\n /** Information about the site transfer. */\n siteTransfer?: SiteTransfer;\n}\n\n/**\n * Transfers a Wix site from the source account to the target account.\n *\n * > **Note:** You must pass the ID of the target account in the header of the call.\n *\n * Only strategic partners of Wix services can transfer sites. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to learn how to become a strategic partner.\n *\n * Not all Wix accounts are supported as source accounts and you can transfer a site only to your main account or one of its sub-accounts. It isn’t possible to transfer a site to an unrelated account. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more information.\n *\n * Only sites that don’t include paid Wix services can be transferred. After transferring the site, you can use the [Resellers API](https://dev.wix.com/docs/sdk/account-level-modules/resellers/introduction) to offer paid Wix services to your customers.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n * @param siteTransfer - Information about the site transfer.\n * @public\n * @requiredField siteTransfer\n * @permissionId PREMIUM.BUSINESS_SITE_TRANSFER\n * @fqn com.wixpress.premium.b2b.transfer.v1.B2bSiteTransferService.TransferSite\n */\nexport async function transferSite(\n siteTransfer: SiteTransfer\n): Promise<\n NonNullablePaths<\n TransferSiteResponse,\n | `siteTransfer.siteId`\n | `siteTransfer.sourceAccountId`\n | `siteTransfer.enableNotifications`,\n 3\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 siteTransfer: siteTransfer,\n });\n\n const reqOpts =\n ambassadorWixPremiumBusinessV1BusinessSiteTransfer.transferSite(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: { siteTransfer: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['siteTransfer']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressPremiumB2BTransferV1B2BSiteTransferServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www.wixapis.com': [\n {\n srcPath: '/b2b-site-management/resellers/v1/transferSite',\n destPath: '/resellers/v1/transferSite',\n },\n {\n srcPath: '/b2b-site-management/v1/transferSite',\n destPath: '/v1/transferSite',\n },\n {\n srcPath: '/b2b-site-management/v1/transfer-site',\n destPath: '/v1/transfer-site',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_b2btransfer_b-2-b-transfer';\n\n/**\n * Transfers a Wix site from the source account to the target account.\n *\n * > **Note:** You must pass the ID of the target account in the header of the call.\n *\n * Only strategic partners of Wix services can transfer sites. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to learn how to become a strategic partner.\n *\n * Not all Wix accounts are supported as source accounts and you can transfer a site only to your main account or one of its sub-accounts. It isn’t possible to transfer a site to an unrelated account. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more information.\n *\n * Only sites that don’t include paid Wix services can be transferred. After transferring the site, you can use the [Resellers API](https://dev.wix.com/docs/sdk/account-level-modules/resellers/introduction) to offer paid Wix services to your customers.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n */\nexport function transferSite(payload: object): RequestOptionsFactory<any> {\n function __transferSite({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.premium.business.v1.business_site_transfer',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.premium.b2b.transfer.v1.B2bSiteTransferService.TransferSite',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPremiumB2BTransferV1B2BSiteTransferServiceUrl({\n protoPath: '/v1/transfer-site',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __transferSite;\n}\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,kBAAkB;AAI3B,SAAS,gEACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,SAAO,WAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAed,SAAS,aAAa,SAA6C;AACxE,WAAS,eAAe,EAAE,KAAK,GAAQ;AACrC,UAAM,WAAW;AAAA,MACf,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,WACE;AAAA,MACF,aAAa;AAAA,MACb,kBAAkB;AAAA,QAChB,wBAAwB;AAAA,MAC1B;AAAA,MACA,KAAK,gEAAgE;AAAA,QACnE,WAAW;AAAA,QACX,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,MACD,MAAM;AAAA,IACR;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;;;ADLA,eAAsBA,cACpB,cASA;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,UAAU,sCAAsC;AAAA,IACpD;AAAA,EACF,CAAC;AAED,QAAM,UAC+C,aAAa,OAAO;AAEzE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,WAAO,wCAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,mBAAmB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,cAAc,OAAO;AAAA,QACjD,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,cAAc;AAAA,IACjB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["transferSite"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../index.ts","../../../src/premium-business-v1-business-site-transfer-b-2-b-transfer.universal.ts","../../../src/premium-business-v1-business-site-transfer-b-2-b-transfer.http.ts","../../../src/premium-business-v1-business-site-transfer-b-2-b-transfer.public.ts","../../../src/premium-business-v1-business-site-transfer-b-2-b-transfer.context.ts"],"sourcesContent":["export * from './src/premium-business-v1-business-site-transfer-b-2-b-transfer.context.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 ambassadorWixPremiumBusinessV1BusinessSiteTransfer from './premium-business-v1-business-site-transfer-b-2-b-transfer.http.js';\n\n/** The B2B Site Transfer object contains information about a site transfer. */\nexport interface SiteTransfer {\n /**\n * ID of the site. See the\n * [Sites API](https://dev.wix.com/api/rest/account-level-apis/sites/query-sites)\n * for more details.\n * @format GUID\n */\n siteId?: string;\n /**\n * ID of the source account.\n * Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more\n * information about supported source accounts.\n * @format GUID\n */\n sourceAccountId?: string;\n /**\n * Whether the site owner receives an email notification from Wix about the\n * successful site transfer. Site owners don't receive email notifications\n * about failed transfers. Default: `false`.\n */\n enableNotifications?: boolean;\n}\n\nexport interface TransferSiteRequest {\n /** Information about the site transfer. */\n siteTransfer: SiteTransfer;\n}\n\nexport interface TransferSiteResponse {\n /** Information about the site transfer. */\n siteTransfer?: SiteTransfer;\n}\n\n/**\n * Transfers a Wix site from the source account to the target account.\n *\n * > **Note:** You must pass the ID of the target account in the header of the call.\n *\n * Only strategic partners of Wix services can transfer sites. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to learn how to become a strategic partner.\n *\n * Not all Wix accounts are supported as source accounts and you can transfer a site only to your main account or one of its sub-accounts. It isn’t possible to transfer a site to an unrelated account. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more information.\n *\n * Only sites that don’t include paid Wix services can be transferred. After transferring the site, you can use the [Resellers API](https://dev.wix.com/docs/sdk/account-level-modules/resellers/introduction) to offer paid Wix services to your customers.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n * @param siteTransfer - Information about the site transfer.\n * @public\n * @documentationMaturity preview\n * @requiredField siteTransfer\n * @permissionId PREMIUM.BUSINESS_SITE_TRANSFER\n * @fqn com.wixpress.premium.b2b.transfer.v1.B2bSiteTransferService.TransferSite\n */\nexport async function transferSite(\n siteTransfer: SiteTransfer\n): Promise<\n NonNullablePaths<\n TransferSiteResponse,\n | `siteTransfer.siteId`\n | `siteTransfer.sourceAccountId`\n | `siteTransfer.enableNotifications`,\n 3\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 siteTransfer: siteTransfer,\n });\n\n const reqOpts =\n ambassadorWixPremiumBusinessV1BusinessSiteTransfer.transferSite(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: { siteTransfer: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['siteTransfer']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressPremiumB2BTransferV1B2BSiteTransferServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www.wixapis.com': [\n {\n srcPath: '/b2b-site-management/resellers/v1/transferSite',\n destPath: '/resellers/v1/transferSite',\n },\n {\n srcPath: '/b2b-site-management/v1/transferSite',\n destPath: '/v1/transferSite',\n },\n {\n srcPath: '/b2b-site-management/v1/transfer-site',\n destPath: '/v1/transfer-site',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_b2btransfer_b-2-b-transfer';\n\n/**\n * Transfers a Wix site from the source account to the target account.\n *\n * > **Note:** You must pass the ID of the target account in the header of the call.\n *\n * Only strategic partners of Wix services can transfer sites. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to learn how to become a strategic partner.\n *\n * Not all Wix accounts are supported as source accounts and you can transfer a site only to your main account or one of its sub-accounts. It isn’t possible to transfer a site to an unrelated account. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more information.\n *\n * Only sites that don’t include paid Wix services can be transferred. After transferring the site, you can use the [Resellers API](https://dev.wix.com/docs/sdk/account-level-modules/resellers/introduction) to offer paid Wix services to your customers.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n */\nexport function transferSite(payload: object): RequestOptionsFactory<any> {\n function __transferSite({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.premium.business.v1.business_site_transfer',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.premium.b2b.transfer.v1.B2bSiteTransferService.TransferSite',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPremiumB2BTransferV1B2BSiteTransferServiceUrl({\n protoPath: '/v1/transfer-site',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __transferSite;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n SiteTransfer,\n TransferSiteResponse,\n transferSite as universalTransferSite,\n} from './premium-business-v1-business-site-transfer-b-2-b-transfer.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/b2btransfer' };\n\nexport function transferSite(httpClient: HttpClient): TransferSiteSignature {\n return (siteTransfer: SiteTransfer) =>\n universalTransferSite(\n siteTransfer,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface TransferSiteSignature {\n /**\n * Transfers a Wix site from the source account to the target account.\n *\n * > **Note:** You must pass the ID of the target account in the header of the call.\n *\n * Only strategic partners of Wix services can transfer sites. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to learn how to become a strategic partner.\n *\n * Not all Wix accounts are supported as source accounts and you can transfer a site only to your main account or one of its sub-accounts. It isn’t possible to transfer a site to an unrelated account. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more information.\n *\n * Only sites that don’t include paid Wix services can be transferred. After transferring the site, you can use the [Resellers API](https://dev.wix.com/docs/sdk/account-level-modules/resellers/introduction) to offer paid Wix services to your customers.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n * @param - Information about the site transfer.\n */\n (siteTransfer: SiteTransfer): Promise<\n NonNullablePaths<\n TransferSiteResponse,\n | `siteTransfer.siteId`\n | `siteTransfer.sourceAccountId`\n | `siteTransfer.enableNotifications`,\n 3\n >\n >;\n}\n\nexport {\n SiteTransfer,\n TransferSiteRequest,\n TransferSiteResponse,\n} from './premium-business-v1-business-site-transfer-b-2-b-transfer.universal.js';\n","import { transferSite as publicTransferSite } from './premium-business-v1-business-site-transfer-b-2-b-transfer.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const transferSite: MaybeContext<\n BuildRESTFunction<typeof publicTransferSite> & typeof publicTransferSite\n> = /*#__PURE__*/ createRESTModule(publicTransferSite);\n\nexport {\n SiteTransfer,\n TransferSiteRequest,\n TransferSiteResponse,\n} from './premium-business-v1-business-site-transfer-b-2-b-transfer.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,sBAAAA;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAA2B;AAI3B,SAAS,gEACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,aAAO,gCAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAed,SAAS,aAAa,SAA6C;AACxE,WAAS,eAAe,EAAE,KAAK,GAAQ;AACrC,UAAM,WAAW;AAAA,MACf,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,WACE;AAAA,MACF,aAAa;AAAA,MACb,kBAAkB;AAAA,QAChB,wBAAwB;AAAA,MAC1B;AAAA,MACA,KAAK,gEAAgE;AAAA,QACnE,WAAW;AAAA,QACX,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,MACD,MAAM;AAAA,IACR;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;;;ADJA,eAAsBC,cACpB,cASA;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC;AAAA,IACpD;AAAA,EACF,CAAC;AAED,QAAM,UAC+C,aAAa,OAAO;AAEzE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAC;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,cAAc,OAAO;AAAA,QACjD,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,cAAc;AAAA,IACjB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AEhGO,SAASC,cAAa,YAA+C;AAC1E,SAAO,CAAC,iBACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACfA,IAAAC,uBAAiC;AAG1B,IAAMC,gBAEK,2DAAiBA,aAAkB;","names":["transferSite","transferSite","sdkTransformError","transferSite","import_rest_modules","transferSite"]}
|
|
1
|
+
{"version":3,"sources":["../../../index.ts","../../../src/premium-business-v1-business-site-transfer-b-2-b-transfer.universal.ts","../../../src/premium-business-v1-business-site-transfer-b-2-b-transfer.http.ts","../../../src/premium-business-v1-business-site-transfer-b-2-b-transfer.public.ts","../../../src/premium-business-v1-business-site-transfer-b-2-b-transfer.context.ts"],"sourcesContent":["export * from './src/premium-business-v1-business-site-transfer-b-2-b-transfer.context.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 ambassadorWixPremiumBusinessV1BusinessSiteTransfer from './premium-business-v1-business-site-transfer-b-2-b-transfer.http.js';\n\n/** The B2B Site Transfer object contains information about a site transfer. */\nexport interface SiteTransfer {\n /**\n * ID of the site. See the\n * [Sites API](https://dev.wix.com/api/rest/account-level-apis/sites/query-sites)\n * for more details.\n * @format GUID\n */\n siteId?: string;\n /**\n * ID of the source account.\n * Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more\n * information about supported source accounts.\n * @format GUID\n */\n sourceAccountId?: string;\n /**\n * Whether the site owner receives an email notification from Wix about the\n * successful site transfer. Site owners don't receive email notifications\n * about failed transfers. Default: `false`.\n */\n enableNotifications?: boolean;\n}\n\nexport interface TransferSiteRequest {\n /** Information about the site transfer. */\n siteTransfer: SiteTransfer;\n}\n\nexport interface TransferSiteResponse {\n /** Information about the site transfer. */\n siteTransfer?: SiteTransfer;\n}\n\n/**\n * Transfers a Wix site from the source account to the target account.\n *\n * > **Note:** You must pass the ID of the target account in the header of the call.\n *\n * Only strategic partners of Wix services can transfer sites. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to learn how to become a strategic partner.\n *\n * Not all Wix accounts are supported as source accounts and you can transfer a site only to your main account or one of its sub-accounts. It isn’t possible to transfer a site to an unrelated account. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more information.\n *\n * Only sites that don’t include paid Wix services can be transferred. After transferring the site, you can use the [Resellers API](https://dev.wix.com/docs/sdk/account-level-modules/resellers/introduction) to offer paid Wix services to your customers.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n * @param siteTransfer - Information about the site transfer.\n * @public\n * @requiredField siteTransfer\n * @permissionId PREMIUM.BUSINESS_SITE_TRANSFER\n * @fqn com.wixpress.premium.b2b.transfer.v1.B2bSiteTransferService.TransferSite\n */\nexport async function transferSite(\n siteTransfer: SiteTransfer\n): Promise<\n NonNullablePaths<\n TransferSiteResponse,\n | `siteTransfer.siteId`\n | `siteTransfer.sourceAccountId`\n | `siteTransfer.enableNotifications`,\n 3\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 siteTransfer: siteTransfer,\n });\n\n const reqOpts =\n ambassadorWixPremiumBusinessV1BusinessSiteTransfer.transferSite(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: { siteTransfer: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['siteTransfer']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressPremiumB2BTransferV1B2BSiteTransferServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www.wixapis.com': [\n {\n srcPath: '/b2b-site-management/resellers/v1/transferSite',\n destPath: '/resellers/v1/transferSite',\n },\n {\n srcPath: '/b2b-site-management/v1/transferSite',\n destPath: '/v1/transferSite',\n },\n {\n srcPath: '/b2b-site-management/v1/transfer-site',\n destPath: '/v1/transfer-site',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_b2btransfer_b-2-b-transfer';\n\n/**\n * Transfers a Wix site from the source account to the target account.\n *\n * > **Note:** You must pass the ID of the target account in the header of the call.\n *\n * Only strategic partners of Wix services can transfer sites. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to learn how to become a strategic partner.\n *\n * Not all Wix accounts are supported as source accounts and you can transfer a site only to your main account or one of its sub-accounts. It isn’t possible to transfer a site to an unrelated account. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more information.\n *\n * Only sites that don’t include paid Wix services can be transferred. After transferring the site, you can use the [Resellers API](https://dev.wix.com/docs/sdk/account-level-modules/resellers/introduction) to offer paid Wix services to your customers.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n */\nexport function transferSite(payload: object): RequestOptionsFactory<any> {\n function __transferSite({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.premium.business.v1.business_site_transfer',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.premium.b2b.transfer.v1.B2bSiteTransferService.TransferSite',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPremiumB2BTransferV1B2BSiteTransferServiceUrl({\n protoPath: '/v1/transfer-site',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __transferSite;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n SiteTransfer,\n TransferSiteResponse,\n transferSite as universalTransferSite,\n} from './premium-business-v1-business-site-transfer-b-2-b-transfer.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/b2btransfer' };\n\nexport function transferSite(httpClient: HttpClient): TransferSiteSignature {\n return (siteTransfer: SiteTransfer) =>\n universalTransferSite(\n siteTransfer,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface TransferSiteSignature {\n /**\n * Transfers a Wix site from the source account to the target account.\n *\n * > **Note:** You must pass the ID of the target account in the header of the call.\n *\n * Only strategic partners of Wix services can transfer sites. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to learn how to become a strategic partner.\n *\n * Not all Wix accounts are supported as source accounts and you can transfer a site only to your main account or one of its sub-accounts. It isn’t possible to transfer a site to an unrelated account. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more information.\n *\n * Only sites that don’t include paid Wix services can be transferred. After transferring the site, you can use the [Resellers API](https://dev.wix.com/docs/sdk/account-level-modules/resellers/introduction) to offer paid Wix services to your customers.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n * @param - Information about the site transfer.\n */\n (siteTransfer: SiteTransfer): Promise<\n NonNullablePaths<\n TransferSiteResponse,\n | `siteTransfer.siteId`\n | `siteTransfer.sourceAccountId`\n | `siteTransfer.enableNotifications`,\n 3\n >\n >;\n}\n\nexport {\n SiteTransfer,\n TransferSiteRequest,\n TransferSiteResponse,\n} from './premium-business-v1-business-site-transfer-b-2-b-transfer.universal.js';\n","import { transferSite as publicTransferSite } from './premium-business-v1-business-site-transfer-b-2-b-transfer.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const transferSite: MaybeContext<\n BuildRESTFunction<typeof publicTransferSite> & typeof publicTransferSite\n> = /*#__PURE__*/ createRESTModule(publicTransferSite);\n\nexport {\n SiteTransfer,\n TransferSiteRequest,\n TransferSiteResponse,\n} from './premium-business-v1-business-site-transfer-b-2-b-transfer.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,sBAAAA;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAA2B;AAI3B,SAAS,gEACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,aAAO,gCAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAed,SAAS,aAAa,SAA6C;AACxE,WAAS,eAAe,EAAE,KAAK,GAAQ;AACrC,UAAM,WAAW;AAAA,MACf,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,WACE;AAAA,MACF,aAAa;AAAA,MACb,kBAAkB;AAAA,QAChB,wBAAwB;AAAA,MAC1B;AAAA,MACA,KAAK,gEAAgE;AAAA,QACnE,WAAW;AAAA,QACX,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,MACD,MAAM;AAAA,IACR;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;;;ADLA,eAAsBC,cACpB,cASA;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC;AAAA,IACpD;AAAA,EACF,CAAC;AAED,QAAM,UAC+C,aAAa,OAAO;AAEzE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAC;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,cAAc,OAAO;AAAA,QACjD,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,cAAc;AAAA,IACjB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AE/FO,SAASC,cAAa,YAA+C;AAC1E,SAAO,CAAC,iBACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACfA,IAAAC,uBAAiC;AAG1B,IAAMC,gBAEK,2DAAiBA,aAAkB;","names":["transferSite","transferSite","sdkTransformError","transferSite","import_rest_modules","transferSite"]}
|
|
@@ -45,7 +45,6 @@ interface TransferSiteResponse {
|
|
|
45
45
|
* > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.
|
|
46
46
|
* @param siteTransfer - Information about the site transfer.
|
|
47
47
|
* @public
|
|
48
|
-
* @documentationMaturity preview
|
|
49
48
|
* @requiredField siteTransfer
|
|
50
49
|
* @permissionId PREMIUM.BUSINESS_SITE_TRANSFER
|
|
51
50
|
* @fqn com.wixpress.premium.b2b.transfer.v1.B2bSiteTransferService.TransferSite
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../index.typings.ts","../../../src/premium-business-v1-business-site-transfer-b-2-b-transfer.universal.ts","../../../src/premium-business-v1-business-site-transfer-b-2-b-transfer.http.ts"],"sourcesContent":["export * from './src/premium-business-v1-business-site-transfer-b-2-b-transfer.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 ambassadorWixPremiumBusinessV1BusinessSiteTransfer from './premium-business-v1-business-site-transfer-b-2-b-transfer.http.js';\n\n/** The B2B Site Transfer object contains information about a site transfer. */\nexport interface SiteTransfer {\n /**\n * ID of the site. See the\n * [Sites API](https://dev.wix.com/api/rest/account-level-apis/sites/query-sites)\n * for more details.\n * @format GUID\n */\n siteId?: string;\n /**\n * ID of the source account.\n * Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more\n * information about supported source accounts.\n * @format GUID\n */\n sourceAccountId?: string;\n /**\n * Whether the site owner receives an email notification from Wix about the\n * successful site transfer. Site owners don't receive email notifications\n * about failed transfers. Default: `false`.\n */\n enableNotifications?: boolean;\n}\n\nexport interface TransferSiteRequest {\n /** Information about the site transfer. */\n siteTransfer: SiteTransfer;\n}\n\nexport interface TransferSiteResponse {\n /** Information about the site transfer. */\n siteTransfer?: SiteTransfer;\n}\n\n/**\n * Transfers a Wix site from the source account to the target account.\n *\n * > **Note:** You must pass the ID of the target account in the header of the call.\n *\n * Only strategic partners of Wix services can transfer sites. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to learn how to become a strategic partner.\n *\n * Not all Wix accounts are supported as source accounts and you can transfer a site only to your main account or one of its sub-accounts. It isn’t possible to transfer a site to an unrelated account. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more information.\n *\n * Only sites that don’t include paid Wix services can be transferred. After transferring the site, you can use the [Resellers API](https://dev.wix.com/docs/sdk/account-level-modules/resellers/introduction) to offer paid Wix services to your customers.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n * @param siteTransfer - Information about the site transfer.\n * @public\n * @
|
|
1
|
+
{"version":3,"sources":["../../../index.typings.ts","../../../src/premium-business-v1-business-site-transfer-b-2-b-transfer.universal.ts","../../../src/premium-business-v1-business-site-transfer-b-2-b-transfer.http.ts"],"sourcesContent":["export * from './src/premium-business-v1-business-site-transfer-b-2-b-transfer.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 ambassadorWixPremiumBusinessV1BusinessSiteTransfer from './premium-business-v1-business-site-transfer-b-2-b-transfer.http.js';\n\n/** The B2B Site Transfer object contains information about a site transfer. */\nexport interface SiteTransfer {\n /**\n * ID of the site. See the\n * [Sites API](https://dev.wix.com/api/rest/account-level-apis/sites/query-sites)\n * for more details.\n * @format GUID\n */\n siteId?: string;\n /**\n * ID of the source account.\n * Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more\n * information about supported source accounts.\n * @format GUID\n */\n sourceAccountId?: string;\n /**\n * Whether the site owner receives an email notification from Wix about the\n * successful site transfer. Site owners don't receive email notifications\n * about failed transfers. Default: `false`.\n */\n enableNotifications?: boolean;\n}\n\nexport interface TransferSiteRequest {\n /** Information about the site transfer. */\n siteTransfer: SiteTransfer;\n}\n\nexport interface TransferSiteResponse {\n /** Information about the site transfer. */\n siteTransfer?: SiteTransfer;\n}\n\n/**\n * Transfers a Wix site from the source account to the target account.\n *\n * > **Note:** You must pass the ID of the target account in the header of the call.\n *\n * Only strategic partners of Wix services can transfer sites. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to learn how to become a strategic partner.\n *\n * Not all Wix accounts are supported as source accounts and you can transfer a site only to your main account or one of its sub-accounts. It isn’t possible to transfer a site to an unrelated account. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more information.\n *\n * Only sites that don’t include paid Wix services can be transferred. After transferring the site, you can use the [Resellers API](https://dev.wix.com/docs/sdk/account-level-modules/resellers/introduction) to offer paid Wix services to your customers.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n * @param siteTransfer - Information about the site transfer.\n * @public\n * @requiredField siteTransfer\n * @permissionId PREMIUM.BUSINESS_SITE_TRANSFER\n * @fqn com.wixpress.premium.b2b.transfer.v1.B2bSiteTransferService.TransferSite\n */\nexport async function transferSite(\n siteTransfer: SiteTransfer\n): Promise<\n NonNullablePaths<\n TransferSiteResponse,\n | `siteTransfer.siteId`\n | `siteTransfer.sourceAccountId`\n | `siteTransfer.enableNotifications`,\n 3\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 siteTransfer: siteTransfer,\n });\n\n const reqOpts =\n ambassadorWixPremiumBusinessV1BusinessSiteTransfer.transferSite(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: { siteTransfer: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['siteTransfer']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressPremiumB2BTransferV1B2BSiteTransferServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www.wixapis.com': [\n {\n srcPath: '/b2b-site-management/resellers/v1/transferSite',\n destPath: '/resellers/v1/transferSite',\n },\n {\n srcPath: '/b2b-site-management/v1/transferSite',\n destPath: '/v1/transferSite',\n },\n {\n srcPath: '/b2b-site-management/v1/transfer-site',\n destPath: '/v1/transfer-site',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_b2btransfer_b-2-b-transfer';\n\n/**\n * Transfers a Wix site from the source account to the target account.\n *\n * > **Note:** You must pass the ID of the target account in the header of the call.\n *\n * Only strategic partners of Wix services can transfer sites. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to learn how to become a strategic partner.\n *\n * Not all Wix accounts are supported as source accounts and you can transfer a site only to your main account or one of its sub-accounts. It isn’t possible to transfer a site to an unrelated account. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more information.\n *\n * Only sites that don’t include paid Wix services can be transferred. After transferring the site, you can use the [Resellers API](https://dev.wix.com/docs/sdk/account-level-modules/resellers/introduction) to offer paid Wix services to your customers.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n */\nexport function transferSite(payload: object): RequestOptionsFactory<any> {\n function __transferSite({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.premium.business.v1.business_site_transfer',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.premium.b2b.transfer.v1.B2bSiteTransferService.TransferSite',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPremiumB2BTransferV1B2BSiteTransferServiceUrl({\n protoPath: '/v1/transfer-site',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __transferSite;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,sBAAAA;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAA2B;AAI3B,SAAS,gEACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,aAAO,gCAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAed,SAAS,aAAa,SAA6C;AACxE,WAAS,eAAe,EAAE,KAAK,GAAQ;AACrC,UAAM,WAAW;AAAA,MACf,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,WACE;AAAA,MACF,aAAa;AAAA,MACb,kBAAkB;AAAA,QAChB,wBAAwB;AAAA,MAC1B;AAAA,MACA,KAAK,gEAAgE;AAAA,QACnE,WAAW;AAAA,QACX,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,MACD,MAAM;AAAA,IACR;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;;;ADLA,eAAsBC,cACpB,cASA;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC;AAAA,IACpD;AAAA,EACF,CAAC;AAED,QAAM,UAC+C,aAAa,OAAO;AAEzE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAC;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,cAAc,OAAO;AAAA,QACjD,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,cAAc;AAAA,IACjB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["transferSite","transferSite","sdkTransformError"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/premium-business-v1-business-site-transfer-b-2-b-transfer.universal.ts","../../../src/premium-business-v1-business-site-transfer-b-2-b-transfer.http.ts","../../../src/premium-business-v1-business-site-transfer-b-2-b-transfer.public.ts","../../../src/premium-business-v1-business-site-transfer-b-2-b-transfer.context.ts"],"sourcesContent":["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 ambassadorWixPremiumBusinessV1BusinessSiteTransfer from './premium-business-v1-business-site-transfer-b-2-b-transfer.http.js';\n\n/** The B2B Site Transfer object contains information about a site transfer. */\nexport interface SiteTransfer {\n /**\n * ID of the site. See the\n * [Sites API](https://dev.wix.com/api/rest/account-level-apis/sites/query-sites)\n * for more details.\n * @format GUID\n */\n siteId?: string;\n /**\n * ID of the source account.\n * Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more\n * information about supported source accounts.\n * @format GUID\n */\n sourceAccountId?: string;\n /**\n * Whether the site owner receives an email notification from Wix about the\n * successful site transfer. Site owners don't receive email notifications\n * about failed transfers. Default: `false`.\n */\n enableNotifications?: boolean;\n}\n\nexport interface TransferSiteRequest {\n /** Information about the site transfer. */\n siteTransfer: SiteTransfer;\n}\n\nexport interface TransferSiteResponse {\n /** Information about the site transfer. */\n siteTransfer?: SiteTransfer;\n}\n\n/**\n * Transfers a Wix site from the source account to the target account.\n *\n * > **Note:** You must pass the ID of the target account in the header of the call.\n *\n * Only strategic partners of Wix services can transfer sites. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to learn how to become a strategic partner.\n *\n * Not all Wix accounts are supported as source accounts and you can transfer a site only to your main account or one of its sub-accounts. It isn’t possible to transfer a site to an unrelated account. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more information.\n *\n * Only sites that don’t include paid Wix services can be transferred. After transferring the site, you can use the [Resellers API](https://dev.wix.com/docs/sdk/account-level-modules/resellers/introduction) to offer paid Wix services to your customers.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n * @param siteTransfer - Information about the site transfer.\n * @public\n * @documentationMaturity preview\n * @requiredField siteTransfer\n * @permissionId PREMIUM.BUSINESS_SITE_TRANSFER\n * @fqn com.wixpress.premium.b2b.transfer.v1.B2bSiteTransferService.TransferSite\n */\nexport async function transferSite(\n siteTransfer: SiteTransfer\n): Promise<\n NonNullablePaths<\n TransferSiteResponse,\n | `siteTransfer.siteId`\n | `siteTransfer.sourceAccountId`\n | `siteTransfer.enableNotifications`,\n 3\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 siteTransfer: siteTransfer,\n });\n\n const reqOpts =\n ambassadorWixPremiumBusinessV1BusinessSiteTransfer.transferSite(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: { siteTransfer: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['siteTransfer']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressPremiumB2BTransferV1B2BSiteTransferServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www.wixapis.com': [\n {\n srcPath: '/b2b-site-management/resellers/v1/transferSite',\n destPath: '/resellers/v1/transferSite',\n },\n {\n srcPath: '/b2b-site-management/v1/transferSite',\n destPath: '/v1/transferSite',\n },\n {\n srcPath: '/b2b-site-management/v1/transfer-site',\n destPath: '/v1/transfer-site',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_b2btransfer_b-2-b-transfer';\n\n/**\n * Transfers a Wix site from the source account to the target account.\n *\n * > **Note:** You must pass the ID of the target account in the header of the call.\n *\n * Only strategic partners of Wix services can transfer sites. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to learn how to become a strategic partner.\n *\n * Not all Wix accounts are supported as source accounts and you can transfer a site only to your main account or one of its sub-accounts. It isn’t possible to transfer a site to an unrelated account. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more information.\n *\n * Only sites that don’t include paid Wix services can be transferred. After transferring the site, you can use the [Resellers API](https://dev.wix.com/docs/sdk/account-level-modules/resellers/introduction) to offer paid Wix services to your customers.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n */\nexport function transferSite(payload: object): RequestOptionsFactory<any> {\n function __transferSite({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.premium.business.v1.business_site_transfer',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.premium.b2b.transfer.v1.B2bSiteTransferService.TransferSite',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPremiumB2BTransferV1B2BSiteTransferServiceUrl({\n protoPath: '/v1/transfer-site',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __transferSite;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n SiteTransfer,\n TransferSiteResponse,\n transferSite as universalTransferSite,\n} from './premium-business-v1-business-site-transfer-b-2-b-transfer.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/b2btransfer' };\n\nexport function transferSite(httpClient: HttpClient): TransferSiteSignature {\n return (siteTransfer: SiteTransfer) =>\n universalTransferSite(\n siteTransfer,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface TransferSiteSignature {\n /**\n * Transfers a Wix site from the source account to the target account.\n *\n * > **Note:** You must pass the ID of the target account in the header of the call.\n *\n * Only strategic partners of Wix services can transfer sites. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to learn how to become a strategic partner.\n *\n * Not all Wix accounts are supported as source accounts and you can transfer a site only to your main account or one of its sub-accounts. It isn’t possible to transfer a site to an unrelated account. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more information.\n *\n * Only sites that don’t include paid Wix services can be transferred. After transferring the site, you can use the [Resellers API](https://dev.wix.com/docs/sdk/account-level-modules/resellers/introduction) to offer paid Wix services to your customers.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n * @param - Information about the site transfer.\n */\n (siteTransfer: SiteTransfer): Promise<\n NonNullablePaths<\n TransferSiteResponse,\n | `siteTransfer.siteId`\n | `siteTransfer.sourceAccountId`\n | `siteTransfer.enableNotifications`,\n 3\n >\n >;\n}\n\nexport {\n SiteTransfer,\n TransferSiteRequest,\n TransferSiteResponse,\n} from './premium-business-v1-business-site-transfer-b-2-b-transfer.universal.js';\n","import { transferSite as publicTransferSite } from './premium-business-v1-business-site-transfer-b-2-b-transfer.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const transferSite: MaybeContext<\n BuildRESTFunction<typeof publicTransferSite> & typeof publicTransferSite\n> = /*#__PURE__*/ createRESTModule(publicTransferSite);\n\nexport {\n SiteTransfer,\n TransferSiteRequest,\n TransferSiteResponse,\n} from './premium-business-v1-business-site-transfer-b-2-b-transfer.universal.js';\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,kBAAkB;AAI3B,SAAS,gEACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,SAAO,WAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAed,SAAS,aAAa,SAA6C;AACxE,WAAS,eAAe,EAAE,KAAK,GAAQ;AACrC,UAAM,WAAW;AAAA,MACf,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,WACE;AAAA,MACF,aAAa;AAAA,MACb,kBAAkB;AAAA,QAChB,wBAAwB;AAAA,MAC1B;AAAA,MACA,KAAK,gEAAgE;AAAA,QACnE,WAAW;AAAA,QACX,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,MACD,MAAM;AAAA,IACR;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;;;ADJA,eAAsBA,cACpB,cASA;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,UAAU,sCAAsC;AAAA,IACpD;AAAA,EACF,CAAC;AAED,QAAM,UAC+C,aAAa,OAAO;AAEzE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,WAAO,wCAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,mBAAmB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,cAAc,OAAO;AAAA,QACjD,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,cAAc;AAAA,IACjB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AEhGO,SAASC,cAAa,YAA+C;AAC1E,SAAO,CAAC,iBACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACfA,SAAS,wBAAwB;AAG1B,IAAMC,gBAEK,iCAAiBA,aAAkB;","names":["transferSite","transferSite","transferSite"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/premium-business-v1-business-site-transfer-b-2-b-transfer.universal.ts","../../../src/premium-business-v1-business-site-transfer-b-2-b-transfer.http.ts","../../../src/premium-business-v1-business-site-transfer-b-2-b-transfer.public.ts","../../../src/premium-business-v1-business-site-transfer-b-2-b-transfer.context.ts"],"sourcesContent":["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 ambassadorWixPremiumBusinessV1BusinessSiteTransfer from './premium-business-v1-business-site-transfer-b-2-b-transfer.http.js';\n\n/** The B2B Site Transfer object contains information about a site transfer. */\nexport interface SiteTransfer {\n /**\n * ID of the site. See the\n * [Sites API](https://dev.wix.com/api/rest/account-level-apis/sites/query-sites)\n * for more details.\n * @format GUID\n */\n siteId?: string;\n /**\n * ID of the source account.\n * Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more\n * information about supported source accounts.\n * @format GUID\n */\n sourceAccountId?: string;\n /**\n * Whether the site owner receives an email notification from Wix about the\n * successful site transfer. Site owners don't receive email notifications\n * about failed transfers. Default: `false`.\n */\n enableNotifications?: boolean;\n}\n\nexport interface TransferSiteRequest {\n /** Information about the site transfer. */\n siteTransfer: SiteTransfer;\n}\n\nexport interface TransferSiteResponse {\n /** Information about the site transfer. */\n siteTransfer?: SiteTransfer;\n}\n\n/**\n * Transfers a Wix site from the source account to the target account.\n *\n * > **Note:** You must pass the ID of the target account in the header of the call.\n *\n * Only strategic partners of Wix services can transfer sites. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to learn how to become a strategic partner.\n *\n * Not all Wix accounts are supported as source accounts and you can transfer a site only to your main account or one of its sub-accounts. It isn’t possible to transfer a site to an unrelated account. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more information.\n *\n * Only sites that don’t include paid Wix services can be transferred. After transferring the site, you can use the [Resellers API](https://dev.wix.com/docs/sdk/account-level-modules/resellers/introduction) to offer paid Wix services to your customers.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n * @param siteTransfer - Information about the site transfer.\n * @public\n * @requiredField siteTransfer\n * @permissionId PREMIUM.BUSINESS_SITE_TRANSFER\n * @fqn com.wixpress.premium.b2b.transfer.v1.B2bSiteTransferService.TransferSite\n */\nexport async function transferSite(\n siteTransfer: SiteTransfer\n): Promise<\n NonNullablePaths<\n TransferSiteResponse,\n | `siteTransfer.siteId`\n | `siteTransfer.sourceAccountId`\n | `siteTransfer.enableNotifications`,\n 3\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 siteTransfer: siteTransfer,\n });\n\n const reqOpts =\n ambassadorWixPremiumBusinessV1BusinessSiteTransfer.transferSite(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: { siteTransfer: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['siteTransfer']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressPremiumB2BTransferV1B2BSiteTransferServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www.wixapis.com': [\n {\n srcPath: '/b2b-site-management/resellers/v1/transferSite',\n destPath: '/resellers/v1/transferSite',\n },\n {\n srcPath: '/b2b-site-management/v1/transferSite',\n destPath: '/v1/transferSite',\n },\n {\n srcPath: '/b2b-site-management/v1/transfer-site',\n destPath: '/v1/transfer-site',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_b2btransfer_b-2-b-transfer';\n\n/**\n * Transfers a Wix site from the source account to the target account.\n *\n * > **Note:** You must pass the ID of the target account in the header of the call.\n *\n * Only strategic partners of Wix services can transfer sites. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to learn how to become a strategic partner.\n *\n * Not all Wix accounts are supported as source accounts and you can transfer a site only to your main account or one of its sub-accounts. It isn’t possible to transfer a site to an unrelated account. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more information.\n *\n * Only sites that don’t include paid Wix services can be transferred. After transferring the site, you can use the [Resellers API](https://dev.wix.com/docs/sdk/account-level-modules/resellers/introduction) to offer paid Wix services to your customers.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n */\nexport function transferSite(payload: object): RequestOptionsFactory<any> {\n function __transferSite({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.premium.business.v1.business_site_transfer',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.premium.b2b.transfer.v1.B2bSiteTransferService.TransferSite',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPremiumB2BTransferV1B2BSiteTransferServiceUrl({\n protoPath: '/v1/transfer-site',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __transferSite;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n SiteTransfer,\n TransferSiteResponse,\n transferSite as universalTransferSite,\n} from './premium-business-v1-business-site-transfer-b-2-b-transfer.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/b2btransfer' };\n\nexport function transferSite(httpClient: HttpClient): TransferSiteSignature {\n return (siteTransfer: SiteTransfer) =>\n universalTransferSite(\n siteTransfer,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface TransferSiteSignature {\n /**\n * Transfers a Wix site from the source account to the target account.\n *\n * > **Note:** You must pass the ID of the target account in the header of the call.\n *\n * Only strategic partners of Wix services can transfer sites. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to learn how to become a strategic partner.\n *\n * Not all Wix accounts are supported as source accounts and you can transfer a site only to your main account or one of its sub-accounts. It isn’t possible to transfer a site to an unrelated account. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more information.\n *\n * Only sites that don’t include paid Wix services can be transferred. After transferring the site, you can use the [Resellers API](https://dev.wix.com/docs/sdk/account-level-modules/resellers/introduction) to offer paid Wix services to your customers.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n * @param - Information about the site transfer.\n */\n (siteTransfer: SiteTransfer): Promise<\n NonNullablePaths<\n TransferSiteResponse,\n | `siteTransfer.siteId`\n | `siteTransfer.sourceAccountId`\n | `siteTransfer.enableNotifications`,\n 3\n >\n >;\n}\n\nexport {\n SiteTransfer,\n TransferSiteRequest,\n TransferSiteResponse,\n} from './premium-business-v1-business-site-transfer-b-2-b-transfer.universal.js';\n","import { transferSite as publicTransferSite } from './premium-business-v1-business-site-transfer-b-2-b-transfer.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const transferSite: MaybeContext<\n BuildRESTFunction<typeof publicTransferSite> & typeof publicTransferSite\n> = /*#__PURE__*/ createRESTModule(publicTransferSite);\n\nexport {\n SiteTransfer,\n TransferSiteRequest,\n TransferSiteResponse,\n} from './premium-business-v1-business-site-transfer-b-2-b-transfer.universal.js';\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,kBAAkB;AAI3B,SAAS,gEACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,SAAO,WAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAed,SAAS,aAAa,SAA6C;AACxE,WAAS,eAAe,EAAE,KAAK,GAAQ;AACrC,UAAM,WAAW;AAAA,MACf,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,WACE;AAAA,MACF,aAAa;AAAA,MACb,kBAAkB;AAAA,QAChB,wBAAwB;AAAA,MAC1B;AAAA,MACA,KAAK,gEAAgE;AAAA,QACnE,WAAW;AAAA,QACX,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,MACD,MAAM;AAAA,IACR;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;;;ADLA,eAAsBA,cACpB,cASA;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,UAAU,sCAAsC;AAAA,IACpD;AAAA,EACF,CAAC;AAED,QAAM,UAC+C,aAAa,OAAO;AAEzE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,WAAO,wCAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,mBAAmB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,cAAc,OAAO;AAAA,QACjD,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,cAAc;AAAA,IACjB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AE/FO,SAASC,cAAa,YAA+C;AAC1E,SAAO,CAAC,iBACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACfA,SAAS,wBAAwB;AAG1B,IAAMC,gBAEK,iCAAiBA,aAAkB;","names":["transferSite","transferSite","transferSite"]}
|
|
@@ -45,7 +45,6 @@ interface TransferSiteResponse {
|
|
|
45
45
|
* > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.
|
|
46
46
|
* @param siteTransfer - Information about the site transfer.
|
|
47
47
|
* @public
|
|
48
|
-
* @documentationMaturity preview
|
|
49
48
|
* @requiredField siteTransfer
|
|
50
49
|
* @permissionId PREMIUM.BUSINESS_SITE_TRANSFER
|
|
51
50
|
* @fqn com.wixpress.premium.b2b.transfer.v1.B2bSiteTransferService.TransferSite
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/premium-business-v1-business-site-transfer-b-2-b-transfer.universal.ts","../../../src/premium-business-v1-business-site-transfer-b-2-b-transfer.http.ts"],"sourcesContent":["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 ambassadorWixPremiumBusinessV1BusinessSiteTransfer from './premium-business-v1-business-site-transfer-b-2-b-transfer.http.js';\n\n/** The B2B Site Transfer object contains information about a site transfer. */\nexport interface SiteTransfer {\n /**\n * ID of the site. See the\n * [Sites API](https://dev.wix.com/api/rest/account-level-apis/sites/query-sites)\n * for more details.\n * @format GUID\n */\n siteId?: string;\n /**\n * ID of the source account.\n * Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more\n * information about supported source accounts.\n * @format GUID\n */\n sourceAccountId?: string;\n /**\n * Whether the site owner receives an email notification from Wix about the\n * successful site transfer. Site owners don't receive email notifications\n * about failed transfers. Default: `false`.\n */\n enableNotifications?: boolean;\n}\n\nexport interface TransferSiteRequest {\n /** Information about the site transfer. */\n siteTransfer: SiteTransfer;\n}\n\nexport interface TransferSiteResponse {\n /** Information about the site transfer. */\n siteTransfer?: SiteTransfer;\n}\n\n/**\n * Transfers a Wix site from the source account to the target account.\n *\n * > **Note:** You must pass the ID of the target account in the header of the call.\n *\n * Only strategic partners of Wix services can transfer sites. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to learn how to become a strategic partner.\n *\n * Not all Wix accounts are supported as source accounts and you can transfer a site only to your main account or one of its sub-accounts. It isn’t possible to transfer a site to an unrelated account. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more information.\n *\n * Only sites that don’t include paid Wix services can be transferred. After transferring the site, you can use the [Resellers API](https://dev.wix.com/docs/sdk/account-level-modules/resellers/introduction) to offer paid Wix services to your customers.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n * @param siteTransfer - Information about the site transfer.\n * @public\n * @
|
|
1
|
+
{"version":3,"sources":["../../../src/premium-business-v1-business-site-transfer-b-2-b-transfer.universal.ts","../../../src/premium-business-v1-business-site-transfer-b-2-b-transfer.http.ts"],"sourcesContent":["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 ambassadorWixPremiumBusinessV1BusinessSiteTransfer from './premium-business-v1-business-site-transfer-b-2-b-transfer.http.js';\n\n/** The B2B Site Transfer object contains information about a site transfer. */\nexport interface SiteTransfer {\n /**\n * ID of the site. See the\n * [Sites API](https://dev.wix.com/api/rest/account-level-apis/sites/query-sites)\n * for more details.\n * @format GUID\n */\n siteId?: string;\n /**\n * ID of the source account.\n * Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more\n * information about supported source accounts.\n * @format GUID\n */\n sourceAccountId?: string;\n /**\n * Whether the site owner receives an email notification from Wix about the\n * successful site transfer. Site owners don't receive email notifications\n * about failed transfers. Default: `false`.\n */\n enableNotifications?: boolean;\n}\n\nexport interface TransferSiteRequest {\n /** Information about the site transfer. */\n siteTransfer: SiteTransfer;\n}\n\nexport interface TransferSiteResponse {\n /** Information about the site transfer. */\n siteTransfer?: SiteTransfer;\n}\n\n/**\n * Transfers a Wix site from the source account to the target account.\n *\n * > **Note:** You must pass the ID of the target account in the header of the call.\n *\n * Only strategic partners of Wix services can transfer sites. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to learn how to become a strategic partner.\n *\n * Not all Wix accounts are supported as source accounts and you can transfer a site only to your main account or one of its sub-accounts. It isn’t possible to transfer a site to an unrelated account. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more information.\n *\n * Only sites that don’t include paid Wix services can be transferred. After transferring the site, you can use the [Resellers API](https://dev.wix.com/docs/sdk/account-level-modules/resellers/introduction) to offer paid Wix services to your customers.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n * @param siteTransfer - Information about the site transfer.\n * @public\n * @requiredField siteTransfer\n * @permissionId PREMIUM.BUSINESS_SITE_TRANSFER\n * @fqn com.wixpress.premium.b2b.transfer.v1.B2bSiteTransferService.TransferSite\n */\nexport async function transferSite(\n siteTransfer: SiteTransfer\n): Promise<\n NonNullablePaths<\n TransferSiteResponse,\n | `siteTransfer.siteId`\n | `siteTransfer.sourceAccountId`\n | `siteTransfer.enableNotifications`,\n 3\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 siteTransfer: siteTransfer,\n });\n\n const reqOpts =\n ambassadorWixPremiumBusinessV1BusinessSiteTransfer.transferSite(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: { siteTransfer: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['siteTransfer']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressPremiumB2BTransferV1B2BSiteTransferServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www.wixapis.com': [\n {\n srcPath: '/b2b-site-management/resellers/v1/transferSite',\n destPath: '/resellers/v1/transferSite',\n },\n {\n srcPath: '/b2b-site-management/v1/transferSite',\n destPath: '/v1/transferSite',\n },\n {\n srcPath: '/b2b-site-management/v1/transfer-site',\n destPath: '/v1/transfer-site',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_b2btransfer_b-2-b-transfer';\n\n/**\n * Transfers a Wix site from the source account to the target account.\n *\n * > **Note:** You must pass the ID of the target account in the header of the call.\n *\n * Only strategic partners of Wix services can transfer sites. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to learn how to become a strategic partner.\n *\n * Not all Wix accounts are supported as source accounts and you can transfer a site only to your main account or one of its sub-accounts. It isn’t possible to transfer a site to an unrelated account. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more information.\n *\n * Only sites that don’t include paid Wix services can be transferred. After transferring the site, you can use the [Resellers API](https://dev.wix.com/docs/sdk/account-level-modules/resellers/introduction) to offer paid Wix services to your customers.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n */\nexport function transferSite(payload: object): RequestOptionsFactory<any> {\n function __transferSite({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.premium.business.v1.business_site_transfer',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.premium.b2b.transfer.v1.B2bSiteTransferService.TransferSite',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPremiumB2BTransferV1B2BSiteTransferServiceUrl({\n protoPath: '/v1/transfer-site',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __transferSite;\n}\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,kBAAkB;AAI3B,SAAS,gEACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,SAAO,WAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAed,SAAS,aAAa,SAA6C;AACxE,WAAS,eAAe,EAAE,KAAK,GAAQ;AACrC,UAAM,WAAW;AAAA,MACf,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,WACE;AAAA,MACF,aAAa;AAAA,MACb,kBAAkB;AAAA,QAChB,wBAAwB;AAAA,MAC1B;AAAA,MACA,KAAK,gEAAgE;AAAA,QACnE,WAAW;AAAA,QACX,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,MACD,MAAM;AAAA,IACR;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;;;ADLA,eAAsBA,cACpB,cASA;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,UAAU,sCAAsC;AAAA,IACpD;AAAA,EACF,CAAC;AAED,QAAM,UAC+C,aAAa,OAAO;AAEzE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,WAAO,wCAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,mBAAmB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,cAAc,OAAO;AAAA,QACjD,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,cAAc;AAAA,IACjB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["transferSite"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/auto_sdk_b2btransfer_b-2-b-transfer",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"service-plugins"
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@wix/sdk-runtime": "^0.
|
|
33
|
-
"@wix/sdk-types": "^1.
|
|
32
|
+
"@wix/sdk-runtime": "^1.0.6",
|
|
33
|
+
"@wix/sdk-types": "^1.17.3"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"tsup": "^8.4.0",
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"fqdn": "wix.premium.business.v1.business_site_transfer"
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
|
-
"falconPackageHash": "
|
|
53
|
+
"falconPackageHash": "3ca9f363728b1b609c8201689b0cb8f0006a0cf3524c8dbb7844dca0"
|
|
54
54
|
}
|