@wix/auto_sdk_payments_payouts 1.0.4 → 1.0.6
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.js +28 -4
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.js +20 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.js +20 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.mjs +28 -4
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.mjs +20 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.mjs +20 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +21 -0
- package/build/internal/cjs/meta.d.ts +63 -0
- package/build/internal/es/index.typings.d.mts +21 -0
- package/build/internal/es/meta.d.mts +63 -0
- package/package.json +5 -12
- package/build/cjs/schemas.d.ts +0 -115
- package/build/cjs/schemas.js +0 -243
- package/build/cjs/schemas.js.map +0 -1
- package/build/es/schemas.d.mts +0 -115
- package/build/es/schemas.mjs +0 -203
- package/build/es/schemas.mjs.map +0 -1
- package/build/internal/cjs/index.js +0 -405
- package/build/internal/cjs/index.js.map +0 -1
- package/build/internal/cjs/index.typings.js +0 -339
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/meta.js +0 -310
- package/build/internal/cjs/meta.js.map +0 -1
- package/build/internal/cjs/schemas.d.ts +0 -115
- package/build/internal/cjs/schemas.js +0 -243
- package/build/internal/cjs/schemas.js.map +0 -1
- package/build/internal/es/index.mjs +0 -374
- package/build/internal/es/index.mjs.map +0 -1
- package/build/internal/es/index.typings.mjs +0 -310
- package/build/internal/es/index.typings.mjs.map +0 -1
- package/build/internal/es/meta.mjs +0 -278
- package/build/internal/es/meta.mjs.map +0 -1
- package/build/internal/es/schemas.d.mts +0 -115
- package/build/internal/es/schemas.mjs +0 -203
- package/build/internal/es/schemas.mjs.map +0 -1
- package/schemas/package.json +0 -3
package/build/es/schemas.mjs
DELETED
|
@@ -1,203 +0,0 @@
|
|
|
1
|
-
// src/payments-payouts-v4-payout-payouts.schemas.ts
|
|
2
|
-
import * as z from "zod";
|
|
3
|
-
var ListPayoutsRequest = z.object({
|
|
4
|
-
accountId: z.string().describe(
|
|
5
|
-
"ID of the Wix Payments account whose payouts to list. Retrieve account\nIDs from the Accounts API."
|
|
6
|
-
).regex(
|
|
7
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
8
|
-
"Must be a valid GUID"
|
|
9
|
-
),
|
|
10
|
-
options: z.object({
|
|
11
|
-
accountProfileId: z.string().describe(
|
|
12
|
-
"ID of the Wix Payments account profile to filter by.\n\nWhen omitted, payouts across all profiles of the account are returned.\nRetrieve profile IDs from the Accounts API."
|
|
13
|
-
).regex(
|
|
14
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
15
|
-
"Must be a valid GUID"
|
|
16
|
-
).optional().nullable(),
|
|
17
|
-
createdBefore: z.date().describe(
|
|
18
|
-
"Returns only payouts created before this date and time. The date and time\nitself is excluded."
|
|
19
|
-
).optional().nullable(),
|
|
20
|
-
createdAfter: z.date().describe(
|
|
21
|
-
"Returns only payouts created on or after this date and time. The date and\ntime itself is included."
|
|
22
|
-
).optional().nullable(),
|
|
23
|
-
sort: z.object({
|
|
24
|
-
fieldName: z.string().describe("Name of the field to sort by.").max(512).optional(),
|
|
25
|
-
order: z.enum(["ASC", "DESC"]).optional(),
|
|
26
|
-
origin: z.object({
|
|
27
|
-
latitude: z.number().describe("Address latitude.").optional().nullable(),
|
|
28
|
-
longitude: z.number().describe("Address longitude.").optional().nullable()
|
|
29
|
-
}).describe(
|
|
30
|
-
"Origin point for geo-distance sorting on a GEO field\nresults are ordered by distance from this point (ASC = nearest first, DESC = farthest first)."
|
|
31
|
-
).optional()
|
|
32
|
-
}).describe(
|
|
33
|
-
"Sort order for the result list.\n\nSupported `fieldName` values: `created_date` (snake_case, not auto-converted). At most 1 sort field is allowed."
|
|
34
|
-
).optional(),
|
|
35
|
-
paging: z.object({
|
|
36
|
-
limit: z.number().int().describe("Number of items to load.").min(0).optional().nullable(),
|
|
37
|
-
offset: z.number().int().describe("Number of items to skip in the current sort order.").min(0).optional().nullable()
|
|
38
|
-
}).describe(
|
|
39
|
-
"Offset-based paging. `limit` supports values from `1` to `20`.\n\nDefault: `limit` is `20`, `offset` is `0`."
|
|
40
|
-
).optional()
|
|
41
|
-
}).optional()
|
|
42
|
-
});
|
|
43
|
-
var ListPayoutsResponse = z.object({
|
|
44
|
-
payouts: z.array(
|
|
45
|
-
z.object({
|
|
46
|
-
_id: z.string().describe("Payout ID.").regex(
|
|
47
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
48
|
-
"Must be a valid GUID"
|
|
49
|
-
).optional(),
|
|
50
|
-
accountId: z.string().describe(
|
|
51
|
-
"ID of the Wix Payments account that owns the payout. Retrieve account IDs\nfrom the Accounts API."
|
|
52
|
-
).regex(
|
|
53
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
54
|
-
"Must be a valid GUID"
|
|
55
|
-
).optional(),
|
|
56
|
-
accountProfileId: z.string().describe(
|
|
57
|
-
"ID of the Wix Payments account profile that owns the payout.\n\nA Wix Payments account has 1 or more profiles. Each profile has its own\nbalance and its own payouts. Most merchants have 1 profile. Retrieve\nprofile IDs from the Accounts API."
|
|
58
|
-
).regex(
|
|
59
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
60
|
-
"Must be a valid GUID"
|
|
61
|
-
).optional(),
|
|
62
|
-
_createdDate: z.date().describe(
|
|
63
|
-
"Date and time the payout was created.\n\nThe payout is created before the underlying transfer is initiated at the\nbank. Once initiated, the funds typically reach the merchant's bank account\nwithin 3 to 5 business days, depending on the receiving bank."
|
|
64
|
-
).optional().nullable(),
|
|
65
|
-
amount: z.object({
|
|
66
|
-
value: z.string().describe(
|
|
67
|
-
"Monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99). Optionally, a single (-), to indicate that the amount is negative."
|
|
68
|
-
).optional(),
|
|
69
|
-
currency: z.string().describe(
|
|
70
|
-
"Currency code. Must be valid ISO 4217 currency code (e.g., USD)."
|
|
71
|
-
).optional(),
|
|
72
|
-
formattedValue: z.string().describe(
|
|
73
|
-
"Monetary amount. Decimal string in local format (e.g., 1 000,30). Optionally, a single (-), to indicate that the amount is negative."
|
|
74
|
-
).optional().nullable()
|
|
75
|
-
}).describe("Amount of the transfer to the merchant's bank account.").optional(),
|
|
76
|
-
status: z.enum(["UNKNOWN", "SENT", "FAILED"]).describe(
|
|
77
|
-
"Lifecycle status of the payout.\n\n`SENT` means the bank rail accepted the transfer for delivery. `FAILED` means\nthe receiving bank rejected the transfer.\n\nA `SENT` status doesn't guarantee that the funds were delivered to the\nmerchant. The bank rail doesn't provide a delivery acknowledgement, and a\npayout in `SENT` can later transition to `FAILED` if the receiving bank\nrejects the transfer. See the per-value documentation on `PayoutStatus` for\ndetails."
|
|
78
|
-
).optional(),
|
|
79
|
-
estimatedArrivalDateV2: z.string().describe(
|
|
80
|
-
"Estimated date for when the funds should arrive at the merchant's bank\naccount, in `YYYY-MM-DD` format.\n\nThe estimated arrival date is a prediction, not a guarantee. Actual arrival\ndepends on the receiving bank's processing and may be later."
|
|
81
|
-
).optional().nullable(),
|
|
82
|
-
failureReason: z.object({
|
|
83
|
-
code: z.enum([
|
|
84
|
-
"GENERIC_PAYOUT_FAILURE",
|
|
85
|
-
"ACCOUNT_CLOSED",
|
|
86
|
-
"ACCOUNT_FROZEN",
|
|
87
|
-
"BANK_ACCOUNT_RESTRICTED",
|
|
88
|
-
"BANK_OWNERSHIP_CHANGED",
|
|
89
|
-
"COULD_NOT_PROCESS",
|
|
90
|
-
"DEBIT_NOT_AUTHORIZED",
|
|
91
|
-
"INCORRECT_ACCOUNT_HOLDER_NAME",
|
|
92
|
-
"INVALID_ACCOUNT_DETAILS_CITY",
|
|
93
|
-
"INVALID_ACCOUNT_NUMBER",
|
|
94
|
-
"INVALID_CURRENCY",
|
|
95
|
-
"INVALID_ROUTING_NUMBER",
|
|
96
|
-
"INVALID_SORT_CODE",
|
|
97
|
-
"NO_ACCOUNT",
|
|
98
|
-
"TECHNICAL_ERROR"
|
|
99
|
-
]).describe("Why the bank rail rejected the transfer.").optional()
|
|
100
|
-
}).describe(
|
|
101
|
-
"Reason the bank rail rejected the transfer.\n\nReturned only when `status` is `FAILED`."
|
|
102
|
-
).optional(),
|
|
103
|
-
bankTransferReference: z.string().describe(
|
|
104
|
-
"Reference returned by the bank rail once the transfer is initiated. For\nexample, an ACH trace number or a SEPA reference. Use this value to\nreconcile against the merchant's bank statement.\n\nEmpty until the bank rail returns a reference."
|
|
105
|
-
).max(500).optional().nullable(),
|
|
106
|
-
cashAdvanceIncluded: z.boolean().describe(
|
|
107
|
-
"Whether the payout `amount` includes funds from a Wix Capital cash advance\ntaken out by the merchant. If `false`, the amount comes only from the\nmerchant's sales proceeds."
|
|
108
|
-
).optional()
|
|
109
|
-
})
|
|
110
|
-
).optional(),
|
|
111
|
-
metadata: z.object({
|
|
112
|
-
count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
|
|
113
|
-
offset: z.number().int().describe("Offset that was requested.").optional().nullable(),
|
|
114
|
-
total: z.number().int().describe("Total number of items that match the query.").optional().nullable(),
|
|
115
|
-
tooManyToCount: z.boolean().describe(
|
|
116
|
-
"Flag that indicates the server failed to calculate the `total` field."
|
|
117
|
-
).optional().nullable()
|
|
118
|
-
}).describe("Paging metadata.").optional()
|
|
119
|
-
});
|
|
120
|
-
var GetPayoutRequest = z.object({
|
|
121
|
-
payoutId: z.string().describe("ID of the payout to retrieve.").regex(
|
|
122
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
123
|
-
"Must be a valid GUID"
|
|
124
|
-
),
|
|
125
|
-
accountId: z.string().describe(
|
|
126
|
-
"ID of the Wix Payments account that owns the payout. The payout must\nbelong to this account. Retrieve account IDs from the Accounts API."
|
|
127
|
-
).regex(
|
|
128
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
129
|
-
"Must be a valid GUID"
|
|
130
|
-
)
|
|
131
|
-
});
|
|
132
|
-
var GetPayoutResponse = z.object({
|
|
133
|
-
_id: z.string().describe("Payout ID.").regex(
|
|
134
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
135
|
-
"Must be a valid GUID"
|
|
136
|
-
).optional(),
|
|
137
|
-
accountId: z.string().describe(
|
|
138
|
-
"ID of the Wix Payments account that owns the payout. Retrieve account IDs\nfrom the Accounts API."
|
|
139
|
-
).regex(
|
|
140
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
141
|
-
"Must be a valid GUID"
|
|
142
|
-
).optional(),
|
|
143
|
-
accountProfileId: z.string().describe(
|
|
144
|
-
"ID of the Wix Payments account profile that owns the payout.\n\nA Wix Payments account has 1 or more profiles. Each profile has its own\nbalance and its own payouts. Most merchants have 1 profile. Retrieve\nprofile IDs from the Accounts API."
|
|
145
|
-
).regex(
|
|
146
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
147
|
-
"Must be a valid GUID"
|
|
148
|
-
).optional(),
|
|
149
|
-
_createdDate: z.date().describe(
|
|
150
|
-
"Date and time the payout was created.\n\nThe payout is created before the underlying transfer is initiated at the\nbank. Once initiated, the funds typically reach the merchant's bank account\nwithin 3 to 5 business days, depending on the receiving bank."
|
|
151
|
-
).optional().nullable(),
|
|
152
|
-
amount: z.object({
|
|
153
|
-
value: z.string().describe(
|
|
154
|
-
"Monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99). Optionally, a single (-), to indicate that the amount is negative."
|
|
155
|
-
).optional(),
|
|
156
|
-
currency: z.string().describe(
|
|
157
|
-
"Currency code. Must be valid ISO 4217 currency code (e.g., USD)."
|
|
158
|
-
).optional(),
|
|
159
|
-
formattedValue: z.string().describe(
|
|
160
|
-
"Monetary amount. Decimal string in local format (e.g., 1 000,30). Optionally, a single (-), to indicate that the amount is negative."
|
|
161
|
-
).optional().nullable()
|
|
162
|
-
}).describe("Amount of the transfer to the merchant's bank account.").optional(),
|
|
163
|
-
status: z.enum(["UNKNOWN", "SENT", "FAILED"]).describe(
|
|
164
|
-
"Lifecycle status of the payout.\n\n`SENT` means the bank rail accepted the transfer for delivery. `FAILED` means\nthe receiving bank rejected the transfer.\n\nA `SENT` status doesn't guarantee that the funds were delivered to the\nmerchant. The bank rail doesn't provide a delivery acknowledgement, and a\npayout in `SENT` can later transition to `FAILED` if the receiving bank\nrejects the transfer. See the per-value documentation on `PayoutStatus` for\ndetails."
|
|
165
|
-
).optional(),
|
|
166
|
-
estimatedArrivalDateV2: z.string().describe(
|
|
167
|
-
"Estimated date for when the funds should arrive at the merchant's bank\naccount, in `YYYY-MM-DD` format.\n\nThe estimated arrival date is a prediction, not a guarantee. Actual arrival\ndepends on the receiving bank's processing and may be later."
|
|
168
|
-
).optional().nullable(),
|
|
169
|
-
failureReason: z.object({
|
|
170
|
-
code: z.enum([
|
|
171
|
-
"GENERIC_PAYOUT_FAILURE",
|
|
172
|
-
"ACCOUNT_CLOSED",
|
|
173
|
-
"ACCOUNT_FROZEN",
|
|
174
|
-
"BANK_ACCOUNT_RESTRICTED",
|
|
175
|
-
"BANK_OWNERSHIP_CHANGED",
|
|
176
|
-
"COULD_NOT_PROCESS",
|
|
177
|
-
"DEBIT_NOT_AUTHORIZED",
|
|
178
|
-
"INCORRECT_ACCOUNT_HOLDER_NAME",
|
|
179
|
-
"INVALID_ACCOUNT_DETAILS_CITY",
|
|
180
|
-
"INVALID_ACCOUNT_NUMBER",
|
|
181
|
-
"INVALID_CURRENCY",
|
|
182
|
-
"INVALID_ROUTING_NUMBER",
|
|
183
|
-
"INVALID_SORT_CODE",
|
|
184
|
-
"NO_ACCOUNT",
|
|
185
|
-
"TECHNICAL_ERROR"
|
|
186
|
-
]).describe("Why the bank rail rejected the transfer.").optional()
|
|
187
|
-
}).describe(
|
|
188
|
-
"Reason the bank rail rejected the transfer.\n\nReturned only when `status` is `FAILED`."
|
|
189
|
-
).optional(),
|
|
190
|
-
bankTransferReference: z.string().describe(
|
|
191
|
-
"Reference returned by the bank rail once the transfer is initiated. For\nexample, an ACH trace number or a SEPA reference. Use this value to\nreconcile against the merchant's bank statement.\n\nEmpty until the bank rail returns a reference."
|
|
192
|
-
).max(500).optional().nullable(),
|
|
193
|
-
cashAdvanceIncluded: z.boolean().describe(
|
|
194
|
-
"Whether the payout `amount` includes funds from a Wix Capital cash advance\ntaken out by the merchant. If `false`, the amount comes only from the\nmerchant's sales proceeds."
|
|
195
|
-
).optional()
|
|
196
|
-
});
|
|
197
|
-
export {
|
|
198
|
-
GetPayoutRequest,
|
|
199
|
-
GetPayoutResponse,
|
|
200
|
-
ListPayoutsRequest,
|
|
201
|
-
ListPayoutsResponse
|
|
202
|
-
};
|
|
203
|
-
//# sourceMappingURL=schemas.mjs.map
|
package/build/es/schemas.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/payments-payouts-v4-payout-payouts.schemas.ts"],"sourcesContent":["import * as z from 'zod';\n\nexport const ListPayoutsRequest = z.object({\n accountId: z\n .string()\n .describe(\n 'ID of the Wix Payments account whose payouts to list. Retrieve account\\nIDs from the Accounts API.'\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n ),\n options: z\n .object({\n accountProfileId: z\n .string()\n .describe(\n 'ID of the Wix Payments account profile to filter by.\\n\\nWhen omitted, payouts across all profiles of the account are returned.\\nRetrieve profile IDs from the Accounts API.'\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n createdBefore: z\n .date()\n .describe(\n 'Returns only payouts created before this date and time. The date and time\\nitself is excluded.'\n )\n .optional()\n .nullable(),\n createdAfter: z\n .date()\n .describe(\n 'Returns only payouts created on or after this date and time. The date and\\ntime itself is included.'\n )\n .optional()\n .nullable(),\n sort: z\n .object({\n fieldName: z\n .string()\n .describe('Name of the field to sort by.')\n .max(512)\n .optional(),\n order: z.enum(['ASC', 'DESC']).optional(),\n origin: z\n .object({\n latitude: z\n .number()\n .describe('Address latitude.')\n .optional()\n .nullable(),\n longitude: z\n .number()\n .describe('Address longitude.')\n .optional()\n .nullable(),\n })\n .describe(\n 'Origin point for geo-distance sorting on a GEO field\\nresults are ordered by distance from this point (ASC = nearest first, DESC = farthest first).'\n )\n .optional(),\n })\n .describe(\n 'Sort order for the result list.\\n\\nSupported `fieldName` values: `created_date` (snake_case, not auto-converted). At most 1 sort field is allowed.'\n )\n .optional(),\n paging: z\n .object({\n limit: z\n .number()\n .int()\n .describe('Number of items to load.')\n .min(0)\n .optional()\n .nullable(),\n offset: z\n .number()\n .int()\n .describe('Number of items to skip in the current sort order.')\n .min(0)\n .optional()\n .nullable(),\n })\n .describe(\n 'Offset-based paging. `limit` supports values from `1` to `20`.\\n\\nDefault: `limit` is `20`, `offset` is `0`.'\n )\n .optional(),\n })\n .optional(),\n});\nexport const ListPayoutsResponse = z.object({\n payouts: z\n .array(\n z.object({\n _id: z\n .string()\n .describe('Payout ID.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional(),\n accountId: z\n .string()\n .describe(\n 'ID of the Wix Payments account that owns the payout. Retrieve account IDs\\nfrom the Accounts API.'\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional(),\n accountProfileId: z\n .string()\n .describe(\n 'ID of the Wix Payments account profile that owns the payout.\\n\\nA Wix Payments account has 1 or more profiles. Each profile has its own\\nbalance and its own payouts. Most merchants have 1 profile. Retrieve\\nprofile IDs from the Accounts API.'\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional(),\n _createdDate: z\n .date()\n .describe(\n \"Date and time the payout was created.\\n\\nThe payout is created before the underlying transfer is initiated at the\\nbank. Once initiated, the funds typically reach the merchant's bank account\\nwithin 3 to 5 business days, depending on the receiving bank.\"\n )\n .optional()\n .nullable(),\n amount: z\n .object({\n value: z\n .string()\n .describe(\n 'Monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99). Optionally, a single (-), to indicate that the amount is negative.'\n )\n .optional(),\n currency: z\n .string()\n .describe(\n 'Currency code. Must be valid ISO 4217 currency code (e.g., USD).'\n )\n .optional(),\n formattedValue: z\n .string()\n .describe(\n 'Monetary amount. Decimal string in local format (e.g., 1 000,30). Optionally, a single (-), to indicate that the amount is negative.'\n )\n .optional()\n .nullable(),\n })\n .describe(\"Amount of the transfer to the merchant's bank account.\")\n .optional(),\n status: z\n .enum(['UNKNOWN', 'SENT', 'FAILED'])\n .describe(\n \"Lifecycle status of the payout.\\n\\n`SENT` means the bank rail accepted the transfer for delivery. `FAILED` means\\nthe receiving bank rejected the transfer.\\n\\nA `SENT` status doesn't guarantee that the funds were delivered to the\\nmerchant. The bank rail doesn't provide a delivery acknowledgement, and a\\npayout in `SENT` can later transition to `FAILED` if the receiving bank\\nrejects the transfer. See the per-value documentation on `PayoutStatus` for\\ndetails.\"\n )\n .optional(),\n estimatedArrivalDateV2: z\n .string()\n .describe(\n \"Estimated date for when the funds should arrive at the merchant's bank\\naccount, in `YYYY-MM-DD` format.\\n\\nThe estimated arrival date is a prediction, not a guarantee. Actual arrival\\ndepends on the receiving bank's processing and may be later.\"\n )\n .optional()\n .nullable(),\n failureReason: z\n .object({\n code: z\n .enum([\n 'GENERIC_PAYOUT_FAILURE',\n 'ACCOUNT_CLOSED',\n 'ACCOUNT_FROZEN',\n 'BANK_ACCOUNT_RESTRICTED',\n 'BANK_OWNERSHIP_CHANGED',\n 'COULD_NOT_PROCESS',\n 'DEBIT_NOT_AUTHORIZED',\n 'INCORRECT_ACCOUNT_HOLDER_NAME',\n 'INVALID_ACCOUNT_DETAILS_CITY',\n 'INVALID_ACCOUNT_NUMBER',\n 'INVALID_CURRENCY',\n 'INVALID_ROUTING_NUMBER',\n 'INVALID_SORT_CODE',\n 'NO_ACCOUNT',\n 'TECHNICAL_ERROR',\n ])\n .describe('Why the bank rail rejected the transfer.')\n .optional(),\n })\n .describe(\n 'Reason the bank rail rejected the transfer.\\n\\nReturned only when `status` is `FAILED`.'\n )\n .optional(),\n bankTransferReference: z\n .string()\n .describe(\n \"Reference returned by the bank rail once the transfer is initiated. For\\nexample, an ACH trace number or a SEPA reference. Use this value to\\nreconcile against the merchant's bank statement.\\n\\nEmpty until the bank rail returns a reference.\"\n )\n .max(500)\n .optional()\n .nullable(),\n cashAdvanceIncluded: z\n .boolean()\n .describe(\n \"Whether the payout `amount` includes funds from a Wix Capital cash advance\\ntaken out by the merchant. If `false`, the amount comes only from the\\nmerchant's sales proceeds.\"\n )\n .optional(),\n })\n )\n .optional(),\n metadata: z\n .object({\n count: z\n .number()\n .int()\n .describe('Number of items returned in the response.')\n .optional()\n .nullable(),\n offset: z\n .number()\n .int()\n .describe('Offset that was requested.')\n .optional()\n .nullable(),\n total: z\n .number()\n .int()\n .describe('Total number of items that match the query.')\n .optional()\n .nullable(),\n tooManyToCount: z\n .boolean()\n .describe(\n 'Flag that indicates the server failed to calculate the `total` field.'\n )\n .optional()\n .nullable(),\n })\n .describe('Paging metadata.')\n .optional(),\n});\nexport const GetPayoutRequest = z.object({\n payoutId: z\n .string()\n .describe('ID of the payout to retrieve.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n ),\n accountId: z\n .string()\n .describe(\n 'ID of the Wix Payments account that owns the payout. The payout must\\nbelong to this account. Retrieve account IDs from the Accounts API.'\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n ),\n});\nexport const GetPayoutResponse = z.object({\n _id: z\n .string()\n .describe('Payout ID.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional(),\n accountId: z\n .string()\n .describe(\n 'ID of the Wix Payments account that owns the payout. Retrieve account IDs\\nfrom the Accounts API.'\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional(),\n accountProfileId: z\n .string()\n .describe(\n 'ID of the Wix Payments account profile that owns the payout.\\n\\nA Wix Payments account has 1 or more profiles. Each profile has its own\\nbalance and its own payouts. Most merchants have 1 profile. Retrieve\\nprofile IDs from the Accounts API.'\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional(),\n _createdDate: z\n .date()\n .describe(\n \"Date and time the payout was created.\\n\\nThe payout is created before the underlying transfer is initiated at the\\nbank. Once initiated, the funds typically reach the merchant's bank account\\nwithin 3 to 5 business days, depending on the receiving bank.\"\n )\n .optional()\n .nullable(),\n amount: z\n .object({\n value: z\n .string()\n .describe(\n 'Monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99). Optionally, a single (-), to indicate that the amount is negative.'\n )\n .optional(),\n currency: z\n .string()\n .describe(\n 'Currency code. Must be valid ISO 4217 currency code (e.g., USD).'\n )\n .optional(),\n formattedValue: z\n .string()\n .describe(\n 'Monetary amount. Decimal string in local format (e.g., 1 000,30). Optionally, a single (-), to indicate that the amount is negative.'\n )\n .optional()\n .nullable(),\n })\n .describe(\"Amount of the transfer to the merchant's bank account.\")\n .optional(),\n status: z\n .enum(['UNKNOWN', 'SENT', 'FAILED'])\n .describe(\n \"Lifecycle status of the payout.\\n\\n`SENT` means the bank rail accepted the transfer for delivery. `FAILED` means\\nthe receiving bank rejected the transfer.\\n\\nA `SENT` status doesn't guarantee that the funds were delivered to the\\nmerchant. The bank rail doesn't provide a delivery acknowledgement, and a\\npayout in `SENT` can later transition to `FAILED` if the receiving bank\\nrejects the transfer. See the per-value documentation on `PayoutStatus` for\\ndetails.\"\n )\n .optional(),\n estimatedArrivalDateV2: z\n .string()\n .describe(\n \"Estimated date for when the funds should arrive at the merchant's bank\\naccount, in `YYYY-MM-DD` format.\\n\\nThe estimated arrival date is a prediction, not a guarantee. Actual arrival\\ndepends on the receiving bank's processing and may be later.\"\n )\n .optional()\n .nullable(),\n failureReason: z\n .object({\n code: z\n .enum([\n 'GENERIC_PAYOUT_FAILURE',\n 'ACCOUNT_CLOSED',\n 'ACCOUNT_FROZEN',\n 'BANK_ACCOUNT_RESTRICTED',\n 'BANK_OWNERSHIP_CHANGED',\n 'COULD_NOT_PROCESS',\n 'DEBIT_NOT_AUTHORIZED',\n 'INCORRECT_ACCOUNT_HOLDER_NAME',\n 'INVALID_ACCOUNT_DETAILS_CITY',\n 'INVALID_ACCOUNT_NUMBER',\n 'INVALID_CURRENCY',\n 'INVALID_ROUTING_NUMBER',\n 'INVALID_SORT_CODE',\n 'NO_ACCOUNT',\n 'TECHNICAL_ERROR',\n ])\n .describe('Why the bank rail rejected the transfer.')\n .optional(),\n })\n .describe(\n 'Reason the bank rail rejected the transfer.\\n\\nReturned only when `status` is `FAILED`.'\n )\n .optional(),\n bankTransferReference: z\n .string()\n .describe(\n \"Reference returned by the bank rail once the transfer is initiated. For\\nexample, an ACH trace number or a SEPA reference. Use this value to\\nreconcile against the merchant's bank statement.\\n\\nEmpty until the bank rail returns a reference.\"\n )\n .max(500)\n .optional()\n .nullable(),\n cashAdvanceIncluded: z\n .boolean()\n .describe(\n \"Whether the payout `amount` includes funds from a Wix Capital cash advance\\ntaken out by the merchant. If `false`, the amount comes only from the\\nmerchant's sales proceeds.\"\n )\n .optional(),\n});\n"],"mappings":";AAAA,YAAY,OAAO;AAEZ,IAAM,qBAAuB,SAAO;AAAA,EACzC,WACG,SAAO,EACP;AAAA,IACC;AAAA,EACF,EACC;AAAA,IACC;AAAA,IACA;AAAA,EACF;AAAA,EACF,SACG,SAAO;AAAA,IACN,kBACG,SAAO,EACP;AAAA,MACC;AAAA,IACF,EACC;AAAA,MACC;AAAA,MACA;AAAA,IACF,EACC,SAAS,EACT,S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;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,CAAC,EACA,SAAS,0CAA0C,EACnD,SAAS;AAAA,EACd,CAAC,EACA;AAAA,IACC;AAAA,EACF,EACC,SAAS;AAAA,EACZ,uBACG,SAAO,EACP;AAAA,IACC;AAAA,EACF,EACC,IAAI,GAAG,EACP,SAAS,EACT,SAAS;AAAA,EACZ,qBACG,UAAQ,EACR;AAAA,IACC;AAAA,EACF,EACC,SAAS;AACd,CAAC;","names":[]}
|
|
@@ -1,405 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// index.ts
|
|
21
|
-
var index_exports = {};
|
|
22
|
-
__export(index_exports, {
|
|
23
|
-
PayoutFailureCode: () => PayoutFailureCode,
|
|
24
|
-
PayoutStatus: () => PayoutStatus,
|
|
25
|
-
SortOrder: () => SortOrder,
|
|
26
|
-
WebhookIdentityType: () => WebhookIdentityType,
|
|
27
|
-
getPayout: () => getPayout4,
|
|
28
|
-
listPayouts: () => listPayouts4,
|
|
29
|
-
onPayoutCreated: () => onPayoutCreated2,
|
|
30
|
-
onPayoutUpdated: () => onPayoutUpdated2
|
|
31
|
-
});
|
|
32
|
-
module.exports = __toCommonJS(index_exports);
|
|
33
|
-
|
|
34
|
-
// src/payments-payouts-v4-payout-payouts.public.ts
|
|
35
|
-
var import_rename_all_nested_keys2 = require("@wix/sdk-runtime/rename-all-nested-keys");
|
|
36
|
-
var import_timestamp3 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
37
|
-
var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
38
|
-
var import_sdk_types = require("@wix/sdk-types");
|
|
39
|
-
|
|
40
|
-
// src/payments-payouts-v4-payout-payouts.universal.ts
|
|
41
|
-
var import_transform_error = require("@wix/sdk-runtime/transform-error");
|
|
42
|
-
var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
|
|
43
|
-
|
|
44
|
-
// src/payments-payouts-v4-payout-payouts.http.ts
|
|
45
|
-
var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
|
|
46
|
-
var import_float = require("@wix/sdk-runtime/transformations/float");
|
|
47
|
-
var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
|
|
48
|
-
var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
49
|
-
var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
50
|
-
var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
|
|
51
|
-
function resolveWixPaymentsV4PayoutsPayoutsServiceUrl(opts) {
|
|
52
|
-
const domainToMappings = {
|
|
53
|
-
"api._api_base_domain_": [
|
|
54
|
-
{
|
|
55
|
-
srcPath: "/wixpay-payout",
|
|
56
|
-
destPath: ""
|
|
57
|
-
}
|
|
58
|
-
],
|
|
59
|
-
"manage._base_domain_": [
|
|
60
|
-
{
|
|
61
|
-
srcPath: "/_api/wixpay-payout/v4/payout-groups",
|
|
62
|
-
destPath: "/v4/payout-groups"
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
srcPath: "/_api/wixpay-payout/v4/payouts",
|
|
66
|
-
destPath: "/v4/payouts"
|
|
67
|
-
}
|
|
68
|
-
],
|
|
69
|
-
"bo._base_domain_": [
|
|
70
|
-
{
|
|
71
|
-
srcPath: "/_api/wixpay-payout/v4/payouts",
|
|
72
|
-
destPath: "/v4/payouts"
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
srcPath: "/_api/wixpay-payout/v4/payout-groups",
|
|
76
|
-
destPath: "/v4/payout-groups"
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
srcPath: "/_api/wixpay-payout/v4/bo-payouts",
|
|
80
|
-
destPath: "/v4/bo-payouts"
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
srcPath: "/_api/wixpay-payout/v4/bo-payout-policies",
|
|
84
|
-
destPath: "/v4/bo-payout-policies"
|
|
85
|
-
}
|
|
86
|
-
],
|
|
87
|
-
"wixbo.ai": [
|
|
88
|
-
{
|
|
89
|
-
srcPath: "/_api/wixpay-payout/v4/payouts",
|
|
90
|
-
destPath: "/v4/payouts"
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
srcPath: "/_api/wixpay-payout/v4/payout-groups",
|
|
94
|
-
destPath: "/v4/payout-groups"
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
srcPath: "/_api/wixpay-payout/v4/bo-payouts",
|
|
98
|
-
destPath: "/v4/bo-payouts"
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
srcPath: "/_api/wixpay-payout/v4/bo-payout-policies",
|
|
102
|
-
destPath: "/v4/bo-payout-policies"
|
|
103
|
-
}
|
|
104
|
-
],
|
|
105
|
-
"wix-bo.com": [
|
|
106
|
-
{
|
|
107
|
-
srcPath: "/_api/wixpay-payout/v4/payouts",
|
|
108
|
-
destPath: "/v4/payouts"
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
srcPath: "/_api/wixpay-payout/v4/payout-groups",
|
|
112
|
-
destPath: "/v4/payout-groups"
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
srcPath: "/_api/wixpay-payout/v4/bo-payouts",
|
|
116
|
-
destPath: "/v4/bo-payouts"
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
srcPath: "/_api/wixpay-payout/v4/bo-payout-policies",
|
|
120
|
-
destPath: "/v4/bo-payout-policies"
|
|
121
|
-
}
|
|
122
|
-
],
|
|
123
|
-
"payment-webhooks.wixapps.net": [
|
|
124
|
-
{
|
|
125
|
-
srcPath: "/wix-payments/payout-callbacks/stripe",
|
|
126
|
-
destPath: "/payout-callbacks/stripe"
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
srcPath: "/wix-payments/payout-callbacks/adyen",
|
|
130
|
-
destPath: "/payout-callbacks/adyen"
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
srcPath: "/wix-payments/payout-callbacks/stone",
|
|
134
|
-
destPath: "/payout-callbacks/stone"
|
|
135
|
-
},
|
|
136
|
-
{
|
|
137
|
-
srcPath: "/wix-payments/payout-callbacks/paypal",
|
|
138
|
-
destPath: "/payout-callbacks/paypal"
|
|
139
|
-
}
|
|
140
|
-
],
|
|
141
|
-
"cronulla-jobs._base_domain_": [
|
|
142
|
-
{
|
|
143
|
-
srcPath: "/wix-payments/wixpay-payout/internal-api/jobs",
|
|
144
|
-
destPath: "/internal-api/jobs"
|
|
145
|
-
}
|
|
146
|
-
],
|
|
147
|
-
"manage.base44.com": [
|
|
148
|
-
{
|
|
149
|
-
srcPath: "/_api/wixpay-payout",
|
|
150
|
-
destPath: ""
|
|
151
|
-
}
|
|
152
|
-
],
|
|
153
|
-
"payments.base44.com": [
|
|
154
|
-
{
|
|
155
|
-
srcPath: "/_api/wixpay-payout",
|
|
156
|
-
destPath: ""
|
|
157
|
-
}
|
|
158
|
-
],
|
|
159
|
-
"www.wixapis.com": [
|
|
160
|
-
{
|
|
161
|
-
srcPath: "/wixpay-payouts/v4/payouts",
|
|
162
|
-
destPath: "/v4/payouts"
|
|
163
|
-
}
|
|
164
|
-
]
|
|
165
|
-
};
|
|
166
|
-
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
167
|
-
}
|
|
168
|
-
var PACKAGE_NAME = "@wix/auto_sdk_payments_payouts";
|
|
169
|
-
function listPayouts(payload) {
|
|
170
|
-
function __listPayouts({ host }) {
|
|
171
|
-
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
172
|
-
{
|
|
173
|
-
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
174
|
-
paths: [{ path: "createdBefore" }, { path: "createdAfter" }]
|
|
175
|
-
},
|
|
176
|
-
{
|
|
177
|
-
transformFn: import_float.transformSDKFloatToRESTFloat,
|
|
178
|
-
paths: [
|
|
179
|
-
{ path: "sort.origin.latitude" },
|
|
180
|
-
{ path: "sort.origin.longitude" }
|
|
181
|
-
]
|
|
182
|
-
}
|
|
183
|
-
]);
|
|
184
|
-
const metadata = {
|
|
185
|
-
entityFqdn: "wix.payments.payouts.v4.payout",
|
|
186
|
-
method: "GET",
|
|
187
|
-
methodFqn: "wix.payments.v4.payouts.PayoutsService.ListPayouts",
|
|
188
|
-
packageName: PACKAGE_NAME,
|
|
189
|
-
migrationOptions: {
|
|
190
|
-
optInTransformResponse: true
|
|
191
|
-
},
|
|
192
|
-
url: resolveWixPaymentsV4PayoutsPayoutsServiceUrl({
|
|
193
|
-
protoPath: "/v4/payouts",
|
|
194
|
-
data: serializedData,
|
|
195
|
-
host
|
|
196
|
-
}),
|
|
197
|
-
params: (0, import_rest_modules.toURLSearchParams)(serializedData, true),
|
|
198
|
-
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
199
|
-
{
|
|
200
|
-
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
201
|
-
paths: [{ path: "payouts.createdDate" }]
|
|
202
|
-
}
|
|
203
|
-
])
|
|
204
|
-
};
|
|
205
|
-
return metadata;
|
|
206
|
-
}
|
|
207
|
-
return __listPayouts;
|
|
208
|
-
}
|
|
209
|
-
function getPayout(payload) {
|
|
210
|
-
function __getPayout({ host }) {
|
|
211
|
-
const metadata = {
|
|
212
|
-
entityFqdn: "wix.payments.payouts.v4.payout",
|
|
213
|
-
method: "GET",
|
|
214
|
-
methodFqn: "wix.payments.v4.payouts.PayoutsService.GetPayout",
|
|
215
|
-
packageName: PACKAGE_NAME,
|
|
216
|
-
migrationOptions: {
|
|
217
|
-
optInTransformResponse: true
|
|
218
|
-
},
|
|
219
|
-
url: resolveWixPaymentsV4PayoutsPayoutsServiceUrl({
|
|
220
|
-
protoPath: "/v4/payouts/{payoutId}",
|
|
221
|
-
data: payload,
|
|
222
|
-
host
|
|
223
|
-
}),
|
|
224
|
-
params: (0, import_rest_modules.toURLSearchParams)(payload),
|
|
225
|
-
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
226
|
-
{
|
|
227
|
-
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
228
|
-
paths: [{ path: "payout.createdDate" }]
|
|
229
|
-
}
|
|
230
|
-
])
|
|
231
|
-
};
|
|
232
|
-
return metadata;
|
|
233
|
-
}
|
|
234
|
-
return __getPayout;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
// src/payments-payouts-v4-payout-payouts.universal.ts
|
|
238
|
-
var PayoutStatus = /* @__PURE__ */ ((PayoutStatus2) => {
|
|
239
|
-
PayoutStatus2["UNKNOWN"] = "UNKNOWN";
|
|
240
|
-
PayoutStatus2["SENT"] = "SENT";
|
|
241
|
-
PayoutStatus2["FAILED"] = "FAILED";
|
|
242
|
-
return PayoutStatus2;
|
|
243
|
-
})(PayoutStatus || {});
|
|
244
|
-
var PayoutFailureCode = /* @__PURE__ */ ((PayoutFailureCode2) => {
|
|
245
|
-
PayoutFailureCode2["GENERIC_PAYOUT_FAILURE"] = "GENERIC_PAYOUT_FAILURE";
|
|
246
|
-
PayoutFailureCode2["ACCOUNT_CLOSED"] = "ACCOUNT_CLOSED";
|
|
247
|
-
PayoutFailureCode2["ACCOUNT_FROZEN"] = "ACCOUNT_FROZEN";
|
|
248
|
-
PayoutFailureCode2["BANK_ACCOUNT_RESTRICTED"] = "BANK_ACCOUNT_RESTRICTED";
|
|
249
|
-
PayoutFailureCode2["BANK_OWNERSHIP_CHANGED"] = "BANK_OWNERSHIP_CHANGED";
|
|
250
|
-
PayoutFailureCode2["COULD_NOT_PROCESS"] = "COULD_NOT_PROCESS";
|
|
251
|
-
PayoutFailureCode2["DEBIT_NOT_AUTHORIZED"] = "DEBIT_NOT_AUTHORIZED";
|
|
252
|
-
PayoutFailureCode2["INCORRECT_ACCOUNT_HOLDER_NAME"] = "INCORRECT_ACCOUNT_HOLDER_NAME";
|
|
253
|
-
PayoutFailureCode2["INVALID_ACCOUNT_DETAILS_CITY"] = "INVALID_ACCOUNT_DETAILS_CITY";
|
|
254
|
-
PayoutFailureCode2["INVALID_ACCOUNT_NUMBER"] = "INVALID_ACCOUNT_NUMBER";
|
|
255
|
-
PayoutFailureCode2["INVALID_CURRENCY"] = "INVALID_CURRENCY";
|
|
256
|
-
PayoutFailureCode2["INVALID_ROUTING_NUMBER"] = "INVALID_ROUTING_NUMBER";
|
|
257
|
-
PayoutFailureCode2["INVALID_SORT_CODE"] = "INVALID_SORT_CODE";
|
|
258
|
-
PayoutFailureCode2["NO_ACCOUNT"] = "NO_ACCOUNT";
|
|
259
|
-
PayoutFailureCode2["TECHNICAL_ERROR"] = "TECHNICAL_ERROR";
|
|
260
|
-
return PayoutFailureCode2;
|
|
261
|
-
})(PayoutFailureCode || {});
|
|
262
|
-
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
263
|
-
SortOrder2["ASC"] = "ASC";
|
|
264
|
-
SortOrder2["DESC"] = "DESC";
|
|
265
|
-
return SortOrder2;
|
|
266
|
-
})(SortOrder || {});
|
|
267
|
-
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
268
|
-
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
269
|
-
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
270
|
-
WebhookIdentityType2["MEMBER"] = "MEMBER";
|
|
271
|
-
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
272
|
-
WebhookIdentityType2["APP"] = "APP";
|
|
273
|
-
return WebhookIdentityType2;
|
|
274
|
-
})(WebhookIdentityType || {});
|
|
275
|
-
async function listPayouts2(accountId, options) {
|
|
276
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
277
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
278
|
-
accountId,
|
|
279
|
-
accountProfileId: options?.accountProfileId,
|
|
280
|
-
createdBefore: options?.createdBefore,
|
|
281
|
-
createdAfter: options?.createdAfter,
|
|
282
|
-
sort: options?.sort,
|
|
283
|
-
paging: options?.paging
|
|
284
|
-
});
|
|
285
|
-
const reqOpts = listPayouts(payload);
|
|
286
|
-
sideEffects?.onSiteCall?.();
|
|
287
|
-
try {
|
|
288
|
-
const result = await httpClient.request(reqOpts);
|
|
289
|
-
sideEffects?.onSuccess?.(result);
|
|
290
|
-
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
291
|
-
} catch (err) {
|
|
292
|
-
const transformedError = (0, import_transform_error.transformError)(
|
|
293
|
-
err,
|
|
294
|
-
{
|
|
295
|
-
spreadPathsToArguments: {},
|
|
296
|
-
explicitPathsToArguments: {
|
|
297
|
-
accountId: "$[0]",
|
|
298
|
-
accountProfileId: "$[1].accountProfileId",
|
|
299
|
-
createdBefore: "$[1].createdBefore",
|
|
300
|
-
createdAfter: "$[1].createdAfter",
|
|
301
|
-
sort: "$[1].sort",
|
|
302
|
-
paging: "$[1].paging"
|
|
303
|
-
},
|
|
304
|
-
singleArgumentUnchanged: false
|
|
305
|
-
},
|
|
306
|
-
["accountId", "options"]
|
|
307
|
-
);
|
|
308
|
-
sideEffects?.onError?.(err);
|
|
309
|
-
throw transformedError;
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
async function getPayout2(payoutId, accountId) {
|
|
313
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
314
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
315
|
-
payoutId,
|
|
316
|
-
accountId
|
|
317
|
-
});
|
|
318
|
-
const reqOpts = getPayout(payload);
|
|
319
|
-
sideEffects?.onSiteCall?.();
|
|
320
|
-
try {
|
|
321
|
-
const result = await httpClient.request(reqOpts);
|
|
322
|
-
sideEffects?.onSuccess?.(result);
|
|
323
|
-
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data)?.payout;
|
|
324
|
-
} catch (err) {
|
|
325
|
-
const transformedError = (0, import_transform_error.transformError)(
|
|
326
|
-
err,
|
|
327
|
-
{
|
|
328
|
-
spreadPathsToArguments: {},
|
|
329
|
-
explicitPathsToArguments: { payoutId: "$[0]", accountId: "$[1]" },
|
|
330
|
-
singleArgumentUnchanged: false
|
|
331
|
-
},
|
|
332
|
-
["payoutId", "accountId"]
|
|
333
|
-
);
|
|
334
|
-
sideEffects?.onError?.(err);
|
|
335
|
-
throw transformedError;
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
// src/payments-payouts-v4-payout-payouts.public.ts
|
|
340
|
-
function listPayouts3(httpClient) {
|
|
341
|
-
return (accountId, options) => listPayouts2(
|
|
342
|
-
accountId,
|
|
343
|
-
options,
|
|
344
|
-
// @ts-ignore
|
|
345
|
-
{ httpClient }
|
|
346
|
-
);
|
|
347
|
-
}
|
|
348
|
-
function getPayout3(httpClient) {
|
|
349
|
-
return (payoutId, accountId) => getPayout2(
|
|
350
|
-
payoutId,
|
|
351
|
-
accountId,
|
|
352
|
-
// @ts-ignore
|
|
353
|
-
{ httpClient }
|
|
354
|
-
);
|
|
355
|
-
}
|
|
356
|
-
var onPayoutCreated = (0, import_sdk_types.EventDefinition)(
|
|
357
|
-
"wix.payments.payouts.v4.payout_created",
|
|
358
|
-
true,
|
|
359
|
-
(event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
|
|
360
|
-
(0, import_transform_paths2.transformPaths)(event, [
|
|
361
|
-
{
|
|
362
|
-
transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
|
|
363
|
-
paths: [
|
|
364
|
-
{ path: "entity.createdDate" },
|
|
365
|
-
{ path: "metadata.eventTime" }
|
|
366
|
-
]
|
|
367
|
-
}
|
|
368
|
-
])
|
|
369
|
-
)
|
|
370
|
-
)();
|
|
371
|
-
var onPayoutUpdated = (0, import_sdk_types.EventDefinition)(
|
|
372
|
-
"wix.payments.payouts.v4.payout_updated",
|
|
373
|
-
true,
|
|
374
|
-
(event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
|
|
375
|
-
(0, import_transform_paths2.transformPaths)(event, [
|
|
376
|
-
{
|
|
377
|
-
transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
|
|
378
|
-
paths: [
|
|
379
|
-
{ path: "entity.createdDate" },
|
|
380
|
-
{ path: "metadata.eventTime" }
|
|
381
|
-
]
|
|
382
|
-
}
|
|
383
|
-
])
|
|
384
|
-
)
|
|
385
|
-
)();
|
|
386
|
-
|
|
387
|
-
// src/payments-payouts-v4-payout-payouts.context.ts
|
|
388
|
-
var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
|
|
389
|
-
var import_event_definition_modules = require("@wix/sdk-runtime/event-definition-modules");
|
|
390
|
-
var listPayouts4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(listPayouts3);
|
|
391
|
-
var getPayout4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getPayout3);
|
|
392
|
-
var onPayoutCreated2 = (0, import_event_definition_modules.createEventModule)(onPayoutCreated);
|
|
393
|
-
var onPayoutUpdated2 = (0, import_event_definition_modules.createEventModule)(onPayoutUpdated);
|
|
394
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
395
|
-
0 && (module.exports = {
|
|
396
|
-
PayoutFailureCode,
|
|
397
|
-
PayoutStatus,
|
|
398
|
-
SortOrder,
|
|
399
|
-
WebhookIdentityType,
|
|
400
|
-
getPayout,
|
|
401
|
-
listPayouts,
|
|
402
|
-
onPayoutCreated,
|
|
403
|
-
onPayoutUpdated
|
|
404
|
-
});
|
|
405
|
-
//# sourceMappingURL=index.js.map
|