@wix/auto_sdk_payments_psp-callbacks 1.0.39 → 1.0.40

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.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts","../../src/payments-psp-v1-provider-platform-event-psp-callbacks.universal.ts","../../src/payments-psp-v1-provider-platform-event-psp-callbacks.http.ts","../../src/payments-psp-v1-provider-platform-event-psp-callbacks.public.ts","../../src/payments-psp-v1-provider-platform-event-psp-callbacks.context.ts"],"sourcesContent":["export * from './src/payments-psp-v1-provider-platform-event-psp-callbacks.context.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { renameKeysFromSDKRequestToRESTRequest } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient } from '@wix/sdk-types';\nimport * as ambassadorWixPaymentsPspV1ProviderPlatformEvent from './payments-psp-v1-provider-platform-event-psp-callbacks.http.js';\n\n/** Provider platform event */\nexport interface ProviderPlatformEvent\n extends ProviderPlatformEventResourceOneOf {\n /** Refund event data. */\n refund?: RefundEvent;\n /** Transaction event data. */\n transaction?: TransactionEvent;\n /** Capture event data. */\n capture?: CaptureEvent;\n /** Void event data. */\n void?: VoidEvent;\n /**\n * This field is deprecated.\n * @deprecated\n */\n pluginId?: string;\n /**\n * Wix site ID.\n * @format GUID\n */\n siteId?: string | null;\n}\n\n/** @oneof */\nexport interface ProviderPlatformEventResourceOneOf {\n /** Refund event data. */\n refund?: RefundEvent;\n /** Transaction event data. */\n transaction?: TransactionEvent;\n /** Capture event data. */\n capture?: CaptureEvent;\n /** Void event data. */\n void?: VoidEvent;\n}\n\nexport interface RefundEvent {\n /** Wix transaction ID. */\n wixTransactionId?: string;\n /** PSP refund ID. */\n pluginRefundId?: string;\n /** Wix [reason code](https://dev.wix.com/api/rest/all-apis/provider-platform/reason-codes#all-apis_provider-platform_reason-codes_refund-declined) indicating a failed request. */\n reasonCode?: number;\n /** Refunded amount. */\n amount?: string;\n /** Wix refund ID. This field is only required when a merchant initiates a refund from the Wix dashboard. */\n wixRefundId?: string | null;\n /** PSP-specific error code. */\n errorCode?: string | null;\n /** PSP-specific error message. */\n errorMessage?: string | null;\n}\n\nexport interface TransactionEvent {\n /** Wix transaction ID. */\n wixTransactionId?: string;\n /** PSP transaction ID. */\n pluginTransactionId?: string;\n /** Wix [reason code](https://dev.wix.com/api/rest/all-apis/provider-platform/reason-codes) indicating a failed or pending request. */\n reasonCode?: number;\n /** PSP-specific error code. */\n errorCode?: string | null;\n /** PSP-specific error message. */\n errorMessage?: string | null;\n /** Token data for stored payment method. */\n credentialsOnFile?: CredentialsOnFile;\n /** Details of actual customer's card, obtained from a Funding PAN as opposed to a Device PAN. */\n cardDetails?: CardDetails;\n}\n\nexport interface CredentialsOnFile extends CredentialsOnFileInfoOneOf {\n /** Network token data. */\n cardReference?: CardReference;\n /** Provider generated token data. */\n paymentMethodReference?: PaymentMethodReference;\n}\n\n/** @oneof */\nexport interface CredentialsOnFileInfoOneOf {\n /** Network token data. */\n cardReference?: CardReference;\n /** Provider generated token data. */\n paymentMethodReference?: PaymentMethodReference;\n}\n\nexport interface CardReference {\n /** Network token. */\n networkTransactionId?: string;\n /** Directory Server transaction ID */\n dsTransactionId?: string | null;\n}\n\nexport interface PaymentMethodReference {\n /** Payment method token created by the PSP. */\n token?: string;\n}\n\nexport interface CardDetails {\n /**\n * Issuer (business) identification number. First 6 or 8 digits of the card's number.\n * @minLength 6\n * @maxLength 8\n */\n bin?: string | null;\n /**\n * Last 4 digits of the card's number.\n * @minLength 4\n * @maxLength 4\n */\n lastFour?: string | null;\n}\n\nexport interface CaptureEvent {\n /**\n * Wix transaction ID.\n * @format GUID\n */\n wixTransactionId?: string;\n /** Wix [reason code](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/reason-codes) indicating request's status. */\n reasonCode?: number;\n /**\n * Total amount captured in a currency’s minor units.\n * Learn more about [currencies](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/currencies).\n */\n amount?: string;\n /**\n * PSP-specific error code.\n * @maxLength 50\n */\n errorCode?: string | null;\n /**\n * PSP-specific error message.\n * @maxLength 300\n */\n errorMessage?: string | null;\n}\n\nexport interface VoidEvent {\n /**\n * Wix transaction ID.\n * @format GUID\n */\n wixTransactionId?: string;\n /** Wix [reason code](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/reason-codes) indicating request's status. */\n reasonCode?: number;\n /**\n * Total amount voided in a currency’s minor units.\n * Learn more about [currencies](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/currencies).\n */\n amount?: string;\n /**\n * PSP-specific error code.\n * @maxLength 50\n */\n errorCode?: string | null;\n /**\n * PSP-specific error message.\n * @maxLength 300\n */\n errorMessage?: string | null;\n}\n\n/** Submit event request */\nexport interface SubmitEventRequest {\n /** Event data. */\n event: ProviderPlatformEvent;\n}\n\n/** Submit event response */\nexport interface SubmitEventResponse {}\n\n/**\n * This Wix API is used by a Payment Service Provider (PSP) to send webhooks about payment and refund states to Wix.\n *\n * Calls to this endpoint must include a `User-Agent` header with the name of the PSP and the integration version in this format: `{PSP}/{version}`.\n * PSP's create their own version numbers.\n *\n * > You cannot try out this endpoint because an `Authorization` header value has to be obtained\n * > with the OAuth 2.0 client credentials flow for a specific scope.\n * > So please ignore the **Authorization** section below as well as the **Try It Out** button.\n * @param event - Event data.\n * @public\n * @requiredField event\n * @permissionId CASHIER.GET_ACCESS\n * @returns Submit event response\n * @fqn wix.payments.v1.provider_platform_events.ProviderPlatformEventsService.SubmitEvent\n */\nexport async function submitEvent(event: ProviderPlatformEvent): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ event: event });\n\n const reqOpts =\n ambassadorWixPaymentsPspV1ProviderPlatformEvent.submitEvent(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { event: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['event']\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 resolveWixPaymentsV1ProviderPlatformEventsProviderPlatformEventsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'cashier-services._base_domain_': [\n {\n srcPath: '',\n destPath: '',\n },\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'difm._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'invoices._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'apps._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'ecom._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'www.cartscheckout.com': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'cartscheckout.com': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'cartscheckout._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/payment-services-web',\n destPath: '',\n },\n ],\n 'progallery._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '',\n },\n ],\n 'progallerycdn._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '',\n },\n ],\n 'scheduler._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'events._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/payment-services-web',\n destPath: '',\n },\n ],\n 'bookings.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'cashier._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'ecom.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'cashier.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '',\n destPath: '',\n },\n ],\n 'vod-server._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'vod.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'www.wixhotels.com': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/.well-known/apple-developer-merchantid-domain-association',\n destPath: '/domain-verification/apple-pay',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/.well-known/apple-developer-merchantid-domain-association',\n destPath: '/domain-verification/apple-pay',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/.well-known/apple-developer-merchantid-domain-association',\n destPath: '/domain-verification/apple-pay',\n },\n ],\n 'test-applepay.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/payments',\n destPath: '/api/merchant',\n },\n {\n srcPath: '/payments/v1/provider-platform-events',\n destPath: '/payments/v1/provider-platform-events',\n },\n {\n srcPath: '/api/plugin/v1/transactions',\n destPath: '/api/plugin/v1/transactions',\n },\n {\n srcPath: '/payments/api/merchant',\n destPath: '/api/merchant',\n },\n ],\n 'us-applepay.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'eu-applepay.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'payments-sb.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/ambassador/payment-services-web',\n destPath: '',\n },\n {\n srcPath: '/.well-known/apple-developer-merchantid-domain-association',\n destPath: '/domain-verification/apple-pay',\n },\n ],\n _: [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/.well-known/apple-developer-merchantid-domain-association',\n destPath: '/domain-verification/apple-pay',\n },\n {\n srcPath: '/payments/psp/v1/provider-platform-events',\n destPath: '/payments/v1/provider-platform-events',\n },\n ],\n 'events.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'tpa.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/payment-services-web',\n destPath: '',\n },\n ],\n 'pricing-plans.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'editor-flow.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'premium._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/payment-services-web',\n destPath: '',\n },\n {\n srcPath: '/lib-mbapi/include/modules/gateway/return/paypal.php',\n destPath: '/api/payPal/payments/legacy-ipn-to-ignore',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/.well-known/apple-developer-merchantid-domain-association',\n destPath: '/domain-verification/apple-pay',\n },\n ],\n 'payment-webhooks.wixapps.net': [\n {\n srcPath: '/cashier/accounts/stripe',\n destPath: '/api/merchant/stripe',\n },\n {\n srcPath: '/cashier/transactions/stripe',\n destPath: '/api/stripe',\n },\n ],\n 'cashier-services.wixapis.com': [\n {\n srcPath: '/payments/v1/provider-platform-events',\n destPath: '/payments/v1/provider-platform-events',\n },\n ],\n 'currency-converter.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/payments/psp/v1/provider-platform-events',\n destPath: '/payments/v1/provider-platform-events',\n },\n ],\n 'challenger.wixapps.net': [\n {\n srcPath: '/payment-services-web',\n destPath: '',\n },\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'platform.rise.ai': [\n {\n srcPath: '/payment-services-web',\n destPath: '',\n },\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'manage.base44.com': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/ambassador/payment-services-web',\n destPath: '',\n },\n ],\n 'payments.base44.com': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/ambassador/payment-services-web',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_payments_psp-callbacks';\n\n/**\n * This Wix API is used by a Payment Service Provider (PSP) to send webhooks about payment and refund states to Wix.\n *\n * Calls to this endpoint must include a `User-Agent` header with the name of the PSP and the integration version in this format: `{PSP}/{version}`.\n * PSP's create their own version numbers.\n *\n * > You cannot try out this endpoint because an `Authorization` header value has to be obtained\n * > with the OAuth 2.0 client credentials flow for a specific scope.\n * > So please ignore the **Authorization** section below as well as the **Try It Out** button.\n */\nexport function submitEvent(payload: object): RequestOptionsFactory<any> {\n function __submitEvent({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.psp.v1.provider_platform_event',\n method: 'POST' as any,\n methodFqn:\n 'wix.payments.v1.provider_platform_events.ProviderPlatformEventsService.SubmitEvent',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsV1ProviderPlatformEventsProviderPlatformEventsServiceUrl(\n {\n protoPath: '/payments/v1/provider-platform-events',\n data: payload,\n host,\n }\n ),\n data: payload,\n };\n\n return metadata;\n }\n\n return __submitEvent;\n}\n","import { HttpClient } from '@wix/sdk-types';\nimport {\n ProviderPlatformEvent,\n submitEvent as universalSubmitEvent,\n} from './payments-psp-v1-provider-platform-event-psp-callbacks.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/payments' };\n\nexport function submitEvent(httpClient: HttpClient): SubmitEventSignature {\n return (event: ProviderPlatformEvent) =>\n universalSubmitEvent(\n event,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface SubmitEventSignature {\n /**\n * This Wix API is used by a Payment Service Provider (PSP) to send webhooks about payment and refund states to Wix.\n *\n * Calls to this endpoint must include a `User-Agent` header with the name of the PSP and the integration version in this format: `{PSP}/{version}`.\n * PSP's create their own version numbers.\n *\n * > You cannot try out this endpoint because an `Authorization` header value has to be obtained\n * > with the OAuth 2.0 client credentials flow for a specific scope.\n * > So please ignore the **Authorization** section below as well as the **Try It Out** button.\n * @param - Event data.\n * @returns Submit event response\n */\n (event: ProviderPlatformEvent): Promise<void>;\n}\n\nexport {\n CaptureEvent,\n CardDetails,\n CardReference,\n CredentialsOnFile,\n CredentialsOnFileInfoOneOf,\n PaymentMethodReference,\n ProviderPlatformEvent,\n ProviderPlatformEventResourceOneOf,\n RefundEvent,\n SubmitEventRequest,\n SubmitEventResponse,\n TransactionEvent,\n VoidEvent,\n} from './payments-psp-v1-provider-platform-event-psp-callbacks.universal.js';\n","import { submitEvent as publicSubmitEvent } from './payments-psp-v1-provider-platform-event-psp-callbacks.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const submitEvent: MaybeContext<\n BuildRESTFunction<typeof publicSubmitEvent> & typeof publicSubmitEvent\n> = /*#__PURE__*/ createRESTModule(publicSubmitEvent);\n\nexport {\n ProviderPlatformEvent,\n ProviderPlatformEventResourceOneOf,\n RefundEvent,\n TransactionEvent,\n CredentialsOnFile,\n CredentialsOnFileInfoOneOf,\n CardReference,\n PaymentMethodReference,\n CardDetails,\n CaptureEvent,\n VoidEvent,\n SubmitEventRequest,\n SubmitEventResponse,\n} from './payments-psp-v1-provider-platform-event-psp-callbacks.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,qBAAAA;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAAsD;;;ACDtD,0BAA2B;AAI3B,SAAS,2EACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,kCAAkC;AAAA,MAChC;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,0BAA0B;AAAA,MACxB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,Q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,YAA8C;AACxE,SAAO,CAAC,UACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACdA,IAAAC,uBAAiC;AAG1B,IAAMC,eAEK,2DAAiBA,YAAiB;","names":["submitEvent","submitEvent","sdkTransformError","submitEvent","import_rest_modules","submitEvent"]}
1
+ {"version":3,"sources":["../../index.ts","../../src/payments-psp-v1-provider-platform-event-psp-callbacks.universal.ts","../../src/payments-psp-v1-provider-platform-event-psp-callbacks.http.ts","../../src/payments-psp-v1-provider-platform-event-psp-callbacks.public.ts","../../src/payments-psp-v1-provider-platform-event-psp-callbacks.context.ts"],"sourcesContent":["export * from './src/payments-psp-v1-provider-platform-event-psp-callbacks.context.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { renameKeysFromSDKRequestToRESTRequest } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient } from '@wix/sdk-types';\nimport * as ambassadorWixPaymentsPspV1ProviderPlatformEvent from './payments-psp-v1-provider-platform-event-psp-callbacks.http.js';\n\n/** Provider platform event */\nexport interface ProviderPlatformEvent\n extends ProviderPlatformEventResourceOneOf {\n /** Refund event data. */\n refund?: RefundEvent;\n /** Transaction event data. */\n transaction?: TransactionEvent;\n /** Capture event data. */\n capture?: CaptureEvent;\n /** Void event data. */\n void?: VoidEvent;\n /**\n * This field is deprecated.\n * @deprecated\n */\n pluginId?: string;\n /**\n * Wix site ID.\n * @format GUID\n */\n siteId?: string | null;\n}\n\n/** @oneof */\nexport interface ProviderPlatformEventResourceOneOf {\n /** Refund event data. */\n refund?: RefundEvent;\n /** Transaction event data. */\n transaction?: TransactionEvent;\n /** Capture event data. */\n capture?: CaptureEvent;\n /** Void event data. */\n void?: VoidEvent;\n}\n\nexport interface RefundEvent {\n /** Wix transaction ID. */\n wixTransactionId?: string;\n /** PSP refund ID. */\n pluginRefundId?: string;\n /** Wix [reason code](https://dev.wix.com/api/rest/all-apis/provider-platform/reason-codes#all-apis_provider-platform_reason-codes_refund-declined) indicating a failed request. */\n reasonCode?: number;\n /** Refunded amount. */\n amount?: string;\n /** Wix refund ID. This field is only required when a merchant initiates a refund from the Wix dashboard. */\n wixRefundId?: string | null;\n /** PSP-specific error code. */\n errorCode?: string | null;\n /** PSP-specific error message. */\n errorMessage?: string | null;\n}\n\nexport interface TransactionEvent {\n /** Wix transaction ID. */\n wixTransactionId?: string;\n /** PSP transaction ID. */\n pluginTransactionId?: string;\n /** Wix [reason code](https://dev.wix.com/api/rest/all-apis/provider-platform/reason-codes) indicating a failed or pending request. */\n reasonCode?: number;\n /** PSP-specific error code. */\n errorCode?: string | null;\n /** PSP-specific error message. */\n errorMessage?: string | null;\n /** Token data for stored payment method. */\n credentialsOnFile?: CredentialsOnFile;\n /** Details of actual customer's card, obtained from a Funding PAN as opposed to a Device PAN. */\n cardDetails?: CardDetails;\n}\n\nexport interface CredentialsOnFile extends CredentialsOnFileInfoOneOf {\n /** Network token data. */\n cardReference?: CardReference;\n /** Provider generated token data. */\n paymentMethodReference?: PaymentMethodReference;\n}\n\n/** @oneof */\nexport interface CredentialsOnFileInfoOneOf {\n /** Network token data. */\n cardReference?: CardReference;\n /** Provider generated token data. */\n paymentMethodReference?: PaymentMethodReference;\n}\n\nexport interface CardReference {\n /** Network token. */\n networkTransactionId?: string;\n /** Directory Server transaction ID */\n dsTransactionId?: string | null;\n /**\n * Transaction Link Identifier assigned by Mastercard.\n * @minLength 1\n * @maxLength 22\n */\n transactionLinkId?: string | null;\n}\n\nexport interface PaymentMethodReference {\n /** Payment method token created by the PSP. */\n token?: string;\n}\n\nexport interface CardDetails {\n /**\n * Issuer (business) identification number. First 6 or 8 digits of the card's number.\n * @minLength 6\n * @maxLength 8\n */\n bin?: string | null;\n /**\n * Last 4 digits of the card's number.\n * @minLength 4\n * @maxLength 4\n */\n lastFour?: string | null;\n}\n\nexport interface CaptureEvent {\n /**\n * Wix transaction ID.\n * @format GUID\n */\n wixTransactionId?: string;\n /** Wix [reason code](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/reason-codes) indicating request's status. */\n reasonCode?: number;\n /**\n * Total amount captured in a currency’s minor units.\n * Learn more about [currencies](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/currencies).\n */\n amount?: string;\n /**\n * PSP-specific error code.\n * @maxLength 50\n */\n errorCode?: string | null;\n /**\n * PSP-specific error message.\n * @maxLength 300\n */\n errorMessage?: string | null;\n}\n\nexport interface VoidEvent {\n /**\n * Wix transaction ID.\n * @format GUID\n */\n wixTransactionId?: string;\n /** Wix [reason code](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/reason-codes) indicating request's status. */\n reasonCode?: number;\n /**\n * Total amount voided in a currency’s minor units.\n * Learn more about [currencies](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/currencies).\n */\n amount?: string;\n /**\n * PSP-specific error code.\n * @maxLength 50\n */\n errorCode?: string | null;\n /**\n * PSP-specific error message.\n * @maxLength 300\n */\n errorMessage?: string | null;\n}\n\n/** Submit event request */\nexport interface SubmitEventRequest {\n /** Event data. */\n event: ProviderPlatformEvent;\n}\n\n/** Submit event response */\nexport interface SubmitEventResponse {}\n\n/**\n * This Wix API is used by a Payment Service Provider (PSP) to send webhooks about payment and refund states to Wix.\n *\n * Calls to this endpoint must include a `User-Agent` header with the name of the PSP and the integration version in this format: `{PSP}/{version}`.\n * PSP's create their own version numbers.\n *\n * > You cannot try out this endpoint because an `Authorization` header value has to be obtained\n * > with the OAuth 2.0 client credentials flow for a specific scope.\n * > So please ignore the **Authorization** section below as well as the **Try It Out** button.\n * @param event - Event data.\n * @public\n * @requiredField event\n * @permissionId CASHIER.GET_ACCESS\n * @returns Submit event response\n * @fqn wix.payments.v1.provider_platform_events.ProviderPlatformEventsService.SubmitEvent\n */\nexport async function submitEvent(event: ProviderPlatformEvent): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ event: event });\n\n const reqOpts =\n ambassadorWixPaymentsPspV1ProviderPlatformEvent.submitEvent(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { event: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['event']\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 resolveWixPaymentsV1ProviderPlatformEventsProviderPlatformEventsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'cashier-services._base_domain_': [\n {\n srcPath: '',\n destPath: '',\n },\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'difm._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'invoices._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'apps._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'ecom._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'www.cartscheckout.com': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'cartscheckout.com': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'cartscheckout._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/payment-services-web',\n destPath: '',\n },\n ],\n 'progallery._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '',\n },\n ],\n 'progallerycdn._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '',\n },\n ],\n 'scheduler._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'events._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/payment-services-web',\n destPath: '',\n },\n ],\n 'bookings.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'cashier._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'ecom.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'cashier.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '',\n destPath: '',\n },\n ],\n 'vod-server._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'vod.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'www.wixhotels.com': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/.well-known/apple-developer-merchantid-domain-association',\n destPath: '/domain-verification/apple-pay',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/.well-known/apple-developer-merchantid-domain-association',\n destPath: '/domain-verification/apple-pay',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/.well-known/apple-developer-merchantid-domain-association',\n destPath: '/domain-verification/apple-pay',\n },\n ],\n 'test-applepay.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/payments',\n destPath: '/api/merchant',\n },\n {\n srcPath: '/payments/v1/provider-platform-events',\n destPath: '/payments/v1/provider-platform-events',\n },\n {\n srcPath: '/api/plugin/v1/transactions',\n destPath: '/api/plugin/v1/transactions',\n },\n {\n srcPath: '/payments/api/merchant',\n destPath: '/api/merchant',\n },\n ],\n 'us-applepay.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'eu-applepay.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'payments-sb.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/ambassador/payment-services-web',\n destPath: '',\n },\n {\n srcPath: '/.well-known/apple-developer-merchantid-domain-association',\n destPath: '/domain-verification/apple-pay',\n },\n ],\n _: [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/.well-known/apple-developer-merchantid-domain-association',\n destPath: '/domain-verification/apple-pay',\n },\n {\n srcPath: '/payments/psp/v1/provider-platform-events',\n destPath: '/payments/v1/provider-platform-events',\n },\n ],\n 'events.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'tpa.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/payment-services-web',\n destPath: '',\n },\n ],\n 'pricing-plans.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'editor-flow.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'premium._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/payment-services-web',\n destPath: '',\n },\n {\n srcPath: '/lib-mbapi/include/modules/gateway/return/paypal.php',\n destPath: '/api/payPal/payments/legacy-ipn-to-ignore',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/.well-known/apple-developer-merchantid-domain-association',\n destPath: '/domain-verification/apple-pay',\n },\n ],\n 'payment-webhooks.wixapps.net': [\n {\n srcPath: '/cashier/accounts/stripe',\n destPath: '/api/merchant/stripe',\n },\n {\n srcPath: '/cashier/transactions/stripe',\n destPath: '/api/stripe',\n },\n ],\n 'cashier-services.wixapis.com': [\n {\n srcPath: '/payments/v1/provider-platform-events',\n destPath: '/payments/v1/provider-platform-events',\n },\n ],\n 'currency-converter.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/payments/psp/v1/provider-platform-events',\n destPath: '/payments/v1/provider-platform-events',\n },\n ],\n 'challenger.wixapps.net': [\n {\n srcPath: '/payment-services-web',\n destPath: '',\n },\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'platform.rise.ai': [\n {\n srcPath: '/payment-services-web',\n destPath: '',\n },\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'manage.base44.com': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/ambassador/payment-services-web',\n destPath: '',\n },\n ],\n 'payments.base44.com': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/ambassador/payment-services-web',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_payments_psp-callbacks';\n\n/**\n * This Wix API is used by a Payment Service Provider (PSP) to send webhooks about payment and refund states to Wix.\n *\n * Calls to this endpoint must include a `User-Agent` header with the name of the PSP and the integration version in this format: `{PSP}/{version}`.\n * PSP's create their own version numbers.\n *\n * > You cannot try out this endpoint because an `Authorization` header value has to be obtained\n * > with the OAuth 2.0 client credentials flow for a specific scope.\n * > So please ignore the **Authorization** section below as well as the **Try It Out** button.\n */\nexport function submitEvent(payload: object): RequestOptionsFactory<any> {\n function __submitEvent({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.psp.v1.provider_platform_event',\n method: 'POST' as any,\n methodFqn:\n 'wix.payments.v1.provider_platform_events.ProviderPlatformEventsService.SubmitEvent',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsV1ProviderPlatformEventsProviderPlatformEventsServiceUrl(\n {\n protoPath: '/payments/v1/provider-platform-events',\n data: payload,\n host,\n }\n ),\n data: payload,\n };\n\n return metadata;\n }\n\n return __submitEvent;\n}\n","import { HttpClient } from '@wix/sdk-types';\nimport {\n ProviderPlatformEvent,\n submitEvent as universalSubmitEvent,\n} from './payments-psp-v1-provider-platform-event-psp-callbacks.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/payments' };\n\nexport function submitEvent(httpClient: HttpClient): SubmitEventSignature {\n return (event: ProviderPlatformEvent) =>\n universalSubmitEvent(\n event,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface SubmitEventSignature {\n /**\n * This Wix API is used by a Payment Service Provider (PSP) to send webhooks about payment and refund states to Wix.\n *\n * Calls to this endpoint must include a `User-Agent` header with the name of the PSP and the integration version in this format: `{PSP}/{version}`.\n * PSP's create their own version numbers.\n *\n * > You cannot try out this endpoint because an `Authorization` header value has to be obtained\n * > with the OAuth 2.0 client credentials flow for a specific scope.\n * > So please ignore the **Authorization** section below as well as the **Try It Out** button.\n * @param - Event data.\n * @returns Submit event response\n */\n (event: ProviderPlatformEvent): Promise<void>;\n}\n\nexport {\n CaptureEvent,\n CardDetails,\n CardReference,\n CredentialsOnFile,\n CredentialsOnFileInfoOneOf,\n PaymentMethodReference,\n ProviderPlatformEvent,\n ProviderPlatformEventResourceOneOf,\n RefundEvent,\n SubmitEventRequest,\n SubmitEventResponse,\n TransactionEvent,\n VoidEvent,\n} from './payments-psp-v1-provider-platform-event-psp-callbacks.universal.js';\n","import { submitEvent as publicSubmitEvent } from './payments-psp-v1-provider-platform-event-psp-callbacks.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const submitEvent: MaybeContext<\n BuildRESTFunction<typeof publicSubmitEvent> & typeof publicSubmitEvent\n> = /*#__PURE__*/ createRESTModule(publicSubmitEvent);\n\nexport {\n ProviderPlatformEvent,\n ProviderPlatformEventResourceOneOf,\n RefundEvent,\n TransactionEvent,\n CredentialsOnFile,\n CredentialsOnFileInfoOneOf,\n CardReference,\n PaymentMethodReference,\n CardDetails,\n CaptureEvent,\n VoidEvent,\n SubmitEventRequest,\n SubmitEventResponse,\n} from './payments-psp-v1-provider-platform-event-psp-callbacks.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,qBAAAA;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAAsD;;;ACDtD,0BAA2B;AAI3B,SAAS,2EACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,kCAAkC;AAAA,MAChC;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;AAA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AAO;AAAA,QAC1C,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,OAAO;AAAA,IACV;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AE3NO,SAASC,aAAY,YAA8C;AACxE,SAAO,CAAC,UACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACdA,IAAAC,uBAAiC;AAG1B,IAAMC,eAEK,2DAAiBA,YAAiB;","names":["submitEvent","submitEvent","sdkTransformError","submitEvent","import_rest_modules","submitEvent"]}
@@ -80,6 +80,12 @@ interface CardReference {
80
80
  networkTransactionId?: string;
81
81
  /** Directory Server transaction ID */
82
82
  dsTransactionId?: string | null;
83
+ /**
84
+ * Transaction Link Identifier assigned by Mastercard.
85
+ * @minLength 1
86
+ * @maxLength 22
87
+ */
88
+ transactionLinkId?: string | null;
83
89
  }
84
90
  interface PaymentMethodReference {
85
91
  /** Payment method token created by the PSP. */
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.typings.ts","../../src/payments-psp-v1-provider-platform-event-psp-callbacks.universal.ts","../../src/payments-psp-v1-provider-platform-event-psp-callbacks.http.ts"],"sourcesContent":["export * from './src/payments-psp-v1-provider-platform-event-psp-callbacks.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { renameKeysFromSDKRequestToRESTRequest } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient } from '@wix/sdk-types';\nimport * as ambassadorWixPaymentsPspV1ProviderPlatformEvent from './payments-psp-v1-provider-platform-event-psp-callbacks.http.js';\n\n/** Provider platform event */\nexport interface ProviderPlatformEvent\n extends ProviderPlatformEventResourceOneOf {\n /** Refund event data. */\n refund?: RefundEvent;\n /** Transaction event data. */\n transaction?: TransactionEvent;\n /** Capture event data. */\n capture?: CaptureEvent;\n /** Void event data. */\n void?: VoidEvent;\n /**\n * This field is deprecated.\n * @deprecated\n */\n pluginId?: string;\n /**\n * Wix site ID.\n * @format GUID\n */\n siteId?: string | null;\n}\n\n/** @oneof */\nexport interface ProviderPlatformEventResourceOneOf {\n /** Refund event data. */\n refund?: RefundEvent;\n /** Transaction event data. */\n transaction?: TransactionEvent;\n /** Capture event data. */\n capture?: CaptureEvent;\n /** Void event data. */\n void?: VoidEvent;\n}\n\nexport interface RefundEvent {\n /** Wix transaction ID. */\n wixTransactionId?: string;\n /** PSP refund ID. */\n pluginRefundId?: string;\n /** Wix [reason code](https://dev.wix.com/api/rest/all-apis/provider-platform/reason-codes#all-apis_provider-platform_reason-codes_refund-declined) indicating a failed request. */\n reasonCode?: number;\n /** Refunded amount. */\n amount?: string;\n /** Wix refund ID. This field is only required when a merchant initiates a refund from the Wix dashboard. */\n wixRefundId?: string | null;\n /** PSP-specific error code. */\n errorCode?: string | null;\n /** PSP-specific error message. */\n errorMessage?: string | null;\n}\n\nexport interface TransactionEvent {\n /** Wix transaction ID. */\n wixTransactionId?: string;\n /** PSP transaction ID. */\n pluginTransactionId?: string;\n /** Wix [reason code](https://dev.wix.com/api/rest/all-apis/provider-platform/reason-codes) indicating a failed or pending request. */\n reasonCode?: number;\n /** PSP-specific error code. */\n errorCode?: string | null;\n /** PSP-specific error message. */\n errorMessage?: string | null;\n /** Token data for stored payment method. */\n credentialsOnFile?: CredentialsOnFile;\n /** Details of actual customer's card, obtained from a Funding PAN as opposed to a Device PAN. */\n cardDetails?: CardDetails;\n}\n\nexport interface CredentialsOnFile extends CredentialsOnFileInfoOneOf {\n /** Network token data. */\n cardReference?: CardReference;\n /** Provider generated token data. */\n paymentMethodReference?: PaymentMethodReference;\n}\n\n/** @oneof */\nexport interface CredentialsOnFileInfoOneOf {\n /** Network token data. */\n cardReference?: CardReference;\n /** Provider generated token data. */\n paymentMethodReference?: PaymentMethodReference;\n}\n\nexport interface CardReference {\n /** Network token. */\n networkTransactionId?: string;\n /** Directory Server transaction ID */\n dsTransactionId?: string | null;\n}\n\nexport interface PaymentMethodReference {\n /** Payment method token created by the PSP. */\n token?: string;\n}\n\nexport interface CardDetails {\n /**\n * Issuer (business) identification number. First 6 or 8 digits of the card's number.\n * @minLength 6\n * @maxLength 8\n */\n bin?: string | null;\n /**\n * Last 4 digits of the card's number.\n * @minLength 4\n * @maxLength 4\n */\n lastFour?: string | null;\n}\n\nexport interface CaptureEvent {\n /**\n * Wix transaction ID.\n * @format GUID\n */\n wixTransactionId?: string;\n /** Wix [reason code](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/reason-codes) indicating request's status. */\n reasonCode?: number;\n /**\n * Total amount captured in a currency’s minor units.\n * Learn more about [currencies](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/currencies).\n */\n amount?: string;\n /**\n * PSP-specific error code.\n * @maxLength 50\n */\n errorCode?: string | null;\n /**\n * PSP-specific error message.\n * @maxLength 300\n */\n errorMessage?: string | null;\n}\n\nexport interface VoidEvent {\n /**\n * Wix transaction ID.\n * @format GUID\n */\n wixTransactionId?: string;\n /** Wix [reason code](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/reason-codes) indicating request's status. */\n reasonCode?: number;\n /**\n * Total amount voided in a currency’s minor units.\n * Learn more about [currencies](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/currencies).\n */\n amount?: string;\n /**\n * PSP-specific error code.\n * @maxLength 50\n */\n errorCode?: string | null;\n /**\n * PSP-specific error message.\n * @maxLength 300\n */\n errorMessage?: string | null;\n}\n\n/** Submit event request */\nexport interface SubmitEventRequest {\n /** Event data. */\n event: ProviderPlatformEvent;\n}\n\n/** Submit event response */\nexport interface SubmitEventResponse {}\n\n/**\n * This Wix API is used by a Payment Service Provider (PSP) to send webhooks about payment and refund states to Wix.\n *\n * Calls to this endpoint must include a `User-Agent` header with the name of the PSP and the integration version in this format: `{PSP}/{version}`.\n * PSP's create their own version numbers.\n *\n * > You cannot try out this endpoint because an `Authorization` header value has to be obtained\n * > with the OAuth 2.0 client credentials flow for a specific scope.\n * > So please ignore the **Authorization** section below as well as the **Try It Out** button.\n * @param event - Event data.\n * @public\n * @requiredField event\n * @permissionId CASHIER.GET_ACCESS\n * @returns Submit event response\n * @fqn wix.payments.v1.provider_platform_events.ProviderPlatformEventsService.SubmitEvent\n */\nexport async function submitEvent(event: ProviderPlatformEvent): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ event: event });\n\n const reqOpts =\n ambassadorWixPaymentsPspV1ProviderPlatformEvent.submitEvent(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { event: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['event']\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 resolveWixPaymentsV1ProviderPlatformEventsProviderPlatformEventsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'cashier-services._base_domain_': [\n {\n srcPath: '',\n destPath: '',\n },\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'difm._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'invoices._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'apps._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'ecom._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'www.cartscheckout.com': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'cartscheckout.com': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'cartscheckout._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/payment-services-web',\n destPath: '',\n },\n ],\n 'progallery._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '',\n },\n ],\n 'progallerycdn._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '',\n },\n ],\n 'scheduler._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'events._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/payment-services-web',\n destPath: '',\n },\n ],\n 'bookings.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'cashier._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'ecom.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'cashier.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '',\n destPath: '',\n },\n ],\n 'vod-server._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'vod.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'www.wixhotels.com': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/.well-known/apple-developer-merchantid-domain-association',\n destPath: '/domain-verification/apple-pay',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/.well-known/apple-developer-merchantid-domain-association',\n destPath: '/domain-verification/apple-pay',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/.well-known/apple-developer-merchantid-domain-association',\n destPath: '/domain-verification/apple-pay',\n },\n ],\n 'test-applepay.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/payments',\n destPath: '/api/merchant',\n },\n {\n srcPath: '/payments/v1/provider-platform-events',\n destPath: '/payments/v1/provider-platform-events',\n },\n {\n srcPath: '/api/plugin/v1/transactions',\n destPath: '/api/plugin/v1/transactions',\n },\n {\n srcPath: '/payments/api/merchant',\n destPath: '/api/merchant',\n },\n ],\n 'us-applepay.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'eu-applepay.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'payments-sb.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/ambassador/payment-services-web',\n destPath: '',\n },\n {\n srcPath: '/.well-known/apple-developer-merchantid-domain-association',\n destPath: '/domain-verification/apple-pay',\n },\n ],\n _: [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/.well-known/apple-developer-merchantid-domain-association',\n destPath: '/domain-verification/apple-pay',\n },\n {\n srcPath: '/payments/psp/v1/provider-platform-events',\n destPath: '/payments/v1/provider-platform-events',\n },\n ],\n 'events.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'tpa.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/payment-services-web',\n destPath: '',\n },\n ],\n 'pricing-plans.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'editor-flow.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'premium._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/payment-services-web',\n destPath: '',\n },\n {\n srcPath: '/lib-mbapi/include/modules/gateway/return/paypal.php',\n destPath: '/api/payPal/payments/legacy-ipn-to-ignore',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/.well-known/apple-developer-merchantid-domain-association',\n destPath: '/domain-verification/apple-pay',\n },\n ],\n 'payment-webhooks.wixapps.net': [\n {\n srcPath: '/cashier/accounts/stripe',\n destPath: '/api/merchant/stripe',\n },\n {\n srcPath: '/cashier/transactions/stripe',\n destPath: '/api/stripe',\n },\n ],\n 'cashier-services.wixapis.com': [\n {\n srcPath: '/payments/v1/provider-platform-events',\n destPath: '/payments/v1/provider-platform-events',\n },\n ],\n 'currency-converter.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/payments/psp/v1/provider-platform-events',\n destPath: '/payments/v1/provider-platform-events',\n },\n ],\n 'challenger.wixapps.net': [\n {\n srcPath: '/payment-services-web',\n destPath: '',\n },\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'platform.rise.ai': [\n {\n srcPath: '/payment-services-web',\n destPath: '',\n },\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'manage.base44.com': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/ambassador/payment-services-web',\n destPath: '',\n },\n ],\n 'payments.base44.com': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/ambassador/payment-services-web',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_payments_psp-callbacks';\n\n/**\n * This Wix API is used by a Payment Service Provider (PSP) to send webhooks about payment and refund states to Wix.\n *\n * Calls to this endpoint must include a `User-Agent` header with the name of the PSP and the integration version in this format: `{PSP}/{version}`.\n * PSP's create their own version numbers.\n *\n * > You cannot try out this endpoint because an `Authorization` header value has to be obtained\n * > with the OAuth 2.0 client credentials flow for a specific scope.\n * > So please ignore the **Authorization** section below as well as the **Try It Out** button.\n */\nexport function submitEvent(payload: object): RequestOptionsFactory<any> {\n function __submitEvent({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.psp.v1.provider_platform_event',\n method: 'POST' as any,\n methodFqn:\n 'wix.payments.v1.provider_platform_events.ProviderPlatformEventsService.SubmitEvent',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsV1ProviderPlatformEventsProviderPlatformEventsServiceUrl(\n {\n protoPath: '/payments/v1/provider-platform-events',\n data: payload,\n host,\n }\n ),\n data: payload,\n };\n\n return metadata;\n }\n\n return __submitEvent;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,qBAAAA;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAAsD;;;ACDtD,0BAA2B;AAI3B,SAAS,2EACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,kCAAkC;AAAA,MAChC;AAAA,QACE,SAAS;A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O;AAC/C,iBAAa,YAAY,MAAM;AAAA,EACjC,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAC;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,OAAO,OAAO;AAAA,QAC1C,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,OAAO;AAAA,IACV;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["submitEvent","submitEvent","sdkTransformError"]}
1
+ {"version":3,"sources":["../../index.typings.ts","../../src/payments-psp-v1-provider-platform-event-psp-callbacks.universal.ts","../../src/payments-psp-v1-provider-platform-event-psp-callbacks.http.ts"],"sourcesContent":["export * from './src/payments-psp-v1-provider-platform-event-psp-callbacks.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { renameKeysFromSDKRequestToRESTRequest } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient } from '@wix/sdk-types';\nimport * as ambassadorWixPaymentsPspV1ProviderPlatformEvent from './payments-psp-v1-provider-platform-event-psp-callbacks.http.js';\n\n/** Provider platform event */\nexport interface ProviderPlatformEvent\n extends ProviderPlatformEventResourceOneOf {\n /** Refund event data. */\n refund?: RefundEvent;\n /** Transaction event data. */\n transaction?: TransactionEvent;\n /** Capture event data. */\n capture?: CaptureEvent;\n /** Void event data. */\n void?: VoidEvent;\n /**\n * This field is deprecated.\n * @deprecated\n */\n pluginId?: string;\n /**\n * Wix site ID.\n * @format GUID\n */\n siteId?: string | null;\n}\n\n/** @oneof */\nexport interface ProviderPlatformEventResourceOneOf {\n /** Refund event data. */\n refund?: RefundEvent;\n /** Transaction event data. */\n transaction?: TransactionEvent;\n /** Capture event data. */\n capture?: CaptureEvent;\n /** Void event data. */\n void?: VoidEvent;\n}\n\nexport interface RefundEvent {\n /** Wix transaction ID. */\n wixTransactionId?: string;\n /** PSP refund ID. */\n pluginRefundId?: string;\n /** Wix [reason code](https://dev.wix.com/api/rest/all-apis/provider-platform/reason-codes#all-apis_provider-platform_reason-codes_refund-declined) indicating a failed request. */\n reasonCode?: number;\n /** Refunded amount. */\n amount?: string;\n /** Wix refund ID. This field is only required when a merchant initiates a refund from the Wix dashboard. */\n wixRefundId?: string | null;\n /** PSP-specific error code. */\n errorCode?: string | null;\n /** PSP-specific error message. */\n errorMessage?: string | null;\n}\n\nexport interface TransactionEvent {\n /** Wix transaction ID. */\n wixTransactionId?: string;\n /** PSP transaction ID. */\n pluginTransactionId?: string;\n /** Wix [reason code](https://dev.wix.com/api/rest/all-apis/provider-platform/reason-codes) indicating a failed or pending request. */\n reasonCode?: number;\n /** PSP-specific error code. */\n errorCode?: string | null;\n /** PSP-specific error message. */\n errorMessage?: string | null;\n /** Token data for stored payment method. */\n credentialsOnFile?: CredentialsOnFile;\n /** Details of actual customer's card, obtained from a Funding PAN as opposed to a Device PAN. */\n cardDetails?: CardDetails;\n}\n\nexport interface CredentialsOnFile extends CredentialsOnFileInfoOneOf {\n /** Network token data. */\n cardReference?: CardReference;\n /** Provider generated token data. */\n paymentMethodReference?: PaymentMethodReference;\n}\n\n/** @oneof */\nexport interface CredentialsOnFileInfoOneOf {\n /** Network token data. */\n cardReference?: CardReference;\n /** Provider generated token data. */\n paymentMethodReference?: PaymentMethodReference;\n}\n\nexport interface CardReference {\n /** Network token. */\n networkTransactionId?: string;\n /** Directory Server transaction ID */\n dsTransactionId?: string | null;\n /**\n * Transaction Link Identifier assigned by Mastercard.\n * @minLength 1\n * @maxLength 22\n */\n transactionLinkId?: string | null;\n}\n\nexport interface PaymentMethodReference {\n /** Payment method token created by the PSP. */\n token?: string;\n}\n\nexport interface CardDetails {\n /**\n * Issuer (business) identification number. First 6 or 8 digits of the card's number.\n * @minLength 6\n * @maxLength 8\n */\n bin?: string | null;\n /**\n * Last 4 digits of the card's number.\n * @minLength 4\n * @maxLength 4\n */\n lastFour?: string | null;\n}\n\nexport interface CaptureEvent {\n /**\n * Wix transaction ID.\n * @format GUID\n */\n wixTransactionId?: string;\n /** Wix [reason code](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/reason-codes) indicating request's status. */\n reasonCode?: number;\n /**\n * Total amount captured in a currency’s minor units.\n * Learn more about [currencies](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/currencies).\n */\n amount?: string;\n /**\n * PSP-specific error code.\n * @maxLength 50\n */\n errorCode?: string | null;\n /**\n * PSP-specific error message.\n * @maxLength 300\n */\n errorMessage?: string | null;\n}\n\nexport interface VoidEvent {\n /**\n * Wix transaction ID.\n * @format GUID\n */\n wixTransactionId?: string;\n /** Wix [reason code](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/reason-codes) indicating request's status. */\n reasonCode?: number;\n /**\n * Total amount voided in a currency’s minor units.\n * Learn more about [currencies](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/currencies).\n */\n amount?: string;\n /**\n * PSP-specific error code.\n * @maxLength 50\n */\n errorCode?: string | null;\n /**\n * PSP-specific error message.\n * @maxLength 300\n */\n errorMessage?: string | null;\n}\n\n/** Submit event request */\nexport interface SubmitEventRequest {\n /** Event data. */\n event: ProviderPlatformEvent;\n}\n\n/** Submit event response */\nexport interface SubmitEventResponse {}\n\n/**\n * This Wix API is used by a Payment Service Provider (PSP) to send webhooks about payment and refund states to Wix.\n *\n * Calls to this endpoint must include a `User-Agent` header with the name of the PSP and the integration version in this format: `{PSP}/{version}`.\n * PSP's create their own version numbers.\n *\n * > You cannot try out this endpoint because an `Authorization` header value has to be obtained\n * > with the OAuth 2.0 client credentials flow for a specific scope.\n * > So please ignore the **Authorization** section below as well as the **Try It Out** button.\n * @param event - Event data.\n * @public\n * @requiredField event\n * @permissionId CASHIER.GET_ACCESS\n * @returns Submit event response\n * @fqn wix.payments.v1.provider_platform_events.ProviderPlatformEventsService.SubmitEvent\n */\nexport async function submitEvent(event: ProviderPlatformEvent): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ event: event });\n\n const reqOpts =\n ambassadorWixPaymentsPspV1ProviderPlatformEvent.submitEvent(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { event: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['event']\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 resolveWixPaymentsV1ProviderPlatformEventsProviderPlatformEventsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'cashier-services._base_domain_': [\n {\n srcPath: '',\n destPath: '',\n },\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'difm._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'invoices._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'apps._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'ecom._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'www.cartscheckout.com': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'cartscheckout.com': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'cartscheckout._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/payment-services-web',\n destPath: '',\n },\n ],\n 'progallery._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '',\n },\n ],\n 'progallerycdn._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '',\n },\n ],\n 'scheduler._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'events._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/payment-services-web',\n destPath: '',\n },\n ],\n 'bookings.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'cashier._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'ecom.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'cashier.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '',\n destPath: '',\n },\n ],\n 'vod-server._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'vod.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'www.wixhotels.com': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/.well-known/apple-developer-merchantid-domain-association',\n destPath: '/domain-verification/apple-pay',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/.well-known/apple-developer-merchantid-domain-association',\n destPath: '/domain-verification/apple-pay',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/.well-known/apple-developer-merchantid-domain-association',\n destPath: '/domain-verification/apple-pay',\n },\n ],\n 'test-applepay.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/payments',\n destPath: '/api/merchant',\n },\n {\n srcPath: '/payments/v1/provider-platform-events',\n destPath: '/payments/v1/provider-platform-events',\n },\n {\n srcPath: '/api/plugin/v1/transactions',\n destPath: '/api/plugin/v1/transactions',\n },\n {\n srcPath: '/payments/api/merchant',\n destPath: '/api/merchant',\n },\n ],\n 'us-applepay.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'eu-applepay.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'payments-sb.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/ambassador/payment-services-web',\n destPath: '',\n },\n {\n srcPath: '/.well-known/apple-developer-merchantid-domain-association',\n destPath: '/domain-verification/apple-pay',\n },\n ],\n _: [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/.well-known/apple-developer-merchantid-domain-association',\n destPath: '/domain-verification/apple-pay',\n },\n {\n srcPath: '/payments/psp/v1/provider-platform-events',\n destPath: '/payments/v1/provider-platform-events',\n },\n ],\n 'events.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'tpa.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/payment-services-web',\n destPath: '',\n },\n ],\n 'pricing-plans.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'editor-flow.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'premium._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/payment-services-web',\n destPath: '',\n },\n {\n srcPath: '/lib-mbapi/include/modules/gateway/return/paypal.php',\n destPath: '/api/payPal/payments/legacy-ipn-to-ignore',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/.well-known/apple-developer-merchantid-domain-association',\n destPath: '/domain-verification/apple-pay',\n },\n ],\n 'payment-webhooks.wixapps.net': [\n {\n srcPath: '/cashier/accounts/stripe',\n destPath: '/api/merchant/stripe',\n },\n {\n srcPath: '/cashier/transactions/stripe',\n destPath: '/api/stripe',\n },\n ],\n 'cashier-services.wixapis.com': [\n {\n srcPath: '/payments/v1/provider-platform-events',\n destPath: '/payments/v1/provider-platform-events',\n },\n ],\n 'currency-converter.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/payments/psp/v1/provider-platform-events',\n destPath: '/payments/v1/provider-platform-events',\n },\n ],\n 'challenger.wixapps.net': [\n {\n srcPath: '/payment-services-web',\n destPath: '',\n },\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'platform.rise.ai': [\n {\n srcPath: '/payment-services-web',\n destPath: '',\n },\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'manage.base44.com': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/ambassador/payment-services-web',\n destPath: '',\n },\n ],\n 'payments.base44.com': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/ambassador/payment-services-web',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_payments_psp-callbacks';\n\n/**\n * This Wix API is used by a Payment Service Provider (PSP) to send webhooks about payment and refund states to Wix.\n *\n * Calls to this endpoint must include a `User-Agent` header with the name of the PSP and the integration version in this format: `{PSP}/{version}`.\n * PSP's create their own version numbers.\n *\n * > You cannot try out this endpoint because an `Authorization` header value has to be obtained\n * > with the OAuth 2.0 client credentials flow for a specific scope.\n * > So please ignore the **Authorization** section below as well as the **Try It Out** button.\n */\nexport function submitEvent(payload: object): RequestOptionsFactory<any> {\n function __submitEvent({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.psp.v1.provider_platform_event',\n method: 'POST' as any,\n methodFqn:\n 'wix.payments.v1.provider_platform_events.ProviderPlatformEventsService.SubmitEvent',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsV1ProviderPlatformEventsProviderPlatformEventsServiceUrl(\n {\n protoPath: '/payments/v1/provider-platform-events',\n data: payload,\n host,\n }\n ),\n data: payload,\n };\n\n return metadata;\n }\n\n return __submitEvent;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,qBAAAA;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAAsD;;;ACDtD,0BAA2B;AAI3B,SAAS,2EACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,kCAAkC;AAAA,MAChC;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,0BAA0B;AAAA,MACxB;AAA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C,OAAO;AAAA,IACV;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["submitEvent","submitEvent","sdkTransformError"]}
@@ -82,6 +82,12 @@ interface CardReference {
82
82
  networkTransactionId?: string;
83
83
  /** Directory Server transaction ID */
84
84
  dsTransactionId?: string | null;
85
+ /**
86
+ * Transaction Link Identifier assigned by Mastercard.
87
+ * @minLength 1
88
+ * @maxLength 22
89
+ */
90
+ transactionLinkId?: string | null;
85
91
  }
86
92
  interface PaymentMethodReference {
87
93
  /** Payment method token created by the PSP. */
@@ -40,6 +40,7 @@ declare const SubmitEventRequest: z.ZodObject<{
40
40
  cardReference: z.ZodObject<{
41
41
  networkTransactionId: z.ZodOptional<z.ZodString>;
42
42
  dsTransactionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
43
+ transactionLinkId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
43
44
  }, z.core.$strip>;
44
45
  }, z.core.$strip>, z.ZodObject<{
45
46
  cardReference: z.ZodOptional<z.ZodNever>;
@@ -94,7 +94,10 @@ var SubmitEventRequest = z.object({
94
94
  paymentMethodReference: z.never().optional(),
95
95
  cardReference: z.object({
96
96
  networkTransactionId: z.string().describe("Network token.").optional(),
97
- dsTransactionId: z.string().describe("Directory Server transaction ID").optional().nullable()
97
+ dsTransactionId: z.string().describe("Directory Server transaction ID").optional().nullable(),
98
+ transactionLinkId: z.string().describe(
99
+ "Transaction Link Identifier assigned by Mastercard."
100
+ ).min(1).max(22).optional().nullable()
98
101
  }).describe("Network token data.")
99
102
  }),
100
103
  z.object({
@@ -1 +1 @@
1
- {"version":3,"sources":["../../schemas.ts","../../src/payments-psp-v1-provider-platform-event-psp-callbacks.schemas.ts"],"sourcesContent":["export * from './src/payments-psp-v1-provider-platform-event-psp-callbacks.schemas.js';\n","import * as z from 'zod';\n\nexport const SubmitEventRequest = z.object({\n event: z\n .intersection(\n z.object({\n pluginId: z.string().describe('This field is deprecated.').optional(),\n siteId: z\n .string()\n .describe('Wix site ID.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n }),\n z.xor([\n z.object({\n refund: z.never().optional(),\n transaction: z.never().optional(),\n capture: z.never().optional(),\n void: z.never().optional(),\n }),\n z.object({\n transaction: z.never().optional(),\n capture: z.never().optional(),\n void: z.never().optional(),\n refund: z\n .object({\n wixTransactionId: z\n .string()\n .describe('Wix transaction ID.')\n .optional(),\n pluginRefundId: z.string().describe('PSP refund ID.').optional(),\n reasonCode: z\n .number()\n .int()\n .describe(\n 'Wix [reason code](https://dev.wix.com/api/rest/all-apis/provider-platform/reason-codes#all-apis_provider-platform_reason-codes_refund-declined) indicating a failed request.'\n )\n .optional(),\n amount: z\n .string()\n .regex(/^-?\\d+$/, 'Must be a valid Int64 string')\n .describe('Refunded amount.')\n .optional(),\n wixRefundId: z\n .string()\n .describe(\n 'Wix refund ID. This field is only required when a merchant initiates a refund from the Wix dashboard.'\n )\n .optional()\n .nullable(),\n errorCode: z\n .string()\n .describe('PSP-specific error code.')\n .optional()\n .nullable(),\n errorMessage: z\n .string()\n .describe('PSP-specific error message.')\n .optional()\n .nullable(),\n })\n .describe('Refund event data.'),\n }),\n z.object({\n refund: z.never().optional(),\n capture: z.never().optional(),\n void: z.never().optional(),\n transaction: z\n .object({\n wixTransactionId: z\n .string()\n .describe('Wix transaction ID.')\n .optional(),\n pluginTransactionId: z\n .string()\n .describe('PSP transaction ID.')\n .optional(),\n reasonCode: z\n .number()\n .int()\n .describe(\n 'Wix [reason code](https://dev.wix.com/api/rest/all-apis/provider-platform/reason-codes) indicating a failed or pending request.'\n )\n .optional(),\n errorCode: z\n .string()\n .describe('PSP-specific error code.')\n .optional()\n .nullable(),\n errorMessage: z\n .string()\n .describe('PSP-specific error message.')\n .optional()\n .nullable(),\n credentialsOnFile: z\n .intersection(\n z.object({}),\n z.xor([\n z.object({\n cardReference: z.never().optional(),\n paymentMethodReference: z.never().optional(),\n }),\n z.object({\n paymentMethodReference: z.never().optional(),\n cardReference: z\n .object({\n networkTransactionId: z\n .string()\n .describe('Network token.')\n .optional(),\n dsTransactionId: z\n .string()\n .describe('Directory Server transaction ID')\n .optional()\n .nullable(),\n })\n .describe('Network token data.'),\n }),\n z.object({\n cardReference: z.never().optional(),\n paymentMethodReference: z\n .object({\n token: z\n .string()\n .describe(\n 'Payment method token created by the PSP.'\n )\n .optional(),\n })\n .describe('Provider generated token data.'),\n }),\n ])\n )\n .describe('Token data for stored payment method.')\n .optional(),\n cardDetails: z\n .object({\n bin: z\n .string()\n .describe(\n \"Issuer (business) identification number. First 6 or 8 digits of the card's number.\"\n )\n .min(6)\n .max(8)\n .optional()\n .nullable(),\n lastFour: z\n .string()\n .describe(\"Last 4 digits of the card's number.\")\n .min(4)\n .max(4)\n .optional()\n .nullable(),\n })\n .describe(\n \"Details of actual customer's card, obtained from a Funding PAN as opposed to a Device PAN.\"\n )\n .optional(),\n })\n .describe('Transaction event data.'),\n }),\n z.object({\n refund: z.never().optional(),\n transaction: z.never().optional(),\n void: z.never().optional(),\n capture: z\n .object({\n wixTransactionId: z\n .string()\n .describe('Wix transaction ID.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional(),\n reasonCode: z\n .number()\n .int()\n .describe(\n \"Wix [reason code](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/reason-codes) indicating request's status.\"\n )\n .optional(),\n amount: z\n .string()\n .regex(/^-?\\d+$/, 'Must be a valid Int64 string')\n .describe(\n 'Total amount captured in a currency’s minor units.\\nLearn more about [currencies](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/currencies).'\n )\n .optional(),\n errorCode: z\n .string()\n .describe('PSP-specific error code.')\n .max(50)\n .optional()\n .nullable(),\n errorMessage: z\n .string()\n .describe('PSP-specific error message.')\n .max(300)\n .optional()\n .nullable(),\n })\n .describe('Capture event data.'),\n }),\n z.object({\n refund: z.never().optional(),\n transaction: z.never().optional(),\n capture: z.never().optional(),\n void: z\n .object({\n wixTransactionId: z\n .string()\n .describe('Wix transaction ID.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional(),\n reasonCode: z\n .number()\n .int()\n .describe(\n \"Wix [reason code](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/reason-codes) indicating request's status.\"\n )\n .optional(),\n amount: z\n .string()\n .regex(/^-?\\d+$/, 'Must be a valid Int64 string')\n .describe(\n 'Total amount voided in a currency’s minor units.\\nLearn more about [currencies](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/currencies).'\n )\n .optional(),\n errorCode: z\n .string()\n .describe('PSP-specific error code.')\n .max(50)\n .optional()\n .nullable(),\n errorMessage: z\n .string()\n .describe('PSP-specific error message.')\n .max(300)\n .optional()\n .nullable(),\n })\n .describe('Void event data.'),\n }),\n ])\n )\n .describe('Event data.'),\n});\nexport const SubmitEventResponse = z.object({});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,QAAmB;AAEZ,IAAM,qBAAuB,SAAO;AAAA,EACzC,OACG;AAAA,IACG,SAAO;AAAA,MACP,UAAY,SAAO,EAAE,SAAS,2BAA2B,EAAE,SAAS;AAAA,MACpE,QACG,SAAO,EACP,SAAS,cAAc,EACvB;AAAA,QACC;AAAA,QACA;AAAA,MACF,EACC,SAAS,EACT,SAAS;AAAA,IACd,CAAC;AAAA,IACC,MAAI;AAAA,MACF,SAAO;AAA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as.ts","../../src/payments-psp-v1-provider-platform-event-psp-callbacks.schemas.ts"],"sourcesContent":["export * from './src/payments-psp-v1-provider-platform-event-psp-callbacks.schemas.js';\n","import * as z from 'zod';\n\nexport const SubmitEventRequest = z.object({\n event: z\n .intersection(\n z.object({\n pluginId: z.string().describe('This field is deprecated.').optional(),\n siteId: z\n .string()\n .describe('Wix site ID.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n }),\n z.xor([\n z.object({\n refund: z.never().optional(),\n transaction: z.never().optional(),\n capture: z.never().optional(),\n void: z.never().optional(),\n }),\n z.object({\n transaction: z.never().optional(),\n capture: z.never().optional(),\n void: z.never().optional(),\n refund: z\n .object({\n wixTransactionId: z\n .string()\n .describe('Wix transaction ID.')\n .optional(),\n pluginRefundId: z.string().describe('PSP refund ID.').optional(),\n reasonCode: z\n .number()\n .int()\n .describe(\n 'Wix [reason code](https://dev.wix.com/api/rest/all-apis/provider-platform/reason-codes#all-apis_provider-platform_reason-codes_refund-declined) indicating a failed request.'\n )\n .optional(),\n amount: z\n .string()\n .regex(/^-?\\d+$/, 'Must be a valid Int64 string')\n .describe('Refunded amount.')\n .optional(),\n wixRefundId: z\n .string()\n .describe(\n 'Wix refund ID. This field is only required when a merchant initiates a refund from the Wix dashboard.'\n )\n .optional()\n .nullable(),\n errorCode: z\n .string()\n .describe('PSP-specific error code.')\n .optional()\n .nullable(),\n errorMessage: z\n .string()\n .describe('PSP-specific error message.')\n .optional()\n .nullable(),\n })\n .describe('Refund event data.'),\n }),\n z.object({\n refund: z.never().optional(),\n capture: z.never().optional(),\n void: z.never().optional(),\n transaction: z\n .object({\n wixTransactionId: z\n .string()\n .describe('Wix transaction ID.')\n .optional(),\n pluginTransactionId: z\n .string()\n .describe('PSP transaction ID.')\n .optional(),\n reasonCode: z\n .number()\n .int()\n .describe(\n 'Wix [reason code](https://dev.wix.com/api/rest/all-apis/provider-platform/reason-codes) indicating a failed or pending request.'\n )\n .optional(),\n errorCode: z\n .string()\n .describe('PSP-specific error code.')\n .optional()\n .nullable(),\n errorMessage: z\n .string()\n .describe('PSP-specific error message.')\n .optional()\n .nullable(),\n credentialsOnFile: z\n .intersection(\n z.object({}),\n z.xor([\n z.object({\n cardReference: z.never().optional(),\n paymentMethodReference: z.never().optional(),\n }),\n z.object({\n paymentMethodReference: z.never().optional(),\n cardReference: z\n .object({\n networkTransactionId: z\n .string()\n .describe('Network token.')\n .optional(),\n dsTransactionId: z\n .string()\n .describe('Directory Server transaction ID')\n .optional()\n .nullable(),\n transactionLinkId: z\n .string()\n .describe(\n 'Transaction Link Identifier assigned by Mastercard.'\n )\n .min(1)\n .max(22)\n .optional()\n .nullable(),\n })\n .describe('Network token data.'),\n }),\n z.object({\n cardReference: z.never().optional(),\n paymentMethodReference: z\n .object({\n token: z\n .string()\n .describe(\n 'Payment method token created by the PSP.'\n )\n .optional(),\n })\n .describe('Provider generated token data.'),\n }),\n ])\n )\n .describe('Token data for stored payment method.')\n .optional(),\n cardDetails: z\n .object({\n bin: z\n .string()\n .describe(\n \"Issuer (business) identification number. First 6 or 8 digits of the card's number.\"\n )\n .min(6)\n .max(8)\n .optional()\n .nullable(),\n lastFour: z\n .string()\n .describe(\"Last 4 digits of the card's number.\")\n .min(4)\n .max(4)\n .optional()\n .nullable(),\n })\n .describe(\n \"Details of actual customer's card, obtained from a Funding PAN as opposed to a Device PAN.\"\n )\n .optional(),\n })\n .describe('Transaction event data.'),\n }),\n z.object({\n refund: z.never().optional(),\n transaction: z.never().optional(),\n void: z.never().optional(),\n capture: z\n .object({\n wixTransactionId: z\n .string()\n .describe('Wix transaction ID.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional(),\n reasonCode: z\n .number()\n .int()\n .describe(\n \"Wix [reason code](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/reason-codes) indicating request's status.\"\n )\n .optional(),\n amount: z\n .string()\n .regex(/^-?\\d+$/, 'Must be a valid Int64 string')\n .describe(\n 'Total amount captured in a currency’s minor units.\\nLearn more about [currencies](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/currencies).'\n )\n .optional(),\n errorCode: z\n .string()\n .describe('PSP-specific error code.')\n .max(50)\n .optional()\n .nullable(),\n errorMessage: z\n .string()\n .describe('PSP-specific error message.')\n .max(300)\n .optional()\n .nullable(),\n })\n .describe('Capture event data.'),\n }),\n z.object({\n refund: z.never().optional(),\n transaction: z.never().optional(),\n capture: z.never().optional(),\n void: z\n .object({\n wixTransactionId: z\n .string()\n .describe('Wix transaction ID.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional(),\n reasonCode: z\n .number()\n .int()\n .describe(\n \"Wix [reason code](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/reason-codes) indicating request's status.\"\n )\n .optional(),\n amount: z\n .string()\n .regex(/^-?\\d+$/, 'Must be a valid Int64 string')\n .describe(\n 'Total amount voided in a currency’s minor units.\\nLearn more about [currencies](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/currencies).'\n )\n .optional(),\n errorCode: z\n .string()\n .describe('PSP-specific error code.')\n .max(50)\n .optional()\n .nullable(),\n errorMessage: z\n .string()\n .describe('PSP-specific error message.')\n .max(300)\n .optional()\n .nullable(),\n })\n .describe('Void event data.'),\n }),\n ])\n )\n .describe('Event data.'),\n});\nexport const SubmitEventResponse = z.object({});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AA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G,SAAO,EACP,MAAM,WAAW,8BAA8B,EAC/C;AAAA,YACC;AAAA,UACF,EACC,SAAS;AAAA,UACZ,WACG,SAAO,EACP,SAAS,0BAA0B,EACnC,IAAI,EAAE,EACN,SAAS,EACT,SAAS;AAAA,UACZ,cACG,SAAO,EACP,SAAS,6BAA6B,EACtC,IAAI,GAAG,EACP,SAAS,EACT,SAAS;AAAA,QACd,CAAC,EACA,SAAS,kBAAkB;AAAA,MAChC,CAAC;AAAA,IACH,CAAC;AAAA,EACH,EACC,SAAS,aAAa;AAC3B,CAAC;AACM,IAAM,sBAAwB,SAAO,CAAC,CAAC;","names":[]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/payments-psp-v1-provider-platform-event-psp-callbacks.universal.ts","../../src/payments-psp-v1-provider-platform-event-psp-callbacks.http.ts","../../src/payments-psp-v1-provider-platform-event-psp-callbacks.public.ts","../../src/payments-psp-v1-provider-platform-event-psp-callbacks.context.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { renameKeysFromSDKRequestToRESTRequest } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient } from '@wix/sdk-types';\nimport * as ambassadorWixPaymentsPspV1ProviderPlatformEvent from './payments-psp-v1-provider-platform-event-psp-callbacks.http.js';\n\n/** Provider platform event */\nexport interface ProviderPlatformEvent\n extends ProviderPlatformEventResourceOneOf {\n /** Refund event data. */\n refund?: RefundEvent;\n /** Transaction event data. */\n transaction?: TransactionEvent;\n /** Capture event data. */\n capture?: CaptureEvent;\n /** Void event data. */\n void?: VoidEvent;\n /**\n * This field is deprecated.\n * @deprecated\n */\n pluginId?: string;\n /**\n * Wix site ID.\n * @format GUID\n */\n siteId?: string | null;\n}\n\n/** @oneof */\nexport interface ProviderPlatformEventResourceOneOf {\n /** Refund event data. */\n refund?: RefundEvent;\n /** Transaction event data. */\n transaction?: TransactionEvent;\n /** Capture event data. */\n capture?: CaptureEvent;\n /** Void event data. */\n void?: VoidEvent;\n}\n\nexport interface RefundEvent {\n /** Wix transaction ID. */\n wixTransactionId?: string;\n /** PSP refund ID. */\n pluginRefundId?: string;\n /** Wix [reason code](https://dev.wix.com/api/rest/all-apis/provider-platform/reason-codes#all-apis_provider-platform_reason-codes_refund-declined) indicating a failed request. */\n reasonCode?: number;\n /** Refunded amount. */\n amount?: string;\n /** Wix refund ID. This field is only required when a merchant initiates a refund from the Wix dashboard. */\n wixRefundId?: string | null;\n /** PSP-specific error code. */\n errorCode?: string | null;\n /** PSP-specific error message. */\n errorMessage?: string | null;\n}\n\nexport interface TransactionEvent {\n /** Wix transaction ID. */\n wixTransactionId?: string;\n /** PSP transaction ID. */\n pluginTransactionId?: string;\n /** Wix [reason code](https://dev.wix.com/api/rest/all-apis/provider-platform/reason-codes) indicating a failed or pending request. */\n reasonCode?: number;\n /** PSP-specific error code. */\n errorCode?: string | null;\n /** PSP-specific error message. */\n errorMessage?: string | null;\n /** Token data for stored payment method. */\n credentialsOnFile?: CredentialsOnFile;\n /** Details of actual customer's card, obtained from a Funding PAN as opposed to a Device PAN. */\n cardDetails?: CardDetails;\n}\n\nexport interface CredentialsOnFile extends CredentialsOnFileInfoOneOf {\n /** Network token data. */\n cardReference?: CardReference;\n /** Provider generated token data. */\n paymentMethodReference?: PaymentMethodReference;\n}\n\n/** @oneof */\nexport interface CredentialsOnFileInfoOneOf {\n /** Network token data. */\n cardReference?: CardReference;\n /** Provider generated token data. */\n paymentMethodReference?: PaymentMethodReference;\n}\n\nexport interface CardReference {\n /** Network token. */\n networkTransactionId?: string;\n /** Directory Server transaction ID */\n dsTransactionId?: string | null;\n}\n\nexport interface PaymentMethodReference {\n /** Payment method token created by the PSP. */\n token?: string;\n}\n\nexport interface CardDetails {\n /**\n * Issuer (business) identification number. First 6 or 8 digits of the card's number.\n * @minLength 6\n * @maxLength 8\n */\n bin?: string | null;\n /**\n * Last 4 digits of the card's number.\n * @minLength 4\n * @maxLength 4\n */\n lastFour?: string | null;\n}\n\nexport interface CaptureEvent {\n /**\n * Wix transaction ID.\n * @format GUID\n */\n wixTransactionId?: string;\n /** Wix [reason code](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/reason-codes) indicating request's status. */\n reasonCode?: number;\n /**\n * Total amount captured in a currency’s minor units.\n * Learn more about [currencies](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/currencies).\n */\n amount?: string;\n /**\n * PSP-specific error code.\n * @maxLength 50\n */\n errorCode?: string | null;\n /**\n * PSP-specific error message.\n * @maxLength 300\n */\n errorMessage?: string | null;\n}\n\nexport interface VoidEvent {\n /**\n * Wix transaction ID.\n * @format GUID\n */\n wixTransactionId?: string;\n /** Wix [reason code](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/reason-codes) indicating request's status. */\n reasonCode?: number;\n /**\n * Total amount voided in a currency’s minor units.\n * Learn more about [currencies](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/currencies).\n */\n amount?: string;\n /**\n * PSP-specific error code.\n * @maxLength 50\n */\n errorCode?: string | null;\n /**\n * PSP-specific error message.\n * @maxLength 300\n */\n errorMessage?: string | null;\n}\n\n/** Submit event request */\nexport interface SubmitEventRequest {\n /** Event data. */\n event: ProviderPlatformEvent;\n}\n\n/** Submit event response */\nexport interface SubmitEventResponse {}\n\n/**\n * This Wix API is used by a Payment Service Provider (PSP) to send webhooks about payment and refund states to Wix.\n *\n * Calls to this endpoint must include a `User-Agent` header with the name of the PSP and the integration version in this format: `{PSP}/{version}`.\n * PSP's create their own version numbers.\n *\n * > You cannot try out this endpoint because an `Authorization` header value has to be obtained\n * > with the OAuth 2.0 client credentials flow for a specific scope.\n * > So please ignore the **Authorization** section below as well as the **Try It Out** button.\n * @param event - Event data.\n * @public\n * @requiredField event\n * @permissionId CASHIER.GET_ACCESS\n * @returns Submit event response\n * @fqn wix.payments.v1.provider_platform_events.ProviderPlatformEventsService.SubmitEvent\n */\nexport async function submitEvent(event: ProviderPlatformEvent): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ event: event });\n\n const reqOpts =\n ambassadorWixPaymentsPspV1ProviderPlatformEvent.submitEvent(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { event: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['event']\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 resolveWixPaymentsV1ProviderPlatformEventsProviderPlatformEventsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'cashier-services._base_domain_': [\n {\n srcPath: '',\n destPath: '',\n },\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'difm._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'invoices._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'apps._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'ecom._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'www.cartscheckout.com': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'cartscheckout.com': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'cartscheckout._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/payment-services-web',\n destPath: '',\n },\n ],\n 'progallery._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '',\n },\n ],\n 'progallerycdn._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '',\n },\n ],\n 'scheduler._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'events._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/payment-services-web',\n destPath: '',\n },\n ],\n 'bookings.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'cashier._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'ecom.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'cashier.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '',\n destPath: '',\n },\n ],\n 'vod-server._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'vod.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'www.wixhotels.com': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/.well-known/apple-developer-merchantid-domain-association',\n destPath: '/domain-verification/apple-pay',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/.well-known/apple-developer-merchantid-domain-association',\n destPath: '/domain-verification/apple-pay',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/.well-known/apple-developer-merchantid-domain-association',\n destPath: '/domain-verification/apple-pay',\n },\n ],\n 'test-applepay.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/payments',\n destPath: '/api/merchant',\n },\n {\n srcPath: '/payments/v1/provider-platform-events',\n destPath: '/payments/v1/provider-platform-events',\n },\n {\n srcPath: '/api/plugin/v1/transactions',\n destPath: '/api/plugin/v1/transactions',\n },\n {\n srcPath: '/payments/api/merchant',\n destPath: '/api/merchant',\n },\n ],\n 'us-applepay.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'eu-applepay.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'payments-sb.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/ambassador/payment-services-web',\n destPath: '',\n },\n {\n srcPath: '/.well-known/apple-developer-merchantid-domain-association',\n destPath: '/domain-verification/apple-pay',\n },\n ],\n _: [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/.well-known/apple-developer-merchantid-domain-association',\n destPath: '/domain-verification/apple-pay',\n },\n {\n srcPath: '/payments/psp/v1/provider-platform-events',\n destPath: '/payments/v1/provider-platform-events',\n },\n ],\n 'events.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'tpa.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/payment-services-web',\n destPath: '',\n },\n ],\n 'pricing-plans.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'editor-flow.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'premium._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/payment-services-web',\n destPath: '',\n },\n {\n srcPath: '/lib-mbapi/include/modules/gateway/return/paypal.php',\n destPath: '/api/payPal/payments/legacy-ipn-to-ignore',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/.well-known/apple-developer-merchantid-domain-association',\n destPath: '/domain-verification/apple-pay',\n },\n ],\n 'payment-webhooks.wixapps.net': [\n {\n srcPath: '/cashier/accounts/stripe',\n destPath: '/api/merchant/stripe',\n },\n {\n srcPath: '/cashier/transactions/stripe',\n destPath: '/api/stripe',\n },\n ],\n 'cashier-services.wixapis.com': [\n {\n srcPath: '/payments/v1/provider-platform-events',\n destPath: '/payments/v1/provider-platform-events',\n },\n ],\n 'currency-converter.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/payments/psp/v1/provider-platform-events',\n destPath: '/payments/v1/provider-platform-events',\n },\n ],\n 'challenger.wixapps.net': [\n {\n srcPath: '/payment-services-web',\n destPath: '',\n },\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'platform.rise.ai': [\n {\n srcPath: '/payment-services-web',\n destPath: '',\n },\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'manage.base44.com': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/ambassador/payment-services-web',\n destPath: '',\n },\n ],\n 'payments.base44.com': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/ambassador/payment-services-web',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_payments_psp-callbacks';\n\n/**\n * This Wix API is used by a Payment Service Provider (PSP) to send webhooks about payment and refund states to Wix.\n *\n * Calls to this endpoint must include a `User-Agent` header with the name of the PSP and the integration version in this format: `{PSP}/{version}`.\n * PSP's create their own version numbers.\n *\n * > You cannot try out this endpoint because an `Authorization` header value has to be obtained\n * > with the OAuth 2.0 client credentials flow for a specific scope.\n * > So please ignore the **Authorization** section below as well as the **Try It Out** button.\n */\nexport function submitEvent(payload: object): RequestOptionsFactory<any> {\n function __submitEvent({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.psp.v1.provider_platform_event',\n method: 'POST' as any,\n methodFqn:\n 'wix.payments.v1.provider_platform_events.ProviderPlatformEventsService.SubmitEvent',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsV1ProviderPlatformEventsProviderPlatformEventsServiceUrl(\n {\n protoPath: '/payments/v1/provider-platform-events',\n data: payload,\n host,\n }\n ),\n data: payload,\n };\n\n return metadata;\n }\n\n return __submitEvent;\n}\n","import { HttpClient } from '@wix/sdk-types';\nimport {\n ProviderPlatformEvent,\n submitEvent as universalSubmitEvent,\n} from './payments-psp-v1-provider-platform-event-psp-callbacks.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/payments' };\n\nexport function submitEvent(httpClient: HttpClient): SubmitEventSignature {\n return (event: ProviderPlatformEvent) =>\n universalSubmitEvent(\n event,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface SubmitEventSignature {\n /**\n * This Wix API is used by a Payment Service Provider (PSP) to send webhooks about payment and refund states to Wix.\n *\n * Calls to this endpoint must include a `User-Agent` header with the name of the PSP and the integration version in this format: `{PSP}/{version}`.\n * PSP's create their own version numbers.\n *\n * > You cannot try out this endpoint because an `Authorization` header value has to be obtained\n * > with the OAuth 2.0 client credentials flow for a specific scope.\n * > So please ignore the **Authorization** section below as well as the **Try It Out** button.\n * @param - Event data.\n * @returns Submit event response\n */\n (event: ProviderPlatformEvent): Promise<void>;\n}\n\nexport {\n CaptureEvent,\n CardDetails,\n CardReference,\n CredentialsOnFile,\n CredentialsOnFileInfoOneOf,\n PaymentMethodReference,\n ProviderPlatformEvent,\n ProviderPlatformEventResourceOneOf,\n RefundEvent,\n SubmitEventRequest,\n SubmitEventResponse,\n TransactionEvent,\n VoidEvent,\n} from './payments-psp-v1-provider-platform-event-psp-callbacks.universal.js';\n","import { submitEvent as publicSubmitEvent } from './payments-psp-v1-provider-platform-event-psp-callbacks.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const submitEvent: MaybeContext<\n BuildRESTFunction<typeof publicSubmitEvent> & typeof publicSubmitEvent\n> = /*#__PURE__*/ createRESTModule(publicSubmitEvent);\n\nexport {\n ProviderPlatformEvent,\n ProviderPlatformEventResourceOneOf,\n RefundEvent,\n TransactionEvent,\n CredentialsOnFile,\n CredentialsOnFileInfoOneOf,\n CardReference,\n PaymentMethodReference,\n CardDetails,\n CaptureEvent,\n VoidEvent,\n SubmitEventRequest,\n SubmitEventResponse,\n} from './payments-psp-v1-provider-platform-event-psp-callbacks.universal.js';\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD,SAAS,6CAA6C;;;ACDtD,SAAS,kBAAkB;AAI3B,SAAS,2EACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,kCAAkC;AAAA,MAChC;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,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0BAA0B,EAAE,OAAO,OAAO;AAAA,QAC1C,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,OAAO;AAAA,IACV;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AErNO,SAASC,aAAY,YAA8C;AACxE,SAAO,CAAC,UACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACdA,SAAS,wBAAwB;AAG1B,IAAMC,eAEK,iCAAiBA,YAAiB;","names":["submitEvent","submitEvent","submitEvent"]}
1
+ {"version":3,"sources":["../../src/payments-psp-v1-provider-platform-event-psp-callbacks.universal.ts","../../src/payments-psp-v1-provider-platform-event-psp-callbacks.http.ts","../../src/payments-psp-v1-provider-platform-event-psp-callbacks.public.ts","../../src/payments-psp-v1-provider-platform-event-psp-callbacks.context.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { renameKeysFromSDKRequestToRESTRequest } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient } from '@wix/sdk-types';\nimport * as ambassadorWixPaymentsPspV1ProviderPlatformEvent from './payments-psp-v1-provider-platform-event-psp-callbacks.http.js';\n\n/** Provider platform event */\nexport interface ProviderPlatformEvent\n extends ProviderPlatformEventResourceOneOf {\n /** Refund event data. */\n refund?: RefundEvent;\n /** Transaction event data. */\n transaction?: TransactionEvent;\n /** Capture event data. */\n capture?: CaptureEvent;\n /** Void event data. */\n void?: VoidEvent;\n /**\n * This field is deprecated.\n * @deprecated\n */\n pluginId?: string;\n /**\n * Wix site ID.\n * @format GUID\n */\n siteId?: string | null;\n}\n\n/** @oneof */\nexport interface ProviderPlatformEventResourceOneOf {\n /** Refund event data. */\n refund?: RefundEvent;\n /** Transaction event data. */\n transaction?: TransactionEvent;\n /** Capture event data. */\n capture?: CaptureEvent;\n /** Void event data. */\n void?: VoidEvent;\n}\n\nexport interface RefundEvent {\n /** Wix transaction ID. */\n wixTransactionId?: string;\n /** PSP refund ID. */\n pluginRefundId?: string;\n /** Wix [reason code](https://dev.wix.com/api/rest/all-apis/provider-platform/reason-codes#all-apis_provider-platform_reason-codes_refund-declined) indicating a failed request. */\n reasonCode?: number;\n /** Refunded amount. */\n amount?: string;\n /** Wix refund ID. This field is only required when a merchant initiates a refund from the Wix dashboard. */\n wixRefundId?: string | null;\n /** PSP-specific error code. */\n errorCode?: string | null;\n /** PSP-specific error message. */\n errorMessage?: string | null;\n}\n\nexport interface TransactionEvent {\n /** Wix transaction ID. */\n wixTransactionId?: string;\n /** PSP transaction ID. */\n pluginTransactionId?: string;\n /** Wix [reason code](https://dev.wix.com/api/rest/all-apis/provider-platform/reason-codes) indicating a failed or pending request. */\n reasonCode?: number;\n /** PSP-specific error code. */\n errorCode?: string | null;\n /** PSP-specific error message. */\n errorMessage?: string | null;\n /** Token data for stored payment method. */\n credentialsOnFile?: CredentialsOnFile;\n /** Details of actual customer's card, obtained from a Funding PAN as opposed to a Device PAN. */\n cardDetails?: CardDetails;\n}\n\nexport interface CredentialsOnFile extends CredentialsOnFileInfoOneOf {\n /** Network token data. */\n cardReference?: CardReference;\n /** Provider generated token data. */\n paymentMethodReference?: PaymentMethodReference;\n}\n\n/** @oneof */\nexport interface CredentialsOnFileInfoOneOf {\n /** Network token data. */\n cardReference?: CardReference;\n /** Provider generated token data. */\n paymentMethodReference?: PaymentMethodReference;\n}\n\nexport interface CardReference {\n /** Network token. */\n networkTransactionId?: string;\n /** Directory Server transaction ID */\n dsTransactionId?: string | null;\n /**\n * Transaction Link Identifier assigned by Mastercard.\n * @minLength 1\n * @maxLength 22\n */\n transactionLinkId?: string | null;\n}\n\nexport interface PaymentMethodReference {\n /** Payment method token created by the PSP. */\n token?: string;\n}\n\nexport interface CardDetails {\n /**\n * Issuer (business) identification number. First 6 or 8 digits of the card's number.\n * @minLength 6\n * @maxLength 8\n */\n bin?: string | null;\n /**\n * Last 4 digits of the card's number.\n * @minLength 4\n * @maxLength 4\n */\n lastFour?: string | null;\n}\n\nexport interface CaptureEvent {\n /**\n * Wix transaction ID.\n * @format GUID\n */\n wixTransactionId?: string;\n /** Wix [reason code](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/reason-codes) indicating request's status. */\n reasonCode?: number;\n /**\n * Total amount captured in a currency’s minor units.\n * Learn more about [currencies](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/currencies).\n */\n amount?: string;\n /**\n * PSP-specific error code.\n * @maxLength 50\n */\n errorCode?: string | null;\n /**\n * PSP-specific error message.\n * @maxLength 300\n */\n errorMessage?: string | null;\n}\n\nexport interface VoidEvent {\n /**\n * Wix transaction ID.\n * @format GUID\n */\n wixTransactionId?: string;\n /** Wix [reason code](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/reason-codes) indicating request's status. */\n reasonCode?: number;\n /**\n * Total amount voided in a currency’s minor units.\n * Learn more about [currencies](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/currencies).\n */\n amount?: string;\n /**\n * PSP-specific error code.\n * @maxLength 50\n */\n errorCode?: string | null;\n /**\n * PSP-specific error message.\n * @maxLength 300\n */\n errorMessage?: string | null;\n}\n\n/** Submit event request */\nexport interface SubmitEventRequest {\n /** Event data. */\n event: ProviderPlatformEvent;\n}\n\n/** Submit event response */\nexport interface SubmitEventResponse {}\n\n/**\n * This Wix API is used by a Payment Service Provider (PSP) to send webhooks about payment and refund states to Wix.\n *\n * Calls to this endpoint must include a `User-Agent` header with the name of the PSP and the integration version in this format: `{PSP}/{version}`.\n * PSP's create their own version numbers.\n *\n * > You cannot try out this endpoint because an `Authorization` header value has to be obtained\n * > with the OAuth 2.0 client credentials flow for a specific scope.\n * > So please ignore the **Authorization** section below as well as the **Try It Out** button.\n * @param event - Event data.\n * @public\n * @requiredField event\n * @permissionId CASHIER.GET_ACCESS\n * @returns Submit event response\n * @fqn wix.payments.v1.provider_platform_events.ProviderPlatformEventsService.SubmitEvent\n */\nexport async function submitEvent(event: ProviderPlatformEvent): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ event: event });\n\n const reqOpts =\n ambassadorWixPaymentsPspV1ProviderPlatformEvent.submitEvent(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { event: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['event']\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 resolveWixPaymentsV1ProviderPlatformEventsProviderPlatformEventsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'cashier-services._base_domain_': [\n {\n srcPath: '',\n destPath: '',\n },\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'difm._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'invoices._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'apps._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'ecom._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'www.cartscheckout.com': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'cartscheckout.com': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'cartscheckout._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/payment-services-web',\n destPath: '',\n },\n ],\n 'progallery._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '',\n },\n ],\n 'progallerycdn._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '',\n },\n ],\n 'scheduler._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'events._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/payment-services-web',\n destPath: '',\n },\n ],\n 'bookings.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'cashier._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'ecom.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'cashier.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '',\n destPath: '',\n },\n ],\n 'vod-server._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'vod.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'www.wixhotels.com': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/.well-known/apple-developer-merchantid-domain-association',\n destPath: '/domain-verification/apple-pay',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/.well-known/apple-developer-merchantid-domain-association',\n destPath: '/domain-verification/apple-pay',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/.well-known/apple-developer-merchantid-domain-association',\n destPath: '/domain-verification/apple-pay',\n },\n ],\n 'test-applepay.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/payments',\n destPath: '/api/merchant',\n },\n {\n srcPath: '/payments/v1/provider-platform-events',\n destPath: '/payments/v1/provider-platform-events',\n },\n {\n srcPath: '/api/plugin/v1/transactions',\n destPath: '/api/plugin/v1/transactions',\n },\n {\n srcPath: '/payments/api/merchant',\n destPath: '/api/merchant',\n },\n ],\n 'us-applepay.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'eu-applepay.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'payments-sb.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/ambassador/payment-services-web',\n destPath: '',\n },\n {\n srcPath: '/.well-known/apple-developer-merchantid-domain-association',\n destPath: '/domain-verification/apple-pay',\n },\n ],\n _: [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/.well-known/apple-developer-merchantid-domain-association',\n destPath: '/domain-verification/apple-pay',\n },\n {\n srcPath: '/payments/psp/v1/provider-platform-events',\n destPath: '/payments/v1/provider-platform-events',\n },\n ],\n 'events.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'tpa.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/payment-services-web',\n destPath: '',\n },\n ],\n 'pricing-plans.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'editor-flow.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'premium._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/payment-services-web',\n destPath: '',\n },\n {\n srcPath: '/lib-mbapi/include/modules/gateway/return/paypal.php',\n destPath: '/api/payPal/payments/legacy-ipn-to-ignore',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/.well-known/apple-developer-merchantid-domain-association',\n destPath: '/domain-verification/apple-pay',\n },\n ],\n 'payment-webhooks.wixapps.net': [\n {\n srcPath: '/cashier/accounts/stripe',\n destPath: '/api/merchant/stripe',\n },\n {\n srcPath: '/cashier/transactions/stripe',\n destPath: '/api/stripe',\n },\n ],\n 'cashier-services.wixapis.com': [\n {\n srcPath: '/payments/v1/provider-platform-events',\n destPath: '/payments/v1/provider-platform-events',\n },\n ],\n 'currency-converter.wixapps.net': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/payments/psp/v1/provider-platform-events',\n destPath: '/payments/v1/provider-platform-events',\n },\n ],\n 'challenger.wixapps.net': [\n {\n srcPath: '/payment-services-web',\n destPath: '',\n },\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'platform.rise.ai': [\n {\n srcPath: '/payment-services-web',\n destPath: '',\n },\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n ],\n 'manage.base44.com': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/ambassador/payment-services-web',\n destPath: '',\n },\n ],\n 'payments.base44.com': [\n {\n srcPath: '/_api/payment-services-web',\n destPath: '/api',\n },\n {\n srcPath: '/ambassador/payment-services-web',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_payments_psp-callbacks';\n\n/**\n * This Wix API is used by a Payment Service Provider (PSP) to send webhooks about payment and refund states to Wix.\n *\n * Calls to this endpoint must include a `User-Agent` header with the name of the PSP and the integration version in this format: `{PSP}/{version}`.\n * PSP's create their own version numbers.\n *\n * > You cannot try out this endpoint because an `Authorization` header value has to be obtained\n * > with the OAuth 2.0 client credentials flow for a specific scope.\n * > So please ignore the **Authorization** section below as well as the **Try It Out** button.\n */\nexport function submitEvent(payload: object): RequestOptionsFactory<any> {\n function __submitEvent({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.psp.v1.provider_platform_event',\n method: 'POST' as any,\n methodFqn:\n 'wix.payments.v1.provider_platform_events.ProviderPlatformEventsService.SubmitEvent',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsV1ProviderPlatformEventsProviderPlatformEventsServiceUrl(\n {\n protoPath: '/payments/v1/provider-platform-events',\n data: payload,\n host,\n }\n ),\n data: payload,\n };\n\n return metadata;\n }\n\n return __submitEvent;\n}\n","import { HttpClient } from '@wix/sdk-types';\nimport {\n ProviderPlatformEvent,\n submitEvent as universalSubmitEvent,\n} from './payments-psp-v1-provider-platform-event-psp-callbacks.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/payments' };\n\nexport function submitEvent(httpClient: HttpClient): SubmitEventSignature {\n return (event: ProviderPlatformEvent) =>\n universalSubmitEvent(\n event,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface SubmitEventSignature {\n /**\n * This Wix API is used by a Payment Service Provider (PSP) to send webhooks about payment and refund states to Wix.\n *\n * Calls to this endpoint must include a `User-Agent` header with the name of the PSP and the integration version in this format: `{PSP}/{version}`.\n * PSP's create their own version numbers.\n *\n * > You cannot try out this endpoint because an `Authorization` header value has to be obtained\n * > with the OAuth 2.0 client credentials flow for a specific scope.\n * > So please ignore the **Authorization** section below as well as the **Try It Out** button.\n * @param - Event data.\n * @returns Submit event response\n */\n (event: ProviderPlatformEvent): Promise<void>;\n}\n\nexport {\n CaptureEvent,\n CardDetails,\n CardReference,\n CredentialsOnFile,\n CredentialsOnFileInfoOneOf,\n PaymentMethodReference,\n ProviderPlatformEvent,\n ProviderPlatformEventResourceOneOf,\n RefundEvent,\n SubmitEventRequest,\n SubmitEventResponse,\n TransactionEvent,\n VoidEvent,\n} from './payments-psp-v1-provider-platform-event-psp-callbacks.universal.js';\n","import { submitEvent as publicSubmitEvent } from './payments-psp-v1-provider-platform-event-psp-callbacks.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const submitEvent: MaybeContext<\n BuildRESTFunction<typeof publicSubmitEvent> & typeof publicSubmitEvent\n> = /*#__PURE__*/ createRESTModule(publicSubmitEvent);\n\nexport {\n ProviderPlatformEvent,\n ProviderPlatformEventResourceOneOf,\n RefundEvent,\n TransactionEvent,\n CredentialsOnFile,\n CredentialsOnFileInfoOneOf,\n CardReference,\n PaymentMethodReference,\n CardDetails,\n CaptureEvent,\n VoidEvent,\n SubmitEventRequest,\n SubmitEventResponse,\n} from './payments-psp-v1-provider-platform-event-psp-callbacks.universal.js';\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD,SAAS,6CAA6C;;;ACDtD,SAAS,kBAAkB;AAI3B,SAAS,2EACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,kCAAkC;AAAA,MAChC;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;A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AAC;AAAA,QACzB,0BAA0B,EAAE,OAAO,OAAO;AAAA,QAC1C,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,OAAO;AAAA,IACV;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AE3NO,SAASC,aAAY,YAA8C;AACxE,SAAO,CAAC,UACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACdA,SAAS,wBAAwB;AAG1B,IAAMC,eAEK,iCAAiBA,YAAiB;","names":["submitEvent","submitEvent","submitEvent"]}
@@ -80,6 +80,12 @@ interface CardReference {
80
80
  networkTransactionId?: string;
81
81
  /** Directory Server transaction ID */
82
82
  dsTransactionId?: string | null;
83
+ /**
84
+ * Transaction Link Identifier assigned by Mastercard.
85
+ * @minLength 1
86
+ * @maxLength 22
87
+ */
88
+ transactionLinkId?: string | null;
83
89
  }
84
90
  interface PaymentMethodReference {
85
91
  /** Payment method token created by the PSP. */