@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,44 @@
1
+ import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
2
+ import { ListPayoutsOptions, ListPayoutsResponse, Payout, PayoutCreatedEnvelope, PayoutUpdatedEnvelope } from './index.typings.js';
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.js';
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 };
@@ -0,0 +1,397 @@
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_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
47
+ var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
48
+ var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
49
+ var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
50
+ function resolveWixPaymentsV4PayoutsPayoutsServiceUrl(opts) {
51
+ const domainToMappings = {
52
+ "api._api_base_domain_": [
53
+ {
54
+ srcPath: "/wixpay-payout",
55
+ destPath: ""
56
+ }
57
+ ],
58
+ "manage._base_domain_": [
59
+ {
60
+ srcPath: "/_api/wixpay-payout/v4/payout-groups",
61
+ destPath: "/v4/payout-groups"
62
+ },
63
+ {
64
+ srcPath: "/_api/wixpay-payout/v4/payouts",
65
+ destPath: "/v4/payouts"
66
+ }
67
+ ],
68
+ "bo._base_domain_": [
69
+ {
70
+ srcPath: "/_api/wixpay-payout/v4/payouts",
71
+ destPath: "/v4/payouts"
72
+ },
73
+ {
74
+ srcPath: "/_api/wixpay-payout/v4/payout-groups",
75
+ destPath: "/v4/payout-groups"
76
+ },
77
+ {
78
+ srcPath: "/_api/wixpay-payout/v4/bo-payouts",
79
+ destPath: "/v4/bo-payouts"
80
+ },
81
+ {
82
+ srcPath: "/_api/wixpay-payout/v4/bo-payout-policies",
83
+ destPath: "/v4/bo-payout-policies"
84
+ }
85
+ ],
86
+ "wixbo.ai": [
87
+ {
88
+ srcPath: "/_api/wixpay-payout/v4/payouts",
89
+ destPath: "/v4/payouts"
90
+ },
91
+ {
92
+ srcPath: "/_api/wixpay-payout/v4/payout-groups",
93
+ destPath: "/v4/payout-groups"
94
+ },
95
+ {
96
+ srcPath: "/_api/wixpay-payout/v4/bo-payouts",
97
+ destPath: "/v4/bo-payouts"
98
+ },
99
+ {
100
+ srcPath: "/_api/wixpay-payout/v4/bo-payout-policies",
101
+ destPath: "/v4/bo-payout-policies"
102
+ }
103
+ ],
104
+ "wix-bo.com": [
105
+ {
106
+ srcPath: "/_api/wixpay-payout/v4/payouts",
107
+ destPath: "/v4/payouts"
108
+ },
109
+ {
110
+ srcPath: "/_api/wixpay-payout/v4/payout-groups",
111
+ destPath: "/v4/payout-groups"
112
+ },
113
+ {
114
+ srcPath: "/_api/wixpay-payout/v4/bo-payouts",
115
+ destPath: "/v4/bo-payouts"
116
+ },
117
+ {
118
+ srcPath: "/_api/wixpay-payout/v4/bo-payout-policies",
119
+ destPath: "/v4/bo-payout-policies"
120
+ }
121
+ ],
122
+ "payment-webhooks.wixapps.net": [
123
+ {
124
+ srcPath: "/wix-payments/payout-callbacks/stripe",
125
+ destPath: "/payout-callbacks/stripe"
126
+ },
127
+ {
128
+ srcPath: "/wix-payments/payout-callbacks/adyen",
129
+ destPath: "/payout-callbacks/adyen"
130
+ },
131
+ {
132
+ srcPath: "/wix-payments/payout-callbacks/stone",
133
+ destPath: "/payout-callbacks/stone"
134
+ },
135
+ {
136
+ srcPath: "/wix-payments/payout-callbacks/paypal",
137
+ destPath: "/payout-callbacks/paypal"
138
+ }
139
+ ],
140
+ "cronulla-jobs._base_domain_": [
141
+ {
142
+ srcPath: "/wix-payments/wixpay-payout/internal-api/jobs",
143
+ destPath: "/internal-api/jobs"
144
+ }
145
+ ],
146
+ "manage.base44.com": [
147
+ {
148
+ srcPath: "/_api/wixpay-payout",
149
+ destPath: ""
150
+ }
151
+ ],
152
+ "payments.base44.com": [
153
+ {
154
+ srcPath: "/_api/wixpay-payout",
155
+ destPath: ""
156
+ }
157
+ ],
158
+ "www.wixapis.com": [
159
+ {
160
+ srcPath: "/wixpay-payouts/v4/payouts",
161
+ destPath: "/v4/payouts"
162
+ }
163
+ ]
164
+ };
165
+ return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
166
+ }
167
+ var PACKAGE_NAME = "@wix/auto_sdk_payments_payouts";
168
+ function listPayouts(payload) {
169
+ function __listPayouts({ host }) {
170
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
171
+ {
172
+ transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
173
+ paths: [{ path: "createdBefore" }, { path: "createdAfter" }]
174
+ }
175
+ ]);
176
+ const metadata = {
177
+ entityFqdn: "wix.payments.payouts.v4.payout",
178
+ method: "GET",
179
+ methodFqn: "wix.payments.v4.payouts.PayoutsService.ListPayouts",
180
+ packageName: PACKAGE_NAME,
181
+ migrationOptions: {
182
+ optInTransformResponse: true
183
+ },
184
+ url: resolveWixPaymentsV4PayoutsPayoutsServiceUrl({
185
+ protoPath: "/v4/payouts",
186
+ data: serializedData,
187
+ host
188
+ }),
189
+ params: (0, import_rest_modules.toURLSearchParams)(serializedData, true),
190
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
191
+ {
192
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
193
+ paths: [{ path: "payouts.createdDate" }]
194
+ }
195
+ ])
196
+ };
197
+ return metadata;
198
+ }
199
+ return __listPayouts;
200
+ }
201
+ function getPayout(payload) {
202
+ function __getPayout({ host }) {
203
+ const metadata = {
204
+ entityFqdn: "wix.payments.payouts.v4.payout",
205
+ method: "GET",
206
+ methodFqn: "wix.payments.v4.payouts.PayoutsService.GetPayout",
207
+ packageName: PACKAGE_NAME,
208
+ migrationOptions: {
209
+ optInTransformResponse: true
210
+ },
211
+ url: resolveWixPaymentsV4PayoutsPayoutsServiceUrl({
212
+ protoPath: "/v4/payouts/{payoutId}",
213
+ data: payload,
214
+ host
215
+ }),
216
+ params: (0, import_rest_modules.toURLSearchParams)(payload),
217
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
218
+ {
219
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
220
+ paths: [{ path: "payout.createdDate" }]
221
+ }
222
+ ])
223
+ };
224
+ return metadata;
225
+ }
226
+ return __getPayout;
227
+ }
228
+
229
+ // src/payments-payouts-v4-payout-payouts.universal.ts
230
+ var PayoutStatus = /* @__PURE__ */ ((PayoutStatus2) => {
231
+ PayoutStatus2["UNKNOWN"] = "UNKNOWN";
232
+ PayoutStatus2["SENT"] = "SENT";
233
+ PayoutStatus2["FAILED"] = "FAILED";
234
+ return PayoutStatus2;
235
+ })(PayoutStatus || {});
236
+ var PayoutFailureCode = /* @__PURE__ */ ((PayoutFailureCode2) => {
237
+ PayoutFailureCode2["GENERIC_PAYOUT_FAILURE"] = "GENERIC_PAYOUT_FAILURE";
238
+ PayoutFailureCode2["ACCOUNT_CLOSED"] = "ACCOUNT_CLOSED";
239
+ PayoutFailureCode2["ACCOUNT_FROZEN"] = "ACCOUNT_FROZEN";
240
+ PayoutFailureCode2["BANK_ACCOUNT_RESTRICTED"] = "BANK_ACCOUNT_RESTRICTED";
241
+ PayoutFailureCode2["BANK_OWNERSHIP_CHANGED"] = "BANK_OWNERSHIP_CHANGED";
242
+ PayoutFailureCode2["COULD_NOT_PROCESS"] = "COULD_NOT_PROCESS";
243
+ PayoutFailureCode2["DEBIT_NOT_AUTHORIZED"] = "DEBIT_NOT_AUTHORIZED";
244
+ PayoutFailureCode2["INCORRECT_ACCOUNT_HOLDER_NAME"] = "INCORRECT_ACCOUNT_HOLDER_NAME";
245
+ PayoutFailureCode2["INVALID_ACCOUNT_DETAILS_CITY"] = "INVALID_ACCOUNT_DETAILS_CITY";
246
+ PayoutFailureCode2["INVALID_ACCOUNT_NUMBER"] = "INVALID_ACCOUNT_NUMBER";
247
+ PayoutFailureCode2["INVALID_CURRENCY"] = "INVALID_CURRENCY";
248
+ PayoutFailureCode2["INVALID_ROUTING_NUMBER"] = "INVALID_ROUTING_NUMBER";
249
+ PayoutFailureCode2["INVALID_SORT_CODE"] = "INVALID_SORT_CODE";
250
+ PayoutFailureCode2["NO_ACCOUNT"] = "NO_ACCOUNT";
251
+ PayoutFailureCode2["TECHNICAL_ERROR"] = "TECHNICAL_ERROR";
252
+ return PayoutFailureCode2;
253
+ })(PayoutFailureCode || {});
254
+ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
255
+ SortOrder2["ASC"] = "ASC";
256
+ SortOrder2["DESC"] = "DESC";
257
+ return SortOrder2;
258
+ })(SortOrder || {});
259
+ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
260
+ WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
261
+ WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
262
+ WebhookIdentityType2["MEMBER"] = "MEMBER";
263
+ WebhookIdentityType2["WIX_USER"] = "WIX_USER";
264
+ WebhookIdentityType2["APP"] = "APP";
265
+ return WebhookIdentityType2;
266
+ })(WebhookIdentityType || {});
267
+ async function listPayouts2(accountId, options) {
268
+ const { httpClient, sideEffects } = arguments[2];
269
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
270
+ accountId,
271
+ accountProfileId: options?.accountProfileId,
272
+ createdBefore: options?.createdBefore,
273
+ createdAfter: options?.createdAfter,
274
+ sort: options?.sort,
275
+ paging: options?.paging
276
+ });
277
+ const reqOpts = listPayouts(payload);
278
+ sideEffects?.onSiteCall?.();
279
+ try {
280
+ const result = await httpClient.request(reqOpts);
281
+ sideEffects?.onSuccess?.(result);
282
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
283
+ } catch (err) {
284
+ const transformedError = (0, import_transform_error.transformError)(
285
+ err,
286
+ {
287
+ spreadPathsToArguments: {},
288
+ explicitPathsToArguments: {
289
+ accountId: "$[0]",
290
+ accountProfileId: "$[1].accountProfileId",
291
+ createdBefore: "$[1].createdBefore",
292
+ createdAfter: "$[1].createdAfter",
293
+ sort: "$[1].sort",
294
+ paging: "$[1].paging"
295
+ },
296
+ singleArgumentUnchanged: false
297
+ },
298
+ ["accountId", "options"]
299
+ );
300
+ sideEffects?.onError?.(err);
301
+ throw transformedError;
302
+ }
303
+ }
304
+ async function getPayout2(payoutId, accountId) {
305
+ const { httpClient, sideEffects } = arguments[2];
306
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
307
+ payoutId,
308
+ accountId
309
+ });
310
+ const reqOpts = getPayout(payload);
311
+ sideEffects?.onSiteCall?.();
312
+ try {
313
+ const result = await httpClient.request(reqOpts);
314
+ sideEffects?.onSuccess?.(result);
315
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data)?.payout;
316
+ } catch (err) {
317
+ const transformedError = (0, import_transform_error.transformError)(
318
+ err,
319
+ {
320
+ spreadPathsToArguments: {},
321
+ explicitPathsToArguments: { payoutId: "$[0]", accountId: "$[1]" },
322
+ singleArgumentUnchanged: false
323
+ },
324
+ ["payoutId", "accountId"]
325
+ );
326
+ sideEffects?.onError?.(err);
327
+ throw transformedError;
328
+ }
329
+ }
330
+
331
+ // src/payments-payouts-v4-payout-payouts.public.ts
332
+ function listPayouts3(httpClient) {
333
+ return (accountId, options) => listPayouts2(
334
+ accountId,
335
+ options,
336
+ // @ts-ignore
337
+ { httpClient }
338
+ );
339
+ }
340
+ function getPayout3(httpClient) {
341
+ return (payoutId, accountId) => getPayout2(
342
+ payoutId,
343
+ accountId,
344
+ // @ts-ignore
345
+ { httpClient }
346
+ );
347
+ }
348
+ var onPayoutCreated = (0, import_sdk_types.EventDefinition)(
349
+ "wix.payments.payouts.v4.payout_created",
350
+ true,
351
+ (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
352
+ (0, import_transform_paths2.transformPaths)(event, [
353
+ {
354
+ transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
355
+ paths: [
356
+ { path: "entity.createdDate" },
357
+ { path: "metadata.eventTime" }
358
+ ]
359
+ }
360
+ ])
361
+ )
362
+ )();
363
+ var onPayoutUpdated = (0, import_sdk_types.EventDefinition)(
364
+ "wix.payments.payouts.v4.payout_updated",
365
+ true,
366
+ (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
367
+ (0, import_transform_paths2.transformPaths)(event, [
368
+ {
369
+ transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
370
+ paths: [
371
+ { path: "entity.createdDate" },
372
+ { path: "metadata.eventTime" }
373
+ ]
374
+ }
375
+ ])
376
+ )
377
+ )();
378
+
379
+ // src/payments-payouts-v4-payout-payouts.context.ts
380
+ var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
381
+ var import_event_definition_modules = require("@wix/sdk-runtime/event-definition-modules");
382
+ var listPayouts4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(listPayouts3);
383
+ var getPayout4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getPayout3);
384
+ var onPayoutCreated2 = (0, import_event_definition_modules.createEventModule)(onPayoutCreated);
385
+ var onPayoutUpdated2 = (0, import_event_definition_modules.createEventModule)(onPayoutUpdated);
386
+ // Annotate the CommonJS export names for ESM import in node:
387
+ 0 && (module.exports = {
388
+ PayoutFailureCode,
389
+ PayoutStatus,
390
+ SortOrder,
391
+ WebhookIdentityType,
392
+ getPayout,
393
+ listPayouts,
394
+ onPayoutCreated,
395
+ onPayoutUpdated
396
+ });
397
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../index.ts","../../src/payments-payouts-v4-payout-payouts.public.ts","../../src/payments-payouts-v4-payout-payouts.universal.ts","../../src/payments-payouts-v4-payout-payouts.http.ts","../../src/payments-payouts-v4-payout-payouts.context.ts"],"sourcesContent":["export * from './src/payments-payouts-v4-payout-payouts.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n ListPayoutsOptions,\n ListPayoutsResponse,\n Payout,\n PayoutCreatedEnvelope,\n PayoutUpdatedEnvelope,\n getPayout as universalGetPayout,\n listPayouts as universalListPayouts,\n} from './payments-payouts-v4-payout-payouts.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/payments' };\n\nexport function listPayouts(httpClient: HttpClient): ListPayoutsSignature {\n return (accountId: string, options?: ListPayoutsOptions) =>\n universalListPayouts(\n accountId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListPayoutsSignature {\n /**\n * Retrieves a paginated list of payouts for the specified Wix Payments account,\n * with optional filters by profile and creation date.\n * @param - ID of the Wix Payments account whose payouts to list.\n */\n (accountId: string, options?: ListPayoutsOptions): Promise<\n NonNullablePaths<\n ListPayoutsResponse,\n | `payouts`\n | `payouts.${number}._id`\n | `payouts.${number}.accountId`\n | `payouts.${number}.accountProfileId`\n | `payouts.${number}.amount.value`\n | `payouts.${number}.amount.currency`\n | `payouts.${number}.status`\n | `payouts.${number}.failureReason.code`\n | `payouts.${number}.cashAdvanceIncluded`,\n 5\n >\n >;\n}\n\nexport function getPayout(httpClient: HttpClient): GetPayoutSignature {\n return (payoutId: string, accountId: string) =>\n universalGetPayout(\n payoutId,\n accountId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetPayoutSignature {\n /**\n * Retrieves a single payout by id.\n * @param - ID of the payout to retrieve.\n * @param - ID of the Wix Payments account the payout belongs to.\n * @returns Payout.\n */\n (payoutId: string, accountId: string): Promise<\n NonNullablePaths<\n Payout,\n | `_id`\n | `accountId`\n | `accountProfileId`\n | `amount.value`\n | `amount.currency`\n | `status`\n | `failureReason.code`\n | `cashAdvanceIncluded`,\n 3\n >\n >;\n}\n\nexport const onPayoutCreated = EventDefinition(\n 'wix.payments.payouts.v4.payout_created',\n true,\n (event: PayoutCreatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<PayoutCreatedEnvelope>();\nexport const onPayoutUpdated = EventDefinition(\n 'wix.payments.payouts.v4.payout_updated',\n true,\n (event: PayoutUpdatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<PayoutUpdatedEnvelope>();\n\nexport {\n AccountInfo,\n AccountInfoMetadata,\n ActionEvent,\n BaseEventMetadata,\n CreatePayoutRequest,\n CreatePayoutResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n GetPayoutGroupByPayoutIdRequest,\n GetPayoutGroupByPayoutIdResponse,\n GetPayoutGroupRequest,\n GetPayoutGroupResponse,\n GetPayoutRequest,\n GetPayoutResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n ListPayoutGroupsRequest,\n ListPayoutGroupsResponse,\n ListPayoutsOptions,\n ListPayoutsRequest,\n ListPayoutsResponse,\n MessageEnvelope,\n Money,\n Paging,\n PagingMetadata,\n Payout,\n PayoutCreatedEnvelope,\n PayoutFailureCode,\n PayoutFailureReason,\n PayoutGroup,\n PayoutStatus,\n PayoutUpdatedEnvelope,\n RestoreInfo,\n SortOrder,\n Sorting,\n WebhookIdentityType,\n} from './payments-payouts-v4-payout-payouts.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixPaymentsPayoutsV4Payout from './payments-payouts-v4-payout-payouts.http.js';\n\n/**\n * A payout is one outgoing transfer of funds from a Wix Payments merchant account\n * to the merchant's bank account. The entity carries the amount, lifecycle status,\n * estimated arrival date, and (when applicable) failure information.\n */\nexport interface Payout {\n /**\n * Unique identifier of the payout. Immutable.\n * @format GUID\n */\n _id?: string;\n /**\n * ID of the Wix Payments account that owns this payout.\n * @format GUID\n */\n accountId?: string;\n /**\n * ID of the Wix Payments account profile this payout belongs to.\n * A Wix Payments account has one or more profiles; each profile has its own\n * balance and its own payouts. Most merchants have a single profile.\n * @format GUID\n */\n accountProfileId?: string;\n /**\n * Date the payout was created, in advance of the underlying transfer being\n * initiated at the bank rail. Once initiated, the funds typically reach the\n * merchant's bank account within 3-5 business days, depending on the receiving bank.\n */\n _createdDate?: Date | null;\n /** Amount of funds transferred to the merchant's bank account. */\n amount?: Money;\n /**\n * Lifecycle status of the payout. `SENT` means the bank rail accepted the transfer\n * for delivery; `FAILED` means the receiving bank rejected the transfer. The rail\n * does 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 status?: PayoutStatusWithLiterals;\n /**\n * Estimated date for when the funds should arrive at the merchant's bank, returned\n * by the underlying bank rail when available. This is a prediction, not a guarantee —\n * actual arrival depends on the receiving bank's processing and may be later.\n * @format LOCAL_DATE\n */\n estimatedArrivalDateV2?: string | null;\n /**\n * Set only when `status` is `FAILED`. Indicates why the bank rail rejected the transfer.\n * The codes are a Wix Payments unified set; the original provider-specific reason is not exposed.\n */\n failureReason?: PayoutFailureReason;\n /**\n * Reference returned by the bank rail (e.g. ACH trace number, SEPA reference) once\n * the transfer is initiated. Use it for reconciliation against the merchant's bank\n * statement. Empty when the rail has not yet returned a reference.\n * @maxLength 500\n */\n bankTransferReference?: string | null;\n /**\n * `true` if the payout's `amount` includes funds that originate from a Wix Capital\n * advance the merchant has taken out. `false` if the amount is composed only of\n * regular sales proceeds.\n */\n cashAdvanceIncluded?: boolean;\n}\n\n/**\n * Money.\n * Default format to use. Sufficiently compliant with majority of standards: w3c, ISO 4217, ISO 20022, ISO 8583:2003.\n */\nexport interface Money {\n /**\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 * @format DECIMAL_VALUE\n */\n value?: string;\n /**\n * Currency code. Must be valid ISO 4217 currency code (e.g., USD).\n * @format CURRENCY\n */\n currency?: string;\n /** Monetary amount. Decimal string in local format (e.g., 1 000,30). Optionally, a single (-), to indicate that the amount is negative. */\n formattedValue?: string | null;\n}\n\n/** Lifecycle status of a payout. */\nexport enum PayoutStatus {\n /** Default value. Not returned by the API. */\n UNKNOWN = 'UNKNOWN',\n /**\n * The bank rail accepted the transfer. Funds are en route to the merchant's bank,\n * but acceptance is not the same as delivery — a `SENT` payout can still flip to\n * `FAILED` if the receiving bank rejects the transfer (the rail's return window\n * is up to 60 days for ACH and up to 13 months for SEPA).\n */\n SENT = 'SENT',\n /**\n * The transfer was rejected by the receiving bank. See `failure_reason` for the cause;\n * the funds remain in the merchant's Wix Payments balance.\n */\n FAILED = 'FAILED',\n}\n\n/** @enumType */\nexport type PayoutStatusWithLiterals =\n | PayoutStatus\n | 'UNKNOWN'\n | 'SENT'\n | 'FAILED';\n\n/**\n * Carries the reason a payout failed. Wraps the `PayoutFailureCode` enum to leave room\n * for future fields (e.g. a human-readable message); new clients should still read\n * `failure_reason.code` for the enum value.\n */\nexport interface PayoutFailureReason {\n /** Why the bank rail rejected the transfer. */\n code?: PayoutFailureCodeWithLiterals;\n}\n\n/**\n * Reasons a payout can fail. Values describe real-world bank-rail conditions and\n * are mapped from the underlying provider into a Wix Payments unified vocabulary.\n */\nexport enum PayoutFailureCode {\n /**\n * Generic failure with no more specific reason available from the bank rail.\n * Note: this value is also returned when no failure reason is known — clients\n * cannot distinguish \"unknown\" from \"generic\" using this code alone.\n */\n GENERIC_PAYOUT_FAILURE = 'GENERIC_PAYOUT_FAILURE',\n /**\n * The merchant's bank account is closed. The merchant must provide new bank\n * account details before further payouts can succeed.\n */\n ACCOUNT_CLOSED = 'ACCOUNT_CLOSED',\n /**\n * The merchant's bank account is frozen (e.g. due to a hold placed by the bank).\n * The merchant must resolve the hold with their bank before further payouts can succeed.\n */\n ACCOUNT_FROZEN = 'ACCOUNT_FROZEN',\n /**\n * The merchant's bank account is restricted from receiving the transfer\n * (e.g. account type or status does not permit incoming credits).\n */\n BANK_ACCOUNT_RESTRICTED = 'BANK_ACCOUNT_RESTRICTED',\n /**\n * Ownership of the merchant's bank account changed and the rail no longer\n * recognises the previously-recorded owner. New bank details are required.\n */\n BANK_OWNERSHIP_CHANGED = 'BANK_OWNERSHIP_CHANGED',\n /**\n * The receiving bank could not process the transfer for an unspecified reason.\n * A subsequent payout attempt may succeed.\n */\n COULD_NOT_PROCESS = 'COULD_NOT_PROCESS',\n /**\n * The merchant's bank declined the debit authorisation associated with the transfer.\n * The merchant must contact their bank to authorise Wix Payments payouts.\n */\n DEBIT_NOT_AUTHORIZED = 'DEBIT_NOT_AUTHORIZED',\n /**\n * The account holder name on file does not match what the receiving bank has on record.\n * The merchant must correct the account holder name.\n */\n INCORRECT_ACCOUNT_HOLDER_NAME = 'INCORRECT_ACCOUNT_HOLDER_NAME',\n /** The city in the bank account details is invalid for the receiving bank. */\n INVALID_ACCOUNT_DETAILS_CITY = 'INVALID_ACCOUNT_DETAILS_CITY',\n /** The bank account number is invalid (wrong format or does not exist). */\n INVALID_ACCOUNT_NUMBER = 'INVALID_ACCOUNT_NUMBER',\n /** The payout currency is not supported by the receiving bank account. */\n INVALID_CURRENCY = 'INVALID_CURRENCY',\n /** The routing number (US) is invalid or does not match the receiving bank. */\n INVALID_ROUTING_NUMBER = 'INVALID_ROUTING_NUMBER',\n /** The sort code (UK) is invalid or does not match the receiving bank. */\n INVALID_SORT_CODE = 'INVALID_SORT_CODE',\n /**\n * No bank account is on file for the merchant.\n * The merchant must add bank details before payouts can succeed.\n */\n NO_ACCOUNT = 'NO_ACCOUNT',\n /**\n * A technical error at the bank rail prevented the transfer.\n * A subsequent payout attempt may succeed.\n */\n TECHNICAL_ERROR = 'TECHNICAL_ERROR',\n}\n\n/** @enumType */\nexport type PayoutFailureCodeWithLiterals =\n | PayoutFailureCode\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\nexport interface ListPayoutsRequest {\n /**\n * ID of the Wix Payments account whose payouts to list.\n * @format GUID\n */\n accountId: string;\n /**\n * Optional. When omitted, payouts across all profiles of the account are returned.\n * When set, only payouts belonging to the specified account profile are returned.\n * @format GUID\n */\n accountProfileId?: string | null;\n /** Optional. Returns only payouts created before this timestamp. */\n createdBefore?: Date | null;\n /** Optional. Returns only payouts created after this timestamp. */\n createdAfter?: Date | null;\n /** Optional. Sorting. Only `created_date` is supported; requests sorting by any other field are rejected with INVALID_ARGUMENT. */\n sort?: Sorting;\n /** Optional paging. Offset-based. */\n paging?: Paging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface Paging {\n /** Number of items to load. */\n limit?: number | null;\n /** Number of items to skip in the current sort order. */\n offset?: number | null;\n}\n\nexport interface ListPayoutsResponse {\n /** List of payouts. */\n payouts?: Payout[];\n /** Paging metadata. */\n metadata?: PagingMetadata;\n}\n\nexport interface PagingMetadata {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Offset that was requested. */\n offset?: number | null;\n /** Total number of items that match the query. */\n total?: number | null;\n /** Flag that indicates the server failed to calculate the `total` field. */\n tooManyToCount?: boolean | null;\n}\n\nexport interface CreatePayoutRequest {\n /** Payout. */\n payout?: Payout;\n}\n\nexport interface CreatePayoutResponse {\n /** Payout. */\n payout?: Payout;\n}\n\nexport interface GetPayoutRequest {\n /**\n * ID of the Wix Payments account the payout belongs to.\n * @format GUID\n */\n accountId: string;\n /**\n * ID of the payout to retrieve.\n * @format GUID\n */\n payoutId: string;\n}\n\nexport interface GetPayoutResponse {\n /** Payout. */\n payout?: Payout;\n}\n\nexport interface ListPayoutGroupsRequest {\n /**\n * Wix Payments account identifier.\n * @format GUID\n */\n accountId?: string;\n /**\n * Optional filter by payout date. Use it to return payouts before specific date.\n * @format LOCAL_DATE\n */\n payoutDateBefore?: string | null;\n /**\n * Optional filter by payout date. Use it to return payouts after specific date.\n * @format LOCAL_DATE\n */\n payoutDateAfter?: string | null;\n /** Optional sorting. Supported fields: \"payout_date\". */\n sort?: Sorting;\n /** Optional paging. */\n paging?: Paging;\n}\n\nexport interface ListPayoutGroupsResponse {\n /** List of payout groups. */\n groups?: PayoutGroup[];\n /** Paging metadata. */\n metadata?: PagingMetadata;\n}\n\n/** Payout group */\nexport interface PayoutGroup {\n /**\n * Payout date.\n * @format LOCAL_DATE\n */\n payoutDate?: string;\n /**\n * Payout number within the same date, is absent if there's only one group\n * @min 1\n * @max 99\n */\n payoutNumber?: number | null;\n /** Payout group amount */\n amount?: Money;\n /**\n * Payouts associated with the group\n * @maxSize 10\n */\n payouts?: Payout[];\n}\n\nexport interface GetPayoutGroupRequest {\n /**\n * Wix Payments account identifier.\n * @format GUID\n */\n accountId?: string;\n /**\n * Payout date.\n * @format LOCAL_DATE\n */\n payoutDate?: string;\n /**\n * Optional payout number within the same date\n * @min 1\n * @max 99\n */\n payoutNumber?: number | null;\n}\n\nexport interface GetPayoutGroupResponse {\n /** Payout group. */\n group?: PayoutGroup;\n}\n\nexport interface GetPayoutGroupByPayoutIdRequest {\n /**\n * Wix Payments account identifier.\n * @format GUID\n */\n accountId?: string;\n /**\n * Payout identifier.\n * @format GUID\n */\n payoutId?: string;\n}\n\nexport interface GetPayoutGroupByPayoutIdResponse {\n /** Payout group. */\n group?: PayoutGroup;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * 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.\n * 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.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * 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.\n * 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.\n */\n entityEventSequence?: string | null;\n accountInfo?: AccountInfoMetadata;\n}\n\nexport interface AccountInfoMetadata {\n /** ID of the Wix account associated with the event */\n accountId: string;\n /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */\n siteId?: string;\n /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */\n parentAccountId?: string;\n}\n\nexport interface PayoutCreatedEnvelope {\n entity: Payout;\n metadata: EventMetadata;\n}\n\n/**\n * Emitted once when the payout is first persisted, before the underlying transfer\n * is initiated at the bank. At this point `status` is SENT and `estimated_arrival_date`\n * is set if the bank rail returned one; `failure_reason` and `bank_transfer_reference`\n * are not yet populated.\n * @permissionId PAYMENTS.PAYOUT_READ\n * @webhook\n * @eventType wix.payments.payouts.v4.payout_created\n * @serviceIdentifier wix.payments.v4.payouts.PayoutsService\n * @slug created\n * @documentationMaturity preview\n */\nexport declare function onPayoutCreated(\n handler: (event: PayoutCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface PayoutUpdatedEnvelope {\n entity: Payout;\n metadata: EventMetadata;\n}\n\n/**\n * Emitted on every change to a persisted payout. Typical transitions include:\n * status moving from SENT to FAILED (and the corresponding `failure_reason` being set),\n * `estimated_arrival_date` being updated by the bank rail, and `bank_transfer_reference`\n * being populated once the rail returns it.\n * @permissionId PAYMENTS.PAYOUT_READ\n * @webhook\n * @eventType wix.payments.payouts.v4.payout_updated\n * @serviceIdentifier wix.payments.v4.payouts.PayoutsService\n * @slug updated\n * @documentationMaturity preview\n */\nexport declare function onPayoutUpdated(\n handler: (event: PayoutUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Retrieves a paginated list of payouts for the specified Wix Payments account,\n * with optional filters by profile and creation date.\n * @param accountId - ID of the Wix Payments account whose payouts to list.\n * @public\n * @documentationMaturity preview\n * @requiredField accountId\n * @permissionId PAYMENTS.PAYOUT_READ\n * @fqn wix.payments.v4.payouts.PayoutsService.ListPayouts\n */\nexport async function listPayouts(\n accountId: string,\n options?: ListPayoutsOptions\n): Promise<\n NonNullablePaths<\n ListPayoutsResponse,\n | `payouts`\n | `payouts.${number}._id`\n | `payouts.${number}.accountId`\n | `payouts.${number}.accountProfileId`\n | `payouts.${number}.amount.value`\n | `payouts.${number}.amount.currency`\n | `payouts.${number}.status`\n | `payouts.${number}.failureReason.code`\n | `payouts.${number}.cashAdvanceIncluded`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n accountId: accountId,\n accountProfileId: options?.accountProfileId,\n createdBefore: options?.createdBefore,\n createdAfter: options?.createdAfter,\n sort: options?.sort,\n paging: options?.paging,\n });\n\n const reqOpts = ambassadorWixPaymentsPayoutsV4Payout.listPayouts(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n accountId: '$[0]',\n accountProfileId: '$[1].accountProfileId',\n createdBefore: '$[1].createdBefore',\n createdAfter: '$[1].createdAfter',\n sort: '$[1].sort',\n paging: '$[1].paging',\n },\n singleArgumentUnchanged: false,\n },\n ['accountId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListPayoutsOptions {\n /**\n * Optional. When omitted, payouts across all profiles of the account are returned.\n * When set, only payouts belonging to the specified account profile are returned.\n * @format GUID\n */\n accountProfileId?: string | null;\n /** Optional. Returns only payouts created before this timestamp. */\n createdBefore?: Date | null;\n /** Optional. Returns only payouts created after this timestamp. */\n createdAfter?: Date | null;\n /** Optional. Sorting. Only `created_date` is supported; requests sorting by any other field are rejected with INVALID_ARGUMENT. */\n sort?: Sorting;\n /** Optional paging. Offset-based. */\n paging?: Paging;\n}\n\n/**\n * Retrieves a single payout by id.\n * @param payoutId - ID of the payout to retrieve.\n * @param accountId - ID of the Wix Payments account the payout belongs to.\n * @public\n * @documentationMaturity preview\n * @requiredField accountId\n * @requiredField payoutId\n * @permissionId PAYMENTS.PAYOUT_READ\n * @returns Payout.\n * @fqn wix.payments.v4.payouts.PayoutsService.GetPayout\n */\nexport async function getPayout(\n payoutId: string,\n accountId: string\n): Promise<\n NonNullablePaths<\n Payout,\n | `_id`\n | `accountId`\n | `accountProfileId`\n | `amount.value`\n | `amount.currency`\n | `status`\n | `failureReason.code`\n | `cashAdvanceIncluded`,\n 3\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n payoutId: payoutId,\n accountId: accountId,\n });\n\n const reqOpts = ambassadorWixPaymentsPayoutsV4Payout.getPayout(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.payout!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { payoutId: '$[0]', accountId: '$[1]' },\n singleArgumentUnchanged: false,\n },\n ['payoutId', 'accountId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixPaymentsV4PayoutsPayoutsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/wixpay-payout',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/wixpay-payout/v4/payout-groups',\n destPath: '/v4/payout-groups',\n },\n {\n srcPath: '/_api/wixpay-payout/v4/payouts',\n destPath: '/v4/payouts',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/wixpay-payout/v4/payouts',\n destPath: '/v4/payouts',\n },\n {\n srcPath: '/_api/wixpay-payout/v4/payout-groups',\n destPath: '/v4/payout-groups',\n },\n {\n srcPath: '/_api/wixpay-payout/v4/bo-payouts',\n destPath: '/v4/bo-payouts',\n },\n {\n srcPath: '/_api/wixpay-payout/v4/bo-payout-policies',\n destPath: '/v4/bo-payout-policies',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/wixpay-payout/v4/payouts',\n destPath: '/v4/payouts',\n },\n {\n srcPath: '/_api/wixpay-payout/v4/payout-groups',\n destPath: '/v4/payout-groups',\n },\n {\n srcPath: '/_api/wixpay-payout/v4/bo-payouts',\n destPath: '/v4/bo-payouts',\n },\n {\n srcPath: '/_api/wixpay-payout/v4/bo-payout-policies',\n destPath: '/v4/bo-payout-policies',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/wixpay-payout/v4/payouts',\n destPath: '/v4/payouts',\n },\n {\n srcPath: '/_api/wixpay-payout/v4/payout-groups',\n destPath: '/v4/payout-groups',\n },\n {\n srcPath: '/_api/wixpay-payout/v4/bo-payouts',\n destPath: '/v4/bo-payouts',\n },\n {\n srcPath: '/_api/wixpay-payout/v4/bo-payout-policies',\n destPath: '/v4/bo-payout-policies',\n },\n ],\n 'payment-webhooks.wixapps.net': [\n {\n srcPath: '/wix-payments/payout-callbacks/stripe',\n destPath: '/payout-callbacks/stripe',\n },\n {\n srcPath: '/wix-payments/payout-callbacks/adyen',\n destPath: '/payout-callbacks/adyen',\n },\n {\n srcPath: '/wix-payments/payout-callbacks/stone',\n destPath: '/payout-callbacks/stone',\n },\n {\n srcPath: '/wix-payments/payout-callbacks/paypal',\n destPath: '/payout-callbacks/paypal',\n },\n ],\n 'cronulla-jobs._base_domain_': [\n {\n srcPath: '/wix-payments/wixpay-payout/internal-api/jobs',\n destPath: '/internal-api/jobs',\n },\n ],\n 'manage.base44.com': [\n {\n srcPath: '/_api/wixpay-payout',\n destPath: '',\n },\n ],\n 'payments.base44.com': [\n {\n srcPath: '/_api/wixpay-payout',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/wixpay-payouts/v4/payouts',\n destPath: '/v4/payouts',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_payments_payouts';\n\n/**\n * Retrieves a paginated list of payouts for the specified Wix Payments account,\n * with optional filters by profile and creation date.\n */\nexport function listPayouts(payload: object): RequestOptionsFactory<any> {\n function __listPayouts({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'createdBefore' }, { path: 'createdAfter' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.payments.payouts.v4.payout',\n method: 'GET' as any,\n methodFqn: 'wix.payments.v4.payouts.PayoutsService.ListPayouts',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsV4PayoutsPayoutsServiceUrl({\n protoPath: '/v4/payouts',\n data: serializedData,\n host,\n }),\n params: toURLSearchParams(serializedData, true),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'payouts.createdDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listPayouts;\n}\n\n/** Retrieves a single payout by id. */\nexport function getPayout(payload: object): RequestOptionsFactory<any> {\n function __getPayout({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.payouts.v4.payout',\n method: 'GET' as any,\n methodFqn: 'wix.payments.v4.payouts.PayoutsService.GetPayout',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsV4PayoutsPayoutsServiceUrl({\n protoPath: '/v4/payouts/{payoutId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'payout.createdDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getPayout;\n}\n","import {\n listPayouts as publicListPayouts,\n getPayout as publicGetPayout,\n} from './payments-payouts-v4-payout-payouts.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { onPayoutCreated as publicOnPayoutCreated } from './payments-payouts-v4-payout-payouts.public.js';\nimport { onPayoutUpdated as publicOnPayoutUpdated } from './payments-payouts-v4-payout-payouts.public.js';\n\nexport const listPayouts: MaybeContext<\n BuildRESTFunction<typeof publicListPayouts> & typeof publicListPayouts\n> = /*#__PURE__*/ createRESTModule(publicListPayouts);\nexport const getPayout: MaybeContext<\n BuildRESTFunction<typeof publicGetPayout> & typeof publicGetPayout\n> = /*#__PURE__*/ createRESTModule(publicGetPayout);\n/**\n * Emitted once when the payout is first persisted, before the underlying transfer\n * is initiated at the bank. At this point `status` is SENT and `estimated_arrival_date`\n * is set if the bank rail returned one; `failure_reason` and `bank_transfer_reference`\n * are not yet populated.\n */\nexport const onPayoutCreated: BuildEventDefinition<\n typeof publicOnPayoutCreated\n> &\n typeof publicOnPayoutCreated = createEventModule(publicOnPayoutCreated);\n/**\n * Emitted on every change to a persisted payout. Typical transitions include:\n * status moving from SENT to FAILED (and the corresponding `failure_reason` being set),\n * `estimated_arrival_date` being updated by the bank rail, and `bank_transfer_reference`\n * being populated once the rail returns it.\n */\nexport const onPayoutUpdated: BuildEventDefinition<\n typeof publicOnPayoutUpdated\n> &\n typeof publicOnPayoutUpdated = createEventModule(publicOnPayoutUpdated);\n\nexport {\n PayoutStatus,\n PayoutFailureCode,\n SortOrder,\n WebhookIdentityType,\n} from './payments-payouts-v4-payout-payouts.universal.js';\nexport {\n Payout,\n Money,\n PayoutFailureReason,\n ListPayoutsRequest,\n Sorting,\n Paging,\n ListPayoutsResponse,\n PagingMetadata,\n CreatePayoutRequest,\n CreatePayoutResponse,\n GetPayoutRequest,\n GetPayoutResponse,\n ListPayoutGroupsRequest,\n ListPayoutGroupsResponse,\n PayoutGroup,\n GetPayoutGroupRequest,\n GetPayoutGroupResponse,\n GetPayoutGroupByPayoutIdRequest,\n GetPayoutGroupByPayoutIdResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountInfo,\n BaseEventMetadata,\n EventMetadata,\n AccountInfoMetadata,\n PayoutCreatedEnvelope,\n PayoutUpdatedEnvelope,\n ListPayoutsOptions,\n} from './payments-payouts-v4-payout-payouts.universal.js';\nexport {\n PayoutStatusWithLiterals,\n PayoutFailureCodeWithLiterals,\n SortOrderWithLiterals,\n WebhookIdentityTypeWithLiterals,\n} from './payments-payouts-v4-payout-payouts.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAAA;AAAA,EAAA,mBAAAC;AAAA,EAAA,uBAAAC;AAAA,EAAA,uBAAAC;AAAA;AAAA;;;ACAA,IAAAC,iCAAwD;AACxD,IAAAC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AA,UACL,EAAE,MAAM,qBAAqB;AAAA,UAC7B,EAAE,MAAM,qBAAqB;AAAA,QAC/B;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH;AACJ,EAAyB;;;AG7GzB,IAAAC,uBAAiC;AACjC,sCAAkC;AAS3B,IAAMC,eAEK,2DAAiBA,YAAiB;AAC7C,IAAMC,aAEK,2DAAiBA,UAAe;AAO3C,IAAMC,uBAGoB,mDAAkB,eAAqB;AAOjE,IAAMC,uBAGoB,mDAAkB,eAAqB;","names":["getPayout","listPayouts","onPayoutCreated","onPayoutUpdated","import_rename_all_nested_keys","import_timestamp","import_transform_paths","import_timestamp","import_rest_modules","payload","PayoutStatus","PayoutFailureCode","SortOrder","WebhookIdentityType","listPayouts","sdkTransformError","getPayout","listPayouts","getPayout","import_rest_modules","listPayouts","getPayout","onPayoutCreated","onPayoutUpdated"]}