@wix/auto_sdk_payments_payouts 1.0.0

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 (52) hide show
  1. package/build/cjs/index.d.ts +44 -0
  2. package/build/cjs/index.js +397 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +633 -0
  5. package/build/cjs/index.typings.js +331 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +522 -0
  8. package/build/cjs/meta.js +302 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/schemas.d.ts +111 -0
  11. package/build/cjs/schemas.js +229 -0
  12. package/build/cjs/schemas.js.map +1 -0
  13. package/build/es/index.d.mts +44 -0
  14. package/build/es/index.mjs +366 -0
  15. package/build/es/index.mjs.map +1 -0
  16. package/build/es/index.typings.d.mts +633 -0
  17. package/build/es/index.typings.mjs +302 -0
  18. package/build/es/index.typings.mjs.map +1 -0
  19. package/build/es/meta.d.mts +522 -0
  20. package/build/es/meta.mjs +270 -0
  21. package/build/es/meta.mjs.map +1 -0
  22. package/build/es/package.json +3 -0
  23. package/build/es/schemas.d.mts +111 -0
  24. package/build/es/schemas.mjs +189 -0
  25. package/build/es/schemas.mjs.map +1 -0
  26. package/build/internal/cjs/index.d.ts +44 -0
  27. package/build/internal/cjs/index.js +397 -0
  28. package/build/internal/cjs/index.js.map +1 -0
  29. package/build/internal/cjs/index.typings.d.ts +633 -0
  30. package/build/internal/cjs/index.typings.js +331 -0
  31. package/build/internal/cjs/index.typings.js.map +1 -0
  32. package/build/internal/cjs/meta.d.ts +522 -0
  33. package/build/internal/cjs/meta.js +302 -0
  34. package/build/internal/cjs/meta.js.map +1 -0
  35. package/build/internal/cjs/schemas.d.ts +111 -0
  36. package/build/internal/cjs/schemas.js +229 -0
  37. package/build/internal/cjs/schemas.js.map +1 -0
  38. package/build/internal/es/index.d.mts +44 -0
  39. package/build/internal/es/index.mjs +366 -0
  40. package/build/internal/es/index.mjs.map +1 -0
  41. package/build/internal/es/index.typings.d.mts +633 -0
  42. package/build/internal/es/index.typings.mjs +302 -0
  43. package/build/internal/es/index.typings.mjs.map +1 -0
  44. package/build/internal/es/meta.d.mts +522 -0
  45. package/build/internal/es/meta.mjs +270 -0
  46. package/build/internal/es/meta.mjs.map +1 -0
  47. package/build/internal/es/schemas.d.mts +111 -0
  48. package/build/internal/es/schemas.mjs +189 -0
  49. package/build/internal/es/schemas.mjs.map +1 -0
  50. package/meta/package.json +3 -0
  51. package/package.json +61 -0
  52. package/schemas/package.json +3 -0
@@ -0,0 +1,229 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // schemas.ts
31
+ var schemas_exports = {};
32
+ __export(schemas_exports, {
33
+ GetPayoutRequest: () => GetPayoutRequest,
34
+ GetPayoutResponse: () => GetPayoutResponse,
35
+ ListPayoutsRequest: () => ListPayoutsRequest,
36
+ ListPayoutsResponse: () => ListPayoutsResponse
37
+ });
38
+ module.exports = __toCommonJS(schemas_exports);
39
+
40
+ // src/payments-payouts-v4-payout-payouts.schemas.ts
41
+ var z = __toESM(require("zod"));
42
+ var ListPayoutsRequest = z.object({
43
+ accountId: z.string().describe("ID of the Wix Payments account whose payouts to list.").regex(
44
+ /^[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}$/,
45
+ "Must be a valid GUID"
46
+ ),
47
+ options: z.object({
48
+ accountProfileId: z.string().describe(
49
+ "Optional. When omitted, payouts across all profiles of the account are returned.\nWhen set, only payouts belonging to the specified account profile are returned."
50
+ ).regex(
51
+ /^[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}$/,
52
+ "Must be a valid GUID"
53
+ ).optional().nullable(),
54
+ createdBefore: z.date().describe(
55
+ "Optional. Returns only payouts created before this timestamp."
56
+ ).optional().nullable(),
57
+ createdAfter: z.date().describe(
58
+ "Optional. Returns only payouts created after this timestamp."
59
+ ).optional().nullable(),
60
+ sort: z.object({
61
+ fieldName: z.string().describe("Name of the field to sort by.").max(512).optional(),
62
+ order: z.enum(["ASC", "DESC"]).optional()
63
+ }).describe(
64
+ "Optional. Sorting. Only `created_date` is supported; requests sorting by any other field are rejected with INVALID_ARGUMENT."
65
+ ).optional(),
66
+ paging: z.object({
67
+ limit: z.number().int().describe("Number of items to load.").min(0).optional().nullable(),
68
+ offset: z.number().int().describe("Number of items to skip in the current sort order.").min(0).optional().nullable()
69
+ }).describe("Optional paging. Offset-based.").optional()
70
+ }).optional()
71
+ });
72
+ var ListPayoutsResponse = z.object({
73
+ payouts: z.array(
74
+ z.object({
75
+ _id: z.string().describe("Unique identifier of the payout. Immutable.").regex(
76
+ /^[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}$/,
77
+ "Must be a valid GUID"
78
+ ).optional(),
79
+ accountId: z.string().describe("ID of the Wix Payments account that owns this payout.").regex(
80
+ /^[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}$/,
81
+ "Must be a valid GUID"
82
+ ).optional(),
83
+ accountProfileId: z.string().describe(
84
+ "ID of the Wix Payments account profile this payout belongs to.\nA Wix Payments account has one or more profiles; each profile has its own\nbalance and its own payouts. Most merchants have a single profile."
85
+ ).regex(
86
+ /^[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}$/,
87
+ "Must be a valid GUID"
88
+ ).optional(),
89
+ _createdDate: z.date().describe(
90
+ "Date the payout was created, in advance of the underlying transfer being\ninitiated at the bank rail. Once initiated, the funds typically reach the\nmerchant's bank account within 3-5 business days, depending on the receiving bank."
91
+ ).optional().nullable(),
92
+ amount: z.object({
93
+ value: z.string().describe(
94
+ "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."
95
+ ).optional(),
96
+ currency: z.string().describe(
97
+ "Currency code. Must be valid ISO 4217 currency code (e.g., USD)."
98
+ ).optional(),
99
+ formattedValue: z.string().describe(
100
+ "Monetary amount. Decimal string in local format (e.g., 1 000,30). Optionally, a single (-), to indicate that the amount is negative."
101
+ ).optional().nullable()
102
+ }).describe(
103
+ "Amount of funds transferred to the merchant's bank account."
104
+ ).optional(),
105
+ status: z.enum(["UNKNOWN", "SENT", "FAILED"]).describe(
106
+ 'Lifecycle status of the payout. `SENT` means the bank rail accepted the transfer\nfor delivery; `FAILED` means the receiving bank rejected the transfer. The rail\ndoes not provide a delivery acknowledgement, so `SENT` is not the same as\n"delivered to the merchant" \u2014 see the per-value documentation on `PayoutStatus`.'
107
+ ).optional(),
108
+ estimatedArrivalDateV2: z.string().describe(
109
+ "Estimated date for when the funds should arrive at the merchant's bank, returned\nby the underlying bank rail when available. This is a prediction, not a guarantee \u2014\nactual arrival depends on the receiving bank's processing and may be later."
110
+ ).optional().nullable(),
111
+ failureReason: z.object({
112
+ code: z.enum([
113
+ "GENERIC_PAYOUT_FAILURE",
114
+ "ACCOUNT_CLOSED",
115
+ "ACCOUNT_FROZEN",
116
+ "BANK_ACCOUNT_RESTRICTED",
117
+ "BANK_OWNERSHIP_CHANGED",
118
+ "COULD_NOT_PROCESS",
119
+ "DEBIT_NOT_AUTHORIZED",
120
+ "INCORRECT_ACCOUNT_HOLDER_NAME",
121
+ "INVALID_ACCOUNT_DETAILS_CITY",
122
+ "INVALID_ACCOUNT_NUMBER",
123
+ "INVALID_CURRENCY",
124
+ "INVALID_ROUTING_NUMBER",
125
+ "INVALID_SORT_CODE",
126
+ "NO_ACCOUNT",
127
+ "TECHNICAL_ERROR"
128
+ ]).describe("Why the bank rail rejected the transfer.").optional()
129
+ }).describe(
130
+ "Set only when `status` is `FAILED`. Indicates why the bank rail rejected the transfer.\nThe codes are a Wix Payments unified set; the original provider-specific reason is not exposed."
131
+ ).optional(),
132
+ bankTransferReference: z.string().describe(
133
+ "Reference returned by the bank rail (e.g. ACH trace number, SEPA reference) once\nthe transfer is initiated. Use it for reconciliation against the merchant's bank\nstatement. Empty when the rail has not yet returned a reference."
134
+ ).max(500).optional().nullable(),
135
+ cashAdvanceIncluded: z.boolean().describe(
136
+ "`true` if the payout's `amount` includes funds that originate from a Wix Capital\nadvance the merchant has taken out. `false` if the amount is composed only of\nregular sales proceeds."
137
+ ).optional()
138
+ })
139
+ ).optional(),
140
+ metadata: z.object({
141
+ count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
142
+ offset: z.number().int().describe("Offset that was requested.").optional().nullable(),
143
+ total: z.number().int().describe("Total number of items that match the query.").optional().nullable(),
144
+ tooManyToCount: z.boolean().describe(
145
+ "Flag that indicates the server failed to calculate the `total` field."
146
+ ).optional().nullable()
147
+ }).describe("Paging metadata.").optional()
148
+ });
149
+ var GetPayoutRequest = z.object({
150
+ payoutId: z.string().describe("ID of the payout to retrieve.").regex(
151
+ /^[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}$/,
152
+ "Must be a valid GUID"
153
+ ),
154
+ accountId: z.string().describe("ID of the Wix Payments account the payout belongs to.").regex(
155
+ /^[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}$/,
156
+ "Must be a valid GUID"
157
+ )
158
+ });
159
+ var GetPayoutResponse = z.object({
160
+ _id: z.string().describe("Unique identifier of the payout. Immutable.").regex(
161
+ /^[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}$/,
162
+ "Must be a valid GUID"
163
+ ).optional(),
164
+ accountId: z.string().describe("ID of the Wix Payments account that owns this payout.").regex(
165
+ /^[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}$/,
166
+ "Must be a valid GUID"
167
+ ).optional(),
168
+ accountProfileId: z.string().describe(
169
+ "ID of the Wix Payments account profile this payout belongs to.\nA Wix Payments account has one or more profiles; each profile has its own\nbalance and its own payouts. Most merchants have a single profile."
170
+ ).regex(
171
+ /^[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}$/,
172
+ "Must be a valid GUID"
173
+ ).optional(),
174
+ _createdDate: z.date().describe(
175
+ "Date the payout was created, in advance of the underlying transfer being\ninitiated at the bank rail. Once initiated, the funds typically reach the\nmerchant's bank account within 3-5 business days, depending on the receiving bank."
176
+ ).optional().nullable(),
177
+ amount: z.object({
178
+ value: z.string().describe(
179
+ "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."
180
+ ).optional(),
181
+ currency: z.string().describe(
182
+ "Currency code. Must be valid ISO 4217 currency code (e.g., USD)."
183
+ ).optional(),
184
+ formattedValue: z.string().describe(
185
+ "Monetary amount. Decimal string in local format (e.g., 1 000,30). Optionally, a single (-), to indicate that the amount is negative."
186
+ ).optional().nullable()
187
+ }).describe("Amount of funds transferred to the merchant's bank account.").optional(),
188
+ status: z.enum(["UNKNOWN", "SENT", "FAILED"]).describe(
189
+ 'Lifecycle status of the payout. `SENT` means the bank rail accepted the transfer\nfor delivery; `FAILED` means the receiving bank rejected the transfer. The rail\ndoes not provide a delivery acknowledgement, so `SENT` is not the same as\n"delivered to the merchant" \u2014 see the per-value documentation on `PayoutStatus`.'
190
+ ).optional(),
191
+ estimatedArrivalDateV2: z.string().describe(
192
+ "Estimated date for when the funds should arrive at the merchant's bank, returned\nby the underlying bank rail when available. This is a prediction, not a guarantee \u2014\nactual arrival depends on the receiving bank's processing and may be later."
193
+ ).optional().nullable(),
194
+ failureReason: z.object({
195
+ code: z.enum([
196
+ "GENERIC_PAYOUT_FAILURE",
197
+ "ACCOUNT_CLOSED",
198
+ "ACCOUNT_FROZEN",
199
+ "BANK_ACCOUNT_RESTRICTED",
200
+ "BANK_OWNERSHIP_CHANGED",
201
+ "COULD_NOT_PROCESS",
202
+ "DEBIT_NOT_AUTHORIZED",
203
+ "INCORRECT_ACCOUNT_HOLDER_NAME",
204
+ "INVALID_ACCOUNT_DETAILS_CITY",
205
+ "INVALID_ACCOUNT_NUMBER",
206
+ "INVALID_CURRENCY",
207
+ "INVALID_ROUTING_NUMBER",
208
+ "INVALID_SORT_CODE",
209
+ "NO_ACCOUNT",
210
+ "TECHNICAL_ERROR"
211
+ ]).describe("Why the bank rail rejected the transfer.").optional()
212
+ }).describe(
213
+ "Set only when `status` is `FAILED`. Indicates why the bank rail rejected the transfer.\nThe codes are a Wix Payments unified set; the original provider-specific reason is not exposed."
214
+ ).optional(),
215
+ bankTransferReference: z.string().describe(
216
+ "Reference returned by the bank rail (e.g. ACH trace number, SEPA reference) once\nthe transfer is initiated. Use it for reconciliation against the merchant's bank\nstatement. Empty when the rail has not yet returned a reference."
217
+ ).max(500).optional().nullable(),
218
+ cashAdvanceIncluded: z.boolean().describe(
219
+ "`true` if the payout's `amount` includes funds that originate from a Wix Capital\nadvance the merchant has taken out. `false` if the amount is composed only of\nregular sales proceeds."
220
+ ).optional()
221
+ });
222
+ // Annotate the CommonJS export names for ESM import in node:
223
+ 0 && (module.exports = {
224
+ GetPayoutRequest,
225
+ GetPayoutResponse,
226
+ ListPayoutsRequest,
227
+ ListPayoutsResponse
228
+ });
229
+ //# sourceMappingURL=schemas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../schemas.ts","../../src/payments-payouts-v4-payout-payouts.schemas.ts"],"sourcesContent":["export * from './src/payments-payouts-v4-payout-payouts.schemas.js';\n","import * as z from 'zod';\n\nexport const ListPayoutsRequest = z.object({\n accountId: z\n .string()\n .describe('ID of the Wix Payments account whose payouts to list.')\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 'Optional. When omitted, payouts across all profiles of the account are returned.\\nWhen set, only payouts belonging to the specified account profile are returned.'\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 'Optional. Returns only payouts created before this timestamp.'\n )\n .optional()\n .nullable(),\n createdAfter: z\n .date()\n .describe(\n 'Optional. Returns only payouts created after this timestamp.'\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 })\n .describe(\n 'Optional. Sorting. Only `created_date` is supported; requests sorting by any other field are rejected with INVALID_ARGUMENT.'\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('Optional paging. Offset-based.')\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('Unique identifier of the payout. Immutable.')\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('ID of the Wix Payments account that owns this payout.')\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 this payout belongs to.\\nA Wix Payments account has one or more profiles; each profile has its own\\nbalance and its own payouts. Most merchants have a single profile.'\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 the payout was created, in advance of the underlying transfer being\\ninitiated at the bank rail. Once initiated, the funds typically reach the\\nmerchant's bank account within 3-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(\n \"Amount of funds transferred to the merchant's bank account.\"\n )\n .optional(),\n status: z\n .enum(['UNKNOWN', 'SENT', 'FAILED'])\n .describe(\n 'Lifecycle status of the payout. `SENT` means the bank rail accepted the transfer\\nfor delivery; `FAILED` means the receiving bank rejected the transfer. The rail\\ndoes not provide a delivery acknowledgement, so `SENT` is not the same as\\n\"delivered to the merchant\" — see the per-value documentation on `PayoutStatus`.'\n )\n .optional(),\n estimatedArrivalDateV2: z\n .string()\n .describe(\n \"Estimated date for when the funds should arrive at the merchant's bank, returned\\nby the underlying bank rail when available. This is a prediction, not a guarantee —\\nactual arrival depends 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 'Set only when `status` is `FAILED`. Indicates why the bank rail rejected the transfer.\\nThe codes are a Wix Payments unified set; the original provider-specific reason is not exposed.'\n )\n .optional(),\n bankTransferReference: z\n .string()\n .describe(\n \"Reference returned by the bank rail (e.g. ACH trace number, SEPA reference) once\\nthe transfer is initiated. Use it for reconciliation against the merchant's bank\\nstatement. Empty when the rail has not yet returned a reference.\"\n )\n .max(500)\n .optional()\n .nullable(),\n cashAdvanceIncluded: z\n .boolean()\n .describe(\n \"`true` if the payout's `amount` includes funds that originate from a Wix Capital\\nadvance the merchant has taken out. `false` if the amount is composed only of\\nregular 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('ID of the Wix Payments account the payout belongs to.')\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('Unique identifier of the payout. Immutable.')\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('ID of the Wix Payments account that owns this payout.')\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 this payout belongs to.\\nA Wix Payments account has one or more profiles; each profile has its own\\nbalance and its own payouts. Most merchants have a single profile.'\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 the payout was created, in advance of the underlying transfer being\\ninitiated at the bank rail. Once initiated, the funds typically reach the\\nmerchant's bank account within 3-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 funds transferred to the merchant's bank account.\")\n .optional(),\n status: z\n .enum(['UNKNOWN', 'SENT', 'FAILED'])\n .describe(\n 'Lifecycle status of the payout. `SENT` means the bank rail accepted the transfer\\nfor delivery; `FAILED` means the receiving bank rejected the transfer. The rail\\ndoes not provide a delivery acknowledgement, so `SENT` is not the same as\\n\"delivered to the merchant\" — see the per-value documentation on `PayoutStatus`.'\n )\n .optional(),\n estimatedArrivalDateV2: z\n .string()\n .describe(\n \"Estimated date for when the funds should arrive at the merchant's bank, returned\\nby the underlying bank rail when available. This is a prediction, not a guarantee —\\nactual arrival depends 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 'Set only when `status` is `FAILED`. Indicates why the bank rail rejected the transfer.\\nThe codes are a Wix Payments unified set; the original provider-specific reason is not exposed.'\n )\n .optional(),\n bankTransferReference: z\n .string()\n .describe(\n \"Reference returned by the bank rail (e.g. ACH trace number, SEPA reference) once\\nthe transfer is initiated. Use it for reconciliation against the merchant's bank\\nstatement. Empty when the rail has not yet returned a reference.\"\n )\n .max(500)\n .optional()\n .nullable(),\n cashAdvanceIncluded: z\n .boolean()\n .describe(\n \"`true` if the payout's `amount` includes funds that originate from a Wix Capital\\nadvance the merchant has taken out. `false` if the amount is composed only of\\nregular sales proceeds.\"\n )\n .optional(),\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,QAAmB;AAEZ,IAAM,qBAAuB,SAAO;AAAA,EACzC,WACG,SAAO,EACP,SAAS,uDAAuD,EAChE;AAAA,IACC;AAAA,IACA;AAAA,EACF;AAAA,EACF,SACG,SAAO;AAAA,IACN,kBACG,S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AC,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":[]}
@@ -0,0 +1,44 @@
1
+ import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
2
+ import { ListPayoutsOptions, ListPayoutsResponse, Payout, PayoutCreatedEnvelope, PayoutUpdatedEnvelope } from './index.typings.mjs';
3
+ export { AccountInfo, AccountInfoMetadata, ActionEvent, BaseEventMetadata, CreatePayoutRequest, CreatePayoutResponse, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, GetPayoutGroupByPayoutIdRequest, GetPayoutGroupByPayoutIdResponse, GetPayoutGroupRequest, GetPayoutGroupResponse, GetPayoutRequest, GetPayoutResponse, IdentificationData, IdentificationDataIdOneOf, ListPayoutGroupsRequest, ListPayoutGroupsResponse, ListPayoutsRequest, MessageEnvelope, Money, Paging, PagingMetadata, PayoutFailureCode, PayoutFailureCodeWithLiterals, PayoutFailureReason, PayoutGroup, PayoutStatus, PayoutStatusWithLiterals, RestoreInfo, SortOrder, SortOrderWithLiterals, Sorting, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.mjs';
4
+
5
+ declare function listPayouts$1(httpClient: HttpClient): ListPayoutsSignature;
6
+ interface ListPayoutsSignature {
7
+ /**
8
+ * Retrieves a paginated list of payouts for the specified Wix Payments account,
9
+ * with optional filters by profile and creation date.
10
+ * @param - ID of the Wix Payments account whose payouts to list.
11
+ */
12
+ (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>>;
13
+ }
14
+ declare function getPayout$1(httpClient: HttpClient): GetPayoutSignature;
15
+ interface GetPayoutSignature {
16
+ /**
17
+ * Retrieves a single payout by id.
18
+ * @param - ID of the payout to retrieve.
19
+ * @param - ID of the Wix Payments account the payout belongs to.
20
+ * @returns Payout.
21
+ */
22
+ (payoutId: string, accountId: string): Promise<NonNullablePaths<Payout, `_id` | `accountId` | `accountProfileId` | `amount.value` | `amount.currency` | `status` | `failureReason.code` | `cashAdvanceIncluded`, 3>>;
23
+ }
24
+ declare const onPayoutCreated$1: EventDefinition<PayoutCreatedEnvelope, "wix.payments.payouts.v4.payout_created">;
25
+ declare const onPayoutUpdated$1: EventDefinition<PayoutUpdatedEnvelope, "wix.payments.payouts.v4.payout_updated">;
26
+
27
+ declare const listPayouts: MaybeContext<BuildRESTFunction<typeof listPayouts$1> & typeof listPayouts$1>;
28
+ declare const getPayout: MaybeContext<BuildRESTFunction<typeof getPayout$1> & typeof getPayout$1>;
29
+ /**
30
+ * Emitted once when the payout is first persisted, before the underlying transfer
31
+ * is initiated at the bank. At this point `status` is SENT and `estimated_arrival_date`
32
+ * is set if the bank rail returned one; `failure_reason` and `bank_transfer_reference`
33
+ * are not yet populated.
34
+ */
35
+ declare const onPayoutCreated: BuildEventDefinition<typeof onPayoutCreated$1> & typeof onPayoutCreated$1;
36
+ /**
37
+ * Emitted on every change to a persisted payout. Typical transitions include:
38
+ * status moving from SENT to FAILED (and the corresponding `failure_reason` being set),
39
+ * `estimated_arrival_date` being updated by the bank rail, and `bank_transfer_reference`
40
+ * being populated once the rail returns it.
41
+ */
42
+ declare const onPayoutUpdated: BuildEventDefinition<typeof onPayoutUpdated$1> & typeof onPayoutUpdated$1;
43
+
44
+ export { ListPayoutsOptions, ListPayoutsResponse, Payout, PayoutCreatedEnvelope, PayoutUpdatedEnvelope, getPayout, listPayouts, onPayoutCreated, onPayoutUpdated };