@wix/auto_sdk_payments_disputes 1.0.33 → 1.0.34

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 +59 -860
  2. package/build/cjs/index.js +63 -76
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +1014 -1
  5. package/build/cjs/index.typings.js +10 -68
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +9 -25
  8. package/build/cjs/meta.js +10 -61
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +59 -860
  11. package/build/es/index.mjs +60 -74
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +1014 -1
  14. package/build/es/index.typings.mjs +9 -66
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +9 -25
  17. package/build/es/meta.mjs +9 -59
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +14 -27
  20. package/build/internal/cjs/index.js +63 -76
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +87 -30
  23. package/build/internal/cjs/index.typings.js +10 -68
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +8 -25
  26. package/build/internal/cjs/meta.js +10 -61
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +14 -27
  29. package/build/internal/es/index.mjs +60 -74
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +87 -30
  32. package/build/internal/es/index.typings.mjs +9 -66
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +8 -25
  35. package/build/internal/es/meta.mjs +9 -59
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +2 -2
@@ -1,879 +1,78 @@
1
- /** Dispute. A dispute occurs when an account owner contacts their PSP or bank to contest a payment to you for a number of possible reasons. */
2
- interface Dispute {
3
- /**
4
- * Dispute ID
5
- * @format GUID
6
- * @immutable
7
- */
8
- _id?: string;
9
- /**
10
- * Charge ID
11
- * @format GUID
12
- * @immutable
13
- */
14
- chargeId?: string;
15
- /**
16
- * Provider Dispute ID
17
- * @format GUID
18
- * @immutable
19
- */
20
- providerDisputeId?: string;
21
- /**
22
- * Dispute stage
23
- * @readonly
24
- */
25
- stage?: DisputeStageWithLiterals;
26
- /**
27
- * Dispute reason
28
- * @readonly
29
- */
30
- reason?: DisputeReasonWithLiterals;
31
- /**
32
- * Dispute currency. Should be the same as the charge currency.
33
- * @immutable
34
- * @format CURRENCY
35
- */
36
- currencyCode?: string | null;
37
- /**
38
- * Dispute Amount in currency's main units (such as dollars or euros). For example, `"12.95"`.
39
- * @immutable
40
- * @decimalValue options { gt:0, maxScale:8 }
41
- */
42
- amount?: string | null;
43
- /**
44
- * Dispute status based on provider dispute status
45
- * @readonly
46
- */
47
- status?: DisputeStatusWithLiterals;
48
- /** True if the merchant can do the refund with the opened dispute, false otherwise */
49
- chargeRefundable?: boolean | null;
50
- /**
51
- * Seller protection helps protect sellers from financial loss on eligible transactions due to unauthorized payments or claims that items were not received
52
- * @readonly
53
- */
54
- sellerProtection?: SellerProtectionWithLiterals;
55
- /**
56
- * Dispute Channel
57
- * Internal - this dispute is created on provider side
58
- * External - this dispute is created on bank side
59
- * @readonly
60
- */
61
- channel?: DisputeChannelWithLiterals;
62
- /**
63
- * The latest date and time until which the dispute can remain in its current status
64
- * @readonly
65
- */
66
- dueDate?: Date | null;
67
- /**
68
- * Network reason code
69
- * @minLength 1
70
- * @maxLength 64
71
- */
72
- networkReasonCode?: string | null;
73
- /**
74
- * True if dispute is defendable
75
- * @readonly
76
- */
77
- defendable?: boolean | null;
78
- /**
79
- * True if it is an auto dispute
80
- * @readonly
81
- */
82
- autoDefended?: boolean | null;
83
- /**
84
- * The dispute defense date
85
- * @readonly
86
- */
87
- defenseDate?: Date | null;
88
- /**
89
- * The dispute acceptance date
90
- * @readonly
91
- */
92
- acceptanceDate?: Date | null;
93
- /**
94
- * The actions that can be perform with the dispute
95
- * @readonly
96
- * @maxSize 20
97
- */
98
- actions?: DisputeAction[];
99
- /**
100
- * The dispute created date
101
- * @readonly
102
- * @immutable
103
- */
104
- _createdDate?: Date | null;
105
- /**
106
- * The dispute updated date
107
- * @readonly
108
- */
109
- _updatedDate?: Date | null;
110
- /**
111
- * Revision number, which increments by 1 each time the Dispute is updated.
112
- * @readonly
113
- */
114
- revision?: string | null;
115
- /** Data Extensions */
116
- extendedFields?: ExtendedFields;
117
- /** Tags */
118
- tags?: Tags;
119
- }
120
- declare enum DisputeStage {
121
- UNKNOWN_DISPUTE_STAGE = "UNKNOWN_DISPUTE_STAGE",
122
- /** Chargeback */
123
- CHARGEBACK = "CHARGEBACK",
124
- /** Inquiry (Request for Information) */
125
- INQUIRY = "INQUIRY"
126
- }
127
- /** @enumType */
128
- type DisputeStageWithLiterals = DisputeStage | 'UNKNOWN_DISPUTE_STAGE' | 'CHARGEBACK' | 'INQUIRY';
129
- declare enum DisputeReason {
130
- /** Unknown reason */
131
- UNKNOWN_DISPUTE_REASON = "UNKNOWN_DISPUTE_REASON",
132
- /** Fraud card */
133
- FRAUD_CARD_PRESENT = "FRAUD_CARD_PRESENT",
134
- /** Card absent */
135
- FRAUD_CARD_ABSENT = "FRAUD_CARD_ABSENT",
136
- /** DUPLICATE */
137
- DUPLICATE_PROCESSING = "DUPLICATE_PROCESSING",
138
- /** Service not provided */
139
- SERVICES_NOT_PROVIDED = "SERVICES_NOT_PROVIDED",
140
- /** Canceled Recurring */
141
- CANCELED_RECURRING = "CANCELED_RECURRING",
142
- /** Item not as describe */
143
- NOT_AS_DESCRIBED = "NOT_AS_DESCRIBED",
144
- /** Counterfeit */
145
- COUNTERFEIT = "COUNTERFEIT",
146
- /** Misrepresentation */
147
- MISREPRESENTATION = "MISREPRESENTATION",
148
- /** Canceled */
149
- CANCELED = "CANCELED",
150
- /** Other reason */
151
- OTHER = "OTHER"
152
- }
153
- /** @enumType */
154
- type DisputeReasonWithLiterals = DisputeReason | 'UNKNOWN_DISPUTE_REASON' | 'FRAUD_CARD_PRESENT' | 'FRAUD_CARD_ABSENT' | 'DUPLICATE_PROCESSING' | 'SERVICES_NOT_PROVIDED' | 'CANCELED_RECURRING' | 'NOT_AS_DESCRIBED' | 'COUNTERFEIT' | 'MISREPRESENTATION' | 'CANCELED' | 'OTHER';
155
- declare enum DisputeStatus {
156
- /** Unknown status */
157
- UNKNOWN_DISPUTE_STATUS = "UNKNOWN_DISPUTE_STATUS",
158
- /** Waiting for some merchant action */
159
- WAITING_MERCHANT = "WAITING_MERCHANT",
160
- /** Dispute is under review by PSP or Bank */
161
- UNDER_REVIEW = "UNDER_REVIEW",
162
- /** Waiting for some buyer action */
163
- WAITING_BUYER = "WAITING_BUYER",
164
- /** Dispute won */
165
- WON = "WON",
166
- /** Dispute lost */
167
- LOST = "LOST",
168
- /** Evidence were submitted and are being processed on provider side */
169
- PROCESSING_EVIDENCE_SUBMISSION = "PROCESSING_EVIDENCE_SUBMISSION",
170
- /** The dispute was accepted and the acceptance is being processed on provider side */
171
- PROCESSING_ACCEPTANCE = "PROCESSING_ACCEPTANCE"
172
- }
173
- /** @enumType */
174
- type DisputeStatusWithLiterals = DisputeStatus | 'UNKNOWN_DISPUTE_STATUS' | 'WAITING_MERCHANT' | 'UNDER_REVIEW' | 'WAITING_BUYER' | 'WON' | 'LOST' | 'PROCESSING_EVIDENCE_SUBMISSION' | 'PROCESSING_ACCEPTANCE';
175
- declare enum SellerProtection {
176
- UNKNOWN_SELLER_PROTECTION = "UNKNOWN_SELLER_PROTECTION",
177
- /** Not Eligible */
178
- NOT_ELIGIBLE = "NOT_ELIGIBLE",
179
- /** Eligible */
180
- ELIGIBLE = "ELIGIBLE",
181
- /** Extended seller protection */
182
- EXTENDED = "EXTENDED"
183
- }
184
- /** @enumType */
185
- type SellerProtectionWithLiterals = SellerProtection | 'UNKNOWN_SELLER_PROTECTION' | 'NOT_ELIGIBLE' | 'ELIGIBLE' | 'EXTENDED';
186
- declare enum DisputeChannel {
187
- UNKNOWN_DISPUTE_CHANNEL = "UNKNOWN_DISPUTE_CHANNEL",
188
- /** Internal, the dispute is reviewed by PSP */
189
- INTERNAL = "INTERNAL",
190
- /** External, the dispute is reviewed by bank (or other financial institution) */
191
- EXTERNAL = "EXTERNAL"
192
- }
193
- /** @enumType */
194
- type DisputeChannelWithLiterals = DisputeChannel | 'UNKNOWN_DISPUTE_CHANNEL' | 'INTERNAL' | 'EXTERNAL';
195
- interface DisputeAction {
196
- /** Dispute Action type */
197
- type?: DisputeActionTypeWithLiterals;
198
- /** The latest date and time until which the action can be performed */
199
- dueDate?: Date | null;
200
- }
201
- declare enum DisputeActionType {
202
- /** Unknown dispute status */
203
- UNKNOWN_DISPUTE_ACTION = "UNKNOWN_DISPUTE_ACTION",
204
- /** Accept dispute */
205
- ACCEPT = "ACCEPT",
206
- /** Defend evidence */
207
- DEFEND = "DEFEND"
208
- }
209
- /** @enumType */
210
- type DisputeActionTypeWithLiterals = DisputeActionType | 'UNKNOWN_DISPUTE_ACTION' | 'ACCEPT' | 'DEFEND';
211
- interface ExtendedFields {
212
- /**
213
- * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
214
- * The value of each key is structured according to the schema defined when the extended fields were configured.
215
- *
216
- * You can only access fields for which you have the appropriate permissions.
217
- *
218
- * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
219
- */
220
- namespaces?: Record<string, Record<string, any>>;
221
- }
222
- /**
223
- * Common object for tags.
224
- * Should be use as in this example:
225
- * message Foo {
226
- * option (.wix.api.decomposite_of) = "wix.commons.v2.tags.Foo";
227
- * string id = 1;
228
- * ...
229
- * Tags tags = 5
230
- * }
231
- *
232
- * example of taggable entity
233
- * {
234
- * id: "123"
235
- * tags: {
236
- * public_tags: {
237
- * tag_ids:["11","22"]
238
- * },
239
- * private_tags: {
240
- * tag_ids: ["33", "44"]
241
- * }
242
- * }
243
- * }
244
- */
245
- interface Tags {
246
- /** Tags that require an additional permission in order to access them, normally not given to site members or visitors. */
247
- privateTags?: TagList;
248
- /** Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors. */
249
- publicTags?: TagList;
250
- }
251
- interface TagList {
252
- /**
253
- * List of tag IDs.
254
- * @maxSize 100
255
- * @maxLength 5
256
- */
257
- tagIds?: string[];
258
- }
259
- interface TagsModified {
260
- /** Updated Dispute. */
261
- dispute?: Dispute;
262
- /** Tags that were assigned to the Dispute. */
263
- assignedTags?: Tags;
264
- /** Tags that were unassigned from the Dispute. */
265
- unassignedTags?: Tags;
266
- }
267
- interface InternalCreateDisputeManuallyRequest {
268
- /**
269
- * Dispute Id
270
- * @format GUID
271
- */
272
- disputeId?: string;
273
- /**
274
- * Charge Id
275
- * @format GUID
276
- */
277
- chargeId?: string;
278
- /** Open date */
279
- openDate?: Date | null;
280
- /**
281
- * Provider Dispute Id
282
- * @minLength 1
283
- * @maxLength 100
284
- */
285
- providerDisputeId?: string;
286
- /** Dispute stage */
287
- stage?: DisputeStageWithLiterals;
288
- /** Dispute reason */
289
- reason?: DisputeReasonWithLiterals;
290
- /** Dispute status based on provider dispute status */
291
- status?: DisputeStatusWithLiterals;
292
- /** The latest date and time until which the dispute can remain in its current status */
293
- dueDate?: Date | null;
294
- /**
295
- * Dispute currency. Should be the same as the charge currency.
296
- * @immutable
297
- * @format CURRENCY
298
- */
299
- currencyCode?: string | null;
300
- /**
301
- * Dispute Amount in currency's main units (such as dollars or euros). For example, `"12.95"`.
302
- * @immutable
303
- * @decimalValue options { gt:0, maxScale:8 }
304
- */
305
- amount?: string | null;
306
- /**
307
- * Network reason code
308
- * @minLength 1
309
- * @maxLength 64
310
- */
311
- networkReasonCode?: string | null;
312
- /** External or Internal */
313
- external?: boolean | null;
314
- /**
315
- * Seller protection
316
- * @minLength 1
317
- * @maxLength 64
318
- */
319
- sellerProtection?: string | null;
320
- /** Is charge refundable */
321
- chargeRefundable?: boolean | null;
322
- /** True if dispute is defendable */
323
- defendable?: boolean | null;
324
- /** True if it is an auto dispute */
325
- autoDefended?: boolean | null;
326
- }
327
- interface InternalCreateDisputeManuallyResponse {
328
- }
329
- interface InternalChangeDisputeStatusManuallyRequest {
330
- /**
331
- * Dispute ID
332
- * @format GUID
333
- */
334
- disputeId?: string;
335
- /** Changed date */
336
- changedDate?: Date | null;
337
- /** Dispute status based on provider dispute status */
338
- status?: DisputeStatusWithLiterals;
339
- }
340
- interface InternalChangeDisputeStatusManuallyResponse {
341
- }
342
- interface AcceptDisputeManuallyRequest {
343
- /**
344
- * Dispute ID
345
- * @format GUID
346
- */
347
- disputeId?: string;
348
- /** Acceptance date */
349
- acceptanceDate?: Date | null;
350
- }
351
- interface AcceptDisputeManuallyResponse {
352
- }
353
- interface DefendDisputeManuallyRequest {
354
- /**
355
- * Dispute ID
356
- * @format GUID
357
- */
358
- disputeId?: string;
359
- /** Defense date */
360
- defenseDate?: Date | null;
361
- }
362
- interface DefendDisputeManuallyResponse {
363
- }
364
- interface DomainEvent extends DomainEventBodyOneOf {
365
- createdEvent?: EntityCreatedEvent;
366
- updatedEvent?: EntityUpdatedEvent;
367
- deletedEvent?: EntityDeletedEvent;
368
- actionEvent?: ActionEvent;
369
- /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
370
- _id?: string;
371
- /**
372
- * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
373
- * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
374
- */
375
- entityFqdn?: string;
376
- /**
377
- * Event action name, placed at the top level to make it easier for users to dispatch messages.
378
- * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
379
- */
380
- slug?: string;
381
- /** ID of the entity associated with the event. */
382
- entityId?: string;
383
- /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
384
- eventTime?: Date | null;
385
- /**
386
- * Whether the event was triggered as a result of a privacy regulation application
387
- * (for example, GDPR).
388
- */
389
- triggeredByAnonymizeRequest?: boolean | null;
390
- /** If present, indicates the action that triggered the event. */
391
- originatedFrom?: string | null;
392
- /**
393
- * 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.
394
- * 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.
395
- */
396
- entityEventSequence?: string | null;
397
- }
398
- /** @oneof */
399
- interface DomainEventBodyOneOf {
400
- createdEvent?: EntityCreatedEvent;
401
- updatedEvent?: EntityUpdatedEvent;
402
- deletedEvent?: EntityDeletedEvent;
403
- actionEvent?: ActionEvent;
404
- }
405
- interface EntityCreatedEvent {
406
- entity?: string;
407
- }
408
- interface RestoreInfo {
409
- deletedDate?: Date | null;
410
- }
411
- interface EntityUpdatedEvent {
412
- /**
413
- * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
414
- * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
415
- * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
416
- */
417
- currentEntity?: string;
418
- }
419
- interface EntityDeletedEvent {
420
- /** Entity that was deleted. */
421
- deletedEntity?: string | null;
422
- }
423
- interface ActionEvent {
424
- body?: string;
425
- }
426
- interface MessageEnvelope {
427
- /**
428
- * App instance ID.
429
- * @format GUID
430
- */
431
- instanceId?: string | null;
432
- /**
433
- * Event type.
434
- * @maxLength 150
435
- */
436
- eventType?: string;
437
- /** The identification type and identity data. */
438
- identity?: IdentificationData;
439
- /** Stringify payload. */
440
- data?: string;
441
- }
442
- interface IdentificationData extends IdentificationDataIdOneOf {
443
- /**
444
- * ID of a site visitor that has not logged in to the site.
445
- * @format GUID
446
- */
447
- anonymousVisitorId?: string;
448
- /**
449
- * ID of a site visitor that has logged in to the site.
450
- * @format GUID
451
- */
452
- memberId?: string;
453
- /**
454
- * ID of a Wix user (site owner, contributor, etc.).
455
- * @format GUID
456
- */
457
- wixUserId?: string;
458
- /**
459
- * ID of an app.
460
- * @format GUID
461
- */
462
- appId?: string;
463
- /** @readonly */
464
- identityType?: WebhookIdentityTypeWithLiterals;
465
- }
466
- /** @oneof */
467
- interface IdentificationDataIdOneOf {
468
- /**
469
- * ID of a site visitor that has not logged in to the site.
470
- * @format GUID
471
- */
472
- anonymousVisitorId?: string;
473
- /**
474
- * ID of a site visitor that has logged in to the site.
475
- * @format GUID
476
- */
477
- memberId?: string;
478
- /**
479
- * ID of a Wix user (site owner, contributor, etc.).
480
- * @format GUID
481
- */
482
- wixUserId?: string;
483
- /**
484
- * ID of an app.
485
- * @format GUID
486
- */
487
- appId?: string;
488
- }
489
- declare enum WebhookIdentityType {
490
- UNKNOWN = "UNKNOWN",
491
- ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
492
- MEMBER = "MEMBER",
493
- WIX_USER = "WIX_USER",
494
- APP = "APP"
495
- }
496
- /** @enumType */
497
- type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
498
- interface GetDisputeRequest {
499
- /**
500
- * ID of the Dispute to retrieve.
501
- * @format GUID
502
- */
503
- disputeId: string;
504
- }
505
- interface GetDisputeResponse {
506
- /** The requested Dispute. */
507
- dispute?: Dispute;
508
- }
509
- interface QueryDisputesRequest {
510
- /** WQL expression. */
511
- query?: CursorQuery;
512
- }
513
- interface CursorQuery extends CursorQueryPagingMethodOneOf {
514
- /** 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`. */
515
- cursorPaging?: CursorPaging;
516
- /**
517
- * Filter object in the following format:
518
- * `"filter" : {
519
- * "fieldName1": "value1",
520
- * "fieldName2":{"$operator":"value2"}
521
- * }`
522
- * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
523
- */
524
- filter?: Record<string, any> | null;
525
- /**
526
- * Sort object in the following format:
527
- * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
528
- * @maxSize 5
529
- */
530
- sort?: Sorting[];
531
- }
532
- /** @oneof */
533
- interface CursorQueryPagingMethodOneOf {
534
- /** 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`. */
535
- cursorPaging?: CursorPaging;
536
- }
537
- interface Sorting {
538
- /**
539
- * Name of the field to sort by.
540
- * @maxLength 512
541
- */
542
- fieldName?: string;
543
- /** Sort order. */
544
- order?: SortOrderWithLiterals;
545
- }
546
- declare enum SortOrder {
547
- ASC = "ASC",
548
- DESC = "DESC"
549
- }
550
- /** @enumType */
551
- type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
552
- interface CursorPaging {
553
- /**
554
- * Maximum number of items to return in the results.
555
- * @max 100
556
- */
557
- limit?: number | null;
558
- /**
559
- * Pointer to the next or previous page in the list of results.
560
- *
561
- * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
562
- * Not relevant for the first request.
563
- * @maxLength 16000
564
- */
565
- cursor?: string | null;
566
- }
567
- interface QueryDisputesResponse {
568
- /** List of Disputes. */
569
- disputes?: Dispute[];
570
- /** Paging metadata */
571
- pagingMetadata?: CursorPagingMetadata;
572
- }
573
- interface CursorPagingMetadata {
574
- /** Number of items returned in the response. */
575
- count?: number | null;
576
- /** Cursor strings that point to the next page, previous page, or both. */
577
- cursors?: Cursors;
578
- /**
579
- * Whether there are more pages to retrieve following the current page.
580
- *
581
- * + `true`: Another page of results can be retrieved.
582
- * + `false`: This is the last page.
583
- */
584
- hasNext?: boolean | null;
585
- }
586
- interface Cursors {
587
- /**
588
- * Cursor string pointing to the next page in the list of results.
589
- * @maxLength 16000
590
- */
591
- next?: string | null;
592
- /**
593
- * Cursor pointing to the previous page in the list of results.
594
- * @maxLength 16000
595
- */
596
- prev?: string | null;
597
- }
598
- interface AcceptDisputeRequest {
599
- /**
600
- * Dispute ID
601
- * @format GUID
602
- */
603
- disputeId: string;
604
- }
605
- interface AcceptDisputeResponse {
606
- /** Dispute */
607
- dispute?: Dispute;
608
- }
609
- interface DefendDisputeRequest {
610
- /**
611
- * Dispute ID
612
- * @format GUID
613
- */
614
- disputeId: string;
615
- }
616
- interface DefendDisputeResponse {
617
- /** Dispute */
618
- dispute?: Dispute;
619
- }
620
- interface SubmitDisputeEvidenceRequest {
621
- /**
622
- * Dispute ID
623
- * @format GUID
624
- */
625
- disputeId: string;
626
- }
627
- interface SubmitDisputeEvidenceResponse {
628
- /** Dispute */
629
- dispute?: Dispute;
630
- }
631
- interface CreateDisputeManuallyRequest {
632
- /**
633
- * Dispute Id
634
- * @format GUID
635
- */
636
- disputeId?: string;
637
- /**
638
- * Charge Id
639
- * @format GUID
640
- */
641
- chargeId?: string;
642
- /** Open date */
643
- openDate?: Date | null;
644
- /**
645
- * Provider Dispute Id
646
- * @minLength 1
647
- * @maxLength 100
648
- */
649
- providerDisputeId?: string;
650
- /** Dispute stage */
651
- stage?: DisputeStageWithLiterals;
652
- /** Dispute reason */
653
- reason?: DisputeReasonWithLiterals;
654
- /** Dispute status based on provider dispute status */
655
- status?: DisputeStatusWithLiterals;
656
- /** The latest date and time until which the dispute can remain in its current status */
657
- dueDate?: Date | null;
658
- /**
659
- * Dispute currency. Should be the same as the charge currency.
660
- * @immutable
661
- * @format CURRENCY
662
- */
663
- currencyCode?: string | null;
664
- /**
665
- * Dispute Amount in currency's main units (such as dollars or euros). For example, `"12.95"`.
666
- * @immutable
667
- * @decimalValue options { gt:0, maxScale:8 }
668
- */
669
- amount?: string | null;
670
- /**
671
- * Network reason code
672
- * @minLength 1
673
- * @maxLength 64
674
- */
675
- networkReasonCode?: string | null;
676
- /** External or Internal */
677
- external?: boolean | null;
1
+ import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
2
+ import { Dispute, DisputesQueryBuilder, AcceptDisputeResponse, DefendDisputeResponse, BulkUpdateDisputeTagsOptions, BulkUpdateDisputeTagsResponse, BulkUpdateDisputeTagsApplicationErrors, BulkUpdateDisputeTagsByFilterOptions, BulkUpdateDisputeTagsByFilterResponse, BulkUpdateDisputeTagsByFilterApplicationErrors, DisputeCreatedEnvelope, DisputeUpdatedEnvelope } from './index.typings.mjs';
3
+ export { AcceptDisputeManuallyRequest, AcceptDisputeManuallyResponse, AcceptDisputeRequest, ActionEvent, ApplicationError, BaseEventMetadata, BulkActionMetadata, BulkUpdateDisputeTagsByFilterRequest, BulkUpdateDisputeTagsRequest, BulkUpdateDisputeTagsResult, ChangeDisputeStatusManuallyRequest, ChangeDisputeStatusManuallyResponse, CreateDisputeManuallyRequest, CreateDisputeManuallyResponse, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DefendDisputeManuallyRequest, DefendDisputeManuallyResponse, DefendDisputeRequest, DisputeAction, DisputeActionType, DisputeActionTypeWithLiterals, DisputeChannel, DisputeChannelWithLiterals, DisputeReason, DisputeReasonWithLiterals, DisputeStage, DisputeStageWithLiterals, DisputeStatus, DisputeStatusWithLiterals, DisputesQueryResult, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, ExtendedFields, GetDisputeRequest, GetDisputeResponse, IdentificationData, IdentificationDataIdOneOf, InternalChangeDisputeStatusManuallyRequest, InternalChangeDisputeStatusManuallyResponse, InternalCreateDisputeManuallyRequest, InternalCreateDisputeManuallyResponse, ItemMetadata, MessageEnvelope, QueryDisputesRequest, QueryDisputesResponse, RestoreInfo, SellerProtection, SellerProtectionWithLiterals, SortOrder, SortOrderWithLiterals, Sorting, SubmitDisputeEvidenceRequest, SubmitDisputeEvidenceResponse, TagList, Tags, TagsModified, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.mjs';
4
+
5
+ declare function getDispute$1(httpClient: HttpClient): GetDisputeSignature;
6
+ interface GetDisputeSignature {
678
7
  /**
679
- * Seller protection
680
- * @minLength 1
681
- * @maxLength 64
8
+ * Get Dispute by ID
9
+ * @param - ID of the Dispute to retrieve.
10
+ * @returns The requested Dispute.
682
11
  */
683
- sellerProtection?: string | null;
684
- /** Is charge refundable */
685
- chargeRefundable?: boolean | null;
686
- /** True if dispute is defendable */
687
- defendable?: boolean | null;
688
- /** True if it is an auto dispute */
689
- autoDefended?: boolean | null;
690
- }
691
- interface CreateDisputeManuallyResponse {
12
+ (disputeId: string): Promise<NonNullablePaths<Dispute, `_id` | `chargeId` | `providerDisputeId` | `stage` | `reason` | `status` | `sellerProtection` | `channel` | `actions` | `actions.${number}.type` | `tags.privateTags.tagIds`, 4>>;
692
13
  }
693
- interface ChangeDisputeStatusManuallyRequest {
14
+ declare function queryDisputes$1(httpClient: HttpClient): QueryDisputesSignature;
15
+ interface QueryDisputesSignature {
694
16
  /**
695
- * Dispute ID
696
- * @format GUID
17
+ * Retrieves a list of Disputes
697
18
  */
698
- disputeId?: string;
699
- /** Changed date */
700
- changedDate?: Date | null;
701
- /** Dispute status based on provider dispute status */
702
- status?: DisputeStatusWithLiterals;
703
- }
704
- interface ChangeDisputeStatusManuallyResponse {
19
+ (): DisputesQueryBuilder;
705
20
  }
706
- interface BulkUpdateDisputeTagsRequest {
21
+ declare function acceptDispute$1(httpClient: HttpClient): AcceptDisputeSignature;
22
+ interface AcceptDisputeSignature {
707
23
  /**
708
- * List of NileProtoTagsEntities that their tags will update.
709
- * @minSize 1
710
- * @maxSize 100
711
- * @format GUID
24
+ * Accept Dispute
25
+ * @param - Dispute ID
712
26
  */
713
- ids: string[];
714
- /** List of Tags to assign */
715
- assignTags?: Tags;
716
- /** List of Tags to unAssign */
717
- unassignTags?: Tags;
27
+ (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>>;
718
28
  }
719
- interface BulkUpdateDisputeTagsResponse {
29
+ declare function defendDispute$1(httpClient: HttpClient): DefendDisputeSignature;
30
+ interface DefendDisputeSignature {
720
31
  /**
721
- * Results
722
- * @minSize 1
723
- * @maxSize 100
32
+ * Defend Dispute
33
+ * @param - Dispute ID
724
34
  */
725
- results?: BulkUpdateDisputeTagsResult[];
726
- /** Metadata regarding the bulk update operation */
727
- bulkActionMetadata?: BulkActionMetadata;
35
+ (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.privateTags.tagIds`, 5>>;
728
36
  }
729
- interface ItemMetadata {
37
+ declare function bulkUpdateDisputeTags$1(httpClient: HttpClient): BulkUpdateDisputeTagsSignature;
38
+ interface BulkUpdateDisputeTagsSignature {
730
39
  /**
731
- * Item ID. Should always be available, unless it's impossible (for example, when failing to create an item).
732
- * @format GUID
40
+ * Synchronously update tags on multiple Disputes, by list of Disputes ids
41
+ * A tag that appears both in the list of assign and unassign tags, will be assigned
42
+ * @param - List of NileProtoTagsEntities that their tags will update.
733
43
  */
734
- _id?: string | null;
735
- /** Index of the item within the request array. Allows for correlation between request and response items. */
736
- originalIndex?: number;
737
- /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
738
- success?: boolean;
739
- /** Details about the error in case of failure. */
740
- error?: ApplicationError;
44
+ (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> & {
45
+ __applicationErrorsType?: BulkUpdateDisputeTagsApplicationErrors;
46
+ }>;
741
47
  }
742
- interface ApplicationError {
743
- /** Error code. */
744
- code?: string;
745
- /** Description of the error. */
746
- description?: string;
747
- /** Data related to the error. */
748
- data?: Record<string, any> | null;
749
- }
750
- interface BulkUpdateDisputeTagsResult {
751
- /** Metadata regarding the specific single update operation */
752
- itemMetadata?: ItemMetadata;
753
- }
754
- interface BulkActionMetadata {
755
- /** Number of items that were successfully processed. */
756
- totalSuccesses?: number;
757
- /** Number of items that couldn't be processed. */
758
- totalFailures?: number;
759
- /** Number of failures without details because detailed failure threshold was exceeded. */
760
- undetailedFailures?: number;
761
- }
762
- interface BulkUpdateDisputeTagsByFilterRequest {
763
- /** Filter */
764
- filter: Record<string, any> | null;
765
- /** List of Tags to assign */
766
- assignTags?: Tags;
767
- /** List of Tags to unAssign */
768
- unassignTags?: Tags;
769
- }
770
- interface BulkUpdateDisputeTagsByFilterResponse {
48
+ declare function bulkUpdateDisputeTagsByFilter$1(httpClient: HttpClient): BulkUpdateDisputeTagsByFilterSignature;
49
+ interface BulkUpdateDisputeTagsByFilterSignature {
771
50
  /**
772
- * Job ID
773
- * @format GUID
774
- */
775
- jobId?: string;
776
- }
777
- /** @docsIgnore */
778
- type BulkUpdateDisputeTagsApplicationErrors = {
779
- code?: 'EMPTY_ASSIGN_AND_UNASSIGN_LISTS';
780
- description?: string;
781
- data?: Record<string, any>;
782
- };
783
- /** @docsIgnore */
784
- type BulkUpdateDisputeTagsByFilterApplicationErrors = {
785
- code?: 'EMPTY_ASSIGN_AND_UNASSIGN_LISTS';
786
- description?: string;
787
- data?: Record<string, any>;
788
- };
789
- interface QueryCursorResult {
790
- cursors: Cursors;
791
- hasNext: () => boolean;
792
- hasPrev: () => boolean;
793
- length: number;
794
- pageSize: number;
795
- }
796
- interface DisputesQueryResult extends QueryCursorResult {
797
- items: Dispute[];
798
- query: DisputesQueryBuilder;
799
- next: () => Promise<DisputesQueryResult>;
800
- prev: () => Promise<DisputesQueryResult>;
801
- }
802
- interface DisputesQueryBuilder {
803
- /** @param propertyName - Property whose value is compared with `value`.
804
- * @param value - Value to compare against.
805
- * @documentationMaturity preview
806
- */
807
- eq: (propertyName: '_id' | '_createdDate' | '_updatedDate', value: any) => DisputesQueryBuilder;
808
- /** @param propertyName - Property whose value is compared with `value`.
809
- * @param value - Value to compare against.
810
- * @documentationMaturity preview
811
- */
812
- ne: (propertyName: '_id' | '_createdDate' | '_updatedDate', value: any) => DisputesQueryBuilder;
813
- /** @param propertyName - Property whose value is compared with `value`.
814
- * @param value - Value to compare against.
815
- * @documentationMaturity preview
816
- */
817
- ge: (propertyName: '_id' | '_createdDate' | '_updatedDate', value: any) => DisputesQueryBuilder;
818
- /** @param propertyName - Property whose value is compared with `value`.
819
- * @param value - Value to compare against.
820
- * @documentationMaturity preview
821
- */
822
- gt: (propertyName: '_id' | '_createdDate' | '_updatedDate', value: any) => DisputesQueryBuilder;
823
- /** @param propertyName - Property whose value is compared with `value`.
824
- * @param value - Value to compare against.
825
- * @documentationMaturity preview
826
- */
827
- le: (propertyName: '_id' | '_createdDate' | '_updatedDate', value: any) => DisputesQueryBuilder;
828
- /** @param propertyName - Property whose value is compared with `value`.
829
- * @param value - Value to compare against.
830
- * @documentationMaturity preview
51
+ * Asynchronously update tags on multiple Disputes, by provided filter
52
+ * An empty filter will update all Disputes
53
+ * A tag that appears both in the list of assign and unassign tags, will be assigned
54
+ * @param - Filter
831
55
  */
832
- lt: (propertyName: '_id' | '_createdDate' | '_updatedDate', value: any) => DisputesQueryBuilder;
833
- /** @param propertyName - Property whose value is compared with `string`.
834
- * @param string - String to compare against. Case-insensitive.
835
- * @documentationMaturity preview
836
- */
837
- startsWith: (propertyName: '_id', value: string) => DisputesQueryBuilder;
838
- /** @param propertyName - Property whose value is compared with `values`.
839
- * @param values - List of values to compare against.
840
- * @documentationMaturity preview
841
- */
842
- hasSome: (propertyName: '_id' | '_createdDate' | '_updatedDate', value: any[]) => DisputesQueryBuilder;
843
- /** @documentationMaturity preview */
844
- in: (propertyName: '_id' | '_createdDate' | '_updatedDate', value: any) => DisputesQueryBuilder;
845
- /** @documentationMaturity preview */
846
- exists: (propertyName: '_id' | '_createdDate' | '_updatedDate', value: boolean) => DisputesQueryBuilder;
847
- /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
848
- * @documentationMaturity preview
849
- */
850
- ascending: (...propertyNames: Array<'_createdDate' | '_updatedDate'>) => DisputesQueryBuilder;
851
- /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
852
- * @documentationMaturity preview
853
- */
854
- descending: (...propertyNames: Array<'_createdDate' | '_updatedDate'>) => DisputesQueryBuilder;
855
- /** @param limit - Number of items to return, which is also the `pageSize` of the results object.
856
- * @documentationMaturity preview
857
- */
858
- limit: (limit: number) => DisputesQueryBuilder;
859
- /** @param cursor - A pointer to specific record
860
- * @documentationMaturity preview
861
- */
862
- skipTo: (cursor: string) => DisputesQueryBuilder;
863
- /** @documentationMaturity preview */
864
- find: () => Promise<DisputesQueryResult>;
865
- }
866
- interface BulkUpdateDisputeTagsOptions {
867
- /** List of Tags to assign */
868
- assignTags?: Tags;
869
- /** List of Tags to unAssign */
870
- unassignTags?: Tags;
871
- }
872
- interface BulkUpdateDisputeTagsByFilterOptions {
873
- /** List of Tags to assign */
874
- assignTags?: Tags;
875
- /** List of Tags to unAssign */
876
- unassignTags?: Tags;
56
+ (filter: Record<string, any>, options?: BulkUpdateDisputeTagsByFilterOptions): Promise<NonNullablePaths<BulkUpdateDisputeTagsByFilterResponse, `jobId`, 2> & {
57
+ __applicationErrorsType?: BulkUpdateDisputeTagsByFilterApplicationErrors;
58
+ }>;
877
59
  }
60
+ declare const onDisputeCreated$1: EventDefinition<DisputeCreatedEnvelope, "wix.payments.disputes.v1.dispute_created">;
61
+ declare const onDisputeUpdated$1: EventDefinition<DisputeUpdatedEnvelope, "wix.payments.disputes.v1.dispute_updated">;
62
+
63
+ declare const getDispute: MaybeContext<BuildRESTFunction<typeof getDispute$1> & typeof getDispute$1>;
64
+ declare const queryDisputes: MaybeContext<BuildRESTFunction<typeof queryDisputes$1> & typeof queryDisputes$1>;
65
+ declare const acceptDispute: MaybeContext<BuildRESTFunction<typeof acceptDispute$1> & typeof acceptDispute$1>;
66
+ declare const defendDispute: MaybeContext<BuildRESTFunction<typeof defendDispute$1> & typeof defendDispute$1>;
67
+ declare const bulkUpdateDisputeTags: MaybeContext<BuildRESTFunction<typeof bulkUpdateDisputeTags$1> & typeof bulkUpdateDisputeTags$1>;
68
+ declare const bulkUpdateDisputeTagsByFilter: MaybeContext<BuildRESTFunction<typeof bulkUpdateDisputeTagsByFilter$1> & typeof bulkUpdateDisputeTagsByFilter$1>;
69
+ /**
70
+ * Fired when a new Dispute is created.
71
+ */
72
+ declare const onDisputeCreated: BuildEventDefinition<typeof onDisputeCreated$1> & typeof onDisputeCreated$1;
73
+ /**
74
+ * Fired when a Dispute is updated.
75
+ */
76
+ declare const onDisputeUpdated: BuildEventDefinition<typeof onDisputeUpdated$1> & typeof onDisputeUpdated$1;
878
77
 
879
- export { type AcceptDisputeManuallyRequest, type AcceptDisputeManuallyResponse, 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 DefendDisputeManuallyRequest, type DefendDisputeManuallyResponse, 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 InternalChangeDisputeStatusManuallyRequest, type InternalChangeDisputeStatusManuallyResponse, type InternalCreateDisputeManuallyRequest, type InternalCreateDisputeManuallyResponse, type ItemMetadata, type MessageEnvelope, type QueryDisputesRequest, type QueryDisputesResponse, type RestoreInfo, SellerProtection, type SellerProtectionWithLiterals, SortOrder, type SortOrderWithLiterals, type Sorting, type SubmitDisputeEvidenceRequest, type SubmitDisputeEvidenceResponse, type TagList, type Tags, type TagsModified, WebhookIdentityType, type WebhookIdentityTypeWithLiterals };
78
+ export { AcceptDisputeResponse, BulkUpdateDisputeTagsApplicationErrors, BulkUpdateDisputeTagsByFilterApplicationErrors, BulkUpdateDisputeTagsByFilterOptions, BulkUpdateDisputeTagsByFilterResponse, BulkUpdateDisputeTagsOptions, BulkUpdateDisputeTagsResponse, DefendDisputeResponse, Dispute, DisputeCreatedEnvelope, DisputeUpdatedEnvelope, DisputesQueryBuilder, acceptDispute, bulkUpdateDisputeTags, bulkUpdateDisputeTagsByFilter, defendDispute, getDispute, onDisputeCreated, onDisputeUpdated, queryDisputes };