@wix/auto_sdk_payments_payouts 1.0.1 → 1.0.3
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 +21 -14
- package/build/cjs/index.js +8 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +157 -102
- package/build/cjs/index.typings.js +8 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +124 -82
- package/build/cjs/meta.js +8 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.d.ts +4 -0
- package/build/cjs/schemas.js +42 -34
- package/build/cjs/schemas.js.map +1 -1
- package/build/es/index.d.mts +21 -14
- package/build/es/index.mjs +8 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +157 -102
- package/build/es/index.typings.mjs +8 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +124 -82
- package/build/es/meta.mjs +8 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.d.mts +4 -0
- package/build/es/schemas.mjs +42 -34
- package/build/es/schemas.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +21 -14
- package/build/internal/cjs/index.js +8 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +157 -102
- package/build/internal/cjs/index.typings.js +8 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +124 -82
- package/build/internal/cjs/meta.js +8 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/cjs/schemas.d.ts +4 -0
- package/build/internal/cjs/schemas.js +42 -34
- package/build/internal/cjs/schemas.js.map +1 -1
- package/build/internal/es/index.d.mts +21 -14
- package/build/internal/es/index.mjs +8 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +157 -102
- package/build/internal/es/index.typings.mjs +8 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +124 -82
- package/build/internal/es/meta.mjs +8 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/build/internal/es/schemas.d.mts +4 -0
- package/build/internal/es/schemas.mjs +42 -34
- package/build/internal/es/schemas.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -1,66 +1,82 @@
|
|
|
1
1
|
import { NonNullablePaths } from '@wix/sdk-types';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* A payout is
|
|
5
|
-
*
|
|
6
|
-
* estimated arrival date, and (when applicable) failure
|
|
4
|
+
* A payout is an outgoing transfer of funds from a Wix Payments account to the
|
|
5
|
+
* merchant's bank account. Each payout has an amount, a lifecycle status, an
|
|
6
|
+
* estimated arrival date, and (when applicable) a failure reason.
|
|
7
7
|
*/
|
|
8
8
|
interface Payout {
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Payout ID.
|
|
11
11
|
* @format GUID
|
|
12
12
|
*/
|
|
13
13
|
_id?: string;
|
|
14
14
|
/**
|
|
15
|
-
* ID of the Wix Payments account that owns
|
|
15
|
+
* ID of the Wix Payments account that owns the payout. Retrieve account IDs
|
|
16
|
+
* from the Accounts API.
|
|
16
17
|
* @format GUID
|
|
17
18
|
*/
|
|
18
19
|
accountId?: string;
|
|
19
20
|
/**
|
|
20
|
-
* ID of the Wix Payments account profile
|
|
21
|
-
*
|
|
22
|
-
*
|
|
21
|
+
* ID of the Wix Payments account profile that owns the payout.
|
|
22
|
+
*
|
|
23
|
+
* A Wix Payments account has 1 or more profiles. Each profile has its own
|
|
24
|
+
* balance and its own payouts. Most merchants have 1 profile. Retrieve
|
|
25
|
+
* profile IDs from the Accounts API.
|
|
23
26
|
* @format GUID
|
|
24
27
|
*/
|
|
25
28
|
accountProfileId?: string;
|
|
26
29
|
/**
|
|
27
|
-
* Date the payout was created
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
+
* Date and time the payout was created.
|
|
31
|
+
*
|
|
32
|
+
* The payout is created before the underlying transfer is initiated at the
|
|
33
|
+
* bank. Once initiated, the funds typically reach the merchant's bank account
|
|
34
|
+
* within 3 to 5 business days, depending on the receiving bank.
|
|
30
35
|
*/
|
|
31
36
|
_createdDate?: Date | null;
|
|
32
|
-
/** Amount of
|
|
37
|
+
/** Amount of the transfer to the merchant's bank account. */
|
|
33
38
|
amount?: Money;
|
|
34
39
|
/**
|
|
35
|
-
* Lifecycle status of the payout.
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
40
|
+
* Lifecycle status of the payout.
|
|
41
|
+
*
|
|
42
|
+
* `SENT` means the bank rail accepted the transfer for delivery. `FAILED` means
|
|
43
|
+
* the receiving bank rejected the transfer.
|
|
44
|
+
*
|
|
45
|
+
* A `SENT` status doesn't guarantee that the funds were delivered to the
|
|
46
|
+
* merchant. The bank rail doesn't provide a delivery acknowledgement, and a
|
|
47
|
+
* payout in `SENT` can later transition to `FAILED` if the receiving bank
|
|
48
|
+
* rejects the transfer. See the per-value documentation on `PayoutStatus` for
|
|
49
|
+
* details.
|
|
39
50
|
*/
|
|
40
51
|
status?: PayoutStatusWithLiterals;
|
|
41
52
|
/**
|
|
42
|
-
* Estimated date for when the funds should arrive at the merchant's bank
|
|
43
|
-
*
|
|
44
|
-
*
|
|
53
|
+
* Estimated date for when the funds should arrive at the merchant's bank
|
|
54
|
+
* account, in `YYYY-MM-DD` format.
|
|
55
|
+
*
|
|
56
|
+
* The estimated arrival date is a prediction, not a guarantee. Actual arrival
|
|
57
|
+
* depends on the receiving bank's processing and may be later.
|
|
45
58
|
* @format LOCAL_DATE
|
|
46
59
|
*/
|
|
47
60
|
estimatedArrivalDateV2?: string | null;
|
|
48
61
|
/**
|
|
49
|
-
*
|
|
50
|
-
*
|
|
62
|
+
* Reason the bank rail rejected the transfer.
|
|
63
|
+
*
|
|
64
|
+
* Returned only when `status` is `FAILED`.
|
|
51
65
|
*/
|
|
52
66
|
failureReason?: PayoutFailureReason;
|
|
53
67
|
/**
|
|
54
|
-
* Reference returned by the bank rail
|
|
55
|
-
*
|
|
56
|
-
*
|
|
68
|
+
* Reference returned by the bank rail once the transfer is initiated. For
|
|
69
|
+
* example, an ACH trace number or a SEPA reference. Use this value to
|
|
70
|
+
* reconcile against the merchant's bank statement.
|
|
71
|
+
*
|
|
72
|
+
* Empty until the bank rail returns a reference.
|
|
57
73
|
* @maxLength 500
|
|
58
74
|
*/
|
|
59
75
|
bankTransferReference?: string | null;
|
|
60
76
|
/**
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
77
|
+
* Whether the payout `amount` includes funds from a Wix Capital cash advance
|
|
78
|
+
* taken out by the merchant. If `false`, the amount comes only from the
|
|
79
|
+
* merchant's sales proceeds.
|
|
64
80
|
*/
|
|
65
81
|
cashAdvanceIncluded?: boolean;
|
|
66
82
|
}
|
|
@@ -84,56 +100,56 @@ interface Money {
|
|
|
84
100
|
}
|
|
85
101
|
/** Lifecycle status of a payout. */
|
|
86
102
|
declare enum PayoutStatus {
|
|
87
|
-
/**
|
|
103
|
+
/** Unknown payout status. Not returned by the API. */
|
|
88
104
|
UNKNOWN = "UNKNOWN",
|
|
89
105
|
/**
|
|
90
|
-
* The bank rail accepted the transfer. Funds are en route to the merchant's
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
106
|
+
* The bank rail accepted the transfer. Funds are en route to the merchant's
|
|
107
|
+
* bank account.
|
|
108
|
+
*
|
|
109
|
+
* Acceptance isn't the same as delivery. A `SENT` payout can still
|
|
110
|
+
* transition to `FAILED` if the receiving bank rejects the transfer. The
|
|
111
|
+
* bank rail's return window is up to 60 days for ACH and up to 13 months
|
|
112
|
+
* for SEPA.
|
|
94
113
|
*/
|
|
95
114
|
SENT = "SENT",
|
|
96
115
|
/**
|
|
97
|
-
* The
|
|
98
|
-
*
|
|
116
|
+
* The bank rail rejected the transfer. See `failureReason` for the cause.
|
|
117
|
+
* The funds remain in the merchant's Wix Payments balance.
|
|
99
118
|
*/
|
|
100
119
|
FAILED = "FAILED"
|
|
101
120
|
}
|
|
102
121
|
/** @enumType */
|
|
103
122
|
type PayoutStatusWithLiterals = PayoutStatus | 'UNKNOWN' | 'SENT' | 'FAILED';
|
|
104
|
-
/**
|
|
105
|
-
* Carries the reason a payout failed. Wraps the `PayoutFailureCode` enum to leave room
|
|
106
|
-
* for future fields (e.g. a human-readable message); new clients should still read
|
|
107
|
-
* `failure_reason.code` for the enum value.
|
|
108
|
-
*/
|
|
123
|
+
/** Reason a payout failed. */
|
|
109
124
|
interface PayoutFailureReason {
|
|
110
125
|
/** Why the bank rail rejected the transfer. */
|
|
111
126
|
code?: PayoutFailureCodeWithLiterals;
|
|
112
127
|
}
|
|
113
128
|
/**
|
|
114
|
-
*
|
|
115
|
-
*
|
|
129
|
+
* Possible reasons for a payout failure. Each value describes a real-world
|
|
130
|
+
* bank-rail condition.
|
|
116
131
|
*/
|
|
117
132
|
declare enum PayoutFailureCode {
|
|
118
133
|
/**
|
|
119
|
-
* Generic failure with no more specific reason available from the bank
|
|
120
|
-
*
|
|
121
|
-
*
|
|
134
|
+
* Generic failure with no more specific reason available from the bank
|
|
135
|
+
* rail. This value is also returned when no failure reason is known.
|
|
136
|
+
* Clients can't distinguish "unknown" from "generic" using this code alone.
|
|
122
137
|
*/
|
|
123
138
|
GENERIC_PAYOUT_FAILURE = "GENERIC_PAYOUT_FAILURE",
|
|
124
139
|
/**
|
|
125
|
-
* The merchant's bank account is closed. The merchant must provide new
|
|
126
|
-
* account details before further payouts can succeed.
|
|
140
|
+
* The merchant's bank account is closed. The merchant must provide new
|
|
141
|
+
* bank account details before further payouts can succeed.
|
|
127
142
|
*/
|
|
128
143
|
ACCOUNT_CLOSED = "ACCOUNT_CLOSED",
|
|
129
144
|
/**
|
|
130
|
-
* The merchant's bank account is frozen
|
|
131
|
-
* The merchant must resolve the hold with their bank before
|
|
145
|
+
* The merchant's bank account is frozen, for example due to a hold placed
|
|
146
|
+
* by the bank. The merchant must resolve the hold with their bank before
|
|
147
|
+
* further payouts can succeed.
|
|
132
148
|
*/
|
|
133
149
|
ACCOUNT_FROZEN = "ACCOUNT_FROZEN",
|
|
134
150
|
/**
|
|
135
|
-
* The merchant's bank account is restricted from receiving the transfer
|
|
136
|
-
*
|
|
151
|
+
* The merchant's bank account is restricted from receiving the transfer.
|
|
152
|
+
* For example, the account type or status doesn't permit incoming credits.
|
|
137
153
|
*/
|
|
138
154
|
BANK_ACCOUNT_RESTRICTED = "BANK_ACCOUNT_RESTRICTED",
|
|
139
155
|
/**
|
|
@@ -142,38 +158,42 @@ declare enum PayoutFailureCode {
|
|
|
142
158
|
*/
|
|
143
159
|
BANK_OWNERSHIP_CHANGED = "BANK_OWNERSHIP_CHANGED",
|
|
144
160
|
/**
|
|
145
|
-
* The receiving bank
|
|
146
|
-
* A subsequent payout attempt may succeed.
|
|
161
|
+
* The receiving bank couldn't process the transfer for an unspecified
|
|
162
|
+
* reason. A subsequent payout attempt may succeed.
|
|
147
163
|
*/
|
|
148
164
|
COULD_NOT_PROCESS = "COULD_NOT_PROCESS",
|
|
149
165
|
/**
|
|
150
|
-
* The merchant's bank declined the debit authorisation associated with the
|
|
151
|
-
* The merchant must contact their bank to authorise Wix Payments
|
|
166
|
+
* The merchant's bank declined the debit authorisation associated with the
|
|
167
|
+
* transfer. The merchant must contact their bank to authorise Wix Payments
|
|
168
|
+
* payouts.
|
|
152
169
|
*/
|
|
153
170
|
DEBIT_NOT_AUTHORIZED = "DEBIT_NOT_AUTHORIZED",
|
|
154
171
|
/**
|
|
155
|
-
* The account holder name on file
|
|
156
|
-
* The merchant must correct the account holder name.
|
|
172
|
+
* The account holder name on file doesn't match the name the receiving
|
|
173
|
+
* bank has on record. The merchant must correct the account holder name.
|
|
157
174
|
*/
|
|
158
175
|
INCORRECT_ACCOUNT_HOLDER_NAME = "INCORRECT_ACCOUNT_HOLDER_NAME",
|
|
159
176
|
/** The city in the bank account details is invalid for the receiving bank. */
|
|
160
177
|
INVALID_ACCOUNT_DETAILS_CITY = "INVALID_ACCOUNT_DETAILS_CITY",
|
|
161
|
-
/**
|
|
178
|
+
/**
|
|
179
|
+
* The bank account number is invalid. The format is wrong or the account
|
|
180
|
+
* doesn't exist.
|
|
181
|
+
*/
|
|
162
182
|
INVALID_ACCOUNT_NUMBER = "INVALID_ACCOUNT_NUMBER",
|
|
163
|
-
/** The payout currency
|
|
183
|
+
/** The payout currency isn't supported by the receiving bank account. */
|
|
164
184
|
INVALID_CURRENCY = "INVALID_CURRENCY",
|
|
165
|
-
/** The routing number (US) is invalid or
|
|
185
|
+
/** The routing number (US) is invalid or doesn't match the receiving bank. */
|
|
166
186
|
INVALID_ROUTING_NUMBER = "INVALID_ROUTING_NUMBER",
|
|
167
|
-
/** The sort code (UK) is invalid or
|
|
187
|
+
/** The sort code (UK) is invalid or doesn't match the receiving bank. */
|
|
168
188
|
INVALID_SORT_CODE = "INVALID_SORT_CODE",
|
|
169
189
|
/**
|
|
170
|
-
* No bank account is on file for the merchant.
|
|
171
|
-
*
|
|
190
|
+
* No bank account is on file for the merchant. The merchant must add bank
|
|
191
|
+
* details before payouts can succeed.
|
|
172
192
|
*/
|
|
173
193
|
NO_ACCOUNT = "NO_ACCOUNT",
|
|
174
194
|
/**
|
|
175
|
-
* A technical error at the bank rail prevented the transfer.
|
|
176
|
-
*
|
|
195
|
+
* A technical error at the bank rail prevented the transfer. A subsequent
|
|
196
|
+
* payout attempt may succeed.
|
|
177
197
|
*/
|
|
178
198
|
TECHNICAL_ERROR = "TECHNICAL_ERROR"
|
|
179
199
|
}
|
|
@@ -181,23 +201,30 @@ declare enum PayoutFailureCode {
|
|
|
181
201
|
type PayoutFailureCodeWithLiterals = PayoutFailureCode | 'GENERIC_PAYOUT_FAILURE' | 'ACCOUNT_CLOSED' | 'ACCOUNT_FROZEN' | 'BANK_ACCOUNT_RESTRICTED' | 'BANK_OWNERSHIP_CHANGED' | 'COULD_NOT_PROCESS' | 'DEBIT_NOT_AUTHORIZED' | 'INCORRECT_ACCOUNT_HOLDER_NAME' | 'INVALID_ACCOUNT_DETAILS_CITY' | 'INVALID_ACCOUNT_NUMBER' | 'INVALID_CURRENCY' | 'INVALID_ROUTING_NUMBER' | 'INVALID_SORT_CODE' | 'NO_ACCOUNT' | 'TECHNICAL_ERROR';
|
|
182
202
|
interface ListPayoutsRequest {
|
|
183
203
|
/**
|
|
184
|
-
* ID of the Wix Payments account whose payouts to list.
|
|
204
|
+
* ID of the Wix Payments account whose payouts to list. Retrieve account
|
|
205
|
+
* IDs from the Accounts API.
|
|
185
206
|
* @format GUID
|
|
186
207
|
*/
|
|
187
208
|
accountId: string;
|
|
188
209
|
/**
|
|
189
|
-
*
|
|
190
|
-
*
|
|
210
|
+
* ID of the Wix Payments account profile to filter by.
|
|
211
|
+
*
|
|
212
|
+
* When omitted, payouts across all profiles of the account are returned.
|
|
213
|
+
* Retrieve profile IDs from the Accounts API.
|
|
191
214
|
* @format GUID
|
|
192
215
|
*/
|
|
193
216
|
accountProfileId?: string | null;
|
|
194
|
-
/**
|
|
217
|
+
/** Returns only payouts created before this date and time. */
|
|
195
218
|
createdBefore?: Date | null;
|
|
196
|
-
/**
|
|
219
|
+
/** Returns only payouts created after this date and time. */
|
|
197
220
|
createdAfter?: Date | null;
|
|
198
|
-
/**
|
|
221
|
+
/**
|
|
222
|
+
* Sort order for the result list.
|
|
223
|
+
*
|
|
224
|
+
* Supported `fieldName` values: `created_date` (snake_case, not auto-converted). At most 1 sort field is allowed.
|
|
225
|
+
*/
|
|
199
226
|
sort?: Sorting;
|
|
200
|
-
/**
|
|
227
|
+
/** Offset-based paging. */
|
|
201
228
|
paging?: Paging;
|
|
202
229
|
}
|
|
203
230
|
interface Sorting {
|
|
@@ -208,6 +235,11 @@ interface Sorting {
|
|
|
208
235
|
fieldName?: string;
|
|
209
236
|
/** Sort order. */
|
|
210
237
|
order?: SortOrderWithLiterals;
|
|
238
|
+
/**
|
|
239
|
+
* Origin point for geo-distance sorting on a GEO field
|
|
240
|
+
* results are ordered by distance from this point (ASC = nearest first, DESC = farthest first).
|
|
241
|
+
*/
|
|
242
|
+
origin?: AddressLocation;
|
|
211
243
|
}
|
|
212
244
|
declare enum SortOrder {
|
|
213
245
|
ASC = "ASC",
|
|
@@ -215,6 +247,12 @@ declare enum SortOrder {
|
|
|
215
247
|
}
|
|
216
248
|
/** @enumType */
|
|
217
249
|
type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
|
|
250
|
+
interface AddressLocation {
|
|
251
|
+
/** Address latitude. */
|
|
252
|
+
latitude?: number | null;
|
|
253
|
+
/** Address longitude. */
|
|
254
|
+
longitude?: number | null;
|
|
255
|
+
}
|
|
218
256
|
interface Paging {
|
|
219
257
|
/** Number of items to load. */
|
|
220
258
|
limit?: number | null;
|
|
@@ -222,7 +260,7 @@ interface Paging {
|
|
|
222
260
|
offset?: number | null;
|
|
223
261
|
}
|
|
224
262
|
interface ListPayoutsResponse {
|
|
225
|
-
/** List of payouts. */
|
|
263
|
+
/** List of retrieved payouts. */
|
|
226
264
|
payouts?: Payout[];
|
|
227
265
|
/** Paging metadata. */
|
|
228
266
|
metadata?: PagingMetadata;
|
|
@@ -238,16 +276,17 @@ interface PagingMetadata {
|
|
|
238
276
|
tooManyToCount?: boolean | null;
|
|
239
277
|
}
|
|
240
278
|
interface CreatePayoutRequest {
|
|
241
|
-
/** Payout. */
|
|
279
|
+
/** Payout to create. */
|
|
242
280
|
payout?: Payout;
|
|
243
281
|
}
|
|
244
282
|
interface CreatePayoutResponse {
|
|
245
|
-
/**
|
|
283
|
+
/** Created payout. */
|
|
246
284
|
payout?: Payout;
|
|
247
285
|
}
|
|
248
286
|
interface GetPayoutRequest {
|
|
249
287
|
/**
|
|
250
|
-
* ID of the Wix Payments account the payout
|
|
288
|
+
* ID of the Wix Payments account that owns the payout. The payout must
|
|
289
|
+
* belong to this account. Retrieve account IDs from the Accounts API.
|
|
251
290
|
* @format GUID
|
|
252
291
|
*/
|
|
253
292
|
accountId: string;
|
|
@@ -258,12 +297,13 @@ interface GetPayoutRequest {
|
|
|
258
297
|
payoutId: string;
|
|
259
298
|
}
|
|
260
299
|
interface GetPayoutResponse {
|
|
261
|
-
/**
|
|
300
|
+
/** Retrieved payout. */
|
|
262
301
|
payout?: Payout;
|
|
263
302
|
}
|
|
264
303
|
interface ListPayoutGroupsRequest {
|
|
265
304
|
/**
|
|
266
|
-
* Wix Payments account
|
|
305
|
+
* ID of the Wix Payments account whose payout groups to list. Retrieve
|
|
306
|
+
* account IDs from the Accounts API.
|
|
267
307
|
* @format GUID
|
|
268
308
|
*/
|
|
269
309
|
accountId?: string;
|
|
@@ -311,7 +351,8 @@ interface PayoutGroup {
|
|
|
311
351
|
}
|
|
312
352
|
interface GetPayoutGroupRequest {
|
|
313
353
|
/**
|
|
314
|
-
* Wix Payments account
|
|
354
|
+
* ID of the Wix Payments account that owns the payout group. Retrieve
|
|
355
|
+
* account IDs from the Accounts API.
|
|
315
356
|
* @format GUID
|
|
316
357
|
*/
|
|
317
358
|
accountId?: string;
|
|
@@ -333,12 +374,13 @@ interface GetPayoutGroupResponse {
|
|
|
333
374
|
}
|
|
334
375
|
interface GetPayoutGroupByPayoutIdRequest {
|
|
335
376
|
/**
|
|
336
|
-
* Wix Payments account
|
|
377
|
+
* ID of the Wix Payments account that owns the payout. Retrieve account IDs
|
|
378
|
+
* from the Accounts API.
|
|
337
379
|
* @format GUID
|
|
338
380
|
*/
|
|
339
381
|
accountId?: string;
|
|
340
382
|
/**
|
|
341
|
-
*
|
|
383
|
+
* ID of the payout whose group to retrieve.
|
|
342
384
|
* @format GUID
|
|
343
385
|
*/
|
|
344
386
|
payoutId?: string;
|
|
@@ -376,7 +418,7 @@ interface DomainEvent extends DomainEventBodyOneOf {
|
|
|
376
418
|
/** If present, indicates the action that triggered the event. */
|
|
377
419
|
originatedFrom?: string | null;
|
|
378
420
|
/**
|
|
379
|
-
* 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
|
|
421
|
+
* 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.
|
|
380
422
|
* 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.
|
|
381
423
|
*/
|
|
382
424
|
entityEventSequence?: string | null;
|
|
@@ -541,7 +583,7 @@ interface EventMetadata extends BaseEventMetadata {
|
|
|
541
583
|
/** If present, indicates the action that triggered the event. */
|
|
542
584
|
originatedFrom?: string | null;
|
|
543
585
|
/**
|
|
544
|
-
* 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
|
|
586
|
+
* 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.
|
|
545
587
|
* 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.
|
|
546
588
|
*/
|
|
547
589
|
entityEventSequence?: string | null;
|
|
@@ -560,9 +602,11 @@ interface PayoutCreatedEnvelope {
|
|
|
560
602
|
metadata: EventMetadata;
|
|
561
603
|
}
|
|
562
604
|
/**
|
|
563
|
-
*
|
|
564
|
-
*
|
|
565
|
-
* is
|
|
605
|
+
* Triggered when a payout is created.
|
|
606
|
+
*
|
|
607
|
+
* The payout is created before the underlying transfer is initiated at the
|
|
608
|
+
* bank. At this point `status` is `SENT` and `estimatedArrivalDateV2` is set
|
|
609
|
+
* if the bank rail returned one. `failureReason` and `bankTransferReference`
|
|
566
610
|
* are not yet populated.
|
|
567
611
|
* @permissionScope View settlement reports and payouts
|
|
568
612
|
* @permissionScopeId SCOPE.PAYMENTS.PAYOUTS-VIEW-FOR-SITE
|
|
@@ -579,10 +623,12 @@ interface PayoutUpdatedEnvelope {
|
|
|
579
623
|
metadata: EventMetadata;
|
|
580
624
|
}
|
|
581
625
|
/**
|
|
582
|
-
*
|
|
583
|
-
*
|
|
584
|
-
*
|
|
585
|
-
* being
|
|
626
|
+
* Triggered when a payout is updated.
|
|
627
|
+
*
|
|
628
|
+
* Typical updates include `status` transitioning from `SENT` to `FAILED`
|
|
629
|
+
* (with `failureReason` being set), `estimatedArrivalDateV2` being refined by
|
|
630
|
+
* the bank rail, and `bankTransferReference` being populated once the rail
|
|
631
|
+
* returns it.
|
|
586
632
|
* @permissionScope View settlement reports and payouts
|
|
587
633
|
* @permissionScopeId SCOPE.PAYMENTS.PAYOUTS-VIEW-FOR-SITE
|
|
588
634
|
* @permissionId PAYMENTS.PAYOUT_READ
|
|
@@ -594,9 +640,11 @@ interface PayoutUpdatedEnvelope {
|
|
|
594
640
|
*/
|
|
595
641
|
declare function onPayoutUpdated(handler: (event: PayoutUpdatedEnvelope) => void | Promise<void>): void;
|
|
596
642
|
/**
|
|
597
|
-
* Retrieves a paginated list of payouts for the specified Wix Payments account
|
|
598
|
-
*
|
|
599
|
-
*
|
|
643
|
+
* Retrieves a paginated list of payouts for the specified Wix Payments account.
|
|
644
|
+
*
|
|
645
|
+
* Supports optional filters by account profile and by creation date range.
|
|
646
|
+
* @param accountId - ID of the Wix Payments account whose payouts to list. Retrieve account
|
|
647
|
+
* IDs from the Accounts API.
|
|
600
648
|
* @public
|
|
601
649
|
* @documentationMaturity preview
|
|
602
650
|
* @requiredField accountId
|
|
@@ -607,33 +655,40 @@ declare function onPayoutUpdated(handler: (event: PayoutUpdatedEnvelope) => void
|
|
|
607
655
|
declare function listPayouts(accountId: string, options?: ListPayoutsOptions): Promise<NonNullablePaths<ListPayoutsResponse, `payouts` | `payouts.${number}._id` | `payouts.${number}.accountId` | `payouts.${number}.accountProfileId` | `payouts.${number}.amount.value` | `payouts.${number}.amount.currency` | `payouts.${number}.status` | `payouts.${number}.failureReason.code` | `payouts.${number}.cashAdvanceIncluded`, 5>>;
|
|
608
656
|
interface ListPayoutsOptions {
|
|
609
657
|
/**
|
|
610
|
-
*
|
|
611
|
-
*
|
|
658
|
+
* ID of the Wix Payments account profile to filter by.
|
|
659
|
+
*
|
|
660
|
+
* When omitted, payouts across all profiles of the account are returned.
|
|
661
|
+
* Retrieve profile IDs from the Accounts API.
|
|
612
662
|
* @format GUID
|
|
613
663
|
*/
|
|
614
664
|
accountProfileId?: string | null;
|
|
615
|
-
/**
|
|
665
|
+
/** Returns only payouts created before this date and time. */
|
|
616
666
|
createdBefore?: Date | null;
|
|
617
|
-
/**
|
|
667
|
+
/** Returns only payouts created after this date and time. */
|
|
618
668
|
createdAfter?: Date | null;
|
|
619
|
-
/**
|
|
669
|
+
/**
|
|
670
|
+
* Sort order for the result list.
|
|
671
|
+
*
|
|
672
|
+
* Supported `fieldName` values: `created_date` (snake_case, not auto-converted). At most 1 sort field is allowed.
|
|
673
|
+
*/
|
|
620
674
|
sort?: Sorting;
|
|
621
|
-
/**
|
|
675
|
+
/** Offset-based paging. */
|
|
622
676
|
paging?: Paging;
|
|
623
677
|
}
|
|
624
678
|
/**
|
|
625
|
-
* Retrieves a single payout by
|
|
679
|
+
* Retrieves a single payout by ID.
|
|
626
680
|
* @param payoutId - ID of the payout to retrieve.
|
|
627
|
-
* @param accountId - ID of the Wix Payments account the payout
|
|
681
|
+
* @param accountId - ID of the Wix Payments account that owns the payout. The payout must
|
|
682
|
+
* belong to this account. Retrieve account IDs from the Accounts API.
|
|
628
683
|
* @public
|
|
629
684
|
* @documentationMaturity preview
|
|
630
685
|
* @requiredField accountId
|
|
631
686
|
* @requiredField payoutId
|
|
632
687
|
* @permissionId PAYMENTS.PAYOUT_READ
|
|
633
688
|
* @applicableIdentity APP
|
|
634
|
-
* @returns
|
|
689
|
+
* @returns Retrieved payout.
|
|
635
690
|
* @fqn wix.payments.v4.payouts.PayoutsService.GetPayout
|
|
636
691
|
*/
|
|
637
692
|
declare function getPayout(payoutId: string, accountId: string): Promise<NonNullablePaths<Payout, `_id` | `accountId` | `accountProfileId` | `amount.value` | `amount.currency` | `status` | `failureReason.code` | `cashAdvanceIncluded`, 3>>;
|
|
638
693
|
|
|
639
|
-
export { type AccountInfo, type AccountInfoMetadata, type ActionEvent, type BaseEventMetadata, type CreatePayoutRequest, type CreatePayoutResponse, type DomainEvent, type DomainEventBodyOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type GetPayoutGroupByPayoutIdRequest, type GetPayoutGroupByPayoutIdResponse, type GetPayoutGroupRequest, type GetPayoutGroupResponse, type GetPayoutRequest, type GetPayoutResponse, type IdentificationData, type IdentificationDataIdOneOf, type ListPayoutGroupsRequest, type ListPayoutGroupsResponse, type ListPayoutsOptions, type ListPayoutsRequest, type ListPayoutsResponse, type MessageEnvelope, type Money, type Paging, type PagingMetadata, type Payout, type PayoutCreatedEnvelope, PayoutFailureCode, type PayoutFailureCodeWithLiterals, type PayoutFailureReason, type PayoutGroup, PayoutStatus, type PayoutStatusWithLiterals, type PayoutUpdatedEnvelope, type RestoreInfo, SortOrder, type SortOrderWithLiterals, type Sorting, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, getPayout, listPayouts, onPayoutCreated, onPayoutUpdated };
|
|
694
|
+
export { type AccountInfo, type AccountInfoMetadata, type ActionEvent, type AddressLocation, type BaseEventMetadata, type CreatePayoutRequest, type CreatePayoutResponse, type DomainEvent, type DomainEventBodyOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type GetPayoutGroupByPayoutIdRequest, type GetPayoutGroupByPayoutIdResponse, type GetPayoutGroupRequest, type GetPayoutGroupResponse, type GetPayoutRequest, type GetPayoutResponse, type IdentificationData, type IdentificationDataIdOneOf, type ListPayoutGroupsRequest, type ListPayoutGroupsResponse, type ListPayoutsOptions, type ListPayoutsRequest, type ListPayoutsResponse, type MessageEnvelope, type Money, type Paging, type PagingMetadata, type Payout, type PayoutCreatedEnvelope, PayoutFailureCode, type PayoutFailureCodeWithLiterals, type PayoutFailureReason, type PayoutGroup, PayoutStatus, type PayoutStatusWithLiterals, type PayoutUpdatedEnvelope, type RestoreInfo, SortOrder, type SortOrderWithLiterals, type Sorting, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, getPayout, listPayouts, onPayoutCreated, onPayoutUpdated };
|
|
@@ -35,6 +35,7 @@ var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-
|
|
|
35
35
|
|
|
36
36
|
// src/payments-payouts-v4-payout-payouts.http.ts
|
|
37
37
|
var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
|
|
38
|
+
var import_float = require("@wix/sdk-runtime/transformations/float");
|
|
38
39
|
var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
|
|
39
40
|
var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
40
41
|
var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
@@ -163,6 +164,13 @@ function listPayouts(payload) {
|
|
|
163
164
|
{
|
|
164
165
|
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
165
166
|
paths: [{ path: "createdBefore" }, { path: "createdAfter" }]
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
transformFn: import_float.transformSDKFloatToRESTFloat,
|
|
170
|
+
paths: [
|
|
171
|
+
{ path: "sort.origin.latitude" },
|
|
172
|
+
{ path: "sort.origin.longitude" }
|
|
173
|
+
]
|
|
166
174
|
}
|
|
167
175
|
]);
|
|
168
176
|
const metadata = {
|