@wix/auto_sdk_payments_payouts 1.0.5 → 1.0.7
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 +18 -16
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.js +10 -12
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.js +10 -12
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.mjs +18 -16
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.mjs +10 -12
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.mjs +10 -12
- 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 -417
- package/build/internal/cjs/index.js.map +0 -1
- package/build/internal/cjs/index.typings.js +0 -351
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/meta.js +0 -322
- 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 -386
- package/build/internal/es/index.mjs.map +0 -1
- package/build/internal/es/index.typings.mjs +0 -322
- package/build/internal/es/index.typings.mjs.map +0 -1
- package/build/internal/es/meta.mjs +0 -290
- 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/cjs/index.js
CHANGED
|
@@ -144,18 +144,6 @@ function resolveWixPaymentsV4PayoutsPayoutsServiceUrl(opts) {
|
|
|
144
144
|
destPath: "/internal-api/jobs"
|
|
145
145
|
}
|
|
146
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
147
|
"www.wixapis.com": [
|
|
160
148
|
{
|
|
161
149
|
srcPath: "/wixpay-payouts/v4/payouts",
|
|
@@ -173,6 +161,16 @@ function resolveWixPaymentsV4PayoutsPayoutsServiceUrl(opts) {
|
|
|
173
161
|
srcPath: "/payments/payouts/v4/payouts",
|
|
174
162
|
destPath: "/v4/payouts"
|
|
175
163
|
}
|
|
164
|
+
],
|
|
165
|
+
"payments.base44.com": [
|
|
166
|
+
{
|
|
167
|
+
srcPath: "/_api/wixpay-payout/v4/payouts",
|
|
168
|
+
destPath: "/v4/payouts"
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
srcPath: "/_api/wixpay-payout/v4/payout-groups",
|
|
172
|
+
destPath: "/v4/payout-groups"
|
|
173
|
+
}
|
|
176
174
|
]
|
|
177
175
|
};
|
|
178
176
|
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
@@ -365,7 +363,7 @@ function getPayout3(httpClient) {
|
|
|
365
363
|
{ httpClient }
|
|
366
364
|
);
|
|
367
365
|
}
|
|
368
|
-
var onPayoutCreated = (0, import_sdk_types.EventDefinition)(
|
|
366
|
+
var onPayoutCreated = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)(
|
|
369
367
|
"wix.payments.payouts.v4.payout_created",
|
|
370
368
|
true,
|
|
371
369
|
(event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
|
|
@@ -380,7 +378,7 @@ var onPayoutCreated = (0, import_sdk_types.EventDefinition)(
|
|
|
380
378
|
])
|
|
381
379
|
)
|
|
382
380
|
)();
|
|
383
|
-
var onPayoutUpdated = (0, import_sdk_types.EventDefinition)(
|
|
381
|
+
var onPayoutUpdated = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)(
|
|
384
382
|
"wix.payments.payouts.v4.payout_updated",
|
|
385
383
|
true,
|
|
386
384
|
(event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
|
|
@@ -401,8 +399,12 @@ var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
|
|
|
401
399
|
var import_event_definition_modules = require("@wix/sdk-runtime/event-definition-modules");
|
|
402
400
|
var listPayouts4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(listPayouts3);
|
|
403
401
|
var getPayout4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getPayout3);
|
|
404
|
-
var onPayoutCreated2 = (0, import_event_definition_modules.createEventModule)(
|
|
405
|
-
|
|
402
|
+
var onPayoutCreated2 = /* @__PURE__ */ (0, import_event_definition_modules.createEventModule)(
|
|
403
|
+
onPayoutCreated
|
|
404
|
+
);
|
|
405
|
+
var onPayoutUpdated2 = /* @__PURE__ */ (0, import_event_definition_modules.createEventModule)(
|
|
406
|
+
onPayoutUpdated
|
|
407
|
+
);
|
|
406
408
|
// Annotate the CommonJS export names for ESM import in node:
|
|
407
409
|
0 && (module.exports = {
|
|
408
410
|
PayoutFailureCode,
|
package/build/cjs/index.js.map
CHANGED
|
@@ -1 +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 *\n * Supports optional filters by account profile and by creation date range.\n * A newly created payout can take a short time to appear in the results.\n *\n * Calls are limited to 100 requests per 10 seconds per caller. Requests\n * over the limit fail with a `RESOURCE_EXHAUSTED` error and the message\n * `The request was throttled`.\n * @param - ID of the Wix Payments account whose payouts to list. Retrieve account\n * IDs from the Accounts API.\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 *\n * Calls are limited to 100 requests per 10 seconds per caller. Requests\n * over the limit fail with a `RESOURCE_EXHAUSTED` error and the message\n * `The request was throttled`.\n * @param - ID of the payout to retrieve.\n * @param - ID of the Wix Payments account that owns the payout. The payout must\n * belong to this account. Retrieve account IDs from the Accounts API.\n * @returns Retrieved 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 AddressLocation,\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 an outgoing transfer of funds from a Wix Payments account to the\n * merchant's bank account. Each payout has an amount, a lifecycle status, an\n * estimated arrival date, and (when applicable) a failure reason.\n */\nexport interface Payout {\n /**\n * Payout ID.\n * @format GUID\n */\n _id?: string;\n /**\n * ID of the Wix Payments account that owns the payout. Retrieve account IDs\n * from the Accounts API.\n * @format GUID\n */\n accountId?: string;\n /**\n * ID of the Wix Payments account profile that owns the payout.\n *\n * A Wix Payments account has 1 or more profiles. Each profile has its own\n * balance and its own payouts. Most merchants have 1 profile. Retrieve\n * profile IDs from the Accounts API.\n * @format GUID\n */\n accountProfileId?: string;\n /**\n * Date and time the payout was created.\n *\n * The payout is created before the underlying transfer is initiated at the\n * bank. Once initiated, the funds typically reach the merchant's bank account\n * within 3 to 5 business days, depending on the receiving bank.\n */\n _createdDate?: Date | null;\n /** Amount of the transfer to the merchant's bank account. */\n amount?: Money;\n /**\n * Lifecycle status of the payout.\n *\n * `SENT` means the bank rail accepted the transfer for delivery. `FAILED` means\n * the receiving bank rejected the transfer.\n *\n * A `SENT` status doesn't guarantee that the funds were delivered to the\n * merchant. The bank rail doesn't provide a delivery acknowledgement, and a\n * payout in `SENT` can later transition to `FAILED` if the receiving bank\n * rejects the transfer. See the per-value documentation on `PayoutStatus` for\n * details.\n */\n status?: PayoutStatusWithLiterals;\n /**\n * Estimated date for when the funds should arrive at the merchant's bank\n * account, in `YYYY-MM-DD` format.\n *\n * The estimated arrival date is a prediction, not a guarantee. Actual arrival\n * depends on the receiving bank's processing and may be later.\n * @format LOCAL_DATE\n */\n estimatedArrivalDateV2?: string | null;\n /**\n * Reason the bank rail rejected the transfer.\n *\n * Returned only when `status` is `FAILED`.\n */\n failureReason?: PayoutFailureReason;\n /**\n * Reference returned by the bank rail once the transfer is initiated. For\n * example, an ACH trace number or a SEPA reference. Use this value to\n * reconcile against the merchant's bank statement.\n *\n * Empty until the bank rail returns a reference.\n * @maxLength 500\n */\n bankTransferReference?: string | null;\n /**\n * Whether the payout `amount` includes funds from a Wix Capital cash advance\n * taken out by the merchant. If `false`, the amount comes only from the\n * merchant's 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 /** Unknown payout status. Not returned by the API. */\n UNKNOWN = 'UNKNOWN',\n /**\n * The bank rail accepted the transfer. Funds are en route to the merchant's\n * bank account.\n *\n * Acceptance isn't the same as delivery. A `SENT` payout can still\n * transition to `FAILED` if the receiving bank rejects the transfer. The\n * bank rail's return window is up to 60 days for ACH and up to 13 months\n * for SEPA.\n */\n SENT = 'SENT',\n /**\n * The bank rail rejected the transfer. See `failureReason` 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/** Reason a payout failed. */\nexport interface PayoutFailureReason {\n /** Why the bank rail rejected the transfer. */\n code?: PayoutFailureCodeWithLiterals;\n}\n\n/**\n * Possible reasons for a payout failure. Each value describes a real-world\n * bank-rail condition.\n */\nexport enum PayoutFailureCode {\n /**\n * Generic failure with no more specific reason available from the bank\n * rail. This value is also returned when no failure reason is known.\n * Clients can't 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\n * bank account details before further payouts can succeed.\n */\n ACCOUNT_CLOSED = 'ACCOUNT_CLOSED',\n /**\n * The merchant's bank account is frozen, for example due to a hold placed\n * by the bank. The merchant must resolve the hold with their bank before\n * further payouts can succeed.\n */\n ACCOUNT_FROZEN = 'ACCOUNT_FROZEN',\n /**\n * The merchant's bank account is restricted from receiving the transfer.\n * For example, the account type or status doesn't 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 couldn't process the transfer for an unspecified\n * reason. 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\n * transfer. The merchant must contact their bank to authorise Wix Payments\n * payouts.\n */\n DEBIT_NOT_AUTHORIZED = 'DEBIT_NOT_AUTHORIZED',\n /**\n * The account holder name on file doesn't match the name the receiving\n * bank has on record. 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 /**\n * The bank account number is invalid. The format is wrong or the account\n * doesn't exist.\n */\n INVALID_ACCOUNT_NUMBER = 'INVALID_ACCOUNT_NUMBER',\n /** The payout currency isn't supported by the receiving bank account. */\n INVALID_CURRENCY = 'INVALID_CURRENCY',\n /** The routing number (US) is invalid or doesn't match the receiving bank. */\n INVALID_ROUTING_NUMBER = 'INVALID_ROUTING_NUMBER',\n /** The sort code (UK) is invalid or doesn't match the receiving bank. */\n INVALID_SORT_CODE = 'INVALID_SORT_CODE',\n /**\n * No bank account is on file for the merchant. The merchant must add bank\n * details before payouts can succeed.\n */\n NO_ACCOUNT = 'NO_ACCOUNT',\n /**\n * A technical error at the bank rail prevented the transfer. A subsequent\n * 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. Retrieve account\n * IDs from the Accounts API.\n * @format GUID\n */\n accountId: string;\n /**\n * ID of the Wix Payments account profile to filter by.\n *\n * When omitted, payouts across all profiles of the account are returned.\n * Retrieve profile IDs from the Accounts API.\n * @format GUID\n */\n accountProfileId?: string | null;\n /**\n * Returns only payouts created before this date and time. The date and time\n * itself is excluded.\n */\n createdBefore?: Date | null;\n /**\n * Returns only payouts created on or after this date and time. The date and\n * time itself is included.\n */\n createdAfter?: Date | null;\n /**\n * Sort order for the result list.\n *\n * Supported `fieldName` values: `created_date` (snake_case, not auto-converted). At most 1 sort field is allowed.\n */\n sort?: Sorting;\n /**\n * Offset-based paging. `limit` supports values from `1` to `20`.\n *\n * Default: `limit` is `20`, `offset` is `0`.\n */\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 * Origin point for geo-distance sorting on a GEO field\n * results are ordered by distance from this point (ASC = nearest first, DESC = farthest first).\n */\n origin?: AddressLocation;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface AddressLocation {\n /** Address latitude. */\n latitude?: number | null;\n /** Address longitude. */\n longitude?: number | null;\n}\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 retrieved 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 to create. */\n payout?: Payout;\n}\n\nexport interface CreatePayoutResponse {\n /** Created payout. */\n payout?: Payout;\n}\n\nexport interface GetPayoutRequest {\n /**\n * ID of the Wix Payments account that owns the payout. The payout must\n * belong to this account. Retrieve account IDs from the Accounts API.\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 /** Retrieved payout. */\n payout?: Payout;\n}\n\nexport interface ListPayoutGroupsRequest {\n /**\n * ID of the Wix Payments account whose payout groups to list. Retrieve\n * account IDs from the Accounts API.\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 * ID of the Wix Payments account that owns the payout group. Retrieve\n * account IDs from the Accounts API.\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 * ID of the Wix Payments account that owns the payout. Retrieve account IDs\n * from the Accounts API.\n * @format GUID\n */\n accountId?: string;\n /**\n * ID of the payout whose group to retrieve.\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 * Triggered when a payout is created.\n *\n * The payout is created before the underlying transfer is initiated at the\n * bank. At this point `status` is `SENT` and `estimatedArrivalDateV2` is set\n * if the bank rail returned one. `failureReason` and `bankTransferReference`\n * are not yet populated.\n * @permissionScope View settlement reports and payouts\n * @permissionScopeId SCOPE.PAYMENTS.PAYOUTS-VIEW-FOR-SITE\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 * Triggered when a payout is updated.\n *\n * Typical updates include `status` transitioning from `SENT` to `FAILED`\n * (with `failureReason` being set), `estimatedArrivalDateV2` being refined by\n * the bank rail, and `bankTransferReference` being populated once the rail\n * returns it.\n * @permissionScope View settlement reports and payouts\n * @permissionScopeId SCOPE.PAYMENTS.PAYOUTS-VIEW-FOR-SITE\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 *\n * Supports optional filters by account profile and by creation date range.\n * A newly created payout can take a short time to appear in the results.\n *\n * Calls are limited to 100 requests per 10 seconds per caller. Requests\n * over the limit fail with a `RESOURCE_EXHAUSTED` error and the message\n * `The request was throttled`.\n * @param accountId - ID of the Wix Payments account whose payouts to list. Retrieve account\n * IDs from the Accounts API.\n * @public\n * @documentationMaturity preview\n * @requiredField accountId\n * @permissionId PAYMENTS.PAYOUT_READ\n * @applicableIdentity APP\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 * ID of the Wix Payments account profile to filter by.\n *\n * When omitted, payouts across all profiles of the account are returned.\n * Retrieve profile IDs from the Accounts API.\n * @format GUID\n */\n accountProfileId?: string | null;\n /**\n * Returns only payouts created before this date and time. The date and time\n * itself is excluded.\n */\n createdBefore?: Date | null;\n /**\n * Returns only payouts created on or after this date and time. The date and\n * time itself is included.\n */\n createdAfter?: Date | null;\n /**\n * Sort order for the result list.\n *\n * Supported `fieldName` values: `created_date` (snake_case, not auto-converted). At most 1 sort field is allowed.\n */\n sort?: Sorting;\n /**\n * Offset-based paging. `limit` supports values from `1` to `20`.\n *\n * Default: `limit` is `20`, `offset` is `0`.\n */\n paging?: Paging;\n}\n\n/**\n * Retrieves a single payout by ID.\n *\n * Calls are limited to 100 requests per 10 seconds per caller. Requests\n * over the limit fail with a `RESOURCE_EXHAUSTED` error and the message\n * `The request was throttled`.\n * @param payoutId - ID of the payout to retrieve.\n * @param accountId - ID of the Wix Payments account that owns the payout. The payout must\n * belong to this account. Retrieve account IDs from the Accounts API.\n * @public\n * @documentationMaturity preview\n * @requiredField accountId\n * @requiredField payoutId\n * @permissionId PAYMENTS.PAYOUT_READ\n * @applicableIdentity APP\n * @returns Retrieved 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 { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\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 '*.dev.wix-code.com': [\n {\n srcPath: '/payments/payouts/v4/payouts',\n destPath: '/v4/payouts',\n },\n ],\n _: [\n {\n srcPath: '/payments/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 *\n * Supports optional filters by account profile and by creation date range.\n * A newly created payout can take a short time to appear in the results.\n *\n * Calls are limited to 100 requests per 10 seconds per caller. Requests\n * over the limit fail with a `RESOURCE_EXHAUSTED` error and the message\n * `The request was throttled`.\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 transformFn: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'sort.origin.latitude' },\n { path: 'sort.origin.longitude' },\n ],\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/**\n * Retrieves a single payout by ID.\n *\n * Calls are limited to 100 requests per 10 seconds per caller. Requests\n * over the limit fail with a `RESOURCE_EXHAUSTED` error and the message\n * `The request was throttled`.\n */\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 * Triggered when a payout is created.\n *\n * The payout is created before the underlying transfer is initiated at the\n * bank. At this point `status` is `SENT` and `estimatedArrivalDateV2` is set\n * if the bank rail returned one. `failureReason` and `bankTransferReference`\n * are not yet populated.\n */\nexport const onPayoutCreated: BuildEventDefinition<\n typeof publicOnPayoutCreated\n> &\n typeof publicOnPayoutCreated = createEventModule(publicOnPayoutCreated);\n/**\n * Triggered when a payout is updated.\n *\n * Typical updates include `status` transitioning from `SENT` to `FAILED`\n * (with `failureReason` being set), `estimatedArrivalDateV2` being refined by\n * the bank rail, and `bankTransferReference` being populated once the rail\n * 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 AddressLocation,\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,oBAAqD;AACrD,IAAAC,0BAA+B;AAC/B,uBAA8D;;;ACH9D,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,mBAA6C;AAC7C,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,6CACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SA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EAAE,MAAM,qBAAqB;AAAA,QAC/B;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH;AACJ,EAAyB;;;AGzHzB,IAAAC,uBAAiC;AACjC,sCAAkC;AAS3B,IAAMC,eAEK,2DAAiBA,YAAiB;AAC7C,IAAMC,aAEK,2DAAiBA,UAAe;AAS3C,IAAMC,uBAGoB,mDAAkB,eAAqB;AASjE,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"]}
|
|
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 *\n * Supports optional filters by account profile and by creation date range.\n * A newly created payout can take a short time to appear in the results.\n *\n * Calls are limited to 100 requests per 10 seconds per caller. Requests\n * over the limit fail with a `RESOURCE_EXHAUSTED` error and the message\n * `The request was throttled`.\n * @param - ID of the Wix Payments account whose payouts to list. Retrieve account\n * IDs from the Accounts API.\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 *\n * Calls are limited to 100 requests per 10 seconds per caller. Requests\n * over the limit fail with a `RESOURCE_EXHAUSTED` error and the message\n * `The request was throttled`.\n * @param - ID of the payout to retrieve.\n * @param - ID of the Wix Payments account that owns the payout. The payout must\n * belong to this account. Retrieve account IDs from the Accounts API.\n * @returns Retrieved 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 = /*#__PURE__*/ 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 = /*#__PURE__*/ 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 AddressLocation,\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 an outgoing transfer of funds from a Wix Payments account to the\n * merchant's bank account. Each payout has an amount, a lifecycle status, an\n * estimated arrival date, and (when applicable) a failure reason.\n */\nexport interface Payout {\n /**\n * Payout ID.\n * @format GUID\n */\n _id?: string;\n /**\n * ID of the Wix Payments account that owns the payout. Retrieve account IDs\n * from the Accounts API.\n * @format GUID\n */\n accountId?: string;\n /**\n * ID of the Wix Payments account profile that owns the payout.\n *\n * A Wix Payments account has 1 or more profiles. Each profile has its own\n * balance and its own payouts. Most merchants have 1 profile. Retrieve\n * profile IDs from the Accounts API.\n * @format GUID\n */\n accountProfileId?: string;\n /**\n * Date and time the payout was created.\n *\n * The payout is created before the underlying transfer is initiated at the\n * bank. Once initiated, the funds typically reach the merchant's bank account\n * within 3 to 5 business days, depending on the receiving bank.\n */\n _createdDate?: Date | null;\n /** Amount of the transfer to the merchant's bank account. */\n amount?: Money;\n /**\n * Lifecycle status of the payout.\n *\n * `SENT` means the bank rail accepted the transfer for delivery. `FAILED` means\n * the receiving bank rejected the transfer.\n *\n * A `SENT` status doesn't guarantee that the funds were delivered to the\n * merchant. The bank rail doesn't provide a delivery acknowledgement, and a\n * payout in `SENT` can later transition to `FAILED` if the receiving bank\n * rejects the transfer. See the per-value documentation on `PayoutStatus` for\n * details.\n */\n status?: PayoutStatusWithLiterals;\n /**\n * Estimated date for when the funds should arrive at the merchant's bank\n * account, in `YYYY-MM-DD` format.\n *\n * The estimated arrival date is a prediction, not a guarantee. Actual arrival\n * depends on the receiving bank's processing and may be later.\n * @format LOCAL_DATE\n */\n estimatedArrivalDateV2?: string | null;\n /**\n * Reason the bank rail rejected the transfer.\n *\n * Returned only when `status` is `FAILED`.\n */\n failureReason?: PayoutFailureReason;\n /**\n * Reference returned by the bank rail once the transfer is initiated. For\n * example, an ACH trace number or a SEPA reference. Use this value to\n * reconcile against the merchant's bank statement.\n *\n * Empty until the bank rail returns a reference.\n * @maxLength 500\n */\n bankTransferReference?: string | null;\n /**\n * Whether the payout `amount` includes funds from a Wix Capital cash advance\n * taken out by the merchant. If `false`, the amount comes only from the\n * merchant's 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 /** Unknown payout status. Not returned by the API. */\n UNKNOWN = 'UNKNOWN',\n /**\n * The bank rail accepted the transfer. Funds are en route to the merchant's\n * bank account.\n *\n * Acceptance isn't the same as delivery. A `SENT` payout can still\n * transition to `FAILED` if the receiving bank rejects the transfer. The\n * bank rail's return window is up to 60 days for ACH and up to 13 months\n * for SEPA.\n */\n SENT = 'SENT',\n /**\n * The bank rail rejected the transfer. See `failureReason` 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/** Reason a payout failed. */\nexport interface PayoutFailureReason {\n /** Why the bank rail rejected the transfer. */\n code?: PayoutFailureCodeWithLiterals;\n}\n\n/**\n * Possible reasons for a payout failure. Each value describes a real-world\n * bank-rail condition.\n */\nexport enum PayoutFailureCode {\n /**\n * Generic failure with no more specific reason available from the bank\n * rail. This value is also returned when no failure reason is known.\n * Clients can't 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\n * bank account details before further payouts can succeed.\n */\n ACCOUNT_CLOSED = 'ACCOUNT_CLOSED',\n /**\n * The merchant's bank account is frozen, for example due to a hold placed\n * by the bank. The merchant must resolve the hold with their bank before\n * further payouts can succeed.\n */\n ACCOUNT_FROZEN = 'ACCOUNT_FROZEN',\n /**\n * The merchant's bank account is restricted from receiving the transfer.\n * For example, the account type or status doesn't 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 couldn't process the transfer for an unspecified\n * reason. 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\n * transfer. The merchant must contact their bank to authorise Wix Payments\n * payouts.\n */\n DEBIT_NOT_AUTHORIZED = 'DEBIT_NOT_AUTHORIZED',\n /**\n * The account holder name on file doesn't match the name the receiving\n * bank has on record. 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 /**\n * The bank account number is invalid. The format is wrong or the account\n * doesn't exist.\n */\n INVALID_ACCOUNT_NUMBER = 'INVALID_ACCOUNT_NUMBER',\n /** The payout currency isn't supported by the receiving bank account. */\n INVALID_CURRENCY = 'INVALID_CURRENCY',\n /** The routing number (US) is invalid or doesn't match the receiving bank. */\n INVALID_ROUTING_NUMBER = 'INVALID_ROUTING_NUMBER',\n /** The sort code (UK) is invalid or doesn't match the receiving bank. */\n INVALID_SORT_CODE = 'INVALID_SORT_CODE',\n /**\n * No bank account is on file for the merchant. The merchant must add bank\n * details before payouts can succeed.\n */\n NO_ACCOUNT = 'NO_ACCOUNT',\n /**\n * A technical error at the bank rail prevented the transfer. A subsequent\n * 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. Retrieve account\n * IDs from the Accounts API.\n * @format GUID\n */\n accountId: string;\n /**\n * ID of the Wix Payments account profile to filter by.\n *\n * When omitted, payouts across all profiles of the account are returned.\n * Retrieve profile IDs from the Accounts API.\n * @format GUID\n */\n accountProfileId?: string | null;\n /**\n * Returns only payouts created before this date and time. The date and time\n * itself is excluded.\n */\n createdBefore?: Date | null;\n /**\n * Returns only payouts created on or after this date and time. The date and\n * time itself is included.\n */\n createdAfter?: Date | null;\n /**\n * Sort order for the result list.\n *\n * Supported `fieldName` values: `created_date` (snake_case, not auto-converted). At most 1 sort field is allowed.\n */\n sort?: Sorting;\n /**\n * Offset-based paging. `limit` supports values from `1` to `20`.\n *\n * Default: `limit` is `20`, `offset` is `0`.\n */\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 * When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by\n * a specific element from a collection, filter can/should be provided to ensure correct sort value is picked.\n *\n * If multiple filters are provided, they are combined with AND operator.\n *\n * Example:\n * Given we have document like {\"id\": \"1\", \"nestedField\": [{\"price\": 10, \"region\": \"EU\"}, {\"price\": 20, \"region\": \"US\"}]}\n * and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be\n * { fieldName: \"nestedField.price\", \"select_items_by\": [{\"nestedField.region\": \"US\"}] }\n * @internal\n * @maxSize 10\n */\n selectItemsBy?: Record<string, any>[] | null;\n /**\n * Origin point for geo-distance sorting on a GEO field\n * results are ordered by distance from this point (ASC = nearest first, DESC = farthest first).\n */\n origin?: AddressLocation;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface AddressLocation {\n /** Address latitude. */\n latitude?: number | null;\n /** Address longitude. */\n longitude?: number | null;\n}\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 retrieved 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 * Indicates if there are more results after the current page.\n * If `true`, another page of results can be retrieved.\n * If `false`, this is the last page.\n * @internal\n */\n hasNext?: boolean | null;\n}\n\nexport interface CreatePayoutRequest {\n /** Payout to create. */\n payout?: Payout;\n}\n\nexport interface CreatePayoutResponse {\n /** Created payout. */\n payout?: Payout;\n}\n\nexport interface GetPayoutRequest {\n /**\n * ID of the Wix Payments account that owns the payout. The payout must\n * belong to this account. Retrieve account IDs from the Accounts API.\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 /** Retrieved payout. */\n payout?: Payout;\n}\n\nexport interface ListPayoutGroupsRequest {\n /**\n * ID of the Wix Payments account whose payout groups to list. Retrieve\n * account IDs from the Accounts API.\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 * ID of the Wix Payments account that owns the payout group. Retrieve\n * account IDs from the Accounts API.\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 * ID of the Wix Payments account that owns the payout. Retrieve account IDs\n * from the Accounts API.\n * @format GUID\n */\n accountId?: string;\n /**\n * ID of the payout whose group to retrieve.\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 * Triggered when a payout is created.\n *\n * The payout is created before the underlying transfer is initiated at the\n * bank. At this point `status` is `SENT` and `estimatedArrivalDateV2` is set\n * if the bank rail returned one. `failureReason` and `bankTransferReference`\n * are not yet populated.\n * @permissionScope View settlement reports and payouts\n * @permissionScopeId SCOPE.PAYMENTS.PAYOUTS-VIEW-FOR-SITE\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 * Triggered when a payout is updated.\n *\n * Typical updates include `status` transitioning from `SENT` to `FAILED`\n * (with `failureReason` being set), `estimatedArrivalDateV2` being refined by\n * the bank rail, and `bankTransferReference` being populated once the rail\n * returns it.\n * @permissionScope View settlement reports and payouts\n * @permissionScopeId SCOPE.PAYMENTS.PAYOUTS-VIEW-FOR-SITE\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 *\n * Supports optional filters by account profile and by creation date range.\n * A newly created payout can take a short time to appear in the results.\n *\n * Calls are limited to 100 requests per 10 seconds per caller. Requests\n * over the limit fail with a `RESOURCE_EXHAUSTED` error and the message\n * `The request was throttled`.\n * @param accountId - ID of the Wix Payments account whose payouts to list. Retrieve account\n * IDs from the Accounts API.\n * @public\n * @documentationMaturity preview\n * @requiredField accountId\n * @permissionId PAYMENTS.PAYOUT_READ\n * @applicableIdentity APP\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 * ID of the Wix Payments account profile to filter by.\n *\n * When omitted, payouts across all profiles of the account are returned.\n * Retrieve profile IDs from the Accounts API.\n * @format GUID\n */\n accountProfileId?: string | null;\n /**\n * Returns only payouts created before this date and time. The date and time\n * itself is excluded.\n */\n createdBefore?: Date | null;\n /**\n * Returns only payouts created on or after this date and time. The date and\n * time itself is included.\n */\n createdAfter?: Date | null;\n /**\n * Sort order for the result list.\n *\n * Supported `fieldName` values: `created_date` (snake_case, not auto-converted). At most 1 sort field is allowed.\n */\n sort?: Sorting;\n /**\n * Offset-based paging. `limit` supports values from `1` to `20`.\n *\n * Default: `limit` is `20`, `offset` is `0`.\n */\n paging?: Paging;\n}\n\n/**\n * Retrieves a single payout by ID.\n *\n * Calls are limited to 100 requests per 10 seconds per caller. Requests\n * over the limit fail with a `RESOURCE_EXHAUSTED` error and the message\n * `The request was throttled`.\n * @param payoutId - ID of the payout to retrieve.\n * @param accountId - ID of the Wix Payments account that owns the payout. The payout must\n * belong to this account. Retrieve account IDs from the Accounts API.\n * @public\n * @documentationMaturity preview\n * @requiredField accountId\n * @requiredField payoutId\n * @permissionId PAYMENTS.PAYOUT_READ\n * @applicableIdentity APP\n * @returns Retrieved 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 { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\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 'www.wixapis.com': [\n {\n srcPath: '/wixpay-payouts/v4/payouts',\n destPath: '/v4/payouts',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/payments/payouts/v4/payouts',\n destPath: '/v4/payouts',\n },\n ],\n _: [\n {\n srcPath: '/payments/payouts/v4/payouts',\n destPath: '/v4/payouts',\n },\n ],\n 'payments.base44.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 };\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 *\n * Supports optional filters by account profile and by creation date range.\n * A newly created payout can take a short time to appear in the results.\n *\n * Calls are limited to 100 requests per 10 seconds per caller. Requests\n * over the limit fail with a `RESOURCE_EXHAUSTED` error and the message\n * `The request was throttled`.\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 transformFn: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'sort.origin.latitude' },\n { path: 'sort.origin.longitude' },\n ],\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/**\n * Retrieves a single payout by ID.\n *\n * Calls are limited to 100 requests per 10 seconds per caller. Requests\n * over the limit fail with a `RESOURCE_EXHAUSTED` error and the message\n * `The request was throttled`.\n */\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 * Triggered when a payout is created.\n *\n * The payout is created before the underlying transfer is initiated at the\n * bank. At this point `status` is `SENT` and `estimatedArrivalDateV2` is set\n * if the bank rail returned one. `failureReason` and `bankTransferReference`\n * are not yet populated.\n */\nexport const onPayoutCreated: BuildEventDefinition<\n typeof publicOnPayoutCreated\n> &\n typeof publicOnPayoutCreated = /*#__PURE__*/ createEventModule(\n publicOnPayoutCreated\n);\n/**\n * Triggered when a payout is updated.\n *\n * Typical updates include `status` transitioning from `SENT` to `FAILED`\n * (with `failureReason` being set), `estimatedArrivalDateV2` being refined by\n * the bank rail, and `bankTransferReference` being populated once the rail\n * returns it.\n */\nexport const onPayoutUpdated: BuildEventDefinition<\n typeof publicOnPayoutUpdated\n> &\n typeof publicOnPayoutUpdated = /*#__PURE__*/ createEventModule(\n publicOnPayoutUpdated\n);\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 AddressLocation,\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,oBAAqD;AACrD,IAAAC,0BAA+B;AAC/B,uBAA8D;;;ACH9D,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,mBAA6C;AAC7C,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,6CACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,Q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,QAC/B;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH;AACJ,EAAyB;;;AGzHzB,IAAAC,uBAAiC;AACjC,sCAAkC;AAS3B,IAAMC,eAEK,2DAAiBA,YAAiB;AAC7C,IAAMC,aAEK,2DAAiBA,UAAe;AAS3C,IAAMC,mBAGkC;AAAA,EAC7C;AACF;AASO,IAAMC,mBAGkC;AAAA,EAC7C;AACF;","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"]}
|
|
@@ -136,18 +136,6 @@ function resolveWixPaymentsV4PayoutsPayoutsServiceUrl(opts) {
|
|
|
136
136
|
destPath: "/internal-api/jobs"
|
|
137
137
|
}
|
|
138
138
|
],
|
|
139
|
-
"manage.base44.com": [
|
|
140
|
-
{
|
|
141
|
-
srcPath: "/_api/wixpay-payout",
|
|
142
|
-
destPath: ""
|
|
143
|
-
}
|
|
144
|
-
],
|
|
145
|
-
"payments.base44.com": [
|
|
146
|
-
{
|
|
147
|
-
srcPath: "/_api/wixpay-payout",
|
|
148
|
-
destPath: ""
|
|
149
|
-
}
|
|
150
|
-
],
|
|
151
139
|
"www.wixapis.com": [
|
|
152
140
|
{
|
|
153
141
|
srcPath: "/wixpay-payouts/v4/payouts",
|
|
@@ -165,6 +153,16 @@ function resolveWixPaymentsV4PayoutsPayoutsServiceUrl(opts) {
|
|
|
165
153
|
srcPath: "/payments/payouts/v4/payouts",
|
|
166
154
|
destPath: "/v4/payouts"
|
|
167
155
|
}
|
|
156
|
+
],
|
|
157
|
+
"payments.base44.com": [
|
|
158
|
+
{
|
|
159
|
+
srcPath: "/_api/wixpay-payout/v4/payouts",
|
|
160
|
+
destPath: "/v4/payouts"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
srcPath: "/_api/wixpay-payout/v4/payout-groups",
|
|
164
|
+
destPath: "/v4/payout-groups"
|
|
165
|
+
}
|
|
168
166
|
]
|
|
169
167
|
};
|
|
170
168
|
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.typings.ts","../../src/payments-payouts-v4-payout-payouts.universal.ts","../../src/payments-payouts-v4-payout-payouts.http.ts"],"sourcesContent":["export * from './src/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 an outgoing transfer of funds from a Wix Payments account to the\n * merchant's bank account. Each payout has an amount, a lifecycle status, an\n * estimated arrival date, and (when applicable) a failure reason.\n */\nexport interface Payout {\n /**\n * Payout ID.\n * @format GUID\n */\n _id?: string;\n /**\n * ID of the Wix Payments account that owns the payout. Retrieve account IDs\n * from the Accounts API.\n * @format GUID\n */\n accountId?: string;\n /**\n * ID of the Wix Payments account profile that owns the payout.\n *\n * A Wix Payments account has 1 or more profiles. Each profile has its own\n * balance and its own payouts. Most merchants have 1 profile. Retrieve\n * profile IDs from the Accounts API.\n * @format GUID\n */\n accountProfileId?: string;\n /**\n * Date and time the payout was created.\n *\n * The payout is created before the underlying transfer is initiated at the\n * bank. Once initiated, the funds typically reach the merchant's bank account\n * within 3 to 5 business days, depending on the receiving bank.\n */\n _createdDate?: Date | null;\n /** Amount of the transfer to the merchant's bank account. */\n amount?: Money;\n /**\n * Lifecycle status of the payout.\n *\n * `SENT` means the bank rail accepted the transfer for delivery. `FAILED` means\n * the receiving bank rejected the transfer.\n *\n * A `SENT` status doesn't guarantee that the funds were delivered to the\n * merchant. The bank rail doesn't provide a delivery acknowledgement, and a\n * payout in `SENT` can later transition to `FAILED` if the receiving bank\n * rejects the transfer. See the per-value documentation on `PayoutStatus` for\n * details.\n */\n status?: PayoutStatusWithLiterals;\n /**\n * Estimated date for when the funds should arrive at the merchant's bank\n * account, in `YYYY-MM-DD` format.\n *\n * The estimated arrival date is a prediction, not a guarantee. Actual arrival\n * depends on the receiving bank's processing and may be later.\n * @format LOCAL_DATE\n */\n estimatedArrivalDateV2?: string | null;\n /**\n * Reason the bank rail rejected the transfer.\n *\n * Returned only when `status` is `FAILED`.\n */\n failureReason?: PayoutFailureReason;\n /**\n * Reference returned by the bank rail once the transfer is initiated. For\n * example, an ACH trace number or a SEPA reference. Use this value to\n * reconcile against the merchant's bank statement.\n *\n * Empty until the bank rail returns a reference.\n * @maxLength 500\n */\n bankTransferReference?: string | null;\n /**\n * Whether the payout `amount` includes funds from a Wix Capital cash advance\n * taken out by the merchant. If `false`, the amount comes only from the\n * merchant's 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 /** Unknown payout status. Not returned by the API. */\n UNKNOWN = 'UNKNOWN',\n /**\n * The bank rail accepted the transfer. Funds are en route to the merchant's\n * bank account.\n *\n * Acceptance isn't the same as delivery. A `SENT` payout can still\n * transition to `FAILED` if the receiving bank rejects the transfer. The\n * bank rail's return window is up to 60 days for ACH and up to 13 months\n * for SEPA.\n */\n SENT = 'SENT',\n /**\n * The bank rail rejected the transfer. See `failureReason` 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/** Reason a payout failed. */\nexport interface PayoutFailureReason {\n /** Why the bank rail rejected the transfer. */\n code?: PayoutFailureCodeWithLiterals;\n}\n\n/**\n * Possible reasons for a payout failure. Each value describes a real-world\n * bank-rail condition.\n */\nexport enum PayoutFailureCode {\n /**\n * Generic failure with no more specific reason available from the bank\n * rail. This value is also returned when no failure reason is known.\n * Clients can't 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\n * bank account details before further payouts can succeed.\n */\n ACCOUNT_CLOSED = 'ACCOUNT_CLOSED',\n /**\n * The merchant's bank account is frozen, for example due to a hold placed\n * by the bank. The merchant must resolve the hold with their bank before\n * further payouts can succeed.\n */\n ACCOUNT_FROZEN = 'ACCOUNT_FROZEN',\n /**\n * The merchant's bank account is restricted from receiving the transfer.\n * For example, the account type or status doesn't 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 couldn't process the transfer for an unspecified\n * reason. 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\n * transfer. The merchant must contact their bank to authorise Wix Payments\n * payouts.\n */\n DEBIT_NOT_AUTHORIZED = 'DEBIT_NOT_AUTHORIZED',\n /**\n * The account holder name on file doesn't match the name the receiving\n * bank has on record. 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 /**\n * The bank account number is invalid. The format is wrong or the account\n * doesn't exist.\n */\n INVALID_ACCOUNT_NUMBER = 'INVALID_ACCOUNT_NUMBER',\n /** The payout currency isn't supported by the receiving bank account. */\n INVALID_CURRENCY = 'INVALID_CURRENCY',\n /** The routing number (US) is invalid or doesn't match the receiving bank. */\n INVALID_ROUTING_NUMBER = 'INVALID_ROUTING_NUMBER',\n /** The sort code (UK) is invalid or doesn't match the receiving bank. */\n INVALID_SORT_CODE = 'INVALID_SORT_CODE',\n /**\n * No bank account is on file for the merchant. The merchant must add bank\n * details before payouts can succeed.\n */\n NO_ACCOUNT = 'NO_ACCOUNT',\n /**\n * A technical error at the bank rail prevented the transfer. A subsequent\n * 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. Retrieve account\n * IDs from the Accounts API.\n * @format GUID\n */\n accountId: string;\n /**\n * ID of the Wix Payments account profile to filter by.\n *\n * When omitted, payouts across all profiles of the account are returned.\n * Retrieve profile IDs from the Accounts API.\n * @format GUID\n */\n accountProfileId?: string | null;\n /**\n * Returns only payouts created before this date and time. The date and time\n * itself is excluded.\n */\n createdBefore?: Date | null;\n /**\n * Returns only payouts created on or after this date and time. The date and\n * time itself is included.\n */\n createdAfter?: Date | null;\n /**\n * Sort order for the result list.\n *\n * Supported `fieldName` values: `created_date` (snake_case, not auto-converted). At most 1 sort field is allowed.\n */\n sort?: Sorting;\n /**\n * Offset-based paging. `limit` supports values from `1` to `20`.\n *\n * Default: `limit` is `20`, `offset` is `0`.\n */\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 * Origin point for geo-distance sorting on a GEO field\n * results are ordered by distance from this point (ASC = nearest first, DESC = farthest first).\n */\n origin?: AddressLocation;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface AddressLocation {\n /** Address latitude. */\n latitude?: number | null;\n /** Address longitude. */\n longitude?: number | null;\n}\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 retrieved 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 to create. */\n payout?: Payout;\n}\n\nexport interface CreatePayoutResponse {\n /** Created payout. */\n payout?: Payout;\n}\n\nexport interface GetPayoutRequest {\n /**\n * ID of the Wix Payments account that owns the payout. The payout must\n * belong to this account. Retrieve account IDs from the Accounts API.\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 /** Retrieved payout. */\n payout?: Payout;\n}\n\nexport interface ListPayoutGroupsRequest {\n /**\n * ID of the Wix Payments account whose payout groups to list. Retrieve\n * account IDs from the Accounts API.\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 * ID of the Wix Payments account that owns the payout group. Retrieve\n * account IDs from the Accounts API.\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 * ID of the Wix Payments account that owns the payout. Retrieve account IDs\n * from the Accounts API.\n * @format GUID\n */\n accountId?: string;\n /**\n * ID of the payout whose group to retrieve.\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 * Triggered when a payout is created.\n *\n * The payout is created before the underlying transfer is initiated at the\n * bank. At this point `status` is `SENT` and `estimatedArrivalDateV2` is set\n * if the bank rail returned one. `failureReason` and `bankTransferReference`\n * are not yet populated.\n * @permissionScope View settlement reports and payouts\n * @permissionScopeId SCOPE.PAYMENTS.PAYOUTS-VIEW-FOR-SITE\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 * Triggered when a payout is updated.\n *\n * Typical updates include `status` transitioning from `SENT` to `FAILED`\n * (with `failureReason` being set), `estimatedArrivalDateV2` being refined by\n * the bank rail, and `bankTransferReference` being populated once the rail\n * returns it.\n * @permissionScope View settlement reports and payouts\n * @permissionScopeId SCOPE.PAYMENTS.PAYOUTS-VIEW-FOR-SITE\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 *\n * Supports optional filters by account profile and by creation date range.\n * A newly created payout can take a short time to appear in the results.\n *\n * Calls are limited to 100 requests per 10 seconds per caller. Requests\n * over the limit fail with a `RESOURCE_EXHAUSTED` error and the message\n * `The request was throttled`.\n * @param accountId - ID of the Wix Payments account whose payouts to list. Retrieve account\n * IDs from the Accounts API.\n * @public\n * @documentationMaturity preview\n * @requiredField accountId\n * @permissionId PAYMENTS.PAYOUT_READ\n * @applicableIdentity APP\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 * ID of the Wix Payments account profile to filter by.\n *\n * When omitted, payouts across all profiles of the account are returned.\n * Retrieve profile IDs from the Accounts API.\n * @format GUID\n */\n accountProfileId?: string | null;\n /**\n * Returns only payouts created before this date and time. The date and time\n * itself is excluded.\n */\n createdBefore?: Date | null;\n /**\n * Returns only payouts created on or after this date and time. The date and\n * time itself is included.\n */\n createdAfter?: Date | null;\n /**\n * Sort order for the result list.\n *\n * Supported `fieldName` values: `created_date` (snake_case, not auto-converted). At most 1 sort field is allowed.\n */\n sort?: Sorting;\n /**\n * Offset-based paging. `limit` supports values from `1` to `20`.\n *\n * Default: `limit` is `20`, `offset` is `0`.\n */\n paging?: Paging;\n}\n\n/**\n * Retrieves a single payout by ID.\n *\n * Calls are limited to 100 requests per 10 seconds per caller. Requests\n * over the limit fail with a `RESOURCE_EXHAUSTED` error and the message\n * `The request was throttled`.\n * @param payoutId - ID of the payout to retrieve.\n * @param accountId - ID of the Wix Payments account that owns the payout. The payout must\n * belong to this account. Retrieve account IDs from the Accounts API.\n * @public\n * @documentationMaturity preview\n * @requiredField accountId\n * @requiredField payoutId\n * @permissionId PAYMENTS.PAYOUT_READ\n * @applicableIdentity APP\n * @returns Retrieved 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 { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\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 '*.dev.wix-code.com': [\n {\n srcPath: '/payments/payouts/v4/payouts',\n destPath: '/v4/payouts',\n },\n ],\n _: [\n {\n srcPath: '/payments/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 *\n * Supports optional filters by account profile and by creation date range.\n * A newly created payout can take a short time to appear in the results.\n *\n * Calls are limited to 100 requests per 10 seconds per caller. Requests\n * over the limit fail with a `RESOURCE_EXHAUSTED` error and the message\n * `The request was throttled`.\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 transformFn: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'sort.origin.latitude' },\n { path: 'sort.origin.longitude' },\n ],\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/**\n * Retrieves a single payout by ID.\n *\n * Calls are limited to 100 requests per 10 seconds per caller. Requests\n * over the limit fail with a `RESOURCE_EXHAUSTED` error and the message\n * `The request was throttled`.\n */\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"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAAA;AAAA,EAAA,mBAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,mBAA6C;AAC7C,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,6CACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,oBAAoB;AAAA,MAClB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,YAAY;AAAA,MACV;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,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B,CAAC;AAED,QAAM,UAA+C,YAAY,OAAO;AAExE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAC;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,WAAW;AAAA,UACX,kBAAkB;AAAA,UAClB,eAAe;AAAA,UACf,cAAc;AAAA,UACd,MAAM;AAAA,UACN,QAAQ;AAAA,QACV;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,aAAa,SAAS;AAAA,IACzB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;AAqDA,eAAsBC,WACpB,UACA,WAcA;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC;AAAA,IACpD;AAAA,IACA;AAAA,EACF,CAAC;AAED,QAAM,UAA+C,UAAU,OAAO;AAEtE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI,GAAG;AAAA,EAC/D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAD;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,UAAU,QAAQ,WAAW,OAAO;AAAA,QAChE,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,YAAY,WAAW;AAAA,IAC1B;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["getPayout","listPayouts","import_timestamp","import_rest_modules","payload","PayoutStatus","PayoutFailureCode","SortOrder","WebhookIdentityType","listPayouts","sdkTransformError","getPayout"]}
|
|
1
|
+
{"version":3,"sources":["../../index.typings.ts","../../src/payments-payouts-v4-payout-payouts.universal.ts","../../src/payments-payouts-v4-payout-payouts.http.ts"],"sourcesContent":["export * from './src/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 an outgoing transfer of funds from a Wix Payments account to the\n * merchant's bank account. Each payout has an amount, a lifecycle status, an\n * estimated arrival date, and (when applicable) a failure reason.\n */\nexport interface Payout {\n /**\n * Payout ID.\n * @format GUID\n */\n _id?: string;\n /**\n * ID of the Wix Payments account that owns the payout. Retrieve account IDs\n * from the Accounts API.\n * @format GUID\n */\n accountId?: string;\n /**\n * ID of the Wix Payments account profile that owns the payout.\n *\n * A Wix Payments account has 1 or more profiles. Each profile has its own\n * balance and its own payouts. Most merchants have 1 profile. Retrieve\n * profile IDs from the Accounts API.\n * @format GUID\n */\n accountProfileId?: string;\n /**\n * Date and time the payout was created.\n *\n * The payout is created before the underlying transfer is initiated at the\n * bank. Once initiated, the funds typically reach the merchant's bank account\n * within 3 to 5 business days, depending on the receiving bank.\n */\n _createdDate?: Date | null;\n /** Amount of the transfer to the merchant's bank account. */\n amount?: Money;\n /**\n * Lifecycle status of the payout.\n *\n * `SENT` means the bank rail accepted the transfer for delivery. `FAILED` means\n * the receiving bank rejected the transfer.\n *\n * A `SENT` status doesn't guarantee that the funds were delivered to the\n * merchant. The bank rail doesn't provide a delivery acknowledgement, and a\n * payout in `SENT` can later transition to `FAILED` if the receiving bank\n * rejects the transfer. See the per-value documentation on `PayoutStatus` for\n * details.\n */\n status?: PayoutStatusWithLiterals;\n /**\n * Estimated date for when the funds should arrive at the merchant's bank\n * account, in `YYYY-MM-DD` format.\n *\n * The estimated arrival date is a prediction, not a guarantee. Actual arrival\n * depends on the receiving bank's processing and may be later.\n * @format LOCAL_DATE\n */\n estimatedArrivalDateV2?: string | null;\n /**\n * Reason the bank rail rejected the transfer.\n *\n * Returned only when `status` is `FAILED`.\n */\n failureReason?: PayoutFailureReason;\n /**\n * Reference returned by the bank rail once the transfer is initiated. For\n * example, an ACH trace number or a SEPA reference. Use this value to\n * reconcile against the merchant's bank statement.\n *\n * Empty until the bank rail returns a reference.\n * @maxLength 500\n */\n bankTransferReference?: string | null;\n /**\n * Whether the payout `amount` includes funds from a Wix Capital cash advance\n * taken out by the merchant. If `false`, the amount comes only from the\n * merchant's 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 /** Unknown payout status. Not returned by the API. */\n UNKNOWN = 'UNKNOWN',\n /**\n * The bank rail accepted the transfer. Funds are en route to the merchant's\n * bank account.\n *\n * Acceptance isn't the same as delivery. A `SENT` payout can still\n * transition to `FAILED` if the receiving bank rejects the transfer. The\n * bank rail's return window is up to 60 days for ACH and up to 13 months\n * for SEPA.\n */\n SENT = 'SENT',\n /**\n * The bank rail rejected the transfer. See `failureReason` 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/** Reason a payout failed. */\nexport interface PayoutFailureReason {\n /** Why the bank rail rejected the transfer. */\n code?: PayoutFailureCodeWithLiterals;\n}\n\n/**\n * Possible reasons for a payout failure. Each value describes a real-world\n * bank-rail condition.\n */\nexport enum PayoutFailureCode {\n /**\n * Generic failure with no more specific reason available from the bank\n * rail. This value is also returned when no failure reason is known.\n * Clients can't 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\n * bank account details before further payouts can succeed.\n */\n ACCOUNT_CLOSED = 'ACCOUNT_CLOSED',\n /**\n * The merchant's bank account is frozen, for example due to a hold placed\n * by the bank. The merchant must resolve the hold with their bank before\n * further payouts can succeed.\n */\n ACCOUNT_FROZEN = 'ACCOUNT_FROZEN',\n /**\n * The merchant's bank account is restricted from receiving the transfer.\n * For example, the account type or status doesn't 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 couldn't process the transfer for an unspecified\n * reason. 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\n * transfer. The merchant must contact their bank to authorise Wix Payments\n * payouts.\n */\n DEBIT_NOT_AUTHORIZED = 'DEBIT_NOT_AUTHORIZED',\n /**\n * The account holder name on file doesn't match the name the receiving\n * bank has on record. 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 /**\n * The bank account number is invalid. The format is wrong or the account\n * doesn't exist.\n */\n INVALID_ACCOUNT_NUMBER = 'INVALID_ACCOUNT_NUMBER',\n /** The payout currency isn't supported by the receiving bank account. */\n INVALID_CURRENCY = 'INVALID_CURRENCY',\n /** The routing number (US) is invalid or doesn't match the receiving bank. */\n INVALID_ROUTING_NUMBER = 'INVALID_ROUTING_NUMBER',\n /** The sort code (UK) is invalid or doesn't match the receiving bank. */\n INVALID_SORT_CODE = 'INVALID_SORT_CODE',\n /**\n * No bank account is on file for the merchant. The merchant must add bank\n * details before payouts can succeed.\n */\n NO_ACCOUNT = 'NO_ACCOUNT',\n /**\n * A technical error at the bank rail prevented the transfer. A subsequent\n * 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. Retrieve account\n * IDs from the Accounts API.\n * @format GUID\n */\n accountId: string;\n /**\n * ID of the Wix Payments account profile to filter by.\n *\n * When omitted, payouts across all profiles of the account are returned.\n * Retrieve profile IDs from the Accounts API.\n * @format GUID\n */\n accountProfileId?: string | null;\n /**\n * Returns only payouts created before this date and time. The date and time\n * itself is excluded.\n */\n createdBefore?: Date | null;\n /**\n * Returns only payouts created on or after this date and time. The date and\n * time itself is included.\n */\n createdAfter?: Date | null;\n /**\n * Sort order for the result list.\n *\n * Supported `fieldName` values: `created_date` (snake_case, not auto-converted). At most 1 sort field is allowed.\n */\n sort?: Sorting;\n /**\n * Offset-based paging. `limit` supports values from `1` to `20`.\n *\n * Default: `limit` is `20`, `offset` is `0`.\n */\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 * When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by\n * a specific element from a collection, filter can/should be provided to ensure correct sort value is picked.\n *\n * If multiple filters are provided, they are combined with AND operator.\n *\n * Example:\n * Given we have document like {\"id\": \"1\", \"nestedField\": [{\"price\": 10, \"region\": \"EU\"}, {\"price\": 20, \"region\": \"US\"}]}\n * and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be\n * { fieldName: \"nestedField.price\", \"select_items_by\": [{\"nestedField.region\": \"US\"}] }\n * @internal\n * @maxSize 10\n */\n selectItemsBy?: Record<string, any>[] | null;\n /**\n * Origin point for geo-distance sorting on a GEO field\n * results are ordered by distance from this point (ASC = nearest first, DESC = farthest first).\n */\n origin?: AddressLocation;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface AddressLocation {\n /** Address latitude. */\n latitude?: number | null;\n /** Address longitude. */\n longitude?: number | null;\n}\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 retrieved 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 * Indicates if there are more results after the current page.\n * If `true`, another page of results can be retrieved.\n * If `false`, this is the last page.\n * @internal\n */\n hasNext?: boolean | null;\n}\n\nexport interface CreatePayoutRequest {\n /** Payout to create. */\n payout?: Payout;\n}\n\nexport interface CreatePayoutResponse {\n /** Created payout. */\n payout?: Payout;\n}\n\nexport interface GetPayoutRequest {\n /**\n * ID of the Wix Payments account that owns the payout. The payout must\n * belong to this account. Retrieve account IDs from the Accounts API.\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 /** Retrieved payout. */\n payout?: Payout;\n}\n\nexport interface ListPayoutGroupsRequest {\n /**\n * ID of the Wix Payments account whose payout groups to list. Retrieve\n * account IDs from the Accounts API.\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 * ID of the Wix Payments account that owns the payout group. Retrieve\n * account IDs from the Accounts API.\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 * ID of the Wix Payments account that owns the payout. Retrieve account IDs\n * from the Accounts API.\n * @format GUID\n */\n accountId?: string;\n /**\n * ID of the payout whose group to retrieve.\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 * Triggered when a payout is created.\n *\n * The payout is created before the underlying transfer is initiated at the\n * bank. At this point `status` is `SENT` and `estimatedArrivalDateV2` is set\n * if the bank rail returned one. `failureReason` and `bankTransferReference`\n * are not yet populated.\n * @permissionScope View settlement reports and payouts\n * @permissionScopeId SCOPE.PAYMENTS.PAYOUTS-VIEW-FOR-SITE\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 * Triggered when a payout is updated.\n *\n * Typical updates include `status` transitioning from `SENT` to `FAILED`\n * (with `failureReason` being set), `estimatedArrivalDateV2` being refined by\n * the bank rail, and `bankTransferReference` being populated once the rail\n * returns it.\n * @permissionScope View settlement reports and payouts\n * @permissionScopeId SCOPE.PAYMENTS.PAYOUTS-VIEW-FOR-SITE\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 *\n * Supports optional filters by account profile and by creation date range.\n * A newly created payout can take a short time to appear in the results.\n *\n * Calls are limited to 100 requests per 10 seconds per caller. Requests\n * over the limit fail with a `RESOURCE_EXHAUSTED` error and the message\n * `The request was throttled`.\n * @param accountId - ID of the Wix Payments account whose payouts to list. Retrieve account\n * IDs from the Accounts API.\n * @public\n * @documentationMaturity preview\n * @requiredField accountId\n * @permissionId PAYMENTS.PAYOUT_READ\n * @applicableIdentity APP\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 * ID of the Wix Payments account profile to filter by.\n *\n * When omitted, payouts across all profiles of the account are returned.\n * Retrieve profile IDs from the Accounts API.\n * @format GUID\n */\n accountProfileId?: string | null;\n /**\n * Returns only payouts created before this date and time. The date and time\n * itself is excluded.\n */\n createdBefore?: Date | null;\n /**\n * Returns only payouts created on or after this date and time. The date and\n * time itself is included.\n */\n createdAfter?: Date | null;\n /**\n * Sort order for the result list.\n *\n * Supported `fieldName` values: `created_date` (snake_case, not auto-converted). At most 1 sort field is allowed.\n */\n sort?: Sorting;\n /**\n * Offset-based paging. `limit` supports values from `1` to `20`.\n *\n * Default: `limit` is `20`, `offset` is `0`.\n */\n paging?: Paging;\n}\n\n/**\n * Retrieves a single payout by ID.\n *\n * Calls are limited to 100 requests per 10 seconds per caller. Requests\n * over the limit fail with a `RESOURCE_EXHAUSTED` error and the message\n * `The request was throttled`.\n * @param payoutId - ID of the payout to retrieve.\n * @param accountId - ID of the Wix Payments account that owns the payout. The payout must\n * belong to this account. Retrieve account IDs from the Accounts API.\n * @public\n * @documentationMaturity preview\n * @requiredField accountId\n * @requiredField payoutId\n * @permissionId PAYMENTS.PAYOUT_READ\n * @applicableIdentity APP\n * @returns Retrieved 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 { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\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 'www.wixapis.com': [\n {\n srcPath: '/wixpay-payouts/v4/payouts',\n destPath: '/v4/payouts',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/payments/payouts/v4/payouts',\n destPath: '/v4/payouts',\n },\n ],\n _: [\n {\n srcPath: '/payments/payouts/v4/payouts',\n destPath: '/v4/payouts',\n },\n ],\n 'payments.base44.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 };\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 *\n * Supports optional filters by account profile and by creation date range.\n * A newly created payout can take a short time to appear in the results.\n *\n * Calls are limited to 100 requests per 10 seconds per caller. Requests\n * over the limit fail with a `RESOURCE_EXHAUSTED` error and the message\n * `The request was throttled`.\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 transformFn: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'sort.origin.latitude' },\n { path: 'sort.origin.longitude' },\n ],\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/**\n * Retrieves a single payout by ID.\n *\n * Calls are limited to 100 requests per 10 seconds per caller. Requests\n * over the limit fail with a `RESOURCE_EXHAUSTED` error and the message\n * `The request was throttled`.\n */\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"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAAA;AAAA,EAAA,mBAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,mBAA6C;AAC7C,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,6CACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,oBAAoB;AAAA,MAClB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SA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AAAA,QACzB,0BAA0B,EAAE,UAAU,QAAQ,WAAW,OAAO;AAAA,QAChE,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,YAAY,WAAW;AAAA,IAC1B;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["getPayout","listPayouts","import_timestamp","import_rest_modules","payload","PayoutStatus","PayoutFailureCode","SortOrder","WebhookIdentityType","listPayouts","sdkTransformError","getPayout"]}
|