@wix/auto_sdk_payments_wix-payments-account 1.0.24 → 1.0.26

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.
Files changed (37) hide show
  1. package/build/cjs/index.d.ts +30 -4
  2. package/build/cjs/index.js +74 -2
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +95 -2
  5. package/build/cjs/index.typings.js +65 -2
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +57 -2
  8. package/build/cjs/meta.js +57 -2
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +30 -4
  11. package/build/es/index.mjs +72 -1
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +95 -2
  14. package/build/es/index.typings.mjs +63 -1
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +57 -2
  17. package/build/es/meta.mjs +55 -1
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +30 -4
  20. package/build/internal/cjs/index.js +74 -2
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +95 -2
  23. package/build/internal/cjs/index.typings.js +65 -2
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +57 -2
  26. package/build/internal/cjs/meta.js +57 -2
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +30 -4
  29. package/build/internal/es/index.mjs +72 -1
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +95 -2
  32. package/build/internal/es/index.typings.mjs +63 -1
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +57 -2
  35. package/build/internal/es/meta.mjs +55 -1
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +2 -2
@@ -20,7 +20,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // index.typings.ts
21
21
  var index_typings_exports = {};
22
22
  __export(index_typings_exports, {
23
- connectWixPaymentsAccount: () => connectWixPaymentsAccount2
23
+ connectWixPaymentsAccount: () => connectWixPaymentsAccount2,
24
+ connectWixPaymentsAccountBase44: () => connectWixPaymentsAccountBase442
24
25
  });
25
26
  module.exports = __toCommonJS(index_typings_exports);
26
27
 
@@ -41,6 +42,18 @@ function resolveWixPaymentsMcpV1WixPaymentsAccountServiceUrl(opts) {
41
42
  srcPath: "/payments/mcp/v1/wix-payments-account",
42
43
  destPath: "/v1/wix-payments-account"
43
44
  }
45
+ ],
46
+ "*.dev.wix-code.com": [
47
+ {
48
+ srcPath: "/payments/mcp/v1/wix-payments-account",
49
+ destPath: "/v1/wix-payments-account"
50
+ }
51
+ ],
52
+ _: [
53
+ {
54
+ srcPath: "/payments/mcp/v1/wix-payments-account",
55
+ destPath: "/v1/wix-payments-account"
56
+ }
44
57
  ]
45
58
  };
46
59
  return (0, import_rest_modules.resolveUrl)(Object.assign(opts, { domainToMappings }));
@@ -67,6 +80,27 @@ function connectWixPaymentsAccount(payload) {
67
80
  }
68
81
  return __connectWixPaymentsAccount;
69
82
  }
83
+ function connectWixPaymentsAccountBase44(payload) {
84
+ function __connectWixPaymentsAccountBase44({ host }) {
85
+ const metadata = {
86
+ entityFqdn: "wix.payments.mcp.v1.wix_payments_account",
87
+ method: "POST",
88
+ methodFqn: "wix.payments.mcp.v1.WixPaymentsAccountService.ConnectWixPaymentsAccountBase44",
89
+ packageName: PACKAGE_NAME,
90
+ migrationOptions: {
91
+ optInTransformResponse: true
92
+ },
93
+ url: resolveWixPaymentsMcpV1WixPaymentsAccountServiceUrl({
94
+ protoPath: "/v1/wix-payments-account/connect-base44",
95
+ data: payload,
96
+ host
97
+ }),
98
+ data: payload
99
+ };
100
+ return metadata;
101
+ }
102
+ return __connectWixPaymentsAccountBase44;
103
+ }
70
104
 
71
105
  // src/payments-mcp-v1-wix-payments-account-wix-payments-account.universal.ts
72
106
  async function connectWixPaymentsAccount2(account) {
@@ -94,8 +128,37 @@ async function connectWixPaymentsAccount2(account) {
94
128
  throw transformedError;
95
129
  }
96
130
  }
131
+ async function connectWixPaymentsAccountBase442(account, options) {
132
+ const { httpClient, sideEffects } = arguments[2];
133
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
134
+ account,
135
+ siteId: options?.siteId
136
+ });
137
+ const reqOpts = connectWixPaymentsAccountBase44(
138
+ payload
139
+ );
140
+ sideEffects?.onSiteCall?.();
141
+ try {
142
+ const result = await httpClient.request(reqOpts);
143
+ sideEffects?.onSuccess?.(result);
144
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
145
+ } catch (err) {
146
+ const transformedError = (0, import_transform_error.transformError)(
147
+ err,
148
+ {
149
+ spreadPathsToArguments: {},
150
+ explicitPathsToArguments: { account: "$[0]", siteId: "$[1].siteId" },
151
+ singleArgumentUnchanged: false
152
+ },
153
+ ["account", "options"]
154
+ );
155
+ sideEffects?.onError?.(err);
156
+ throw transformedError;
157
+ }
158
+ }
97
159
  // Annotate the CommonJS export names for ESM import in node:
98
160
  0 && (module.exports = {
99
- connectWixPaymentsAccount
161
+ connectWixPaymentsAccount,
162
+ connectWixPaymentsAccountBase44
100
163
  });
101
164
  //# sourceMappingURL=index.typings.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../index.typings.ts","../../../src/payments-mcp-v1-wix-payments-account-wix-payments-account.universal.ts","../../../src/payments-mcp-v1-wix-payments-account-wix-payments-account.http.ts"],"sourcesContent":["export * from './src/payments-mcp-v1-wix-payments-account-wix-payments-account.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 ambassadorWixPaymentsMcpV1WixPaymentsAccount from './payments-mcp-v1-wix-payments-account-wix-payments-account.http.js';\n\n/** An account that enables a Wix site to process customer payments. */\nexport interface WixPaymentsAccount {\n /**\n * ID of the Wix Payments account.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * First name of the Wix Payments account owner.\n * @maxLength 500\n */\n firstName?: string | null;\n /**\n * Last name of the Wix Payments account owner.\n * @maxLength 500\n */\n lastName?: string | null;\n /**\n * Whether the account owner has accepted the\n * [Wix Payments Terms of Service](https://www.wix.com/about/terms-of-payments).\n * The account owner must accept these terms for the account to be created\n * successfully. If the terms aren't accepted, the Connect Wix Payments Account\n * call fails.\n */\n tosAccepted?: boolean | null;\n /**\n * Brief summary of the types of products and services offered for sale through the Wix Payments account.\n * For example, \"Sportswear and sport accessories\".\n * @maxLength 500\n */\n productDescription?: string | null;\n}\n\nexport interface ConnectWixPaymentsAccountRequest {\n /** Wix Payments account to connect to the site. */\n account: WixPaymentsAccount;\n}\n\nexport interface ConnectWixPaymentsAccountResponse {\n /** Connected Wix Payments account. */\n account?: WixPaymentsAccount;\n}\n\n/**\n * Connects a Wix Payments account to the site.\n *\n *\n * The call fails if:\n * - The site's location\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/business-tools/locations/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/locations/introduction))\n * is outside the USA.\n * - A Wix Payments account is already connected to the site.\n * - You don't specify `{\"tosAccepted\": true}`.\n *\n * The connected Wix Payments account has the following limitations, which site\n * owners can manage in their dashboard:\n *\n * - By default, customers can only pay via credit card, Apple Pay, or Google Pay.\n * - To receive payments, site owners must complete onboarding to their Wix\n * Payments account in the site's dashboard.\n * @param account - Wix Payments account to connect to the site.\n * @public\n * @documentationMaturity preview\n * @requiredField account\n * @requiredField account.firstName\n * @requiredField account.lastName\n * @requiredField account.tosAccepted\n * @permissionId CASHIER.PROVIDER_ACCOUNTS_CREATE\n * @applicableIdentity APP\n * @fqn wix.payments.mcp.v1.WixPaymentsAccountService.ConnectWixPaymentsAccount\n */\nexport async function connectWixPaymentsAccount(\n account: NonNullablePaths<\n WixPaymentsAccount,\n `firstName` | `lastName` | `tosAccepted`,\n 2\n >\n): Promise<ConnectWixPaymentsAccountResponse> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ account: account });\n\n const reqOpts =\n ambassadorWixPaymentsMcpV1WixPaymentsAccount.connectWixPaymentsAccount(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { account: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['account']\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 resolveWixPaymentsMcpV1WixPaymentsAccountServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www.wixapis.com': [\n {\n srcPath: '/payments/v1/wix-payments-account',\n destPath: '/v1/wix-payments-account',\n },\n {\n srcPath: '/payments/mcp/v1/wix-payments-account',\n destPath: '/v1/wix-payments-account',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_payments_wix-payments-account';\n\n/**\n * Connects a Wix Payments account to the site.\n *\n *\n * The call fails if:\n * - The site's location\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/business-tools/locations/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/locations/introduction))\n * is outside the USA.\n * - A Wix Payments account is already connected to the site.\n * - You don't specify `{\"tosAccepted\": true}`.\n *\n * The connected Wix Payments account has the following limitations, which site\n * owners can manage in their dashboard:\n *\n * - By default, customers can only pay via credit card, Apple Pay, or Google Pay.\n * - To receive payments, site owners must complete onboarding to their Wix\n * Payments account in the site's dashboard.\n */\nexport function connectWixPaymentsAccount(\n payload: object\n): RequestOptionsFactory<any> {\n function __connectWixPaymentsAccount({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.mcp.v1.wix_payments_account',\n method: 'POST' as any,\n methodFqn:\n 'wix.payments.mcp.v1.WixPaymentsAccountService.ConnectWixPaymentsAccount',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsMcpV1WixPaymentsAccountServiceUrl({\n protoPath: '/v1/wix-payments-account/connect',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __connectWixPaymentsAccount;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,mCAAAA;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAA2B;AAI3B,SAAS,oDACP,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,IACF;AAAA,EACF;AAEA,aAAO,gCAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAoBd,SAAS,0BACd,SAC4B;AAC5B,WAAS,4BAA4B,EAAE,KAAK,GAAQ;AAClD,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,oDAAoD;AAAA,QACvD,WAAW;AAAA,QACX,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,MACD,MAAM;AAAA,IACR;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;;;ADYA,eAAsBC,2BACpB,SAK4C;AAE5C,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC,EAAE,QAAiB,CAAC;AAE1E,QAAM,UACyC;AAAA,IAC3C;AAAA,EACF;AAEF,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,SAAS,OAAO;AAAA,QAC5C,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS;AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["connectWixPaymentsAccount","connectWixPaymentsAccount","sdkTransformError"]}
1
+ {"version":3,"sources":["../../../index.typings.ts","../../../src/payments-mcp-v1-wix-payments-account-wix-payments-account.universal.ts","../../../src/payments-mcp-v1-wix-payments-account-wix-payments-account.http.ts"],"sourcesContent":["export * from './src/payments-mcp-v1-wix-payments-account-wix-payments-account.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 ambassadorWixPaymentsMcpV1WixPaymentsAccount from './payments-mcp-v1-wix-payments-account-wix-payments-account.http.js';\n\n/** An account that enables a Wix site to process customer payments. */\nexport interface WixPaymentsAccount {\n /**\n * ID of the Wix Payments account.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * First name of the Wix Payments account owner.\n * @maxLength 500\n */\n firstName?: string | null;\n /**\n * Last name of the Wix Payments account owner.\n * @maxLength 500\n */\n lastName?: string | null;\n /**\n * Whether the account owner has accepted the\n * [Wix Payments Terms of Service](https://www.wix.com/about/terms-of-payments).\n * The account owner must accept these terms for the account to be created\n * successfully. If the terms aren't accepted, the Connect Wix Payments Account\n * call fails.\n * @deprecated Whether the account owner has accepted the\n * [Wix Payments Terms of Service](https://www.wix.com/about/terms-of-payments).\n * The account owner must accept these terms for the account to be created\n * successfully. If the terms aren't accepted, the Connect Wix Payments Account\n * call fails.\n * @replacedBy terms_of_service_acceptance\n * @targetRemovalDate 2026-07-31\n */\n tosAccepted?: boolean | null;\n termsOfServiceAcceptance?: TermsOfServiceAcceptance;\n /**\n * email of the Wix Payments account owner.\n * @format EMAIL\n */\n email?: string | null;\n /**\n * Brief summary of the types of products and services offered for sale through the Wix Payments account.\n * For example, \"Sportswear and sport accessories\".\n * @maxLength 500\n */\n productDescription?: string | null;\n /**\n * Country code.\n * @format COUNTRY\n */\n country?: string | null;\n /** @maxLength 50 */\n softDescriptor?: string | null;\n}\n\nexport interface TermsOfServiceAcceptance {\n /** @format IPV4 */\n ip?: string;\n}\n\nexport interface ConnectWixPaymentsAccountRequest {\n /** Wix Payments account to connect to the site. */\n account: WixPaymentsAccount;\n}\n\nexport interface ConnectWixPaymentsAccountResponse {\n /** Connected Wix Payments account. */\n account?: WixPaymentsAccount;\n}\n\nexport interface ConnectWixPaymentsAccountBase44Request {\n /** Wix Payments account to connect to the site. */\n account: WixPaymentsAccount;\n /**\n * MetaSite id\n * @format GUID\n */\n siteId?: string | null;\n}\n\nexport interface ConnectWixPaymentsAccountBase44Response {\n /** Connected Wix Payments account. */\n account?: WixPaymentsAccount;\n base44Metadata?: Base44Metadata;\n}\n\nexport interface Base44Metadata {\n /** @format GUID */\n siteId?: string;\n /** @maxLength 500 */\n webhookPublicKey?: string;\n /** @maxLength 500 */\n appSecret?: string;\n /** @maxLength 500 */\n apiKey?: string;\n}\n\n/** @docsIgnore */\nexport type ConnectWixPaymentsAccountBase44ApplicationErrors = {\n code?: 'MISSING_TERMS_OF_SERVICE';\n description?: string;\n data?: Record<string, any>;\n};\n\n/**\n * Connects a Wix Payments account to the site.\n *\n *\n * The call fails if:\n * - The site's location\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/business-tools/locations/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/locations/introduction))\n * is outside the USA.\n * - A Wix Payments account is already connected to the site.\n * - You don't specify `{\"tosAccepted\": true}`.\n *\n * The connected Wix Payments account has the following limitations, which site\n * owners can manage in their dashboard:\n *\n * - By default, customers can only pay via credit card, Apple Pay, or Google Pay.\n * - To receive payments, site owners must complete onboarding to their Wix\n * Payments account in the site's dashboard.\n * @param account - Wix Payments account to connect to the site.\n * @public\n * @documentationMaturity preview\n * @requiredField account\n * @requiredField account.firstName\n * @requiredField account.lastName\n * @requiredField account.tosAccepted\n * @permissionId CASHIER.PROVIDER_ACCOUNTS_CREATE\n * @applicableIdentity APP\n * @fqn wix.payments.mcp.v1.WixPaymentsAccountService.ConnectWixPaymentsAccount\n */\nexport async function connectWixPaymentsAccount(\n account: NonNullablePaths<\n WixPaymentsAccount,\n `firstName` | `lastName` | `tosAccepted`,\n 2\n >\n): Promise<\n NonNullablePaths<\n ConnectWixPaymentsAccountResponse,\n `account.termsOfServiceAcceptance.ip`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ account: account });\n\n const reqOpts =\n ambassadorWixPaymentsMcpV1WixPaymentsAccount.connectWixPaymentsAccount(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { account: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['account']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Connects a Wix Payments account to the site.\n *\n *\n * The call fails if:\n * - The site's location\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/business-tools/locations/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/locations/introduction))\n * is outside the USA.\n * - A Wix Payments account is already connected to the site.\n * - You don't specify `{\"tosAccepted\": true}`.\n *\n * The connected Wix Payments account has the following limitations, which site\n * owners can manage in their dashboard:\n *\n * - By default, customers can only pay via credit card, Apple Pay, or Google Pay.\n * - To receive payments, site owners must complete onboarding to their Wix\n * Payments account in the site's dashboard.\n * @param account - Wix Payments account to connect to the site.\n * @public\n * @documentationMaturity preview\n * @requiredField account\n * @requiredField account.email\n * @requiredField account.firstName\n * @requiredField account.lastName\n * @requiredField account.termsOfServiceAcceptance\n * @permissionId CASHIER.PROVIDER_ACCOUNTS_CREATE\n * @applicableIdentity APP\n * @fqn wix.payments.mcp.v1.WixPaymentsAccountService.ConnectWixPaymentsAccountBase44\n */\nexport async function connectWixPaymentsAccountBase44(\n account: NonNullablePaths<\n WixPaymentsAccount,\n `email` | `firstName` | `lastName` | `termsOfServiceAcceptance`,\n 2\n >,\n options?: ConnectWixPaymentsAccountBase44Options\n): Promise<\n NonNullablePaths<\n ConnectWixPaymentsAccountBase44Response,\n | `account.termsOfServiceAcceptance.ip`\n | `base44Metadata.siteId`\n | `base44Metadata.webhookPublicKey`\n | `base44Metadata.appSecret`\n | `base44Metadata.apiKey`,\n 4\n > & {\n __applicationErrorsType?: ConnectWixPaymentsAccountBase44ApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n account: account,\n siteId: options?.siteId,\n });\n\n const reqOpts =\n ambassadorWixPaymentsMcpV1WixPaymentsAccount.connectWixPaymentsAccountBase44(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { account: '$[0]', siteId: '$[1].siteId' },\n singleArgumentUnchanged: false,\n },\n ['account', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ConnectWixPaymentsAccountBase44Options {\n /**\n * MetaSite id\n * @format GUID\n */\n siteId?: string | null;\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 resolveWixPaymentsMcpV1WixPaymentsAccountServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www.wixapis.com': [\n {\n srcPath: '/payments/v1/wix-payments-account',\n destPath: '/v1/wix-payments-account',\n },\n {\n srcPath: '/payments/mcp/v1/wix-payments-account',\n destPath: '/v1/wix-payments-account',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/payments/mcp/v1/wix-payments-account',\n destPath: '/v1/wix-payments-account',\n },\n ],\n _: [\n {\n srcPath: '/payments/mcp/v1/wix-payments-account',\n destPath: '/v1/wix-payments-account',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_payments_wix-payments-account';\n\n/**\n * Connects a Wix Payments account to the site.\n *\n *\n * The call fails if:\n * - The site's location\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/business-tools/locations/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/locations/introduction))\n * is outside the USA.\n * - A Wix Payments account is already connected to the site.\n * - You don't specify `{\"tosAccepted\": true}`.\n *\n * The connected Wix Payments account has the following limitations, which site\n * owners can manage in their dashboard:\n *\n * - By default, customers can only pay via credit card, Apple Pay, or Google Pay.\n * - To receive payments, site owners must complete onboarding to their Wix\n * Payments account in the site's dashboard.\n */\nexport function connectWixPaymentsAccount(\n payload: object\n): RequestOptionsFactory<any> {\n function __connectWixPaymentsAccount({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.mcp.v1.wix_payments_account',\n method: 'POST' as any,\n methodFqn:\n 'wix.payments.mcp.v1.WixPaymentsAccountService.ConnectWixPaymentsAccount',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsMcpV1WixPaymentsAccountServiceUrl({\n protoPath: '/v1/wix-payments-account/connect',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __connectWixPaymentsAccount;\n}\n\n/**\n * Connects a Wix Payments account to the site.\n *\n *\n * The call fails if:\n * - The site's location\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/business-tools/locations/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/locations/introduction))\n * is outside the USA.\n * - A Wix Payments account is already connected to the site.\n * - You don't specify `{\"tosAccepted\": true}`.\n *\n * The connected Wix Payments account has the following limitations, which site\n * owners can manage in their dashboard:\n *\n * - By default, customers can only pay via credit card, Apple Pay, or Google Pay.\n * - To receive payments, site owners must complete onboarding to their Wix\n * Payments account in the site's dashboard.\n */\nexport function connectWixPaymentsAccountBase44(\n payload: object\n): RequestOptionsFactory<any> {\n function __connectWixPaymentsAccountBase44({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.mcp.v1.wix_payments_account',\n method: 'POST' as any,\n methodFqn:\n 'wix.payments.mcp.v1.WixPaymentsAccountService.ConnectWixPaymentsAccountBase44',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsMcpV1WixPaymentsAccountServiceUrl({\n protoPath: '/v1/wix-payments-account/connect-base44',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __connectWixPaymentsAccountBase44;\n}\n"],"mappings":"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","names":["connectWixPaymentsAccount","connectWixPaymentsAccountBase44","connectWixPaymentsAccount","sdkTransformError","connectWixPaymentsAccountBase44"]}
@@ -1,4 +1,4 @@
1
- import { ConnectWixPaymentsAccountRequest as ConnectWixPaymentsAccountRequest$1, ConnectWixPaymentsAccountResponse as ConnectWixPaymentsAccountResponse$1 } from './index.typings.js';
1
+ import { ConnectWixPaymentsAccountRequest as ConnectWixPaymentsAccountRequest$1, ConnectWixPaymentsAccountResponse as ConnectWixPaymentsAccountResponse$1, ConnectWixPaymentsAccountBase44Request as ConnectWixPaymentsAccountBase44Request$1, ConnectWixPaymentsAccountBase44Response as ConnectWixPaymentsAccountBase44Response$1 } from './index.typings.js';
2
2
  import '@wix/sdk-types';
3
3
 
4
4
  /** An account that enables a Wix site to process customer payments. */
@@ -25,14 +25,38 @@ interface WixPaymentsAccount {
25
25
  * The account owner must accept these terms for the account to be created
26
26
  * successfully. If the terms aren't accepted, the Connect Wix Payments Account
27
27
  * call fails.
28
+ * @deprecated Whether the account owner has accepted the
29
+ * [Wix Payments Terms of Service](https://www.wix.com/about/terms-of-payments).
30
+ * The account owner must accept these terms for the account to be created
31
+ * successfully. If the terms aren't accepted, the Connect Wix Payments Account
32
+ * call fails.
33
+ * @replacedBy terms_of_service_acceptance
34
+ * @targetRemovalDate 2026-07-31
28
35
  */
29
36
  tosAccepted?: boolean | null;
37
+ termsOfServiceAcceptance?: TermsOfServiceAcceptance;
38
+ /**
39
+ * email of the Wix Payments account owner.
40
+ * @format EMAIL
41
+ */
42
+ email?: string | null;
30
43
  /**
31
44
  * Brief summary of the types of products and services offered for sale through the Wix Payments account.
32
45
  * For example, "Sportswear and sport accessories".
33
46
  * @maxLength 500
34
47
  */
35
48
  productDescription?: string | null;
49
+ /**
50
+ * Country code.
51
+ * @format COUNTRY
52
+ */
53
+ country?: string | null;
54
+ /** @maxLength 50 */
55
+ softDescriptor?: string | null;
56
+ }
57
+ interface TermsOfServiceAcceptance {
58
+ /** @format IPV4 */
59
+ ip?: string;
36
60
  }
37
61
  interface ConnectWixPaymentsAccountRequest {
38
62
  /** Wix Payments account to connect to the site. */
@@ -42,6 +66,36 @@ interface ConnectWixPaymentsAccountResponse {
42
66
  /** Connected Wix Payments account. */
43
67
  account?: WixPaymentsAccount;
44
68
  }
69
+ interface ConnectWixPaymentsAccountBase44Request {
70
+ /** Wix Payments account to connect to the site. */
71
+ account: WixPaymentsAccount;
72
+ /**
73
+ * MetaSite id
74
+ * @format GUID
75
+ */
76
+ siteId?: string | null;
77
+ }
78
+ interface ConnectWixPaymentsAccountBase44Response {
79
+ /** Connected Wix Payments account. */
80
+ account?: WixPaymentsAccount;
81
+ base44Metadata?: Base44Metadata;
82
+ }
83
+ interface Base44Metadata {
84
+ /** @format GUID */
85
+ siteId?: string;
86
+ /** @maxLength 500 */
87
+ webhookPublicKey?: string;
88
+ /** @maxLength 500 */
89
+ appSecret?: string;
90
+ /** @maxLength 500 */
91
+ apiKey?: string;
92
+ }
93
+ /** @docsIgnore */
94
+ type ConnectWixPaymentsAccountBase44ApplicationErrors = {
95
+ code?: 'MISSING_TERMS_OF_SERVICE';
96
+ description?: string;
97
+ data?: Record<string, any>;
98
+ };
45
99
 
46
100
  type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
47
101
  getUrl: (context: any) => string;
@@ -54,5 +108,6 @@ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q
54
108
  __originalResponseType: R;
55
109
  };
56
110
  declare function connectWixPaymentsAccount(): __PublicMethodMetaInfo<'POST', {}, ConnectWixPaymentsAccountRequest$1, ConnectWixPaymentsAccountRequest, ConnectWixPaymentsAccountResponse$1, ConnectWixPaymentsAccountResponse>;
111
+ declare function connectWixPaymentsAccountBase44(): __PublicMethodMetaInfo<'POST', {}, ConnectWixPaymentsAccountBase44Request$1, ConnectWixPaymentsAccountBase44Request, ConnectWixPaymentsAccountBase44Response$1, ConnectWixPaymentsAccountBase44Response>;
57
112
 
58
- export { type ConnectWixPaymentsAccountRequest as ConnectWixPaymentsAccountRequestOriginal, type ConnectWixPaymentsAccountResponse as ConnectWixPaymentsAccountResponseOriginal, type WixPaymentsAccount as WixPaymentsAccountOriginal, type __PublicMethodMetaInfo, connectWixPaymentsAccount };
113
+ export { type Base44Metadata as Base44MetadataOriginal, type ConnectWixPaymentsAccountBase44ApplicationErrors as ConnectWixPaymentsAccountBase44ApplicationErrorsOriginal, type ConnectWixPaymentsAccountBase44Request as ConnectWixPaymentsAccountBase44RequestOriginal, type ConnectWixPaymentsAccountBase44Response as ConnectWixPaymentsAccountBase44ResponseOriginal, type ConnectWixPaymentsAccountRequest as ConnectWixPaymentsAccountRequestOriginal, type ConnectWixPaymentsAccountResponse as ConnectWixPaymentsAccountResponseOriginal, type TermsOfServiceAcceptance as TermsOfServiceAcceptanceOriginal, type WixPaymentsAccount as WixPaymentsAccountOriginal, type __PublicMethodMetaInfo, connectWixPaymentsAccount, connectWixPaymentsAccountBase44 };
@@ -20,7 +20,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // meta.ts
21
21
  var meta_exports = {};
22
22
  __export(meta_exports, {
23
- connectWixPaymentsAccount: () => connectWixPaymentsAccount2
23
+ connectWixPaymentsAccount: () => connectWixPaymentsAccount2,
24
+ connectWixPaymentsAccountBase44: () => connectWixPaymentsAccountBase442
24
25
  });
25
26
  module.exports = __toCommonJS(meta_exports);
26
27
 
@@ -37,6 +38,18 @@ function resolveWixPaymentsMcpV1WixPaymentsAccountServiceUrl(opts) {
37
38
  srcPath: "/payments/mcp/v1/wix-payments-account",
38
39
  destPath: "/v1/wix-payments-account"
39
40
  }
41
+ ],
42
+ "*.dev.wix-code.com": [
43
+ {
44
+ srcPath: "/payments/mcp/v1/wix-payments-account",
45
+ destPath: "/v1/wix-payments-account"
46
+ }
47
+ ],
48
+ _: [
49
+ {
50
+ srcPath: "/payments/mcp/v1/wix-payments-account",
51
+ destPath: "/v1/wix-payments-account"
52
+ }
40
53
  ]
41
54
  };
42
55
  return (0, import_rest_modules.resolveUrl)(Object.assign(opts, { domainToMappings }));
@@ -63,6 +76,27 @@ function connectWixPaymentsAccount(payload) {
63
76
  }
64
77
  return __connectWixPaymentsAccount;
65
78
  }
79
+ function connectWixPaymentsAccountBase44(payload) {
80
+ function __connectWixPaymentsAccountBase44({ host }) {
81
+ const metadata = {
82
+ entityFqdn: "wix.payments.mcp.v1.wix_payments_account",
83
+ method: "POST",
84
+ methodFqn: "wix.payments.mcp.v1.WixPaymentsAccountService.ConnectWixPaymentsAccountBase44",
85
+ packageName: PACKAGE_NAME,
86
+ migrationOptions: {
87
+ optInTransformResponse: true
88
+ },
89
+ url: resolveWixPaymentsMcpV1WixPaymentsAccountServiceUrl({
90
+ protoPath: "/v1/wix-payments-account/connect-base44",
91
+ data: payload,
92
+ host
93
+ }),
94
+ data: payload
95
+ };
96
+ return metadata;
97
+ }
98
+ return __connectWixPaymentsAccountBase44;
99
+ }
66
100
 
67
101
  // src/payments-mcp-v1-wix-payments-account-wix-payments-account.meta.ts
68
102
  function connectWixPaymentsAccount2() {
@@ -85,8 +119,29 @@ function connectWixPaymentsAccount2() {
85
119
  __originalResponseType: null
86
120
  };
87
121
  }
122
+ function connectWixPaymentsAccountBase442() {
123
+ const payload = {};
124
+ const getRequestOptions = connectWixPaymentsAccountBase44(
125
+ payload
126
+ );
127
+ const getUrl = (context) => {
128
+ const { url } = getRequestOptions(context);
129
+ return url;
130
+ };
131
+ return {
132
+ getUrl,
133
+ httpMethod: "POST",
134
+ path: "/v1/wix-payments-account/connect-base44",
135
+ pathParams: {},
136
+ __requestType: null,
137
+ __originalRequestType: null,
138
+ __responseType: null,
139
+ __originalResponseType: null
140
+ };
141
+ }
88
142
  // Annotate the CommonJS export names for ESM import in node:
89
143
  0 && (module.exports = {
90
- connectWixPaymentsAccount
144
+ connectWixPaymentsAccount,
145
+ connectWixPaymentsAccountBase44
91
146
  });
92
147
  //# sourceMappingURL=meta.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../meta.ts","../../../src/payments-mcp-v1-wix-payments-account-wix-payments-account.http.ts","../../../src/payments-mcp-v1-wix-payments-account-wix-payments-account.meta.ts"],"sourcesContent":["export * from './src/payments-mcp-v1-wix-payments-account-wix-payments-account.meta.js';\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 resolveWixPaymentsMcpV1WixPaymentsAccountServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www.wixapis.com': [\n {\n srcPath: '/payments/v1/wix-payments-account',\n destPath: '/v1/wix-payments-account',\n },\n {\n srcPath: '/payments/mcp/v1/wix-payments-account',\n destPath: '/v1/wix-payments-account',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_payments_wix-payments-account';\n\n/**\n * Connects a Wix Payments account to the site.\n *\n *\n * The call fails if:\n * - The site's location\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/business-tools/locations/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/locations/introduction))\n * is outside the USA.\n * - A Wix Payments account is already connected to the site.\n * - You don't specify `{\"tosAccepted\": true}`.\n *\n * The connected Wix Payments account has the following limitations, which site\n * owners can manage in their dashboard:\n *\n * - By default, customers can only pay via credit card, Apple Pay, or Google Pay.\n * - To receive payments, site owners must complete onboarding to their Wix\n * Payments account in the site's dashboard.\n */\nexport function connectWixPaymentsAccount(\n payload: object\n): RequestOptionsFactory<any> {\n function __connectWixPaymentsAccount({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.mcp.v1.wix_payments_account',\n method: 'POST' as any,\n methodFqn:\n 'wix.payments.mcp.v1.WixPaymentsAccountService.ConnectWixPaymentsAccount',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsMcpV1WixPaymentsAccountServiceUrl({\n protoPath: '/v1/wix-payments-account/connect',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __connectWixPaymentsAccount;\n}\n","import * as ambassadorWixPaymentsMcpV1WixPaymentsAccount from './payments-mcp-v1-wix-payments-account-wix-payments-account.http.js';\nimport * as ambassadorWixPaymentsMcpV1WixPaymentsAccountTypes from './payments-mcp-v1-wix-payments-account-wix-payments-account.types.js';\nimport * as ambassadorWixPaymentsMcpV1WixPaymentsAccountUniversalTypes from './payments-mcp-v1-wix-payments-account-wix-payments-account.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function connectWixPaymentsAccount(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixPaymentsMcpV1WixPaymentsAccountUniversalTypes.ConnectWixPaymentsAccountRequest,\n ambassadorWixPaymentsMcpV1WixPaymentsAccountTypes.ConnectWixPaymentsAccountRequest,\n ambassadorWixPaymentsMcpV1WixPaymentsAccountUniversalTypes.ConnectWixPaymentsAccountResponse,\n ambassadorWixPaymentsMcpV1WixPaymentsAccountTypes.ConnectWixPaymentsAccountResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixPaymentsMcpV1WixPaymentsAccount.connectWixPaymentsAccount(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/wix-payments-account/connect',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport {\n WixPaymentsAccount as WixPaymentsAccountOriginal,\n ConnectWixPaymentsAccountRequest as ConnectWixPaymentsAccountRequestOriginal,\n ConnectWixPaymentsAccountResponse as ConnectWixPaymentsAccountResponseOriginal,\n} from './payments-mcp-v1-wix-payments-account-wix-payments-account.types.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,mCAAAA;AAAA;AAAA;;;ACAA,0BAA2B;AAI3B,SAAS,oDACP,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,IACF;AAAA,EACF;AAEA,aAAO,gCAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAoBd,SAAS,0BACd,SAC4B;AAC5B,WAAS,4BAA4B,EAAE,KAAK,GAAQ;AAClD,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,oDAAoD;AAAA,QACvD,WAAW;AAAA,QACX,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,MACD,MAAM;AAAA,IACR;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;;;AC9CO,SAASC,6BAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBACyC;AAAA,IAC3C;AAAA,EACF;AAEF,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["connectWixPaymentsAccount","connectWixPaymentsAccount"]}
1
+ {"version":3,"sources":["../../../meta.ts","../../../src/payments-mcp-v1-wix-payments-account-wix-payments-account.http.ts","../../../src/payments-mcp-v1-wix-payments-account-wix-payments-account.meta.ts"],"sourcesContent":["export * from './src/payments-mcp-v1-wix-payments-account-wix-payments-account.meta.js';\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 resolveWixPaymentsMcpV1WixPaymentsAccountServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www.wixapis.com': [\n {\n srcPath: '/payments/v1/wix-payments-account',\n destPath: '/v1/wix-payments-account',\n },\n {\n srcPath: '/payments/mcp/v1/wix-payments-account',\n destPath: '/v1/wix-payments-account',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/payments/mcp/v1/wix-payments-account',\n destPath: '/v1/wix-payments-account',\n },\n ],\n _: [\n {\n srcPath: '/payments/mcp/v1/wix-payments-account',\n destPath: '/v1/wix-payments-account',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_payments_wix-payments-account';\n\n/**\n * Connects a Wix Payments account to the site.\n *\n *\n * The call fails if:\n * - The site's location\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/business-tools/locations/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/locations/introduction))\n * is outside the USA.\n * - A Wix Payments account is already connected to the site.\n * - You don't specify `{\"tosAccepted\": true}`.\n *\n * The connected Wix Payments account has the following limitations, which site\n * owners can manage in their dashboard:\n *\n * - By default, customers can only pay via credit card, Apple Pay, or Google Pay.\n * - To receive payments, site owners must complete onboarding to their Wix\n * Payments account in the site's dashboard.\n */\nexport function connectWixPaymentsAccount(\n payload: object\n): RequestOptionsFactory<any> {\n function __connectWixPaymentsAccount({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.mcp.v1.wix_payments_account',\n method: 'POST' as any,\n methodFqn:\n 'wix.payments.mcp.v1.WixPaymentsAccountService.ConnectWixPaymentsAccount',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsMcpV1WixPaymentsAccountServiceUrl({\n protoPath: '/v1/wix-payments-account/connect',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __connectWixPaymentsAccount;\n}\n\n/**\n * Connects a Wix Payments account to the site.\n *\n *\n * The call fails if:\n * - The site's location\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/business-tools/locations/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/locations/introduction))\n * is outside the USA.\n * - A Wix Payments account is already connected to the site.\n * - You don't specify `{\"tosAccepted\": true}`.\n *\n * The connected Wix Payments account has the following limitations, which site\n * owners can manage in their dashboard:\n *\n * - By default, customers can only pay via credit card, Apple Pay, or Google Pay.\n * - To receive payments, site owners must complete onboarding to their Wix\n * Payments account in the site's dashboard.\n */\nexport function connectWixPaymentsAccountBase44(\n payload: object\n): RequestOptionsFactory<any> {\n function __connectWixPaymentsAccountBase44({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.mcp.v1.wix_payments_account',\n method: 'POST' as any,\n methodFqn:\n 'wix.payments.mcp.v1.WixPaymentsAccountService.ConnectWixPaymentsAccountBase44',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsMcpV1WixPaymentsAccountServiceUrl({\n protoPath: '/v1/wix-payments-account/connect-base44',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __connectWixPaymentsAccountBase44;\n}\n","import * as ambassadorWixPaymentsMcpV1WixPaymentsAccount from './payments-mcp-v1-wix-payments-account-wix-payments-account.http.js';\nimport * as ambassadorWixPaymentsMcpV1WixPaymentsAccountTypes from './payments-mcp-v1-wix-payments-account-wix-payments-account.types.js';\nimport * as ambassadorWixPaymentsMcpV1WixPaymentsAccountUniversalTypes from './payments-mcp-v1-wix-payments-account-wix-payments-account.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function connectWixPaymentsAccount(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixPaymentsMcpV1WixPaymentsAccountUniversalTypes.ConnectWixPaymentsAccountRequest,\n ambassadorWixPaymentsMcpV1WixPaymentsAccountTypes.ConnectWixPaymentsAccountRequest,\n ambassadorWixPaymentsMcpV1WixPaymentsAccountUniversalTypes.ConnectWixPaymentsAccountResponse,\n ambassadorWixPaymentsMcpV1WixPaymentsAccountTypes.ConnectWixPaymentsAccountResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixPaymentsMcpV1WixPaymentsAccount.connectWixPaymentsAccount(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/wix-payments-account/connect',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function connectWixPaymentsAccountBase44(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixPaymentsMcpV1WixPaymentsAccountUniversalTypes.ConnectWixPaymentsAccountBase44Request,\n ambassadorWixPaymentsMcpV1WixPaymentsAccountTypes.ConnectWixPaymentsAccountBase44Request,\n ambassadorWixPaymentsMcpV1WixPaymentsAccountUniversalTypes.ConnectWixPaymentsAccountBase44Response,\n ambassadorWixPaymentsMcpV1WixPaymentsAccountTypes.ConnectWixPaymentsAccountBase44Response\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixPaymentsMcpV1WixPaymentsAccount.connectWixPaymentsAccountBase44(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/wix-payments-account/connect-base44',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport {\n WixPaymentsAccount as WixPaymentsAccountOriginal,\n TermsOfServiceAcceptance as TermsOfServiceAcceptanceOriginal,\n ConnectWixPaymentsAccountRequest as ConnectWixPaymentsAccountRequestOriginal,\n ConnectWixPaymentsAccountResponse as ConnectWixPaymentsAccountResponseOriginal,\n ConnectWixPaymentsAccountBase44Request as ConnectWixPaymentsAccountBase44RequestOriginal,\n ConnectWixPaymentsAccountBase44Response as ConnectWixPaymentsAccountBase44ResponseOriginal,\n Base44Metadata as Base44MetadataOriginal,\n ConnectWixPaymentsAccountBase44ApplicationErrors as ConnectWixPaymentsAccountBase44ApplicationErrorsOriginal,\n} from './payments-mcp-v1-wix-payments-account-wix-payments-account.types.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,mCAAAA;AAAA,EAAA,uCAAAC;AAAA;AAAA;;;ACAA,0BAA2B;AAI3B,SAAS,oDACP,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,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;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;AAoBd,SAAS,0BACd,SAC4B;AAC5B,WAAS,4BAA4B,EAAE,KAAK,GAAQ;AAClD,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,oDAAoD;AAAA,QACvD,WAAW;AAAA,QACX,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,MACD,MAAM;AAAA,IACR;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;AAoBO,SAAS,gCACd,SAC4B;AAC5B,WAAS,kCAAkC,EAAE,KAAK,GAAQ;AACxD,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,oDAAoD;AAAA,QACvD,WAAW;AAAA,QACX,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,MACD,MAAM;AAAA,IACR;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;;;ACvGO,SAASC,6BAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBACyC;AAAA,IAC3C;AAAA,EACF;AAEF,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,mCAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBACyC;AAAA,IAC3C;AAAA,EACF;AAEF,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["connectWixPaymentsAccount","connectWixPaymentsAccountBase44","connectWixPaymentsAccount","connectWixPaymentsAccountBase44"]}
@@ -1,6 +1,6 @@
1
1
  import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
- import { WixPaymentsAccount, ConnectWixPaymentsAccountResponse } from './index.typings.mjs';
3
- export { ConnectWixPaymentsAccountRequest } from './index.typings.mjs';
2
+ import { WixPaymentsAccount, ConnectWixPaymentsAccountResponse, ConnectWixPaymentsAccountBase44Options, ConnectWixPaymentsAccountBase44Response, ConnectWixPaymentsAccountBase44ApplicationErrors } from './index.typings.mjs';
3
+ export { Base44Metadata, ConnectWixPaymentsAccountBase44Request, ConnectWixPaymentsAccountRequest, TermsOfServiceAcceptance } from './index.typings.mjs';
4
4
 
5
5
  declare function connectWixPaymentsAccount$1(httpClient: HttpClient): ConnectWixPaymentsAccountSignature;
6
6
  interface ConnectWixPaymentsAccountSignature {
@@ -23,9 +23,35 @@ interface ConnectWixPaymentsAccountSignature {
23
23
  * Payments account in the site's dashboard.
24
24
  * @param - Wix Payments account to connect to the site.
25
25
  */
26
- (account: NonNullablePaths<WixPaymentsAccount, `firstName` | `lastName` | `tosAccepted`, 2>): Promise<ConnectWixPaymentsAccountResponse>;
26
+ (account: NonNullablePaths<WixPaymentsAccount, `firstName` | `lastName` | `tosAccepted`, 2>): Promise<NonNullablePaths<ConnectWixPaymentsAccountResponse, `account.termsOfServiceAcceptance.ip`, 4>>;
27
+ }
28
+ declare function connectWixPaymentsAccountBase44$1(httpClient: HttpClient): ConnectWixPaymentsAccountBase44Signature;
29
+ interface ConnectWixPaymentsAccountBase44Signature {
30
+ /**
31
+ * Connects a Wix Payments account to the site.
32
+ *
33
+ *
34
+ * The call fails if:
35
+ * - The site's location
36
+ * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/business-tools/locations/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/locations/introduction))
37
+ * is outside the USA.
38
+ * - A Wix Payments account is already connected to the site.
39
+ * - You don't specify `{"tosAccepted": true}`.
40
+ *
41
+ * The connected Wix Payments account has the following limitations, which site
42
+ * owners can manage in their dashboard:
43
+ *
44
+ * - By default, customers can only pay via credit card, Apple Pay, or Google Pay.
45
+ * - To receive payments, site owners must complete onboarding to their Wix
46
+ * Payments account in the site's dashboard.
47
+ * @param - Wix Payments account to connect to the site.
48
+ */
49
+ (account: NonNullablePaths<WixPaymentsAccount, `email` | `firstName` | `lastName` | `termsOfServiceAcceptance`, 2>, options?: ConnectWixPaymentsAccountBase44Options): Promise<NonNullablePaths<ConnectWixPaymentsAccountBase44Response, `account.termsOfServiceAcceptance.ip` | `base44Metadata.siteId` | `base44Metadata.webhookPublicKey` | `base44Metadata.appSecret` | `base44Metadata.apiKey`, 4> & {
50
+ __applicationErrorsType?: ConnectWixPaymentsAccountBase44ApplicationErrors;
51
+ }>;
27
52
  }
28
53
 
29
54
  declare const connectWixPaymentsAccount: MaybeContext<BuildRESTFunction<typeof connectWixPaymentsAccount$1> & typeof connectWixPaymentsAccount$1>;
55
+ declare const connectWixPaymentsAccountBase44: MaybeContext<BuildRESTFunction<typeof connectWixPaymentsAccountBase44$1> & typeof connectWixPaymentsAccountBase44$1>;
30
56
 
31
- export { ConnectWixPaymentsAccountResponse, WixPaymentsAccount, connectWixPaymentsAccount };
57
+ export { ConnectWixPaymentsAccountBase44ApplicationErrors, ConnectWixPaymentsAccountBase44Options, ConnectWixPaymentsAccountBase44Response, ConnectWixPaymentsAccountResponse, WixPaymentsAccount, connectWixPaymentsAccount, connectWixPaymentsAccountBase44 };
@@ -18,6 +18,18 @@ function resolveWixPaymentsMcpV1WixPaymentsAccountServiceUrl(opts) {
18
18
  srcPath: "/payments/mcp/v1/wix-payments-account",
19
19
  destPath: "/v1/wix-payments-account"
20
20
  }
21
+ ],
22
+ "*.dev.wix-code.com": [
23
+ {
24
+ srcPath: "/payments/mcp/v1/wix-payments-account",
25
+ destPath: "/v1/wix-payments-account"
26
+ }
27
+ ],
28
+ _: [
29
+ {
30
+ srcPath: "/payments/mcp/v1/wix-payments-account",
31
+ destPath: "/v1/wix-payments-account"
32
+ }
21
33
  ]
22
34
  };
23
35
  return resolveUrl(Object.assign(opts, { domainToMappings }));
@@ -44,6 +56,27 @@ function connectWixPaymentsAccount(payload) {
44
56
  }
45
57
  return __connectWixPaymentsAccount;
46
58
  }
59
+ function connectWixPaymentsAccountBase44(payload) {
60
+ function __connectWixPaymentsAccountBase44({ host }) {
61
+ const metadata = {
62
+ entityFqdn: "wix.payments.mcp.v1.wix_payments_account",
63
+ method: "POST",
64
+ methodFqn: "wix.payments.mcp.v1.WixPaymentsAccountService.ConnectWixPaymentsAccountBase44",
65
+ packageName: PACKAGE_NAME,
66
+ migrationOptions: {
67
+ optInTransformResponse: true
68
+ },
69
+ url: resolveWixPaymentsMcpV1WixPaymentsAccountServiceUrl({
70
+ protoPath: "/v1/wix-payments-account/connect-base44",
71
+ data: payload,
72
+ host
73
+ }),
74
+ data: payload
75
+ };
76
+ return metadata;
77
+ }
78
+ return __connectWixPaymentsAccountBase44;
79
+ }
47
80
 
48
81
  // src/payments-mcp-v1-wix-payments-account-wix-payments-account.universal.ts
49
82
  async function connectWixPaymentsAccount2(account) {
@@ -71,6 +104,34 @@ async function connectWixPaymentsAccount2(account) {
71
104
  throw transformedError;
72
105
  }
73
106
  }
107
+ async function connectWixPaymentsAccountBase442(account, options) {
108
+ const { httpClient, sideEffects } = arguments[2];
109
+ const payload = renameKeysFromSDKRequestToRESTRequest({
110
+ account,
111
+ siteId: options?.siteId
112
+ });
113
+ const reqOpts = connectWixPaymentsAccountBase44(
114
+ payload
115
+ );
116
+ sideEffects?.onSiteCall?.();
117
+ try {
118
+ const result = await httpClient.request(reqOpts);
119
+ sideEffects?.onSuccess?.(result);
120
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
121
+ } catch (err) {
122
+ const transformedError = sdkTransformError(
123
+ err,
124
+ {
125
+ spreadPathsToArguments: {},
126
+ explicitPathsToArguments: { account: "$[0]", siteId: "$[1].siteId" },
127
+ singleArgumentUnchanged: false
128
+ },
129
+ ["account", "options"]
130
+ );
131
+ sideEffects?.onError?.(err);
132
+ throw transformedError;
133
+ }
134
+ }
74
135
 
75
136
  // src/payments-mcp-v1-wix-payments-account-wix-payments-account.public.ts
76
137
  function connectWixPaymentsAccount3(httpClient) {
@@ -80,11 +141,21 @@ function connectWixPaymentsAccount3(httpClient) {
80
141
  { httpClient }
81
142
  );
82
143
  }
144
+ function connectWixPaymentsAccountBase443(httpClient) {
145
+ return (account, options) => connectWixPaymentsAccountBase442(
146
+ account,
147
+ options,
148
+ // @ts-ignore
149
+ { httpClient }
150
+ );
151
+ }
83
152
 
84
153
  // src/payments-mcp-v1-wix-payments-account-wix-payments-account.context.ts
85
154
  import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
86
155
  var connectWixPaymentsAccount4 = /* @__PURE__ */ createRESTModule(connectWixPaymentsAccount3);
156
+ var connectWixPaymentsAccountBase444 = /* @__PURE__ */ createRESTModule(connectWixPaymentsAccountBase443);
87
157
  export {
88
- connectWixPaymentsAccount4 as connectWixPaymentsAccount
158
+ connectWixPaymentsAccount4 as connectWixPaymentsAccount,
159
+ connectWixPaymentsAccountBase444 as connectWixPaymentsAccountBase44
89
160
  };
90
161
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/payments-mcp-v1-wix-payments-account-wix-payments-account.universal.ts","../../../src/payments-mcp-v1-wix-payments-account-wix-payments-account.http.ts","../../../src/payments-mcp-v1-wix-payments-account-wix-payments-account.public.ts","../../../src/payments-mcp-v1-wix-payments-account-wix-payments-account.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 ambassadorWixPaymentsMcpV1WixPaymentsAccount from './payments-mcp-v1-wix-payments-account-wix-payments-account.http.js';\n\n/** An account that enables a Wix site to process customer payments. */\nexport interface WixPaymentsAccount {\n /**\n * ID of the Wix Payments account.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * First name of the Wix Payments account owner.\n * @maxLength 500\n */\n firstName?: string | null;\n /**\n * Last name of the Wix Payments account owner.\n * @maxLength 500\n */\n lastName?: string | null;\n /**\n * Whether the account owner has accepted the\n * [Wix Payments Terms of Service](https://www.wix.com/about/terms-of-payments).\n * The account owner must accept these terms for the account to be created\n * successfully. If the terms aren't accepted, the Connect Wix Payments Account\n * call fails.\n */\n tosAccepted?: boolean | null;\n /**\n * Brief summary of the types of products and services offered for sale through the Wix Payments account.\n * For example, \"Sportswear and sport accessories\".\n * @maxLength 500\n */\n productDescription?: string | null;\n}\n\nexport interface ConnectWixPaymentsAccountRequest {\n /** Wix Payments account to connect to the site. */\n account: WixPaymentsAccount;\n}\n\nexport interface ConnectWixPaymentsAccountResponse {\n /** Connected Wix Payments account. */\n account?: WixPaymentsAccount;\n}\n\n/**\n * Connects a Wix Payments account to the site.\n *\n *\n * The call fails if:\n * - The site's location\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/business-tools/locations/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/locations/introduction))\n * is outside the USA.\n * - A Wix Payments account is already connected to the site.\n * - You don't specify `{\"tosAccepted\": true}`.\n *\n * The connected Wix Payments account has the following limitations, which site\n * owners can manage in their dashboard:\n *\n * - By default, customers can only pay via credit card, Apple Pay, or Google Pay.\n * - To receive payments, site owners must complete onboarding to their Wix\n * Payments account in the site's dashboard.\n * @param account - Wix Payments account to connect to the site.\n * @public\n * @documentationMaturity preview\n * @requiredField account\n * @requiredField account.firstName\n * @requiredField account.lastName\n * @requiredField account.tosAccepted\n * @permissionId CASHIER.PROVIDER_ACCOUNTS_CREATE\n * @applicableIdentity APP\n * @fqn wix.payments.mcp.v1.WixPaymentsAccountService.ConnectWixPaymentsAccount\n */\nexport async function connectWixPaymentsAccount(\n account: NonNullablePaths<\n WixPaymentsAccount,\n `firstName` | `lastName` | `tosAccepted`,\n 2\n >\n): Promise<ConnectWixPaymentsAccountResponse> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ account: account });\n\n const reqOpts =\n ambassadorWixPaymentsMcpV1WixPaymentsAccount.connectWixPaymentsAccount(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { account: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['account']\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 resolveWixPaymentsMcpV1WixPaymentsAccountServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www.wixapis.com': [\n {\n srcPath: '/payments/v1/wix-payments-account',\n destPath: '/v1/wix-payments-account',\n },\n {\n srcPath: '/payments/mcp/v1/wix-payments-account',\n destPath: '/v1/wix-payments-account',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_payments_wix-payments-account';\n\n/**\n * Connects a Wix Payments account to the site.\n *\n *\n * The call fails if:\n * - The site's location\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/business-tools/locations/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/locations/introduction))\n * is outside the USA.\n * - A Wix Payments account is already connected to the site.\n * - You don't specify `{\"tosAccepted\": true}`.\n *\n * The connected Wix Payments account has the following limitations, which site\n * owners can manage in their dashboard:\n *\n * - By default, customers can only pay via credit card, Apple Pay, or Google Pay.\n * - To receive payments, site owners must complete onboarding to their Wix\n * Payments account in the site's dashboard.\n */\nexport function connectWixPaymentsAccount(\n payload: object\n): RequestOptionsFactory<any> {\n function __connectWixPaymentsAccount({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.mcp.v1.wix_payments_account',\n method: 'POST' as any,\n methodFqn:\n 'wix.payments.mcp.v1.WixPaymentsAccountService.ConnectWixPaymentsAccount',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsMcpV1WixPaymentsAccountServiceUrl({\n protoPath: '/v1/wix-payments-account/connect',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __connectWixPaymentsAccount;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n ConnectWixPaymentsAccountResponse,\n WixPaymentsAccount,\n connectWixPaymentsAccount as universalConnectWixPaymentsAccount,\n} from './payments-mcp-v1-wix-payments-account-wix-payments-account.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/payments' };\n\nexport function connectWixPaymentsAccount(\n httpClient: HttpClient\n): ConnectWixPaymentsAccountSignature {\n return (\n account: NonNullablePaths<\n WixPaymentsAccount,\n `firstName` | `lastName` | `tosAccepted`,\n 2\n >\n ) =>\n universalConnectWixPaymentsAccount(\n account,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ConnectWixPaymentsAccountSignature {\n /**\n * Connects a Wix Payments account to the site.\n *\n *\n * The call fails if:\n * - The site's location\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/business-tools/locations/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/locations/introduction))\n * is outside the USA.\n * - A Wix Payments account is already connected to the site.\n * - You don't specify `{\"tosAccepted\": true}`.\n *\n * The connected Wix Payments account has the following limitations, which site\n * owners can manage in their dashboard:\n *\n * - By default, customers can only pay via credit card, Apple Pay, or Google Pay.\n * - To receive payments, site owners must complete onboarding to their Wix\n * Payments account in the site's dashboard.\n * @param - Wix Payments account to connect to the site.\n */\n (\n account: NonNullablePaths<\n WixPaymentsAccount,\n `firstName` | `lastName` | `tosAccepted`,\n 2\n >\n ): Promise<ConnectWixPaymentsAccountResponse>;\n}\n\nexport {\n ConnectWixPaymentsAccountRequest,\n ConnectWixPaymentsAccountResponse,\n WixPaymentsAccount,\n} from './payments-mcp-v1-wix-payments-account-wix-payments-account.universal.js';\n","import { connectWixPaymentsAccount as publicConnectWixPaymentsAccount } from './payments-mcp-v1-wix-payments-account-wix-payments-account.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const connectWixPaymentsAccount: MaybeContext<\n BuildRESTFunction<typeof publicConnectWixPaymentsAccount> &\n typeof publicConnectWixPaymentsAccount\n> = /*#__PURE__*/ createRESTModule(publicConnectWixPaymentsAccount);\n\nexport {\n WixPaymentsAccount,\n ConnectWixPaymentsAccountRequest,\n ConnectWixPaymentsAccountResponse,\n} from './payments-mcp-v1-wix-payments-account-wix-payments-account.universal.js';\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,kBAAkB;AAI3B,SAAS,oDACP,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,IACF;AAAA,EACF;AAEA,SAAO,WAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAoBd,SAAS,0BACd,SAC4B;AAC5B,WAAS,4BAA4B,EAAE,KAAK,GAAQ;AAClD,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,oDAAoD;AAAA,QACvD,WAAW;AAAA,QACX,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,MACD,MAAM;AAAA,IACR;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;;;ADYA,eAAsBA,2BACpB,SAK4C;AAE5C,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,UAAU,sCAAsC,EAAE,QAAiB,CAAC;AAE1E,QAAM,UACyC;AAAA,IAC3C;AAAA,EACF;AAEF,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,SAAS,OAAO;AAAA,QAC5C,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS;AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AE/GO,SAASC,2BACd,YACoC;AACpC,SAAO,CACL,YAMAA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACvBA,SAAS,wBAAwB;AAG1B,IAAMC,6BAGK,iCAAiBA,0BAA+B;","names":["connectWixPaymentsAccount","connectWixPaymentsAccount","connectWixPaymentsAccount"]}
1
+ {"version":3,"sources":["../../../src/payments-mcp-v1-wix-payments-account-wix-payments-account.universal.ts","../../../src/payments-mcp-v1-wix-payments-account-wix-payments-account.http.ts","../../../src/payments-mcp-v1-wix-payments-account-wix-payments-account.public.ts","../../../src/payments-mcp-v1-wix-payments-account-wix-payments-account.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 ambassadorWixPaymentsMcpV1WixPaymentsAccount from './payments-mcp-v1-wix-payments-account-wix-payments-account.http.js';\n\n/** An account that enables a Wix site to process customer payments. */\nexport interface WixPaymentsAccount {\n /**\n * ID of the Wix Payments account.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * First name of the Wix Payments account owner.\n * @maxLength 500\n */\n firstName?: string | null;\n /**\n * Last name of the Wix Payments account owner.\n * @maxLength 500\n */\n lastName?: string | null;\n /**\n * Whether the account owner has accepted the\n * [Wix Payments Terms of Service](https://www.wix.com/about/terms-of-payments).\n * The account owner must accept these terms for the account to be created\n * successfully. If the terms aren't accepted, the Connect Wix Payments Account\n * call fails.\n * @deprecated Whether the account owner has accepted the\n * [Wix Payments Terms of Service](https://www.wix.com/about/terms-of-payments).\n * The account owner must accept these terms for the account to be created\n * successfully. If the terms aren't accepted, the Connect Wix Payments Account\n * call fails.\n * @replacedBy terms_of_service_acceptance\n * @targetRemovalDate 2026-07-31\n */\n tosAccepted?: boolean | null;\n termsOfServiceAcceptance?: TermsOfServiceAcceptance;\n /**\n * email of the Wix Payments account owner.\n * @format EMAIL\n */\n email?: string | null;\n /**\n * Brief summary of the types of products and services offered for sale through the Wix Payments account.\n * For example, \"Sportswear and sport accessories\".\n * @maxLength 500\n */\n productDescription?: string | null;\n /**\n * Country code.\n * @format COUNTRY\n */\n country?: string | null;\n /** @maxLength 50 */\n softDescriptor?: string | null;\n}\n\nexport interface TermsOfServiceAcceptance {\n /** @format IPV4 */\n ip?: string;\n}\n\nexport interface ConnectWixPaymentsAccountRequest {\n /** Wix Payments account to connect to the site. */\n account: WixPaymentsAccount;\n}\n\nexport interface ConnectWixPaymentsAccountResponse {\n /** Connected Wix Payments account. */\n account?: WixPaymentsAccount;\n}\n\nexport interface ConnectWixPaymentsAccountBase44Request {\n /** Wix Payments account to connect to the site. */\n account: WixPaymentsAccount;\n /**\n * MetaSite id\n * @format GUID\n */\n siteId?: string | null;\n}\n\nexport interface ConnectWixPaymentsAccountBase44Response {\n /** Connected Wix Payments account. */\n account?: WixPaymentsAccount;\n base44Metadata?: Base44Metadata;\n}\n\nexport interface Base44Metadata {\n /** @format GUID */\n siteId?: string;\n /** @maxLength 500 */\n webhookPublicKey?: string;\n /** @maxLength 500 */\n appSecret?: string;\n /** @maxLength 500 */\n apiKey?: string;\n}\n\n/** @docsIgnore */\nexport type ConnectWixPaymentsAccountBase44ApplicationErrors = {\n code?: 'MISSING_TERMS_OF_SERVICE';\n description?: string;\n data?: Record<string, any>;\n};\n\n/**\n * Connects a Wix Payments account to the site.\n *\n *\n * The call fails if:\n * - The site's location\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/business-tools/locations/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/locations/introduction))\n * is outside the USA.\n * - A Wix Payments account is already connected to the site.\n * - You don't specify `{\"tosAccepted\": true}`.\n *\n * The connected Wix Payments account has the following limitations, which site\n * owners can manage in their dashboard:\n *\n * - By default, customers can only pay via credit card, Apple Pay, or Google Pay.\n * - To receive payments, site owners must complete onboarding to their Wix\n * Payments account in the site's dashboard.\n * @param account - Wix Payments account to connect to the site.\n * @public\n * @documentationMaturity preview\n * @requiredField account\n * @requiredField account.firstName\n * @requiredField account.lastName\n * @requiredField account.tosAccepted\n * @permissionId CASHIER.PROVIDER_ACCOUNTS_CREATE\n * @applicableIdentity APP\n * @fqn wix.payments.mcp.v1.WixPaymentsAccountService.ConnectWixPaymentsAccount\n */\nexport async function connectWixPaymentsAccount(\n account: NonNullablePaths<\n WixPaymentsAccount,\n `firstName` | `lastName` | `tosAccepted`,\n 2\n >\n): Promise<\n NonNullablePaths<\n ConnectWixPaymentsAccountResponse,\n `account.termsOfServiceAcceptance.ip`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ account: account });\n\n const reqOpts =\n ambassadorWixPaymentsMcpV1WixPaymentsAccount.connectWixPaymentsAccount(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { account: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['account']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Connects a Wix Payments account to the site.\n *\n *\n * The call fails if:\n * - The site's location\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/business-tools/locations/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/locations/introduction))\n * is outside the USA.\n * - A Wix Payments account is already connected to the site.\n * - You don't specify `{\"tosAccepted\": true}`.\n *\n * The connected Wix Payments account has the following limitations, which site\n * owners can manage in their dashboard:\n *\n * - By default, customers can only pay via credit card, Apple Pay, or Google Pay.\n * - To receive payments, site owners must complete onboarding to their Wix\n * Payments account in the site's dashboard.\n * @param account - Wix Payments account to connect to the site.\n * @public\n * @documentationMaturity preview\n * @requiredField account\n * @requiredField account.email\n * @requiredField account.firstName\n * @requiredField account.lastName\n * @requiredField account.termsOfServiceAcceptance\n * @permissionId CASHIER.PROVIDER_ACCOUNTS_CREATE\n * @applicableIdentity APP\n * @fqn wix.payments.mcp.v1.WixPaymentsAccountService.ConnectWixPaymentsAccountBase44\n */\nexport async function connectWixPaymentsAccountBase44(\n account: NonNullablePaths<\n WixPaymentsAccount,\n `email` | `firstName` | `lastName` | `termsOfServiceAcceptance`,\n 2\n >,\n options?: ConnectWixPaymentsAccountBase44Options\n): Promise<\n NonNullablePaths<\n ConnectWixPaymentsAccountBase44Response,\n | `account.termsOfServiceAcceptance.ip`\n | `base44Metadata.siteId`\n | `base44Metadata.webhookPublicKey`\n | `base44Metadata.appSecret`\n | `base44Metadata.apiKey`,\n 4\n > & {\n __applicationErrorsType?: ConnectWixPaymentsAccountBase44ApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n account: account,\n siteId: options?.siteId,\n });\n\n const reqOpts =\n ambassadorWixPaymentsMcpV1WixPaymentsAccount.connectWixPaymentsAccountBase44(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { account: '$[0]', siteId: '$[1].siteId' },\n singleArgumentUnchanged: false,\n },\n ['account', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ConnectWixPaymentsAccountBase44Options {\n /**\n * MetaSite id\n * @format GUID\n */\n siteId?: string | null;\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 resolveWixPaymentsMcpV1WixPaymentsAccountServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www.wixapis.com': [\n {\n srcPath: '/payments/v1/wix-payments-account',\n destPath: '/v1/wix-payments-account',\n },\n {\n srcPath: '/payments/mcp/v1/wix-payments-account',\n destPath: '/v1/wix-payments-account',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/payments/mcp/v1/wix-payments-account',\n destPath: '/v1/wix-payments-account',\n },\n ],\n _: [\n {\n srcPath: '/payments/mcp/v1/wix-payments-account',\n destPath: '/v1/wix-payments-account',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_payments_wix-payments-account';\n\n/**\n * Connects a Wix Payments account to the site.\n *\n *\n * The call fails if:\n * - The site's location\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/business-tools/locations/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/locations/introduction))\n * is outside the USA.\n * - A Wix Payments account is already connected to the site.\n * - You don't specify `{\"tosAccepted\": true}`.\n *\n * The connected Wix Payments account has the following limitations, which site\n * owners can manage in their dashboard:\n *\n * - By default, customers can only pay via credit card, Apple Pay, or Google Pay.\n * - To receive payments, site owners must complete onboarding to their Wix\n * Payments account in the site's dashboard.\n */\nexport function connectWixPaymentsAccount(\n payload: object\n): RequestOptionsFactory<any> {\n function __connectWixPaymentsAccount({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.mcp.v1.wix_payments_account',\n method: 'POST' as any,\n methodFqn:\n 'wix.payments.mcp.v1.WixPaymentsAccountService.ConnectWixPaymentsAccount',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsMcpV1WixPaymentsAccountServiceUrl({\n protoPath: '/v1/wix-payments-account/connect',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __connectWixPaymentsAccount;\n}\n\n/**\n * Connects a Wix Payments account to the site.\n *\n *\n * The call fails if:\n * - The site's location\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/business-tools/locations/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/locations/introduction))\n * is outside the USA.\n * - A Wix Payments account is already connected to the site.\n * - You don't specify `{\"tosAccepted\": true}`.\n *\n * The connected Wix Payments account has the following limitations, which site\n * owners can manage in their dashboard:\n *\n * - By default, customers can only pay via credit card, Apple Pay, or Google Pay.\n * - To receive payments, site owners must complete onboarding to their Wix\n * Payments account in the site's dashboard.\n */\nexport function connectWixPaymentsAccountBase44(\n payload: object\n): RequestOptionsFactory<any> {\n function __connectWixPaymentsAccountBase44({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.mcp.v1.wix_payments_account',\n method: 'POST' as any,\n methodFqn:\n 'wix.payments.mcp.v1.WixPaymentsAccountService.ConnectWixPaymentsAccountBase44',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsMcpV1WixPaymentsAccountServiceUrl({\n protoPath: '/v1/wix-payments-account/connect-base44',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __connectWixPaymentsAccountBase44;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n ConnectWixPaymentsAccountBase44ApplicationErrors,\n ConnectWixPaymentsAccountBase44Options,\n ConnectWixPaymentsAccountBase44Response,\n ConnectWixPaymentsAccountResponse,\n WixPaymentsAccount,\n connectWixPaymentsAccount as universalConnectWixPaymentsAccount,\n connectWixPaymentsAccountBase44 as universalConnectWixPaymentsAccountBase44,\n} from './payments-mcp-v1-wix-payments-account-wix-payments-account.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/payments' };\n\nexport function connectWixPaymentsAccount(\n httpClient: HttpClient\n): ConnectWixPaymentsAccountSignature {\n return (\n account: NonNullablePaths<\n WixPaymentsAccount,\n `firstName` | `lastName` | `tosAccepted`,\n 2\n >\n ) =>\n universalConnectWixPaymentsAccount(\n account,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ConnectWixPaymentsAccountSignature {\n /**\n * Connects a Wix Payments account to the site.\n *\n *\n * The call fails if:\n * - The site's location\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/business-tools/locations/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/locations/introduction))\n * is outside the USA.\n * - A Wix Payments account is already connected to the site.\n * - You don't specify `{\"tosAccepted\": true}`.\n *\n * The connected Wix Payments account has the following limitations, which site\n * owners can manage in their dashboard:\n *\n * - By default, customers can only pay via credit card, Apple Pay, or Google Pay.\n * - To receive payments, site owners must complete onboarding to their Wix\n * Payments account in the site's dashboard.\n * @param - Wix Payments account to connect to the site.\n */\n (\n account: NonNullablePaths<\n WixPaymentsAccount,\n `firstName` | `lastName` | `tosAccepted`,\n 2\n >\n ): Promise<\n NonNullablePaths<\n ConnectWixPaymentsAccountResponse,\n `account.termsOfServiceAcceptance.ip`,\n 4\n >\n >;\n}\n\nexport function connectWixPaymentsAccountBase44(\n httpClient: HttpClient\n): ConnectWixPaymentsAccountBase44Signature {\n return (\n account: NonNullablePaths<\n WixPaymentsAccount,\n `email` | `firstName` | `lastName` | `termsOfServiceAcceptance`,\n 2\n >,\n options?: ConnectWixPaymentsAccountBase44Options\n ) =>\n universalConnectWixPaymentsAccountBase44(\n account,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ConnectWixPaymentsAccountBase44Signature {\n /**\n * Connects a Wix Payments account to the site.\n *\n *\n * The call fails if:\n * - The site's location\n * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/business-tools/locations/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/locations/introduction))\n * is outside the USA.\n * - A Wix Payments account is already connected to the site.\n * - You don't specify `{\"tosAccepted\": true}`.\n *\n * The connected Wix Payments account has the following limitations, which site\n * owners can manage in their dashboard:\n *\n * - By default, customers can only pay via credit card, Apple Pay, or Google Pay.\n * - To receive payments, site owners must complete onboarding to their Wix\n * Payments account in the site's dashboard.\n * @param - Wix Payments account to connect to the site.\n */\n (\n account: NonNullablePaths<\n WixPaymentsAccount,\n `email` | `firstName` | `lastName` | `termsOfServiceAcceptance`,\n 2\n >,\n options?: ConnectWixPaymentsAccountBase44Options\n ): Promise<\n NonNullablePaths<\n ConnectWixPaymentsAccountBase44Response,\n | `account.termsOfServiceAcceptance.ip`\n | `base44Metadata.siteId`\n | `base44Metadata.webhookPublicKey`\n | `base44Metadata.appSecret`\n | `base44Metadata.apiKey`,\n 4\n > & {\n __applicationErrorsType?: ConnectWixPaymentsAccountBase44ApplicationErrors;\n }\n >;\n}\n\nexport {\n Base44Metadata,\n ConnectWixPaymentsAccountBase44Options,\n ConnectWixPaymentsAccountBase44Request,\n ConnectWixPaymentsAccountBase44Response,\n ConnectWixPaymentsAccountRequest,\n ConnectWixPaymentsAccountResponse,\n TermsOfServiceAcceptance,\n WixPaymentsAccount,\n} from './payments-mcp-v1-wix-payments-account-wix-payments-account.universal.js';\n","import {\n connectWixPaymentsAccount as publicConnectWixPaymentsAccount,\n connectWixPaymentsAccountBase44 as publicConnectWixPaymentsAccountBase44,\n} from './payments-mcp-v1-wix-payments-account-wix-payments-account.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const connectWixPaymentsAccount: MaybeContext<\n BuildRESTFunction<typeof publicConnectWixPaymentsAccount> &\n typeof publicConnectWixPaymentsAccount\n> = /*#__PURE__*/ createRESTModule(publicConnectWixPaymentsAccount);\nexport const connectWixPaymentsAccountBase44: MaybeContext<\n BuildRESTFunction<typeof publicConnectWixPaymentsAccountBase44> &\n typeof publicConnectWixPaymentsAccountBase44\n> = /*#__PURE__*/ createRESTModule(publicConnectWixPaymentsAccountBase44);\n\nexport {\n WixPaymentsAccount,\n TermsOfServiceAcceptance,\n ConnectWixPaymentsAccountRequest,\n ConnectWixPaymentsAccountResponse,\n ConnectWixPaymentsAccountBase44Request,\n ConnectWixPaymentsAccountBase44Response,\n Base44Metadata,\n ConnectWixPaymentsAccountBase44Options,\n} from './payments-mcp-v1-wix-payments-account-wix-payments-account.universal.js';\nexport { ConnectWixPaymentsAccountBase44ApplicationErrors } from './payments-mcp-v1-wix-payments-account-wix-payments-account.universal.js';\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,kBAAkB;AAI3B,SAAS,oDACP,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,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;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;AAoBd,SAAS,0BACd,SAC4B;AAC5B,WAAS,4BAA4B,EAAE,KAAK,GAAQ;AAClD,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,oDAAoD;AAAA,QACvD,WAAW;AAAA,QACX,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,MACD,MAAM;AAAA,IACR;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;AAoBO,SAAS,gCACd,SAC4B;AAC5B,WAAS,kCAAkC,EAAE,KAAK,GAAQ;AACxD,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,oDAAoD;AAAA,QACvD,WAAW;AAAA,QACX,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,MACD,MAAM;AAAA,IACR;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;;;ADcA,eAAsBA,2BACpB,SAWA;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,UAAU,sCAAsC,EAAE,QAAiB,CAAC;AAE1E,QAAM,UACyC;AAAA,IAC3C;AAAA,EACF;AAEF,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,SAAS,OAAO;AAAA,QAC5C,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS;AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;AA+BA,eAAsBC,iCACpB,SAKA,SAaA;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,UAAU,sCAAsC;AAAA,IACpD;AAAA,IACA,QAAQ,SAAS;AAAA,EACnB,CAAC;AAED,QAAM,UACyC;AAAA,IAC3C;AAAA,EACF;AAEF,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,SAAS,QAAQ,QAAQ,cAAc;AAAA,QACnE,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,WAAW,SAAS;AAAA,IACvB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AEnQO,SAASC,2BACd,YACoC;AACpC,SAAO,CACL,YAMAA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAqCO,SAASC,iCACd,YAC0C;AAC1C,SAAO,CACL,SAKA,YAEAA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;AC9EA,SAAS,wBAAwB;AAG1B,IAAMC,6BAGK,iCAAiBA,0BAA+B;AAC3D,IAAMC,mCAGK,iCAAiBA,gCAAqC;","names":["connectWixPaymentsAccount","connectWixPaymentsAccountBase44","connectWixPaymentsAccount","connectWixPaymentsAccountBase44","connectWixPaymentsAccount","connectWixPaymentsAccountBase44"]}