@wix/auto_sdk_payments_payouts 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +1 -1
- package/build/cjs/index.js +8 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +14 -3
- package/build/cjs/index.typings.js +8 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +13 -2
- package/build/cjs/meta.js +8 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.d.ts +4 -0
- package/build/cjs/schemas.js +7 -1
- package/build/cjs/schemas.js.map +1 -1
- package/build/es/index.d.mts +1 -1
- package/build/es/index.mjs +8 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +14 -3
- package/build/es/index.typings.mjs +8 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +13 -2
- package/build/es/meta.mjs +8 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.d.mts +4 -0
- package/build/es/schemas.mjs +7 -1
- package/build/es/schemas.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +1 -1
- package/build/internal/cjs/index.js +8 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +14 -3
- package/build/internal/cjs/index.typings.js +8 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +13 -2
- package/build/internal/cjs/meta.js +8 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/cjs/schemas.d.ts +4 -0
- package/build/internal/cjs/schemas.js +7 -1
- package/build/internal/cjs/schemas.js.map +1 -1
- package/build/internal/es/index.d.mts +1 -1
- package/build/internal/es/index.mjs +8 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +14 -3
- package/build/internal/es/index.typings.mjs +8 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +13 -2
- package/build/internal/es/meta.mjs +8 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/build/internal/es/schemas.d.mts +4 -0
- package/build/internal/es/schemas.mjs +7 -1
- package/build/internal/es/schemas.mjs.map +1 -1
- package/package.json +2 -2
package/build/cjs/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
2
|
import { ListPayoutsOptions, ListPayoutsResponse, Payout, PayoutCreatedEnvelope, PayoutUpdatedEnvelope } from './index.typings.js';
|
|
3
|
-
export { AccountInfo, AccountInfoMetadata, ActionEvent, BaseEventMetadata, CreatePayoutRequest, CreatePayoutResponse, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, GetPayoutGroupByPayoutIdRequest, GetPayoutGroupByPayoutIdResponse, GetPayoutGroupRequest, GetPayoutGroupResponse, GetPayoutRequest, GetPayoutResponse, IdentificationData, IdentificationDataIdOneOf, ListPayoutGroupsRequest, ListPayoutGroupsResponse, ListPayoutsRequest, MessageEnvelope, Money, Paging, PagingMetadata, PayoutFailureCode, PayoutFailureCodeWithLiterals, PayoutFailureReason, PayoutGroup, PayoutStatus, PayoutStatusWithLiterals, RestoreInfo, SortOrder, SortOrderWithLiterals, Sorting, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.js';
|
|
3
|
+
export { AccountInfo, AccountInfoMetadata, ActionEvent, AddressLocation, BaseEventMetadata, CreatePayoutRequest, CreatePayoutResponse, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, GetPayoutGroupByPayoutIdRequest, GetPayoutGroupByPayoutIdResponse, GetPayoutGroupRequest, GetPayoutGroupResponse, GetPayoutRequest, GetPayoutResponse, IdentificationData, IdentificationDataIdOneOf, ListPayoutGroupsRequest, ListPayoutGroupsResponse, ListPayoutsRequest, MessageEnvelope, Money, Paging, PagingMetadata, PayoutFailureCode, PayoutFailureCodeWithLiterals, PayoutFailureReason, PayoutGroup, PayoutStatus, PayoutStatusWithLiterals, RestoreInfo, SortOrder, SortOrderWithLiterals, Sorting, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.js';
|
|
4
4
|
|
|
5
5
|
declare function listPayouts$1(httpClient: HttpClient): ListPayoutsSignature;
|
|
6
6
|
interface ListPayoutsSignature {
|
package/build/cjs/index.js
CHANGED
|
@@ -43,6 +43,7 @@ var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-
|
|
|
43
43
|
|
|
44
44
|
// src/payments-payouts-v4-payout-payouts.http.ts
|
|
45
45
|
var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
|
|
46
|
+
var import_float = require("@wix/sdk-runtime/transformations/float");
|
|
46
47
|
var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
|
|
47
48
|
var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
48
49
|
var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
@@ -171,6 +172,13 @@ function listPayouts(payload) {
|
|
|
171
172
|
{
|
|
172
173
|
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
173
174
|
paths: [{ path: "createdBefore" }, { path: "createdAfter" }]
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
transformFn: import_float.transformSDKFloatToRESTFloat,
|
|
178
|
+
paths: [
|
|
179
|
+
{ path: "sort.origin.latitude" },
|
|
180
|
+
{ path: "sort.origin.longitude" }
|
|
181
|
+
]
|
|
174
182
|
}
|
|
175
183
|
]);
|
|
176
184
|
const metadata = {
|
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 * @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 * @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 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 /** Returns only payouts created before this date and time. */\n createdBefore?: Date | null;\n /** Returns only payouts created after this date and time. */\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 /** Offset-based paging. */\n paging?: Paging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface Paging {\n /** Number of items to load. */\n limit?: number | null;\n /** Number of items to skip in the current sort order. */\n offset?: number | null;\n}\n\nexport interface ListPayoutsResponse {\n /** List of 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 * @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 /** Returns only payouts created before this date and time. */\n createdBefore?: Date | null;\n /** Returns only payouts created after this date and time. */\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 /** Offset-based paging. */\n paging?: Paging;\n}\n\n/**\n * Retrieves a single payout by ID.\n * @param payoutId - ID of the payout to retrieve.\n * @param accountId - ID of the Wix Payments account 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 { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixPaymentsV4PayoutsPayoutsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/wixpay-payout',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/wixpay-payout/v4/payout-groups',\n destPath: '/v4/payout-groups',\n },\n {\n srcPath: '/_api/wixpay-payout/v4/payouts',\n destPath: '/v4/payouts',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/wixpay-payout/v4/payouts',\n destPath: '/v4/payouts',\n },\n {\n srcPath: '/_api/wixpay-payout/v4/payout-groups',\n destPath: '/v4/payout-groups',\n },\n {\n srcPath: '/_api/wixpay-payout/v4/bo-payouts',\n destPath: '/v4/bo-payouts',\n },\n {\n srcPath: '/_api/wixpay-payout/v4/bo-payout-policies',\n destPath: '/v4/bo-payout-policies',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/wixpay-payout/v4/payouts',\n destPath: '/v4/payouts',\n },\n {\n srcPath: '/_api/wixpay-payout/v4/payout-groups',\n destPath: '/v4/payout-groups',\n },\n {\n srcPath: '/_api/wixpay-payout/v4/bo-payouts',\n destPath: '/v4/bo-payouts',\n },\n {\n srcPath: '/_api/wixpay-payout/v4/bo-payout-policies',\n destPath: '/v4/bo-payout-policies',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/wixpay-payout/v4/payouts',\n destPath: '/v4/payouts',\n },\n {\n srcPath: '/_api/wixpay-payout/v4/payout-groups',\n destPath: '/v4/payout-groups',\n },\n {\n srcPath: '/_api/wixpay-payout/v4/bo-payouts',\n destPath: '/v4/bo-payouts',\n },\n {\n srcPath: '/_api/wixpay-payout/v4/bo-payout-policies',\n destPath: '/v4/bo-payout-policies',\n },\n ],\n 'payment-webhooks.wixapps.net': [\n {\n srcPath: '/wix-payments/payout-callbacks/stripe',\n destPath: '/payout-callbacks/stripe',\n },\n {\n srcPath: '/wix-payments/payout-callbacks/adyen',\n destPath: '/payout-callbacks/adyen',\n },\n {\n srcPath: '/wix-payments/payout-callbacks/stone',\n destPath: '/payout-callbacks/stone',\n },\n {\n srcPath: '/wix-payments/payout-callbacks/paypal',\n destPath: '/payout-callbacks/paypal',\n },\n ],\n 'cronulla-jobs._base_domain_': [\n {\n srcPath: '/wix-payments/wixpay-payout/internal-api/jobs',\n destPath: '/internal-api/jobs',\n },\n ],\n 'manage.base44.com': [\n {\n srcPath: '/_api/wixpay-payout',\n destPath: '',\n },\n ],\n 'payments.base44.com': [\n {\n srcPath: '/_api/wixpay-payout',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/wixpay-payouts/v4/payouts',\n destPath: '/v4/payouts',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_payments_payouts';\n\n/**\n * Retrieves a paginated list of payouts for the specified Wix Payments account.\n *\n * Supports optional filters by account profile and by creation date range.\n */\nexport function listPayouts(payload: object): RequestOptionsFactory<any> {\n function __listPayouts({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'createdBefore' }, { path: 'createdAfter' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.payments.payouts.v4.payout',\n method: 'GET' as any,\n methodFqn: 'wix.payments.v4.payouts.PayoutsService.ListPayouts',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsV4PayoutsPayoutsServiceUrl({\n protoPath: '/v4/payouts',\n data: serializedData,\n host,\n }),\n params: toURLSearchParams(serializedData, true),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'payouts.createdDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listPayouts;\n}\n\n/** Retrieves a single payout by ID. */\nexport function getPayout(payload: object): RequestOptionsFactory<any> {\n function __getPayout({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.payouts.v4.payout',\n method: 'GET' as any,\n methodFqn: 'wix.payments.v4.payouts.PayoutsService.GetPayout',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsV4PayoutsPayoutsServiceUrl({\n protoPath: '/v4/payouts/{payoutId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'payout.createdDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getPayout;\n}\n","import {\n listPayouts as publicListPayouts,\n getPayout as publicGetPayout,\n} from './payments-payouts-v4-payout-payouts.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { onPayoutCreated as publicOnPayoutCreated } from './payments-payouts-v4-payout-payouts.public.js';\nimport { onPayoutUpdated as publicOnPayoutUpdated } from './payments-payouts-v4-payout-payouts.public.js';\n\nexport const listPayouts: MaybeContext<\n BuildRESTFunction<typeof publicListPayouts> & typeof publicListPayouts\n> = /*#__PURE__*/ createRESTModule(publicListPayouts);\nexport const getPayout: MaybeContext<\n BuildRESTFunction<typeof publicGetPayout> & typeof publicGetPayout\n> = /*#__PURE__*/ createRESTModule(publicGetPayout);\n/**\n * 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 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,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,MACt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ayouts","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 * @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 * @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 /** Returns only payouts created before this date and time. */\n createdBefore?: Date | null;\n /** Returns only payouts created after this date and time. */\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 /** Offset-based paging. */\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 * @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 /** Returns only payouts created before this date and time. */\n createdBefore?: Date | null;\n /** Returns only payouts created after this date and time. */\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 /** Offset-based paging. */\n paging?: Paging;\n}\n\n/**\n * Retrieves a single payout by ID.\n * @param payoutId - ID of the payout to retrieve.\n * @param accountId - ID of the Wix Payments account 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 };\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 */\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/** Retrieves a single payout by ID. */\nexport function getPayout(payload: object): RequestOptionsFactory<any> {\n function __getPayout({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.payouts.v4.payout',\n method: 'GET' as any,\n methodFqn: 'wix.payments.v4.payouts.PayoutsService.GetPayout',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsV4PayoutsPayoutsServiceUrl({\n protoPath: '/v4/payouts/{payoutId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'payout.createdDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getPayout;\n}\n","import {\n listPayouts as publicListPayouts,\n getPayout as publicGetPayout,\n} from './payments-payouts-v4-payout-payouts.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { onPayoutCreated as publicOnPayoutCreated } from './payments-payouts-v4-payout-payouts.public.js';\nimport { onPayoutUpdated as publicOnPayoutUpdated } from './payments-payouts-v4-payout-payouts.public.js';\n\nexport const listPayouts: MaybeContext<\n BuildRESTFunction<typeof publicListPayouts> & typeof publicListPayouts\n> = /*#__PURE__*/ createRESTModule(publicListPayouts);\nexport const getPayout: MaybeContext<\n BuildRESTFunction<typeof publicGetPayout> & typeof publicGetPayout\n> = /*#__PURE__*/ createRESTModule(publicGetPayout);\n/**\n * 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,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;A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,WAAW;AAAA,EACf;AACJ;AA0BO,IAAM,sBAAkB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA,CAAC,cACC;AAAA,QACE,wCAAe,OAAO;AAAA,MACpB;AAAA,QACE,aAAa;AAAA,QACb,OAAO;AAAA,UACL,EAAE,MAAM,qBAAqB;AAAA,UAC7B,EAAE,MAAM,qBAAqB;AAAA,QAC/B;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH;AACJ,EAAyB;AAClB,IAAM,sBAAkB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA,CAAC,cACC;AAAA,QACE,wCAAe,OAAO;AAAA,MACpB;AAAA,QACE,aAAa;AAAA,QACb,OAAO;AAAA,UACL,EAAE,MAAM,qBAAqB;AAAA,UAC7B,EAAE,MAAM,qBAAqB;AAAA,QAC/B;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH;AACJ,EAAyB;;;AGhHzB,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"]}
|
|
@@ -235,6 +235,11 @@ interface Sorting {
|
|
|
235
235
|
fieldName?: string;
|
|
236
236
|
/** Sort order. */
|
|
237
237
|
order?: SortOrderWithLiterals;
|
|
238
|
+
/**
|
|
239
|
+
* Origin point for geo-distance sorting on a GEO field
|
|
240
|
+
* results are ordered by distance from this point (ASC = nearest first, DESC = farthest first).
|
|
241
|
+
*/
|
|
242
|
+
origin?: AddressLocation;
|
|
238
243
|
}
|
|
239
244
|
declare enum SortOrder {
|
|
240
245
|
ASC = "ASC",
|
|
@@ -242,6 +247,12 @@ declare enum SortOrder {
|
|
|
242
247
|
}
|
|
243
248
|
/** @enumType */
|
|
244
249
|
type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
|
|
250
|
+
interface AddressLocation {
|
|
251
|
+
/** Address latitude. */
|
|
252
|
+
latitude?: number | null;
|
|
253
|
+
/** Address longitude. */
|
|
254
|
+
longitude?: number | null;
|
|
255
|
+
}
|
|
245
256
|
interface Paging {
|
|
246
257
|
/** Number of items to load. */
|
|
247
258
|
limit?: number | null;
|
|
@@ -407,7 +418,7 @@ interface DomainEvent extends DomainEventBodyOneOf {
|
|
|
407
418
|
/** If present, indicates the action that triggered the event. */
|
|
408
419
|
originatedFrom?: string | null;
|
|
409
420
|
/**
|
|
410
|
-
* A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01
|
|
421
|
+
* A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number.
|
|
411
422
|
* You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
|
|
412
423
|
*/
|
|
413
424
|
entityEventSequence?: string | null;
|
|
@@ -572,7 +583,7 @@ interface EventMetadata extends BaseEventMetadata {
|
|
|
572
583
|
/** If present, indicates the action that triggered the event. */
|
|
573
584
|
originatedFrom?: string | null;
|
|
574
585
|
/**
|
|
575
|
-
* A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01
|
|
586
|
+
* A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number.
|
|
576
587
|
* You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
|
|
577
588
|
*/
|
|
578
589
|
entityEventSequence?: string | null;
|
|
@@ -680,4 +691,4 @@ interface ListPayoutsOptions {
|
|
|
680
691
|
*/
|
|
681
692
|
declare function getPayout(payoutId: string, accountId: string): Promise<NonNullablePaths<Payout, `_id` | `accountId` | `accountProfileId` | `amount.value` | `amount.currency` | `status` | `failureReason.code` | `cashAdvanceIncluded`, 3>>;
|
|
682
693
|
|
|
683
|
-
export { type AccountInfo, type AccountInfoMetadata, type ActionEvent, type BaseEventMetadata, type CreatePayoutRequest, type CreatePayoutResponse, type DomainEvent, type DomainEventBodyOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type GetPayoutGroupByPayoutIdRequest, type GetPayoutGroupByPayoutIdResponse, type GetPayoutGroupRequest, type GetPayoutGroupResponse, type GetPayoutRequest, type GetPayoutResponse, type IdentificationData, type IdentificationDataIdOneOf, type ListPayoutGroupsRequest, type ListPayoutGroupsResponse, type ListPayoutsOptions, type ListPayoutsRequest, type ListPayoutsResponse, type MessageEnvelope, type Money, type Paging, type PagingMetadata, type Payout, type PayoutCreatedEnvelope, PayoutFailureCode, type PayoutFailureCodeWithLiterals, type PayoutFailureReason, type PayoutGroup, PayoutStatus, type PayoutStatusWithLiterals, type PayoutUpdatedEnvelope, type RestoreInfo, SortOrder, type SortOrderWithLiterals, type Sorting, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, getPayout, listPayouts, onPayoutCreated, onPayoutUpdated };
|
|
694
|
+
export { type AccountInfo, type AccountInfoMetadata, type ActionEvent, type AddressLocation, type BaseEventMetadata, type CreatePayoutRequest, type CreatePayoutResponse, type DomainEvent, type DomainEventBodyOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type GetPayoutGroupByPayoutIdRequest, type GetPayoutGroupByPayoutIdResponse, type GetPayoutGroupRequest, type GetPayoutGroupResponse, type GetPayoutRequest, type GetPayoutResponse, type IdentificationData, type IdentificationDataIdOneOf, type ListPayoutGroupsRequest, type ListPayoutGroupsResponse, type ListPayoutsOptions, type ListPayoutsRequest, type ListPayoutsResponse, type MessageEnvelope, type Money, type Paging, type PagingMetadata, type Payout, type PayoutCreatedEnvelope, PayoutFailureCode, type PayoutFailureCodeWithLiterals, type PayoutFailureReason, type PayoutGroup, PayoutStatus, type PayoutStatusWithLiterals, type PayoutUpdatedEnvelope, type RestoreInfo, SortOrder, type SortOrderWithLiterals, type Sorting, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, getPayout, listPayouts, onPayoutCreated, onPayoutUpdated };
|
|
@@ -35,6 +35,7 @@ var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-
|
|
|
35
35
|
|
|
36
36
|
// src/payments-payouts-v4-payout-payouts.http.ts
|
|
37
37
|
var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
|
|
38
|
+
var import_float = require("@wix/sdk-runtime/transformations/float");
|
|
38
39
|
var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
|
|
39
40
|
var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
40
41
|
var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
@@ -163,6 +164,13 @@ function listPayouts(payload) {
|
|
|
163
164
|
{
|
|
164
165
|
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
165
166
|
paths: [{ path: "createdBefore" }, { path: "createdAfter" }]
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
transformFn: import_float.transformSDKFloatToRESTFloat,
|
|
170
|
+
paths: [
|
|
171
|
+
{ path: "sort.origin.latitude" },
|
|
172
|
+
{ path: "sort.origin.longitude" }
|
|
173
|
+
]
|
|
166
174
|
}
|
|
167
175
|
]);
|
|
168
176
|
const metadata = {
|
|
@@ -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 /** Returns only payouts created before this date and time. */\n createdBefore?: Date | null;\n /** Returns only payouts created after this date and time. */\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 /** Offset-based paging. */\n paging?: Paging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface Paging {\n /** Number of items to load. */\n limit?: number | null;\n /** Number of items to skip in the current sort order. */\n offset?: number | null;\n}\n\nexport interface ListPayoutsResponse {\n /** List of 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 * @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 /** Returns only payouts created before this date and time. */\n createdBefore?: Date | null;\n /** Returns only payouts created after this date and time. */\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 /** Offset-based paging. */\n paging?: Paging;\n}\n\n/**\n * Retrieves a single payout by ID.\n * @param payoutId - ID of the payout to retrieve.\n * @param accountId - ID of the Wix Payments account 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 { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixPaymentsV4PayoutsPayoutsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/wixpay-payout',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/wixpay-payout/v4/payout-groups',\n destPath: '/v4/payout-groups',\n },\n {\n srcPath: '/_api/wixpay-payout/v4/payouts',\n destPath: '/v4/payouts',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/wixpay-payout/v4/payouts',\n destPath: '/v4/payouts',\n },\n {\n srcPath: '/_api/wixpay-payout/v4/payout-groups',\n destPath: '/v4/payout-groups',\n },\n {\n srcPath: '/_api/wixpay-payout/v4/bo-payouts',\n destPath: '/v4/bo-payouts',\n },\n {\n srcPath: '/_api/wixpay-payout/v4/bo-payout-policies',\n destPath: '/v4/bo-payout-policies',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/wixpay-payout/v4/payouts',\n destPath: '/v4/payouts',\n },\n {\n srcPath: '/_api/wixpay-payout/v4/payout-groups',\n destPath: '/v4/payout-groups',\n },\n {\n srcPath: '/_api/wixpay-payout/v4/bo-payouts',\n destPath: '/v4/bo-payouts',\n },\n {\n srcPath: '/_api/wixpay-payout/v4/bo-payout-policies',\n destPath: '/v4/bo-payout-policies',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/wixpay-payout/v4/payouts',\n destPath: '/v4/payouts',\n },\n {\n srcPath: '/_api/wixpay-payout/v4/payout-groups',\n destPath: '/v4/payout-groups',\n },\n {\n srcPath: '/_api/wixpay-payout/v4/bo-payouts',\n destPath: '/v4/bo-payouts',\n },\n {\n srcPath: '/_api/wixpay-payout/v4/bo-payout-policies',\n destPath: '/v4/bo-payout-policies',\n },\n ],\n 'payment-webhooks.wixapps.net': [\n {\n srcPath: '/wix-payments/payout-callbacks/stripe',\n destPath: '/payout-callbacks/stripe',\n },\n {\n srcPath: '/wix-payments/payout-callbacks/adyen',\n destPath: '/payout-callbacks/adyen',\n },\n {\n srcPath: '/wix-payments/payout-callbacks/stone',\n destPath: '/payout-callbacks/stone',\n },\n {\n srcPath: '/wix-payments/payout-callbacks/paypal',\n destPath: '/payout-callbacks/paypal',\n },\n ],\n 'cronulla-jobs._base_domain_': [\n {\n srcPath: '/wix-payments/wixpay-payout/internal-api/jobs',\n destPath: '/internal-api/jobs',\n },\n ],\n 'manage.base44.com': [\n {\n srcPath: '/_api/wixpay-payout',\n destPath: '',\n },\n ],\n 'payments.base44.com': [\n {\n srcPath: '/_api/wixpay-payout',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/wixpay-payouts/v4/payouts',\n destPath: '/v4/payouts',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_payments_payouts';\n\n/**\n * Retrieves a paginated list of payouts for the specified Wix Payments account.\n *\n * Supports optional filters by account profile and by creation date range.\n */\nexport function listPayouts(payload: object): RequestOptionsFactory<any> {\n function __listPayouts({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'createdBefore' }, { path: 'createdAfter' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.payments.payouts.v4.payout',\n method: 'GET' as any,\n methodFqn: 'wix.payments.v4.payouts.PayoutsService.ListPayouts',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsV4PayoutsPayoutsServiceUrl({\n protoPath: '/v4/payouts',\n data: serializedData,\n host,\n }),\n params: toURLSearchParams(serializedData, true),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'payouts.createdDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listPayouts;\n}\n\n/** Retrieves a single payout by ID. */\nexport function getPayout(payload: object): RequestOptionsFactory<any> {\n function __getPayout({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.payouts.v4.payout',\n method: 'GET' as any,\n methodFqn: 'wix.payments.v4.payouts.PayoutsService.GetPayout',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsV4PayoutsPayoutsServiceUrl({\n protoPath: '/v4/payouts/{payoutId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'payout.createdDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getPayout;\n}\n"],"mappings":";;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,UAAM;AAAA,EACR;AACF;AAuCA,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 /** Returns only payouts created before this date and time. */\n createdBefore?: Date | null;\n /** Returns only payouts created after this date and time. */\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 /** Offset-based paging. */\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 * @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 /** Returns only payouts created before this date and time. */\n createdBefore?: Date | null;\n /** Returns only payouts created after this date and time. */\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 /** Offset-based paging. */\n paging?: Paging;\n}\n\n/**\n * Retrieves a single payout by ID.\n * @param payoutId - ID of the payout to retrieve.\n * @param accountId - ID of the Wix Payments account 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 };\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 */\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/** Retrieves a single payout by ID. */\nexport function getPayout(payload: object): RequestOptionsFactory<any> {\n function __getPayout({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.payments.payouts.v4.payout',\n method: 'GET' as any,\n methodFqn: 'wix.payments.v4.payouts.PayoutsService.GetPayout',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixPaymentsV4PayoutsPayoutsServiceUrl({\n protoPath: '/v4/payouts/{payoutId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'payout.createdDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getPayout;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;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ACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,aAAa,SAAS;AAAA,IACzB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;AAuCA,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"]}
|