@wix/auto_sdk_payments_disputes 1.0.37 → 1.0.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/build/cjs/index.d.ts +1 -1
  2. package/build/cjs/index.js +0 -2
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +11 -103
  5. package/build/cjs/index.typings.js +0 -2
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +257 -13
  8. package/build/cjs/meta.js +79 -0
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +1 -1
  11. package/build/es/index.mjs +0 -2
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +11 -103
  14. package/build/es/index.typings.mjs +0 -2
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +257 -13
  17. package/build/es/meta.mjs +71 -0
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +1 -1
  20. package/build/internal/cjs/index.js +0 -2
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +11 -103
  23. package/build/internal/cjs/index.typings.js +0 -2
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +257 -13
  26. package/build/internal/cjs/meta.js +79 -0
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +1 -1
  29. package/build/internal/es/index.mjs +0 -2
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +11 -103
  32. package/build/internal/es/index.typings.mjs +0 -2
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +257 -13
  35. package/build/internal/es/meta.mjs +71 -0
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/payments-disputes-v1-dispute-disputes.universal.ts","../../src/payments-disputes-v1-dispute-disputes.http.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, HttpResponse, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixPaymentsDisputesV1Dispute from './payments-disputes-v1-dispute-disputes.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\n/**\n * A dispute occurs when a customer contacts their payment service provider (PSP) or bank to contest a payment for reasons such as fraud, service issues, or billing errors.\n *\n * Disputes follow a structured lifecycle from creation through resolution.\n * Merchants can either accept liability or defend with evidence, depending on the available actions and due dates.\n * The dispute's channel (internal vs external) affects processing timelines and available options.\n */\nexport interface Dispute {\n /**\n * Dispute ID..\n * @format GUID\n * @immutable\n */\n _id?: string;\n /**\n * ID of the charge that is being disputed.\n * @format GUID\n * @immutable\n */\n chargeId?: string;\n /**\n * Unique identifier assigned by the payment service provider for this dispute.\n * @format GUID\n * @immutable\n */\n providerDisputeId?: 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 * Three-letter currency code in @ISO-4217 alphabetic format. Matches the currency of the disputed charge.\n * @immutable\n * @format CURRENCY\n */\n currencyCode?: string | null;\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, indicating 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 * Seller protection helps protect merchants from financial loss on eligible transactions due to unauthorized payments or claims that items were not received.\n * @readonly\n */\n sellerProtection?: SellerProtectionWithLiterals;\n /**\n * Channel through which the dispute is being processed.\n * Internal disputes are handled by the payment processor, while external disputes go through the card network or issuing bank.\n * @readonly\n */\n channel?: DisputeChannelWithLiterals;\n /**\n * The latest date and time until which the dispute can remain in its current status.\n * @readonly\n */\n dueDate?: Date | null;\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 when the dispute was defended.\n * @readonly\n */\n defendedDate?: Date | null;\n /**\n * Date and time when the dispute was accepted.\n * @readonly\n */\n acceptedDate?: Date | null;\n /**\n * 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 * Revision number, which increments by 1 each time the dispute is updated. To prevent conflicting changes, the current revision must be passed when updating the dispute. Ignored when creating a dispute.\n * @readonly\n */\n revision?: string | null;\n /** Data Extensions */\n extendedFields?: ExtendedFields;\n /** Tags */\n tags?: Tags;\n}\n\nexport enum DisputeStage {\n UNKNOWN_DISPUTE_STAGE = 'UNKNOWN_DISPUTE_STAGE',\n /** Formal dispute filed through the card network or issuing bank. */\n CHARGEBACK = 'CHARGEBACK',\n /** Initial inquiry from the cardholder requesting information about the charge. */\n INQUIRY = 'INQUIRY',\n}\n\n/** @enumType */\nexport type DisputeStageWithLiterals =\n | DisputeStage\n | 'UNKNOWN_DISPUTE_STAGE'\n | 'CHARGEBACK'\n | 'INQUIRY';\n\nexport enum DisputeReason {\n /** Unknown dispute reason. */\n UNKNOWN_DISPUTE_REASON = 'UNKNOWN_DISPUTE_REASON',\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 | 'UNKNOWN_DISPUTE_REASON'\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 /** Unknown dispute status. */\n UNKNOWN_DISPUTE_STATUS = 'UNKNOWN_DISPUTE_STATUS',\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 /** Buyer action required to proceed with the dispute. */\n WAITING_BUYER = 'WAITING_BUYER',\n /** Dispute was resolved in favor of the merchant. */\n WON = 'WON',\n /** Dispute was resolved in favor of the customer. */\n LOST = 'LOST',\n /**\n * Evidence has been submitted and is being processed by the payment provider.\n * **Deprecated:** This field will be removed in a future version.\n */\n PROCESSING_EVIDENCE_SUBMISSION = 'PROCESSING_EVIDENCE_SUBMISSION',\n /**\n * Dispute acceptance is being processed by the payment provider.\n * **Deprecated:** This field will be removed in a future version.\n */\n PROCESSING_ACCEPTANCE = 'PROCESSING_ACCEPTANCE',\n}\n\n/** @enumType */\nexport type DisputeStatusWithLiterals =\n | DisputeStatus\n | 'UNKNOWN_DISPUTE_STATUS'\n | 'WAITING_MERCHANT'\n | 'UNDER_REVIEW'\n | 'WAITING_BUYER'\n | 'WON'\n | 'LOST'\n | 'PROCESSING_EVIDENCE_SUBMISSION'\n | 'PROCESSING_ACCEPTANCE';\n\nexport enum SellerProtection {\n UNKNOWN_SELLER_PROTECTION = 'UNKNOWN_SELLER_PROTECTION',\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 | 'UNKNOWN_SELLER_PROTECTION'\n | 'NOT_ELIGIBLE'\n | 'ELIGIBLE'\n | 'EXTENDED';\n\nexport enum DisputeChannel {\n UNKNOWN_DISPUTE_CHANNEL = 'UNKNOWN_DISPUTE_CHANNEL',\n /** Dispute is processed internally by the payment service provider. */\n INTERNAL = 'INTERNAL',\n /** Dispute is processed externally through the card network or issuing bank. */\n EXTERNAL = 'EXTERNAL',\n}\n\n/** @enumType */\nexport type DisputeChannelWithLiterals =\n | DisputeChannel\n | 'UNKNOWN_DISPUTE_CHANNEL'\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 completed. */\n dueDate?: Date | null;\n}\n\nexport enum DisputeActionType {\n /** Unknown dispute action type. */\n UNKNOWN_DISPUTE_ACTION = 'UNKNOWN_DISPUTE_ACTION',\n /** Accept liability for the dispute. */\n ACCEPT = 'ACCEPT',\n /** Defend the dispute by submitting evidence. */\n DEFEND = 'DEFEND',\n}\n\n/** @enumType */\nexport type DisputeActionTypeWithLiterals =\n | DisputeActionType\n | 'UNKNOWN_DISPUTE_ACTION'\n | 'ACCEPT'\n | 'DEFEND';\n\nexport interface ExtendedFields {\n /**\n * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n * The value of each key is structured according to the schema defined when the extended fields were configured.\n *\n * You can only access fields for which you have the appropriate permissions.\n *\n * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n */\n namespaces?: Record<string, Record<string, any>>;\n}\n\n/**\n * Common object for tags.\n * Should be use as in this example:\n * message Foo {\n * option (.wix.api.decomposite_of) = \"wix.commons.v2.tags.Foo\";\n * string id = 1;\n * ...\n * Tags tags = 5\n * }\n *\n * example of taggable entity\n * {\n * id: \"123\"\n * tags: {\n * public_tags: {\n * tag_ids:[\"11\",\"22\"]\n * },\n * private_tags: {\n * tag_ids: [\"33\", \"44\"]\n * }\n * }\n * }\n */\nexport interface Tags {\n /** Tags that require an additional permission in order to access them, normally not given to site members or visitors. */\n privateTags?: TagList;\n /** Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors. */\n publicTags?: TagList;\n}\n\nexport interface TagList {\n /**\n * List of tag IDs.\n * @maxSize 100\n * @maxLength 5\n */\n tagIds?: string[];\n}\n\n/** Triggered when tags are assigned to or unassigned from a dispute. */\nexport interface TagsModified {\n /** Updated dispute. */\n dispute?: Dispute;\n /** Tags that were assigned to the dispute. */\n assignedTags?: Tags;\n /** Tags that were unassigned from the dispute. */\n unassignedTags?: Tags;\n}\n\nexport interface InternalCreateDisputeManuallyRequest {\n /**\n * Dispute Id\n * @format GUID\n */\n disputeId?: string;\n /**\n * Charge Id\n * @format GUID\n */\n chargeId?: string;\n /** Open date */\n openDate?: Date | null;\n /**\n * Provider Dispute Id\n * @minLength 1\n * @maxLength 100\n */\n providerDisputeId?: string;\n /** Dispute stage */\n stage?: DisputeStageWithLiterals;\n /** Dispute reason */\n reason?: DisputeReasonWithLiterals;\n /** Dispute status based on provider dispute status */\n status?: DisputeStatusWithLiterals;\n /** The latest date and time until which the dispute can remain in its current status */\n dueDate?: Date | null;\n /**\n * Dispute currency. Should be the same as the charge currency.\n * @immutable\n * @format CURRENCY\n */\n currencyCode?: string | null;\n /**\n * Dispute Amount in currency's main units (such as dollars or euros). For example, `\"12.95\"`.\n * @immutable\n * @decimalValue options { gt:0, maxScale:8 }\n */\n amount?: string | null;\n /**\n * Network reason code\n * @minLength 1\n * @maxLength 64\n */\n networkReasonCode?: string | null;\n /** External or Internal */\n external?: boolean | null;\n /**\n * Seller protection\n * @minLength 1\n * @maxLength 64\n */\n sellerProtection?: string | null;\n /** Is charge refundable */\n chargeRefundable?: boolean | null;\n /** True if dispute is defendable */\n defendable?: boolean | null;\n /** True if it is an auto dispute */\n autoDefended?: boolean | null;\n}\n\nexport interface InternalCreateDisputeManuallyResponse {}\n\nexport interface InternalChangeDisputeStatusManuallyRequest {\n /**\n * Dispute ID\n * @format GUID\n */\n disputeId?: string;\n /** Changed date */\n changedDate?: Date | null;\n /** Dispute status based on provider dispute status */\n status?: DisputeStatusWithLiterals;\n}\n\nexport interface InternalChangeDisputeStatusManuallyResponse {}\n\nexport interface AcceptDisputeManuallyRequest {\n /**\n * Dispute ID\n * @format GUID\n */\n disputeId?: string;\n /** Accepted date */\n acceptedDate?: Date | null;\n}\n\nexport interface AcceptDisputeManuallyResponse {}\n\nexport interface DefendDisputeManuallyRequest {\n /**\n * Dispute ID\n * @format GUID\n */\n disputeId?: string;\n /** Defense date */\n defendedDate?: Date | null;\n}\n\nexport interface DefendDisputeManuallyResponse {}\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}\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 GetDisputeRequest {\n /**\n * ID of the dispute to retrieve.\n * @format GUID\n */\n disputeId: string;\n}\n\nexport interface GetDisputeResponse {\n /** The requested dispute. */\n dispute?: Dispute;\n}\n\nexport interface QueryDisputesRequest {\n /**\n * WQL expression for filtering and sorting disputes.\n * Supported properties: `id`, `createdDate`, `updatedDate`\n */\n query?: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n /**\n * Filter object in the following format:\n * `\"filter\" : {\n * \"fieldName1\": \"value1\",\n * \"fieldName2\":{\"$operator\":\"value2\"}\n * }`\n * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object in the following format:\n * `[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]`\n * @maxSize 5\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\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 CursorPaging {\n /**\n * Maximum number of items to return in the results.\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\nexport interface QueryDisputesResponse {\n /** List of disputes matching the query criteria. */\n disputes?: Dispute[];\n /** Paging metadata for cursor-based pagination. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in the response. */\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 AcceptDisputeRequest {\n /**\n * ID of the dispute to accept.\n * @format GUID\n */\n disputeId: string;\n}\n\nexport interface AcceptDisputeResponse {\n /** Updated dispute after acceptance. */\n dispute?: Dispute;\n}\n\nexport interface DefendDisputeRequest {\n /**\n * ID of the dispute to defend.\n * @format GUID\n */\n disputeId: string;\n}\n\nexport interface DefendDisputeResponse {\n /** Updated dispute after initiating defense. */\n dispute?: Dispute;\n}\n\nexport interface SubmitDisputeEvidenceRequest {\n /**\n * Dispute ID\n * @format GUID\n */\n disputeId?: string;\n}\n\nexport interface SubmitDisputeEvidenceResponse {\n /** Dispute */\n dispute?: Dispute;\n}\n\nexport interface CreateDisputeManuallyRequest {\n /**\n * Dispute Id\n * @format GUID\n */\n disputeId?: string;\n /**\n * Charge Id\n * @format GUID\n */\n chargeId?: string;\n /** Open date */\n openDate?: Date | null;\n /**\n * Provider Dispute Id\n * @minLength 1\n * @maxLength 100\n */\n providerDisputeId?: string;\n /** Dispute stage */\n stage?: DisputeStageWithLiterals;\n /** Dispute reason */\n reason?: DisputeReasonWithLiterals;\n /** Dispute status based on provider dispute status */\n status?: DisputeStatusWithLiterals;\n /** The latest date and time until which the dispute can remain in its current status */\n dueDate?: Date | null;\n /**\n * Dispute currency. Should be the same as the charge currency.\n * @immutable\n * @format CURRENCY\n */\n currencyCode?: string | null;\n /**\n * Dispute Amount in currency's main units (such as dollars or euros). For example, `\"12.95\"`.\n * @immutable\n * @decimalValue options { gt:0, maxScale:8 }\n */\n amount?: string | null;\n /**\n * Network reason code\n * @minLength 1\n * @maxLength 64\n */\n networkReasonCode?: string | null;\n /** External or Internal */\n external?: boolean | null;\n /**\n * Seller protection\n * @minLength 1\n * @maxLength 64\n */\n sellerProtection?: string | null;\n /** Is charge refundable */\n chargeRefundable?: boolean | null;\n /** True if dispute is defendable */\n defendable?: boolean | null;\n /** True if it is an auto dispute */\n autoDefended?: boolean | null;\n}\n\nexport interface CreateDisputeManuallyResponse {}\n\nexport interface ChangeDisputeStatusManuallyRequest {\n /**\n * Dispute ID\n * @format GUID\n */\n disputeId?: string;\n /** Changed date */\n changedDate?: Date | null;\n /** Dispute status based on provider dispute status */\n status?: DisputeStatusWithLiterals;\n}\n\nexport interface ChangeDisputeStatusManuallyResponse {}\n\nexport interface BulkUpdateDisputeTagsRequest {\n /**\n * List of dispute IDs to update tags for.\n * @minSize 1\n * @maxSize 100\n * @format GUID\n */\n ids: string[];\n /** Tags to assign to the disputes. */\n assignTags?: Tags;\n /** Tags to remove from the disputes. */\n unassignTags?: Tags;\n}\n\nexport interface BulkUpdateDisputeTagsResponse {\n /**\n * Results of the bulk tag update operation.\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkUpdateDisputeTagsResult[];\n /** Metadata about the bulk operation. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface ItemMetadata {\n /**\n * Item ID. Should always be available, unless it's impossible (for example, when failing to create an item).\n * @format GUID\n */\n _id?: string | null;\n /** Index of the item within the request array. Allows for correlation between request and response items. */\n originalIndex?: number;\n /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */\n success?: boolean;\n /** Details about the error in case of failure. */\n error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\nexport interface BulkUpdateDisputeTagsResult {\n /** Metadata for the individual dispute update. */\n itemMetadata?: ItemMetadata;\n}\n\nexport interface BulkActionMetadata {\n /** Number of items that were successfully processed. */\n totalSuccesses?: number;\n /** Number of items that couldn't be processed. */\n totalFailures?: number;\n /** Number of failures without details because detailed failure threshold was exceeded. */\n undetailedFailures?: number;\n}\n\nexport interface BulkUpdateDisputeTagsByFilterRequest {\n /** Filter criteria for selecting disputes to update. */\n filter: Record<string, any> | null;\n /** Tags to assign to the filtered disputes. */\n assignTags?: Tags;\n /** Tags to remove from the filtered disputes. */\n unassignTags?: Tags;\n}\n\nexport interface BulkUpdateDisputeTagsByFilterResponse {\n /**\n * Job ID for tracking the asynchronous bulk update operation.\n * @format GUID\n */\n jobId?: string;\n}\n\n/** @docsIgnore */\nexport type BulkUpdateDisputeTagsApplicationErrors = {\n code?: 'EMPTY_ASSIGN_AND_UNASSIGN_LISTS';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type BulkUpdateDisputeTagsByFilterApplicationErrors = {\n code?: 'EMPTY_ASSIGN_AND_UNASSIGN_LISTS';\n description?: string;\n data?: Record<string, any>;\n};\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\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}\n\nexport interface DisputeCreatedEnvelope {\n entity: Dispute;\n metadata: EventMetadata;\n}\n\n/**\n * Fired when a new Dispute is created.\n * @permissionId PAYMENTS.DISPUTE_READ\n * @webhook\n * @eventType wix.payments.disputes.v1.dispute_created\n * @slug created\n * @documentationMaturity preview\n */\nexport declare function onDisputeCreated(\n handler: (event: DisputeCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface DisputeUpdatedEnvelope {\n entity: Dispute;\n metadata: EventMetadata;\n}\n\n/**\n * Fired when a Dispute is updated.\n * @permissionId PAYMENTS.DISPUTE_READ\n * @webhook\n * @eventType wix.payments.disputes.v1.dispute_updated\n * @slug updated\n * @documentationMaturity preview\n */\nexport declare function onDisputeUpdated(\n handler: (event: DisputeUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Retrieves a dispute by ID.\n * @param disputeId - ID of the dispute to retrieve.\n * @public\n * @documentationMaturity preview\n * @requiredField disputeId\n * @permissionId PAYMENTS.DISPUTE_READ\n * @returns The requested dispute.\n * @fqn wix.payments.disputes.v1.DisputeService.GetDispute\n */\nexport async function getDispute(\n disputeId: string\n): Promise<\n NonNullablePaths<\n Dispute,\n | `_id`\n | `chargeId`\n | `providerDisputeId`\n | `stage`\n | `reason`\n | `status`\n | `sellerProtection`\n | `channel`\n | `actions`\n | `actions.${number}.type`\n | `tags.privateTags.tagIds`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n disputeId: disputeId,\n });\n\n const reqOpts = ambassadorWixPaymentsDisputesV1Dispute.getDispute(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.dispute!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { disputeId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['disputeId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves a list of disputes based on query parameters.\n * Use this method to filter and sort disputes by various criteria such as status, creation date, or amount.\n * @public\n * @documentationMaturity preview\n * @permissionId PAYMENTS.DISPUTE_READ\n * @fqn wix.payments.disputes.v1.DisputeService.QueryDisputes\n */\nexport function queryDisputes(): DisputesQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<\n Dispute,\n 'CURSOR',\n QueryDisputesRequest,\n QueryDisputesResponse\n >({\n func: async (payload: QueryDisputesRequest) => {\n const reqOpts =\n ambassadorWixPaymentsDisputesV1Dispute.queryDisputes(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n return result;\n } catch (err) {\n sideEffects?.onError?.(err);\n throw err;\n }\n },\n requestTransformer: (query: QueryDisputesRequest['query']) => {\n const args = [query, {}] as [QueryDisputesRequest['query'], {}];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({ data }: HttpResponse<QueryDisputesResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.disputes,\n pagingMetadata: transformedData?.pagingMetadata,\n };\n },\n errorTransformer: (err: unknown) => {\n const transformedError = sdkTransformError(err, {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n });\n\n throw transformedError;\n },\n pagingMethod: 'CURSOR',\n transformationPaths: {},\n });\n}\n\ninterface QueryCursorResult {\n cursors: Cursors;\n hasNext: () => boolean;\n hasPrev: () => boolean;\n length: number;\n pageSize: number;\n}\n\nexport interface DisputesQueryResult extends QueryCursorResult {\n items: Dispute[];\n query: DisputesQueryBuilder;\n next: () => Promise<DisputesQueryResult>;\n prev: () => Promise<DisputesQueryResult>;\n}\n\nexport interface DisputesQueryBuilder {\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n eq: (\n propertyName: '_id' | '_createdDate' | '_updatedDate',\n value: any\n ) => DisputesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n ne: (\n propertyName: '_id' | '_createdDate' | '_updatedDate',\n value: any\n ) => DisputesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n ge: (\n propertyName: '_id' | '_createdDate' | '_updatedDate',\n value: any\n ) => DisputesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n gt: (\n propertyName: '_id' | '_createdDate' | '_updatedDate',\n value: any\n ) => DisputesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n le: (\n propertyName: '_id' | '_createdDate' | '_updatedDate',\n value: any\n ) => DisputesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n lt: (\n propertyName: '_id' | '_createdDate' | '_updatedDate',\n value: any\n ) => DisputesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `string`.\n * @param string - String to compare against. Case-insensitive.\n * @documentationMaturity preview\n */\n startsWith: (propertyName: '_id', value: string) => DisputesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `values`.\n * @param values - List of values to compare against.\n * @documentationMaturity preview\n */\n hasSome: (\n propertyName: '_id' | '_createdDate' | '_updatedDate',\n value: any[]\n ) => DisputesQueryBuilder;\n /** @documentationMaturity preview */\n in: (\n propertyName: '_id' | '_createdDate' | '_updatedDate',\n value: any\n ) => DisputesQueryBuilder;\n /** @documentationMaturity preview */\n exists: (\n propertyName: '_id' | '_createdDate' | '_updatedDate',\n value: boolean\n ) => DisputesQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n * @documentationMaturity preview\n */\n ascending: (\n ...propertyNames: Array<'_createdDate' | '_updatedDate'>\n ) => DisputesQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n * @documentationMaturity preview\n */\n descending: (\n ...propertyNames: Array<'_createdDate' | '_updatedDate'>\n ) => DisputesQueryBuilder;\n /** @param limit - Number of items to return, which is also the `pageSize` of the results object.\n * @documentationMaturity preview\n */\n limit: (limit: number) => DisputesQueryBuilder;\n /** @param cursor - A pointer to specific record\n * @documentationMaturity preview\n */\n skipTo: (cursor: string) => DisputesQueryBuilder;\n /** @documentationMaturity preview */\n find: () => Promise<DisputesQueryResult>;\n}\n\n/**\n * Accepts liability for a dispute, indicating the merchant agrees with the customer's claim.\n * This action resolves the dispute in favor of the customer.\n * @param disputeId - ID of the dispute to accept.\n * @public\n * @documentationMaturity preview\n * @requiredField disputeId\n * @permissionId PAYMENTS.DISPUTE_ACCEPT\n * @fqn wix.payments.disputes.v1.DisputeService.AcceptDispute\n */\nexport async function acceptDispute(\n disputeId: string\n): Promise<\n NonNullablePaths<\n AcceptDisputeResponse,\n | `dispute._id`\n | `dispute.chargeId`\n | `dispute.providerDisputeId`\n | `dispute.stage`\n | `dispute.reason`\n | `dispute.status`\n | `dispute.sellerProtection`\n | `dispute.channel`\n | `dispute.actions`\n | `dispute.actions.${number}.type`\n | `dispute.tags.privateTags.tagIds`,\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({\n disputeId: disputeId,\n });\n\n const reqOpts = ambassadorWixPaymentsDisputesV1Dispute.acceptDispute(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { disputeId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['disputeId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Initiates the defense process for a dispute by submitting it for review.\n * To add evidence documents, use the Dispute [Dispute Evidence Document API] (https://dev.wix.com/docs/api-reference/business-management/payments/disputes/dispute-evidence-documents/create-dispute-evidence-document) before calling this method.\n * Evidence must be submitted separately as this endpoint only triggers the defense process.\n * @param disputeId - ID of the dispute to defend.\n * @public\n * @documentationMaturity preview\n * @requiredField disputeId\n * @permissionId PAYMENTS.DISPUTE_DEFEND\n * @fqn wix.payments.disputes.v1.DisputeService.DefendDispute\n */\nexport async function defendDispute(\n disputeId: string\n): Promise<\n NonNullablePaths<\n DefendDisputeResponse,\n | `dispute._id`\n | `dispute.chargeId`\n | `dispute.providerDisputeId`\n | `dispute.stage`\n | `dispute.reason`\n | `dispute.status`\n | `dispute.sellerProtection`\n | `dispute.channel`\n | `dispute.actions`\n | `dispute.actions.${number}.type`\n | `dispute.tags.privateTags.tagIds`,\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({\n disputeId: disputeId,\n });\n\n const reqOpts = ambassadorWixPaymentsDisputesV1Dispute.defendDispute(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { disputeId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['disputeId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates tags on multiple disputes simultaneously using a list of dispute IDs.\n * If a tag appears in both assign and unassign lists, it will be assigned.\n * @param ids - List of dispute IDs to update tags for.\n * @public\n * @documentationMaturity preview\n * @requiredField ids\n * @permissionId PAYMENTS.DISPUTE_UPDATE_TAGS\n * @fqn wix.payments.disputes.v1.DisputeService.BulkUpdateDisputeTags\n */\nexport async function bulkUpdateDisputeTags(\n ids: string[],\n options?: BulkUpdateDisputeTagsOptions\n): Promise<\n NonNullablePaths<\n BulkUpdateDisputeTagsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n > & {\n __applicationErrorsType?: BulkUpdateDisputeTagsApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n ids: ids,\n assignTags: options?.assignTags,\n unassignTags: options?.unassignTags,\n });\n\n const reqOpts =\n ambassadorWixPaymentsDisputesV1Dispute.bulkUpdateDisputeTags(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n ids: '$[0]',\n assignTags: '$[1].assignTags',\n unassignTags: '$[1].unassignTags',\n },\n singleArgumentUnchanged: false,\n },\n ['ids', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkUpdateDisputeTagsOptions {\n /** Tags to assign to the disputes. */\n assignTags?: Tags;\n /** Tags to remove from the disputes. */\n unassignTags?: Tags;\n}\n\n/**\n * Asynchronously updates tags on multiple disputes based on filter criteria.\n * Returns a job ID that can be used to track the operation status. If a tag appears in both assign and unassign lists, it will be assigned.\n * @param filter - Filter criteria for selecting disputes to update.\n * @public\n * @documentationMaturity preview\n * @requiredField filter\n * @permissionId PAYMENTS.DISPUTE_UPDATE_TAGS\n * @fqn wix.payments.disputes.v1.DisputeService.BulkUpdateDisputeTagsByFilter\n */\nexport async function bulkUpdateDisputeTagsByFilter(\n filter: Record<string, any>,\n options?: BulkUpdateDisputeTagsByFilterOptions\n): Promise<\n NonNullablePaths<BulkUpdateDisputeTagsByFilterResponse, `jobId`, 2> & {\n __applicationErrorsType?: BulkUpdateDisputeTagsByFilterApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n filter: filter,\n assignTags: options?.assignTags,\n unassignTags: options?.unassignTags,\n });\n\n const reqOpts =\n ambassadorWixPaymentsDisputesV1Dispute.bulkUpdateDisputeTagsByFilter(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n filter: '$[0]',\n assignTags: '$[1].assignTags',\n unassignTags: '$[1].unassignTags',\n },\n singleArgumentUnchanged: false,\n },\n ['filter', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkUpdateDisputeTagsByFilterOptions {\n /** Tags to assign to the filtered disputes. */\n assignTags?: Tags;\n /** Tags to remove from the filtered disputes. */\n unassignTags?: Tags;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\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 resolveWixPaymentsDisputesV1DisputeServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {};\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_payments_disputes';\n\n/** Retrieves a dispute by ID. */\nexport function getDispute(payload: object): RequestOptionsFactory<any> {\n function __getDispute({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.disputes.v1.dispute',\n method: 'GET' as any,\n methodFqn: 'wix.payments.disputes.v1.DisputeService.GetDispute',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsDisputesV1DisputeServiceUrl({\n protoPath: '/v1/disputes/{disputeId}',\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: 'dispute.dueDate' },\n { path: 'dispute.defendedDate' },\n { path: 'dispute.acceptedDate' },\n { path: 'dispute.createdDate' },\n { path: 'dispute.updatedDate' },\n { path: 'dispute.actions.dueDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getDispute;\n}\n\n/**\n * Retrieves a list of disputes based on query parameters.\n * Use this method to filter and sort disputes by various criteria such as status, creation date, or amount.\n */\nexport function queryDisputes(payload: object): RequestOptionsFactory<any> {\n function __queryDisputes({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.disputes.v1.dispute',\n method: 'GET' as any,\n methodFqn: 'wix.payments.disputes.v1.DisputeService.QueryDisputes',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsDisputesV1DisputeServiceUrl({\n protoPath: '/v1/disputes/query',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload, true),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'disputes.dueDate' },\n { path: 'disputes.defendedDate' },\n { path: 'disputes.acceptedDate' },\n { path: 'disputes.createdDate' },\n { path: 'disputes.updatedDate' },\n { path: 'disputes.actions.dueDate' },\n ],\n },\n ]),\n fallback: [\n {\n method: 'POST' as any,\n url: resolveWixPaymentsDisputesV1DisputeServiceUrl({\n protoPath: '/v1/disputes/query',\n data: payload,\n host,\n }),\n data: payload,\n },\n ],\n };\n\n return metadata;\n }\n\n return __queryDisputes;\n}\n\n/**\n * Accepts liability for a dispute, indicating the merchant agrees with the customer's claim.\n * This action resolves the dispute in favor of the customer.\n */\nexport function acceptDispute(payload: object): RequestOptionsFactory<any> {\n function __acceptDispute({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.disputes.v1.dispute',\n method: 'POST' as any,\n methodFqn: 'wix.payments.disputes.v1.DisputeService.AcceptDispute',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsDisputesV1DisputeServiceUrl({\n protoPath: '/v1/disputes/{disputeId}/accept',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'dispute.dueDate' },\n { path: 'dispute.defendedDate' },\n { path: 'dispute.acceptedDate' },\n { path: 'dispute.createdDate' },\n { path: 'dispute.updatedDate' },\n { path: 'dispute.actions.dueDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __acceptDispute;\n}\n\n/**\n * Initiates the defense process for a dispute by submitting it for review.\n * To add evidence documents, use the Dispute [Dispute Evidence Document API] (https://dev.wix.com/docs/api-reference/business-management/payments/disputes/dispute-evidence-documents/create-dispute-evidence-document) before calling this method.\n * Evidence must be submitted separately as this endpoint only triggers the defense process.\n */\nexport function defendDispute(payload: object): RequestOptionsFactory<any> {\n function __defendDispute({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.disputes.v1.dispute',\n method: 'POST' as any,\n methodFqn: 'wix.payments.disputes.v1.DisputeService.DefendDispute',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsDisputesV1DisputeServiceUrl({\n protoPath: '/v1/disputes/{disputeId}/defend',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'dispute.dueDate' },\n { path: 'dispute.defendedDate' },\n { path: 'dispute.acceptedDate' },\n { path: 'dispute.createdDate' },\n { path: 'dispute.updatedDate' },\n { path: 'dispute.actions.dueDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __defendDispute;\n}\n\n/**\n * Updates tags on multiple disputes simultaneously using a list of dispute IDs.\n * If a tag appears in both assign and unassign lists, it will be assigned.\n */\nexport function bulkUpdateDisputeTags(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkUpdateDisputeTags({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.disputes.v1.dispute',\n method: 'POST' as any,\n methodFqn:\n 'wix.payments.disputes.v1.DisputeService.BulkUpdateDisputeTags',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsDisputesV1DisputeServiceUrl({\n protoPath: '/v1/bulk/disputes/update-tags',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __bulkUpdateDisputeTags;\n}\n\n/**\n * Asynchronously updates tags on multiple disputes based on filter criteria.\n * Returns a job ID that can be used to track the operation status. If a tag appears in both assign and unassign lists, it will be assigned.\n */\nexport function bulkUpdateDisputeTagsByFilter(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkUpdateDisputeTagsByFilter({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.disputes.v1.dispute',\n method: 'POST' as any,\n methodFqn:\n 'wix.payments.disputes.v1.DisputeService.BulkUpdateDisputeTagsByFilter',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsDisputesV1DisputeServiceUrl({\n protoPath: '/v1/bulk/disputes/update-tags-by-filter',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __bulkUpdateDisputeTagsByFilter;\n}\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD,SAAS,oBAAoB;AAC7B;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACLP,SAAS,yBAAyB;AAClC,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,8CACP,MACA;AACA,QAAM,mBAAmB,CAAC;AAE1B,SAAO,WAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAGd,SAAS,WAAW,SAA6C;AACtE,WAAS,aAAa,EAAE,KAAK,GAAQ;AACnC,UAAM,WAAW;AAAA,MACf,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,WAAW;AAAA,MACX,aAAa;AAAA,MACb,kBAAkB;AAAA,QAChB,wBAAwB;AAAA,MAC1B;AAAA,MACA,KAAK,8CAA8C;AAAA,QACjD,WAAW;AAAA,QACX,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,MACD,QAAQ,kBAAk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IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,mBAAmB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,QAAQ;AAAA,UACR,YAAY;AAAA,UACZ,cAAc;AAAA,QAChB;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,UAAU,SAAS;AAAA,IACtB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["payload","transformPaths","DisputeStage","DisputeReason","DisputeStatus","SellerProtection","DisputeChannel","DisputeActionType","WebhookIdentityType","SortOrder","getDispute","queryDisputes","acceptDispute","defendDispute","bulkUpdateDisputeTags","bulkUpdateDisputeTagsByFilter"]}
1
+ {"version":3,"sources":["../../src/payments-disputes-v1-dispute-disputes.universal.ts","../../src/payments-disputes-v1-dispute-disputes.http.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, HttpResponse, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixPaymentsDisputesV1Dispute from './payments-disputes-v1-dispute-disputes.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\n/**\n * A dispute occurs when a customer contacts their payment service provider (PSP) or bank to contest a payment for reasons such as fraud, service issues, or billing errors.\n *\n * Disputes follow a structured lifecycle from creation through resolution.\n * Merchants can either accept liability or defend with evidence, depending on the available actions and due dates.\n * The dispute's channel (internal vs external) affects processing timelines and available options.\n */\nexport interface Dispute {\n /**\n * Dispute ID..\n * @format GUID\n * @immutable\n */\n _id?: string;\n /**\n * ID of the charge that is being disputed.\n * @format GUID\n * @immutable\n */\n chargeId?: string;\n /**\n * Unique identifier assigned by the payment service provider for this dispute.\n * @format GUID\n * @immutable\n */\n providerDisputeId?: 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 * Three-letter currency code in @ISO-4217 alphabetic format. Matches the currency of the disputed charge.\n * @immutable\n * @format CURRENCY\n */\n currencyCode?: string | null;\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, indicating 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 * Seller protection helps protect merchants from financial loss on eligible transactions due to unauthorized payments or claims that items were not received.\n * @readonly\n */\n sellerProtection?: SellerProtectionWithLiterals;\n /**\n * Channel through which the dispute is being processed.\n * Internal disputes are handled by the payment processor, while external disputes go through the card network or issuing bank.\n * @readonly\n */\n channel?: DisputeChannelWithLiterals;\n /**\n * The latest date and time until which the dispute can remain in its current status.\n * @readonly\n */\n dueDate?: Date | null;\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 when the dispute was defended.\n * @readonly\n */\n defendedDate?: Date | null;\n /**\n * Date and time when the dispute was accepted.\n * @readonly\n */\n acceptedDate?: Date | null;\n /**\n * 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 * Revision number, which increments by 1 each time the dispute is updated. To prevent conflicting changes, the current revision must be passed when updating the dispute. Ignored when creating a dispute.\n * @readonly\n */\n revision?: string | null;\n /** Data Extensions */\n extendedFields?: ExtendedFields;\n /** Tags */\n tags?: Tags;\n}\n\nexport enum DisputeStage {\n UNKNOWN_DISPUTE_STAGE = 'UNKNOWN_DISPUTE_STAGE',\n /** Formal dispute filed through the card network or issuing bank. */\n CHARGEBACK = 'CHARGEBACK',\n /** Initial inquiry from the cardholder requesting information about the charge. */\n INQUIRY = 'INQUIRY',\n}\n\n/** @enumType */\nexport type DisputeStageWithLiterals =\n | DisputeStage\n | 'UNKNOWN_DISPUTE_STAGE'\n | 'CHARGEBACK'\n | 'INQUIRY';\n\nexport enum DisputeReason {\n /** Unknown dispute reason. */\n UNKNOWN_DISPUTE_REASON = 'UNKNOWN_DISPUTE_REASON',\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 | 'UNKNOWN_DISPUTE_REASON'\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 /** Unknown dispute status. */\n UNKNOWN_DISPUTE_STATUS = 'UNKNOWN_DISPUTE_STATUS',\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 /** Buyer action required to proceed with the dispute. */\n WAITING_BUYER = 'WAITING_BUYER',\n /** Dispute was resolved in favor of the merchant. */\n WON = 'WON',\n /** Dispute was resolved in favor of the customer. */\n LOST = 'LOST',\n}\n\n/** @enumType */\nexport type DisputeStatusWithLiterals =\n | DisputeStatus\n | 'UNKNOWN_DISPUTE_STATUS'\n | 'WAITING_MERCHANT'\n | 'UNDER_REVIEW'\n | 'WAITING_BUYER'\n | 'WON'\n | 'LOST';\n\nexport enum SellerProtection {\n UNKNOWN_SELLER_PROTECTION = 'UNKNOWN_SELLER_PROTECTION',\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 | 'UNKNOWN_SELLER_PROTECTION'\n | 'NOT_ELIGIBLE'\n | 'ELIGIBLE'\n | 'EXTENDED';\n\nexport enum DisputeChannel {\n UNKNOWN_DISPUTE_CHANNEL = 'UNKNOWN_DISPUTE_CHANNEL',\n /** Dispute is processed internally by the payment service provider. */\n INTERNAL = 'INTERNAL',\n /** Dispute is processed externally through the card network or issuing bank. */\n EXTERNAL = 'EXTERNAL',\n}\n\n/** @enumType */\nexport type DisputeChannelWithLiterals =\n | DisputeChannel\n | 'UNKNOWN_DISPUTE_CHANNEL'\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 completed. */\n dueDate?: Date | null;\n}\n\nexport enum DisputeActionType {\n /** Unknown dispute action type. */\n UNKNOWN_DISPUTE_ACTION = 'UNKNOWN_DISPUTE_ACTION',\n /** Accept liability for the dispute. */\n ACCEPT = 'ACCEPT',\n /** Defend the dispute by submitting evidence. */\n DEFEND = 'DEFEND',\n}\n\n/** @enumType */\nexport type DisputeActionTypeWithLiterals =\n | DisputeActionType\n | 'UNKNOWN_DISPUTE_ACTION'\n | 'ACCEPT'\n | 'DEFEND';\n\nexport interface ExtendedFields {\n /**\n * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n * The value of each key is structured according to the schema defined when the extended fields were configured.\n *\n * You can only access fields for which you have the appropriate permissions.\n *\n * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n */\n namespaces?: Record<string, Record<string, any>>;\n}\n\n/**\n * Common object for tags.\n * Should be use as in this example:\n * message Foo {\n * option (.wix.api.decomposite_of) = \"wix.commons.v2.tags.Foo\";\n * string id = 1;\n * ...\n * Tags tags = 5\n * }\n *\n * example of taggable entity\n * {\n * id: \"123\"\n * tags: {\n * public_tags: {\n * tag_ids:[\"11\",\"22\"]\n * },\n * private_tags: {\n * tag_ids: [\"33\", \"44\"]\n * }\n * }\n * }\n */\nexport interface Tags {\n /** Tags that require an additional permission in order to access them, normally not given to site members or visitors. */\n privateTags?: TagList;\n /** Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors. */\n publicTags?: TagList;\n}\n\nexport interface TagList {\n /**\n * List of tag IDs.\n * @maxSize 100\n * @maxLength 5\n */\n tagIds?: string[];\n}\n\n/** Triggered when tags are assigned to or unassigned from a dispute. */\nexport interface TagsModified {\n /** Updated dispute. */\n dispute?: Dispute;\n /** Tags that were assigned to the dispute. */\n assignedTags?: Tags;\n /** Tags that were unassigned from the dispute. */\n unassignedTags?: Tags;\n}\n\nexport interface CreateDisputeManuallyRequest {\n /**\n * Dispute Id\n * @format GUID\n */\n disputeId?: string;\n /**\n * Charge Id\n * @format GUID\n */\n chargeId?: string;\n /** Open date */\n openDate?: Date | null;\n /**\n * Provider Dispute Id\n * @minLength 1\n * @maxLength 100\n */\n providerDisputeId?: string;\n /** Dispute stage */\n stage?: DisputeStageWithLiterals;\n /** Dispute reason */\n reason?: DisputeReasonWithLiterals;\n /** Dispute status based on provider dispute status */\n status?: DisputeStatusWithLiterals;\n /** The latest date and time until which the dispute can remain in its current status */\n dueDate?: Date | null;\n /**\n * Dispute currency. Should be the same as the charge currency.\n * @immutable\n * @format CURRENCY\n */\n currencyCode?: string | null;\n /**\n * Dispute Amount in currency's main units (such as dollars or euros). For example, `\"12.95\"`.\n * @immutable\n * @decimalValue options { gt:0, maxScale:8 }\n */\n amount?: string | null;\n /**\n * Network reason code\n * @minLength 1\n * @maxLength 64\n */\n networkReasonCode?: string | null;\n /** External or Internal */\n external?: boolean | null;\n /**\n * Seller protection\n * @minLength 1\n * @maxLength 64\n */\n sellerProtection?: string | null;\n /** Is charge refundable */\n chargeRefundable?: boolean | null;\n /** True if dispute is defendable */\n defendable?: boolean | null;\n /** True if it is an auto dispute */\n autoDefended?: boolean | null;\n}\n\nexport interface CreateDisputeManuallyResponse {}\n\nexport interface ChangeDisputeStatusManuallyRequest {\n /**\n * Dispute ID\n * @format GUID\n */\n disputeId?: string;\n /** Changed date */\n changedDate?: Date | null;\n /** Dispute status based on provider dispute status */\n status?: DisputeStatusWithLiterals;\n}\n\nexport interface ChangeDisputeStatusManuallyResponse {}\n\nexport interface AcceptDisputeManuallyRequest {\n /**\n * Dispute ID\n * @format GUID\n */\n disputeId?: string;\n /** Accepted date */\n acceptedDate?: Date | null;\n}\n\nexport interface AcceptDisputeManuallyResponse {}\n\nexport interface DefendDisputeManuallyRequest {\n /**\n * Dispute ID\n * @format GUID\n */\n disputeId?: string;\n /** Defense date */\n defendedDate?: Date | null;\n}\n\nexport interface DefendDisputeManuallyResponse {}\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}\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 GetDisputeRequest {\n /**\n * ID of the dispute to retrieve.\n * @format GUID\n */\n disputeId: string;\n}\n\nexport interface GetDisputeResponse {\n /** The requested dispute. */\n dispute?: Dispute;\n}\n\nexport interface QueryDisputesRequest {\n /**\n * WQL expression for filtering and sorting disputes.\n * Supported properties: `id`, `createdDate`, `updatedDate`\n */\n query?: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n /**\n * Filter object in the following format:\n * `\"filter\" : {\n * \"fieldName1\": \"value1\",\n * \"fieldName2\":{\"$operator\":\"value2\"}\n * }`\n * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object in the following format:\n * `[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]`\n * @maxSize 5\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\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 CursorPaging {\n /**\n * Maximum number of items to return in the results.\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\nexport interface QueryDisputesResponse {\n /** List of disputes matching the query criteria. */\n disputes?: Dispute[];\n /** Paging metadata for cursor-based pagination. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in the response. */\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 AcceptDisputeRequest {\n /**\n * ID of the dispute to accept.\n * @format GUID\n */\n disputeId: string;\n}\n\nexport interface AcceptDisputeResponse {\n /** Updated dispute after acceptance. */\n dispute?: Dispute;\n}\n\nexport interface DefendDisputeRequest {\n /**\n * ID of the dispute to defend.\n * @format GUID\n */\n disputeId: string;\n}\n\nexport interface DefendDisputeResponse {\n /** Updated dispute after initiating defense. */\n dispute?: Dispute;\n}\n\nexport interface BulkUpdateDisputeTagsRequest {\n /**\n * List of dispute IDs to update tags for.\n * @minSize 1\n * @maxSize 100\n * @format GUID\n */\n ids: string[];\n /** Tags to assign to the disputes. */\n assignTags?: Tags;\n /** Tags to remove from the disputes. */\n unassignTags?: Tags;\n}\n\nexport interface BulkUpdateDisputeTagsResponse {\n /**\n * Results of the bulk tag update operation.\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkUpdateDisputeTagsResult[];\n /** Metadata about the bulk operation. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface ItemMetadata {\n /**\n * Item ID. Should always be available, unless it's impossible (for example, when failing to create an item).\n * @format GUID\n */\n _id?: string | null;\n /** Index of the item within the request array. Allows for correlation between request and response items. */\n originalIndex?: number;\n /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */\n success?: boolean;\n /** Details about the error in case of failure. */\n error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\nexport interface BulkUpdateDisputeTagsResult {\n /** Metadata for the individual dispute update. */\n itemMetadata?: ItemMetadata;\n}\n\nexport interface BulkActionMetadata {\n /** Number of items that were successfully processed. */\n totalSuccesses?: number;\n /** Number of items that couldn't be processed. */\n totalFailures?: number;\n /** Number of failures without details because detailed failure threshold was exceeded. */\n undetailedFailures?: number;\n}\n\nexport interface BulkUpdateDisputeTagsByFilterRequest {\n /** Filter criteria for selecting disputes to update. */\n filter: Record<string, any> | null;\n /** Tags to assign to the filtered disputes. */\n assignTags?: Tags;\n /** Tags to remove from the filtered disputes. */\n unassignTags?: Tags;\n}\n\nexport interface BulkUpdateDisputeTagsByFilterResponse {\n /**\n * Job ID for tracking the asynchronous bulk update operation.\n * @format GUID\n */\n jobId?: string;\n}\n\n/** @docsIgnore */\nexport type BulkUpdateDisputeTagsApplicationErrors = {\n code?: 'EMPTY_ASSIGN_AND_UNASSIGN_LISTS';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type BulkUpdateDisputeTagsByFilterApplicationErrors = {\n code?: 'EMPTY_ASSIGN_AND_UNASSIGN_LISTS';\n description?: string;\n data?: Record<string, any>;\n};\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\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}\n\nexport interface DisputeCreatedEnvelope {\n entity: Dispute;\n metadata: EventMetadata;\n}\n\n/**\n * Fired when a new Dispute is created.\n * @permissionId PAYMENTS.DISPUTE_READ\n * @webhook\n * @eventType wix.payments.disputes.v1.dispute_created\n * @slug created\n * @documentationMaturity preview\n */\nexport declare function onDisputeCreated(\n handler: (event: DisputeCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface DisputeUpdatedEnvelope {\n entity: Dispute;\n metadata: EventMetadata;\n}\n\n/**\n * Fired when a Dispute is updated.\n * @permissionId PAYMENTS.DISPUTE_READ\n * @webhook\n * @eventType wix.payments.disputes.v1.dispute_updated\n * @slug updated\n * @documentationMaturity preview\n */\nexport declare function onDisputeUpdated(\n handler: (event: DisputeUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Retrieves a dispute by ID.\n * @param disputeId - ID of the dispute to retrieve.\n * @public\n * @documentationMaturity preview\n * @requiredField disputeId\n * @permissionId PAYMENTS.DISPUTE_READ\n * @applicableIdentity APP\n * @returns The requested dispute.\n * @fqn wix.payments.disputes.v1.DisputeService.GetDispute\n */\nexport async function getDispute(\n disputeId: string\n): Promise<\n NonNullablePaths<\n Dispute,\n | `_id`\n | `chargeId`\n | `providerDisputeId`\n | `stage`\n | `reason`\n | `status`\n | `sellerProtection`\n | `channel`\n | `actions`\n | `actions.${number}.type`\n | `tags.privateTags.tagIds`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n disputeId: disputeId,\n });\n\n const reqOpts = ambassadorWixPaymentsDisputesV1Dispute.getDispute(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.dispute!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { disputeId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['disputeId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves a list of disputes based on query parameters.\n * Use this method to filter and sort disputes by various criteria such as status, creation date, or amount.\n * @public\n * @documentationMaturity preview\n * @permissionId PAYMENTS.DISPUTE_READ\n * @applicableIdentity APP\n * @fqn wix.payments.disputes.v1.DisputeService.QueryDisputes\n */\nexport function queryDisputes(): DisputesQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<\n Dispute,\n 'CURSOR',\n QueryDisputesRequest,\n QueryDisputesResponse\n >({\n func: async (payload: QueryDisputesRequest) => {\n const reqOpts =\n ambassadorWixPaymentsDisputesV1Dispute.queryDisputes(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n return result;\n } catch (err) {\n sideEffects?.onError?.(err);\n throw err;\n }\n },\n requestTransformer: (query: QueryDisputesRequest['query']) => {\n const args = [query, {}] as [QueryDisputesRequest['query'], {}];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({ data }: HttpResponse<QueryDisputesResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.disputes,\n pagingMetadata: transformedData?.pagingMetadata,\n };\n },\n errorTransformer: (err: unknown) => {\n const transformedError = sdkTransformError(err, {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n });\n\n throw transformedError;\n },\n pagingMethod: 'CURSOR',\n transformationPaths: {},\n });\n}\n\ninterface QueryCursorResult {\n cursors: Cursors;\n hasNext: () => boolean;\n hasPrev: () => boolean;\n length: number;\n pageSize: number;\n}\n\nexport interface DisputesQueryResult extends QueryCursorResult {\n items: Dispute[];\n query: DisputesQueryBuilder;\n next: () => Promise<DisputesQueryResult>;\n prev: () => Promise<DisputesQueryResult>;\n}\n\nexport interface DisputesQueryBuilder {\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n eq: (\n propertyName: '_id' | '_createdDate' | '_updatedDate',\n value: any\n ) => DisputesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n ne: (\n propertyName: '_id' | '_createdDate' | '_updatedDate',\n value: any\n ) => DisputesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n ge: (\n propertyName: '_id' | '_createdDate' | '_updatedDate',\n value: any\n ) => DisputesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n gt: (\n propertyName: '_id' | '_createdDate' | '_updatedDate',\n value: any\n ) => DisputesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n le: (\n propertyName: '_id' | '_createdDate' | '_updatedDate',\n value: any\n ) => DisputesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n lt: (\n propertyName: '_id' | '_createdDate' | '_updatedDate',\n value: any\n ) => DisputesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `string`.\n * @param string - String to compare against. Case-insensitive.\n * @documentationMaturity preview\n */\n startsWith: (propertyName: '_id', value: string) => DisputesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `values`.\n * @param values - List of values to compare against.\n * @documentationMaturity preview\n */\n hasSome: (\n propertyName: '_id' | '_createdDate' | '_updatedDate',\n value: any[]\n ) => DisputesQueryBuilder;\n /** @documentationMaturity preview */\n in: (\n propertyName: '_id' | '_createdDate' | '_updatedDate',\n value: any\n ) => DisputesQueryBuilder;\n /** @documentationMaturity preview */\n exists: (\n propertyName: '_id' | '_createdDate' | '_updatedDate',\n value: boolean\n ) => DisputesQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n * @documentationMaturity preview\n */\n ascending: (\n ...propertyNames: Array<'_createdDate' | '_updatedDate'>\n ) => DisputesQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n * @documentationMaturity preview\n */\n descending: (\n ...propertyNames: Array<'_createdDate' | '_updatedDate'>\n ) => DisputesQueryBuilder;\n /** @param limit - Number of items to return, which is also the `pageSize` of the results object.\n * @documentationMaturity preview\n */\n limit: (limit: number) => DisputesQueryBuilder;\n /** @param cursor - A pointer to specific record\n * @documentationMaturity preview\n */\n skipTo: (cursor: string) => DisputesQueryBuilder;\n /** @documentationMaturity preview */\n find: () => Promise<DisputesQueryResult>;\n}\n\n/**\n * Accepts liability for a dispute, indicating the merchant agrees with the customer's claim.\n * This action resolves the dispute in favor of the customer.\n * @param disputeId - ID of the dispute to accept.\n * @public\n * @documentationMaturity preview\n * @requiredField disputeId\n * @permissionId PAYMENTS.DISPUTE_ACCEPT\n * @applicableIdentity APP\n * @fqn wix.payments.disputes.v1.DisputeService.AcceptDispute\n */\nexport async function acceptDispute(\n disputeId: string\n): Promise<\n NonNullablePaths<\n AcceptDisputeResponse,\n | `dispute._id`\n | `dispute.chargeId`\n | `dispute.providerDisputeId`\n | `dispute.stage`\n | `dispute.reason`\n | `dispute.status`\n | `dispute.sellerProtection`\n | `dispute.channel`\n | `dispute.actions`\n | `dispute.actions.${number}.type`\n | `dispute.tags.privateTags.tagIds`,\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({\n disputeId: disputeId,\n });\n\n const reqOpts = ambassadorWixPaymentsDisputesV1Dispute.acceptDispute(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { disputeId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['disputeId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Initiates the defense process for a dispute by submitting it for review.\n * To add evidence documents, use the Dispute [Dispute Evidence Document API] (https://dev.wix.com/docs/api-reference/business-management/payments/disputes/dispute-evidence-documents/create-dispute-evidence-document) before calling this method.\n * Evidence must be submitted separately as this endpoint only triggers the defense process.\n * @param disputeId - ID of the dispute to defend.\n * @public\n * @documentationMaturity preview\n * @requiredField disputeId\n * @permissionId PAYMENTS.DISPUTE_DEFEND\n * @applicableIdentity APP\n * @fqn wix.payments.disputes.v1.DisputeService.DefendDispute\n */\nexport async function defendDispute(\n disputeId: string\n): Promise<\n NonNullablePaths<\n DefendDisputeResponse,\n | `dispute._id`\n | `dispute.chargeId`\n | `dispute.providerDisputeId`\n | `dispute.stage`\n | `dispute.reason`\n | `dispute.status`\n | `dispute.sellerProtection`\n | `dispute.channel`\n | `dispute.actions`\n | `dispute.actions.${number}.type`\n | `dispute.tags.privateTags.tagIds`,\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({\n disputeId: disputeId,\n });\n\n const reqOpts = ambassadorWixPaymentsDisputesV1Dispute.defendDispute(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { disputeId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['disputeId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates tags on multiple disputes simultaneously using a list of dispute IDs.\n * If a tag appears in both assign and unassign lists, it will be assigned.\n * @param ids - List of dispute IDs to update tags for.\n * @public\n * @documentationMaturity preview\n * @requiredField ids\n * @permissionId PAYMENTS.DISPUTE_UPDATE_TAGS\n * @fqn wix.payments.disputes.v1.DisputeService.BulkUpdateDisputeTags\n */\nexport async function bulkUpdateDisputeTags(\n ids: string[],\n options?: BulkUpdateDisputeTagsOptions\n): Promise<\n NonNullablePaths<\n BulkUpdateDisputeTagsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n > & {\n __applicationErrorsType?: BulkUpdateDisputeTagsApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n ids: ids,\n assignTags: options?.assignTags,\n unassignTags: options?.unassignTags,\n });\n\n const reqOpts =\n ambassadorWixPaymentsDisputesV1Dispute.bulkUpdateDisputeTags(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n ids: '$[0]',\n assignTags: '$[1].assignTags',\n unassignTags: '$[1].unassignTags',\n },\n singleArgumentUnchanged: false,\n },\n ['ids', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkUpdateDisputeTagsOptions {\n /** Tags to assign to the disputes. */\n assignTags?: Tags;\n /** Tags to remove from the disputes. */\n unassignTags?: Tags;\n}\n\n/**\n * Asynchronously updates tags on multiple disputes based on filter criteria.\n * Returns a job ID that can be used to track the operation status. If a tag appears in both assign and unassign lists, it will be assigned.\n * @param filter - Filter criteria for selecting disputes to update.\n * @public\n * @documentationMaturity preview\n * @requiredField filter\n * @permissionId PAYMENTS.DISPUTE_UPDATE_TAGS\n * @fqn wix.payments.disputes.v1.DisputeService.BulkUpdateDisputeTagsByFilter\n */\nexport async function bulkUpdateDisputeTagsByFilter(\n filter: Record<string, any>,\n options?: BulkUpdateDisputeTagsByFilterOptions\n): Promise<\n NonNullablePaths<BulkUpdateDisputeTagsByFilterResponse, `jobId`, 2> & {\n __applicationErrorsType?: BulkUpdateDisputeTagsByFilterApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n filter: filter,\n assignTags: options?.assignTags,\n unassignTags: options?.unassignTags,\n });\n\n const reqOpts =\n ambassadorWixPaymentsDisputesV1Dispute.bulkUpdateDisputeTagsByFilter(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n filter: '$[0]',\n assignTags: '$[1].assignTags',\n unassignTags: '$[1].unassignTags',\n },\n singleArgumentUnchanged: false,\n },\n ['filter', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkUpdateDisputeTagsByFilterOptions {\n /** Tags to assign to the filtered disputes. */\n assignTags?: Tags;\n /** Tags to remove from the filtered disputes. */\n unassignTags?: Tags;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\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 resolveWixPaymentsDisputesV1DisputeServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {};\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_payments_disputes';\n\n/** Retrieves a dispute by ID. */\nexport function getDispute(payload: object): RequestOptionsFactory<any> {\n function __getDispute({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.disputes.v1.dispute',\n method: 'GET' as any,\n methodFqn: 'wix.payments.disputes.v1.DisputeService.GetDispute',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsDisputesV1DisputeServiceUrl({\n protoPath: '/v1/disputes/{disputeId}',\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: 'dispute.dueDate' },\n { path: 'dispute.defendedDate' },\n { path: 'dispute.acceptedDate' },\n { path: 'dispute.createdDate' },\n { path: 'dispute.updatedDate' },\n { path: 'dispute.actions.dueDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getDispute;\n}\n\n/**\n * Retrieves a list of disputes based on query parameters.\n * Use this method to filter and sort disputes by various criteria such as status, creation date, or amount.\n */\nexport function queryDisputes(payload: object): RequestOptionsFactory<any> {\n function __queryDisputes({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.disputes.v1.dispute',\n method: 'GET' as any,\n methodFqn: 'wix.payments.disputes.v1.DisputeService.QueryDisputes',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsDisputesV1DisputeServiceUrl({\n protoPath: '/v1/disputes/query',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload, true),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'disputes.dueDate' },\n { path: 'disputes.defendedDate' },\n { path: 'disputes.acceptedDate' },\n { path: 'disputes.createdDate' },\n { path: 'disputes.updatedDate' },\n { path: 'disputes.actions.dueDate' },\n ],\n },\n ]),\n fallback: [\n {\n method: 'POST' as any,\n url: resolveWixPaymentsDisputesV1DisputeServiceUrl({\n protoPath: '/v1/disputes/query',\n data: payload,\n host,\n }),\n data: payload,\n },\n ],\n };\n\n return metadata;\n }\n\n return __queryDisputes;\n}\n\n/**\n * Accepts liability for a dispute, indicating the merchant agrees with the customer's claim.\n * This action resolves the dispute in favor of the customer.\n */\nexport function acceptDispute(payload: object): RequestOptionsFactory<any> {\n function __acceptDispute({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.disputes.v1.dispute',\n method: 'POST' as any,\n methodFqn: 'wix.payments.disputes.v1.DisputeService.AcceptDispute',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsDisputesV1DisputeServiceUrl({\n protoPath: '/v1/disputes/{disputeId}/accept',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'dispute.dueDate' },\n { path: 'dispute.defendedDate' },\n { path: 'dispute.acceptedDate' },\n { path: 'dispute.createdDate' },\n { path: 'dispute.updatedDate' },\n { path: 'dispute.actions.dueDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __acceptDispute;\n}\n\n/**\n * Initiates the defense process for a dispute by submitting it for review.\n * To add evidence documents, use the Dispute [Dispute Evidence Document API] (https://dev.wix.com/docs/api-reference/business-management/payments/disputes/dispute-evidence-documents/create-dispute-evidence-document) before calling this method.\n * Evidence must be submitted separately as this endpoint only triggers the defense process.\n */\nexport function defendDispute(payload: object): RequestOptionsFactory<any> {\n function __defendDispute({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.disputes.v1.dispute',\n method: 'POST' as any,\n methodFqn: 'wix.payments.disputes.v1.DisputeService.DefendDispute',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsDisputesV1DisputeServiceUrl({\n protoPath: '/v1/disputes/{disputeId}/defend',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'dispute.dueDate' },\n { path: 'dispute.defendedDate' },\n { path: 'dispute.acceptedDate' },\n { path: 'dispute.createdDate' },\n { path: 'dispute.updatedDate' },\n { path: 'dispute.actions.dueDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __defendDispute;\n}\n\n/**\n * Updates tags on multiple disputes simultaneously using a list of dispute IDs.\n * If a tag appears in both assign and unassign lists, it will be assigned.\n */\nexport function bulkUpdateDisputeTags(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkUpdateDisputeTags({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.disputes.v1.dispute',\n method: 'POST' as any,\n methodFqn:\n 'wix.payments.disputes.v1.DisputeService.BulkUpdateDisputeTags',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsDisputesV1DisputeServiceUrl({\n protoPath: '/v1/bulk/disputes/update-tags',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __bulkUpdateDisputeTags;\n}\n\n/**\n * Asynchronously updates tags on multiple disputes based on filter criteria.\n * Returns a job ID that can be used to track the operation status. If a tag appears in both assign and unassign lists, it will be assigned.\n */\nexport function bulkUpdateDisputeTagsByFilter(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkUpdateDisputeTagsByFilter({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.disputes.v1.dispute',\n method: 'POST' as any,\n methodFqn:\n 'wix.payments.disputes.v1.DisputeService.BulkUpdateDisputeTagsByFilter',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsDisputesV1DisputeServiceUrl({\n protoPath: '/v1/bulk/disputes/update-tags-by-filter',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __bulkUpdateDisputeTagsByFilter;\n}\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD,SAAS,oBAAoB;AAC7B;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACLP,SAAS,yBAAyB;AAClC,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,8CACP,MACA;AACA,QAAM,mBAAmB,CAAC;AAE1B,SAAO,WAAW,OAAO,OAAO,MAAM,EAAE,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,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,UAAU,sCAAsC;AAAA,IACpD;AAAA,IACA,YAAY,SAAS;AAAA,IACrB,cAAc,SAAS;AAAA,EACzB,CAAC;AAED,QAAM,UACmC;AAAA,IACrC;AAAA,EACF;AAEF,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,WAAO,wCAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,mBAAmB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,QAAQ;AAAA,UACR,YAAY;AAAA,UACZ,cAAc;AAAA,QAChB;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,UAAU,SAAS;AAAA,IACtB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["payload","transformPaths","DisputeStage","DisputeReason","DisputeStatus","SellerProtection","DisputeChannel","DisputeActionType","WebhookIdentityType","SortOrder","getDispute","queryDisputes","acceptDispute","defendDispute","bulkUpdateDisputeTags","bulkUpdateDisputeTagsByFilter"]}
@@ -173,20 +173,10 @@ declare enum DisputeStatus {
173
173
  /** Dispute was resolved in favor of the merchant. */
174
174
  WON = "WON",
175
175
  /** Dispute was resolved in favor of the customer. */
176
- LOST = "LOST",
177
- /**
178
- * Evidence has been submitted and is being processed by the payment provider.
179
- * **Deprecated:** This field will be removed in a future version.
180
- */
181
- PROCESSING_EVIDENCE_SUBMISSION = "PROCESSING_EVIDENCE_SUBMISSION",
182
- /**
183
- * Dispute acceptance is being processed by the payment provider.
184
- * **Deprecated:** This field will be removed in a future version.
185
- */
186
- PROCESSING_ACCEPTANCE = "PROCESSING_ACCEPTANCE"
176
+ LOST = "LOST"
187
177
  }
188
178
  /** @enumType */
189
- type DisputeStatusWithLiterals = DisputeStatus | 'UNKNOWN_DISPUTE_STATUS' | 'WAITING_MERCHANT' | 'UNDER_REVIEW' | 'WAITING_BUYER' | 'WON' | 'LOST' | 'PROCESSING_EVIDENCE_SUBMISSION' | 'PROCESSING_ACCEPTANCE';
179
+ type DisputeStatusWithLiterals = DisputeStatus | 'UNKNOWN_DISPUTE_STATUS' | 'WAITING_MERCHANT' | 'UNDER_REVIEW' | 'WAITING_BUYER' | 'WON' | 'LOST';
190
180
  declare enum SellerProtection {
191
181
  UNKNOWN_SELLER_PROTECTION = "UNKNOWN_SELLER_PROTECTION",
192
182
  /** Transaction is not eligible for seller protection. */
@@ -271,6 +261,248 @@ interface TagList {
271
261
  */
272
262
  tagIds?: string[];
273
263
  }
264
+ /** Triggered when tags are assigned to or unassigned from a dispute. */
265
+ interface TagsModified {
266
+ /** Updated dispute. */
267
+ dispute?: Dispute;
268
+ /** Tags that were assigned to the dispute. */
269
+ assignedTags?: Tags;
270
+ /** Tags that were unassigned from the dispute. */
271
+ unassignedTags?: Tags;
272
+ }
273
+ interface CreateDisputeManuallyRequest {
274
+ /**
275
+ * Dispute Id
276
+ * @format GUID
277
+ */
278
+ disputeId?: string;
279
+ /**
280
+ * Charge Id
281
+ * @format GUID
282
+ */
283
+ chargeId?: string;
284
+ /** Open date */
285
+ openDate?: Date | null;
286
+ /**
287
+ * Provider Dispute Id
288
+ * @minLength 1
289
+ * @maxLength 100
290
+ */
291
+ providerDisputeId?: string;
292
+ /** Dispute stage */
293
+ stage?: DisputeStageWithLiterals;
294
+ /** Dispute reason */
295
+ reason?: DisputeReasonWithLiterals;
296
+ /** Dispute status based on provider dispute status */
297
+ status?: DisputeStatusWithLiterals;
298
+ /** The latest date and time until which the dispute can remain in its current status */
299
+ dueDate?: Date | null;
300
+ /**
301
+ * Dispute currency. Should be the same as the charge currency.
302
+ * @immutable
303
+ * @format CURRENCY
304
+ */
305
+ currencyCode?: string | null;
306
+ /**
307
+ * Dispute Amount in currency's main units (such as dollars or euros). For example, `"12.95"`.
308
+ * @immutable
309
+ * @decimalValue options { gt:0, maxScale:8 }
310
+ */
311
+ amount?: string | null;
312
+ /**
313
+ * Network reason code
314
+ * @minLength 1
315
+ * @maxLength 64
316
+ */
317
+ networkReasonCode?: string | null;
318
+ /** External or Internal */
319
+ external?: boolean | null;
320
+ /**
321
+ * Seller protection
322
+ * @minLength 1
323
+ * @maxLength 64
324
+ */
325
+ sellerProtection?: string | null;
326
+ /** Is charge refundable */
327
+ chargeRefundable?: boolean | null;
328
+ /** True if dispute is defendable */
329
+ defendable?: boolean | null;
330
+ /** True if it is an auto dispute */
331
+ autoDefended?: boolean | null;
332
+ }
333
+ interface CreateDisputeManuallyResponse {
334
+ }
335
+ interface ChangeDisputeStatusManuallyRequest {
336
+ /**
337
+ * Dispute ID
338
+ * @format GUID
339
+ */
340
+ disputeId?: string;
341
+ /** Changed date */
342
+ changedDate?: Date | null;
343
+ /** Dispute status based on provider dispute status */
344
+ status?: DisputeStatusWithLiterals;
345
+ }
346
+ interface ChangeDisputeStatusManuallyResponse {
347
+ }
348
+ interface AcceptDisputeManuallyRequest {
349
+ /**
350
+ * Dispute ID
351
+ * @format GUID
352
+ */
353
+ disputeId?: string;
354
+ /** Accepted date */
355
+ acceptedDate?: Date | null;
356
+ }
357
+ interface AcceptDisputeManuallyResponse {
358
+ }
359
+ interface DefendDisputeManuallyRequest {
360
+ /**
361
+ * Dispute ID
362
+ * @format GUID
363
+ */
364
+ disputeId?: string;
365
+ /** Defense date */
366
+ defendedDate?: Date | null;
367
+ }
368
+ interface DefendDisputeManuallyResponse {
369
+ }
370
+ interface DomainEvent extends DomainEventBodyOneOf {
371
+ createdEvent?: EntityCreatedEvent;
372
+ updatedEvent?: EntityUpdatedEvent;
373
+ deletedEvent?: EntityDeletedEvent;
374
+ actionEvent?: ActionEvent;
375
+ /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
376
+ id?: string;
377
+ /**
378
+ * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
379
+ * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
380
+ */
381
+ entityFqdn?: string;
382
+ /**
383
+ * Event action name, placed at the top level to make it easier for users to dispatch messages.
384
+ * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
385
+ */
386
+ slug?: string;
387
+ /** ID of the entity associated with the event. */
388
+ entityId?: string;
389
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
390
+ eventTime?: Date | null;
391
+ /**
392
+ * Whether the event was triggered as a result of a privacy regulation application
393
+ * (for example, GDPR).
394
+ */
395
+ triggeredByAnonymizeRequest?: boolean | null;
396
+ /** If present, indicates the action that triggered the event. */
397
+ originatedFrom?: string | null;
398
+ /**
399
+ * 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.
400
+ * 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.
401
+ */
402
+ entityEventSequence?: string | null;
403
+ }
404
+ /** @oneof */
405
+ interface DomainEventBodyOneOf {
406
+ createdEvent?: EntityCreatedEvent;
407
+ updatedEvent?: EntityUpdatedEvent;
408
+ deletedEvent?: EntityDeletedEvent;
409
+ actionEvent?: ActionEvent;
410
+ }
411
+ interface EntityCreatedEvent {
412
+ entityAsJson?: string;
413
+ /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
414
+ restoreInfo?: RestoreInfo;
415
+ }
416
+ interface RestoreInfo {
417
+ deletedDate?: Date | null;
418
+ }
419
+ interface EntityUpdatedEvent {
420
+ /**
421
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
422
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
423
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
424
+ */
425
+ currentEntityAsJson?: string;
426
+ }
427
+ interface EntityDeletedEvent {
428
+ /** Entity that was deleted. */
429
+ deletedEntityAsJson?: string | null;
430
+ }
431
+ interface ActionEvent {
432
+ bodyAsJson?: string;
433
+ }
434
+ interface MessageEnvelope {
435
+ /**
436
+ * App instance ID.
437
+ * @format GUID
438
+ */
439
+ instanceId?: string | null;
440
+ /**
441
+ * Event type.
442
+ * @maxLength 150
443
+ */
444
+ eventType?: string;
445
+ /** The identification type and identity data. */
446
+ identity?: IdentificationData;
447
+ /** Stringify payload. */
448
+ data?: string;
449
+ }
450
+ interface IdentificationData extends IdentificationDataIdOneOf {
451
+ /**
452
+ * ID of a site visitor that has not logged in to the site.
453
+ * @format GUID
454
+ */
455
+ anonymousVisitorId?: string;
456
+ /**
457
+ * ID of a site visitor that has logged in to the site.
458
+ * @format GUID
459
+ */
460
+ memberId?: string;
461
+ /**
462
+ * ID of a Wix user (site owner, contributor, etc.).
463
+ * @format GUID
464
+ */
465
+ wixUserId?: string;
466
+ /**
467
+ * ID of an app.
468
+ * @format GUID
469
+ */
470
+ appId?: string;
471
+ /** @readonly */
472
+ identityType?: WebhookIdentityTypeWithLiterals;
473
+ }
474
+ /** @oneof */
475
+ interface IdentificationDataIdOneOf {
476
+ /**
477
+ * ID of a site visitor that has not logged in to the site.
478
+ * @format GUID
479
+ */
480
+ anonymousVisitorId?: string;
481
+ /**
482
+ * ID of a site visitor that has logged in to the site.
483
+ * @format GUID
484
+ */
485
+ memberId?: string;
486
+ /**
487
+ * ID of a Wix user (site owner, contributor, etc.).
488
+ * @format GUID
489
+ */
490
+ wixUserId?: string;
491
+ /**
492
+ * ID of an app.
493
+ * @format GUID
494
+ */
495
+ appId?: string;
496
+ }
497
+ declare enum WebhookIdentityType {
498
+ UNKNOWN = "UNKNOWN",
499
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
500
+ MEMBER = "MEMBER",
501
+ WIX_USER = "WIX_USER",
502
+ APP = "APP"
503
+ }
504
+ /** @enumType */
505
+ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
274
506
  interface GetDisputeRequest {
275
507
  /**
276
508
  * ID of the dispute to retrieve.
@@ -467,6 +699,18 @@ interface BulkUpdateDisputeTagsByFilterResponse {
467
699
  */
468
700
  jobId?: string;
469
701
  }
702
+ /** @docsIgnore */
703
+ type BulkUpdateDisputeTagsApplicationErrors = {
704
+ code?: 'EMPTY_ASSIGN_AND_UNASSIGN_LISTS';
705
+ description?: string;
706
+ data?: Record<string, any>;
707
+ };
708
+ /** @docsIgnore */
709
+ type BulkUpdateDisputeTagsByFilterApplicationErrors = {
710
+ code?: 'EMPTY_ASSIGN_AND_UNASSIGN_LISTS';
711
+ description?: string;
712
+ data?: Record<string, any>;
713
+ };
470
714
 
471
715
  type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
472
716
  getUrl: (context: any) => string;
@@ -491,4 +735,4 @@ declare function defendDispute(): __PublicMethodMetaInfo<'POST', {
491
735
  declare function bulkUpdateDisputeTags(): __PublicMethodMetaInfo<'POST', {}, BulkUpdateDisputeTagsRequest$1, BulkUpdateDisputeTagsRequest, BulkUpdateDisputeTagsResponse$1, BulkUpdateDisputeTagsResponse>;
492
736
  declare function bulkUpdateDisputeTagsByFilter(): __PublicMethodMetaInfo<'POST', {}, BulkUpdateDisputeTagsByFilterRequest$1, BulkUpdateDisputeTagsByFilterRequest, BulkUpdateDisputeTagsByFilterResponse$1, BulkUpdateDisputeTagsByFilterResponse>;
493
737
 
494
- export { type __PublicMethodMetaInfo, acceptDispute, bulkUpdateDisputeTags, bulkUpdateDisputeTagsByFilter, defendDispute, getDispute, queryDisputes };
738
+ export { type AcceptDisputeManuallyRequest as AcceptDisputeManuallyRequestOriginal, type AcceptDisputeManuallyResponse as AcceptDisputeManuallyResponseOriginal, type AcceptDisputeRequest as AcceptDisputeRequestOriginal, type AcceptDisputeResponse as AcceptDisputeResponseOriginal, type ActionEvent as ActionEventOriginal, type ApplicationError as ApplicationErrorOriginal, type BulkActionMetadata as BulkActionMetadataOriginal, type BulkUpdateDisputeTagsApplicationErrors as BulkUpdateDisputeTagsApplicationErrorsOriginal, type BulkUpdateDisputeTagsByFilterApplicationErrors as BulkUpdateDisputeTagsByFilterApplicationErrorsOriginal, type BulkUpdateDisputeTagsByFilterRequest as BulkUpdateDisputeTagsByFilterRequestOriginal, type BulkUpdateDisputeTagsByFilterResponse as BulkUpdateDisputeTagsByFilterResponseOriginal, type BulkUpdateDisputeTagsRequest as BulkUpdateDisputeTagsRequestOriginal, type BulkUpdateDisputeTagsResponse as BulkUpdateDisputeTagsResponseOriginal, type BulkUpdateDisputeTagsResult as BulkUpdateDisputeTagsResultOriginal, type ChangeDisputeStatusManuallyRequest as ChangeDisputeStatusManuallyRequestOriginal, type ChangeDisputeStatusManuallyResponse as ChangeDisputeStatusManuallyResponseOriginal, type CreateDisputeManuallyRequest as CreateDisputeManuallyRequestOriginal, type CreateDisputeManuallyResponse as CreateDisputeManuallyResponseOriginal, type CursorPagingMetadata as CursorPagingMetadataOriginal, type CursorPaging as CursorPagingOriginal, type CursorQuery as CursorQueryOriginal, type CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOfOriginal, type Cursors as CursorsOriginal, type DefendDisputeManuallyRequest as DefendDisputeManuallyRequestOriginal, type DefendDisputeManuallyResponse as DefendDisputeManuallyResponseOriginal, type DefendDisputeRequest as DefendDisputeRequestOriginal, type DefendDisputeResponse as DefendDisputeResponseOriginal, type DisputeAction as DisputeActionOriginal, DisputeActionType as DisputeActionTypeOriginal, type DisputeActionTypeWithLiterals as DisputeActionTypeWithLiteralsOriginal, DisputeChannel as DisputeChannelOriginal, type DisputeChannelWithLiterals as DisputeChannelWithLiteralsOriginal, type Dispute as DisputeOriginal, DisputeReason as DisputeReasonOriginal, type DisputeReasonWithLiterals as DisputeReasonWithLiteralsOriginal, DisputeStage as DisputeStageOriginal, type DisputeStageWithLiterals as DisputeStageWithLiteralsOriginal, DisputeStatus as DisputeStatusOriginal, type DisputeStatusWithLiterals as DisputeStatusWithLiteralsOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type ExtendedFields as ExtendedFieldsOriginal, type GetDisputeRequest as GetDisputeRequestOriginal, type GetDisputeResponse as GetDisputeResponseOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type ItemMetadata as ItemMetadataOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type QueryDisputesRequest as QueryDisputesRequestOriginal, type QueryDisputesResponse as QueryDisputesResponseOriginal, type RestoreInfo as RestoreInfoOriginal, SellerProtection as SellerProtectionOriginal, type SellerProtectionWithLiterals as SellerProtectionWithLiteralsOriginal, SortOrder as SortOrderOriginal, type SortOrderWithLiterals as SortOrderWithLiteralsOriginal, type Sorting as SortingOriginal, type TagList as TagListOriginal, type TagsModified as TagsModifiedOriginal, type Tags as TagsOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, acceptDispute, bulkUpdateDisputeTags, bulkUpdateDisputeTagsByFilter, defendDispute, getDispute, queryDisputes };