@wix/auto_sdk_payments_payments 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/build/cjs/index.d.ts +2 -2
  2. package/build/cjs/index.js.map +1 -1
  3. package/build/cjs/index.typings.d.ts +3 -2
  4. package/build/cjs/index.typings.js.map +1 -1
  5. package/build/cjs/meta.d.ts +1 -1
  6. package/build/cjs/{payments-platform-v1-payment-payments.universal-DeCl2FPc.d.ts → payments-platform-v1-payment-payments.universal-CRtsFbYB.d.ts} +5 -0
  7. package/build/es/index.d.mts +2 -2
  8. package/build/es/index.mjs.map +1 -1
  9. package/build/es/index.typings.d.mts +3 -2
  10. package/build/es/index.typings.mjs.map +1 -1
  11. package/build/es/meta.d.mts +1 -1
  12. package/build/es/{payments-platform-v1-payment-payments.universal-DeCl2FPc.d.mts → payments-platform-v1-payment-payments.universal-CRtsFbYB.d.mts} +5 -0
  13. package/build/internal/cjs/index.d.ts +2 -2
  14. package/build/internal/cjs/index.typings.d.ts +3 -2
  15. package/build/internal/cjs/meta.d.ts +1 -1
  16. package/build/internal/cjs/{payments-platform-v1-payment-payments.universal-C5s3nmb-.d.ts → payments-platform-v1-payment-payments.universal-Cl1PZdpD.d.ts} +5 -0
  17. package/build/internal/es/index.d.mts +2 -2
  18. package/build/internal/es/index.typings.d.mts +3 -2
  19. package/build/internal/es/meta.d.mts +1 -1
  20. package/build/internal/es/{payments-platform-v1-payment-payments.universal-C5s3nmb-.d.mts → payments-platform-v1-payment-payments.universal-Cl1PZdpD.d.mts} +5 -0
  21. package/package.json +5 -12
  22. package/build/cjs/schemas.d.ts +0 -500
  23. package/build/cjs/schemas.js +0 -810
  24. package/build/cjs/schemas.js.map +0 -1
  25. package/build/es/schemas.d.mts +0 -500
  26. package/build/es/schemas.mjs +0 -770
  27. package/build/es/schemas.mjs.map +0 -1
  28. package/build/internal/cjs/index.js +0 -523
  29. package/build/internal/cjs/index.js.map +0 -1
  30. package/build/internal/cjs/index.typings.js +0 -401
  31. package/build/internal/cjs/index.typings.js.map +0 -1
  32. package/build/internal/cjs/meta.js +0 -359
  33. package/build/internal/cjs/meta.js.map +0 -1
  34. package/build/internal/cjs/schemas.d.ts +0 -500
  35. package/build/internal/cjs/schemas.js +0 -810
  36. package/build/internal/cjs/schemas.js.map +0 -1
  37. package/build/internal/es/index.mjs +0 -480
  38. package/build/internal/es/index.mjs.map +0 -1
  39. package/build/internal/es/index.typings.mjs +0 -360
  40. package/build/internal/es/index.typings.mjs.map +0 -1
  41. package/build/internal/es/meta.mjs +0 -316
  42. package/build/internal/es/meta.mjs.map +0 -1
  43. package/build/internal/es/schemas.d.mts +0 -500
  44. package/build/internal/es/schemas.mjs +0 -770
  45. package/build/internal/es/schemas.mjs.map +0 -1
  46. package/schemas/package.json +0 -3
@@ -1,6 +1,6 @@
1
1
  import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
2
- import { P as Payment, a as PaymentSearch, S as SearchPaymentsResponse, b as PaymentCreatedEnvelope, c as PaymentUpdatedEnvelope } from './payments-platform-v1-payment-payments.universal-DeCl2FPc.js';
3
- export { t as Account, a1 as AccountInfo, av as AccountInfoMetadata, Z as ActionEvent, o as Address, r as AddressLocation, p as AddressStreetOneOf, ac as AggregationData, ar as AggregationResults, as as AggregationResultsResultOneOf, ao as AggregationResultsScalarResult, A as AggregationType, aM as AggregationTypeWithLiterals, w as AmountBreakdown, at as BaseEventMetadata, B as Buyer, s as Card, C as Charge, aN as CommonSearchWithEntityContext, x as ContactInfo, a9 as CursorPaging, aa as CursorPagingMetadata, a5 as CursorSearch, a6 as CursorSearchPagingMethodOneOf, ab as Cursors, al as DateHistogramResult, ap as DateHistogramResults, H as Dispute, I as DisputeAction, i as DisputeActionType, aG as DisputeActionTypeWithLiterals, h as DisputeChannel, aF as DisputeChannelWithLiterals, e as DisputeReason, aC as DisputeReasonWithLiterals, D as DisputeStage, aB as DisputeStageWithLiterals, f as DisputeStatus, aD as DisputeStatusWithLiterals, L as DomainEvent, Q as DomainEventBodyOneOf, T as EntityCreatedEvent, Y as EntityDeletedEvent, X as EntityUpdatedEvent, au as EventMetadata, z as FlowDetails, F as FullAddressContactDetails, a2 as GetPaymentRequest, a3 as GetPaymentResponse, $ as IdentificationData, a0 as IdentificationDataIdOneOf, _ as MessageEnvelope, M as Mode, aK as ModeWithLiterals, ai as NestedResultValue, aj as NestedResultValueResultOneOf, aq as NestedResults, N as NotificationOfFraud, O as OrderLineItem, y as PaymentMethod, aw as PaymentSearchSpec, u as ProviderStatusReason, ae as RangeAggregationResult, ag as RangeResult, an as RangeResults, j as Reason, aH as ReasonWithLiterals, E as Refund, R as RefundStatus, aA as RefundStatusWithLiterals, U as RestoreInfo, ak as Results, ah as ScalarResult, l as ScalarType, aL as ScalarTypeWithLiterals, a8 as SearchDetails, a4 as SearchPaymentsRequest, g as SellerProtection, aE as SellerProtectionWithLiterals, m as Shipping, k as SortOrder, aJ as SortOrderWithLiterals, a7 as Sorting, d as Status, v as StatusDetails, G as StatusInfo, az as StatusWithLiterals, q as StreetAddress, J as SyncPaymentRequest, K as SyncPaymentResponse, ad as ValueAggregationResult, af as ValueResult, am as ValueResults, n as VatId, V as VatType, ay as VatTypeWithLiterals, W as WebhookIdentityType, aI as WebhookIdentityTypeWithLiterals, ax as utils } from './payments-platform-v1-payment-payments.universal-DeCl2FPc.js';
2
+ import { P as Payment, a as PaymentSearch, S as SearchPaymentsResponse, b as PaymentCreatedEnvelope, c as PaymentUpdatedEnvelope } from './payments-platform-v1-payment-payments.universal-CRtsFbYB.js';
3
+ export { t as Account, a1 as AccountInfo, av as AccountInfoMetadata, Z as ActionEvent, o as Address, r as AddressLocation, p as AddressStreetOneOf, ac as AggregationData, ar as AggregationResults, as as AggregationResultsResultOneOf, ao as AggregationResultsScalarResult, A as AggregationType, aM as AggregationTypeWithLiterals, w as AmountBreakdown, at as BaseEventMetadata, B as Buyer, s as Card, C as Charge, aN as CommonSearchWithEntityContext, x as ContactInfo, a9 as CursorPaging, aa as CursorPagingMetadata, a5 as CursorSearch, a6 as CursorSearchPagingMethodOneOf, ab as Cursors, al as DateHistogramResult, ap as DateHistogramResults, H as Dispute, I as DisputeAction, i as DisputeActionType, aG as DisputeActionTypeWithLiterals, h as DisputeChannel, aF as DisputeChannelWithLiterals, e as DisputeReason, aC as DisputeReasonWithLiterals, D as DisputeStage, aB as DisputeStageWithLiterals, f as DisputeStatus, aD as DisputeStatusWithLiterals, L as DomainEvent, Q as DomainEventBodyOneOf, T as EntityCreatedEvent, Y as EntityDeletedEvent, X as EntityUpdatedEvent, au as EventMetadata, z as FlowDetails, F as FullAddressContactDetails, a2 as GetPaymentRequest, a3 as GetPaymentResponse, $ as IdentificationData, a0 as IdentificationDataIdOneOf, _ as MessageEnvelope, M as Mode, aK as ModeWithLiterals, ai as NestedResultValue, aj as NestedResultValueResultOneOf, aq as NestedResults, N as NotificationOfFraud, O as OrderLineItem, y as PaymentMethod, aw as PaymentSearchSpec, u as ProviderStatusReason, ae as RangeAggregationResult, ag as RangeResult, an as RangeResults, j as Reason, aH as ReasonWithLiterals, E as Refund, R as RefundStatus, aA as RefundStatusWithLiterals, U as RestoreInfo, ak as Results, ah as ScalarResult, l as ScalarType, aL as ScalarTypeWithLiterals, a8 as SearchDetails, a4 as SearchPaymentsRequest, g as SellerProtection, aE as SellerProtectionWithLiterals, m as Shipping, k as SortOrder, aJ as SortOrderWithLiterals, a7 as Sorting, d as Status, v as StatusDetails, G as StatusInfo, az as StatusWithLiterals, q as StreetAddress, J as SyncPaymentRequest, K as SyncPaymentResponse, ad as ValueAggregationResult, af as ValueResult, am as ValueResults, n as VatId, V as VatType, ay as VatTypeWithLiterals, W as WebhookIdentityType, aI as WebhookIdentityTypeWithLiterals, ax as utils } from './payments-platform-v1-payment-payments.universal-CRtsFbYB.js';
4
4
 
5
5
  declare function getPayment$1(httpClient: HttpClient): GetPaymentSignature;
6
6
  interface GetPaymentSignature {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts","../../src/payments-platform-v1-payment-payments.public.ts","../../src/payments-platform-v1-payment-payments.universal.ts","../../src/payments-platform-v1-payment-payments.http.ts","../../src/payments-platform-v1-payment-payments.context.ts"],"sourcesContent":["export * from './src/payments-platform-v1-payment-payments.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTAddressToSDKAddress } from '@wix/sdk-runtime/transformations/address';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n Payment,\n PaymentCreatedEnvelope,\n PaymentSearch,\n PaymentUpdatedEnvelope,\n SearchPaymentsResponse,\n getPayment as universalGetPayment,\n searchPayments as universalSearchPayments,\n} from './payments-platform-v1-payment-payments.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/payments' };\n\nexport function getPayment(httpClient: HttpClient): GetPaymentSignature {\n return (paymentId: string) =>\n universalGetPayment(\n paymentId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetPaymentSignature {\n /**\n * Retrieves a payment by ID.\n *\n * The payment ID is identical to the source charge ID, so the same value can\n * be used to look up the underlying charge.\n * @param - Payment ID. This is the source charge ID.\n * @returns Retrieved payment.\n */\n (paymentId: string): Promise<\n NonNullablePaths<\n Payment,\n | `charge.status`\n | `charge.statusDetails.providerStatusReasons`\n | `charge.orderLineItems`\n | `charge.billingInfo.contactDetails.vatId._id`\n | `charge.billingInfo.contactDetails.vatId.type`\n | `charge.billingInfo.address.streetAddress.number`\n | `charge.billingInfo.address.streetAddress.name`\n | `refunds`\n | `refunds.${number}.status`\n | `refunds.${number}.statusInfo.code`\n | `disputes`\n | `disputes.${number}._id`\n | `disputes.${number}.stage`\n | `disputes.${number}.reason`\n | `disputes.${number}.status`\n | `disputes.${number}.sellerProtection`\n | `disputes.${number}.channel`\n | `disputes.${number}.providerDisputeId`\n | `notificationOfFraud.reason`,\n 6\n >\n >;\n}\n\nexport function searchPayments(\n httpClient: HttpClient\n): SearchPaymentsSignature {\n return (search: PaymentSearch) =>\n universalSearchPayments(\n search,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface SearchPaymentsSignature {\n /**\n * Retrieves payments matching the provided full-text search, structured\n * filters, or correlated nested matching.\n *\n * Use Search Payments to find payments by buyer name, buyer or shipping\n * email, or order item name, or to require multiple conditions to match the\n * same refund or dispute item rather than the payment as a whole.\n *\n * Payments are updated asynchronously. After a charge, refund, dispute, or\n * notification of fraud changes, the payment reflects the change within a\n * few seconds.\n *\n * For supported full-text, filter, and sort fields, see\n * @param - Search options.\n *\n * For supported full-text, filter, and sort fields, see\n * @returns Response containing a page of payments that match the search and the\n * pagination metadata for the current page.\n */\n (search: PaymentSearch): Promise<\n NonNullablePaths<\n SearchPaymentsResponse,\n | `payments`\n | `payments.${number}.charge.status`\n | `payments.${number}.notificationOfFraud.reason`,\n 5\n >\n >;\n}\n\nexport const onPaymentCreated = /*#__PURE__*/ EventDefinition(\n 'wix.payments.platform.v1.payment_created',\n true,\n (event: PaymentCreatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'entity.updatedDate' },\n { path: 'entity.charge.createdDate' },\n { path: 'entity.charge.updatedDate' },\n { path: 'entity.refunds.createdDate' },\n { path: 'entity.refunds.updatedDate' },\n { path: 'entity.disputes.dueDate' },\n { path: 'entity.disputes.defendedDate' },\n { path: 'entity.disputes.acceptedDate' },\n { path: 'entity.disputes.createdDate' },\n { path: 'entity.disputes.updatedDate' },\n { path: 'entity.disputes.actions.dueDate' },\n { path: 'entity.notificationOfFraud.createdDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'entity.charge.billingInfo.address' },\n { path: 'entity.charge.shippingInfo.address' },\n ],\n },\n ])\n )\n)<PaymentCreatedEnvelope>();\nexport const onPaymentUpdated = /*#__PURE__*/ EventDefinition(\n 'wix.payments.platform.v1.payment_updated',\n true,\n (event: PaymentUpdatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'entity.updatedDate' },\n { path: 'entity.charge.createdDate' },\n { path: 'entity.charge.updatedDate' },\n { path: 'entity.refunds.createdDate' },\n { path: 'entity.refunds.updatedDate' },\n { path: 'entity.disputes.dueDate' },\n { path: 'entity.disputes.defendedDate' },\n { path: 'entity.disputes.acceptedDate' },\n { path: 'entity.disputes.createdDate' },\n { path: 'entity.disputes.updatedDate' },\n { path: 'entity.disputes.actions.dueDate' },\n { path: 'entity.notificationOfFraud.createdDate' },\n { path: 'metadata.eventTime' },\n { path: 'modifiedFields.createdDate' },\n { path: 'modifiedFields.updatedDate' },\n { path: 'modifiedFields.charge.createdDate' },\n { path: 'modifiedFields.charge.updatedDate' },\n { path: 'modifiedFields.refunds.createdDate' },\n { path: 'modifiedFields.refunds.updatedDate' },\n { path: 'modifiedFields.disputes.dueDate' },\n { path: 'modifiedFields.disputes.defendedDate' },\n { path: 'modifiedFields.disputes.acceptedDate' },\n { path: 'modifiedFields.disputes.createdDate' },\n { path: 'modifiedFields.disputes.updatedDate' },\n { path: 'modifiedFields.disputes.actions.dueDate' },\n { path: 'modifiedFields.notificationOfFraud.createdDate' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'entity.charge.billingInfo.address' },\n { path: 'entity.charge.shippingInfo.address' },\n { path: 'modifiedFields.charge.billingInfo.address' },\n { path: 'modifiedFields.charge.shippingInfo.address' },\n ],\n },\n ])\n )\n)<PaymentUpdatedEnvelope>();\n\nexport {\n Account,\n AccountInfo,\n AccountInfoMetadata,\n ActionEvent,\n Address,\n AddressLocation,\n AddressStreetOneOf,\n AggregationData,\n AggregationResults,\n AggregationResultsResultOneOf,\n AggregationResultsScalarResult,\n AggregationType,\n AmountBreakdown,\n BaseEventMetadata,\n Buyer,\n Card,\n Charge,\n ContactInfo,\n CursorPaging,\n CursorPagingMetadata,\n CursorSearch,\n CursorSearchPagingMethodOneOf,\n Cursors,\n DateHistogramResult,\n DateHistogramResults,\n Dispute,\n DisputeAction,\n DisputeActionType,\n DisputeChannel,\n DisputeReason,\n DisputeStage,\n DisputeStatus,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n FlowDetails,\n FullAddressContactDetails,\n GetPaymentRequest,\n GetPaymentResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n MessageEnvelope,\n Mode,\n NestedResultValue,\n NestedResultValueResultOneOf,\n NestedResults,\n NotificationOfFraud,\n OrderLineItem,\n Payment,\n PaymentCreatedEnvelope,\n PaymentMethod,\n PaymentSearchSpec,\n PaymentUpdatedEnvelope,\n ProviderStatusReason,\n RangeAggregationResult,\n RangeResult,\n RangeResults,\n Reason,\n Refund,\n RefundStatus,\n RestoreInfo,\n Results,\n ScalarResult,\n ScalarType,\n SearchDetails,\n SearchPaymentsRequest,\n SearchPaymentsResponse,\n SellerProtection,\n Shipping,\n SortOrder,\n Sorting,\n Status,\n StatusDetails,\n StatusInfo,\n StreetAddress,\n SyncPaymentRequest,\n SyncPaymentResponse,\n ValueAggregationResult,\n ValueResult,\n ValueResults,\n VatId,\n VatType,\n WebhookIdentityType,\n utils,\n} from './payments-platform-v1-payment-payments.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport {\n HttpClient,\n Search as SearchSdkType,\n NonNullablePaths,\n SearchSpec,\n} from '@wix/sdk-types';\nimport * as ambassadorWixPaymentsPlatformV1Payment from './payments-platform-v1-payment-payments.http.js';\nimport { transformRESTAddressToSDKAddress } from '@wix/sdk-runtime/transformations/address';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { createSearchUtils } from '@wix/sdk-runtime/search-builder-utils';\n\n/**\n * A payment is a read-only aggregate view of a charge. Each payment\n * combines a single charge with all of its related refunds, disputes, and\n * notification of fraud into one entity, sharing its ID with the source charge.\n */\nexport interface Payment {\n /**\n * Payment ID. Identical to the charge ID.\n * @format GUID\n * @immutable\n * @readonly\n */\n _id?: string | null;\n /**\n * Date and time the payment was created.\n * @immutable\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the payment was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * ID of the Wix app that initiated the checkout.\n * @minLength 1\n * @maxLength 255\n * @readonly\n */\n appId?: string | null;\n /**\n * Whether a refund can currently be created for the payment, based on the\n * charge state, payment method, and provider configuration. A `true` value\n * can still result in a failed refund attempt due to permissions, account\n * balance, or provider restrictions enforced at refund creation time.\n * @readonly\n */\n refundable?: boolean | null;\n /**\n * Charge details for the payment, including amount, currency, status,\n * payment method, and buyer information.\n * @readonly\n */\n charge?: Charge;\n /**\n * List of refunds associated with the payment, ordered by creation date in descending order.\n * For the complete refund history, use the [Refunds API](https://dev.wix.com/docs/api-reference/business-management/payments/refunds/introduction).\n * @maxSize 50\n * @readonly\n */\n refunds?: Refund[];\n /**\n * List of disputes associated with the payment, ordered by creation date in descending order.\n * For the complete dispute history, use the [Disputes API](https://dev.wix.com/docs/api-reference/business-management/payments/disputes/introduction).\n * @maxSize 20\n * @readonly\n */\n disputes?: Dispute[];\n /**\n * Notification of fraud associated with this payment, if any.\n *\n * A charge has at most one notification of fraud.\n * @readonly\n */\n notificationOfFraud?: NotificationOfFraud;\n}\n\n/**\n * A charge is a record of an attempt to move money from a buyer to a merchant.\n * Read more about charges in this [article](<https://dev.wix.com/docs/api-reference/business-management/payments/charges/introduction>).\n */\nexport interface Charge {\n /**\n * Charge ID.\n * @format GUID\n * @immutable\n * @readonly\n */\n _id?: string | null;\n /**\n * Date and time the charge was created.\n * @immutable\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the charge was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * ID of the merchant's provider account connection.\n * @format GUID\n * @immutable\n * @readonly\n */\n accountConnectionId?: string | null;\n /**\n * ID of the PaymentIntent that initiated the charge.\n * @format GUID\n * @immutable\n * @readonly\n */\n paymentIntentId?: string | null;\n /**\n * Status of the charge.\n * See the [Charges API](https://dev.wix.com/docs/api-reference/business-management/payments/charges/introduction) for more information.\n * @readonly\n */\n status?: StatusWithLiterals;\n /**\n * Additional details about the current charge status.\n * @readonly\n */\n statusDetails?: StatusDetails;\n /**\n * Total charge amount in the currency's main units.\n * For example, `12.95` for $12.95 USD.\n * @decimalValue options { gte:0, maxScale:8 }\n * @readonly\n */\n amount?: string | null;\n /**\n * Currency of the charge.\n * @format CURRENCY\n * @immutable\n * @readonly\n */\n currencyCode?: string | null;\n /**\n * Platform fee amount in the currency's main units.\n * For example, `1.50` for a $1.50 platform fee.\n * Used in scenarios where the platform charges a fee for processing the transaction.\n * @decimalValue options { gt:0, maxScale:8 }\n * @readonly\n */\n applicationFee?: string | null;\n /**\n * Items being purchased in this charge.\n * Each line item represents a product or service with quantity, pricing, and tax information.\n * @maxSize 100\n * @readonly\n */\n orderLineItems?: OrderLineItem[];\n /**\n * Detailed breakdown of amounts that contribute to the total charge amount.\n * Includes shipping costs, taxes, and discounts applied to the order.\n * @readonly\n */\n amountBreakdown?: AmountBreakdown;\n /**\n * Text that appears on the customer's payment statement for this charge.\n * Helps customers identify the transaction.\n * @maxLength 20\n * @readonly\n */\n statementDescriptor?: string | null;\n /**\n * Customer's billing address and contact information.\n * Used for payment processing, fraud prevention, and compliance requirements.\n * @readonly\n */\n billingInfo?: ContactInfo;\n /**\n * Customer's shipping address and contact information.\n * Used for order fulfillment and risk assessment.\n * @readonly\n */\n shippingInfo?: ContactInfo;\n /**\n * Enriched payment method information from the payment provider.\n * Includes processed details like card brand, last 4 digits, account information and other information that may vary based on payment method used.\n * @readonly\n */\n paymentMethod?: PaymentMethod;\n /**\n * Configuration for the payment processing flow.\n * @readonly\n */\n flowDetails?: FlowDetails;\n /**\n * Information about the customer making the payment.\n * Links to contact records, site membership, and user accounts for personalization and compliance.\n * @readonly\n */\n buyer?: Buyer;\n /**\n * ID of the payment provider that processed this charge.\n * @minLength 1\n * @maxLength 100\n * @readonly\n */\n providerId?: string | null;\n /**\n * Charge ID as it appears in the payment provider's system.\n * @minLength 1\n * @maxLength 100\n * @readonly\n */\n providerChargeId?: string | null;\n /**\n * Order identifier from the external system that initiated this charge.\n * Passed through to the payment provider for reporting and allowing correlation between payment and order.\n * @minLength 1\n * @maxLength 1000\n * @readonly\n */\n externalOrderId?: string | null;\n}\n\n/** Shipping amount breakdown details. */\nexport interface Shipping {\n /**\n * Shipping cost amount.\n * @decimalValue options { gt:0, maxScale:8 }\n */\n amount?: string | null;\n /**\n * Shipping discount amount.\n * @decimalValue options { gt:0, maxScale:8 }\n */\n discount?: string | null;\n}\n\n/** Full contact details for an address */\nexport interface FullAddressContactDetails {\n /** Contact's first name. */\n firstName?: string | null;\n /** Contact's last name. */\n lastName?: string | null;\n /**\n * Contact's full name.\n * @internal\n */\n fullName?: string | null;\n /**\n * Contact's phone number.\n * @format PHONE\n */\n phone?: string | null;\n /** Contact's company name. */\n company?: string | null;\n /**\n * Email associated with the address.\n * @format EMAIL\n */\n email?: string | null;\n /** Tax info. Currently usable only in Brazil. */\n vatId?: VatId;\n}\n\nexport interface VatId {\n /** Customer's tax ID. */\n _id?: string;\n /**\n * Tax type.\n *\n * Supported values:\n * + `CPF`: for individual tax payers\n * + `CNPJ`: for corporations\n */\n type?: VatTypeWithLiterals;\n}\n\n/** tax info types */\nexport enum VatType {\n UNSPECIFIED = 'UNSPECIFIED',\n /** CPF - for individual tax payers. */\n CPF = 'CPF',\n /** CNPJ - for corporations */\n CNPJ = 'CNPJ',\n}\n\n/** @enumType */\nexport type VatTypeWithLiterals = VatType | 'UNSPECIFIED' | 'CPF' | 'CNPJ';\n\n/** Physical address */\nexport interface Address extends AddressStreetOneOf {\n /** Street name and number. */\n streetAddress?: StreetAddress;\n /** Main address line, usually street and number as free text. */\n addressLine1?: string | null;\n /**\n * Country code.\n * @format COUNTRY\n */\n country?: string | null;\n /** Subdivision shorthand. Usually, a short code (2 or 3 letters) that represents a state, region, prefecture, or province. e.g. NY */\n subdivision?: string | null;\n /** City name. */\n city?: string | null;\n /** Zip/postal code. */\n postalCode?: string | null;\n /** Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */\n addressLine2?: string | null;\n /**\n * A string containing the full address of this location.\n * @internal\n */\n formatted?: string | null;\n /**\n * Free text to help find the address.\n * @internal\n */\n hint?: string | null;\n /**\n * Coordinates of the physical address.\n * @internal\n */\n location?: AddressLocation;\n /**\n * Country full name.\n * @internal\n */\n countryFullname?: string | null;\n /**\n * Subdivision full name.\n * @internal\n */\n subdivisionFullname?: string | null;\n}\n\n/** @oneof */\nexport interface AddressStreetOneOf {\n /** Street name and number. */\n streetAddress?: StreetAddress;\n /** Main address line, usually street and number as free text. */\n addressLine?: string | null;\n}\n\nexport interface StreetAddress {\n /** Street number. */\n number?: string;\n /** Street name. */\n name?: string;\n /**\n * Apartment number.\n * @internal\n */\n apt?: string;\n /**\n * Optional address line 1\n * @internal\n */\n formattedAddressLine?: string | null;\n}\n\nexport interface AddressLocation {\n /** Address latitude. */\n latitude?: number | null;\n /** Address longitude. */\n longitude?: number | null;\n}\n\n/** Information about a card payment method. */\nexport interface Card {\n /**\n * Last 4 digits of the card number.\n * @minLength 4\n * @maxLength 4\n */\n lastFourDigits?: string | null;\n /**\n * Bank Identification Number - the first 4-8 digits of the card number.\n * @minLength 4\n * @maxLength 8\n */\n bin?: string | null;\n /**\n * Month when the card expires (1-12).\n * @min 1\n * @max 12\n */\n expirationMonth?: number | null;\n /**\n * Full year when the card expires.\n * @min 2000\n * @max 2099\n */\n expirationYear?: number | null;\n /**\n * Full name of the cardholder as printed on the card.\n * @minLength 1\n * @maxLength 1000\n */\n cardholderName?: string | null;\n}\n\n/** Account information for digital wallet or bank account payments. */\nexport interface Account {\n /**\n * Email address associated with the payment account.\n * @format EMAIL\n */\n email?: string | null;\n /**\n * Name of the bank that issued the payment method.\n * @maxLength 1024\n */\n issuingBank?: string | null;\n}\n\n/** Provider-specific status reason information. */\nexport interface ProviderStatusReason {\n /**\n * Type of reason code from the provider.\n * For example, `issuer_decline_code`, `card_error`, or `request_error`.\n * @minLength 1\n * @maxLength 100\n */\n type?: string | null;\n /**\n * Provider-specific reason code.\n * @minLength 1\n * @maxLength 100\n */\n code?: string | null;\n /**\n * Human-readable description of the provider reason.\n * @minLength 1\n * @maxLength 1000\n */\n description?: string | null;\n}\n\n/** Status of a charge in its processing lifecycle. */\nexport enum Status {\n /** Charge has been created and is waiting for processing to begin. */\n INITIATED = 'INITIATED',\n /**\n * Charge requires additional action from the buyer to proceed.\n * Check the [Charges API](https://dev.wix.com/docs/api-reference/business-management/payments/charges/introduction) for specific instructions.\n */\n ACTION_REQUIRED = 'ACTION_REQUIRED',\n /** Payment processing is in progress, awaiting confirmation from the provider, issuer, or merchant. */\n PENDING = 'PENDING',\n /**\n * Funds have been authorized but not yet captured.\n * Use the [Charges API](https://dev.wix.com/docs/api-reference/business-management/payments/charges/introduction) to capture or void the charge.\n */\n AUTHORIZED = 'AUTHORIZED',\n /**\n * Funds have been successfully captured from the buyer's payment method.\n * This is the final successful state for most charges.\n */\n CAPTURED = 'CAPTURED',\n /**\n * Authorization was canceled before funds were captured.\n * No money was transferred and the authorization hold is released.\n */\n VOIDED = 'VOIDED',\n /**\n * Charge failed due to payment processing issues.\n * Check `statusDetails` for details about the failure reason.\n */\n FAILED = 'FAILED',\n}\n\n/** @enumType */\nexport type StatusWithLiterals =\n | Status\n | 'INITIATED'\n | 'ACTION_REQUIRED'\n | 'PENDING'\n | 'AUTHORIZED'\n | 'CAPTURED'\n | 'VOIDED'\n | 'FAILED';\n\n/** Detailed information about the charge status. */\nexport interface StatusDetails {\n /**\n * Standardized 4-character reason code indicating why the charge is in its current status.\n * See [reason codes](https://dev.wix.com/docs/api-reference/business-management/payments/payment-service-provider-service-plugin/reason-codes) for more information.\n * @minLength 4\n * @maxLength 4\n */\n code?: string | null;\n /**\n * Human-readable description of the status code.\n * @minLength 1\n * @maxLength 1000\n */\n description?: string | null;\n /**\n * Status of the charge as reported by the payment provider.\n * @minLength 1\n * @maxLength 100\n */\n providerStatus?: string | null;\n /**\n * Detailed status information from the payment provider.\n * Contains provider-specific reason codes and descriptions.\n * @maxSize 10\n */\n providerStatusReasons?: ProviderStatusReason[];\n}\n\n/** An individual item in the order being charged. */\nexport interface OrderLineItem {\n /**\n * Stock Keeping Unit identifier for the item.\n * @minLength 1\n * @maxLength 255\n */\n sku?: string | null;\n /**\n * Display name of the item.\n * @minLength 1\n * @maxLength 200\n */\n name?: string | null;\n /**\n * Number of units of this item being purchased.\n * @min 1\n */\n quantity?: number | null;\n /**\n * Price per unit before taxes and discounts are applied.\n * @decimalValue options { gte:0, maxScale:8 }\n */\n unitPrice?: string | null;\n /**\n * Detailed description of the item.\n * @minLength 1\n * @maxLength 1024\n */\n description?: string | null;\n /** Whether the item is a physical product that requires shipping. */\n tangible?: boolean | null;\n /**\n * Total discount amount applied to this line item for the specified quantity.\n * @decimalValue options { gt:0, maxScale:8 }\n */\n discount?: string | null;\n /**\n * Total tax amount for this line item for the specified quantity.\n * @decimalValue options { gt:0, maxScale:8 }\n */\n tax?: string | null;\n}\n\n/** Breakdown of additional amounts that contribute to the total order amount. */\nexport interface AmountBreakdown {\n /**\n * Total amount of all items before taxes and discounts.\n * Equals the sum of unitPrice * quantity amounts from all order line items.\n * @decimalValue options { gte:0, maxScale:8 }\n */\n itemsTotal?: string | null;\n /**\n * Total tax amount for the entire order.\n * Equals the sum of tax amounts from all order line items when individual item taxes are specified.\n * @decimalValue options { gte:0, maxScale:8 }\n */\n taxTotal?: string | null;\n /**\n * Total discount amount for the entire order.\n * Equals the sum of all item discounts when individual item discounts are specified.\n * @decimalValue options { gte:0, maxScale:8 }\n */\n discountTotal?: string | null;\n /** Shipping breakdown details. */\n shipping?: Shipping;\n}\n\n/** Contact and address information for billing or shipping. */\nexport interface ContactInfo {\n /** Contact details including name, email, and phone number. */\n contactDetails?: FullAddressContactDetails;\n /** Physical address information. */\n address?: Address;\n}\n\n/** Processed payment method information from the payment provider. */\nexport interface PaymentMethod {\n /**\n * ID of the payment method type.\n * @format GUID\n */\n paymentMethodTypeId?: string | null;\n /**\n * ID of the specific payment method brand used (e.g., Visa, Mastercard in case of card payment or Venmo for PayPal payments).\n * @format GUID\n */\n paymentBrandId?: string | null;\n /** Information about the card used for payment. */\n card?: Card;\n /** Information about the account used for payment. */\n account?: Account;\n}\n\n/** Configuration and details about the payment processing flow. */\nexport interface FlowDetails {\n /** Whether this is a Mail Order/Telephone Order (MOTO) transaction. */\n moto?: boolean | null;\n /**\n * Number of installments for this payment.\n * @min 1\n */\n installmentCount?: number | null;\n}\n\n/** Information about the customer making the payment. */\nexport interface Buyer {\n /**\n * ID of the buyer's contact record in the contacts system.\n * @format GUID\n */\n contactId?: string | null;\n /**\n * ID of the buyer's site membership if they are a registered member.\n * @format GUID\n */\n memberId?: string | null;\n /**\n * Buyer's preferred language in IETF BCP 47 format.\n * For example, `en-US` for U.S. English.\n * @format LANGUAGE_TAG\n */\n languageCode?: string | null;\n}\n\n/** The refund object. A refund object is the record of an attempt to return charged funds. */\nexport interface Refund {\n /**\n * Refund ID.\n * @readonly\n * @immutable\n * @format GUID\n */\n _id?: string | null;\n /**\n * Date and time the refund was created.\n * @readonly\n * @immutable\n */\n _createdDate?: Date | null;\n /**\n * Date and time the refund was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Amount being returned to the buyer in the refund currency's main units (such as dollars or euros).\n * For example, `\"12.95\"`.\n * @immutable\n * @decimalValue options { gt:0, maxScale:8 }\n */\n amount?: string | null;\n /**\n * Whether the refund is for the entire amount of the charge.\n * @readonly\n * @immutable\n */\n full?: boolean | null;\n /**\n * Status of the refund.\n *\n * Learn more about the [refund lifecycle](https://dev.wix.com/docs/api-reference/business-management/payments/refunds/refund-lifecycle).\n * @readonly\n */\n status?: RefundStatusWithLiterals;\n /**\n * Payment service provider's ID for the refund.\n * @readonly\n * @immutable\n * @minLength 1\n * @maxLength 100\n */\n providerRefundId?: string | null;\n /**\n * Reason this refund was issued.\n * @minLength 1\n * @maxLength 1000\n */\n reason?: string | null;\n /**\n * Details about the refund status.\n * Used to provide additional information about why a refund was given its status.\n * @readonly\n */\n statusInfo?: StatusInfo;\n /**\n * Unique number assigned to a refund. This number is shared across all parties involved in processing the refund. It allows the merchant to track the refund with their bank.\n * @readonly\n * @immutable\n * @minLength 1\n * @maxLength 30\n */\n acquirerReferenceNumber?: string | null;\n /**\n * Note providing additional information about this refund.\n * @immutable\n * @minLength 1\n * @maxLength 200\n */\n note?: string | null;\n}\n\nexport enum RefundStatus {\n /** Refund is in progress. */\n PENDING = 'PENDING',\n /** Refund succeeded. */\n SUCCEEDED = 'SUCCEEDED',\n /** Refund failed. */\n FAILED = 'FAILED',\n /** Refund had succeeded, but has since been reversed. */\n REVERSED = 'REVERSED',\n}\n\n/** @enumType */\nexport type RefundStatusWithLiterals =\n | RefundStatus\n | 'PENDING'\n | 'SUCCEEDED'\n | 'FAILED'\n | 'REVERSED';\n\nexport interface StatusInfo {\n /**\n * Reason code with detailed information about the refund status.\n * See the full list of [reason codes](https://dev.wix.com/docs/api-reference/business-management/payments/payment-service-provider-service-plugin/reason-codes#refund-declined).\n * @minLength 1\n * @maxLength 10\n */\n code?: string;\n /**\n * Description of the status.\n * @minLength 1\n * @maxLength 1000\n */\n description?: string | null;\n}\n\n/** A dispute is a customer-initiated challenge of a payment through their payment service provider (PSP) or bank. */\nexport interface Dispute {\n /**\n * Dispute ID.\n * @format GUID\n * @immutable\n */\n _id?: string;\n /**\n * Stage of the dispute process.\n * @readonly\n */\n stage?: DisputeStageWithLiterals;\n /**\n * Reason why the customer initiated the dispute.\n * @readonly\n */\n reason?: DisputeReasonWithLiterals;\n /**\n * Disputed amount in the currency's main units. For example, `\"12.95\"` for $12.95.\n * @immutable\n * @decimalValue options { gt:0, maxScale:8 }\n */\n amount?: string | null;\n /**\n * Current status of the dispute. This indicates what action is required and who needs to take it.\n * @readonly\n */\n status?: DisputeStatusWithLiterals;\n /**\n * Level of seller protection coverage for this dispute.\n *\n * Seller protection is set by the payment provider. For example, PayPal offers a [seller protection program](https://www.paypal.com/ua/legalhub/paypal/seller-protection).\n * @readonly\n */\n sellerProtection?: SellerProtectionWithLiterals;\n /**\n * Channel through which the dispute is being processed.\n * @readonly\n */\n channel?: DisputeChannelWithLiterals;\n /**\n * The latest date and time until which the dispute can remain in its current status.\n *\n * If this date passes, the dispute will be resolved against the party that is required to take action. For example, if the status is `WAITING_MERCHANT`, and the due date passes, the dispute will be `LOST` and a refund will be processed automatically.\n * @readonly\n */\n dueDate?: Date | null;\n /**\n * Unique identifier assigned by the payment service provider for this dispute.\n * @immutable\n * @minLength 1\n * @maxLength 64\n */\n providerDisputeId?: string;\n /**\n * Network reason code provided by the card network or issuing bank that initiated the dispute.\n * @minLength 1\n * @maxLength 64\n */\n networkReasonCode?: string | null;\n /**\n * Whether the dispute can be defended with evidence.\n * @readonly\n */\n defendable?: boolean | null;\n /**\n * Whether the dispute was automatically defended by the payment processor.\n * @readonly\n */\n autoDefended?: boolean | null;\n /**\n * Date and time at which the dispute was defended.\n * @readonly\n */\n defendedDate?: Date | null;\n /**\n * Date and time at which the dispute was accepted.\n * @readonly\n */\n acceptedDate?: Date | null;\n /**\n * List of actions that can be performed on the dispute.\n * Each action has a specific due date by which it must be completed.\n * Available actions depend on the dispute's current status and stage.\n * @readonly\n * @maxSize 20\n */\n actions?: DisputeAction[];\n /**\n * Date and time the dispute was created.\n * @readonly\n * @immutable\n */\n _createdDate?: Date | null;\n /**\n * Date and time the dispute was updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n}\n\nexport enum DisputeStage {\n /** Formal dispute filed through the card network or issuing bank. */\n CHARGEBACK = 'CHARGEBACK',\n /** Initial inquiry from the customer requesting information about the charge. */\n INQUIRY = 'INQUIRY',\n}\n\n/** @enumType */\nexport type DisputeStageWithLiterals = DisputeStage | 'CHARGEBACK' | 'INQUIRY';\n\nexport enum DisputeReason {\n /** Fraudulent use of a physical card. */\n FRAUD_CARD_PRESENT = 'FRAUD_CARD_PRESENT',\n /** Fraudulent use without the physical card present. */\n FRAUD_CARD_ABSENT = 'FRAUD_CARD_ABSENT',\n /** Duplicate charge processing. */\n DUPLICATE_PROCESSING = 'DUPLICATE_PROCESSING',\n /** Services or goods were not provided as promised. */\n SERVICES_NOT_PROVIDED = 'SERVICES_NOT_PROVIDED',\n /** Recurring payment that should have been canceled. */\n CANCELED_RECURRING = 'CANCELED_RECURRING',\n /** Item received was not as described. */\n NOT_AS_DESCRIBED = 'NOT_AS_DESCRIBED',\n /** Item received was counterfeit. */\n COUNTERFEIT = 'COUNTERFEIT',\n /** Merchant misrepresented the transaction. */\n MISREPRESENTATION = 'MISREPRESENTATION',\n /** Transaction was canceled but still charged. */\n CANCELED = 'CANCELED',\n /** Other dispute reason not covered by specific categories. */\n OTHER = 'OTHER',\n}\n\n/** @enumType */\nexport type DisputeReasonWithLiterals =\n | DisputeReason\n | 'FRAUD_CARD_PRESENT'\n | 'FRAUD_CARD_ABSENT'\n | 'DUPLICATE_PROCESSING'\n | 'SERVICES_NOT_PROVIDED'\n | 'CANCELED_RECURRING'\n | 'NOT_AS_DESCRIBED'\n | 'COUNTERFEIT'\n | 'MISREPRESENTATION'\n | 'CANCELED'\n | 'OTHER';\n\nexport enum DisputeStatus {\n /** Merchant action required to proceed with the dispute. */\n WAITING_MERCHANT = 'WAITING_MERCHANT',\n /** Dispute is being reviewed by the payment service provider or bank. */\n UNDER_REVIEW = 'UNDER_REVIEW',\n /** Customer action required to proceed with the dispute. */\n WAITING_BUYER = 'WAITING_BUYER',\n /** Dispute resolved in favor of the merchant. */\n WON = 'WON',\n /** Dispute resolved in favor of the customer. When a dispute is lost, the refund is processed automatically. */\n LOST = 'LOST',\n}\n\n/** @enumType */\nexport type DisputeStatusWithLiterals =\n | DisputeStatus\n | 'WAITING_MERCHANT'\n | 'UNDER_REVIEW'\n | 'WAITING_BUYER'\n | 'WON'\n | 'LOST';\n\nexport enum SellerProtection {\n /** Transaction is not eligible for seller protection. */\n NOT_ELIGIBLE = 'NOT_ELIGIBLE',\n /** Transaction is eligible for basic seller protection. */\n ELIGIBLE = 'ELIGIBLE',\n /** Transaction is eligible for extended seller protection coverage. */\n EXTENDED = 'EXTENDED',\n}\n\n/** @enumType */\nexport type SellerProtectionWithLiterals =\n | SellerProtection\n | 'NOT_ELIGIBLE'\n | 'ELIGIBLE'\n | 'EXTENDED';\n\nexport enum DisputeChannel {\n /** Dispute is processed by the payment service provider. */\n INTERNAL = 'INTERNAL',\n /** Dispute is processed through the card network or issuing bank. */\n EXTERNAL = 'EXTERNAL',\n}\n\n/** @enumType */\nexport type DisputeChannelWithLiterals =\n | DisputeChannel\n | 'INTERNAL'\n | 'EXTERNAL';\n\nexport interface DisputeAction {\n /** Type of action that can be performed. */\n type?: DisputeActionTypeWithLiterals;\n /** Latest date and time by which this action must be performed. */\n dueDate?: Date | null;\n}\n\nexport enum DisputeActionType {\n /** Dispute can be accepted. */\n ACCEPT = 'ACCEPT',\n /** Dispute can be defended. */\n DEFEND = 'DEFEND',\n}\n\n/** @enumType */\nexport type DisputeActionTypeWithLiterals =\n | DisputeActionType\n | 'ACCEPT'\n | 'DEFEND';\n\n/**\n * A notification of fraud is a pre-dispute fraud alert raised against a charge.\n * Card networks issue these alerts to flag a transaction that a cardholder has\n * reported as fraudulent.\n *\n * A notification of fraud is informational and doesn't move funds. It may\n * precede a chargeback, but doesn't have to. A charge has at most one\n * notification of fraud, and notifications of fraud are immutable once created.\n */\nexport interface NotificationOfFraud {\n /**\n * Standardized fraud reason, mapped from the raw reason reported by the upstream payment provider.\n * @immutable\n */\n reason?: ReasonWithLiterals;\n /**\n * Date and time the notification of fraud was created.\n * @readonly\n * @immutable\n */\n _createdDate?: Date | null;\n}\n\n/** Standardized fraud reason. */\nexport enum Reason {\n /** Cardholder reported that a newly issued card was intercepted before it reached them. */\n CARD_NEVER_RECEIVED = 'CARD_NEVER_RECEIVED',\n /** Card was issued based on a fraudulent application. */\n FRAUDULENT_CARD_APPLICATION = 'FRAUDULENT_CARD_APPLICATION',\n /** Transaction was made with a counterfeit card. */\n MADE_WITH_COUNTERFEIT_CARD = 'MADE_WITH_COUNTERFEIT_CARD',\n /** Transaction was made with a card the cardholder had reported as lost. */\n MADE_WITH_LOST_CARD = 'MADE_WITH_LOST_CARD',\n /** Transaction was made with a card the cardholder had reported as stolen. */\n MADE_WITH_STOLEN_CARD = 'MADE_WITH_STOLEN_CARD',\n /** Catch-all for fraud reasons that don't fit any other category, or that the upstream payment provider reported in a non-standard form. */\n MISCELLANEOUS = 'MISCELLANEOUS',\n /** Cardholder reported that the transaction was made without their authorization. */\n UNAUTHORIZED_USE_OF_CARD = 'UNAUTHORIZED_USE_OF_CARD',\n /** Generic fraud signal that doesn't classify the reason further. Typically used by non-card payment methods. */\n FRAUD = 'FRAUD',\n /** Cardholder's account was taken over by a third party who then made the transaction. */\n ACCOUNT_TAKEOVER_FRAUD = 'ACCOUNT_TAKEOVER_FRAUD',\n /** Card-not-present fraud, typically an online transaction made without the physical card. */\n CARD_NOT_PRESENT_FRAUD = 'CARD_NOT_PRESENT_FRAUD',\n /** The same card information was used for multiple unauthorized imprints. */\n MULTIPLE_IMPRINT_FRAUD = 'MULTIPLE_IMPRINT_FRAUD',\n /** Card was used at a merchant suspected of colluding in a bust-out scheme. */\n BUST_OUT_COLLUSIVE_MERCHANT = 'BUST_OUT_COLLUSIVE_MERCHANT',\n /** The card account number was used fraudulently without the physical card. */\n FRAUDULENT_USE_OF_ACCOUNT_NUMBER = 'FRAUDULENT_USE_OF_ACCOUNT_NUMBER',\n /** Card network flagged the transaction as incorrectly processed in a way that resembles fraud. */\n INCORRECT_PROCESSING = 'INCORRECT_PROCESSING',\n /** Merchant misrepresented goods or services to the cardholder. */\n MERCHANT_MISREPRESENTATION = 'MERCHANT_MISREPRESENTATION',\n /** Acquiring bank reported that the card used in the transaction is counterfeit. */\n ACQUIRER_REPORTED_COUNTERFEIT = 'ACQUIRER_REPORTED_COUNTERFEIT',\n}\n\n/** @enumType */\nexport type ReasonWithLiterals =\n | Reason\n | 'CARD_NEVER_RECEIVED'\n | 'FRAUDULENT_CARD_APPLICATION'\n | 'MADE_WITH_COUNTERFEIT_CARD'\n | 'MADE_WITH_LOST_CARD'\n | 'MADE_WITH_STOLEN_CARD'\n | 'MISCELLANEOUS'\n | 'UNAUTHORIZED_USE_OF_CARD'\n | 'FRAUD'\n | 'ACCOUNT_TAKEOVER_FRAUD'\n | 'CARD_NOT_PRESENT_FRAUD'\n | 'MULTIPLE_IMPRINT_FRAUD'\n | 'BUST_OUT_COLLUSIVE_MERCHANT'\n | 'FRAUDULENT_USE_OF_ACCOUNT_NUMBER'\n | 'INCORRECT_PROCESSING'\n | 'MERCHANT_MISREPRESENTATION'\n | 'ACQUIRER_REPORTED_COUNTERFEIT';\n\n/** Request to synchronize a payment. */\nexport interface SyncPaymentRequest {\n /**\n * Payment ID. This is the source charge ID.\n * @format GUID\n */\n paymentId?: string;\n}\n\n/** Response returned after a payment sync request. */\nexport interface SyncPaymentResponse {\n /** The synchronized payment. */\n payment?: Payment;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\n/** Request to retrieve a payment. */\nexport interface GetPaymentRequest {\n /**\n * Payment ID. This is the source charge ID.\n * @format GUID\n */\n paymentId: string;\n}\n\n/** Response containing the requested payment. */\nexport interface GetPaymentResponse {\n /** Retrieved payment. */\n payment?: Payment;\n}\n\n/** Request to search payments. */\nexport interface SearchPaymentsRequest {\n /**\n * Search options.\n *\n * For supported full-text, filter, and sort fields, see @Supported Filters and Search Fields.\n */\n search?: CursorSearch;\n}\n\nexport interface CursorSearch extends CursorSearchPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Use the cursor from `pagingMetadata.cursors` in the previous\n * response to retrieve another page.\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n /**\n * Filter object.\n *\n * For supported payment filters, see @Supported Filters and Search Fields.\n * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).\n */\n filter?: Record<string, any> | null;\n /**\n * Sort fields.\n *\n * For supported payment sort fields, see @Supported Filters and Search Fields.\n * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).\n * @maxSize 10\n */\n sort?: Sorting[];\n /** Free text to match against searchable payment fields. */\n search?: SearchDetails;\n /**\n * UTC offset or IANA time zone. Valid values are\n * ISO 8601 UTC offsets, such as +02:00 or -06:00,\n * and IANA time zone IDs, such as Europe/Rome.\n *\n * Affects all date filters. You can override this behavior for a specific\n * filter by specifying a timestamp that includes a time zone, such as\n * `\"2023-12-20T10:52:34.795Z\"`.\n * @maxLength 50\n */\n timeZone?: string | null;\n}\n\n/** @oneof */\nexport interface CursorSearchPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Use the cursor from `pagingMetadata.cursors` in the previous\n * response to retrieve another page.\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface SearchDetails {\n /** Defines how separate search terms in `expression` are combined. */\n mode?: ModeWithLiterals;\n /**\n * Search term or expression.\n * @maxLength 100\n */\n expression?: string | null;\n /**\n * Fields to search. If omitted, all searchable fields are searched. Use dot\n * notation to specify a JSON path.\n *\n * For supported payment search fields, see @Supported Filters and Search Fields.\n * @maxLength 200\n * @maxSize 20\n */\n fields?: string[];\n /** Whether to use automatic fuzzy search that allows typos. */\n fuzzy?: boolean;\n}\n\nexport enum Mode {\n /** Any of the search terms must be present. */\n OR = 'OR',\n /** All search terms must be present. */\n AND = 'AND',\n}\n\n/** @enumType */\nexport type ModeWithLiterals = Mode | 'OR' | 'AND';\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results. Defaults to 50 if not provided.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\n/**\n * Response containing a page of payments that match the search and the\n * pagination metadata for the current page.\n */\nexport interface SearchPaymentsResponse {\n /** Payments matching the search. */\n payments?: Payment[];\n /** Cursor paging metadata for the current page. */\n pagingMetadata?: CursorPagingMetadata;\n /**\n * Aggregation results.\n * @internal\n */\n aggregationData?: AggregationData;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in current page. */\n count?: number | null;\n /** Cursor strings that point to the next page, previous page, or both. */\n cursors?: Cursors;\n /**\n * Whether there are more pages to retrieve following the current page.\n *\n * + `true`: Another page of results can be retrieved.\n * + `false`: This is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface AggregationData {\n /**\n * key = aggregation name (as derived from search request).\n * @maxSize 10000\n */\n results?: AggregationResults[];\n}\n\nexport interface ValueAggregationResult {\n /**\n * Value of the field.\n * @maxLength 100\n */\n value?: string;\n /** Count of entities with this value. */\n count?: number;\n}\n\nexport interface RangeAggregationResult {\n /** Inclusive lower bound of the range. */\n from?: number | null;\n /** Exclusive upper bound of the range. */\n to?: number | null;\n /** Count of entities in this range. */\n count?: number;\n}\n\nexport enum ScalarType {\n /** Count of distinct values. */\n COUNT_DISTINCT = 'COUNT_DISTINCT',\n /** Minimum value. */\n MIN = 'MIN',\n /** Maximum value. */\n MAX = 'MAX',\n /**\n * Sum of values.\n * @internal\n */\n SUM = 'SUM',\n /**\n * Average of values.\n * @internal\n */\n AVG = 'AVG',\n}\n\n/** @enumType */\nexport type ScalarTypeWithLiterals =\n | ScalarType\n | 'COUNT_DISTINCT'\n | 'MIN'\n | 'MAX';\n\nexport interface ValueResult {\n /**\n * Value of the field.\n * @maxLength 1000\n */\n value?: string;\n /** Count of entities with this value. */\n count?: number | null;\n}\n\nexport interface RangeResult {\n /** Inclusive lower bound of the range. */\n from?: number | null;\n /** Exclusive upper bound of the range. */\n to?: number | null;\n /** Count of entities in this range. */\n count?: number | null;\n}\n\nexport interface ScalarResult {\n /** Value of the scalar aggregation. */\n value?: number;\n}\n\nexport interface NestedResultValue extends NestedResultValueResultOneOf {\n /** Value aggregation result. */\n value?: ValueResult;\n /** Range aggregation result. */\n range?: RangeResult;\n /** Scalar aggregation result. */\n scalar?: ScalarResult;\n /** Date histogram aggregation result. */\n dateHistogram?: ValueResult;\n}\n\n/** @oneof */\nexport interface NestedResultValueResultOneOf {\n /** Value aggregation result. */\n value?: ValueResult;\n /** Range aggregation result. */\n range?: RangeResult;\n /** Scalar aggregation result. */\n scalar?: ScalarResult;\n /** Date histogram aggregation result. */\n dateHistogram?: ValueResult;\n}\n\nexport interface Results {\n /** List of nested aggregations. */\n results?: Record<string, NestedResultValue>;\n}\n\nexport interface DateHistogramResult {\n /**\n * Date in ISO 8601 format.\n * @maxLength 100\n */\n value?: string;\n /** Count of documents in the bucket. */\n count?: number;\n}\n\nexport enum AggregationType {\n /** An aggregation where result buckets are dynamically built - one per unique value. */\n VALUE = 'VALUE',\n /** An aggregation, where user can define set of ranges - each representing a bucket. */\n RANGE = 'RANGE',\n /** A single-value metric aggregation. For example, min, max, sum, avg. */\n SCALAR = 'SCALAR',\n /** An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) */\n DATE_HISTOGRAM = 'DATE_HISTOGRAM',\n /** Multi-level aggregation, where each next aggregation is nested within previous one. */\n NESTED = 'NESTED',\n}\n\n/** @enumType */\nexport type AggregationTypeWithLiterals =\n | AggregationType\n | 'VALUE'\n | 'RANGE'\n | 'SCALAR'\n | 'DATE_HISTOGRAM'\n | 'NESTED';\n\nexport interface ValueResults {\n /**\n * List of value aggregations.\n * @maxSize 250\n */\n results?: ValueAggregationResult[];\n}\n\nexport interface RangeResults {\n /**\n * List of ranges returned in same order as requested.\n * @maxSize 50\n */\n results?: RangeAggregationResult[];\n}\n\nexport interface AggregationResultsScalarResult {\n /** Type of scalar aggregation. */\n type?: ScalarTypeWithLiterals;\n /** Value of the scalar aggregation. */\n value?: number;\n}\n\nexport interface DateHistogramResults {\n /**\n * List of date histogram aggregations.\n * @maxSize 200\n */\n results?: DateHistogramResult[];\n}\n\n/**\n * Results of `NESTED` aggregation type in a flattened form.\n * Aggregations in resulting array are keyed by requested aggregation `name`.\n */\nexport interface NestedResults {\n /**\n * List of nested aggregations.\n * @maxSize 1000\n */\n results?: Results[];\n}\n\nexport interface AggregationResults extends AggregationResultsResultOneOf {\n /** Value aggregation results. */\n values?: ValueResults;\n /** Range aggregation results. */\n ranges?: RangeResults;\n /** Scalar aggregation results. */\n scalar?: AggregationResultsScalarResult;\n /** Date histogram aggregation results. */\n dateHistogram?: DateHistogramResults;\n /** Nested aggregation results. */\n nested?: NestedResults;\n /**\n * User-defined name of aggregation as derived from search request.\n * @maxLength 100\n */\n name?: string;\n /** Type of aggregation that must match provided kind as derived from search request. */\n type?: AggregationTypeWithLiterals;\n /**\n * Field to aggregate by as derived from search request.\n * @maxLength 200\n */\n fieldPath?: string;\n}\n\n/** @oneof */\nexport interface AggregationResultsResultOneOf {\n /** Value aggregation results. */\n values?: ValueResults;\n /** Range aggregation results. */\n ranges?: RangeResults;\n /** Scalar aggregation results. */\n scalar?: AggregationResultsScalarResult;\n /** Date histogram aggregation results. */\n dateHistogram?: DateHistogramResults;\n /** Nested aggregation results. */\n nested?: NestedResults;\n}\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n accountInfo?: AccountInfoMetadata;\n}\n\nexport interface AccountInfoMetadata {\n /** ID of the Wix account associated with the event */\n accountId: string;\n /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */\n siteId?: string;\n /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */\n parentAccountId?: string;\n}\n\nexport interface PaymentCreatedEnvelope {\n entity: Payment;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a payment is created.\n * @permissionId payments:platform:v1:payment:read_events\n * @webhook\n * @eventType wix.payments.platform.v1.payment_created\n * @slug created\n * @documentationMaturity preview\n */\nexport declare function onPaymentCreated(\n handler: (event: PaymentCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface PaymentUpdatedEnvelope {\n entity: Payment;\n metadata: EventMetadata;\n /** @hidden */\n modifiedFields: Record<string, any>;\n}\n\n/**\n * Triggered when a payment is updated.\n * @permissionId payments:platform:v1:payment:read_events\n * @webhook\n * @eventType wix.payments.platform.v1.payment_updated\n * @slug updated\n * @documentationMaturity preview\n */\nexport declare function onPaymentUpdated(\n handler: (event: PaymentUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Retrieves a payment by ID.\n *\n * The payment ID is identical to the source charge ID, so the same value can\n * be used to look up the underlying charge.\n * @param paymentId - Payment ID. This is the source charge ID.\n * @public\n * @documentationMaturity preview\n * @requiredField paymentId\n * @permissionId payments:platform:v1:payment:get_payment\n * @returns Retrieved payment.\n * @fqn wix.payments.platform.v1.Payments.GetPayment\n */\nexport async function getPayment(\n paymentId: string\n): Promise<\n NonNullablePaths<\n Payment,\n | `charge.status`\n | `charge.statusDetails.providerStatusReasons`\n | `charge.orderLineItems`\n | `charge.billingInfo.contactDetails.vatId._id`\n | `charge.billingInfo.contactDetails.vatId.type`\n | `charge.billingInfo.address.streetAddress.number`\n | `charge.billingInfo.address.streetAddress.name`\n | `refunds`\n | `refunds.${number}.status`\n | `refunds.${number}.statusInfo.code`\n | `disputes`\n | `disputes.${number}._id`\n | `disputes.${number}.stage`\n | `disputes.${number}.reason`\n | `disputes.${number}.status`\n | `disputes.${number}.sellerProtection`\n | `disputes.${number}.channel`\n | `disputes.${number}.providerDisputeId`\n | `notificationOfFraud.reason`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n paymentId: paymentId,\n });\n\n const reqOpts = ambassadorWixPaymentsPlatformV1Payment.getPayment(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'payment.charge.billingInfo.address' },\n { path: 'payment.charge.shippingInfo.address' },\n ],\n },\n ])\n )?.payment!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { paymentId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['paymentId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves payments matching the provided full-text search, structured\n * filters, or correlated nested matching.\n *\n * Use Search Payments to find payments by buyer name, buyer or shipping\n * email, or order item name, or to require multiple conditions to match the\n * same refund or dispute item rather than the payment as a whole.\n *\n * Payments are updated asynchronously. After a charge, refund, dispute, or\n * notification of fraud changes, the payment reflects the change within a\n * few seconds.\n *\n * For supported full-text, filter, and sort fields, see @Supported Filters and Search Fields.\n * @param search - Search options.\n *\n * For supported full-text, filter, and sort fields, see\n * @public\n * @documentationMaturity preview\n * @requiredField search\n * @permissionId payments:platform:v1:payment:search_payments\n * @returns Response containing a page of payments that match the search and the\n * pagination metadata for the current page.\n * @fqn wix.payments.platform.v1.Payments.SearchPayments\n */\nexport async function searchPayments(\n search: PaymentSearch\n): Promise<\n NonNullablePaths<\n SearchPaymentsResponse,\n | `payments`\n | `payments.${number}.charge.status`\n | `payments.${number}.notificationOfFraud.reason`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ search: search });\n\n const reqOpts =\n ambassadorWixPaymentsPlatformV1Payment.searchPayments(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'payments.charge.billingInfo.address' },\n { path: 'payments.charge.shippingInfo.address' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { search: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['search']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface PaymentSearchSpec extends SearchSpec {\n searchable: [\n 'charge.billingInfo.contactDetails.email',\n 'charge.billingInfo.contactDetails.firstName',\n 'charge.billingInfo.contactDetails.lastName',\n 'charge.orderLineItems.name',\n 'charge.shippingInfo.contactDetails.email'\n ];\n paging: 'cursor';\n wql: [\n {\n operators: '*';\n fields: ['_createdDate', '_id', 'refundable'];\n sort: 'BOTH';\n },\n {\n operators: '*';\n fields: ['appId'];\n sort: 'NONE';\n },\n {\n operators: '*';\n fields: [\n 'charge.amount',\n 'charge.currencyCode',\n 'charge.paymentMethod.paymentBrandId',\n 'charge.paymentMethod.paymentMethodTypeId',\n 'charge.providerId',\n 'charge.status'\n ];\n sort: 'BOTH';\n },\n {\n operators: ['$matchItems'];\n fields: ['refunds'];\n sort: 'NONE';\n },\n {\n operators: ['$matchItems'];\n fields: ['disputes'];\n sort: 'NONE';\n },\n {\n operators: '*';\n fields: [\n 'notificationOfFraud._createdDate',\n 'notificationOfFraud.reason'\n ];\n sort: 'BOTH';\n }\n ];\n}\n\nexport type CommonSearchWithEntityContext = SearchSdkType<\n Payment,\n PaymentSearchSpec\n>;\nexport type PaymentSearch = {\n /** \n Cursor paging options.\n\n Use the cursor from `pagingMetadata.cursors` in the previous\n response to retrieve another page.\n Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging). \n */\n cursorPaging?: {\n /** \n Maximum number of items to return in the results. Defaults to 50 if not provided. \n @max: 100 \n */\n limit?:\n | NonNullable<CommonSearchWithEntityContext['cursorPaging']>['limit']\n | null;\n /** \n Pointer to the next or previous page in the list of results.\n\n Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n Not relevant for the first request. \n @maxLength: 16000 \n */\n cursor?:\n | NonNullable<CommonSearchWithEntityContext['cursorPaging']>['cursor']\n | null;\n };\n /** \n Filter object.\n\n For supported payment filters, see \n @Supported: Filters and Search Fields.\n Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section). \n */\n filter?: CommonSearchWithEntityContext['filter'] | null;\n /** \n Sort fields.\n\n For supported payment sort fields, see \n @Supported: Filters and Search Fields.\n Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).,\n @maxSize: 10 \n */\n sort?: {\n /** \n Name of the field to sort by. \n @maxLength: 512 \n */\n fieldName?: NonNullable<\n CommonSearchWithEntityContext['sort']\n >[number]['fieldName'];\n /** \n Sort order. \n */\n order?: NonNullable<CommonSearchWithEntityContext['sort']>[number]['order'];\n }[];\n /** \n Free text to match against searchable payment fields. \n */\n search?: {\n /** \n Defines how separate search terms in `expression` are combined. \n */\n mode?: NonNullable<CommonSearchWithEntityContext['search']>['mode'];\n /** \n Search term or expression. \n @maxLength: 100 \n */\n expression?:\n | NonNullable<CommonSearchWithEntityContext['search']>['expression']\n | null;\n /** \n Fields to search. If omitted, all searchable fields are searched. Use dot\n notation to specify a JSON path.\n\n For supported payment search fields, see \n @Supported: Filters and Search Fields.,\n @maxLength: 200,\n @maxSize: 20 \n */\n fields?: NonNullable<CommonSearchWithEntityContext['search']>['fields'];\n /** \n Whether to use automatic fuzzy search that allows typos. \n */\n fuzzy?: NonNullable<CommonSearchWithEntityContext['search']>['fuzzy'];\n };\n /** \n UTC offset or IANA time zone. Valid values are\n ISO 8601 UTC offsets, such as +02:00 or -06:00,\n and IANA time zone IDs, such as Europe/Rome.\n\n Affects all date filters. You can override this behavior for a specific\n filter by specifying a timestamp that includes a time zone, such as\n `\"2023-12-20T10:52:34.795Z\"`. \n @maxLength: 50 \n */\n timeZone?: CommonSearchWithEntityContext['timeZone'] | null;\n};\n\nexport const utils = {\n search: /*#__PURE__*/ createSearchUtils<\n Payment,\n PaymentSearchSpec,\n PaymentSearch\n >(),\n};\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixPaymentsPlatformV1PaymentsUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/payments',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/payments/platform/v1/payments',\n destPath: '/v1/payments',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_payments_payments';\n\n/**\n * Retrieves a payment by ID.\n *\n * The payment ID is identical to the source charge ID, so the same value can\n * be used to look up the underlying charge.\n */\nexport function getPayment(payload: object): RequestOptionsFactory<any> {\n function __getPayment({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.platform.v1.payment',\n method: 'GET' as any,\n methodFqn: 'wix.payments.platform.v1.Payments.GetPayment',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsPlatformV1PaymentsUrl({\n protoPath: '/v1/payments/{paymentId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'payment.createdDate' },\n { path: 'payment.updatedDate' },\n { path: 'payment.charge.createdDate' },\n { path: 'payment.charge.updatedDate' },\n { path: 'payment.refunds.createdDate' },\n { path: 'payment.refunds.updatedDate' },\n { path: 'payment.disputes.dueDate' },\n { path: 'payment.disputes.defendedDate' },\n { path: 'payment.disputes.acceptedDate' },\n { path: 'payment.disputes.createdDate' },\n { path: 'payment.disputes.updatedDate' },\n { path: 'payment.disputes.actions.dueDate' },\n { path: 'payment.notificationOfFraud.createdDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'payment.charge.billingInfo.address.geocode.latitude' },\n { path: 'payment.charge.billingInfo.address.geocode.longitude' },\n { path: 'payment.charge.shippingInfo.address.geocode.latitude' },\n { path: 'payment.charge.shippingInfo.address.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getPayment;\n}\n\n/**\n * Retrieves payments matching the provided full-text search, structured\n * filters, or correlated nested matching.\n *\n * Use Search Payments to find payments by buyer name, buyer or shipping\n * email, or order item name, or to require multiple conditions to match the\n * same refund or dispute item rather than the payment as a whole.\n *\n * Payments are updated asynchronously. After a charge, refund, dispute, or\n * notification of fraud changes, the payment reflects the change within a\n * few seconds.\n *\n * For supported full-text, filter, and sort fields, see @Supported Filters and Search Fields.\n */\nexport function searchPayments(payload: object): RequestOptionsFactory<any> {\n function __searchPayments({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.platform.v1.payment',\n method: 'POST' as any,\n methodFqn: 'wix.payments.platform.v1.Payments.SearchPayments',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsPlatformV1PaymentsUrl({\n protoPath: '/v1/payments/search',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'payments.createdDate' },\n { path: 'payments.updatedDate' },\n { path: 'payments.charge.createdDate' },\n { path: 'payments.charge.updatedDate' },\n { path: 'payments.refunds.createdDate' },\n { path: 'payments.refunds.updatedDate' },\n { path: 'payments.disputes.dueDate' },\n { path: 'payments.disputes.defendedDate' },\n { path: 'payments.disputes.acceptedDate' },\n { path: 'payments.disputes.createdDate' },\n { path: 'payments.disputes.updatedDate' },\n { path: 'payments.disputes.actions.dueDate' },\n { path: 'payments.notificationOfFraud.createdDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'payments.charge.billingInfo.address.geocode.latitude' },\n { path: 'payments.charge.billingInfo.address.geocode.longitude' },\n { path: 'payments.charge.shippingInfo.address.geocode.latitude' },\n {\n path: 'payments.charge.shippingInfo.address.geocode.longitude',\n },\n { path: 'aggregationData.results.ranges.results.from' },\n { path: 'aggregationData.results.ranges.results.to' },\n {\n path: 'aggregationData.results.nested.results.results.*.range.from',\n },\n {\n path: 'aggregationData.results.nested.results.results.*.range.to',\n },\n { path: 'aggregationData.results.scalar.value' },\n {\n path: 'aggregationData.results.nested.results.results.*.scalar.value',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __searchPayments;\n}\n","import {\n getPayment as publicGetPayment,\n searchPayments as publicSearchPayments,\n} from './payments-platform-v1-payment-payments.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { onPaymentCreated as publicOnPaymentCreated } from './payments-platform-v1-payment-payments.public.js';\nimport { onPaymentUpdated as publicOnPaymentUpdated } from './payments-platform-v1-payment-payments.public.js';\n\nexport const getPayment: MaybeContext<\n BuildRESTFunction<typeof publicGetPayment> & typeof publicGetPayment\n> = /*#__PURE__*/ createRESTModule(publicGetPayment);\nexport const searchPayments: MaybeContext<\n BuildRESTFunction<typeof publicSearchPayments> & typeof publicSearchPayments\n> = /*#__PURE__*/ createRESTModule(publicSearchPayments);\n/**\n * Triggered when a payment is created.\n */\nexport const onPaymentCreated: BuildEventDefinition<\n typeof publicOnPaymentCreated\n> &\n typeof publicOnPaymentCreated = /*#__PURE__*/ createEventModule(\n publicOnPaymentCreated\n);\n/**\n * Triggered when a payment is updated.\n */\nexport const onPaymentUpdated: BuildEventDefinition<\n typeof publicOnPaymentUpdated\n> &\n typeof publicOnPaymentUpdated = /*#__PURE__*/ createEventModule(\n publicOnPaymentUpdated\n);\n\nexport {\n VatType,\n Status,\n RefundStatus,\n DisputeStage,\n DisputeReason,\n DisputeStatus,\n SellerProtection,\n DisputeChannel,\n DisputeActionType,\n Reason,\n WebhookIdentityType,\n SortOrder,\n Mode,\n ScalarType,\n AggregationType,\n} from './payments-platform-v1-payment-payments.universal.js';\nexport {\n Payment,\n Charge,\n Shipping,\n FullAddressContactDetails,\n VatId,\n Address,\n AddressStreetOneOf,\n StreetAddress,\n AddressLocation,\n Card,\n Account,\n ProviderStatusReason,\n StatusDetails,\n OrderLineItem,\n AmountBreakdown,\n ContactInfo,\n PaymentMethod,\n FlowDetails,\n Buyer,\n Refund,\n StatusInfo,\n Dispute,\n DisputeAction,\n NotificationOfFraud,\n SyncPaymentRequest,\n SyncPaymentResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountInfo,\n GetPaymentRequest,\n GetPaymentResponse,\n SearchPaymentsRequest,\n CursorSearch,\n CursorSearchPagingMethodOneOf,\n Sorting,\n SearchDetails,\n CursorPaging,\n SearchPaymentsResponse,\n CursorPagingMetadata,\n Cursors,\n AggregationData,\n ValueAggregationResult,\n RangeAggregationResult,\n ValueResult,\n RangeResult,\n ScalarResult,\n NestedResultValue,\n NestedResultValueResultOneOf,\n Results,\n DateHistogramResult,\n ValueResults,\n RangeResults,\n AggregationResultsScalarResult,\n DateHistogramResults,\n NestedResults,\n AggregationResults,\n AggregationResultsResultOneOf,\n BaseEventMetadata,\n EventMetadata,\n AccountInfoMetadata,\n PaymentCreatedEnvelope,\n PaymentUpdatedEnvelope,\n PaymentSearchSpec,\n} from './payments-platform-v1-payment-payments.universal.js';\nexport { utils } from './payments-platform-v1-payment-payments.universal.js';\nexport {\n VatTypeWithLiterals,\n StatusWithLiterals,\n RefundStatusWithLiterals,\n DisputeStageWithLiterals,\n DisputeReasonWithLiterals,\n DisputeStatusWithLiterals,\n SellerProtectionWithLiterals,\n DisputeChannelWithLiterals,\n DisputeActionTypeWithLiterals,\n ReasonWithLiterals,\n WebhookIdentityTypeWithLiterals,\n SortOrderWithLiterals,\n ModeWithLiterals,\n ScalarTypeWithLiterals,\n AggregationTypeWithLiterals,\n CommonSearchWithEntityContext,\n PaymentSearch,\n} from './payments-platform-v1-payment-payments.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAAA;AAAA,EAAA,wBAAAC;AAAA,EAAA,wBAAAC;AAAA,EAAA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B;AAC5C,IAAMC,kBAEK,2DAAiBA,eAAoB;AAIhD,IAAMC,oBAGmC;AAAA,EAC9C;AACF;AAIO,IAAMC,oBAGmC;AAAA,EAC9C;AACF;","names":["getPayment","onPaymentCreated","onPaymentUpdated","searchPayments","import_rename_all_nested_keys","import_address","import_timestamp","import_transform_paths","import_rest_modules","payload","import_transform_paths","VatType","Status","RefundStatus","DisputeStage","DisputeReason","DisputeStatus","SellerProtection","DisputeChannel","DisputeActionType","Reason","WebhookIdentityType","SortOrder","Mode","ScalarType","AggregationType","getPayment","sdkTransformError","searchPayments","getPayment","searchPayments","import_rest_modules","getPayment","searchPayments","onPaymentCreated","onPaymentUpdated"]}
1
+ {"version":3,"sources":["../../index.ts","../../src/payments-platform-v1-payment-payments.public.ts","../../src/payments-platform-v1-payment-payments.universal.ts","../../src/payments-platform-v1-payment-payments.http.ts","../../src/payments-platform-v1-payment-payments.context.ts"],"sourcesContent":["export * from './src/payments-platform-v1-payment-payments.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTAddressToSDKAddress } from '@wix/sdk-runtime/transformations/address';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n Payment,\n PaymentCreatedEnvelope,\n PaymentSearch,\n PaymentUpdatedEnvelope,\n SearchPaymentsResponse,\n getPayment as universalGetPayment,\n searchPayments as universalSearchPayments,\n} from './payments-platform-v1-payment-payments.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/payments' };\n\nexport function getPayment(httpClient: HttpClient): GetPaymentSignature {\n return (paymentId: string) =>\n universalGetPayment(\n paymentId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetPaymentSignature {\n /**\n * Retrieves a payment by ID.\n *\n * The payment ID is identical to the source charge ID, so the same value can\n * be used to look up the underlying charge.\n * @param - Payment ID. This is the source charge ID.\n * @returns Retrieved payment.\n */\n (paymentId: string): Promise<\n NonNullablePaths<\n Payment,\n | `charge.status`\n | `charge.statusDetails.providerStatusReasons`\n | `charge.orderLineItems`\n | `charge.billingInfo.contactDetails.vatId._id`\n | `charge.billingInfo.contactDetails.vatId.type`\n | `charge.billingInfo.address.streetAddress.number`\n | `charge.billingInfo.address.streetAddress.name`\n | `refunds`\n | `refunds.${number}.status`\n | `refunds.${number}.statusInfo.code`\n | `disputes`\n | `disputes.${number}._id`\n | `disputes.${number}.stage`\n | `disputes.${number}.reason`\n | `disputes.${number}.status`\n | `disputes.${number}.sellerProtection`\n | `disputes.${number}.channel`\n | `disputes.${number}.providerDisputeId`\n | `notificationOfFraud.reason`,\n 6\n >\n >;\n}\n\nexport function searchPayments(\n httpClient: HttpClient\n): SearchPaymentsSignature {\n return (search: PaymentSearch) =>\n universalSearchPayments(\n search,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface SearchPaymentsSignature {\n /**\n * Retrieves payments matching the provided full-text search, structured\n * filters, or correlated nested matching.\n *\n * Use Search Payments to find payments by buyer name, buyer or shipping\n * email, or order item name, or to require multiple conditions to match the\n * same refund or dispute item rather than the payment as a whole.\n *\n * Payments are updated asynchronously. After a charge, refund, dispute, or\n * notification of fraud changes, the payment reflects the change within a\n * few seconds.\n *\n * For supported full-text, filter, and sort fields, see\n * @param - Search options.\n *\n * For supported full-text, filter, and sort fields, see\n * @returns Response containing a page of payments that match the search and the\n * pagination metadata for the current page.\n */\n (search: PaymentSearch): Promise<\n NonNullablePaths<\n SearchPaymentsResponse,\n | `payments`\n | `payments.${number}.charge.status`\n | `payments.${number}.notificationOfFraud.reason`,\n 5\n >\n >;\n}\n\nexport const onPaymentCreated = /*#__PURE__*/ EventDefinition(\n 'wix.payments.platform.v1.payment_created',\n true,\n (event: PaymentCreatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'entity.updatedDate' },\n { path: 'entity.charge.createdDate' },\n { path: 'entity.charge.updatedDate' },\n { path: 'entity.refunds.createdDate' },\n { path: 'entity.refunds.updatedDate' },\n { path: 'entity.disputes.dueDate' },\n { path: 'entity.disputes.defendedDate' },\n { path: 'entity.disputes.acceptedDate' },\n { path: 'entity.disputes.createdDate' },\n { path: 'entity.disputes.updatedDate' },\n { path: 'entity.disputes.actions.dueDate' },\n { path: 'entity.notificationOfFraud.createdDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'entity.charge.billingInfo.address' },\n { path: 'entity.charge.shippingInfo.address' },\n ],\n },\n ])\n )\n)<PaymentCreatedEnvelope>();\nexport const onPaymentUpdated = /*#__PURE__*/ EventDefinition(\n 'wix.payments.platform.v1.payment_updated',\n true,\n (event: PaymentUpdatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'entity.updatedDate' },\n { path: 'entity.charge.createdDate' },\n { path: 'entity.charge.updatedDate' },\n { path: 'entity.refunds.createdDate' },\n { path: 'entity.refunds.updatedDate' },\n { path: 'entity.disputes.dueDate' },\n { path: 'entity.disputes.defendedDate' },\n { path: 'entity.disputes.acceptedDate' },\n { path: 'entity.disputes.createdDate' },\n { path: 'entity.disputes.updatedDate' },\n { path: 'entity.disputes.actions.dueDate' },\n { path: 'entity.notificationOfFraud.createdDate' },\n { path: 'metadata.eventTime' },\n { path: 'modifiedFields.createdDate' },\n { path: 'modifiedFields.updatedDate' },\n { path: 'modifiedFields.charge.createdDate' },\n { path: 'modifiedFields.charge.updatedDate' },\n { path: 'modifiedFields.refunds.createdDate' },\n { path: 'modifiedFields.refunds.updatedDate' },\n { path: 'modifiedFields.disputes.dueDate' },\n { path: 'modifiedFields.disputes.defendedDate' },\n { path: 'modifiedFields.disputes.acceptedDate' },\n { path: 'modifiedFields.disputes.createdDate' },\n { path: 'modifiedFields.disputes.updatedDate' },\n { path: 'modifiedFields.disputes.actions.dueDate' },\n { path: 'modifiedFields.notificationOfFraud.createdDate' },\n ],\n },\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'entity.charge.billingInfo.address' },\n { path: 'entity.charge.shippingInfo.address' },\n { path: 'modifiedFields.charge.billingInfo.address' },\n { path: 'modifiedFields.charge.shippingInfo.address' },\n ],\n },\n ])\n )\n)<PaymentUpdatedEnvelope>();\n\nexport {\n Account,\n AccountInfo,\n AccountInfoMetadata,\n ActionEvent,\n Address,\n AddressLocation,\n AddressStreetOneOf,\n AggregationData,\n AggregationResults,\n AggregationResultsResultOneOf,\n AggregationResultsScalarResult,\n AggregationType,\n AmountBreakdown,\n BaseEventMetadata,\n Buyer,\n Card,\n Charge,\n ContactInfo,\n CursorPaging,\n CursorPagingMetadata,\n CursorSearch,\n CursorSearchPagingMethodOneOf,\n Cursors,\n DateHistogramResult,\n DateHistogramResults,\n Dispute,\n DisputeAction,\n DisputeActionType,\n DisputeChannel,\n DisputeReason,\n DisputeStage,\n DisputeStatus,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n FlowDetails,\n FullAddressContactDetails,\n GetPaymentRequest,\n GetPaymentResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n MessageEnvelope,\n Mode,\n NestedResultValue,\n NestedResultValueResultOneOf,\n NestedResults,\n NotificationOfFraud,\n OrderLineItem,\n Payment,\n PaymentCreatedEnvelope,\n PaymentMethod,\n PaymentSearchSpec,\n PaymentUpdatedEnvelope,\n ProviderStatusReason,\n RangeAggregationResult,\n RangeResult,\n RangeResults,\n Reason,\n Refund,\n RefundStatus,\n RestoreInfo,\n Results,\n ScalarResult,\n ScalarType,\n SearchDetails,\n SearchPaymentsRequest,\n SearchPaymentsResponse,\n SellerProtection,\n Shipping,\n SortOrder,\n Sorting,\n Status,\n StatusDetails,\n StatusInfo,\n StreetAddress,\n SyncPaymentRequest,\n SyncPaymentResponse,\n ValueAggregationResult,\n ValueResult,\n ValueResults,\n VatId,\n VatType,\n WebhookIdentityType,\n utils,\n} from './payments-platform-v1-payment-payments.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport {\n HttpClient,\n Search as SearchSdkType,\n NonNullablePaths,\n SearchSpec,\n} from '@wix/sdk-types';\nimport * as ambassadorWixPaymentsPlatformV1Payment from './payments-platform-v1-payment-payments.http.js';\nimport { transformRESTAddressToSDKAddress } from '@wix/sdk-runtime/transformations/address';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { createSearchUtils } from '@wix/sdk-runtime/search-builder-utils';\n\n/**\n * A payment is a read-only aggregate view of a charge. Each payment\n * combines a single charge with all of its related refunds, disputes, and\n * notification of fraud into one entity, sharing its ID with the source charge.\n */\nexport interface Payment {\n /**\n * Payment ID. Identical to the charge ID.\n * @format GUID\n * @immutable\n * @readonly\n */\n _id?: string | null;\n /**\n * Date and time the payment was created.\n * @immutable\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the payment was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * ID of the Wix app that initiated the checkout.\n * @minLength 1\n * @maxLength 255\n * @readonly\n */\n appId?: string | null;\n /**\n * Whether a refund can currently be created for the payment, based on the\n * charge state, payment method, and provider configuration. A `true` value\n * can still result in a failed refund attempt due to permissions, account\n * balance, or provider restrictions enforced at refund creation time.\n * @readonly\n */\n refundable?: boolean | null;\n /**\n * Charge details for the payment, including amount, currency, status,\n * payment method, and buyer information.\n * @readonly\n */\n charge?: Charge;\n /**\n * List of refunds associated with the payment, ordered by creation date in descending order.\n * For the complete refund history, use the [Refunds API](https://dev.wix.com/docs/api-reference/business-management/payments/refunds/introduction).\n * @maxSize 50\n * @readonly\n */\n refunds?: Refund[];\n /**\n * List of disputes associated with the payment, ordered by creation date in descending order.\n * For the complete dispute history, use the [Disputes API](https://dev.wix.com/docs/api-reference/business-management/payments/disputes/introduction).\n * @maxSize 20\n * @readonly\n */\n disputes?: Dispute[];\n /**\n * Notification of fraud associated with this payment, if any.\n *\n * A charge has at most one notification of fraud.\n * @readonly\n */\n notificationOfFraud?: NotificationOfFraud;\n}\n\n/**\n * A charge is a record of an attempt to move money from a buyer to a merchant.\n * Read more about charges in this [article](<https://dev.wix.com/docs/api-reference/business-management/payments/charges/introduction>).\n */\nexport interface Charge {\n /**\n * Charge ID.\n * @format GUID\n * @immutable\n * @readonly\n */\n _id?: string | null;\n /**\n * Date and time the charge was created.\n * @immutable\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the charge was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * ID of the merchant's provider account connection.\n * @format GUID\n * @immutable\n * @readonly\n */\n accountConnectionId?: string | null;\n /**\n * ID of the PaymentIntent that initiated the charge.\n * @format GUID\n * @immutable\n * @readonly\n */\n paymentIntentId?: string | null;\n /**\n * Status of the charge.\n * See the [Charges API](https://dev.wix.com/docs/api-reference/business-management/payments/charges/introduction) for more information.\n * @readonly\n */\n status?: StatusWithLiterals;\n /**\n * Additional details about the current charge status.\n * @readonly\n */\n statusDetails?: StatusDetails;\n /**\n * Total charge amount in the currency's main units.\n * For example, `12.95` for $12.95 USD.\n * @decimalValue options { gte:0, maxScale:8 }\n * @readonly\n */\n amount?: string | null;\n /**\n * Currency of the charge.\n * @format CURRENCY\n * @immutable\n * @readonly\n */\n currencyCode?: string | null;\n /**\n * Platform fee amount in the currency's main units.\n * For example, `1.50` for a $1.50 platform fee.\n * Used in scenarios where the platform charges a fee for processing the transaction.\n * @decimalValue options { gt:0, maxScale:8 }\n * @readonly\n */\n applicationFee?: string | null;\n /**\n * Items being purchased in this charge.\n * Each line item represents a product or service with quantity, pricing, and tax information.\n * @maxSize 100\n * @readonly\n */\n orderLineItems?: OrderLineItem[];\n /**\n * Detailed breakdown of amounts that contribute to the total charge amount.\n * Includes shipping costs, taxes, and discounts applied to the order.\n * @readonly\n */\n amountBreakdown?: AmountBreakdown;\n /**\n * Text that appears on the customer's payment statement for this charge.\n * Helps customers identify the transaction.\n * @maxLength 20\n * @readonly\n */\n statementDescriptor?: string | null;\n /**\n * Customer's billing address and contact information.\n * Used for payment processing, fraud prevention, and compliance requirements.\n * @readonly\n */\n billingInfo?: ContactInfo;\n /**\n * Customer's shipping address and contact information.\n * Used for order fulfillment and risk assessment.\n * @readonly\n */\n shippingInfo?: ContactInfo;\n /**\n * Enriched payment method information from the payment provider.\n * Includes processed details like card brand, last 4 digits, account information and other information that may vary based on payment method used.\n * @readonly\n */\n paymentMethod?: PaymentMethod;\n /**\n * Configuration for the payment processing flow.\n * @readonly\n */\n flowDetails?: FlowDetails;\n /**\n * Information about the customer making the payment.\n * Links to contact records, site membership, and user accounts for personalization and compliance.\n * @readonly\n */\n buyer?: Buyer;\n /**\n * ID of the payment provider that processed this charge.\n * @minLength 1\n * @maxLength 100\n * @readonly\n */\n providerId?: string | null;\n /**\n * Charge ID as it appears in the payment provider's system.\n * @minLength 1\n * @maxLength 100\n * @readonly\n */\n providerChargeId?: string | null;\n /**\n * Order identifier from the external system that initiated this charge.\n * Passed through to the payment provider for reporting and allowing correlation between payment and order.\n * @minLength 1\n * @maxLength 1000\n * @readonly\n */\n externalOrderId?: string | null;\n}\n\n/** Shipping amount breakdown details. */\nexport interface Shipping {\n /**\n * Shipping cost amount.\n * @decimalValue options { gt:0, maxScale:8 }\n */\n amount?: string | null;\n /**\n * Shipping discount amount.\n * @decimalValue options { gt:0, maxScale:8 }\n */\n discount?: string | null;\n}\n\n/** Full contact details for an address */\nexport interface FullAddressContactDetails {\n /** Contact's first name. */\n firstName?: string | null;\n /** Contact's last name. */\n lastName?: string | null;\n /**\n * Contact's full name.\n * @internal\n */\n fullName?: string | null;\n /**\n * Contact's phone number.\n * @format PHONE\n */\n phone?: string | null;\n /** Contact's company name. */\n company?: string | null;\n /**\n * Email associated with the address.\n * @format EMAIL\n */\n email?: string | null;\n /** Tax info. Currently usable only in Brazil. */\n vatId?: VatId;\n}\n\nexport interface VatId {\n /** Customer's tax ID. */\n _id?: string;\n /**\n * Tax type.\n *\n * Supported values:\n * + `CPF`: for individual tax payers\n * + `CNPJ`: for corporations\n */\n type?: VatTypeWithLiterals;\n}\n\n/** tax info types */\nexport enum VatType {\n UNSPECIFIED = 'UNSPECIFIED',\n /** CPF - for individual tax payers. */\n CPF = 'CPF',\n /** CNPJ - for corporations */\n CNPJ = 'CNPJ',\n}\n\n/** @enumType */\nexport type VatTypeWithLiterals = VatType | 'UNSPECIFIED' | 'CPF' | 'CNPJ';\n\n/** Physical address */\nexport interface Address extends AddressStreetOneOf {\n /** Street name and number. */\n streetAddress?: StreetAddress;\n /** Main address line, usually street and number as free text. */\n addressLine1?: string | null;\n /**\n * Country code.\n * @format COUNTRY\n */\n country?: string | null;\n /** Subdivision shorthand. Usually, a short code (2 or 3 letters) that represents a state, region, prefecture, or province. e.g. NY */\n subdivision?: string | null;\n /** City name. */\n city?: string | null;\n /** Zip/postal code. */\n postalCode?: string | null;\n /** Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */\n addressLine2?: string | null;\n /**\n * A string containing the full address of this location.\n * @internal\n */\n formatted?: string | null;\n /**\n * Free text to help find the address.\n * @internal\n */\n hint?: string | null;\n /**\n * Coordinates of the physical address.\n * @internal\n */\n location?: AddressLocation;\n /**\n * Country full name.\n * @internal\n */\n countryFullname?: string | null;\n /**\n * Subdivision full name.\n * @internal\n */\n subdivisionFullname?: string | null;\n}\n\n/** @oneof */\nexport interface AddressStreetOneOf {\n /** Street name and number. */\n streetAddress?: StreetAddress;\n /** Main address line, usually street and number as free text. */\n addressLine?: string | null;\n}\n\nexport interface StreetAddress {\n /** Street number. */\n number?: string;\n /** Street name. */\n name?: string;\n /**\n * Apartment number.\n * @internal\n */\n apt?: string;\n /**\n * Optional address line 1\n * @internal\n */\n formattedAddressLine?: string | null;\n}\n\nexport interface AddressLocation {\n /** Address latitude. */\n latitude?: number | null;\n /** Address longitude. */\n longitude?: number | null;\n}\n\n/** Information about a card payment method. */\nexport interface Card {\n /**\n * Last 4 digits of the card number.\n * @minLength 4\n * @maxLength 4\n */\n lastFourDigits?: string | null;\n /**\n * Bank Identification Number - the first 4-8 digits of the card number.\n * @minLength 4\n * @maxLength 8\n */\n bin?: string | null;\n /**\n * Month when the card expires (1-12).\n * @min 1\n * @max 12\n */\n expirationMonth?: number | null;\n /**\n * Full year when the card expires.\n * @min 2000\n * @max 2099\n */\n expirationYear?: number | null;\n /**\n * Full name of the cardholder as printed on the card.\n * @minLength 1\n * @maxLength 1000\n */\n cardholderName?: string | null;\n}\n\n/** Account information for digital wallet or bank account payments. */\nexport interface Account {\n /**\n * Email address associated with the payment account.\n * @format EMAIL\n */\n email?: string | null;\n /**\n * Name of the bank that issued the payment method.\n * @maxLength 1024\n */\n issuingBank?: string | null;\n}\n\n/** Provider-specific status reason information. */\nexport interface ProviderStatusReason {\n /**\n * Type of reason code from the provider.\n * For example, `issuer_decline_code`, `card_error`, or `request_error`.\n * @minLength 1\n * @maxLength 100\n */\n type?: string | null;\n /**\n * Provider-specific reason code.\n * @minLength 1\n * @maxLength 100\n */\n code?: string | null;\n /**\n * Human-readable description of the provider reason.\n * @minLength 1\n * @maxLength 1000\n */\n description?: string | null;\n}\n\n/** Status of a charge in its processing lifecycle. */\nexport enum Status {\n /** Charge has been created and is waiting for processing to begin. */\n INITIATED = 'INITIATED',\n /**\n * Charge requires additional action from the buyer to proceed.\n * Check the [Charges API](https://dev.wix.com/docs/api-reference/business-management/payments/charges/introduction) for specific instructions.\n */\n ACTION_REQUIRED = 'ACTION_REQUIRED',\n /** Payment processing is in progress, awaiting confirmation from the provider, issuer, or merchant. */\n PENDING = 'PENDING',\n /**\n * Funds have been authorized but not yet captured.\n * Use the [Charges API](https://dev.wix.com/docs/api-reference/business-management/payments/charges/introduction) to capture or void the charge.\n */\n AUTHORIZED = 'AUTHORIZED',\n /**\n * Funds have been successfully captured from the buyer's payment method.\n * This is the final successful state for most charges.\n */\n CAPTURED = 'CAPTURED',\n /**\n * Authorization was canceled before funds were captured.\n * No money was transferred and the authorization hold is released.\n */\n VOIDED = 'VOIDED',\n /**\n * Charge failed due to payment processing issues.\n * Check `statusDetails` for details about the failure reason.\n */\n FAILED = 'FAILED',\n}\n\n/** @enumType */\nexport type StatusWithLiterals =\n | Status\n | 'INITIATED'\n | 'ACTION_REQUIRED'\n | 'PENDING'\n | 'AUTHORIZED'\n | 'CAPTURED'\n | 'VOIDED'\n | 'FAILED';\n\n/** Detailed information about the charge status. */\nexport interface StatusDetails {\n /**\n * Standardized 4-character reason code indicating why the charge is in its current status.\n * See [reason codes](https://dev.wix.com/docs/api-reference/business-management/payments/payment-service-provider-service-plugin/reason-codes) for more information.\n * @minLength 4\n * @maxLength 4\n */\n code?: string | null;\n /**\n * Human-readable description of the status code.\n * @minLength 1\n * @maxLength 1000\n */\n description?: string | null;\n /**\n * Status of the charge as reported by the payment provider.\n * @minLength 1\n * @maxLength 100\n */\n providerStatus?: string | null;\n /**\n * Detailed status information from the payment provider.\n * Contains provider-specific reason codes and descriptions.\n * @maxSize 10\n */\n providerStatusReasons?: ProviderStatusReason[];\n}\n\n/** An individual item in the order being charged. */\nexport interface OrderLineItem {\n /**\n * Stock Keeping Unit identifier for the item.\n * @minLength 1\n * @maxLength 255\n */\n sku?: string | null;\n /**\n * Display name of the item.\n * @minLength 1\n * @maxLength 200\n */\n name?: string | null;\n /**\n * Number of units of this item being purchased.\n * @min 1\n */\n quantity?: number | null;\n /**\n * Price per unit before taxes and discounts are applied.\n * @decimalValue options { gte:0, maxScale:8 }\n */\n unitPrice?: string | null;\n /**\n * Detailed description of the item.\n * @minLength 1\n * @maxLength 1024\n */\n description?: string | null;\n /** Whether the item is a physical product that requires shipping. */\n tangible?: boolean | null;\n /**\n * Total discount amount applied to this line item for the specified quantity.\n * @decimalValue options { gt:0, maxScale:8 }\n */\n discount?: string | null;\n /**\n * Total tax amount for this line item for the specified quantity.\n * @decimalValue options { gt:0, maxScale:8 }\n */\n tax?: string | null;\n}\n\n/** Breakdown of additional amounts that contribute to the total order amount. */\nexport interface AmountBreakdown {\n /**\n * Total amount of all items before taxes and discounts.\n * Equals the sum of unitPrice * quantity amounts from all order line items.\n * @decimalValue options { gte:0, maxScale:8 }\n */\n itemsTotal?: string | null;\n /**\n * Total tax amount for the entire order.\n * Equals the sum of tax amounts from all order line items when individual item taxes are specified.\n * @decimalValue options { gte:0, maxScale:8 }\n */\n taxTotal?: string | null;\n /**\n * Total discount amount for the entire order.\n * Equals the sum of all item discounts when individual item discounts are specified.\n * @decimalValue options { gte:0, maxScale:8 }\n */\n discountTotal?: string | null;\n /** Shipping breakdown details. */\n shipping?: Shipping;\n}\n\n/** Contact and address information for billing or shipping. */\nexport interface ContactInfo {\n /** Contact details including name, email, and phone number. */\n contactDetails?: FullAddressContactDetails;\n /** Physical address information. */\n address?: Address;\n}\n\n/** Processed payment method information from the payment provider. */\nexport interface PaymentMethod {\n /**\n * ID of the payment method type.\n * @format GUID\n */\n paymentMethodTypeId?: string | null;\n /**\n * ID of the specific payment method brand used (e.g., Visa, Mastercard in case of card payment or Venmo for PayPal payments).\n * @format GUID\n */\n paymentBrandId?: string | null;\n /** Information about the card used for payment. */\n card?: Card;\n /** Information about the account used for payment. */\n account?: Account;\n}\n\n/** Configuration and details about the payment processing flow. */\nexport interface FlowDetails {\n /** Whether this is a Mail Order/Telephone Order (MOTO) transaction. */\n moto?: boolean | null;\n /**\n * Number of installments for this payment.\n * @min 1\n */\n installmentCount?: number | null;\n}\n\n/** Information about the customer making the payment. */\nexport interface Buyer {\n /**\n * ID of the buyer's contact record in the contacts system.\n * @format GUID\n */\n contactId?: string | null;\n /**\n * ID of the buyer's site membership if they are a registered member.\n * @format GUID\n */\n memberId?: string | null;\n /**\n * Buyer's preferred language in IETF BCP 47 format.\n * For example, `en-US` for U.S. English.\n * @format LANGUAGE_TAG\n */\n languageCode?: string | null;\n}\n\n/** The refund object. A refund object is the record of an attempt to return charged funds. */\nexport interface Refund {\n /**\n * Refund ID.\n * @readonly\n * @immutable\n * @format GUID\n */\n _id?: string | null;\n /**\n * Date and time the refund was created.\n * @readonly\n * @immutable\n */\n _createdDate?: Date | null;\n /**\n * Date and time the refund was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Amount being returned to the buyer in the refund currency's main units (such as dollars or euros).\n * For example, `\"12.95\"`.\n * @immutable\n * @decimalValue options { gt:0, maxScale:8 }\n */\n amount?: string | null;\n /**\n * Whether the refund is for the entire amount of the charge.\n * @readonly\n * @immutable\n */\n full?: boolean | null;\n /**\n * Status of the refund.\n *\n * Learn more about the [refund lifecycle](https://dev.wix.com/docs/api-reference/business-management/payments/refunds/refund-lifecycle).\n * @readonly\n */\n status?: RefundStatusWithLiterals;\n /**\n * Payment service provider's ID for the refund.\n * @readonly\n * @immutable\n * @minLength 1\n * @maxLength 100\n */\n providerRefundId?: string | null;\n /**\n * Reason this refund was issued.\n * @minLength 1\n * @maxLength 1000\n */\n reason?: string | null;\n /**\n * Details about the refund status.\n * Used to provide additional information about why a refund was given its status.\n * @readonly\n */\n statusInfo?: StatusInfo;\n /**\n * Unique number assigned to a refund. This number is shared across all parties involved in processing the refund. It allows the merchant to track the refund with their bank.\n * @readonly\n * @immutable\n * @minLength 1\n * @maxLength 30\n */\n acquirerReferenceNumber?: string | null;\n /**\n * Note providing additional information about this refund.\n * @immutable\n * @minLength 1\n * @maxLength 200\n */\n note?: string | null;\n}\n\nexport enum RefundStatus {\n /** Refund is in progress. */\n PENDING = 'PENDING',\n /** Refund succeeded. */\n SUCCEEDED = 'SUCCEEDED',\n /** Refund failed. */\n FAILED = 'FAILED',\n /** Refund had succeeded, but has since been reversed. */\n REVERSED = 'REVERSED',\n}\n\n/** @enumType */\nexport type RefundStatusWithLiterals =\n | RefundStatus\n | 'PENDING'\n | 'SUCCEEDED'\n | 'FAILED'\n | 'REVERSED';\n\nexport interface StatusInfo {\n /**\n * Reason code with detailed information about the refund status.\n * See the full list of [reason codes](https://dev.wix.com/docs/api-reference/business-management/payments/payment-service-provider-service-plugin/reason-codes#refund-declined).\n * @minLength 1\n * @maxLength 10\n */\n code?: string;\n /**\n * Description of the status.\n * @minLength 1\n * @maxLength 1000\n */\n description?: string | null;\n}\n\n/** A dispute is a customer-initiated challenge of a payment through their payment service provider (PSP) or bank. */\nexport interface Dispute {\n /**\n * Dispute ID.\n * @format GUID\n * @immutable\n */\n _id?: string;\n /**\n * Stage of the dispute process.\n * @readonly\n */\n stage?: DisputeStageWithLiterals;\n /**\n * Reason why the customer initiated the dispute.\n * @readonly\n */\n reason?: DisputeReasonWithLiterals;\n /**\n * Disputed amount in the currency's main units. For example, `\"12.95\"` for $12.95.\n * @immutable\n * @decimalValue options { gt:0, maxScale:8 }\n */\n amount?: string | null;\n /**\n * Current status of the dispute. This indicates what action is required and who needs to take it.\n * @readonly\n */\n status?: DisputeStatusWithLiterals;\n /**\n * Level of seller protection coverage for this dispute.\n *\n * Seller protection is set by the payment provider. For example, PayPal offers a [seller protection program](https://www.paypal.com/ua/legalhub/paypal/seller-protection).\n * @readonly\n */\n sellerProtection?: SellerProtectionWithLiterals;\n /**\n * Channel through which the dispute is being processed.\n * @readonly\n */\n channel?: DisputeChannelWithLiterals;\n /**\n * The latest date and time until which the dispute can remain in its current status.\n *\n * If this date passes, the dispute will be resolved against the party that is required to take action. For example, if the status is `WAITING_MERCHANT`, and the due date passes, the dispute will be `LOST` and a refund will be processed automatically.\n * @readonly\n */\n dueDate?: Date | null;\n /**\n * Unique identifier assigned by the payment service provider for this dispute.\n * @immutable\n * @minLength 1\n * @maxLength 64\n */\n providerDisputeId?: string;\n /**\n * Network reason code provided by the card network or issuing bank that initiated the dispute.\n * @minLength 1\n * @maxLength 64\n */\n networkReasonCode?: string | null;\n /**\n * Whether the dispute can be defended with evidence.\n * @readonly\n */\n defendable?: boolean | null;\n /**\n * Whether the dispute was automatically defended by the payment processor.\n * @readonly\n */\n autoDefended?: boolean | null;\n /**\n * Date and time at which the dispute was defended.\n * @readonly\n */\n defendedDate?: Date | null;\n /**\n * Date and time at which the dispute was accepted.\n * @readonly\n */\n acceptedDate?: Date | null;\n /**\n * List of actions that can be performed on the dispute.\n * Each action has a specific due date by which it must be completed.\n * Available actions depend on the dispute's current status and stage.\n * @readonly\n * @maxSize 20\n */\n actions?: DisputeAction[];\n /**\n * Date and time the dispute was created.\n * @readonly\n * @immutable\n */\n _createdDate?: Date | null;\n /**\n * Date and time the dispute was updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n}\n\nexport enum DisputeStage {\n /** Formal dispute filed through the card network or issuing bank. */\n CHARGEBACK = 'CHARGEBACK',\n /** Initial inquiry from the customer requesting information about the charge. */\n INQUIRY = 'INQUIRY',\n}\n\n/** @enumType */\nexport type DisputeStageWithLiterals = DisputeStage | 'CHARGEBACK' | 'INQUIRY';\n\nexport enum DisputeReason {\n /** Fraudulent use of a physical card. */\n FRAUD_CARD_PRESENT = 'FRAUD_CARD_PRESENT',\n /** Fraudulent use without the physical card present. */\n FRAUD_CARD_ABSENT = 'FRAUD_CARD_ABSENT',\n /** Duplicate charge processing. */\n DUPLICATE_PROCESSING = 'DUPLICATE_PROCESSING',\n /** Services or goods were not provided as promised. */\n SERVICES_NOT_PROVIDED = 'SERVICES_NOT_PROVIDED',\n /** Recurring payment that should have been canceled. */\n CANCELED_RECURRING = 'CANCELED_RECURRING',\n /** Item received was not as described. */\n NOT_AS_DESCRIBED = 'NOT_AS_DESCRIBED',\n /** Item received was counterfeit. */\n COUNTERFEIT = 'COUNTERFEIT',\n /** Merchant misrepresented the transaction. */\n MISREPRESENTATION = 'MISREPRESENTATION',\n /** Transaction was canceled but still charged. */\n CANCELED = 'CANCELED',\n /** Other dispute reason not covered by specific categories. */\n OTHER = 'OTHER',\n}\n\n/** @enumType */\nexport type DisputeReasonWithLiterals =\n | DisputeReason\n | 'FRAUD_CARD_PRESENT'\n | 'FRAUD_CARD_ABSENT'\n | 'DUPLICATE_PROCESSING'\n | 'SERVICES_NOT_PROVIDED'\n | 'CANCELED_RECURRING'\n | 'NOT_AS_DESCRIBED'\n | 'COUNTERFEIT'\n | 'MISREPRESENTATION'\n | 'CANCELED'\n | 'OTHER';\n\nexport enum DisputeStatus {\n /** Merchant action required to proceed with the dispute. */\n WAITING_MERCHANT = 'WAITING_MERCHANT',\n /** Dispute is being reviewed by the payment service provider or bank. */\n UNDER_REVIEW = 'UNDER_REVIEW',\n /** Customer action required to proceed with the dispute. */\n WAITING_BUYER = 'WAITING_BUYER',\n /** Dispute resolved in favor of the merchant. */\n WON = 'WON',\n /** Dispute resolved in favor of the customer. When a dispute is lost, the refund is processed automatically. */\n LOST = 'LOST',\n}\n\n/** @enumType */\nexport type DisputeStatusWithLiterals =\n | DisputeStatus\n | 'WAITING_MERCHANT'\n | 'UNDER_REVIEW'\n | 'WAITING_BUYER'\n | 'WON'\n | 'LOST';\n\nexport enum SellerProtection {\n /** Transaction is not eligible for seller protection. */\n NOT_ELIGIBLE = 'NOT_ELIGIBLE',\n /** Transaction is eligible for basic seller protection. */\n ELIGIBLE = 'ELIGIBLE',\n /** Transaction is eligible for extended seller protection coverage. */\n EXTENDED = 'EXTENDED',\n}\n\n/** @enumType */\nexport type SellerProtectionWithLiterals =\n | SellerProtection\n | 'NOT_ELIGIBLE'\n | 'ELIGIBLE'\n | 'EXTENDED';\n\nexport enum DisputeChannel {\n /** Dispute is processed by the payment service provider. */\n INTERNAL = 'INTERNAL',\n /** Dispute is processed through the card network or issuing bank. */\n EXTERNAL = 'EXTERNAL',\n}\n\n/** @enumType */\nexport type DisputeChannelWithLiterals =\n | DisputeChannel\n | 'INTERNAL'\n | 'EXTERNAL';\n\nexport interface DisputeAction {\n /** Type of action that can be performed. */\n type?: DisputeActionTypeWithLiterals;\n /** Latest date and time by which this action must be performed. */\n dueDate?: Date | null;\n}\n\nexport enum DisputeActionType {\n /** Dispute can be accepted. */\n ACCEPT = 'ACCEPT',\n /** Dispute can be defended. */\n DEFEND = 'DEFEND',\n}\n\n/** @enumType */\nexport type DisputeActionTypeWithLiterals =\n | DisputeActionType\n | 'ACCEPT'\n | 'DEFEND';\n\n/**\n * A notification of fraud is a pre-dispute fraud alert raised against a charge.\n * Card networks issue these alerts to flag a transaction that a cardholder has\n * reported as fraudulent.\n *\n * A notification of fraud is informational and doesn't move funds. It may\n * precede a chargeback, but doesn't have to. A charge has at most one\n * notification of fraud, and notifications of fraud are immutable once created.\n */\nexport interface NotificationOfFraud {\n /**\n * Standardized fraud reason, mapped from the raw reason reported by the upstream payment provider.\n * @immutable\n */\n reason?: ReasonWithLiterals;\n /**\n * Date and time the notification of fraud was created.\n * @readonly\n * @immutable\n */\n _createdDate?: Date | null;\n}\n\n/** Standardized fraud reason. */\nexport enum Reason {\n /** Cardholder reported that a newly issued card was intercepted before it reached them. */\n CARD_NEVER_RECEIVED = 'CARD_NEVER_RECEIVED',\n /** Card was issued based on a fraudulent application. */\n FRAUDULENT_CARD_APPLICATION = 'FRAUDULENT_CARD_APPLICATION',\n /** Transaction was made with a counterfeit card. */\n MADE_WITH_COUNTERFEIT_CARD = 'MADE_WITH_COUNTERFEIT_CARD',\n /** Transaction was made with a card the cardholder had reported as lost. */\n MADE_WITH_LOST_CARD = 'MADE_WITH_LOST_CARD',\n /** Transaction was made with a card the cardholder had reported as stolen. */\n MADE_WITH_STOLEN_CARD = 'MADE_WITH_STOLEN_CARD',\n /** Catch-all for fraud reasons that don't fit any other category, or that the upstream payment provider reported in a non-standard form. */\n MISCELLANEOUS = 'MISCELLANEOUS',\n /** Cardholder reported that the transaction was made without their authorization. */\n UNAUTHORIZED_USE_OF_CARD = 'UNAUTHORIZED_USE_OF_CARD',\n /** Generic fraud signal that doesn't classify the reason further. Typically used by non-card payment methods. */\n FRAUD = 'FRAUD',\n /** Cardholder's account was taken over by a third party who then made the transaction. */\n ACCOUNT_TAKEOVER_FRAUD = 'ACCOUNT_TAKEOVER_FRAUD',\n /** Card-not-present fraud, typically an online transaction made without the physical card. */\n CARD_NOT_PRESENT_FRAUD = 'CARD_NOT_PRESENT_FRAUD',\n /** The same card information was used for multiple unauthorized imprints. */\n MULTIPLE_IMPRINT_FRAUD = 'MULTIPLE_IMPRINT_FRAUD',\n /** Card was used at a merchant suspected of colluding in a bust-out scheme. */\n BUST_OUT_COLLUSIVE_MERCHANT = 'BUST_OUT_COLLUSIVE_MERCHANT',\n /** The card account number was used fraudulently without the physical card. */\n FRAUDULENT_USE_OF_ACCOUNT_NUMBER = 'FRAUDULENT_USE_OF_ACCOUNT_NUMBER',\n /** Card network flagged the transaction as incorrectly processed in a way that resembles fraud. */\n INCORRECT_PROCESSING = 'INCORRECT_PROCESSING',\n /** Merchant misrepresented goods or services to the cardholder. */\n MERCHANT_MISREPRESENTATION = 'MERCHANT_MISREPRESENTATION',\n /** Acquiring bank reported that the card used in the transaction is counterfeit. */\n ACQUIRER_REPORTED_COUNTERFEIT = 'ACQUIRER_REPORTED_COUNTERFEIT',\n}\n\n/** @enumType */\nexport type ReasonWithLiterals =\n | Reason\n | 'CARD_NEVER_RECEIVED'\n | 'FRAUDULENT_CARD_APPLICATION'\n | 'MADE_WITH_COUNTERFEIT_CARD'\n | 'MADE_WITH_LOST_CARD'\n | 'MADE_WITH_STOLEN_CARD'\n | 'MISCELLANEOUS'\n | 'UNAUTHORIZED_USE_OF_CARD'\n | 'FRAUD'\n | 'ACCOUNT_TAKEOVER_FRAUD'\n | 'CARD_NOT_PRESENT_FRAUD'\n | 'MULTIPLE_IMPRINT_FRAUD'\n | 'BUST_OUT_COLLUSIVE_MERCHANT'\n | 'FRAUDULENT_USE_OF_ACCOUNT_NUMBER'\n | 'INCORRECT_PROCESSING'\n | 'MERCHANT_MISREPRESENTATION'\n | 'ACQUIRER_REPORTED_COUNTERFEIT';\n\n/** Request to synchronize a payment. */\nexport interface SyncPaymentRequest {\n /**\n * Payment ID. This is the source charge ID.\n * @format GUID\n */\n paymentId?: string;\n}\n\n/** Response returned after a payment sync request. */\nexport interface SyncPaymentResponse {\n /** The synchronized payment. */\n payment?: Payment;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\n/** Request to retrieve a payment. */\nexport interface GetPaymentRequest {\n /**\n * Payment ID. This is the source charge ID.\n * @format GUID\n */\n paymentId: string;\n}\n\n/** Response containing the requested payment. */\nexport interface GetPaymentResponse {\n /** Retrieved payment. */\n payment?: Payment;\n}\n\n/** Request to search payments. */\nexport interface SearchPaymentsRequest {\n /**\n * Search options.\n *\n * For supported full-text, filter, and sort fields, see @Supported Filters and Search Fields.\n */\n search?: CursorSearch;\n}\n\nexport interface CursorSearch extends CursorSearchPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Use the cursor from `pagingMetadata.cursors` in the previous\n * response to retrieve another page.\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n /**\n * Filter object.\n *\n * For supported payment filters, see @Supported Filters and Search Fields.\n * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).\n */\n filter?: Record<string, any> | null;\n /**\n * Sort fields.\n *\n * For supported payment sort fields, see @Supported Filters and Search Fields.\n * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).\n * @maxSize 10\n */\n sort?: Sorting[];\n /** Free text to match against searchable payment fields. */\n search?: SearchDetails;\n /**\n * UTC offset or IANA time zone. Valid values are\n * ISO 8601 UTC offsets, such as +02:00 or -06:00,\n * and IANA time zone IDs, such as Europe/Rome.\n *\n * Affects all date filters. You can override this behavior for a specific\n * filter by specifying a timestamp that includes a time zone, such as\n * `\"2023-12-20T10:52:34.795Z\"`.\n * @maxLength 50\n */\n timeZone?: string | null;\n}\n\n/** @oneof */\nexport interface CursorSearchPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Use the cursor from `pagingMetadata.cursors` in the previous\n * response to retrieve another page.\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface SearchDetails {\n /** Defines how separate search terms in `expression` are combined. */\n mode?: ModeWithLiterals;\n /**\n * Search term or expression.\n * @maxLength 100\n */\n expression?: string | null;\n /**\n * Fields to search. If omitted, all searchable fields are searched. Use dot\n * notation to specify a JSON path.\n *\n * For supported payment search fields, see @Supported Filters and Search Fields.\n * @maxLength 200\n * @maxSize 20\n */\n fields?: string[];\n /** Whether to use automatic fuzzy search that allows typos. */\n fuzzy?: boolean;\n}\n\nexport enum Mode {\n /** Any of the search terms must be present. */\n OR = 'OR',\n /** All search terms must be present. */\n AND = 'AND',\n}\n\n/** @enumType */\nexport type ModeWithLiterals = Mode | 'OR' | 'AND';\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results. Defaults to 50 if not provided.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\n/**\n * Response containing a page of payments that match the search and the\n * pagination metadata for the current page.\n */\nexport interface SearchPaymentsResponse {\n /** Payments matching the search. */\n payments?: Payment[];\n /** Cursor paging metadata for the current page. */\n pagingMetadata?: CursorPagingMetadata;\n /**\n * Aggregation results.\n * @internal\n */\n aggregationData?: AggregationData;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in current page. */\n count?: number | null;\n /** Cursor strings that point to the next page, previous page, or both. */\n cursors?: Cursors;\n /**\n * Whether there are more pages to retrieve following the current page.\n *\n * + `true`: Another page of results can be retrieved.\n * + `false`: This is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface AggregationData {\n /**\n * key = aggregation name (as derived from search request).\n * @maxSize 10000\n */\n results?: AggregationResults[];\n}\n\nexport interface ValueAggregationResult {\n /**\n * Value of the field.\n * @maxLength 100\n */\n value?: string;\n /** Count of entities with this value. */\n count?: number;\n}\n\nexport interface RangeAggregationResult {\n /** Inclusive lower bound of the range. */\n from?: number | null;\n /** Exclusive upper bound of the range. */\n to?: number | null;\n /** Count of entities in this range. */\n count?: number;\n}\n\nexport enum ScalarType {\n /** Count of distinct values. */\n COUNT_DISTINCT = 'COUNT_DISTINCT',\n /** Minimum value. */\n MIN = 'MIN',\n /** Maximum value. */\n MAX = 'MAX',\n /**\n * Sum of values.\n * @internal\n */\n SUM = 'SUM',\n /**\n * Average of values.\n * @internal\n */\n AVG = 'AVG',\n}\n\n/** @enumType */\nexport type ScalarTypeWithLiterals =\n | ScalarType\n | 'COUNT_DISTINCT'\n | 'MIN'\n | 'MAX';\n\nexport interface ValueResult {\n /**\n * Value of the field.\n * @maxLength 1000\n */\n value?: string;\n /** Count of entities with this value. */\n count?: number | null;\n}\n\nexport interface RangeResult {\n /** Inclusive lower bound of the range. */\n from?: number | null;\n /** Exclusive upper bound of the range. */\n to?: number | null;\n /** Count of entities in this range. */\n count?: number | null;\n}\n\nexport interface ScalarResult {\n /** Value of the scalar aggregation. */\n value?: number;\n}\n\nexport interface NestedResultValue extends NestedResultValueResultOneOf {\n /** Value aggregation result. */\n value?: ValueResult;\n /** Range aggregation result. */\n range?: RangeResult;\n /** Scalar aggregation result. */\n scalar?: ScalarResult;\n /** Date histogram aggregation result. */\n dateHistogram?: ValueResult;\n}\n\n/** @oneof */\nexport interface NestedResultValueResultOneOf {\n /** Value aggregation result. */\n value?: ValueResult;\n /** Range aggregation result. */\n range?: RangeResult;\n /** Scalar aggregation result. */\n scalar?: ScalarResult;\n /** Date histogram aggregation result. */\n dateHistogram?: ValueResult;\n}\n\nexport interface Results {\n /** List of nested aggregations. */\n results?: Record<string, NestedResultValue>;\n}\n\nexport interface DateHistogramResult {\n /**\n * Date in ISO 8601 format.\n * @maxLength 100\n */\n value?: string;\n /** Count of documents in the bucket. */\n count?: number;\n}\n\nexport enum AggregationType {\n /** An aggregation where result buckets are dynamically built - one per unique value. */\n VALUE = 'VALUE',\n /** An aggregation, where user can define set of ranges - each representing a bucket. */\n RANGE = 'RANGE',\n /** A single-value metric aggregation. For example, min, max, sum, avg. */\n SCALAR = 'SCALAR',\n /** An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) */\n DATE_HISTOGRAM = 'DATE_HISTOGRAM',\n /** Multi-level aggregation, where each next aggregation is nested within previous one. */\n NESTED = 'NESTED',\n}\n\n/** @enumType */\nexport type AggregationTypeWithLiterals =\n | AggregationType\n | 'VALUE'\n | 'RANGE'\n | 'SCALAR'\n | 'DATE_HISTOGRAM'\n | 'NESTED';\n\nexport interface ValueResults {\n /**\n * List of value aggregations.\n * @maxSize 250\n */\n results?: ValueAggregationResult[];\n}\n\nexport interface RangeResults {\n /**\n * List of ranges returned in same order as requested.\n * @maxSize 50\n */\n results?: RangeAggregationResult[];\n}\n\nexport interface AggregationResultsScalarResult {\n /** Type of scalar aggregation. */\n type?: ScalarTypeWithLiterals;\n /** Value of the scalar aggregation. */\n value?: number;\n}\n\nexport interface DateHistogramResults {\n /**\n * List of date histogram aggregations.\n * @maxSize 200\n */\n results?: DateHistogramResult[];\n}\n\n/**\n * Results of `NESTED` aggregation type in a flattened form.\n * Aggregations in resulting array are keyed by requested aggregation `name`.\n */\nexport interface NestedResults {\n /**\n * List of nested aggregations.\n * @maxSize 1000\n */\n results?: Results[];\n}\n\nexport interface AggregationResults extends AggregationResultsResultOneOf {\n /** Value aggregation results. */\n values?: ValueResults;\n /** Range aggregation results. */\n ranges?: RangeResults;\n /** Scalar aggregation results. */\n scalar?: AggregationResultsScalarResult;\n /** Date histogram aggregation results. */\n dateHistogram?: DateHistogramResults;\n /** Nested aggregation results. */\n nested?: NestedResults;\n /**\n * User-defined name of aggregation as derived from search request.\n * @maxLength 100\n */\n name?: string;\n /** Type of aggregation that must match provided kind as derived from search request. */\n type?: AggregationTypeWithLiterals;\n /**\n * Field to aggregate by as derived from search request.\n * @maxLength 200\n */\n fieldPath?: string;\n}\n\n/** @oneof */\nexport interface AggregationResultsResultOneOf {\n /** Value aggregation results. */\n values?: ValueResults;\n /** Range aggregation results. */\n ranges?: RangeResults;\n /** Scalar aggregation results. */\n scalar?: AggregationResultsScalarResult;\n /** Date histogram aggregation results. */\n dateHistogram?: DateHistogramResults;\n /** Nested aggregation results. */\n nested?: NestedResults;\n}\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n accountInfo?: AccountInfoMetadata;\n}\n\nexport interface AccountInfoMetadata {\n /** ID of the Wix account associated with the event */\n accountId: string;\n /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */\n siteId?: string;\n /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */\n parentAccountId?: string;\n}\n\nexport interface PaymentCreatedEnvelope {\n entity: Payment;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a payment is created.\n * @permissionScope SCOPE.PAYMENTS.PAYMENT_READ\n * @permissionScopeId SCOPE.PAYMENTS.PAYMENT_READ\n * @permissionId payments:platform:v1:payment:read_events\n * @webhook\n * @eventType wix.payments.platform.v1.payment_created\n * @slug created\n * @documentationMaturity preview\n */\nexport declare function onPaymentCreated(\n handler: (event: PaymentCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface PaymentUpdatedEnvelope {\n entity: Payment;\n metadata: EventMetadata;\n /** @hidden */\n modifiedFields: Record<string, any>;\n}\n\n/**\n * Triggered when a payment is updated.\n * @permissionScope SCOPE.PAYMENTS.PAYMENT_READ\n * @permissionScopeId SCOPE.PAYMENTS.PAYMENT_READ\n * @permissionId payments:platform:v1:payment:read_events\n * @webhook\n * @eventType wix.payments.platform.v1.payment_updated\n * @slug updated\n * @documentationMaturity preview\n */\nexport declare function onPaymentUpdated(\n handler: (event: PaymentUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Retrieves a payment by ID.\n *\n * The payment ID is identical to the source charge ID, so the same value can\n * be used to look up the underlying charge.\n * @param paymentId - Payment ID. This is the source charge ID.\n * @public\n * @documentationMaturity preview\n * @requiredField paymentId\n * @permissionId payments:platform:v1:payment:get_payment\n * @applicableIdentity APP\n * @returns Retrieved payment.\n * @fqn wix.payments.platform.v1.Payments.GetPayment\n */\nexport async function getPayment(\n paymentId: string\n): Promise<\n NonNullablePaths<\n Payment,\n | `charge.status`\n | `charge.statusDetails.providerStatusReasons`\n | `charge.orderLineItems`\n | `charge.billingInfo.contactDetails.vatId._id`\n | `charge.billingInfo.contactDetails.vatId.type`\n | `charge.billingInfo.address.streetAddress.number`\n | `charge.billingInfo.address.streetAddress.name`\n | `refunds`\n | `refunds.${number}.status`\n | `refunds.${number}.statusInfo.code`\n | `disputes`\n | `disputes.${number}._id`\n | `disputes.${number}.stage`\n | `disputes.${number}.reason`\n | `disputes.${number}.status`\n | `disputes.${number}.sellerProtection`\n | `disputes.${number}.channel`\n | `disputes.${number}.providerDisputeId`\n | `notificationOfFraud.reason`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n paymentId: paymentId,\n });\n\n const reqOpts = ambassadorWixPaymentsPlatformV1Payment.getPayment(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'payment.charge.billingInfo.address' },\n { path: 'payment.charge.shippingInfo.address' },\n ],\n },\n ])\n )?.payment!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { paymentId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['paymentId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves payments matching the provided full-text search, structured\n * filters, or correlated nested matching.\n *\n * Use Search Payments to find payments by buyer name, buyer or shipping\n * email, or order item name, or to require multiple conditions to match the\n * same refund or dispute item rather than the payment as a whole.\n *\n * Payments are updated asynchronously. After a charge, refund, dispute, or\n * notification of fraud changes, the payment reflects the change within a\n * few seconds.\n *\n * For supported full-text, filter, and sort fields, see @Supported Filters and Search Fields.\n * @param search - Search options.\n *\n * For supported full-text, filter, and sort fields, see\n * @public\n * @documentationMaturity preview\n * @requiredField search\n * @permissionId payments:platform:v1:payment:search_payments\n * @applicableIdentity APP\n * @returns Response containing a page of payments that match the search and the\n * pagination metadata for the current page.\n * @fqn wix.payments.platform.v1.Payments.SearchPayments\n */\nexport async function searchPayments(\n search: PaymentSearch\n): Promise<\n NonNullablePaths<\n SearchPaymentsResponse,\n | `payments`\n | `payments.${number}.charge.status`\n | `payments.${number}.notificationOfFraud.reason`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ search: search });\n\n const reqOpts =\n ambassadorWixPaymentsPlatformV1Payment.searchPayments(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'payments.charge.billingInfo.address' },\n { path: 'payments.charge.shippingInfo.address' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { search: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['search']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface PaymentSearchSpec extends SearchSpec {\n searchable: [\n 'charge.billingInfo.contactDetails.email',\n 'charge.billingInfo.contactDetails.firstName',\n 'charge.billingInfo.contactDetails.lastName',\n 'charge.orderLineItems.name',\n 'charge.shippingInfo.contactDetails.email'\n ];\n paging: 'cursor';\n wql: [\n {\n operators: '*';\n fields: ['_createdDate', '_id', 'refundable'];\n sort: 'BOTH';\n },\n {\n operators: '*';\n fields: ['appId'];\n sort: 'NONE';\n },\n {\n operators: '*';\n fields: [\n 'charge.amount',\n 'charge.currencyCode',\n 'charge.paymentMethod.paymentBrandId',\n 'charge.paymentMethod.paymentMethodTypeId',\n 'charge.providerId',\n 'charge.status'\n ];\n sort: 'BOTH';\n },\n {\n operators: ['$matchItems'];\n fields: ['refunds'];\n sort: 'NONE';\n },\n {\n operators: ['$matchItems'];\n fields: ['disputes'];\n sort: 'NONE';\n },\n {\n operators: '*';\n fields: [\n 'notificationOfFraud._createdDate',\n 'notificationOfFraud.reason'\n ];\n sort: 'BOTH';\n }\n ];\n}\n\nexport type CommonSearchWithEntityContext = SearchSdkType<\n Payment,\n PaymentSearchSpec\n>;\nexport type PaymentSearch = {\n /** \n Cursor paging options.\n\n Use the cursor from `pagingMetadata.cursors` in the previous\n response to retrieve another page.\n Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging). \n */\n cursorPaging?: {\n /** \n Maximum number of items to return in the results. Defaults to 50 if not provided. \n @max: 100 \n */\n limit?:\n | NonNullable<CommonSearchWithEntityContext['cursorPaging']>['limit']\n | null;\n /** \n Pointer to the next or previous page in the list of results.\n\n Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n Not relevant for the first request. \n @maxLength: 16000 \n */\n cursor?:\n | NonNullable<CommonSearchWithEntityContext['cursorPaging']>['cursor']\n | null;\n };\n /** \n Filter object.\n\n For supported payment filters, see \n @Supported: Filters and Search Fields.\n Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section). \n */\n filter?: CommonSearchWithEntityContext['filter'] | null;\n /** \n Sort fields.\n\n For supported payment sort fields, see \n @Supported: Filters and Search Fields.\n Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).,\n @maxSize: 10 \n */\n sort?: {\n /** \n Name of the field to sort by. \n @maxLength: 512 \n */\n fieldName?: NonNullable<\n CommonSearchWithEntityContext['sort']\n >[number]['fieldName'];\n /** \n Sort order. \n */\n order?: NonNullable<CommonSearchWithEntityContext['sort']>[number]['order'];\n }[];\n /** \n Free text to match against searchable payment fields. \n */\n search?: {\n /** \n Defines how separate search terms in `expression` are combined. \n */\n mode?: NonNullable<CommonSearchWithEntityContext['search']>['mode'];\n /** \n Search term or expression. \n @maxLength: 100 \n */\n expression?:\n | NonNullable<CommonSearchWithEntityContext['search']>['expression']\n | null;\n /** \n Fields to search. If omitted, all searchable fields are searched. Use dot\n notation to specify a JSON path.\n\n For supported payment search fields, see \n @Supported: Filters and Search Fields.,\n @maxLength: 200,\n @maxSize: 20 \n */\n fields?: NonNullable<CommonSearchWithEntityContext['search']>['fields'];\n /** \n Whether to use automatic fuzzy search that allows typos. \n */\n fuzzy?: NonNullable<CommonSearchWithEntityContext['search']>['fuzzy'];\n };\n /** \n UTC offset or IANA time zone. Valid values are\n ISO 8601 UTC offsets, such as +02:00 or -06:00,\n and IANA time zone IDs, such as Europe/Rome.\n\n Affects all date filters. You can override this behavior for a specific\n filter by specifying a timestamp that includes a time zone, such as\n `\"2023-12-20T10:52:34.795Z\"`. \n @maxLength: 50 \n */\n timeZone?: CommonSearchWithEntityContext['timeZone'] | null;\n};\n\nexport const utils = {\n search: /*#__PURE__*/ createSearchUtils<\n Payment,\n PaymentSearchSpec,\n PaymentSearch\n >(),\n};\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixPaymentsPlatformV1PaymentsUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/payments',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/payments/platform/v1/payments',\n destPath: '/v1/payments',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_payments_payments';\n\n/**\n * Retrieves a payment by ID.\n *\n * The payment ID is identical to the source charge ID, so the same value can\n * be used to look up the underlying charge.\n */\nexport function getPayment(payload: object): RequestOptionsFactory<any> {\n function __getPayment({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.platform.v1.payment',\n method: 'GET' as any,\n methodFqn: 'wix.payments.platform.v1.Payments.GetPayment',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsPlatformV1PaymentsUrl({\n protoPath: '/v1/payments/{paymentId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'payment.createdDate' },\n { path: 'payment.updatedDate' },\n { path: 'payment.charge.createdDate' },\n { path: 'payment.charge.updatedDate' },\n { path: 'payment.refunds.createdDate' },\n { path: 'payment.refunds.updatedDate' },\n { path: 'payment.disputes.dueDate' },\n { path: 'payment.disputes.defendedDate' },\n { path: 'payment.disputes.acceptedDate' },\n { path: 'payment.disputes.createdDate' },\n { path: 'payment.disputes.updatedDate' },\n { path: 'payment.disputes.actions.dueDate' },\n { path: 'payment.notificationOfFraud.createdDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'payment.charge.billingInfo.address.geocode.latitude' },\n { path: 'payment.charge.billingInfo.address.geocode.longitude' },\n { path: 'payment.charge.shippingInfo.address.geocode.latitude' },\n { path: 'payment.charge.shippingInfo.address.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getPayment;\n}\n\n/**\n * Retrieves payments matching the provided full-text search, structured\n * filters, or correlated nested matching.\n *\n * Use Search Payments to find payments by buyer name, buyer or shipping\n * email, or order item name, or to require multiple conditions to match the\n * same refund or dispute item rather than the payment as a whole.\n *\n * Payments are updated asynchronously. After a charge, refund, dispute, or\n * notification of fraud changes, the payment reflects the change within a\n * few seconds.\n *\n * For supported full-text, filter, and sort fields, see @Supported Filters and Search Fields.\n */\nexport function searchPayments(payload: object): RequestOptionsFactory<any> {\n function __searchPayments({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.platform.v1.payment',\n method: 'POST' as any,\n methodFqn: 'wix.payments.platform.v1.Payments.SearchPayments',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsPlatformV1PaymentsUrl({\n protoPath: '/v1/payments/search',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'payments.createdDate' },\n { path: 'payments.updatedDate' },\n { path: 'payments.charge.createdDate' },\n { path: 'payments.charge.updatedDate' },\n { path: 'payments.refunds.createdDate' },\n { path: 'payments.refunds.updatedDate' },\n { path: 'payments.disputes.dueDate' },\n { path: 'payments.disputes.defendedDate' },\n { path: 'payments.disputes.acceptedDate' },\n { path: 'payments.disputes.createdDate' },\n { path: 'payments.disputes.updatedDate' },\n { path: 'payments.disputes.actions.dueDate' },\n { path: 'payments.notificationOfFraud.createdDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'payments.charge.billingInfo.address.geocode.latitude' },\n { path: 'payments.charge.billingInfo.address.geocode.longitude' },\n { path: 'payments.charge.shippingInfo.address.geocode.latitude' },\n {\n path: 'payments.charge.shippingInfo.address.geocode.longitude',\n },\n { path: 'aggregationData.results.ranges.results.from' },\n { path: 'aggregationData.results.ranges.results.to' },\n {\n path: 'aggregationData.results.nested.results.results.*.range.from',\n },\n {\n path: 'aggregationData.results.nested.results.results.*.range.to',\n },\n { path: 'aggregationData.results.scalar.value' },\n {\n path: 'aggregationData.results.nested.results.results.*.scalar.value',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __searchPayments;\n}\n","import {\n getPayment as publicGetPayment,\n searchPayments as publicSearchPayments,\n} from './payments-platform-v1-payment-payments.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { onPaymentCreated as publicOnPaymentCreated } from './payments-platform-v1-payment-payments.public.js';\nimport { onPaymentUpdated as publicOnPaymentUpdated } from './payments-platform-v1-payment-payments.public.js';\n\nexport const getPayment: MaybeContext<\n BuildRESTFunction<typeof publicGetPayment> & typeof publicGetPayment\n> = /*#__PURE__*/ createRESTModule(publicGetPayment);\nexport const searchPayments: MaybeContext<\n BuildRESTFunction<typeof publicSearchPayments> & typeof publicSearchPayments\n> = /*#__PURE__*/ createRESTModule(publicSearchPayments);\n/**\n * Triggered when a payment is created.\n */\nexport const onPaymentCreated: BuildEventDefinition<\n typeof publicOnPaymentCreated\n> &\n typeof publicOnPaymentCreated = /*#__PURE__*/ createEventModule(\n publicOnPaymentCreated\n);\n/**\n * Triggered when a payment is updated.\n */\nexport const onPaymentUpdated: BuildEventDefinition<\n typeof publicOnPaymentUpdated\n> &\n typeof publicOnPaymentUpdated = /*#__PURE__*/ createEventModule(\n publicOnPaymentUpdated\n);\n\nexport {\n VatType,\n Status,\n RefundStatus,\n DisputeStage,\n DisputeReason,\n DisputeStatus,\n SellerProtection,\n DisputeChannel,\n DisputeActionType,\n Reason,\n WebhookIdentityType,\n SortOrder,\n Mode,\n ScalarType,\n AggregationType,\n} from './payments-platform-v1-payment-payments.universal.js';\nexport {\n Payment,\n Charge,\n Shipping,\n FullAddressContactDetails,\n VatId,\n Address,\n AddressStreetOneOf,\n StreetAddress,\n AddressLocation,\n Card,\n Account,\n ProviderStatusReason,\n StatusDetails,\n OrderLineItem,\n AmountBreakdown,\n ContactInfo,\n PaymentMethod,\n FlowDetails,\n Buyer,\n Refund,\n StatusInfo,\n Dispute,\n DisputeAction,\n NotificationOfFraud,\n SyncPaymentRequest,\n SyncPaymentResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountInfo,\n GetPaymentRequest,\n GetPaymentResponse,\n SearchPaymentsRequest,\n CursorSearch,\n CursorSearchPagingMethodOneOf,\n Sorting,\n SearchDetails,\n CursorPaging,\n SearchPaymentsResponse,\n CursorPagingMetadata,\n Cursors,\n AggregationData,\n ValueAggregationResult,\n RangeAggregationResult,\n ValueResult,\n RangeResult,\n ScalarResult,\n NestedResultValue,\n NestedResultValueResultOneOf,\n Results,\n DateHistogramResult,\n ValueResults,\n RangeResults,\n AggregationResultsScalarResult,\n DateHistogramResults,\n NestedResults,\n AggregationResults,\n AggregationResultsResultOneOf,\n BaseEventMetadata,\n EventMetadata,\n AccountInfoMetadata,\n PaymentCreatedEnvelope,\n PaymentUpdatedEnvelope,\n PaymentSearchSpec,\n} from './payments-platform-v1-payment-payments.universal.js';\nexport { utils } from './payments-platform-v1-payment-payments.universal.js';\nexport {\n VatTypeWithLiterals,\n StatusWithLiterals,\n RefundStatusWithLiterals,\n DisputeStageWithLiterals,\n DisputeReasonWithLiterals,\n DisputeStatusWithLiterals,\n SellerProtectionWithLiterals,\n DisputeChannelWithLiterals,\n DisputeActionTypeWithLiterals,\n ReasonWithLiterals,\n WebhookIdentityTypeWithLiterals,\n SortOrderWithLiterals,\n ModeWithLiterals,\n ScalarTypeWithLiterals,\n AggregationTypeWithLiterals,\n CommonSearchWithEntityContext,\n PaymentSearch,\n} from './payments-platform-v1-payment-payments.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAAA;AAAA,EAAA,wBAAAC;AAAA,EAAA,wBAAAC;AAAA,EAAA,sBAAAC;AAAA,EAAA;AAAA;AAAA;;;ACAA,IAAAC,iCAAwD;AACxD,IAAAC,kBAAiD;AACjD,IAAAC,oBAAqD;AACrD,IAAAC,0BAA+B;AAC/B,uBAA8D;;;ACJ9D,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,mBAA6C;AAC7C,uBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,wCACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,aAAO,iCAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAQd,SAAS,WAAW,SAA6C;AACtE,WAAS,aAAa,EAAE,KAAK,GAAQ;AACnC,UAAM,WAAW;AAAA,MAC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UAC7C,EAAE,MAAM,kCAAkC;AAAA,UAC1C,EAAE,MAAM,uCAAuC;AAAA,UAC/C,EAAE,MAAM,uCAAuC;AAAA,UAC/C,EAAE,MAAM,sCAAsC;AAAA,UAC9C,EAAE,MAAM,sCAAsC;AAAA,UAC9C,EAAE,MAAM,0CAA0C;AAAA,UAClD,EAAE,MAAM,iDAAiD;AAAA,QAC3D;AAAA,MACF;AAAA,MACA;AAAA,QACE,aAAa;AAAA,QACb,OAAO;AAAA,UACL,EAAE,MAAM,oCAAoC;AAAA,UAC5C,EAAE,MAAM,qCAAqC;AAAA,UAC7C,EAAE,MAAM,4CAA4C;AAAA,UACpD,EAAE,MAAM,6CAA6C;AAAA,QACvD;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH;AACJ,EAA0B;;;AGxL1B,IAAAC,uBAAiC;AACjC,sCAAkC;AAS3B,IAAMC,cAEK,2DAAiBA,WAAgB;AAC5C,IAAMC,kBAEK,2DAAiBA,eAAoB;AAIhD,IAAMC,oBAGmC;AAAA,EAC9C;AACF;AAIO,IAAMC,oBAGmC;AAAA,EAC9C;AACF;","names":["getPayment","onPaymentCreated","onPaymentUpdated","searchPayments","import_rename_all_nested_keys","import_address","import_timestamp","import_transform_paths","import_rest_modules","payload","import_transform_paths","VatType","Status","RefundStatus","DisputeStage","DisputeReason","DisputeStatus","SellerProtection","DisputeChannel","DisputeActionType","Reason","WebhookIdentityType","SortOrder","Mode","ScalarType","AggregationType","getPayment","sdkTransformError","searchPayments","getPayment","searchPayments","import_rest_modules","getPayment","searchPayments","onPaymentCreated","onPaymentUpdated"]}
@@ -1,5 +1,5 @@
1
- import { a5 as CursorSearch, S as SearchPaymentsResponse } from './payments-platform-v1-payment-payments.universal-DeCl2FPc.js';
2
- export { t as Account, a1 as AccountInfo, av as AccountInfoMetadata, Z as ActionEvent, o as Address, r as AddressLocation, p as AddressStreetOneOf, ac as AggregationData, ar as AggregationResults, as as AggregationResultsResultOneOf, ao as AggregationResultsScalarResult, A as AggregationType, aM as AggregationTypeWithLiterals, w as AmountBreakdown, at as BaseEventMetadata, B as Buyer, s as Card, C as Charge, aN as CommonSearchWithEntityContext, x as ContactInfo, a9 as CursorPaging, aa as CursorPagingMetadata, a6 as CursorSearchPagingMethodOneOf, ab as Cursors, al as DateHistogramResult, ap as DateHistogramResults, H as Dispute, I as DisputeAction, i as DisputeActionType, aG as DisputeActionTypeWithLiterals, h as DisputeChannel, aF as DisputeChannelWithLiterals, e as DisputeReason, aC as DisputeReasonWithLiterals, D as DisputeStage, aB as DisputeStageWithLiterals, f as DisputeStatus, aD as DisputeStatusWithLiterals, L as DomainEvent, Q as DomainEventBodyOneOf, T as EntityCreatedEvent, Y as EntityDeletedEvent, X as EntityUpdatedEvent, au as EventMetadata, z as FlowDetails, F as FullAddressContactDetails, a2 as GetPaymentRequest, a3 as GetPaymentResponse, $ as IdentificationData, a0 as IdentificationDataIdOneOf, _ as MessageEnvelope, M as Mode, aK as ModeWithLiterals, ai as NestedResultValue, aj as NestedResultValueResultOneOf, aq as NestedResults, N as NotificationOfFraud, O as OrderLineItem, P as Payment, b as PaymentCreatedEnvelope, y as PaymentMethod, aw as PaymentSearchSpec, c as PaymentUpdatedEnvelope, u as ProviderStatusReason, ae as RangeAggregationResult, ag as RangeResult, an as RangeResults, j as Reason, aH as ReasonWithLiterals, E as Refund, R as RefundStatus, aA as RefundStatusWithLiterals, U as RestoreInfo, ak as Results, ah as ScalarResult, l as ScalarType, aL as ScalarTypeWithLiterals, a8 as SearchDetails, a4 as SearchPaymentsRequest, g as SellerProtection, aE as SellerProtectionWithLiterals, m as Shipping, k as SortOrder, aJ as SortOrderWithLiterals, a7 as Sorting, d as Status, v as StatusDetails, G as StatusInfo, az as StatusWithLiterals, q as StreetAddress, J as SyncPaymentRequest, K as SyncPaymentResponse, ad as ValueAggregationResult, af as ValueResult, am as ValueResults, n as VatId, V as VatType, ay as VatTypeWithLiterals, W as WebhookIdentityType, aI as WebhookIdentityTypeWithLiterals, aQ as getPayment, aO as onPaymentCreated, aP as onPaymentUpdated, ax as utils } from './payments-platform-v1-payment-payments.universal-DeCl2FPc.js';
1
+ import { a5 as CursorSearch, S as SearchPaymentsResponse } from './payments-platform-v1-payment-payments.universal-CRtsFbYB.js';
2
+ export { t as Account, a1 as AccountInfo, av as AccountInfoMetadata, Z as ActionEvent, o as Address, r as AddressLocation, p as AddressStreetOneOf, ac as AggregationData, ar as AggregationResults, as as AggregationResultsResultOneOf, ao as AggregationResultsScalarResult, A as AggregationType, aM as AggregationTypeWithLiterals, w as AmountBreakdown, at as BaseEventMetadata, B as Buyer, s as Card, C as Charge, aN as CommonSearchWithEntityContext, x as ContactInfo, a9 as CursorPaging, aa as CursorPagingMetadata, a6 as CursorSearchPagingMethodOneOf, ab as Cursors, al as DateHistogramResult, ap as DateHistogramResults, H as Dispute, I as DisputeAction, i as DisputeActionType, aG as DisputeActionTypeWithLiterals, h as DisputeChannel, aF as DisputeChannelWithLiterals, e as DisputeReason, aC as DisputeReasonWithLiterals, D as DisputeStage, aB as DisputeStageWithLiterals, f as DisputeStatus, aD as DisputeStatusWithLiterals, L as DomainEvent, Q as DomainEventBodyOneOf, T as EntityCreatedEvent, Y as EntityDeletedEvent, X as EntityUpdatedEvent, au as EventMetadata, z as FlowDetails, F as FullAddressContactDetails, a2 as GetPaymentRequest, a3 as GetPaymentResponse, $ as IdentificationData, a0 as IdentificationDataIdOneOf, _ as MessageEnvelope, M as Mode, aK as ModeWithLiterals, ai as NestedResultValue, aj as NestedResultValueResultOneOf, aq as NestedResults, N as NotificationOfFraud, O as OrderLineItem, P as Payment, b as PaymentCreatedEnvelope, y as PaymentMethod, aw as PaymentSearchSpec, c as PaymentUpdatedEnvelope, u as ProviderStatusReason, ae as RangeAggregationResult, ag as RangeResult, an as RangeResults, j as Reason, aH as ReasonWithLiterals, E as Refund, R as RefundStatus, aA as RefundStatusWithLiterals, U as RestoreInfo, ak as Results, ah as ScalarResult, l as ScalarType, aL as ScalarTypeWithLiterals, a8 as SearchDetails, a4 as SearchPaymentsRequest, g as SellerProtection, aE as SellerProtectionWithLiterals, m as Shipping, k as SortOrder, aJ as SortOrderWithLiterals, a7 as Sorting, d as Status, v as StatusDetails, G as StatusInfo, az as StatusWithLiterals, q as StreetAddress, J as SyncPaymentRequest, K as SyncPaymentResponse, ad as ValueAggregationResult, af as ValueResult, am as ValueResults, n as VatId, V as VatType, ay as VatTypeWithLiterals, W as WebhookIdentityType, aI as WebhookIdentityTypeWithLiterals, aQ as getPayment, aO as onPaymentCreated, aP as onPaymentUpdated, ax as utils } from './payments-platform-v1-payment-payments.universal-CRtsFbYB.js';
3
3
  import '@wix/sdk-types';
4
4
 
5
5
  /** @hidden */
@@ -25,6 +25,7 @@ type PaymentSearch = {};
25
25
  * @documentationMaturity preview
26
26
  * @requiredField search
27
27
  * @permissionId payments:platform:v1:payment:search_payments
28
+ * @applicableIdentity APP
28
29
  * @returns Response containing a page of payments that match the search and the
29
30
  * pagination metadata for the current page.
30
31
  * @fqn wix.payments.platform.v1.Payments.SearchPayments