import {z} from 'zod' export type Amount = {value?: string | undefined, currency?: string | undefined}; export type Image = {attachment_public_uuid?: string | undefined, content_type?: string | undefined, height?: number | undefined, width?: number | undefined}; export type Avatar = {uuid?: string | undefined, anchor_uuid?: string | undefined, image?: Array | undefined, style?: string | undefined}; export type LabelUser = {uuid?: string | undefined, display_name?: string | undefined, country?: string | undefined, avatar?: Avatar | undefined, public_nick_name?: string | undefined}; export type Pointer = {type?: string | undefined, value?: string | undefined, name?: string | undefined, service?: string | undefined}; export type LabelMonetaryAccount = {iban?: string | undefined, display_name?: string | undefined, avatar?: Avatar | undefined, label_user?: LabelUser | undefined, country?: string | undefined, bunq_me?: Pointer | undefined, is_light?: boolean | undefined, swift_bic?: string | undefined, swift_account_number?: string | undefined, transferwise_account_number?: string | undefined, transferwise_bank_code?: string | undefined, merchant_category_code?: string | undefined}; export type BunqId = {id?: number | undefined}; export type Address = {street?: string | undefined, house_number?: string | undefined, po_box?: string | undefined, postal_code?: string | undefined, city?: string | undefined, country?: string | undefined, extra?: string | undefined, mailbox_name?: string | undefined, province?: string | undefined, is_user_address_updated?: boolean | undefined}; export type Geolocation = {latitude?: number | undefined, longitude?: number | undefined, altitude?: number | undefined, radius?: number | undefined}; export type InvoiceItem = {id?: number | undefined, billing_date?: string | undefined, type_description?: string | undefined, type_description_translated?: string | undefined, unit_vat_exclusive?: Amount | undefined, unit_vat_inclusive?: Amount | undefined, vat?: number | undefined, quantity?: number | undefined, total_vat_exclusive?: Amount | undefined, total_vat_inclusive?: Amount | undefined}; export type InvoiceItemGroup = {type?: string | undefined, type_description?: string | undefined, type_description_translated?: string | undefined, instance_description?: string | undefined, product_vat_exclusive?: Amount | undefined, product_vat_inclusive?: Amount | undefined, item?: Array | undefined}; export type RequestInquiryReference = {type?: string | undefined, id?: number | undefined}; export type Invoice = {status?: string | undefined, description: string, external_url: string, id?: number | undefined, created?: string | undefined, updated?: string | undefined, invoice_date?: string | undefined, invoice_number?: string | undefined, category?: string | undefined, group?: Array | undefined, total_vat_inclusive?: Amount | undefined, total_vat_exclusive?: Amount | undefined, total_vat?: Amount | undefined, alias?: LabelMonetaryAccount | undefined, address?: Address | undefined, counterparty_alias?: LabelMonetaryAccount | undefined, counterparty_address?: Address | undefined, chamber_of_commerce_number?: string | undefined, vat_number?: string | undefined, request_reference_split_the_bill?: Array | undefined}; export type AttachmentMonetaryAccountPayment = {id?: number | undefined, monetary_account_id?: number | undefined}; export type DraftPaymentEntry = {amount?: Amount | undefined, counterparty_alias?: LabelMonetaryAccount | undefined, description?: string | undefined, merchant_reference?: string | undefined, attachment?: Array | undefined, id?: number | undefined, alias?: LabelMonetaryAccount | undefined, type?: string | undefined}; export type PaymentArrivalExpected = {status?: string | undefined, time?: string | undefined}; export type Error = Array<{error_description?: string | undefined, error_description_translated?: string | undefined}>; export type PaymentBatchAnchoredPayment = {Payment?: Array | undefined}; export type PaymentBatch = {payments?: PaymentBatchAnchoredPayment | undefined}; export type GinmonTransaction = {status?: string | undefined, status_description?: string | undefined, status_description_translated?: string | undefined, amount_billing?: Amount | undefined, amount_billing_original?: Amount | undefined, isin?: string | undefined, external_identifier?: string | undefined, label_user?: LabelUser | undefined, label_monetary_account?: LabelMonetaryAccount | undefined, counter_label_monetary_account?: LabelMonetaryAccount | undefined, event_id?: number | undefined}; export type PaymentAutoAllocateInstance = {id?: number | undefined, created?: string | undefined, updated?: string | undefined, payment_auto_allocate_id?: number | undefined, status?: string | undefined, error_message?: Array | undefined, payment_batch?: PaymentBatch | undefined, payment_id?: number | undefined, all_ginmon_transaction_order?: Array | undefined}; export type PaymentSuspendedOutgoing = {status?: string | undefined, monetary_account_id?: string | undefined, time_execution?: string | undefined}; export type PaymentFee = {value?: string | undefined, currency?: string | undefined, invoice_id?: number | undefined}; export type Payment = {amount?: Amount | undefined, counterparty_alias?: LabelMonetaryAccount | undefined, description?: string | undefined, attachment?: Array | undefined, merchant_reference?: string | undefined, allow_bunqto?: boolean | undefined, id?: number | undefined, created?: string | undefined, updated?: string | undefined, monetary_account_id?: number | undefined, alias?: LabelMonetaryAccount | undefined, type?: string | undefined, sub_type?: string | undefined, payment_arrival_expected?: PaymentArrivalExpected | undefined, bunqto_status?: string | undefined, bunqto_sub_status?: string | undefined, bunqto_share_url?: string | undefined, bunqto_expiry?: string | undefined, bunqto_time_responded?: string | undefined, batch_id?: number | undefined, scheduled_id?: number | undefined, address_shipping?: Address | undefined, address_billing?: Address | undefined, geolocation?: Geolocation | undefined, request_reference_split_the_bill?: Array | undefined, balance_after_mutation?: Amount | undefined, payment_auto_allocate_instance?: PaymentAutoAllocateInstance | undefined, payment_suspended_outgoing?: PaymentSuspendedOutgoing | undefined, payment_fee?: PaymentFee | undefined}; export type ScheduleAnchorObject = {Payment?: Payment | undefined, PaymentBatch?: PaymentBatch | undefined}; export type Schedule = {time_start?: string | undefined, time_end?: string | undefined, recurrence_unit?: string | undefined, recurrence_size?: number | undefined, status?: string | undefined, object?: ScheduleAnchorObject | undefined}; export type DraftPayment = {status?: string | undefined, entries: Array, previous_updated_timestamp?: string | undefined, number_of_required_accepts: number, schedule?: Schedule | undefined}; export type LabelCard = {uuid?: string | undefined, type?: string | undefined, second_line?: string | undefined, expiry_date?: string | undefined, status?: string | undefined, label_user?: LabelUser | undefined}; export type BunqMeMerchantAvailable = {merchant_type?: string | undefined, available?: boolean | undefined}; export type BunqMeTabEntry = {amount_inquired?: Amount | undefined, description?: string | undefined, redirect_url?: string | undefined, uuid?: string | undefined, alias?: LabelMonetaryAccount | undefined, status?: string | undefined, merchant_available?: Array | undefined, invite_profile_name?: string | undefined}; export type BunqMeTab = {bunqme_tab_entry: BunqMeTabEntry, status?: string | undefined, event_id?: number | undefined}; export type BunqMeTabResultResponse = {payment?: Payment | undefined}; export type AttachmentPublic = Record; export type BunqMeFundraiserProfile = {pointer?: Pointer | undefined, color?: string | undefined, alias?: LabelMonetaryAccount | undefined, currency?: string | undefined, description?: string | undefined, attachment?: AttachmentPublic | undefined, status?: string | undefined, redirect_url?: string | undefined, invite_profile_name?: string | undefined, merchant_available?: Array | undefined}; export type BunqMeFundraiserResult = {id?: number | undefined, created?: string | undefined, updated?: string | undefined, bunqme_fundraiser_profile?: BunqMeFundraiserProfile | undefined, payments?: Array | undefined}; export type CardCountryPermission = {country?: string | undefined, expiry_time?: string | undefined, id?: number | undefined}; export type CardPinAssignment = {type?: string | undefined, routing_type?: string | undefined, pin_code?: string | undefined, monetary_account_id?: number | undefined, status?: string | undefined}; export type CardPrimaryAccountNumber = {id?: number | undefined, description?: string | undefined, status?: string | undefined, monetary_account_id?: number | undefined, uuid?: string | undefined, four_digit?: string | undefined, type?: string | undefined}; export type Card = {pin_code?: string | undefined, activation_code?: string | undefined, status?: string | undefined, order_status?: string | undefined, card_limit?: Amount | undefined, card_limit_atm?: Amount | undefined, country_permission?: Array | undefined, pin_code_assignment?: Array | undefined, primary_account_numbers?: Array | undefined, monetary_account_id_fallback?: number | undefined, preferred_name_on_card?: string | undefined, second_line?: string | undefined, cancellation_reason?: string | undefined}; export type CardDebit = {second_line: string, name_on_card: string, preferred_name_on_card?: string | undefined, alias?: Pointer | undefined, type: string, product_type: string, pin_code_assignment?: Array | undefined, monetary_account_id_fallback?: number | undefined, order_status?: string | undefined}; export type FeatureAnnouncement = {avatar?: Avatar | undefined, title?: string | undefined, sub_title?: string | undefined, type?: string | undefined}; export type IdealMerchantTransaction = {amount_requested?: Amount | undefined, issuer?: string | undefined, monetary_account_id?: number | undefined, alias?: LabelMonetaryAccount | undefined, counterparty_alias?: LabelMonetaryAccount | undefined, amount_guaranteed?: Amount | undefined, expiration?: string | undefined, issuer_name?: string | undefined, issuer_authentication_url?: string | undefined, purchase_identifier?: string | undefined, status?: string | undefined, status_timestamp?: string | undefined, transaction_identifier?: string | undefined}; export type SchedulePaymentEntry = {amount?: Amount | undefined, counterparty_alias?: LabelMonetaryAccount | undefined, description?: string | undefined, attachment?: Array | undefined, merchant_reference?: string | undefined, allow_bunqto?: boolean | undefined, alias?: LabelMonetaryAccount | undefined}; export type SchedulePayment = {payment?: SchedulePaymentEntry | undefined, schedule?: Schedule | undefined, purpose?: string | undefined, status?: string | undefined}; export type SchedulePaymentBatch = {payments?: Array | undefined, schedule?: Schedule | undefined}; export type ScheduleInstanceAnchorObject = {Payment?: Payment | undefined, PaymentBatch?: PaymentBatch | undefined}; export type ScheduleInstance = {state?: string | undefined, time_start?: string | undefined, time_end?: string | undefined, error_message?: Array | undefined, scheduled_object?: ScheduleAnchorObject | undefined, result_object?: ScheduleInstanceAnchorObject | undefined, request_reference_split_the_bill?: Array | undefined}; export type AttachmentUrl = {type?: string | undefined, url?: string | undefined}; export type Attachment = {description?: string | undefined, content_type?: string | undefined, urls?: Array | undefined}; export type BankSwitchServiceNetherlandsIncoming = {alias?: LabelMonetaryAccount | undefined, counterparty_alias?: LabelMonetaryAccount | undefined, status?: string | undefined, user_alias?: LabelUser | undefined, sub_status?: string | undefined, time_start_desired?: string | undefined, time_start_actual?: string | undefined, time_end?: string | undefined, attachment?: Attachment | undefined, rejection_reason?: string | undefined, rejection_reason_description?: string | undefined, rejection_reason_description_translated?: string | undefined, rejection_reason_together_url?: string | undefined}; export type BankSwitchServiceNetherlandsIncomingPayment = {bank_switch_service?: BankSwitchServiceNetherlandsIncoming | undefined, payment?: Payment | undefined}; export type RequestInquiryBatch = {request_inquiries?: Array | undefined, status?: string | undefined, total_amount_inquired?: Amount | undefined, event_id?: number | undefined, reference_split_the_bill?: RequestReferenceSplitTheBillAnchorObject | undefined}; export type RequestResponse = {amount_responded?: Amount | undefined, status?: string | undefined, address_shipping?: Address | undefined, address_billing?: Address | undefined, currency_conversion_quote_id?: number | undefined, id?: number | undefined, created?: string | undefined, updated?: string | undefined, time_responded?: string | undefined, time_expiry?: string | undefined, time_refund_requested?: string | undefined, time_refunded?: string | undefined, user_refund_requested?: LabelUser | undefined, monetary_account_id?: number | undefined, amount_inquired?: Amount | undefined, description?: string | undefined, alias?: LabelMonetaryAccount | undefined, counterparty_alias?: LabelMonetaryAccount | undefined, attachment?: Array | undefined, minimum_age?: number | undefined, require_address?: string | undefined, geolocation?: Geolocation | undefined, type?: string | undefined, sub_type?: string | undefined, redirect_url?: string | undefined, credit_scheme_identifier?: string | undefined, mandate_identifier?: string | undefined, registration_action?: string | undefined, eligible_whitelist_id?: number | undefined, request_reference_split_the_bill?: Array | undefined, event_id?: number | undefined, monetary_account_preferred_id?: number | undefined}; export type ShareDetailPayment = {make_payments?: boolean | undefined, make_draft_payments?: boolean | undefined, view_balance?: boolean | undefined, view_old_events?: boolean | undefined, view_new_events?: boolean | undefined}; export type ShareDetailReadOnly = {view_balance?: boolean | undefined, view_old_events?: boolean | undefined, view_new_events?: boolean | undefined}; export type ShareDetailDraftPayment = {make_draft_payments?: boolean | undefined, view_balance?: boolean | undefined, view_old_events?: boolean | undefined, view_new_events?: boolean | undefined}; export type ShareDetail = {payment?: ShareDetailPayment | undefined, read_only?: ShareDetailReadOnly | undefined, draft_payment?: ShareDetailDraftPayment | undefined}; export type ShareInviteMonetaryAccountInquiry = {counter_user_alias?: LabelUser | undefined, access_type?: string | undefined, draft_share_invite_bank_id?: number | undefined, share_detail?: ShareDetail | undefined, status?: string | undefined, relationship?: string | undefined, share_type?: string | undefined, start_date?: string | undefined, end_date?: string | undefined, alias?: LabelMonetaryAccount | undefined, user_alias_created?: LabelUser | undefined, user_alias_revoked?: LabelUser | undefined, monetary_account_id?: number | undefined, id?: number | undefined}; export type CompanyEmployeeSettingAdyenCardTransaction = {pointer_counter_user: Pointer, status?: string | undefined, monetary_account_payout_id?: number | undefined}; export type CompanyEmployeeCard = {pointer_counter_user: Pointer, pointer_monetary_account: Pointer, type: string, product_type: string, company_name_on_card?: string | undefined, employee_name_on_card?: string | undefined, employee_preferred_name_on_card?: string | undefined, amount_limit_monthly?: Amount | undefined, status?: string | undefined, card?: Card | undefined, amount_spent_monthly?: Amount | undefined, number_of_company_employee_card_receipt_pending?: number | undefined}; export type RelationUser = {user_id?: string | undefined, counter_user_id?: string | undefined, label_user?: LabelUser | undefined, counter_label_user?: LabelUser | undefined, relationship?: string | undefined, status?: string | undefined, user_status?: string | undefined, counter_user_status?: string | undefined, company_employee_setting_adyen_card_transaction?: CompanyEmployeeSettingAdyenCardTransaction | undefined, all_company_employee_card?: Array | undefined}; export type ShareInviteMonetaryAccountResponse = {status?: string | undefined, card_id?: number | undefined, id?: number | undefined, created?: string | undefined, updated?: string | undefined, counter_alias?: LabelMonetaryAccount | undefined, user_alias_cancelled?: LabelUser | undefined, monetary_account_id?: number | undefined, draft_share_invite_bank_id?: number | undefined, share_detail?: ShareDetail | undefined, access_type?: string | undefined, relation_user?: RelationUser | undefined, share_type?: string | undefined, start_date?: string | undefined, end_date?: string | undefined, description?: string | undefined}; export type SofortMerchantTransaction = {amount_requested?: Amount | undefined, issuer?: string | undefined, monetary_account_id?: number | undefined, alias?: LabelMonetaryAccount | undefined, counterparty_alias?: LabelMonetaryAccount | undefined, amount_guaranteed?: Amount | undefined, issuer_authentication_url?: string | undefined, status?: string | undefined, error_message?: Array | undefined, transaction_identifier?: string | undefined}; export type TransferwiseQuote = {currency_source: string, currency_target: string, amount_source?: Amount | undefined, amount_target?: Amount | undefined, id?: number | undefined, created?: string | undefined, updated?: string | undefined, time_expiry?: string | undefined, quote_id?: string | undefined, amount_fee?: Amount | undefined, rate?: string | undefined, time_delivery_estimate?: string | undefined}; export type TransferwiseTransfer = {monetary_account_id: string, recipient_id: string, alias?: LabelMonetaryAccount | undefined, counterparty_alias?: LabelMonetaryAccount | undefined, status?: string | undefined, sub_status?: string | undefined, status_transferwise?: string | undefined, status_transferwise_issue?: string | undefined, amount_source?: Amount | undefined, amount_target?: Amount | undefined, rate?: string | undefined, reference?: string | undefined, pay_in_reference?: string | undefined, time_delivery_estimate?: string | undefined, quote?: TransferwiseQuote | undefined}; export type EventObject = {BunqMeTab?: BunqMeTab | undefined, BunqMeTabResultResponse?: BunqMeTabResultResponse | undefined, BunqMeFundraiserResult?: BunqMeFundraiserResult | undefined, Card?: Card | undefined, CardDebit?: CardDebit | undefined, DraftPayment?: DraftPayment | undefined, FeatureAnnouncement?: FeatureAnnouncement | undefined, IdealMerchantTransaction?: IdealMerchantTransaction | undefined, Invoice?: Invoice | undefined, ScheduledPayment?: SchedulePayment | undefined, ScheduledPaymentBatch?: SchedulePaymentBatch | undefined, ScheduledInstance?: ScheduleInstance | undefined, MasterCardAction?: MasterCardAction | undefined, BankSwitchServiceNetherlandsIncomingPayment?: BankSwitchServiceNetherlandsIncomingPayment | undefined, Payment?: Payment | undefined, PaymentBatch?: PaymentBatch | undefined, RequestInquiryBatch?: RequestInquiryBatch | undefined, RequestInquiry?: RequestInquiry | undefined, RequestResponse?: RequestResponse | undefined, ShareInviteBankInquiry?: ShareInviteMonetaryAccountInquiry | undefined, ShareInviteBankResponse?: ShareInviteMonetaryAccountResponse | undefined, SofortMerchantTransaction?: SofortMerchantTransaction | undefined, TransferwisePayment?: TransferwiseTransfer | undefined}; export type Event = {id?: number | undefined, created?: string | undefined, updated?: string | undefined, action?: string | undefined, user_id?: string | undefined, monetary_account_id?: string | undefined, object?: EventObject | undefined, status?: string | undefined, object_data_at_event?: EventObject | undefined, is_event_latest_for_object?: boolean | undefined, is_event_reassignable?: boolean | undefined}; export type AttachmentMasterCardActionRefund = {id?: number | undefined}; export type MasterCardActionReference = {event_id?: number | undefined}; export type AdditionalInformation = {category?: string | undefined, reason?: string | undefined, comment?: string | undefined, attachment?: Array | undefined, terms_and_conditions?: string | undefined}; export type MasterCardActionRefund = {type?: string | undefined, sub_type?: string | undefined, amount?: Amount | undefined, category?: string | undefined, reason?: string | undefined, comment?: string | undefined, attachment?: Array | undefined, terms_and_conditions?: string | undefined, id?: number | undefined, created?: string | undefined, updated?: string | undefined, label_user_creator?: LabelUser | undefined, status?: string | undefined, reference_mastercard_action_event?: Array | undefined, mastercard_action_id?: number | undefined, alias?: LabelMonetaryAccount | undefined, counterparty_alias?: LabelMonetaryAccount | undefined, description?: string | undefined, label_card?: LabelCard | undefined, time_refund?: string | undefined, additional_information?: AdditionalInformation | undefined, status_description?: string | undefined, status_description_translated?: string | undefined, status_together_url?: string | undefined}; export type AdditionalTransactionInformationCategory = {category?: string | undefined, type?: string | undefined, status?: string | undefined, order?: number | undefined, description?: string | undefined, description_translated?: string | undefined, color?: string | undefined, icon?: string | undefined}; export type PartnerPromotionCashback = {public_uuid?: string | undefined, status?: string | undefined, promotion_code?: string | undefined, amount_cashback_per_transaction_maximum?: Amount | undefined, number_of_transaction_maximum?: number | undefined, amount_transaction_minimum?: Amount | undefined, url_together?: string | undefined, deeplink?: string | undefined, partner_name?: string | undefined, partner_avatar?: Avatar | undefined, promotion_title_short?: Array | undefined, promotion_title_long?: Array | undefined, promotion_description?: Array | undefined}; export type UserPartnerPromotionCashback = {promotion_code: string, status?: string | undefined, number_of_transaction_remaining?: number | undefined, partner_promotion?: PartnerPromotionCashback | undefined}; export type CashbackPayoutItem = {status?: string | undefined, amount?: Amount | undefined, rate_applied?: string | undefined, transaction_category?: AdditionalTransactionInformationCategory | undefined, user_partner_promotion?: UserPartnerPromotionCashback | undefined}; export type PointMutation = {number_of_point?: number | undefined}; export type UserBlocklistMasterCardMerchant = {merchant_name?: string | undefined, merchant_id?: string | undefined, merchant_identifier?: string | undefined, mastercard_merchant_id?: string | undefined, external_merchant_id?: string | undefined, id?: number | undefined, created?: string | undefined, updated?: string | undefined, status?: string | undefined, merchant_hash?: string | undefined, merchant_avatar?: Avatar | undefined}; export type MasterCardActionReport = {mastercard_action_id?: number | undefined, type?: string | undefined, status?: string | undefined, merchant_id?: string | undefined, merchant_name?: string | undefined, counterparty_alias?: LabelMonetaryAccount | undefined}; export type CompanyEmployeeCardReceipt = {status?: string | undefined}; export type MasterCardAction = {id?: number | undefined, monetary_account_id?: number | undefined, card_id?: number | undefined, amount_local?: Amount | undefined, amount_converted?: Amount | undefined, amount_billing?: Amount | undefined, amount_original_local?: Amount | undefined, amount_original_billing?: Amount | undefined, amount_fee?: Amount | undefined, card_authorisation_id_response?: string | undefined, decision?: string | undefined, payment_status?: string | undefined, decision_description?: string | undefined, decision_description_translated?: string | undefined, decision_together_url?: string | undefined, description?: string | undefined, authorisation_status?: string | undefined, authorisation_type?: string | undefined, pan_entry_mode_user?: string | undefined, settlement_status?: string | undefined, clearing_status?: string | undefined, maturity_date?: string | undefined, city?: string | undefined, alias?: LabelMonetaryAccount | undefined, counterparty_alias?: LabelMonetaryAccount | undefined, label_card?: LabelCard | undefined, merchant_id?: string | undefined, token_status?: string | undefined, reservation_expiry_time?: string | undefined, clearing_expiry_time?: string | undefined, applied_limit?: string | undefined, secure_code_id?: number | undefined, wallet_provider_id?: string | undefined, request_reference_split_the_bill?: Array | undefined, card_tokenization_event?: Event | undefined, all_mastercard_action_refund?: Array | undefined, pos_card_presence?: string | undefined, pos_card_holder_presence?: string | undefined, eligible_whitelist_id?: number | undefined, cashback_payout_item?: CashbackPayoutItem | undefined, point_mutation?: PointMutation | undefined, blacklist?: UserBlocklistMasterCardMerchant | undefined, blocklist?: UserBlocklistMasterCardMerchant | undefined, additional_authentication_status?: string | undefined, pin_status?: string | undefined, mastercard_action_report?: MasterCardActionReport | undefined, merchant_category_code?: string | undefined, company_employee_card_receipt?: CompanyEmployeeCardReceipt | undefined}; export type Whitelist = Record; export type WhitelistResultViewAnchoredObject = {id?: number | undefined, requestResponse?: RequestResponse | undefined, draftPayment?: DraftPayment | undefined}; export type WhitelistResult = {id?: number | undefined, monetary_account_paying_id?: number | undefined, status?: string | undefined, sub_status?: string | undefined, error_message?: Array | undefined, whitelist?: Whitelist | undefined, object?: WhitelistResultViewAnchoredObject | undefined, request_reference_split_the_bill?: Array | undefined}; export type CurrencyConversion = {id?: number | undefined, created?: string | undefined, updated?: string | undefined, status?: string | undefined, date_delivery_expected?: string | undefined, rate?: string | undefined, amount?: Amount | undefined, counter_amount?: Amount | undefined, group_uuid?: string | undefined, type?: string | undefined, order_type?: string | undefined, label_monetary_account?: LabelMonetaryAccount | undefined, counter_label_monetary_account?: LabelMonetaryAccount | undefined, payment?: Payment | undefined}; export type RequestReferenceSplitTheBillAnchorObject = {BillingInvoice?: Invoice | undefined, DraftPayment?: DraftPayment | undefined, MasterCardAction?: MasterCardAction | undefined, Payment?: Payment | undefined, PaymentBatch?: PaymentBatch | undefined, RequestResponse?: RequestResponse | undefined, ScheduleInstance?: ScheduleInstance | undefined, WhitelistResult?: WhitelistResult | undefined, TransferwisePayment?: TransferwiseTransfer | undefined, CurrencyConversion?: CurrencyConversion | undefined}; export type RequestInquiry = {amount_inquired?: Amount | undefined, counterparty_alias?: LabelMonetaryAccount | undefined, description?: string | undefined, attachment?: Array | undefined, merchant_reference?: string | undefined, status?: string | undefined, minimum_age?: number | undefined, require_address?: string | undefined, want_tip?: boolean | undefined, allow_amount_lower?: boolean | undefined, allow_amount_higher?: boolean | undefined, allow_bunqme: boolean, redirect_url?: string | undefined, event_id?: number | undefined, id?: number | undefined, created?: string | undefined, updated?: string | undefined, time_responded?: string | undefined, time_expiry?: string | undefined, monetary_account_id?: number | undefined, amount_responded?: Amount | undefined, user_alias_created?: LabelUser | undefined, user_alias_revoked?: LabelUser | undefined, batch_id?: number | undefined, scheduled_id?: number | undefined, bunqme_share_url?: string | undefined, address_shipping?: Address | undefined, address_billing?: Address | undefined, geolocation?: Geolocation | undefined, reference_split_the_bill?: RequestReferenceSplitTheBillAnchorObject | undefined}; export type CreateApiUserUserIDMonetaryAccountMonetaryAccountIDRequestInquiryArgs = {userID: number, 'monetary-accountID': number, 'Cache-Control'?: string | undefined, 'User-Agent': string, 'X-Bunq-Language'?: string | undefined, 'X-Bunq-Region'?: string | undefined, 'X-Bunq-Client-Request-Id'?: string | undefined, 'X-Bunq-Geolocation'?: string | undefined, 'X-Bunq-Client-Authentication': string, body: RequestInquiry}; export type CreateApiUserUserIDMonetaryAccountMonetaryAccountIDRequestInquiryOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; export const requestInquiryCreate = z.object({id: z.number().int().optional()}); export const validateResponse = async ( schema: { readonly '~standard': { readonly validate: (value: unknown) => ({ readonly value: Output; readonly issues?: undefined } | { readonly issues: ReadonlyArray<{ readonly message: string; readonly path?: ReadonlyArray | undefined }> }) | Promise<{ readonly value: Output; readonly issues?: undefined } | { readonly issues: ReadonlyArray<{ readonly message: string; readonly path?: ReadonlyArray | undefined }> }> } }, value: unknown ): Promise => { const result = await schema['~standard'].validate(value) if (result.issues !== undefined) { const detail = result.issues .map(({ message, path }) => path?.length ? `${path.map((segment) => String(typeof segment === 'object' ? segment.key : segment)).join('.')}: ${message}` : message ) .join('; ') throw new Error(`Response does not match the schema: ${detail}`, { cause: { issues: result.issues } }) } return result.value }; /** * POST /user/{userID}/monetary-account/{monetary-accountID}/request-inquiry */ export const createApiUserUserIDMonetaryAccountMonetaryAccountIDRequestInquiry = async (args: CreateApiUserUserIDMonetaryAccountMonetaryAccountIDRequestInquiryArgs, options?: CreateApiUserUserIDMonetaryAccountMonetaryAccountIDRequestInquiryOptions) => { const {baseUrl = "https://public-api.sandbox.bunq.com/v1", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") headers.set('accept', "application/json") if (args['Cache-Control'] != null) headers.set("Cache-Control", String(args['Cache-Control'])) if (args['User-Agent'] != null) headers.set("User-Agent", String(args['User-Agent'])) if (args['X-Bunq-Language'] != null) headers.set("X-Bunq-Language", String(args['X-Bunq-Language'])) if (args['X-Bunq-Region'] != null) headers.set("X-Bunq-Region", String(args['X-Bunq-Region'])) if (args['X-Bunq-Client-Request-Id'] != null) headers.set("X-Bunq-Client-Request-Id", String(args['X-Bunq-Client-Request-Id'])) if (args['X-Bunq-Geolocation'] != null) headers.set("X-Bunq-Geolocation", String(args['X-Bunq-Geolocation'])) if (args['X-Bunq-Client-Authentication'] != null) headers.set("X-Bunq-Client-Authentication", String(args['X-Bunq-Client-Authentication'])) const url = `${baseUrl.replace(/\/+$/, '')}/user/${encodeURIComponent(String(args.userID))}/monetary-account/${encodeURIComponent(String(args['monetary-accountID']))}/request-inquiry${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return validateResponse(requestInquiryCreate, await res.json()) };