@wix/auto_sdk_payments_disputes 1.0.41 → 1.0.43
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.
- package/build/cjs/index.d.ts +20 -21
- package/build/cjs/index.js +43 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +70 -46
- package/build/cjs/index.typings.js +27 -2
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +38 -34
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +20 -21
- package/build/es/index.mjs +43 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +70 -46
- package/build/es/index.typings.mjs +25 -1
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +38 -34
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +20 -21
- package/build/internal/cjs/index.js +43 -1
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +70 -46
- package/build/internal/cjs/index.typings.js +27 -2
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +38 -34
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +20 -21
- package/build/internal/es/index.mjs +43 -1
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +70 -46
- package/build/internal/es/index.typings.mjs +25 -1
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +38 -34
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
import { NonNullablePaths } from '@wix/sdk-types';
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
* 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.
|
|
5
|
-
*
|
|
6
|
-
* Disputes follow a structured lifecycle from creation through resolution.
|
|
7
|
-
* Merchants can either accept liability or defend with evidence, depending on the available actions and due dates.
|
|
8
|
-
* The dispute's channel (internal vs external) affects processing timelines and available options.
|
|
9
|
-
*/
|
|
3
|
+
/** A dispute is a customer-initiated challenge of a payment through their payment service provider (PSP) or bank. */
|
|
10
4
|
interface Dispute {
|
|
11
5
|
/**
|
|
12
|
-
* Dispute ID
|
|
6
|
+
* Dispute ID.
|
|
13
7
|
* @format GUID
|
|
14
8
|
* @immutable
|
|
15
9
|
*/
|
|
@@ -37,7 +31,7 @@ interface Dispute {
|
|
|
37
31
|
*/
|
|
38
32
|
reason?: DisputeReasonWithLiterals;
|
|
39
33
|
/**
|
|
40
|
-
* Three-letter currency code in
|
|
34
|
+
* 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.
|
|
41
35
|
* @immutable
|
|
42
36
|
* @format CURRENCY
|
|
43
37
|
*/
|
|
@@ -49,24 +43,26 @@ interface Dispute {
|
|
|
49
43
|
*/
|
|
50
44
|
amount?: string | null;
|
|
51
45
|
/**
|
|
52
|
-
* Current status of the dispute
|
|
46
|
+
* Current status of the dispute. This indicates what action is required and who needs to take it.
|
|
53
47
|
* @readonly
|
|
54
48
|
*/
|
|
55
49
|
status?: DisputeStatusWithLiterals;
|
|
56
50
|
/**
|
|
57
51
|
* Level of seller protection coverage for this dispute.
|
|
58
|
-
*
|
|
52
|
+
*
|
|
53
|
+
* 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).
|
|
59
54
|
* @readonly
|
|
60
55
|
*/
|
|
61
56
|
sellerProtection?: SellerProtectionWithLiterals;
|
|
62
57
|
/**
|
|
63
58
|
* Channel through which the dispute is being processed.
|
|
64
|
-
* Internal disputes are handled by the payment processor, while external disputes go through the card network or issuing bank.
|
|
65
59
|
* @readonly
|
|
66
60
|
*/
|
|
67
61
|
channel?: DisputeChannelWithLiterals;
|
|
68
62
|
/**
|
|
69
63
|
* The latest date and time until which the dispute can remain in its current status.
|
|
64
|
+
*
|
|
65
|
+
* 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.
|
|
70
66
|
* @readonly
|
|
71
67
|
*/
|
|
72
68
|
dueDate?: Date | null;
|
|
@@ -87,17 +83,17 @@ interface Dispute {
|
|
|
87
83
|
*/
|
|
88
84
|
autoDefended?: boolean | null;
|
|
89
85
|
/**
|
|
90
|
-
* Date and time
|
|
86
|
+
* Date and time at which the dispute was defended.
|
|
91
87
|
* @readonly
|
|
92
88
|
*/
|
|
93
89
|
defendedDate?: Date | null;
|
|
94
90
|
/**
|
|
95
|
-
* Date and time
|
|
91
|
+
* Date and time at which the dispute was accepted.
|
|
96
92
|
* @readonly
|
|
97
93
|
*/
|
|
98
94
|
acceptedDate?: Date | null;
|
|
99
95
|
/**
|
|
100
|
-
*
|
|
96
|
+
* List of actions that can be performed on the dispute.
|
|
101
97
|
* Each action has a specific due date by which it must be completed.
|
|
102
98
|
* Available actions depend on the dispute's current status and stage.
|
|
103
99
|
* @readonly
|
|
@@ -120,16 +116,21 @@ interface Dispute {
|
|
|
120
116
|
* @readonly
|
|
121
117
|
*/
|
|
122
118
|
revision?: string | null;
|
|
123
|
-
/**
|
|
119
|
+
/**
|
|
120
|
+
* Custom field data for the dispute object.
|
|
121
|
+
*
|
|
122
|
+
* [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.
|
|
123
|
+
*/
|
|
124
124
|
extendedFields?: ExtendedFields;
|
|
125
|
-
/** Tags */
|
|
125
|
+
/** Tags assigned to the dispute for organization and filtering purposes. */
|
|
126
126
|
tags?: Tags;
|
|
127
127
|
}
|
|
128
128
|
declare enum DisputeStage {
|
|
129
|
+
/** Unknown dispute stage. */
|
|
129
130
|
UNKNOWN_DISPUTE_STAGE = "UNKNOWN_DISPUTE_STAGE",
|
|
130
131
|
/** Formal dispute filed through the card network or issuing bank. */
|
|
131
132
|
CHARGEBACK = "CHARGEBACK",
|
|
132
|
-
/** Initial inquiry from the
|
|
133
|
+
/** Initial inquiry from the customer requesting information about the charge. */
|
|
133
134
|
INQUIRY = "INQUIRY"
|
|
134
135
|
}
|
|
135
136
|
/** @enumType */
|
|
@@ -167,16 +168,17 @@ declare enum DisputeStatus {
|
|
|
167
168
|
WAITING_MERCHANT = "WAITING_MERCHANT",
|
|
168
169
|
/** Dispute is being reviewed by the payment service provider or bank. */
|
|
169
170
|
UNDER_REVIEW = "UNDER_REVIEW",
|
|
170
|
-
/**
|
|
171
|
+
/** Customer action required to proceed with the dispute. */
|
|
171
172
|
WAITING_BUYER = "WAITING_BUYER",
|
|
172
|
-
/** Dispute
|
|
173
|
+
/** Dispute resolved in favor of the merchant. */
|
|
173
174
|
WON = "WON",
|
|
174
|
-
/** Dispute
|
|
175
|
+
/** Dispute resolved in favor of the customer. When a dispute is lost, the refund is processed automatically. */
|
|
175
176
|
LOST = "LOST"
|
|
176
177
|
}
|
|
177
178
|
/** @enumType */
|
|
178
179
|
type DisputeStatusWithLiterals = DisputeStatus | 'UNKNOWN_DISPUTE_STATUS' | 'WAITING_MERCHANT' | 'UNDER_REVIEW' | 'WAITING_BUYER' | 'WON' | 'LOST';
|
|
179
180
|
declare enum SellerProtection {
|
|
181
|
+
/** Unknown seller protection. */
|
|
180
182
|
UNKNOWN_SELLER_PROTECTION = "UNKNOWN_SELLER_PROTECTION",
|
|
181
183
|
/** Transaction is not eligible for seller protection. */
|
|
182
184
|
NOT_ELIGIBLE = "NOT_ELIGIBLE",
|
|
@@ -188,10 +190,11 @@ declare enum SellerProtection {
|
|
|
188
190
|
/** @enumType */
|
|
189
191
|
type SellerProtectionWithLiterals = SellerProtection | 'UNKNOWN_SELLER_PROTECTION' | 'NOT_ELIGIBLE' | 'ELIGIBLE' | 'EXTENDED';
|
|
190
192
|
declare enum DisputeChannel {
|
|
193
|
+
/** Unknown dispute channel. */
|
|
191
194
|
UNKNOWN_DISPUTE_CHANNEL = "UNKNOWN_DISPUTE_CHANNEL",
|
|
192
|
-
/** Dispute is processed
|
|
195
|
+
/** Dispute is processed by the payment service provider. */
|
|
193
196
|
INTERNAL = "INTERNAL",
|
|
194
|
-
/** Dispute is processed
|
|
197
|
+
/** Dispute is processed through the card network or issuing bank. */
|
|
195
198
|
EXTERNAL = "EXTERNAL"
|
|
196
199
|
}
|
|
197
200
|
/** @enumType */
|
|
@@ -199,15 +202,15 @@ type DisputeChannelWithLiterals = DisputeChannel | 'UNKNOWN_DISPUTE_CHANNEL' | '
|
|
|
199
202
|
interface DisputeAction {
|
|
200
203
|
/** Type of action that can be performed. */
|
|
201
204
|
type?: DisputeActionTypeWithLiterals;
|
|
202
|
-
/** Latest date and time by which this action must be
|
|
205
|
+
/** Latest date and time by which this action must be performed. */
|
|
203
206
|
dueDate?: Date | null;
|
|
204
207
|
}
|
|
205
208
|
declare enum DisputeActionType {
|
|
206
209
|
/** Unknown dispute action type. */
|
|
207
210
|
UNKNOWN_DISPUTE_ACTION = "UNKNOWN_DISPUTE_ACTION",
|
|
208
|
-
/**
|
|
211
|
+
/** Dispute can be accepted. */
|
|
209
212
|
ACCEPT = "ACCEPT",
|
|
210
|
-
/**
|
|
213
|
+
/** Dispute can be defended. */
|
|
211
214
|
DEFEND = "DEFEND"
|
|
212
215
|
}
|
|
213
216
|
/** @enumType */
|
|
@@ -508,14 +511,11 @@ interface GetDisputeRequest {
|
|
|
508
511
|
disputeId: string;
|
|
509
512
|
}
|
|
510
513
|
interface GetDisputeResponse {
|
|
511
|
-
/** The
|
|
514
|
+
/** The retrieved dispute. */
|
|
512
515
|
dispute?: Dispute;
|
|
513
516
|
}
|
|
514
517
|
interface QueryDisputesRequest {
|
|
515
|
-
/**
|
|
516
|
-
* WQL expression for filtering and sorting disputes.
|
|
517
|
-
* Supported properties: `id`, `createdDate`, `updatedDate`
|
|
518
|
-
*/
|
|
518
|
+
/** WQL expression for filtering and sorting disputes. */
|
|
519
519
|
query?: CursorQuery;
|
|
520
520
|
}
|
|
521
521
|
interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
@@ -573,7 +573,7 @@ interface CursorPaging {
|
|
|
573
573
|
cursor?: string | null;
|
|
574
574
|
}
|
|
575
575
|
interface QueryDisputesResponse {
|
|
576
|
-
/** List of disputes
|
|
576
|
+
/** List of retrieved disputes. */
|
|
577
577
|
disputes?: Dispute[];
|
|
578
578
|
/** Paging metadata for cursor-based pagination. */
|
|
579
579
|
pagingMetadata?: CursorPagingMetadata;
|
|
@@ -622,7 +622,7 @@ interface DefendDisputeRequest {
|
|
|
622
622
|
disputeId: string;
|
|
623
623
|
}
|
|
624
624
|
interface DefendDisputeResponse {
|
|
625
|
-
/** Updated dispute after
|
|
625
|
+
/** Updated dispute after submitting evidence. */
|
|
626
626
|
dispute?: Dispute;
|
|
627
627
|
}
|
|
628
628
|
interface BulkUpdateDisputeTagsRequest {
|
|
@@ -682,7 +682,11 @@ interface BulkActionMetadata {
|
|
|
682
682
|
undetailedFailures?: number;
|
|
683
683
|
}
|
|
684
684
|
interface BulkUpdateDisputeTagsByFilterRequest {
|
|
685
|
-
/**
|
|
685
|
+
/**
|
|
686
|
+
* Filter that determines which disputes to update tags for.
|
|
687
|
+
*
|
|
688
|
+
* An empty filter updates all disputes.
|
|
689
|
+
*/
|
|
686
690
|
filter: Record<string, any> | null;
|
|
687
691
|
/** Tags to assign to the filtered disputes. */
|
|
688
692
|
assignTags?: Tags;
|
|
@@ -757,7 +761,7 @@ interface DisputeCreatedEnvelope {
|
|
|
757
761
|
metadata: EventMetadata;
|
|
758
762
|
}
|
|
759
763
|
/**
|
|
760
|
-
*
|
|
764
|
+
* Triggered when a dispute is created.
|
|
761
765
|
* @permissionId PAYMENTS.DISPUTE_READ
|
|
762
766
|
* @webhook
|
|
763
767
|
* @eventType wix.payments.disputes.v1.dispute_created
|
|
@@ -770,7 +774,7 @@ interface DisputeUpdatedEnvelope {
|
|
|
770
774
|
metadata: EventMetadata;
|
|
771
775
|
}
|
|
772
776
|
/**
|
|
773
|
-
*
|
|
777
|
+
* Triggered when a dispute is updated.
|
|
774
778
|
* @permissionId PAYMENTS.DISPUTE_READ
|
|
775
779
|
* @webhook
|
|
776
780
|
* @eventType wix.payments.disputes.v1.dispute_updated
|
|
@@ -779,20 +783,29 @@ interface DisputeUpdatedEnvelope {
|
|
|
779
783
|
*/
|
|
780
784
|
declare function onDisputeUpdated(handler: (event: DisputeUpdatedEnvelope) => void | Promise<void>): void;
|
|
781
785
|
/**
|
|
782
|
-
* Retrieves a dispute
|
|
786
|
+
* Retrieves a dispute.
|
|
783
787
|
* @param disputeId - ID of the dispute to retrieve.
|
|
784
788
|
* @public
|
|
785
789
|
* @documentationMaturity preview
|
|
786
790
|
* @requiredField disputeId
|
|
787
791
|
* @permissionId PAYMENTS.DISPUTE_READ
|
|
788
792
|
* @applicableIdentity APP
|
|
789
|
-
* @returns The
|
|
793
|
+
* @returns The retrieved dispute.
|
|
790
794
|
* @fqn wix.payments.disputes.v1.DisputeService.GetDispute
|
|
791
795
|
*/
|
|
792
796
|
declare function getDispute(disputeId: string): Promise<NonNullablePaths<Dispute, `_id` | `chargeId` | `providerDisputeId` | `stage` | `reason` | `status` | `sellerProtection` | `channel` | `actions` | `actions.${number}.type` | `tags.privateTags.tagIds`, 4>>;
|
|
793
797
|
/**
|
|
794
|
-
*
|
|
795
|
-
*
|
|
798
|
+
* Creates a query to retrieve a list of disputes.
|
|
799
|
+
*
|
|
800
|
+
* The Query Disputes method builds a query to retrieve a list of disputes and returns a `DisputesQueryBuilder` object.
|
|
801
|
+
*
|
|
802
|
+
* The returned object contains the query definition, which is used to run the query using the `find()` method.
|
|
803
|
+
*
|
|
804
|
+
* 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.
|
|
805
|
+
*
|
|
806
|
+
* Query Disputes has a default paging limit of 50, which you can override.
|
|
807
|
+
*
|
|
808
|
+
* For a full description of the item object, see the object returned for the `items` property in `DisputesQueryResult`.
|
|
796
809
|
* @public
|
|
797
810
|
* @documentationMaturity preview
|
|
798
811
|
* @permissionId PAYMENTS.DISPUTE_READ
|
|
@@ -877,9 +890,16 @@ interface DisputesQueryBuilder {
|
|
|
877
890
|
/** @documentationMaturity preview */
|
|
878
891
|
find: () => Promise<DisputesQueryResult>;
|
|
879
892
|
}
|
|
893
|
+
/**
|
|
894
|
+
* @hidden
|
|
895
|
+
* @fqn wix.payments.disputes.v1.DisputeService.QueryDisputes
|
|
896
|
+
* @requiredField query
|
|
897
|
+
*/
|
|
898
|
+
declare function typedQueryDisputes(query: CursorQuery): Promise<NonNullablePaths<QueryDisputesResponse, `disputes` | `disputes.${number}._id` | `disputes.${number}.chargeId` | `disputes.${number}.providerDisputeId` | `disputes.${number}.stage` | `disputes.${number}.reason` | `disputes.${number}.status` | `disputes.${number}.sellerProtection` | `disputes.${number}.channel`, 4>>;
|
|
880
899
|
/**
|
|
881
900
|
* Accepts liability for a dispute, indicating the merchant agrees with the customer's claim.
|
|
882
|
-
*
|
|
901
|
+
*
|
|
902
|
+
* When a dispute is accepted, the refund is processed automatically.
|
|
883
903
|
* @param disputeId - ID of the dispute to accept.
|
|
884
904
|
* @public
|
|
885
905
|
* @documentationMaturity preview
|
|
@@ -890,9 +910,9 @@ interface DisputesQueryBuilder {
|
|
|
890
910
|
*/
|
|
891
911
|
declare function acceptDispute(disputeId: string): Promise<NonNullablePaths<AcceptDisputeResponse, `dispute._id` | `dispute.chargeId` | `dispute.providerDisputeId` | `dispute.stage` | `dispute.reason` | `dispute.status` | `dispute.sellerProtection` | `dispute.channel` | `dispute.actions` | `dispute.actions.${number}.type` | `dispute.tags.privateTags.tagIds`, 5>>;
|
|
892
912
|
/**
|
|
893
|
-
*
|
|
894
|
-
*
|
|
895
|
-
* Evidence
|
|
913
|
+
* Defends a dispute by submitting evidence to the payment service provider or bank handling the dispute.
|
|
914
|
+
*
|
|
915
|
+
* 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.
|
|
896
916
|
* @param disputeId - ID of the dispute to defend.
|
|
897
917
|
* @public
|
|
898
918
|
* @documentationMaturity preview
|
|
@@ -910,6 +930,7 @@ declare function defendDispute(disputeId: string): Promise<NonNullablePaths<Defe
|
|
|
910
930
|
* @documentationMaturity preview
|
|
911
931
|
* @requiredField ids
|
|
912
932
|
* @permissionId PAYMENTS.DISPUTE_UPDATE_TAGS
|
|
933
|
+
* @applicableIdentity APP
|
|
913
934
|
* @fqn wix.payments.disputes.v1.DisputeService.BulkUpdateDisputeTags
|
|
914
935
|
*/
|
|
915
936
|
declare function bulkUpdateDisputeTags(ids: string[], options?: BulkUpdateDisputeTagsOptions): Promise<NonNullablePaths<BulkUpdateDisputeTagsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6> & {
|
|
@@ -924,11 +945,14 @@ interface BulkUpdateDisputeTagsOptions {
|
|
|
924
945
|
/**
|
|
925
946
|
* Asynchronously updates tags on multiple disputes based on filter criteria.
|
|
926
947
|
* 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.
|
|
927
|
-
* @param filter - Filter
|
|
948
|
+
* @param filter - Filter that determines which disputes to update tags for.
|
|
949
|
+
*
|
|
950
|
+
* An empty filter updates all disputes.
|
|
928
951
|
* @public
|
|
929
952
|
* @documentationMaturity preview
|
|
930
953
|
* @requiredField filter
|
|
931
954
|
* @permissionId PAYMENTS.DISPUTE_UPDATE_TAGS
|
|
955
|
+
* @applicableIdentity APP
|
|
932
956
|
* @fqn wix.payments.disputes.v1.DisputeService.BulkUpdateDisputeTagsByFilter
|
|
933
957
|
*/
|
|
934
958
|
declare function bulkUpdateDisputeTagsByFilter(filter: Record<string, any>, options?: BulkUpdateDisputeTagsByFilterOptions): Promise<NonNullablePaths<BulkUpdateDisputeTagsByFilterResponse, `jobId`, 2> & {
|
|
@@ -941,4 +965,4 @@ interface BulkUpdateDisputeTagsByFilterOptions {
|
|
|
941
965
|
unassignTags?: Tags;
|
|
942
966
|
}
|
|
943
967
|
|
|
944
|
-
export { type AcceptDisputeManuallyRequest, type AcceptDisputeManuallyResponse, type AcceptDisputeRequest, type AcceptDisputeResponse, 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 ChangeDisputeStatusManuallyRequest, type ChangeDisputeStatusManuallyResponse, type CreateDisputeManuallyRequest, type CreateDisputeManuallyResponse, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DefendDisputeManuallyRequest, type DefendDisputeManuallyResponse, type DefendDisputeRequest, type DefendDisputeResponse, type Dispute, type DisputeAction, DisputeActionType, type DisputeActionTypeWithLiterals, DisputeChannel, type DisputeChannelWithLiterals, type DisputeCreatedEnvelope, 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 };
|
|
968
|
+
export { type AcceptDisputeManuallyRequest, type AcceptDisputeManuallyResponse, type AcceptDisputeRequest, type AcceptDisputeResponse, 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 ChangeDisputeStatusManuallyRequest, type ChangeDisputeStatusManuallyResponse, type CreateDisputeManuallyRequest, type CreateDisputeManuallyResponse, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DefendDisputeManuallyRequest, type DefendDisputeManuallyResponse, type DefendDisputeRequest, type DefendDisputeResponse, type Dispute, type DisputeAction, DisputeActionType, type DisputeActionTypeWithLiterals, DisputeChannel, type DisputeChannelWithLiterals, type DisputeCreatedEnvelope, 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 };
|
|
@@ -33,7 +33,8 @@ __export(index_typings_exports, {
|
|
|
33
33
|
bulkUpdateDisputeTagsByFilter: () => bulkUpdateDisputeTagsByFilter2,
|
|
34
34
|
defendDispute: () => defendDispute2,
|
|
35
35
|
getDispute: () => getDispute2,
|
|
36
|
-
queryDisputes: () => queryDisputes2
|
|
36
|
+
queryDisputes: () => queryDisputes2,
|
|
37
|
+
typedQueryDisputes: () => typedQueryDisputes
|
|
37
38
|
});
|
|
38
39
|
module.exports = __toCommonJS(index_typings_exports);
|
|
39
40
|
|
|
@@ -404,6 +405,29 @@ function queryDisputes2() {
|
|
|
404
405
|
transformationPaths: {}
|
|
405
406
|
});
|
|
406
407
|
}
|
|
408
|
+
async function typedQueryDisputes(query) {
|
|
409
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
410
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ query });
|
|
411
|
+
const reqOpts = queryDisputes(payload);
|
|
412
|
+
sideEffects?.onSiteCall?.();
|
|
413
|
+
try {
|
|
414
|
+
const result = await httpClient.request(reqOpts);
|
|
415
|
+
sideEffects?.onSuccess?.(result);
|
|
416
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
417
|
+
} catch (err) {
|
|
418
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
419
|
+
err,
|
|
420
|
+
{
|
|
421
|
+
spreadPathsToArguments: {},
|
|
422
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
423
|
+
singleArgumentUnchanged: false
|
|
424
|
+
},
|
|
425
|
+
["query"]
|
|
426
|
+
);
|
|
427
|
+
sideEffects?.onError?.(err);
|
|
428
|
+
throw transformedError;
|
|
429
|
+
}
|
|
430
|
+
}
|
|
407
431
|
async function acceptDispute2(disputeId) {
|
|
408
432
|
const { httpClient, sideEffects } = arguments[1];
|
|
409
433
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -533,6 +557,7 @@ async function bulkUpdateDisputeTagsByFilter2(filter, options) {
|
|
|
533
557
|
bulkUpdateDisputeTagsByFilter,
|
|
534
558
|
defendDispute,
|
|
535
559
|
getDispute,
|
|
536
|
-
queryDisputes
|
|
560
|
+
queryDisputes,
|
|
561
|
+
typedQueryDisputes
|
|
537
562
|
});
|
|
538
563
|
//# sourceMappingURL=index.typings.js.map
|