{"version":3,"sources":["../../src/payments-balances-v5-balance-record-balance-records.universal.ts","../../src/payments-balances-v5-balance-record-balance-records.http.ts","../../src/payments-balances-v5-balance-record-balance-records.public.ts","../../src/payments-balances-v5-balance-record-balance-records.context.ts"],"sourcesContent":["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 ambassadorWixPaymentsBalancesV5BalanceRecord from './payments-balances-v5-balance-record-balance-records.http.js';\n\n/**\n * A balance record is 1 entry on a Wix Payments account ledger, representing 1 financial\n * operation on the account: a payment, a refund, a chargeback, a refund or chargeback\n * reversal, a reserve hold or release, a top-up, a Wix Capital cash advance, a Wix Capital\n * remittance, or an adjustment.\n *\n * Each record belongs to an account and to one of the account's profiles. Reserve, payment,\n * payout, and book transfer details are populated based on the record's type. On every\n * record, `net` equals `amount - fee`. Records are immutable: `amount`, `fee`, and `net`\n * never change after creation.\n *\n * In certain cases a balance record can be virtual: a record that hasn't been persisted but\n * is projected to occur in the future. Virtual records are returned only for the\n * `ESTIMATED_RESERVE_HOLD` and `ESTIMATED_RESERVE_RELEASE` tags and have no `id` and no\n * `appliedDate`.\n */\nexport interface BalanceRecord {\n  /**\n   * Balance record ID.\n   *\n   * Not returned for virtual records produced by `ESTIMATED_RESERVE_HOLD` or\n   * `ESTIMATED_RESERVE_RELEASE` tags.\n   * @format GUID\n   */\n  _id?: string | null;\n  /**\n   * ID of the Wix Payments account this balance record belongs to.\n   * @format GUID\n   */\n  accountId?: string;\n  /**\n   * ID of the Wix Payments account profile this balance record belongs to.\n   * @format GUID\n   */\n  accountProfileId?: string;\n  /**\n   * Gross amount of the balance record, including fees.\n   *\n   * Positive for credits to the account, negative for deductions.\n   */\n  amount?: Money;\n  /** Fee that Wix Payments collected on this balance record. */\n  fee?: Money;\n  /** Net amount of the balance record after subtracting `fee`. */\n  net?: Money;\n  /** Type of the balance record. Describes what kind of money movement this record represents. */\n  recordType?: BalanceRecordTypeWithLiterals;\n  /**\n   * Current effect of this record on the account balance.\n   *\n   * The value depends on the record's `recordType`, whether it has a `payoutInfo` or\n   * `bookTransferInfo`, and its `payoutAvailabilityDate`. This field is returned on\n   * responses only and can't be passed as a filter on list or query requests. To filter by\n   * effect on the balance, use `tags` instead.\n   */\n  recordStatus?: BalanceRecordStatusWithLiterals;\n  /**\n   * Date and time the balance record was applied to the account balance.\n   *\n   * Not returned for virtual records.\n   */\n  appliedDate?: Date | null;\n  /**\n   * Date the balance record becomes available for payout, in `YYYY-MM-DD` format.\n   * @format LOCAL_DATE\n   */\n  payoutAvailabilityDate?: string | null;\n  /** Date and time the balance record was created. */\n  _createdDate?: Date | null;\n  /** Date and time the balance record was last updated. */\n  _updatedDate?: Date | null;\n  /**\n   * Information about the payment that produced this balance record.\n   *\n   * Returned for records related to a payment, refund, or chargeback.\n   */\n  paymentInfo?: PaymentInfo;\n  /**\n   * Information about the payout that includes this balance record.\n   *\n   * Returned only after the record has been included in a payout. The presence of\n   * `payoutInfo` (versus `bookTransferInfo`) distinguishes a regular payout from an Instant\n   * Access book transfer.\n   */\n  payoutInfo?: PayoutInfo;\n  /**\n   * Reserve details for this balance record.\n   *\n   * Returned for records with `recordType` `RESERVE_HOLD` or `RESERVE_RELEASE`.\n   */\n  reserveInfo?: ReserveInfo;\n  /**\n   * Book transfer details for this balance record.\n   *\n   * Returned for records funded through a Wix Checking book transfer (Instant Access) rather\n   * than a payout. Funds backed by a book transfer are immediately available in the\n   * merchant's Wix Checking account.\n   */\n  bookTransferInfo?: BookTransferInfo;\n}\n\nexport enum PaymentMethodType {\n  UNKNOWN = 'UNKNOWN',\n  CARD = 'CARD',\n  CARD_READER = 'CARD_READER',\n  ACH = 'ACH',\n  APPLE_PAY = 'APPLE_PAY',\n  BOLETO = 'BOLETO',\n  GIROPAY = 'GIROPAY',\n  IDEAL = 'IDEAL',\n  PIX = 'PIX',\n  SEPA = 'SEPA',\n  SOFORT = 'SOFORT',\n  PAY_PAL = 'PAY_PAL',\n  TAP_TO_PAY = 'TAP_TO_PAY',\n  GOOGLE_PAY = 'GOOGLE_PAY',\n  AFFIRM = 'AFFIRM',\n  AFTERPAY = 'AFTERPAY',\n  KLARNA = 'KLARNA',\n  RAZORPAY = 'RAZORPAY',\n  ALIPAY = 'ALIPAY',\n  BANCONTACT = 'BANCONTACT',\n  US_BANK_ACCOUNT = 'US_BANK_ACCOUNT',\n  BANKFUL_CRYPTO = 'BANKFUL_CRYPTO',\n  BANKFUL = 'BANKFUL',\n  TWINT = 'TWINT',\n}\n\n/** @enumType */\nexport type PaymentMethodTypeWithLiterals =\n  | PaymentMethodType\n  | 'UNKNOWN'\n  | 'CARD'\n  | 'CARD_READER'\n  | 'ACH'\n  | 'APPLE_PAY'\n  | 'BOLETO'\n  | 'GIROPAY'\n  | 'IDEAL'\n  | 'PIX'\n  | 'SEPA'\n  | 'SOFORT'\n  | 'PAY_PAL'\n  | 'TAP_TO_PAY'\n  | 'GOOGLE_PAY'\n  | 'AFFIRM'\n  | 'AFTERPAY'\n  | 'KLARNA'\n  | 'RAZORPAY'\n  | 'ALIPAY'\n  | 'BANCONTACT'\n  | 'US_BANK_ACCOUNT'\n  | 'BANKFUL_CRYPTO'\n  | 'BANKFUL'\n  | 'TWINT';\n\nexport interface PayoutInfo {\n  /**\n   * ID of the payout that this balance record belongs to.\n   * @format GUID\n   */\n  payoutId?: string;\n  /**\n   * Date and time the payout was created.\n   *\n   * Returned only for payouts that have already occurred, not those that are scheduled.\n   */\n  _createdDate?: Date | null;\n}\n\nexport interface ReserveHistoryItem {\n  /**\n   * ID of the BackOffice activity log entry that describes this reserve event.\n   * @internal\n   * @format GUID\n   */\n  activityId?: string | null;\n  /**\n   * Date the reserve was scheduled to be released, in `YYYY-MM-DD` format.\n   * @format LOCAL_DATE\n   */\n  releaseDate?: string | null;\n  /** Date and time the reserve was created. */\n  _createdDate?: Date | null;\n}\n\n/** How the reserve was created. */\nexport enum ReserveType {\n  /** Reserve that was created manually for a 1-time event. */\n  ONE_TIME = 'ONE_TIME',\n  /** Reserve that was created automatically by an active reserve policy on the account. */\n  ROLLING = 'ROLLING',\n}\n\n/** @enumType */\nexport type ReserveTypeWithLiterals = ReserveType | 'ONE_TIME' | 'ROLLING';\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/** Type of financial operation that produced the balance record. */\nexport enum BalanceRecordType {\n  /** Unknown balance record type. */\n  UNKNOWN = 'UNKNOWN',\n  /** Payment from a buyer for a sale, credited to the merchant's Wix Payments account. */\n  CREDIT = 'CREDIT',\n  /** Refund issued back to a buyer. */\n  REFUND = 'REFUND',\n  /** Chargeback initiated by a buyer against a previous payment. */\n  CHARGEBACK = 'CHARGEBACK',\n  /** Reversal of a previously issued refund. */\n  REFUND_REVERSAL = 'REFUND_REVERSAL',\n  /** Reversal of a previously issued chargeback. */\n  CHARGEBACK_REVERSAL = 'CHARGEBACK_REVERSAL',\n  /** Funds withheld from the available balance as part of a reserve. */\n  RESERVE_HOLD = 'RESERVE_HOLD',\n  /** Funds returned to the available balance from a previously held reserve. */\n  RESERVE_RELEASE = 'RESERVE_RELEASE',\n  /** Transfer of funds from the merchant's external account into their Wix Payments account. */\n  TOPUP = 'TOPUP',\n  /** Failure on a previously credited payment, resulting in a deduction from the balance. */\n  CREDIT_FAILED = 'CREDIT_FAILED',\n  /** Fee charged for processing a chargeback. */\n  CHARGEBACK_FEE = 'CHARGEBACK_FEE',\n  /** Reversal of a previously charged chargeback fee. */\n  CHARGEBACK_FEE_REVERSAL = 'CHARGEBACK_FEE_REVERSAL',\n  /** Cash advance disbursed to the merchant from Wix Capital. */\n  CAPITAL_CASH_ADVANCE = 'CAPITAL_CASH_ADVANCE',\n  /** Automatic remittance taken from sales to repay a Wix Capital cash advance. */\n  CAPITAL_AUTOMATIC_REMITTANCE = 'CAPITAL_AUTOMATIC_REMITTANCE',\n  /** Adjustment applied to a Wix Capital cash advance balance. */\n  CAPITAL_ADJUSTMENT = 'CAPITAL_ADJUSTMENT',\n}\n\n/** @enumType */\nexport type BalanceRecordTypeWithLiterals =\n  | BalanceRecordType\n  | 'UNKNOWN'\n  | 'CREDIT'\n  | 'REFUND'\n  | 'CHARGEBACK'\n  | 'REFUND_REVERSAL'\n  | 'CHARGEBACK_REVERSAL'\n  | 'RESERVE_HOLD'\n  | 'RESERVE_RELEASE'\n  | 'TOPUP'\n  | 'CREDIT_FAILED'\n  | 'CHARGEBACK_FEE'\n  | 'CHARGEBACK_FEE_REVERSAL'\n  | 'CAPITAL_CASH_ADVANCE'\n  | 'CAPITAL_AUTOMATIC_REMITTANCE'\n  | 'CAPITAL_ADJUSTMENT';\n\n/**\n * Current effect of a balance record on the account balance.\n *\n * Each record type takes its own path through the values below.\n *\n * Credits (`CREDIT`, `TOPUP`, `REFUND_REVERSAL`, `CHARGEBACK_REVERSAL`,\n * `CHARGEBACK_FEE_REVERSAL`, `CAPITAL_CASH_ADVANCE`) start at `PENDING_CREDIT`, settle to\n * `CREDITED`, and move to `PAID_OUT` once they have been included in a payout.\n *\n * Debits (`REFUND`, `CHARGEBACK`, `CHARGEBACK_FEE`, `CREDIT_FAILED`,\n * `CAPITAL_AUTOMATIC_REMITTANCE`) are deducted from the available balance immediately on\n * creation (`PENDING_DEBIT`), move to `DEBITED` once the operation finalizes, and move to\n * `PAID_OUT` once they have been included in a payout (subtracted from the payout total).\n *\n * A reserve hold (`RESERVE_HOLD`) starts at `RESERVED` while the funds are held back, then\n * moves to `DEDUCTED_FROM_PAYOUT` once the hold has been included in a payout. A reserve\n * release (`RESERVE_RELEASE`) stays at `RESERVED` until its `payoutAvailabilityDate`\n * passes, then moves to `CREDITED`, then `PAID_OUT` like any other credit.\n *\n * Records funded via a Wix Checking book transfer (Instant Access) skip the payout flow:\n * they move directly to `PAID_OUT` because the funds are immediately available.\n *\n * If a payout that included a record is later reversed by the bank, the record's\n * `recordStatus` moves to `PAYOUT_REVERSED` and the record re-enters the available balance.\n */\nexport enum BalanceRecordStatus {\n  /** Unknown balance record status. */\n  UNKNOWN = 'UNKNOWN',\n  /** Funds from this record are added to the available balance once they settle. They aren't yet part of the available balance. */\n  PENDING_CREDIT = 'PENDING_CREDIT',\n  /** Funds from this record are part of the available balance. */\n  CREDITED = 'CREDITED',\n  /**\n   * Funds from this record are held in reserve and aren't part of the available balance.\n   *\n   * Applied to `RESERVE_HOLD` records, and to `RESERVE_RELEASE` records whose `payoutAvailabilityDate` hasn't yet passed.\n   */\n  RESERVED = 'RESERVED',\n  /** Funds from this record have already been deducted from the available balance. The status moves to `DEBITED` once the operation that produced the debit finalizes. */\n  PENDING_DEBIT = 'PENDING_DEBIT',\n  /** Funds from this record have been deducted from the available balance. */\n  DEBITED = 'DEBITED',\n  /**\n   * The record has been included in a payout (regular payout) or made instantly\n   * available via a Wix Checking book transfer (Instant Access). Applies to both credits\n   * and debits. The only record type bundled into a payout that ends at a different\n   * status is `RESERVE_HOLD` (see `DEDUCTED_FROM_PAYOUT`). Check `payoutInfo` versus\n   * `bookTransferInfo` to tell them apart.\n   */\n  PAID_OUT = 'PAID_OUT',\n  /**\n   * A `RESERVE_HOLD` record that has been included in a payout. The held amount was\n   * subtracted from the payout total instead of being sent to the merchant. Only reserve\n   * hold records end at this status; refunds, chargebacks, and other debits in a payout\n   * end at `PAID_OUT`.\n   */\n  DEDUCTED_FROM_PAYOUT = 'DEDUCTED_FROM_PAYOUT',\n  /** Funds from this record were in a payout that has since failed and been reversed. The reversal returns the funds to the available balance. */\n  PAYOUT_REVERSED = 'PAYOUT_REVERSED',\n}\n\n/** @enumType */\nexport type BalanceRecordStatusWithLiterals =\n  | BalanceRecordStatus\n  | 'UNKNOWN'\n  | 'PENDING_CREDIT'\n  | 'CREDITED'\n  | 'RESERVED'\n  | 'PENDING_DEBIT'\n  | 'DEBITED'\n  | 'PAID_OUT'\n  | 'DEDUCTED_FROM_PAYOUT'\n  | 'PAYOUT_REVERSED';\n\nexport interface PaymentInfo {\n  /**\n   * ID of the Wix Payments transaction that produced this balance record.\n   * @format GUID\n   */\n  transactionId?: string;\n  /** Date and time the underlying payment was created. */\n  _createdDate?: Date | null;\n  /**\n   * External transaction ID supplied by the merchant's order system, if any.\n   * @maxLength 100\n   */\n  externalTransactionId?: string | null;\n  /**\n   * External order ID supplied by the merchant's order system, if any.\n   * @maxLength 100\n   */\n  externalOrderId?: string | null;\n  /**\n   * Display-friendly external order ID, suitable for showing in a UI.\n   * @maxLength 100\n   */\n  externalDisplayOrderId?: string | null;\n  /**\n   * Link to the order in the merchant's external order management system.\n   * @maxLength 1000\n   */\n  externalOrderLink?: string | null;\n  /**\n   * Customer's name as captured by the payment flow.\n   * @maxLength 1000\n   */\n  customerName?: string | null;\n  /**\n   * Cardholder's name as captured at payment time.\n   * @maxLength 1000\n   */\n  cardHolderName?: string | null;\n  /**\n   * Payment method used for the underlying transaction.\n   *\n   * Deprecated. Use `paymentMethodTypeId` instead.\n   * @deprecated Payment method used for the underlying transaction.\n   *\n   * Deprecated. Use `paymentMethodTypeId` instead.\n   * @replacedBy balance_record.payment_info.payment_method_type_id\n   * @targetRemovalDate 2027-05-31\n   */\n  paymentMethodType?: PaymentMethodTypeWithLiterals;\n  /**\n   * Identifier of the payment method used for the underlying transaction.\n   * @internal\n   * @readonly\n   * @maxLength 100\n   */\n  paymentMethodTypeId?: string | null;\n}\n\nexport interface ReserveInfo {\n  /** Payout details for the hold portion of the reserve, where funds are removed from the available balance. */\n  hold?: PayoutInfo;\n  /** Payout details for the release portion of the reserve, where funds are returned to the available balance. */\n  release?: PayoutInfo;\n  /**\n   * History of changes applied to this reserve, ordered by event time.\n   * @maxSize 100\n   */\n  reserveHistoryItems?: ReserveHistoryItem[];\n  /** Reserve type that determines how the reserve was created. */\n  reserveType?: ReserveTypeWithLiterals;\n  /**\n   * ID of the BackOffice activity that triggered creation of the reserve.\n   *\n   * Available only for 1-time reserves (where `reserveType` is `ONE_TIME`).\n   * @internal\n   * @format GUID\n   */\n  creationActivityId?: string | null;\n}\n\nexport interface BookTransferInfo {\n  /**\n   * ID of the book transfer that funded this balance record.\n   * @format GUID\n   */\n  bookTransferId?: string;\n  /**\n   * External reference for the book transfer transaction.\n   * @maxLength 100\n   */\n  transactionReference?: string;\n  /** Date and time the funds became instantly available through the book transfer. */\n  _createdDate?: Date | null;\n}\n\nexport interface ListBalanceRecordsRequest {\n  /**\n   * ID of the Wix Payments account that owns the balance records. Retrieve account IDs from the Accounts API.\n   * @format GUID\n   */\n  accountId?: string;\n  /**\n   * Returns records that belong to the specified Wix Payments account profile.\n   * @format GUID\n   */\n  accountProfileId?: string | null;\n  /**\n   * One or more tag filter values to apply.\n   *\n   * Each tag is a named shortcut that the server expands into a composite filter on `recordStatus`, type, `payoutAvailabilityDate`, and `payoutInfo.payoutId`. Tags aren't stored on records. See `BalanceRecordTag` for supported values.\n   *\n   * When `tags` includes `ESTIMATED_RESERVE_HOLD` or `ESTIMATED_RESERVE_RELEASE`, the first\n   * record in the response is virtual: it's calculated on the fly from the current account\n   * balance and has no `id` and no `appliedDate`.\n   * @maxSize 100\n   */\n  tags?: BalanceRecordTagWithLiterals[];\n  /**\n   * Returns records included in the specified payout.\n   * @format GUID\n   */\n  payoutId?: string | null;\n  /**\n   * Returns records linked to the specified transaction.\n   * @format GUID\n   */\n  transactionId?: string | null;\n  /** Returns records whose `paymentInfo.createdDate` is before this date. */\n  paymentCreatedBefore?: Date | null;\n  /** Returns records whose `paymentInfo.createdDate` is after this date. */\n  paymentCreatedAfter?: Date | null;\n  /** Returns records whose `appliedDate` is before this date. */\n  appliedBefore?: Date | null;\n  /** Returns records whose `appliedDate` is after this date. */\n  appliedAfter?: Date | null;\n  /** Returns records whose `createdDate` is before this date. */\n  createdBefore?: Date | null;\n  /** Returns records whose `createdDate` is after this date. */\n  createdAfter?: Date | null;\n  /**\n   * Filter by balance record types. Returns records that match any of the listed values.\n   * @maxSize 100\n   */\n  types?: BalanceRecordTypeWithLiterals[];\n  /**\n   * Sort options for the result list.\n   *\n   * `fieldName` accepts `applied_date`, `payment_info.created_date`, or `created_date` (snake_case, not auto-converted). At most 1 sort field is allowed.\n   *\n   * `order` controls direction: `ASC` for ascending (oldest first, since all sortable fields are dates); `DESC` for descending (newest first).\n   *\n   * Default: `applied_date` in `ASC` order.\n   */\n  sort?: Sorting;\n  /**\n   * Paging options.\n   *\n   * Set `paging.limit` to `0` to retrieve only metadata and summary without records.\n   */\n  paging?: Paging;\n  /**\n   * Whether to include the aggregated `summary` in the response.\n   *\n   * When `true`, totals are computed across the records that matched the filter (not across\n   * the whole account) and returned in `summary`.\n   *\n   * Default: `false`\n   */\n  includeSummary?: boolean;\n  /**\n   * Whether to omit the total record count from `metadata.total`.\n   *\n   * Omitting the total can improve performance on large result sets.\n   *\n   * Default: `false`\n   */\n  excludeTotal?: boolean;\n}\n\n/**\n * Predefined filter value you can pass to List Balance Records and Query Balance Records.\n *\n * Tags aren't stored on balance records, and you can't apply them yourself. Each tag is a named shortcut that the server expands at query time into a composite filter on `recordStatus`, type, `payoutAvailabilityDate`, and `payoutInfo.payoutId`. You can pass multiple tags in a single request.\n */\nexport enum BalanceRecordTag {\n  /** Unknown balance record tag. */\n  UNKNOWN = 'UNKNOWN',\n  /** Settled credits and debits not yet paid out (`recordStatus` is `CREDITED` or `DEBITED`). */\n  AVAILABLE = 'AVAILABLE',\n  /** Credits still in their pending period (`recordStatus` is `PENDING_CREDIT`). */\n  PENDING = 'PENDING',\n  /** `RESERVE_HOLD` and `RESERVE_RELEASE` records currently at `recordStatus` `RESERVED`. */\n  RESERVE = 'RESERVE',\n  /**\n   * `RESERVE_HOLD` records, with a virtual record (a projection of the next hold) as the first result.\n   *\n   * The virtual record is calculated on the fly from the current available balance and has no `id` or `appliedDate`.\n   */\n  ESTIMATED_RESERVE_HOLD = 'ESTIMATED_RESERVE_HOLD',\n  /**\n   * `RESERVE_RELEASE` records, with a virtual record (a projection of the next release) as the first result.\n   *\n   * The virtual record is calculated on the fly from the current available balance and has no `id` or `appliedDate`.\n   */\n  ESTIMATED_RESERVE_RELEASE = 'ESTIMATED_RESERVE_RELEASE',\n  /** `RESERVE_RELEASE` records past their `payoutAvailabilityDate`. */\n  RESERVE_RELEASED = 'RESERVE_RELEASED',\n  /** `TOPUP` records at `recordStatus` `PENDING_CREDIT`. */\n  PENDING_TOPUP = 'PENDING_TOPUP',\n  /** Any balance record already included in a payout (`recordStatus` is `PAID_OUT` or `DEDUCTED_FROM_PAYOUT`). */\n  PAID_OUT = 'PAID_OUT',\n  /** Any balance record not yet included in any payout. */\n  NOT_PAID_OUT = 'NOT_PAID_OUT',\n}\n\n/** @enumType */\nexport type BalanceRecordTagWithLiterals =\n  | BalanceRecordTag\n  | 'UNKNOWN'\n  | 'AVAILABLE'\n  | 'PENDING'\n  | 'RESERVE'\n  | 'ESTIMATED_RESERVE_HOLD'\n  | 'ESTIMATED_RESERVE_RELEASE'\n  | 'RESERVE_RELEASED'\n  | 'PENDING_TOPUP'\n  | 'PAID_OUT'\n  | 'NOT_PAID_OUT';\n\nexport interface Sorting {\n  /**\n   * Name of the field to sort by.\n   * @maxLength 512\n   */\n  fieldName?: string;\n  /** Sort order. */\n  order?: SortOrderWithLiterals;\n  /**\n   * When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by\n   * a specific element from a collection, filter can/should be provided to ensure correct sort value is picked.\n   *\n   * If multiple filters are provided, they are combined with AND operator.\n   *\n   * Example:\n   * Given we have document like {\"id\": \"1\", \"nestedField\": [{\"price\": 10, \"region\": \"EU\"}, {\"price\": 20, \"region\": \"US\"}]}\n   * and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be\n   * { fieldName: \"nestedField.price\", \"select_items_by\": [{\"nestedField.region\": \"US\"}] }\n   * @internal\n   * @maxSize 10\n   */\n  selectItemsBy?: Record<string, any>[] | null;\n  /**\n   * Origin point for geo-distance sorting on a GEO field\n   * results are ordered by distance from this point (ASC = nearest first, DESC = farthest first).\n   */\n  origin?: AddressLocation;\n}\n\nexport enum SortOrder {\n  ASC = 'ASC',\n  DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface AddressLocation {\n  /** Address latitude. */\n  latitude?: number | null;\n  /** Address longitude. */\n  longitude?: number | null;\n}\n\nexport interface Paging {\n  /** Number of items to load. */\n  limit?: number | null;\n  /** Number of items to skip in the current sort order. */\n  offset?: number | null;\n}\n\nexport interface ListBalanceRecordsResponse {\n  /**\n   * Retrieved balance records.\n   * @maxSize 1000\n   */\n  records?: BalanceRecord[];\n  /** Paging metadata for the response. */\n  metadata?: PagingMetadata;\n  /**\n   * Aggregated summary across the records that matched the filter.\n   *\n   * Returned only when `includeSummary` is `true`.\n   */\n  summary?: BalanceRecordsSummary;\n}\n\nexport interface PagingMetadata {\n  /** Number of items returned in the response. */\n  count?: number | null;\n  /** Offset that was requested. */\n  offset?: number | null;\n  /** Total number of items that match the query. */\n  total?: number | null;\n  /** Flag that indicates the server failed to calculate the `total` field. */\n  tooManyToCount?: boolean | null;\n  /**\n   * Indicates if there are more results after the current page.\n   * If `true`, another page of results can be retrieved.\n   * If `false`, this is the last page.\n   * @internal\n   */\n  hasNext?: boolean | null;\n}\n\n/**\n * Aggregated summary of balance records, grouped by category.\n *\n * Returned in List Balance Records and Query Balance Records responses when `includeSummary`\n * is `true`. The category-level breakdown is in `items`. The `total*` fields aggregate across\n * all matched records.\n */\nexport interface BalanceRecordsSummary {\n  /** Net total across all matched records. */\n  total?: Money;\n  /** Gross total across all matched records, before fees. */\n  totalAmount?: Money;\n  /** Total fees across all matched records. */\n  totalFees?: Money;\n  /** Total net amount across all matched records, equivalent to `total`. */\n  totalNet?: Money;\n  /**\n   * Per-category breakdown of the aggregated records.\n   * @maxSize 100\n   */\n  items?: BalanceRecordsSummaryItem[];\n}\n\nexport interface BalanceRecordsSummaryItem {\n  /**\n   * Category of records aggregated by this item.\n   *\n   * Deprecated. Use `summaryItemType` instead.\n   * @deprecated Category of records aggregated by this item.\n   *\n   * Deprecated. Use `summaryItemType` instead.\n   * @replacedBy balance_records_summary_item.summary_item_type\n   * @targetRemovalDate 2027-05-31\n   */\n  summaryType?: BalanceRecordsSummaryItemTypeWithLiterals;\n  /** Category of records aggregated by this item. */\n  summaryItemType?: BalanceRecordsSummaryItemTypeWithLiterals;\n  /** Gross amount for this category, before fees. */\n  amount?: Money;\n  /** Total fees for this category. */\n  fees?: Money;\n  /** Net amount for this category, after fees. */\n  net?: Money;\n}\n\n/** Category used to group balance records in a summary. */\nexport enum BalanceRecordsSummaryItemType {\n  /** Unknown summary item type. */\n  UNKNOWN = 'UNKNOWN',\n  /** All payments from buyers to the account. */\n  CREDITS = 'CREDITS',\n  /** All refunds issued to buyers. */\n  REFUNDS = 'REFUNDS',\n  /** All chargebacks and chargeback fees. */\n  CHARGEBACKS = 'CHARGEBACKS',\n  /** All reserve holds. */\n  RESERVE_HOLDS = 'RESERVE_HOLDS',\n  /** All reserve releases. */\n  RESERVE_RELEASES = 'RESERVE_RELEASES',\n  /** All top-ups into the account. */\n  FUNDS_ADDED = 'FUNDS_ADDED',\n  /** All transfers between accounts. */\n  FUNDS_TRANSFERRED = 'FUNDS_TRANSFERRED',\n  /** All Wix Capital movements, including cash advances, automatic remittances, and adjustments. */\n  CAPITAL = 'CAPITAL',\n}\n\n/** @enumType */\nexport type BalanceRecordsSummaryItemTypeWithLiterals =\n  | BalanceRecordsSummaryItemType\n  | 'UNKNOWN'\n  | 'CREDITS'\n  | 'REFUNDS'\n  | 'CHARGEBACKS'\n  | 'RESERVE_HOLDS'\n  | 'RESERVE_RELEASES'\n  | 'FUNDS_ADDED'\n  | 'FUNDS_TRANSFERRED'\n  | 'CAPITAL';\n\nexport interface GetBalanceRecordRequest {\n  /**\n   * ID of the Wix Payments account that owns the balance record. The record must belong to this account. Retrieve account IDs from the Accounts API.\n   * @format GUID\n   */\n  accountId: string;\n  /**\n   * Balance record ID.\n   * @format GUID\n   */\n  balanceRecordId: string;\n}\n\nexport interface GetBalanceRecordResponse {\n  /** Retrieved balance record. */\n  record?: BalanceRecord;\n}\n\nexport interface QueryBalanceRecordsRequest {\n  /**\n   * ID of the Wix Payments account that owns the balance records. Retrieve account IDs from the Accounts API.\n   * @format GUID\n   */\n  accountId: string;\n  /**\n   * Query object that supports filtering, sorting, and paging.\n   *\n   * Filter and sort field names must be **snake_case**. They're read from the `filter`\n   * object and aren't auto-converted. Supported filter fields: `account_profile_id`,\n   * `tags`, `payout_id`, `transaction_id`, `types`, and the date ranges\n   * `transaction_creation_date`, `paid`, and `created_date`. Any other field returns\n   * an `Unsupported query: unknown parameter <field>` error. ID fields accept a single\n   * value by equality, `tags` and `types` accept `$in`, and date-range fields accept `$gte`\n   * and `$lt`. Supported `sort[i].fieldName` values: `applied_date`,\n   * `payment_info.created_date`, `created_date`. At most 1 sort field is allowed.\n   */\n  query?: Query;\n  /**\n   * Whether to include the aggregated `summary` in the response.\n   *\n   * When `true`, totals are computed across the records that matched the query (not across\n   * the whole account) and returned in `summary`.\n   *\n   * Default: `false`\n   */\n  includeSummary?: boolean;\n  /**\n   * Whether to omit the total record count from `metadata.total`.\n   *\n   * Omitting the total can improve performance on large result sets.\n   *\n   * Default: `false`\n   */\n  excludeTotal?: boolean;\n}\n\nexport interface Query {\n  /**\n   * Filter object in the following format:\n   * `\"filter\" : {\n   * \"fieldName1\": \"value1\",\n   * \"fieldName2\":{\"$operator\":\"value2\"}\n   * }`\n   * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`\n   */\n  filter?: any;\n  /**\n   * Sort object in the following format:\n   * `[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]`\n   */\n  sort?: Sorting[];\n  /** Paging options to limit and skip the number of items. */\n  paging?: Paging;\n  /** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */\n  fields?: string[];\n  /** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */\n  fieldsets?: string[];\n}\n\nexport interface QueryBalanceRecordsResponse {\n  /**\n   * Retrieved balance records.\n   * @maxSize 1000\n   */\n  records?: BalanceRecord[];\n  /** Paging metadata for the response. */\n  metadata?: PagingMetadata;\n  /**\n   * Aggregated summary across the records that matched the query.\n   *\n   * Returned only when `includeSummary` is `true`.\n   */\n  summary?: BalanceRecordsSummary;\n}\n\nexport interface GetBalanceSummaryRequest {\n  /**\n   * ID of the Wix Payments account to summarize. Retrieve account IDs from the Accounts API.\n   * @format GUID\n   */\n  accountId?: string;\n  /**\n   * Field mask of summary categories to include in the response.\n   *\n   * Supported paths: `scheduled`, `processing`, `funds_on_hold`, `payouts_being_verified`,\n   * `payouts_under_minimum_amount`, `negative`, `reserve`, `blocked`, `modal`. Any other\n   * path is rejected.\n   *\n   * When omitted, all applicable categories are returned. When sent with one or more paths,\n   * only the listed categories are populated. When sent as an empty mask, no categories are\n   * populated.\n   */\n  fields?: string[];\n}\n\nexport interface GetBalanceSummaryResponse {\n  /**\n   * Retrieved balance summary.\n   *\n   * Only the categories requested through `fields` are populated.\n   */\n  summary?: BalanceSummary;\n}\n\n/**\n * Aggregated balance summary for a Wix Payments account.\n *\n * Each top-level field represents a balance category. Categories are populated based on the\n * `fields` mask sent in the Get Balance Summary request, and on the account's current state:\n * categories are returned conditionally so the set returned is itself a signal about the\n * account.\n */\nexport interface BalanceSummary {\n  /** Funds scheduled for an upcoming payout, with profile-level breakdown. */\n  scheduled?: ScheduledBalance;\n  /** Funds currently being processed and not yet available, with profile-level breakdown. */\n  processing?: ProcessingBalance;\n  /** Funds on hold that can't currently move to a payout, for example because of a failed payout, with profile-level breakdown. */\n  fundsOnHold?: FundsOnHoldBalance;\n  /** Funds held in payouts that are undergoing verification before they can be released, with profile-level breakdown. */\n  payoutsBeingVerified?: PayoutsBeingVerifiedBalance;\n  /** Funds that are ready but haven't reached the minimum payout amount, with profile-level breakdown. */\n  payoutsUnderMinimumAmount?: PayoutsUnderMinimumAmountBalance;\n  /** Negative balance owed by the merchant, with profile-level breakdown and suggested top-up amounts. */\n  negative?: NegativeBalance;\n  /** Funds held in reserve, with profile-level breakdown and reserve motivation. */\n  reserve?: ReserveBalance;\n  /** Funds blocked from payout by an internal operational hold, with profile-level breakdown. */\n  blocked?: BlockedBalance;\n  /** Additional account-level data used to render reserve and pending-period explanatory views in client UIs. */\n  modal?: ModalData;\n}\n\nexport interface ScheduledBalance {\n  /** Total amount scheduled for the next payout across all profiles. */\n  amount?: Money;\n  /**\n   * Per-profile breakdown of the scheduled balance.\n   * @maxSize 100\n   */\n  profiles?: ScheduledProfileBalance[];\n}\n\nexport interface ScheduledProfileBalance {\n  /**\n   * ID of the Wix Payments account profile.\n   * @format GUID\n   */\n  accountProfileId?: string;\n  /** Amount scheduled for the next payout for this profile. */\n  amount?: Money;\n  /**\n   * Tags associated with the records aggregated into this balance.\n   * @maxSize 100\n   */\n  tags?: BalanceRecordTagWithLiterals[];\n  /**\n   * Date the payout is scheduled to be sent, in `YYYY-MM-DD` format.\n   * @format LOCAL_DATE\n   */\n  scheduledDate?: string | null;\n  /** Whether the amount includes a Wix Capital cash advance component. */\n  cashAdvanceIncluded?: boolean;\n}\n\nexport interface ProcessingBalance {\n  /** Total amount currently being processed across all profiles. */\n  amount?: Money;\n  /**\n   * Per-profile breakdown of the processing balance.\n   * @maxSize 100\n   */\n  profiles?: ProcessingProfileBalance[];\n  /** Start of the date range covered by the processing aggregation. */\n  aggregatedFromDate?: Date | null;\n  /** End of the date range covered by the processing aggregation. */\n  aggregatedToDate?: Date | null;\n  /** Length of the pending period during which each payment waits before becoming available. */\n  paymentPendingPeriod?: Period;\n}\n\nexport interface ProcessingProfileBalance {\n  /**\n   * ID of the Wix Payments account profile.\n   * @format GUID\n   */\n  accountProfileId?: string;\n  /** Amount currently being processed for this profile. */\n  amount?: Money;\n  /**\n   * Tags associated with the records aggregated into this balance.\n   * @maxSize 100\n   */\n  tags?: BalanceRecordTagWithLiterals[];\n  /** Whether the amount includes a Wix Capital cash advance component. */\n  cashAdvanceIncluded?: boolean;\n}\n\nexport interface Period {\n  /** The number of units */\n  value?: number;\n  /** The unit type */\n  unit?: PeriodUnitWithLiterals;\n}\n\nexport enum PeriodUnit {\n  UNKNOWN = 'UNKNOWN',\n  DAY = 'DAY',\n  BUSINESS_DAY = 'BUSINESS_DAY',\n}\n\n/** @enumType */\nexport type PeriodUnitWithLiterals =\n  | PeriodUnit\n  | 'UNKNOWN'\n  | 'DAY'\n  | 'BUSINESS_DAY';\n\nexport interface FundsOnHoldBalance {\n  /** Total amount on hold across all profiles. */\n  amount?: Money;\n  /**\n   * Per-profile breakdown of funds on hold.\n   * @maxSize 100\n   */\n  profiles?: FundsOnHoldProfileBalance[];\n}\n\nexport interface FundsOnHoldProfileBalance {\n  /**\n   * ID of the Wix Payments account profile.\n   * @format GUID\n   */\n  accountProfileId?: string;\n  /** Amount on hold for this profile. */\n  amount?: Money;\n  /**\n   * Tags associated with the records aggregated into this balance.\n   * @maxSize 100\n   */\n  tags?: BalanceRecordTagWithLiterals[];\n  /**\n   * ID of the most recent payout that failed for the current bank details and caused funds to be placed on hold.\n   * @format GUID\n   */\n  problematicPayoutId?: string | null;\n  /** Whether the amount includes a Wix Capital cash advance component. */\n  cashAdvanceIncluded?: boolean;\n}\n\nexport interface PayoutsBeingVerifiedBalance {\n  /** Total amount held in payouts being verified across all profiles. */\n  amount?: Money;\n  /**\n   * Per-profile breakdown of payouts being verified.\n   * @maxSize 100\n   */\n  profiles?: PayoutsBeingVerifiedProfileBalance[];\n}\n\nexport interface PayoutsBeingVerifiedProfileBalance {\n  /**\n   * ID of the Wix Payments account profile.\n   * @format GUID\n   */\n  accountProfileId?: string;\n  /** Amount being verified for this profile. */\n  amount?: Money;\n  /**\n   * Tags associated with the records aggregated into this balance.\n   * @maxSize 100\n   */\n  tags?: BalanceRecordTagWithLiterals[];\n  /** Whether the amount includes a Wix Capital cash advance component. */\n  cashAdvanceIncluded?: boolean;\n}\n\nexport interface PayoutsUnderMinimumAmountBalance {\n  /** Total amount below the minimum payout threshold across all profiles. */\n  amount?: Money;\n  /**\n   * Per-profile breakdown of balances that are below the minimum payout threshold.\n   * @maxSize 100\n   */\n  profiles?: PayoutsUnderMinimumAmountProfileBalance[];\n  /** Minimum payout amount configured for the account. */\n  minPayoutAmount?: Money;\n}\n\nexport interface PayoutsUnderMinimumAmountProfileBalance {\n  /**\n   * ID of the Wix Payments account profile.\n   * @format GUID\n   */\n  accountProfileId?: string;\n  /** Amount available for this profile that doesn't yet meet the minimum payout threshold. */\n  amount?: Money;\n  /**\n   * Tags associated with the records aggregated into this balance.\n   * @maxSize 100\n   */\n  tags?: BalanceRecordTagWithLiterals[];\n  /** Whether the amount includes a Wix Capital cash advance component. */\n  cashAdvanceIncluded?: boolean;\n}\n\nexport interface NegativeBalance {\n  /** Total negative balance owed across all profiles. Returned as a negative or zero amount. */\n  amount?: Money;\n  /**\n   * Per-profile breakdown of the negative balance.\n   * @maxSize 100\n   */\n  profiles?: NegativeProfileBalance[];\n  /** Suggested top-up amount that would clear the negative balance. */\n  suggestedTopupAmount?: Money;\n}\n\nexport interface NegativeProfileBalance {\n  /**\n   * ID of the Wix Payments account profile.\n   * @format GUID\n   */\n  accountProfileId?: string;\n  /** Negative amount owed for this profile. */\n  amount?: Money;\n  /**\n   * Tags associated with the records aggregated into this balance.\n   * @maxSize 100\n   */\n  tags?: BalanceRecordTagWithLiterals[];\n  /** Smallest top-up amount that the merchant is allowed to submit for this profile. */\n  minTopupAmount?: Money;\n  /** Largest top-up amount that the merchant is allowed to submit for this profile. */\n  maxTopupAmount?: Money;\n  /** Recommended top-up amount for this profile that brings the balance non-negative. */\n  suggestedTopupAmount?: Money;\n  /** Whether the amount includes a Wix Capital cash advance component. */\n  cashAdvanceIncluded?: boolean;\n}\n\nexport interface ReserveBalance extends ReserveBalanceMotivationOneOf {\n  /** Reserve policy that automatically generates the reserve. */\n  reservePolicy?: ReservePolicy;\n  /** Reserve that was created explicitly for a 1-time event. */\n  explicitReserve?: ExplicitReserve;\n  /** Total amount currently held in reserve across all profiles. */\n  amount?: Money;\n  /**\n   * Per-profile breakdown of the reserve balance.\n   * @maxSize 100\n   */\n  profiles?: ReserveProfileBalance[];\n}\n\n/** @oneof */\nexport interface ReserveBalanceMotivationOneOf {\n  /** Reserve policy that automatically generates the reserve. */\n  reservePolicy?: ReservePolicy;\n  /** Reserve that was created explicitly for a 1-time event. */\n  explicitReserve?: ExplicitReserve;\n}\n\nexport interface ReserveProfileBalance {\n  /**\n   * ID of the Wix Payments account profile.\n   * @format GUID\n   */\n  accountProfileId?: string;\n  /** Amount currently held in reserve for this profile. */\n  amount?: Money;\n  /**\n   * Tags associated with the records aggregated into this balance.\n   * @maxSize 100\n   */\n  tags?: BalanceRecordTagWithLiterals[];\n}\n\nexport interface ReservePolicy {\n  /**\n   * Percentage of the available balance that's held in reserve.\n   * @min 1\n   * @max 99\n   */\n  percentage?: number;\n  /** Length of time each portion of the reserve is held before it's released. */\n  period?: Period;\n}\n\n/** Indicates a reserve that was created explicitly for a specific event, with no further configuration. */\nexport interface ExplicitReserve {}\n\nexport interface BlockedBalance {\n  /** Total amount blocked from payout across all profiles. */\n  amount?: Money;\n  /**\n   * Per-profile breakdown of the blocked balance.\n   * @maxSize 100\n   */\n  profiles?: BlockedProfileBalance[];\n}\n\nexport interface BlockedProfileBalance {\n  /**\n   * ID of the Wix Payments account profile.\n   * @format GUID\n   */\n  accountProfileId?: string;\n  /** Amount blocked from payout for this profile. */\n  amount?: Money;\n  /**\n   * Tags associated with the records aggregated into this balance.\n   * @maxSize 100\n   */\n  tags?: BalanceRecordTagWithLiterals[];\n  /** Whether the amount includes a Wix Capital cash advance component. */\n  cashAdvanceIncluded?: boolean;\n}\n\n/** Account-level metadata used by clients to render reserve and pending-period explanatory views. */\nexport interface ModalData {\n  /** Merchant's active reserve policy, if any. */\n  reservePolicy?: ReservePolicy;\n  /** Merchant's configured pending period. */\n  paymentPendingPeriod?: Period;\n}\n\n/**\n * Retrieves a single balance record by ID for the specified account.\n *\n * Returns an error if the record doesn't exist or doesn't belong to the specified account.\n * @param balanceRecordId - Balance record ID.\n * @param accountId - ID of the Wix Payments account that owns the balance record. The record must belong to this account. Retrieve account IDs from the Accounts API.\n * @public\n * @documentationMaturity preview\n * @requiredField accountId\n * @requiredField balanceRecordId\n * @permissionId PAYMENTS.BALANCE_READ\n * @applicableIdentity APP\n * @returns Retrieved balance record.\n * @fqn wix.payments.v5.balances.BalanceRecordsService.GetBalanceRecord\n */\nexport async function getBalanceRecord(\n  balanceRecordId: string,\n  accountId: string\n): Promise<\n  NonNullablePaths<\n    BalanceRecord,\n    | `accountId`\n    | `accountProfileId`\n    | `amount.value`\n    | `amount.currency`\n    | `recordType`\n    | `recordStatus`\n    | `paymentInfo.transactionId`\n    | `paymentInfo.paymentMethodType`\n    | `payoutInfo.payoutId`\n    | `reserveInfo.reserveHistoryItems`\n    | `reserveInfo.reserveType`\n    | `bookTransferInfo.bookTransferId`\n    | `bookTransferInfo.transactionReference`,\n    1\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    balanceRecordId: balanceRecordId,\n    accountId: accountId,\n  });\n\n  const reqOpts =\n    ambassadorWixPaymentsBalancesV5BalanceRecord.getBalanceRecord(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)?.record!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          balanceRecordId: '$[0]',\n          accountId: '$[1]',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['balanceRecordId', 'accountId']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Retrieves a list of up to 1000 balance records, given the provided paging, filtering, and sorting.\n *\n * Query Balance Records runs with these defaults, which you can override:\n *\n * - `query.sort[0].fieldName` is `applied_date` in `ASC` order\n * - `query.paging.limit` is `20`\n * - `query.paging.offset` is `0` (and `offset` is required when `paging` is set)\n *\n * Filter and sort field names inside `query` must be **snake_case**. They're read from\n * the `query.filter` object and aren't auto-converted. Supported filter fields:\n * `account_profile_id`, `tags`, `payout_id`, `transaction_id`, `types`, and the date\n * ranges `transaction_creation_date`, `paid`, and `created_date`. Any other field returns\n * an `Unsupported query: unknown parameter <field>` error. ID fields accept a single\n * value by equality, `tags` and `types` accept `$in`, and date-range fields accept `$gte`\n * and `$lt`. Supported `sort[i].fieldName` values: `applied_date`,\n * `payment_info.created_date`, `created_date`. At most 1 sort field is allowed.\n *\n * To list every balance record in a payout, filter by `payout_id`.\n *\n * To learn about working with Query methods, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language),\n * [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging),\n * and [Field Projection](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-field-projection).\n * @param accountId - ID of the Wix Payments account that owns the balance records. Retrieve account IDs from the Accounts API.\n * @public\n * @documentationMaturity preview\n * @requiredField accountId\n * @permissionId PAYMENTS.BALANCE_READ\n * @applicableIdentity APP\n * @fqn wix.payments.v5.balances.BalanceRecordsService.QueryBalanceRecords\n */\nexport async function queryBalanceRecords(\n  accountId: string,\n  options?: QueryBalanceRecordsOptions\n): Promise<\n  NonNullablePaths<\n    QueryBalanceRecordsResponse,\n    | `records`\n    | `records.${number}.accountId`\n    | `records.${number}.accountProfileId`\n    | `records.${number}.amount.value`\n    | `records.${number}.amount.currency`\n    | `records.${number}.recordType`\n    | `records.${number}.recordStatus`\n    | `records.${number}.paymentInfo.transactionId`\n    | `records.${number}.paymentInfo.paymentMethodType`\n    | `records.${number}.payoutInfo.payoutId`\n    | `records.${number}.reserveInfo.reserveType`\n    | `records.${number}.bookTransferInfo.bookTransferId`\n    | `records.${number}.bookTransferInfo.transactionReference`\n    | `summary.total.value`\n    | `summary.total.currency`\n    | `summary.items`\n    | `summary.items.${number}.summaryType`\n    | `summary.items.${number}.summaryItemType`,\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    accountId: accountId,\n    query: options?.query,\n    includeSummary: options?.includeSummary,\n    excludeTotal: options?.excludeTotal,\n  });\n\n  const reqOpts =\n    ambassadorWixPaymentsBalancesV5BalanceRecord.queryBalanceRecords(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          query: '$[1].query',\n          includeSummary: '$[1].includeSummary',\n          excludeTotal: '$[1].excludeTotal',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['accountId', 'options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface QueryBalanceRecordsOptions {\n  /**\n   * Query object that supports filtering, sorting, and paging.\n   *\n   * Filter and sort field names must be **snake_case**. They're read from the `filter`\n   * object and aren't auto-converted. Supported filter fields: `account_profile_id`,\n   * `tags`, `payout_id`, `transaction_id`, `types`, and the date ranges\n   * `transaction_creation_date`, `paid`, and `created_date`. Any other field returns\n   * an `Unsupported query: unknown parameter <field>` error. ID fields accept a single\n   * value by equality, `tags` and `types` accept `$in`, and date-range fields accept `$gte`\n   * and `$lt`. Supported `sort[i].fieldName` values: `applied_date`,\n   * `payment_info.created_date`, `created_date`. At most 1 sort field is allowed.\n   */\n  query?: Query;\n  /**\n   * Whether to include the aggregated `summary` in the response.\n   *\n   * When `true`, totals are computed across the records that matched the query (not across\n   * the whole account) and returned in `summary`.\n   *\n   * Default: `false`\n   */\n  includeSummary?: boolean;\n  /**\n   * Whether to omit the total record count from `metadata.total`.\n   *\n   * Omitting the total can improve performance on large result sets.\n   *\n   * Default: `false`\n   */\n  excludeTotal?: boolean;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\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 resolveWixPaymentsV5BalancesBalanceRecordsServiceUrl(\n  opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n  const domainToMappings = {\n    'cronulla-jobs._base_domain_': [\n      {\n        srcPath: '/wix-payments/wixpay-balance-service/internal-api/jobs',\n        destPath: '/internal-api/jobs',\n      },\n    ],\n    'bo._base_domain_': [\n      {\n        srcPath: '/_api/wixpay-balance-service/v4/bo-balance-summary',\n        destPath: '/v4/bo-balance-summary',\n      },\n      {\n        srcPath: '/_api/transaction-service/v4/bo-balance-summary',\n        destPath: '/v4/bo-balance-summary',\n      },\n      {\n        srcPath: '/_api/wixpay-balance-service/v5/balance-records',\n        destPath: '/v5/balance-records',\n      },\n      {\n        srcPath: '/_api/wixpay-balance-service/v5/balance-summary',\n        destPath: '/v5/balance-summary',\n      },\n      {\n        srcPath: '/_api/transaction-service/v5/balance-records',\n        destPath: '/v5/balance-records',\n      },\n      {\n        srcPath: '/_api/transaction-service/v5/balance-summary',\n        destPath: '/v5/balance-summary',\n      },\n      {\n        srcPath:\n          '/_api/wixpay-balance-service/v1/bo-balance-reserve-transactions',\n        destPath: '/v1/bo-balance-reserve-transactions',\n      },\n      {\n        srcPath:\n          '/_api/wixpay-balance-service/v1/bulk/bo-balance-reserve-transactions/update',\n        destPath: '/v1/bulk/bo-balance-reserve-transactions/update',\n      },\n      {\n        srcPath:\n          '/_api/wixpay-balance-service/v1/bulk/bo-balance-reserve-transactions/release',\n        destPath: '/v1/bulk/bo-balance-reserve-transactions/release',\n      },\n    ],\n    'wixbo.ai': [\n      {\n        srcPath: '/_api/wixpay-balance-service/v4/bo-balance-summary',\n        destPath: '/v4/bo-balance-summary',\n      },\n      {\n        srcPath: '/_api/transaction-service/v4/bo-balance-summary',\n        destPath: '/v4/bo-balance-summary',\n      },\n      {\n        srcPath: '/_api/wixpay-balance-service/v5/balance-records',\n        destPath: '/v5/balance-records',\n      },\n      {\n        srcPath: '/_api/wixpay-balance-service/v5/balance-summary',\n        destPath: '/v5/balance-summary',\n      },\n      {\n        srcPath: '/_api/transaction-service/v5/balance-records',\n        destPath: '/v5/balance-records',\n      },\n      {\n        srcPath: '/_api/transaction-service/v5/balance-summary',\n        destPath: '/v5/balance-summary',\n      },\n      {\n        srcPath:\n          '/_api/wixpay-balance-service/v1/bo-balance-reserve-transactions',\n        destPath: '/v1/bo-balance-reserve-transactions',\n      },\n      {\n        srcPath:\n          '/_api/wixpay-balance-service/v1/bulk/bo-balance-reserve-transactions/update',\n        destPath: '/v1/bulk/bo-balance-reserve-transactions/update',\n      },\n      {\n        srcPath:\n          '/_api/wixpay-balance-service/v1/bulk/bo-balance-reserve-transactions/release',\n        destPath: '/v1/bulk/bo-balance-reserve-transactions/release',\n      },\n    ],\n    'wix-bo.com': [\n      {\n        srcPath: '/_api/wixpay-balance-service/v4/bo-balance-summary',\n        destPath: '/v4/bo-balance-summary',\n      },\n      {\n        srcPath: '/_api/transaction-service/v4/bo-balance-summary',\n        destPath: '/v4/bo-balance-summary',\n      },\n      {\n        srcPath: '/_api/wixpay-balance-service/v5/balance-records',\n        destPath: '/v5/balance-records',\n      },\n      {\n        srcPath: '/_api/wixpay-balance-service/v5/balance-summary',\n        destPath: '/v5/balance-summary',\n      },\n      {\n        srcPath: '/_api/transaction-service/v5/balance-records',\n        destPath: '/v5/balance-records',\n      },\n      {\n        srcPath: '/_api/transaction-service/v5/balance-summary',\n        destPath: '/v5/balance-summary',\n      },\n      {\n        srcPath:\n          '/_api/wixpay-balance-service/v1/bo-balance-reserve-transactions',\n        destPath: '/v1/bo-balance-reserve-transactions',\n      },\n      {\n        srcPath:\n          '/_api/wixpay-balance-service/v1/bulk/bo-balance-reserve-transactions/update',\n        destPath: '/v1/bulk/bo-balance-reserve-transactions/update',\n      },\n      {\n        srcPath:\n          '/_api/wixpay-balance-service/v1/bulk/bo-balance-reserve-transactions/release',\n        destPath: '/v1/bulk/bo-balance-reserve-transactions/release',\n      },\n    ],\n    'manage._base_domain_': [\n      {\n        srcPath: '/_api/wixpay-balance-service/v5/balance-records',\n        destPath: '/v5/balance-records',\n      },\n      {\n        srcPath: '/_api/wixpay-balance-service/v5/balance-summary',\n        destPath: '/v5/balance-summary',\n      },\n      {\n        srcPath: '/_api/transaction-service/v5/balance-summary',\n        destPath: '/v5/balance-summary',\n      },\n      {\n        srcPath: '/_api/transaction-service/v5/balance-records',\n        destPath: '/v5/balance-records',\n      },\n    ],\n    'manage.base44.com': [\n      {\n        srcPath: '/_api/wixpay-balance-service',\n        destPath: '',\n      },\n    ],\n    'payments.base44.com': [\n      {\n        srcPath: '/_api/wixpay-balance-service',\n        destPath: '',\n      },\n    ],\n    'www.wixapis.com': [\n      {\n        srcPath: '/wixpay-balances/v5/balance-records',\n        destPath: '/v5/balance-records',\n      },\n    ],\n    '*.dev.wix-code.com': [\n      {\n        srcPath: '/payments/balances/v5/balance-records',\n        destPath: '/v5/balance-records',\n      },\n    ],\n    _: [\n      {\n        srcPath: '/payments/balances/v5/balance-records',\n        destPath: '/v5/balance-records',\n      },\n    ],\n  };\n\n  return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_payments_balance-records';\n\n/**\n * Retrieves a single balance record by ID for the specified account.\n *\n * Returns an error if the record doesn't exist or doesn't belong to the specified account.\n */\nexport function getBalanceRecord(payload: object): RequestOptionsFactory<any> {\n  function __getBalanceRecord({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.payments.balances.v5.balance_record',\n      method: 'GET' as any,\n      methodFqn:\n        'wix.payments.v5.balances.BalanceRecordsService.GetBalanceRecord',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveWixPaymentsV5BalancesBalanceRecordsServiceUrl({\n        protoPath: '/v5/balance-records/{balanceRecordId}',\n        data: payload,\n        host,\n      }),\n      params: toURLSearchParams(payload),\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'record.appliedDate' },\n              { path: 'record.createdDate' },\n              { path: 'record.updatedDate' },\n              { path: 'record.paymentInfo.createdDate' },\n              { path: 'record.payoutInfo.createdDate' },\n              { path: 'record.reserveInfo.hold.createdDate' },\n              { path: 'record.reserveInfo.release.createdDate' },\n              { path: 'record.reserveInfo.reserveHistoryItems.createdDate' },\n              { path: 'record.bookTransferInfo.createdDate' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __getBalanceRecord;\n}\n\n/**\n * Retrieves a list of up to 1000 balance records, given the provided paging, filtering, and sorting.\n *\n * Query Balance Records runs with these defaults, which you can override:\n *\n * - `query.sort[0].fieldName` is `applied_date` in `ASC` order\n * - `query.paging.limit` is `20`\n * - `query.paging.offset` is `0` (and `offset` is required when `paging` is set)\n *\n * Filter and sort field names inside `query` must be **snake_case**. They're read from\n * the `query.filter` object and aren't auto-converted. Supported filter fields:\n * `account_profile_id`, `tags`, `payout_id`, `transaction_id`, `types`, and the date\n * ranges `transaction_creation_date`, `paid`, and `created_date`. Any other field returns\n * an `Unsupported query: unknown parameter <field>` error. ID fields accept a single\n * value by equality, `tags` and `types` accept `$in`, and date-range fields accept `$gte`\n * and `$lt`. Supported `sort[i].fieldName` values: `applied_date`,\n * `payment_info.created_date`, `created_date`. At most 1 sort field is allowed.\n *\n * To list every balance record in a payout, filter by `payout_id`.\n *\n * To learn about working with Query methods, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language),\n * [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging),\n * and [Field Projection](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-field-projection).\n */\nexport function queryBalanceRecords(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __queryBalanceRecords({ host }: any) {\n    const serializedData = transformPaths(payload, [\n      {\n        transformFn: transformSDKFloatToRESTFloat,\n        paths: [\n          { path: 'query.sort.origin.latitude' },\n          { path: 'query.sort.origin.longitude' },\n        ],\n      },\n    ]);\n    const metadata = {\n      entityFqdn: 'wix.payments.balances.v5.balance_record',\n      method: 'POST' as any,\n      methodFqn:\n        'wix.payments.v5.balances.BalanceRecordsService.QueryBalanceRecords',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveWixPaymentsV5BalancesBalanceRecordsServiceUrl({\n        protoPath: '/v5/balance-records/query',\n        data: serializedData,\n        host,\n      }),\n      data: serializedData,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'records.appliedDate' },\n              { path: 'records.createdDate' },\n              { path: 'records.updatedDate' },\n              { path: 'records.paymentInfo.createdDate' },\n              { path: 'records.payoutInfo.createdDate' },\n              { path: 'records.reserveInfo.hold.createdDate' },\n              { path: 'records.reserveInfo.release.createdDate' },\n              { path: 'records.reserveInfo.reserveHistoryItems.createdDate' },\n              { path: 'records.bookTransferInfo.createdDate' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __queryBalanceRecords;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n  BalanceRecord,\n  QueryBalanceRecordsOptions,\n  QueryBalanceRecordsResponse,\n  getBalanceRecord as universalGetBalanceRecord,\n  queryBalanceRecords as universalQueryBalanceRecords,\n} from './payments-balances-v5-balance-record-balance-records.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/payments' };\n\nexport function getBalanceRecord(\n  httpClient: HttpClient\n): GetBalanceRecordSignature {\n  return (balanceRecordId: string, accountId: string) =>\n    universalGetBalanceRecord(\n      balanceRecordId,\n      accountId,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface GetBalanceRecordSignature {\n  /**\n   * Retrieves a single balance record by ID for the specified account.\n   *\n   * Returns an error if the record doesn't exist or doesn't belong to the specified account.\n   * @param - Balance record ID.\n   * @param - ID of the Wix Payments account that owns the balance record. The record must belong to this account. Retrieve account IDs from the Accounts API.\n   * @returns Retrieved balance record.\n   */\n  (balanceRecordId: string, accountId: string): Promise<\n    NonNullablePaths<\n      BalanceRecord,\n      | `accountId`\n      | `accountProfileId`\n      | `amount.value`\n      | `amount.currency`\n      | `recordType`\n      | `recordStatus`\n      | `paymentInfo.transactionId`\n      | `paymentInfo.paymentMethodType`\n      | `payoutInfo.payoutId`\n      | `reserveInfo.reserveHistoryItems`\n      | `reserveInfo.reserveType`\n      | `bookTransferInfo.bookTransferId`\n      | `bookTransferInfo.transactionReference`,\n      1\n    >\n  >;\n}\n\nexport function queryBalanceRecords(\n  httpClient: HttpClient\n): QueryBalanceRecordsSignature {\n  return (accountId: string, options?: QueryBalanceRecordsOptions) =>\n    universalQueryBalanceRecords(\n      accountId,\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface QueryBalanceRecordsSignature {\n  /**\n   * Retrieves a list of up to 1000 balance records, given the provided paging, filtering, and sorting.\n   *\n   * Query Balance Records runs with these defaults, which you can override:\n   *\n   * - `query.sort[0].fieldName` is `applied_date` in `ASC` order\n   * - `query.paging.limit` is `20`\n   * - `query.paging.offset` is `0` (and `offset` is required when `paging` is set)\n   *\n   * Filter and sort field names inside `query` must be **snake_case**. They're read from\n   * the `query.filter` object and aren't auto-converted. Supported filter fields:\n   * `account_profile_id`, `tags`, `payout_id`, `transaction_id`, `types`, and the date\n   * ranges `transaction_creation_date`, `paid`, and `created_date`. Any other field returns\n   * an `Unsupported query: unknown parameter <field>` error. ID fields accept a single\n   * value by equality, `tags` and `types` accept `$in`, and date-range fields accept `$gte`\n   * and `$lt`. Supported `sort[i].fieldName` values: `applied_date`,\n   * `payment_info.created_date`, `created_date`. At most 1 sort field is allowed.\n   *\n   * To list every balance record in a payout, filter by `payout_id`.\n   *\n   * To learn about working with Query methods, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language),\n   * [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging),\n   * and [Field Projection](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-field-projection).\n   * @param - ID of the Wix Payments account that owns the balance records. Retrieve account IDs from the Accounts API.\n   */\n  (accountId: string, options?: QueryBalanceRecordsOptions): Promise<\n    NonNullablePaths<\n      QueryBalanceRecordsResponse,\n      | `records`\n      | `records.${number}.accountId`\n      | `records.${number}.accountProfileId`\n      | `records.${number}.amount.value`\n      | `records.${number}.amount.currency`\n      | `records.${number}.recordType`\n      | `records.${number}.recordStatus`\n      | `records.${number}.paymentInfo.transactionId`\n      | `records.${number}.paymentInfo.paymentMethodType`\n      | `records.${number}.payoutInfo.payoutId`\n      | `records.${number}.reserveInfo.reserveType`\n      | `records.${number}.bookTransferInfo.bookTransferId`\n      | `records.${number}.bookTransferInfo.transactionReference`\n      | `summary.total.value`\n      | `summary.total.currency`\n      | `summary.items`\n      | `summary.items.${number}.summaryType`\n      | `summary.items.${number}.summaryItemType`,\n      3\n    >\n  >;\n}\n\nexport {\n  AddressLocation,\n  BalanceRecord,\n  BalanceRecordStatus,\n  BalanceRecordTag,\n  BalanceRecordType,\n  BalanceRecordsSummary,\n  BalanceRecordsSummaryItem,\n  BalanceRecordsSummaryItemType,\n  BalanceSummary,\n  BlockedBalance,\n  BlockedProfileBalance,\n  BookTransferInfo,\n  ExplicitReserve,\n  FundsOnHoldBalance,\n  FundsOnHoldProfileBalance,\n  GetBalanceRecordRequest,\n  GetBalanceRecordResponse,\n  GetBalanceSummaryRequest,\n  GetBalanceSummaryResponse,\n  ListBalanceRecordsRequest,\n  ListBalanceRecordsResponse,\n  ModalData,\n  Money,\n  NegativeBalance,\n  NegativeProfileBalance,\n  Paging,\n  PagingMetadata,\n  PaymentInfo,\n  PaymentMethodType,\n  PayoutInfo,\n  PayoutsBeingVerifiedBalance,\n  PayoutsBeingVerifiedProfileBalance,\n  PayoutsUnderMinimumAmountBalance,\n  PayoutsUnderMinimumAmountProfileBalance,\n  Period,\n  PeriodUnit,\n  ProcessingBalance,\n  ProcessingProfileBalance,\n  Query,\n  QueryBalanceRecordsOptions,\n  QueryBalanceRecordsRequest,\n  QueryBalanceRecordsResponse,\n  ReserveBalance,\n  ReserveBalanceMotivationOneOf,\n  ReserveHistoryItem,\n  ReserveInfo,\n  ReservePolicy,\n  ReserveProfileBalance,\n  ReserveType,\n  ScheduledBalance,\n  ScheduledProfileBalance,\n  SortOrder,\n  Sorting,\n} from './payments-balances-v5-balance-record-balance-records.universal.js';\n","import {\n  getBalanceRecord as publicGetBalanceRecord,\n  queryBalanceRecords as publicQueryBalanceRecords,\n} from './payments-balances-v5-balance-record-balance-records.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const getBalanceRecord: MaybeContext<\n  BuildRESTFunction<typeof publicGetBalanceRecord> &\n    typeof publicGetBalanceRecord\n> = /*#__PURE__*/ createRESTModule(publicGetBalanceRecord);\nexport const queryBalanceRecords: MaybeContext<\n  BuildRESTFunction<typeof publicQueryBalanceRecords> &\n    typeof publicQueryBalanceRecords\n> = /*#__PURE__*/ createRESTModule(publicQueryBalanceRecords);\n\nexport {\n  PaymentMethodType,\n  ReserveType,\n  BalanceRecordType,\n  BalanceRecordStatus,\n  BalanceRecordTag,\n  SortOrder,\n  BalanceRecordsSummaryItemType,\n  PeriodUnit,\n} from './payments-balances-v5-balance-record-balance-records.universal.js';\nexport {\n  BalanceRecord,\n  PayoutInfo,\n  ReserveHistoryItem,\n  Money,\n  PaymentInfo,\n  ReserveInfo,\n  BookTransferInfo,\n  ListBalanceRecordsRequest,\n  Sorting,\n  AddressLocation,\n  Paging,\n  ListBalanceRecordsResponse,\n  PagingMetadata,\n  BalanceRecordsSummary,\n  BalanceRecordsSummaryItem,\n  GetBalanceRecordRequest,\n  GetBalanceRecordResponse,\n  QueryBalanceRecordsRequest,\n  Query,\n  QueryBalanceRecordsResponse,\n  GetBalanceSummaryRequest,\n  GetBalanceSummaryResponse,\n  BalanceSummary,\n  ScheduledBalance,\n  ScheduledProfileBalance,\n  ProcessingBalance,\n  ProcessingProfileBalance,\n  Period,\n  FundsOnHoldBalance,\n  FundsOnHoldProfileBalance,\n  PayoutsBeingVerifiedBalance,\n  PayoutsBeingVerifiedProfileBalance,\n  PayoutsUnderMinimumAmountBalance,\n  PayoutsUnderMinimumAmountProfileBalance,\n  NegativeBalance,\n  NegativeProfileBalance,\n  ReserveBalance,\n  ReserveBalanceMotivationOneOf,\n  ReserveProfileBalance,\n  ReservePolicy,\n  ExplicitReserve,\n  BlockedBalance,\n  BlockedProfileBalance,\n  ModalData,\n  QueryBalanceRecordsOptions,\n} from './payments-balances-v5-balance-record-balance-records.universal.js';\nexport {\n  PaymentMethodTypeWithLiterals,\n  ReserveTypeWithLiterals,\n  BalanceRecordTypeWithLiterals,\n  BalanceRecordStatusWithLiterals,\n  BalanceRecordTagWithLiterals,\n  SortOrderWithLiterals,\n  BalanceRecordsSummaryItemTypeWithLiterals,\n  PeriodUnitWithLiterals,\n} from './payments-balances-v5-balance-record-balance-records.universal.js';\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,yBAAyB;AAClC,SAAS,oCAAoC;AAC7C,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,qDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,+BAA+B;AAAA,MAC7B;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,MACA;AAAA,QACE,SAAS;AAAA,QACT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A,EAC5D,SAAS,KAAU;AACjB,UAAM,mBAAmB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,WAAW;AAAA,UACX,OAAO;AAAA,UACP,gBAAgB;AAAA,UAChB,cAAc;AAAA,QAChB;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,aAAa,SAAS;AAAA,IACzB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AE50CO,SAASC,kBACd,YAC2B;AAC3B,SAAO,CAAC,iBAAyB,cAC/BA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAgCO,SAASC,qBACd,YAC8B;AAC9B,SAAO,CAAC,WAAmB,YACzBA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;AC3DA,SAAS,wBAAwB;AAG1B,IAAMC,oBAGK,iCAAiBA,iBAAsB;AAClD,IAAMC,uBAGK,iCAAiBA,oBAAyB;","names":["payload","PaymentMethodType","ReserveType","BalanceRecordType","BalanceRecordStatus","BalanceRecordTag","SortOrder","BalanceRecordsSummaryItemType","PeriodUnit","getBalanceRecord","queryBalanceRecords","getBalanceRecord","queryBalanceRecords","getBalanceRecord","queryBalanceRecords"]}