import * as _wix_sdk_types from '@wix/sdk-types'; import { QuerySpec, Query, NonNullablePaths } from '@wix/sdk-types'; /** A dispute is a customer-initiated challenge of a payment through their payment service provider (PSP) or bank. */ interface Dispute { /** * Dispute ID. * @format GUID * @immutable */ _id?: string; /** * ID of the charge that is being disputed. * @format GUID * @immutable */ chargeId?: string; /** * Unique identifier assigned by the payment service provider for this dispute. * @format GUID * @immutable */ providerDisputeId?: string; /** * Stage of the dispute process. * @readonly */ stage?: DisputeStageWithLiterals; /** * Reason why the customer initiated the dispute. * @readonly */ reason?: DisputeReasonWithLiterals; /** * Three-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. Matches the currency of the disputed charge. * @immutable * @format CURRENCY */ currencyCode?: string | null; /** * Disputed amount in the currency's main units. For example, `"12.95"` for $12.95. * @immutable * @decimalValue options { gt:0, maxScale:8 } */ amount?: string | null; /** * Current status of the dispute. This indicates what action is required and who needs to take it. * @readonly */ status?: DisputeStatusWithLiterals; /** * Level of seller protection coverage for this dispute. * * Seller protection is set by the payment provider. For example, PayPal offers a [seller protection program](https://www.paypal.com/ua/legalhub/paypal/seller-protection). * @readonly */ sellerProtection?: SellerProtectionWithLiterals; /** * Channel through which the dispute is being processed. * @readonly */ channel?: DisputeChannelWithLiterals; /** * The latest date and time until which the dispute can remain in its current status. * * If this date passes, the dispute will be resolved against the party that is required to take action. For example, if the status is `WAITING_MERCHANT`, and the due date passes, the dispute will be `LOST` and a refund will be processed automatically. * @readonly */ dueDate?: Date | null; /** * Network reason code provided by the card network or issuing bank that initiated the dispute. * @minLength 1 * @maxLength 64 */ networkReasonCode?: string | null; /** * Whether the dispute can be defended with evidence. * @readonly */ defendable?: boolean | null; /** * Whether the dispute was automatically defended by the payment processor. * @readonly */ autoDefended?: boolean | null; /** * Date and time at which the dispute was defended. * @readonly */ defendedDate?: Date | null; /** * Date and time at which the dispute was accepted. * @readonly */ acceptedDate?: Date | null; /** * List of actions that can be performed on the dispute. * Each action has a specific due date by which it must be completed. * Available actions depend on the dispute's current status and stage. * @readonly * @maxSize 20 */ actions?: DisputeAction[]; /** * Date and time the dispute was created. * @readonly * @immutable */ _createdDate?: Date | null; /** * Date and time the dispute was updated. * @readonly */ _updatedDate?: Date | null; /** * 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. * @readonly */ revision?: string | null; /** * Custom field data for the dispute object. * * [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions) must be configured in the app dashboard before they can be accessed with API calls. */ extendedFields?: ExtendedFields; /** Tags assigned to the dispute for organization and filtering purposes. */ tags?: Tags; } declare enum DisputeStage { /** Formal dispute filed through the card network or issuing bank. */ CHARGEBACK = "CHARGEBACK", /** Initial inquiry from the customer requesting information about the charge. */ INQUIRY = "INQUIRY" } /** @enumType */ type DisputeStageWithLiterals = DisputeStage | 'CHARGEBACK' | 'INQUIRY'; declare enum DisputeReason { /** Fraudulent use of a physical card. */ FRAUD_CARD_PRESENT = "FRAUD_CARD_PRESENT", /** Fraudulent use without the physical card present. */ FRAUD_CARD_ABSENT = "FRAUD_CARD_ABSENT", /** Duplicate charge processing. */ DUPLICATE_PROCESSING = "DUPLICATE_PROCESSING", /** Services or goods were not provided as promised. */ SERVICES_NOT_PROVIDED = "SERVICES_NOT_PROVIDED", /** Recurring payment that should have been canceled. */ CANCELED_RECURRING = "CANCELED_RECURRING", /** Item received was not as described. */ NOT_AS_DESCRIBED = "NOT_AS_DESCRIBED", /** Item received was counterfeit. */ COUNTERFEIT = "COUNTERFEIT", /** Merchant misrepresented the transaction. */ MISREPRESENTATION = "MISREPRESENTATION", /** Transaction was canceled but still charged. */ CANCELED = "CANCELED", /** Other dispute reason not covered by specific categories. */ OTHER = "OTHER" } /** @enumType */ type DisputeReasonWithLiterals = DisputeReason | 'FRAUD_CARD_PRESENT' | 'FRAUD_CARD_ABSENT' | 'DUPLICATE_PROCESSING' | 'SERVICES_NOT_PROVIDED' | 'CANCELED_RECURRING' | 'NOT_AS_DESCRIBED' | 'COUNTERFEIT' | 'MISREPRESENTATION' | 'CANCELED' | 'OTHER'; declare enum DisputeStatus { /** Merchant action required to proceed with the dispute. */ WAITING_MERCHANT = "WAITING_MERCHANT", /** Dispute is being reviewed by the payment service provider or bank. */ UNDER_REVIEW = "UNDER_REVIEW", /** Customer action required to proceed with the dispute. */ WAITING_BUYER = "WAITING_BUYER", /** Dispute resolved in favor of the merchant. */ WON = "WON", /** Dispute resolved in favor of the customer. When a dispute is lost, the refund is processed automatically. */ LOST = "LOST" } /** @enumType */ type DisputeStatusWithLiterals = DisputeStatus | 'WAITING_MERCHANT' | 'UNDER_REVIEW' | 'WAITING_BUYER' | 'WON' | 'LOST'; declare enum SellerProtection { /** Transaction is not eligible for seller protection. */ NOT_ELIGIBLE = "NOT_ELIGIBLE", /** Transaction is eligible for basic seller protection. */ ELIGIBLE = "ELIGIBLE", /** Transaction is eligible for extended seller protection coverage. */ EXTENDED = "EXTENDED" } /** @enumType */ type SellerProtectionWithLiterals = SellerProtection | 'NOT_ELIGIBLE' | 'ELIGIBLE' | 'EXTENDED'; declare enum DisputeChannel { /** Dispute is processed by the payment service provider. */ INTERNAL = "INTERNAL", /** Dispute is processed through the card network or issuing bank. */ EXTERNAL = "EXTERNAL" } /** @enumType */ type DisputeChannelWithLiterals = DisputeChannel | 'INTERNAL' | 'EXTERNAL'; interface DisputeAction { /** Type of action that can be performed. */ type?: DisputeActionTypeWithLiterals; /** Latest date and time by which this action must be performed. */ dueDate?: Date | null; } declare enum DisputeActionType { /** Dispute can be accepted. */ ACCEPT = "ACCEPT", /** Dispute can be defended. */ DEFEND = "DEFEND" } /** @enumType */ type DisputeActionTypeWithLiterals = DisputeActionType | 'ACCEPT' | 'DEFEND'; interface ExtendedFields { /** * Extended field data. Each key corresponds to the namespace of the app that created the extended fields. * The value of each key is structured according to the schema defined when the extended fields were configured. * * You can only access fields for which you have the appropriate permissions. * * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields). */ namespaces?: Record>; } /** * Common object for tags. * Should be use as in this example: * message Foo { * option (.wix.api.decomposite_of) = "wix.commons.v2.tags.Foo"; * string id = 1; * ... * Tags tags = 5 * } * * example of taggable entity * { * id: "123" * tags: { * public_tags: { * tag_ids:["11","22"] * }, * private_tags: { * tag_ids: ["33", "44"] * } * } * } */ interface Tags { /** Tags that require an additional permission in order to access them, normally not given to site members or visitors. */ privateTags?: TagList; /** Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors. */ publicTags?: TagList; } interface TagList { /** * List of tag IDs. * @maxSize 100 * @maxLength 5 */ tagIds?: string[]; } /** Triggered when tags are assigned to or unassigned from a dispute. */ interface TagsModified { /** Updated dispute. */ dispute?: Dispute; /** Tags that were assigned to the dispute. */ assignedTags?: Tags; /** Tags that were unassigned from the dispute. */ unassignedTags?: Tags; } interface GetDisputeRequest { /** * ID of the dispute to retrieve. * @format GUID */ disputeId: string; } interface GetDisputeResponse { /** The retrieved dispute. */ dispute?: Dispute; } interface QueryDisputesRequest { /** WQL expression for filtering and sorting disputes. */ query?: CursorQuery; } interface CursorQuery extends CursorQueryPagingMethodOneOf { /** 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`. */ cursorPaging?: CursorPaging; /** * Filter object in the following format: * `"filter" : { * "fieldName1": "value1", * "fieldName2":{"$operator":"value2"} * }` * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains` */ filter?: Record | null; /** * Sort object in the following format: * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]` * @maxSize 5 */ sort?: Sorting[]; } /** @oneof */ interface CursorQueryPagingMethodOneOf { /** 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`. */ cursorPaging?: CursorPaging; } interface Sorting { /** * Name of the field to sort by. * @maxLength 512 */ fieldName?: string; /** Sort order. */ order?: SortOrderWithLiterals; } declare enum SortOrder { ASC = "ASC", DESC = "DESC" } /** @enumType */ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC'; interface CursorPaging { /** * Maximum number of items to return in the results. * @max 100 */ limit?: number | null; /** * Pointer to the next or previous page in the list of results. * * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. * @maxLength 16000 */ cursor?: string | null; } interface QueryDisputesResponse { /** List of retrieved disputes. */ disputes?: Dispute[]; /** Paging metadata for cursor-based pagination. */ pagingMetadata?: CursorPagingMetadata; } interface CursorPagingMetadata { /** Number of items returned in the response. */ count?: number | null; /** Cursor strings that point to the next page, previous page, or both. */ cursors?: Cursors; /** * Whether there are more pages to retrieve following the current page. * * + `true`: Another page of results can be retrieved. * + `false`: This is the last page. */ hasNext?: boolean | null; } interface Cursors { /** * Cursor string pointing to the next page in the list of results. * @maxLength 16000 */ next?: string | null; /** * Cursor pointing to the previous page in the list of results. * @maxLength 16000 */ prev?: string | null; } interface AcceptDisputeRequest { /** * ID of the dispute to accept. * @format GUID */ disputeId: string; } interface AcceptDisputeResponse { /** Updated dispute after acceptance. */ dispute?: Dispute; } interface DefendDisputeRequest { /** * ID of the dispute to defend. * @format GUID */ disputeId: string; } interface DefendDisputeResponse { /** Updated dispute after submitting evidence. */ dispute?: Dispute; } interface BulkUpdateDisputeTagsRequest { /** * List of dispute IDs to update tags for. * @minSize 1 * @maxSize 100 * @format GUID */ ids: string[]; /** Tags to assign to the disputes. */ assignTags?: Tags; /** Tags to remove from the disputes. */ unassignTags?: Tags; } interface BulkUpdateDisputeTagsResponse { /** * Results of the bulk tag update operation. * @minSize 1 * @maxSize 100 */ results?: BulkUpdateDisputeTagsResult[]; /** Metadata about the bulk operation. */ bulkActionMetadata?: BulkActionMetadata; } interface ItemMetadata { /** * Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). * @format GUID */ _id?: string | null; /** Index of the item within the request array. Allows for correlation between request and response items. */ originalIndex?: number; /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */ success?: boolean; /** Details about the error in case of failure. */ error?: ApplicationError; } interface ApplicationError { /** Error code. */ code?: string; /** Description of the error. */ description?: string; /** Data related to the error. */ data?: Record | null; } interface BulkUpdateDisputeTagsResult { /** Metadata for the individual dispute update. */ itemMetadata?: ItemMetadata; } interface BulkActionMetadata { /** Number of items that were successfully processed. */ totalSuccesses?: number; /** Number of items that couldn't be processed. */ totalFailures?: number; /** Number of failures without details because detailed failure threshold was exceeded. */ undetailedFailures?: number; } interface BulkUpdateDisputeTagsByFilterRequest { /** * Filter that determines which disputes to update tags for. * * An empty filter updates all disputes. */ filter: Record | null; /** Tags to assign to the filtered disputes. */ assignTags?: Tags; /** Tags to remove from the filtered disputes. */ unassignTags?: Tags; } interface BulkUpdateDisputeTagsByFilterResponse { /** * Job ID for tracking the asynchronous bulk update operation. * @format GUID */ jobId?: string; } interface DomainEvent extends DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; /** Event ID. With this ID you can easily spot duplicated events and ignore them. */ _id?: string; /** * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities. * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`. */ entityFqdn?: string; /** * Event action name, placed at the top level to make it easier for users to dispatch messages. * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`. */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * 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. * 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. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; } interface EntityCreatedEvent { entity?: string; } interface RestoreInfo { deletedDate?: Date | null; } interface EntityUpdatedEvent { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntity?: string; } interface EntityDeletedEvent { /** Entity that was deleted. */ deletedEntity?: string | null; } interface ActionEvent { body?: string; } interface MessageEnvelope { /** * App instance ID. * @format GUID */ instanceId?: string | null; /** * Event type. * @maxLength 150 */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Stringify payload. */ data?: string; /** Details related to the account */ accountInfo?: AccountInfo; } interface IdentificationData extends IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; /** @readonly */ identityType?: WebhookIdentityTypeWithLiterals; } /** @oneof */ interface IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; } declare enum WebhookIdentityType { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** @enumType */ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP'; interface AccountInfo { /** * ID of the Wix account associated with the event. * @format GUID */ accountId?: string | null; /** * ID of the parent Wix account. Only included when accountId belongs to a child account. * @format GUID */ parentAccountId?: string | null; /** * ID of the Wix site associated with the event. Only included when the event is tied to a specific site. * @format GUID */ siteId?: string | null; } /** @docsIgnore */ type BulkUpdateDisputeTagsApplicationErrors = { code?: 'EMPTY_ASSIGN_AND_UNASSIGN_LISTS'; description?: string; data?: Record; }; /** @docsIgnore */ type BulkUpdateDisputeTagsByFilterApplicationErrors = { code?: 'EMPTY_ASSIGN_AND_UNASSIGN_LISTS'; description?: string; data?: Record; }; interface BaseEventMetadata { /** * App instance ID. * @format GUID */ instanceId?: string | null; /** * Event type. * @maxLength 150 */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Details related to the account */ accountInfo?: AccountInfo; } interface EventMetadata extends BaseEventMetadata { /** Event ID. With this ID you can easily spot duplicated events and ignore them. */ _id?: string; /** * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities. * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`. */ entityFqdn?: string; /** * Event action name, placed at the top level to make it easier for users to dispatch messages. * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`. */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * 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. * 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. */ entityEventSequence?: string | null; accountInfo?: AccountInfoMetadata; } interface AccountInfoMetadata { /** ID of the Wix account associated with the event */ accountId: string; /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */ siteId?: string; /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */ parentAccountId?: string; } interface DisputeCreatedEnvelope { entity: Dispute; metadata: EventMetadata; } /** * Triggered when a dispute is created. * @permissionScope Manage Payments - All Permissions * @permissionScopeId SCOPE.DC-PAYMENTS.MANAGE-PAYMENTS * @permissionScope Manage Disputes * @permissionScopeId SCOPE.DC-PAYMENTS.MANAGE-DISPUTES * @permissionScope Read Disputes * @permissionScopeId SCOPE.DC-PAYMENTS.READ-DISPUTES * @permissionId PAYMENTS.DISPUTE_READ * @webhook * @eventType wix.payments.disputes.v1.dispute_created * @slug created * @documentationMaturity preview */ declare function onDisputeCreated(handler: (event: DisputeCreatedEnvelope) => void | Promise): void; interface DisputeUpdatedEnvelope { entity: Dispute; metadata: EventMetadata; /** @hidden */ modifiedFields: Record; } /** * Triggered when a dispute is updated. * @permissionScope Manage Payments - All Permissions * @permissionScopeId SCOPE.DC-PAYMENTS.MANAGE-PAYMENTS * @permissionScope Manage Disputes * @permissionScopeId SCOPE.DC-PAYMENTS.MANAGE-DISPUTES * @permissionScope Read Disputes * @permissionScopeId SCOPE.DC-PAYMENTS.READ-DISPUTES * @permissionId PAYMENTS.DISPUTE_READ * @webhook * @eventType wix.payments.disputes.v1.dispute_updated * @slug updated * @documentationMaturity preview */ declare function onDisputeUpdated(handler: (event: DisputeUpdatedEnvelope) => void | Promise): void; /** * Retrieves a dispute. * @param disputeId - ID of the dispute to retrieve. * @public * @documentationMaturity preview * @requiredField disputeId * @permissionId PAYMENTS.DISPUTE_READ * @applicableIdentity APP * @returns The retrieved dispute. * @fqn wix.payments.disputes.v1.DisputeService.GetDispute */ declare function getDispute(disputeId: string): Promise>; /** * Creates a query to retrieve a list of disputes. * * The Query Disputes method builds a query to retrieve a list of disputes and returns a `DisputesQueryBuilder` object. * * The returned object contains the query definition, which is used to run the query using the `find()` method. * * You can refine the query by chaining `DisputesQueryBuilder` methods onto the query. `DisputesQueryBuilder` methods enable you to filter, sort, and control the results that Query Disputes returns. * * Query Disputes has a default paging limit of 50, which you can override. * * For a full description of the item object, see the object returned for the `items` property in `DisputesQueryResult`. * @public * @documentationMaturity preview * @permissionId PAYMENTS.DISPUTE_READ * @applicableIdentity APP * @fqn wix.payments.disputes.v1.DisputeService.QueryDisputes */ declare function queryDisputes(): DisputesQueryBuilder; interface QueryCursorResult { cursors: Cursors; hasNext: () => boolean; hasPrev: () => boolean; length: number; pageSize: number; } interface DisputesQueryResult extends QueryCursorResult { items: Dispute[]; query: DisputesQueryBuilder; next: () => Promise; prev: () => Promise; } interface DisputesQueryBuilder { /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ eq: (propertyName: '_id' | 'chargeId' | 'status' | '_createdDate' | '_updatedDate', value: any) => DisputesQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ ne: (propertyName: '_id' | 'chargeId' | 'status' | '_createdDate' | '_updatedDate', value: any) => DisputesQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ ge: (propertyName: '_id' | 'chargeId' | '_createdDate' | '_updatedDate', value: any) => DisputesQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ gt: (propertyName: '_id' | 'chargeId' | '_createdDate' | '_updatedDate', value: any) => DisputesQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ le: (propertyName: '_id' | 'chargeId' | '_createdDate' | '_updatedDate', value: any) => DisputesQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ lt: (propertyName: '_id' | 'chargeId' | '_createdDate' | '_updatedDate', value: any) => DisputesQueryBuilder; /** @param propertyName - Property whose value is compared with `string`. * @param string - String to compare against. Case-insensitive. * @documentationMaturity preview */ startsWith: (propertyName: '_id' | 'chargeId', value: string) => DisputesQueryBuilder; /** @param propertyName - Property whose value is compared with `values`. * @param values - List of values to compare against. * @documentationMaturity preview */ hasSome: (propertyName: '_id' | 'chargeId' | 'status' | '_createdDate' | '_updatedDate', value: any[]) => DisputesQueryBuilder; /** @documentationMaturity preview */ in: (propertyName: '_id' | 'chargeId' | 'status' | '_createdDate' | '_updatedDate', value: any) => DisputesQueryBuilder; /** @documentationMaturity preview */ exists: (propertyName: '_id' | 'chargeId' | 'status' | '_createdDate' | '_updatedDate', value: boolean) => DisputesQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. * @documentationMaturity preview */ ascending: (...propertyNames: Array<'_createdDate' | '_updatedDate'>) => DisputesQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. * @documentationMaturity preview */ descending: (...propertyNames: Array<'_createdDate' | '_updatedDate'>) => DisputesQueryBuilder; /** @param limit - Number of items to return, which is also the `pageSize` of the results object. * @documentationMaturity preview */ limit: (limit: number) => DisputesQueryBuilder; /** @param cursor - A pointer to specific record * @documentationMaturity preview */ skipTo: (cursor: string) => DisputesQueryBuilder; /** @documentationMaturity preview */ find: () => Promise; } /** * @hidden * @fqn wix.payments.disputes.v1.DisputeService.QueryDisputes * @requiredField query */ declare function typedQueryDisputes(query: DisputeQuery): Promise>; interface DisputeQuerySpec extends QuerySpec { paging: 'cursor'; wql: [ { fields: ['_id', 'chargeId', 'status']; operators: '*'; sort: 'NONE'; }, { fields: ['_createdDate', '_updatedDate']; operators: '*'; sort: 'BOTH'; } ]; } type CommonQueryWithEntityContext = Query; type DisputeQuery = { /** 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`. */ cursorPaging?: { /** Maximum number of items to return in the results. @max: 100 */ limit?: NonNullable['limit'] | null; /** Pointer to the next or previous page in the list of results. Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request. @maxLength: 16000 */ cursor?: NonNullable['cursor'] | null; }; /** Filter object in the following format: `"filter" : { "fieldName1": "value1", "fieldName2":{"$operator":"value2"} }` Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains` */ filter?: CommonQueryWithEntityContext['filter'] | null; /** Sort object in the following format: `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]` @maxSize: 5 */ sort?: { /** Name of the field to sort by. @maxLength: 512 */ fieldName?: NonNullable[number]['fieldName']; /** Sort order. */ order?: NonNullable[number]['order']; }[]; }; declare const utils: { query: { QueryBuilder: () => _wix_sdk_types.QueryBuilder; Filter: _wix_sdk_types.FilterFactory; Sort: _wix_sdk_types.SortFactory; }; }; /** * Accepts liability for a dispute, indicating the merchant agrees with the customer's claim. * * When a dispute is accepted, the refund is processed automatically. * @param disputeId - ID of the dispute to accept. * @public * @documentationMaturity preview * @requiredField disputeId * @permissionId PAYMENTS.DISPUTE_ACCEPT * @applicableIdentity APP * @fqn wix.payments.disputes.v1.DisputeService.AcceptDispute */ declare function acceptDispute(disputeId: string): Promise>; /** * Defends a dispute by submitting evidence to the payment service provider or bank handling the dispute. * * To upload evidence documents, use the [Dispute Evidence Documents API](https://dev.wix.com/docs/api-reference/business-management/payments/disputes/dispute-evidence-documents/create-dispute-evidence-document). This method submits all the evidence documents uploaded for the specified dispute. * @param disputeId - ID of the dispute to defend. * @public * @documentationMaturity preview * @requiredField disputeId * @permissionId PAYMENTS.DISPUTE_DEFEND * @applicableIdentity APP * @fqn wix.payments.disputes.v1.DisputeService.DefendDispute */ declare function defendDispute(disputeId: string): Promise>; /** * Updates tags on multiple disputes simultaneously using a list of dispute IDs. * If a tag appears in both assign and unassign lists, it will be assigned. * @param ids - List of dispute IDs to update tags for. * @public * @documentationMaturity preview * @requiredField ids * @permissionId PAYMENTS.DISPUTE_UPDATE_TAGS * @applicableIdentity APP * @fqn wix.payments.disputes.v1.DisputeService.BulkUpdateDisputeTags */ declare function bulkUpdateDisputeTags(ids: string[], options?: BulkUpdateDisputeTagsOptions): Promise & { __applicationErrorsType?: BulkUpdateDisputeTagsApplicationErrors; }>; interface BulkUpdateDisputeTagsOptions { /** Tags to assign to the disputes. */ assignTags?: Tags; /** Tags to remove from the disputes. */ unassignTags?: Tags; } /** * Asynchronously updates tags on multiple disputes based on filter criteria. * 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. * @param filter - Filter that determines which disputes to update tags for. * * An empty filter updates all disputes. * @public * @documentationMaturity preview * @requiredField filter * @permissionId PAYMENTS.DISPUTE_UPDATE_TAGS * @applicableIdentity APP * @fqn wix.payments.disputes.v1.DisputeService.BulkUpdateDisputeTagsByFilter */ declare function bulkUpdateDisputeTagsByFilter(filter: Record, options?: BulkUpdateDisputeTagsByFilterOptions): Promise & { __applicationErrorsType?: BulkUpdateDisputeTagsByFilterApplicationErrors; }>; interface BulkUpdateDisputeTagsByFilterOptions { /** Tags to assign to the filtered disputes. */ assignTags?: Tags; /** Tags to remove from the filtered disputes. */ unassignTags?: Tags; } export { type AcceptDisputeRequest, type AcceptDisputeResponse, type AccountInfo, type AccountInfoMetadata, type ActionEvent, type ApplicationError, type BaseEventMetadata, type BulkActionMetadata, type BulkUpdateDisputeTagsApplicationErrors, type BulkUpdateDisputeTagsByFilterApplicationErrors, type BulkUpdateDisputeTagsByFilterOptions, type BulkUpdateDisputeTagsByFilterRequest, type BulkUpdateDisputeTagsByFilterResponse, type BulkUpdateDisputeTagsOptions, type BulkUpdateDisputeTagsRequest, type BulkUpdateDisputeTagsResponse, type BulkUpdateDisputeTagsResult, type CommonQueryWithEntityContext, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DefendDisputeRequest, type DefendDisputeResponse, type Dispute, type DisputeAction, DisputeActionType, type DisputeActionTypeWithLiterals, DisputeChannel, type DisputeChannelWithLiterals, type DisputeCreatedEnvelope, type DisputeQuery, type DisputeQuerySpec, DisputeReason, type DisputeReasonWithLiterals, DisputeStage, type DisputeStageWithLiterals, DisputeStatus, type DisputeStatusWithLiterals, type DisputeUpdatedEnvelope, type DisputesQueryBuilder, type DisputesQueryResult, type DomainEvent, type DomainEventBodyOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type ExtendedFields, type GetDisputeRequest, type GetDisputeResponse, type IdentificationData, type IdentificationDataIdOneOf, type ItemMetadata, type MessageEnvelope, type QueryDisputesRequest, type QueryDisputesResponse, type RestoreInfo, SellerProtection, type SellerProtectionWithLiterals, SortOrder, type SortOrderWithLiterals, type Sorting, type TagList, type Tags, type TagsModified, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, acceptDispute, bulkUpdateDisputeTags, bulkUpdateDisputeTagsByFilter, defendDispute, getDispute, onDisputeCreated, onDisputeUpdated, queryDisputes, typedQueryDisputes, utils };