@wix/auto_sdk_payments_disputes 1.0.30 → 1.0.32

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 +76 -39
  2. package/build/cjs/index.js +55 -34
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +1 -1
  5. package/build/cjs/index.typings.js +50 -29
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +79 -43
  8. package/build/cjs/meta.js +45 -26
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +76 -39
  11. package/build/es/index.mjs +54 -33
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +1 -1
  14. package/build/es/index.typings.mjs +49 -28
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +79 -43
  17. package/build/es/meta.mjs +44 -25
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +16 -16
  20. package/build/internal/cjs/index.js +55 -34
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +87 -50
  23. package/build/internal/cjs/index.typings.js +50 -29
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +79 -43
  26. package/build/internal/cjs/meta.js +45 -26
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +16 -16
  29. package/build/internal/es/index.mjs +54 -33
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +87 -50
  32. package/build/internal/es/index.typings.mjs +49 -28
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +79 -43
  35. package/build/internal/es/meta.mjs +44 -25
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +2 -2
@@ -20,9 +20,15 @@ interface Dispute {
20
20
  * @immutable
21
21
  */
22
22
  providerDisputeId?: string;
23
- /** Dispute stage */
23
+ /**
24
+ * Dispute stage
25
+ * @readonly
26
+ */
24
27
  stage?: DisputeStageWithLiterals;
25
- /** Dispute reason */
28
+ /**
29
+ * Dispute reason
30
+ * @readonly
31
+ */
26
32
  reason?: DisputeReasonWithLiterals;
27
33
  /**
28
34
  * Dispute currency. Should be the same as the charge currency.
@@ -36,33 +42,62 @@ interface Dispute {
36
42
  * @decimalValue options { gt:0, maxScale:8 }
37
43
  */
38
44
  amount?: string | null;
39
- /** Dispute status based on provider dispute status */
45
+ /**
46
+ * Dispute status based on provider dispute status
47
+ * @readonly
48
+ */
40
49
  status?: DisputeStatusWithLiterals;
41
50
  /** True if the merchant can do the refund with the opened dispute, false otherwise */
42
51
  chargeRefundable?: boolean | null;
43
- /** Seller protection */
52
+ /**
53
+ * Seller protection helps protect sellers from financial loss on eligible transactions due to unauthorized payments or claims that items were not received
54
+ * @readonly
55
+ */
44
56
  sellerProtection?: SellerProtectionWithLiterals;
45
57
  /**
46
58
  * Dispute Channel
47
59
  * Internal - this dispute is created on provider side
48
60
  * External - this dispute is created on bank side
61
+ * @readonly
49
62
  */
50
63
  channel?: DisputeChannelWithLiterals;
51
- /** The latest date and time until which the dispute can remain in its current status */
64
+ /**
65
+ * The latest date and time until which the dispute can remain in its current status
66
+ * @readonly
67
+ */
52
68
  dueDate?: Date | null;
53
69
  /**
54
70
  * Network reason code
55
- * https://docs.stripe.com/disputes/reason-codes-defense-requirements?card-network=visa
56
- * https://docs.stripe.com/disputes/reason-codes-defense-requirements?card-network=mastercard
57
- * https://docs.stripe.com/disputes/reason-codes-defense-requirements?card-network=amex
58
71
  * @minLength 1
59
72
  * @maxLength 64
60
73
  */
61
74
  networkReasonCode?: string | null;
62
- /** True if dispute is defendable */
75
+ /**
76
+ * True if dispute is defendable
77
+ * @readonly
78
+ */
63
79
  defendable?: boolean | null;
64
- /** True if it is an auto dispute */
80
+ /**
81
+ * True if it is an auto dispute
82
+ * @readonly
83
+ */
65
84
  autoDefended?: boolean | null;
85
+ /**
86
+ * The dispute defense date
87
+ * @readonly
88
+ */
89
+ defenseDate?: Date | null;
90
+ /**
91
+ * The dispute acceptance date
92
+ * @readonly
93
+ */
94
+ acceptanceDate?: Date | null;
95
+ /**
96
+ * The actions that can be perform with the dispute
97
+ * @readonly
98
+ * @maxSize 20
99
+ */
100
+ actions?: DisputeAction[];
66
101
  /**
67
102
  * The dispute created date
68
103
  * @readonly
@@ -124,17 +159,21 @@ declare enum DisputeStatus {
124
159
  UNKNOWN_DISPUTE_STATUS = "UNKNOWN_DISPUTE_STATUS",
125
160
  /** Waiting for some merchant action */
126
161
  WAITING_MERCHANT = "WAITING_MERCHANT",
127
- /** Dispute is under review by PSP (internal channel) or Bank (external channel) */
162
+ /** Dispute is under review by PSP or Bank */
128
163
  UNDER_REVIEW = "UNDER_REVIEW",
129
164
  /** Waiting for some buyer action */
130
165
  WAITING_BUYER = "WAITING_BUYER",
131
166
  /** Dispute won */
132
167
  WON = "WON",
133
168
  /** Dispute lost */
134
- LOST = "LOST"
169
+ LOST = "LOST",
170
+ /** Evidence were submitted and are being processed on provider side */
171
+ PROCESSING_EVIDENCE_SUBMISSION = "PROCESSING_EVIDENCE_SUBMISSION",
172
+ /** The dispute was accepted and the acceptance is being processed on provider side */
173
+ PROCESSING_ACCEPTANCE = "PROCESSING_ACCEPTANCE"
135
174
  }
136
175
  /** @enumType */
137
- type DisputeStatusWithLiterals = DisputeStatus | 'UNKNOWN_DISPUTE_STATUS' | 'WAITING_MERCHANT' | 'UNDER_REVIEW' | 'WAITING_BUYER' | 'WON' | 'LOST';
176
+ type DisputeStatusWithLiterals = DisputeStatus | 'UNKNOWN_DISPUTE_STATUS' | 'WAITING_MERCHANT' | 'UNDER_REVIEW' | 'WAITING_BUYER' | 'WON' | 'LOST' | 'PROCESSING_EVIDENCE_SUBMISSION' | 'PROCESSING_ACCEPTANCE';
138
177
  declare enum SellerProtection {
139
178
  UNKNOWN_SELLER_PROTECTION = "UNKNOWN_SELLER_PROTECTION",
140
179
  /** Not Eligible */
@@ -155,6 +194,22 @@ declare enum DisputeChannel {
155
194
  }
156
195
  /** @enumType */
157
196
  type DisputeChannelWithLiterals = DisputeChannel | 'UNKNOWN_DISPUTE_CHANNEL' | 'INTERNAL' | 'EXTERNAL';
197
+ interface DisputeAction {
198
+ /** Dispute Action type */
199
+ type?: DisputeActionTypeWithLiterals;
200
+ /** The latest date and time until which the action can be performed */
201
+ dueDate?: Date | null;
202
+ }
203
+ declare enum DisputeActionType {
204
+ /** Unknown dispute status */
205
+ UNKNOWN_DISPUTE_ACTION = "UNKNOWN_DISPUTE_ACTION",
206
+ /** Accept dispute */
207
+ ACCEPT = "ACCEPT",
208
+ /** Defend evidence */
209
+ DEFEND = "DEFEND"
210
+ }
211
+ /** @enumType */
212
+ type DisputeActionTypeWithLiterals = DisputeActionType | 'UNKNOWN_DISPUTE_ACTION' | 'ACCEPT' | 'DEFEND';
158
213
  interface ExtendedFields {
159
214
  /**
160
215
  * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
@@ -278,44 +333,25 @@ interface Cursors {
278
333
  */
279
334
  prev?: string | null;
280
335
  }
281
- interface GetDisputeActionsRequest {
336
+ interface AcceptDisputeRequest {
282
337
  /**
283
338
  * Dispute ID
284
339
  * @format GUID
285
340
  */
286
341
  disputeId: string;
287
342
  }
288
- interface GetDisputeActionsResponse {
289
- /**
290
- * Dispute actions
291
- * @maxSize 20
292
- */
293
- actions?: DisputeAction[];
294
- }
295
- interface DisputeAction {
296
- /** Dispute Action type */
297
- type?: DisputeActionTypeWithLiterals;
298
- /** The latest date and time until which the action can be performed */
299
- dueDate?: Date | null;
300
- }
301
- declare enum DisputeActionType {
302
- /** Unknown dispute status */
303
- UNKNOWN_DISPUTE_ACTION = "UNKNOWN_DISPUTE_ACTION",
304
- /** Accept dispute */
305
- ACCEPT = "ACCEPT",
306
- /** Submit evidence */
307
- SUBMIT_EVIDENCE = "SUBMIT_EVIDENCE"
343
+ interface AcceptDisputeResponse {
344
+ /** Dispute */
345
+ dispute?: Dispute;
308
346
  }
309
- /** @enumType */
310
- type DisputeActionTypeWithLiterals = DisputeActionType | 'UNKNOWN_DISPUTE_ACTION' | 'ACCEPT' | 'SUBMIT_EVIDENCE';
311
- interface AcceptDisputeRequest {
347
+ interface DefendDisputeRequest {
312
348
  /**
313
349
  * Dispute ID
314
350
  * @format GUID
315
351
  */
316
352
  disputeId: string;
317
353
  }
318
- interface AcceptDisputeResponse {
354
+ interface DefendDisputeResponse {
319
355
  /** Dispute */
320
356
  dispute?: Dispute;
321
357
  }
@@ -355,6 +391,7 @@ interface CreateDisputeManuallyRequest {
355
391
  reason?: DisputeReasonWithLiterals;
356
392
  /** Dispute status based on provider dispute status */
357
393
  status?: DisputeStatusWithLiterals;
394
+ /** The latest date and time until which the dispute can remain in its current status */
358
395
  dueDate?: Date | null;
359
396
  /**
360
397
  * Dispute currency. Should be the same as the charge currency.
@@ -665,7 +702,7 @@ type BulkUpdateDisputeTagsByFilterApplicationErrors = {
665
702
  * @returns The requested Dispute.
666
703
  * @fqn wix.payments.disputes.v1.DisputeService.GetDispute
667
704
  */
668
- declare function getDispute(disputeId: string): Promise<NonNullablePaths<Dispute, `_id` | `chargeId` | `providerDisputeId` | `stage` | `reason` | `status` | `sellerProtection` | `channel` | `tags.tags.tagIds`, 4>>;
705
+ declare function getDispute(disputeId: string): Promise<NonNullablePaths<Dispute, `_id` | `chargeId` | `providerDisputeId` | `stage` | `reason` | `status` | `sellerProtection` | `channel` | `actions` | `actions.${number}.type` | `tags.tags.tagIds`, 4>>;
669
706
  /**
670
707
  * Retrieves a list of Disputes
671
708
  * @internal
@@ -752,27 +789,27 @@ interface DisputesQueryBuilder {
752
789
  find: () => Promise<DisputesQueryResult>;
753
790
  }
754
791
  /**
755
- * Get Dispute Actions
792
+ * Accept Dispute
756
793
  * @param disputeId - Dispute ID
757
794
  * @internal
758
795
  * @documentationMaturity preview
759
796
  * @requiredField disputeId
760
- * @permissionId PAYMENTS.DISPUTE_GET_ACTIONS
761
- * @fqn wix.payments.disputes.v1.DisputeService.GetDisputeActions
797
+ * @permissionId PAYMENTS.DISPUTE_ACCEPT
798
+ * @fqn wix.payments.disputes.v1.DisputeService.AcceptDispute
762
799
  */
763
- declare function getDisputeActions(disputeId: string): Promise<NonNullablePaths<GetDisputeActionsResponse, `actions` | `actions.${number}.type`, 4>>;
800
+ 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.tags.tagIds`, 5>>;
764
801
  /**
765
- * Dispute Accept
802
+ * Defend Dispute
766
803
  * @param disputeId - Dispute ID
767
804
  * @internal
768
805
  * @documentationMaturity preview
769
806
  * @requiredField disputeId
770
- * @permissionId PAYMENTS.DISPUTE_ACCEPT
771
- * @fqn wix.payments.disputes.v1.DisputeService.AcceptDispute
807
+ * @permissionId PAYMENTS.DISPUTE_DEFEND
808
+ * @fqn wix.payments.disputes.v1.DisputeService.DefendDispute
772
809
  */
773
- 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.tags.tags.tagIds`, 5>>;
810
+ declare function defendDispute(disputeId: string): Promise<NonNullablePaths<DefendDisputeResponse, `dispute._id` | `dispute.chargeId` | `dispute.providerDisputeId` | `dispute.stage` | `dispute.reason` | `dispute.status` | `dispute.sellerProtection` | `dispute.channel` | `dispute.actions` | `dispute.actions.${number}.type` | `dispute.tags.tags.tagIds`, 5>>;
774
811
  /**
775
- * Dispute Submit Evidence
812
+ * Dispute Submit Evidence // TODO will be removed in next PR (after removing usage in transaction-service)
776
813
  * @param disputeId - Dispute ID
777
814
  * @internal
778
815
  * @documentationMaturity preview
@@ -780,7 +817,7 @@ declare function acceptDispute(disputeId: string): Promise<NonNullablePaths<Acce
780
817
  * @permissionId PAYMENTS.DISPUTE_SUBMIT_EVIDENCE
781
818
  * @fqn wix.payments.disputes.v1.DisputeService.SubmitDisputeEvidence
782
819
  */
783
- declare function submitDisputeEvidence(disputeId: string): Promise<NonNullablePaths<SubmitDisputeEvidenceResponse, `dispute._id` | `dispute.chargeId` | `dispute.providerDisputeId` | `dispute.stage` | `dispute.reason` | `dispute.status` | `dispute.sellerProtection` | `dispute.channel` | `dispute.tags.tags.tagIds`, 5>>;
820
+ declare function submitDisputeEvidence(disputeId: string): Promise<NonNullablePaths<SubmitDisputeEvidenceResponse, `dispute._id` | `dispute.chargeId` | `dispute.providerDisputeId` | `dispute.stage` | `dispute.reason` | `dispute.status` | `dispute.sellerProtection` | `dispute.channel` | `dispute.actions` | `dispute.actions.${number}.type` | `dispute.tags.tags.tagIds`, 5>>;
784
821
  /**
785
822
  * Synchronously update tags on multiple Disputes, by list of Disputes ids
786
823
  * A tag that appears both in the list of assign and unassign tags, will be assigned
@@ -821,4 +858,4 @@ interface BulkUpdateDisputeTagsByFilterOptions {
821
858
  unassignTags?: Tags;
822
859
  }
823
860
 
824
- export { type AcceptDisputeRequest, type AcceptDisputeResponse, type ActionEvent, type ApplicationError, 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 Dispute, type DisputeAction, DisputeActionType, type DisputeActionTypeWithLiterals, DisputeChannel, type DisputeChannelWithLiterals, DisputeReason, type DisputeReasonWithLiterals, DisputeStage, type DisputeStageWithLiterals, DisputeStatus, type DisputeStatusWithLiterals, type DisputesQueryBuilder, type DisputesQueryResult, type DomainEvent, type DomainEventBodyOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type ExtendedFields, type GetDisputeActionsRequest, type GetDisputeActionsResponse, type GetDisputeRequest, type GetDisputeResponse, type IdentificationData, type IdentificationDataIdOneOf, type ItemMetadata, type MessageEnvelope, type PublicTags, type QueryDisputesRequest, type QueryDisputesResponse, type RestoreInfo, SellerProtection, type SellerProtectionWithLiterals, SortOrder, type SortOrderWithLiterals, type Sorting, type SubmitDisputeEvidenceRequest, type SubmitDisputeEvidenceResponse, type TagList, type Tags, type TagsTagList, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, acceptDispute, bulkUpdateDisputeTags, bulkUpdateDisputeTagsByFilter, getDispute, getDisputeActions, queryDisputes, submitDisputeEvidence };
861
+ export { type AcceptDisputeRequest, type AcceptDisputeResponse, type ActionEvent, type ApplicationError, 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 DefendDisputeRequest, type DefendDisputeResponse, type Dispute, type DisputeAction, DisputeActionType, type DisputeActionTypeWithLiterals, DisputeChannel, type DisputeChannelWithLiterals, DisputeReason, type DisputeReasonWithLiterals, DisputeStage, type DisputeStageWithLiterals, DisputeStatus, type DisputeStatusWithLiterals, type DisputesQueryBuilder, type DisputesQueryResult, type DomainEvent, type DomainEventBodyOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type ExtendedFields, type GetDisputeRequest, type GetDisputeResponse, type IdentificationData, type IdentificationDataIdOneOf, type ItemMetadata, type MessageEnvelope, type PublicTags, type QueryDisputesRequest, type QueryDisputesResponse, type RestoreInfo, SellerProtection, type SellerProtectionWithLiterals, SortOrder, type SortOrderWithLiterals, type Sorting, type SubmitDisputeEvidenceRequest, type SubmitDisputeEvidenceResponse, type TagList, type Tags, type TagsTagList, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, acceptDispute, bulkUpdateDisputeTags, bulkUpdateDisputeTagsByFilter, defendDispute, getDispute, queryDisputes, submitDisputeEvidence };
@@ -31,8 +31,8 @@ __export(index_typings_exports, {
31
31
  acceptDispute: () => acceptDispute2,
32
32
  bulkUpdateDisputeTags: () => bulkUpdateDisputeTags2,
33
33
  bulkUpdateDisputeTagsByFilter: () => bulkUpdateDisputeTagsByFilter2,
34
+ defendDispute: () => defendDispute2,
34
35
  getDispute: () => getDispute2,
35
- getDisputeActions: () => getDisputeActions2,
36
36
  queryDisputes: () => queryDisputes2,
37
37
  submitDisputeEvidence: () => submitDisputeEvidence2
38
38
  });
@@ -71,8 +71,11 @@ function getDispute(payload) {
71
71
  transformFn: import_timestamp.transformRESTTimestampToSDKTimestamp,
72
72
  paths: [
73
73
  { path: "dispute.dueDate" },
74
+ { path: "dispute.defenseDate" },
75
+ { path: "dispute.acceptanceDate" },
74
76
  { path: "dispute.createdDate" },
75
- { path: "dispute.updatedDate" }
77
+ { path: "dispute.updatedDate" },
78
+ { path: "dispute.actions.dueDate" }
76
79
  ]
77
80
  }
78
81
  ])
@@ -99,8 +102,11 @@ function queryDisputes(payload) {
99
102
  transformFn: import_timestamp.transformRESTTimestampToSDKTimestamp,
100
103
  paths: [
101
104
  { path: "disputes.dueDate" },
105
+ { path: "disputes.defenseDate" },
106
+ { path: "disputes.acceptanceDate" },
102
107
  { path: "disputes.createdDate" },
103
- { path: "disputes.updatedDate" }
108
+ { path: "disputes.updatedDate" },
109
+ { path: "disputes.actions.dueDate" }
104
110
  ]
105
111
  }
106
112
  ]),
@@ -120,39 +126,46 @@ function queryDisputes(payload) {
120
126
  }
121
127
  return __queryDisputes;
122
128
  }
123
- function getDisputeActions(payload) {
124
- function __getDisputeActions({ host }) {
129
+ function acceptDispute(payload) {
130
+ function __acceptDispute({ host }) {
125
131
  const metadata = {
126
132
  entityFqdn: "wix.payments.disputes.v1.dispute",
127
- method: "GET",
128
- methodFqn: "wix.payments.disputes.v1.DisputeService.GetDisputeActions",
133
+ method: "POST",
134
+ methodFqn: "wix.payments.disputes.v1.DisputeService.AcceptDispute",
129
135
  packageName: PACKAGE_NAME,
130
136
  url: resolveWixPaymentsDisputesV1DisputeServiceUrl({
131
- protoPath: "/v1/disputes/{disputeId}/actions",
137
+ protoPath: "/v1/disputes/{disputeId}/accept",
132
138
  data: payload,
133
139
  host
134
140
  }),
135
- params: (0, import_rest_modules.toURLSearchParams)(payload),
141
+ data: payload,
136
142
  transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
137
143
  {
138
144
  transformFn: import_timestamp.transformRESTTimestampToSDKTimestamp,
139
- paths: [{ path: "actions.dueDate" }]
145
+ paths: [
146
+ { path: "dispute.dueDate" },
147
+ { path: "dispute.defenseDate" },
148
+ { path: "dispute.acceptanceDate" },
149
+ { path: "dispute.createdDate" },
150
+ { path: "dispute.updatedDate" },
151
+ { path: "dispute.actions.dueDate" }
152
+ ]
140
153
  }
141
154
  ])
142
155
  };
143
156
  return metadata;
144
157
  }
145
- return __getDisputeActions;
158
+ return __acceptDispute;
146
159
  }
147
- function acceptDispute(payload) {
148
- function __acceptDispute({ host }) {
160
+ function defendDispute(payload) {
161
+ function __defendDispute({ host }) {
149
162
  const metadata = {
150
163
  entityFqdn: "wix.payments.disputes.v1.dispute",
151
164
  method: "POST",
152
- methodFqn: "wix.payments.disputes.v1.DisputeService.AcceptDispute",
165
+ methodFqn: "wix.payments.disputes.v1.DisputeService.DefendDispute",
153
166
  packageName: PACKAGE_NAME,
154
167
  url: resolveWixPaymentsDisputesV1DisputeServiceUrl({
155
- protoPath: "/v1/disputes/{disputeId}/accept",
168
+ protoPath: "/v1/disputes/{disputeId}/defend",
156
169
  data: payload,
157
170
  host
158
171
  }),
@@ -162,15 +175,18 @@ function acceptDispute(payload) {
162
175
  transformFn: import_timestamp.transformRESTTimestampToSDKTimestamp,
163
176
  paths: [
164
177
  { path: "dispute.dueDate" },
178
+ { path: "dispute.defenseDate" },
179
+ { path: "dispute.acceptanceDate" },
165
180
  { path: "dispute.createdDate" },
166
- { path: "dispute.updatedDate" }
181
+ { path: "dispute.updatedDate" },
182
+ { path: "dispute.actions.dueDate" }
167
183
  ]
168
184
  }
169
185
  ])
170
186
  };
171
187
  return metadata;
172
188
  }
173
- return __acceptDispute;
189
+ return __defendDispute;
174
190
  }
175
191
  function submitDisputeEvidence(payload) {
176
192
  function __submitDisputeEvidence({ host }) {
@@ -190,8 +206,11 @@ function submitDisputeEvidence(payload) {
190
206
  transformFn: import_timestamp.transformRESTTimestampToSDKTimestamp,
191
207
  paths: [
192
208
  { path: "dispute.dueDate" },
209
+ { path: "dispute.defenseDate" },
210
+ { path: "dispute.acceptanceDate" },
193
211
  { path: "dispute.createdDate" },
194
- { path: "dispute.updatedDate" }
212
+ { path: "dispute.updatedDate" },
213
+ { path: "dispute.actions.dueDate" }
195
214
  ]
196
215
  }
197
216
  ])
@@ -266,6 +285,8 @@ var DisputeStatus = /* @__PURE__ */ ((DisputeStatus2) => {
266
285
  DisputeStatus2["WAITING_BUYER"] = "WAITING_BUYER";
267
286
  DisputeStatus2["WON"] = "WON";
268
287
  DisputeStatus2["LOST"] = "LOST";
288
+ DisputeStatus2["PROCESSING_EVIDENCE_SUBMISSION"] = "PROCESSING_EVIDENCE_SUBMISSION";
289
+ DisputeStatus2["PROCESSING_ACCEPTANCE"] = "PROCESSING_ACCEPTANCE";
269
290
  return DisputeStatus2;
270
291
  })(DisputeStatus || {});
271
292
  var SellerProtection = /* @__PURE__ */ ((SellerProtection2) => {
@@ -281,17 +302,17 @@ var DisputeChannel = /* @__PURE__ */ ((DisputeChannel2) => {
281
302
  DisputeChannel2["EXTERNAL"] = "EXTERNAL";
282
303
  return DisputeChannel2;
283
304
  })(DisputeChannel || {});
284
- var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
285
- SortOrder2["ASC"] = "ASC";
286
- SortOrder2["DESC"] = "DESC";
287
- return SortOrder2;
288
- })(SortOrder || {});
289
305
  var DisputeActionType = /* @__PURE__ */ ((DisputeActionType2) => {
290
306
  DisputeActionType2["UNKNOWN_DISPUTE_ACTION"] = "UNKNOWN_DISPUTE_ACTION";
291
307
  DisputeActionType2["ACCEPT"] = "ACCEPT";
292
- DisputeActionType2["SUBMIT_EVIDENCE"] = "SUBMIT_EVIDENCE";
308
+ DisputeActionType2["DEFEND"] = "DEFEND";
293
309
  return DisputeActionType2;
294
310
  })(DisputeActionType || {});
311
+ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
312
+ SortOrder2["ASC"] = "ASC";
313
+ SortOrder2["DESC"] = "DESC";
314
+ return SortOrder2;
315
+ })(SortOrder || {});
295
316
  var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
296
317
  WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
297
318
  WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
@@ -368,12 +389,12 @@ function queryDisputes2() {
368
389
  transformationPaths: {}
369
390
  });
370
391
  }
371
- async function getDisputeActions2(disputeId) {
392
+ async function acceptDispute2(disputeId) {
372
393
  const { httpClient, sideEffects } = arguments[1];
373
394
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
374
395
  disputeId
375
396
  });
376
- const reqOpts = getDisputeActions(payload);
397
+ const reqOpts = acceptDispute(payload);
377
398
  sideEffects?.onSiteCall?.();
378
399
  try {
379
400
  const result = await httpClient.request(reqOpts);
@@ -393,12 +414,12 @@ async function getDisputeActions2(disputeId) {
393
414
  throw transformedError;
394
415
  }
395
416
  }
396
- async function acceptDispute2(disputeId) {
417
+ async function defendDispute2(disputeId) {
397
418
  const { httpClient, sideEffects } = arguments[1];
398
419
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
399
420
  disputeId
400
421
  });
401
- const reqOpts = acceptDispute(payload);
422
+ const reqOpts = defendDispute(payload);
402
423
  sideEffects?.onSiteCall?.();
403
424
  try {
404
425
  const result = await httpClient.request(reqOpts);
@@ -520,8 +541,8 @@ async function bulkUpdateDisputeTagsByFilter2(filter, options) {
520
541
  acceptDispute,
521
542
  bulkUpdateDisputeTags,
522
543
  bulkUpdateDisputeTagsByFilter,
544
+ defendDispute,
523
545
  getDispute,
524
- getDisputeActions,
525
546
  queryDisputes,
526
547
  submitDisputeEvidence
527
548
  });