export type AcceptorContact = {acceptor?: Acceptor | undefined, contactType: 'TELEGRAM' | 'INSTAGRAM' | 'FACEBOOK' | 'LINKEDIN' | 'TWITTER' | 'WHATSAPP' | 'EMAIL' | 'ADDRESS' | 'COORDINATES' | 'TELEPHONE' | 'MOBILE' | 'WEBSITE', id?: number | undefined, value?: string | undefined}; export type PaymentTool = {acceptor: Acceptor, accountBank?: ('EGHTESAD_NOVID' | 'ANSAR' | 'IRAN_ZAMIN' | 'PARSIAN' | 'PASARGAD' | 'TAT' | 'TEJARAT' | 'TOSAE_TAVON' | 'TOSAE_SADERAT' | 'HEKMAT_IRANIAN' | 'DAY' | 'REFAH' | 'SAMAN' | 'SEPAH' | 'SARMAYEH' | 'SINA' | 'SHAHR' | 'SADERAT' | 'SANAT_O_MADAN' | 'MEHR' | 'GHAVAMIN' | 'KAR_AFARIN' | 'KESHAVARZI' | 'GARDESHGARI' | 'MARKAZI' | 'MASKAN' | 'MELLAT' | 'MELLI' | 'MEHR_EGHTESAD' | 'POST' | 'TOSAE' | 'KOSAR' | 'MIDDLE_EAST' | 'OTHER') | undefined, accountBranch?: string | undefined, accountBranchCode?: string | undefined, accountName?: string | undefined, accountNumber?: string | undefined, accountSheba?: string | undefined, confirmed?: boolean | undefined, documents?: Array | undefined, id?: number | undefined, merchant?: string | undefined, name?: string | undefined, password?: string | undefined, picked?: boolean | undefined, posType?: ('GPRS' | 'TYPICAL' | 'LAN' | 'M' | 'PC' | 'WIFI') | undefined, sent?: boolean | undefined, sentMessage?: string | undefined, serial?: string | undefined, terminal?: string | undefined, type: 'WALLET' | 'POS' | 'IPG', username?: string | undefined}; export type Document = {acceptor?: Acceptor | undefined, contentContentType?: string | undefined, description?: string | undefined, documentIdentifier?: string | undefined, documentKey?: string | undefined, documentStatus?: ('CONFIRMED' | 'REJECTED') | undefined, documentType: 'LOGO' | 'MENU' | 'PHOTO' | 'PHOTO_BUILDING' | 'DOCUMENT' | 'BANNER' | 'BANNER_LANDING' | 'BANNER_LANDING_DESKTOP' | 'ID_NATIONAL_CODE' | 'ID_IDENTITY_NUMBER' | 'ID_BUSINESS_LICENSE' | 'ID_SHEBA_CONFIRMATION' | 'ID_POSTAL_CODE' | 'ID_APG_CONTRACT' | 'ID_POS_CONTRACT' | 'ID_ACCEPTOR_CONFIRMATION' | 'ID_OTHERS', id?: number | undefined, makePublic?: boolean | undefined, paymentTool?: PaymentTool | undefined, statusDescription?: string | undefined, uploadedOn: string, validFrom?: string | undefined, validTo?: string | undefined}; export type Facility = {code: string, id?: number | undefined, name: string}; export type AcceptorFacility = {acceptor?: Acceptor | undefined, facility?: Facility | undefined, id?: number | undefined}; export type AcceptorGroup = {department: 'SPORT' | 'CLOTHING' | 'CONSULTING' | 'DIGITAL' | 'RESTAURANT' | 'HEALTH' | 'SCIENCE' | 'STORE' | 'TRAVEL' | 'HOME_APPLIANCE' | 'BEAUTY' | 'JEWELLERY' | 'CULTURE' | 'FORMALITY' | 'ART' | 'CAR' | 'BUILDING', id?: number | undefined, name: string}; export type AcceptorGuild = {code: string, id?: number | undefined, name?: string | undefined}; export type User = {activated: boolean, clubCardNumber?: number | undefined, clubCode?: number | undefined, clubType?: ('AYRIA' | 'PERSEPOLIS' | 'KARAFARIN' | 'BIMEHKHAVARMIYANE') | undefined, email?: string | undefined, firstName?: string | undefined, fullname?: string | undefined, gender?: ('MALE' | 'FEMALE') | undefined, id?: number | undefined, imageUrl?: string | undefined, langKey?: string | undefined, lastName?: string | undefined, locked?: boolean | undefined, login: string, mobile?: string | undefined, nickname?: string | undefined, notSystem?: boolean | undefined, originClubCode?: number | undefined, persepolisi?: boolean | undefined, plan?: ('BASIC' | 'GOLD' | 'STAR' | 'GALAXY') | undefined, system?: boolean | undefined}; export type Ostan = {amarCode: number, id?: number | undefined, name: string, phoneCode?: string | undefined}; export type Shahrestan = {amarCode: number, id?: number | undefined, name: string, ostan: Ostan}; export type Bakhsh = {amarCode: number, id?: number | undefined, name: string, ostan: Ostan, shahrestan: Shahrestan}; export type Shahr = {amarCode: number, bakhsh: Bakhsh, id?: number | undefined, name: string, ostan: Ostan, shahrType?: number | undefined, shahrestan: Shahrestan, shaparakCode?: string | undefined}; export type AcceptorSubGroup = {group: AcceptorGroup, id?: number | undefined, name: string}; export type AcceptorSubGuild = {code: string, guild: AcceptorGuild, id?: number | undefined, name?: string | undefined}; export type TradingHours = {fri?: string | undefined, id?: number | undefined, mon?: string | undefined, name?: string | undefined, publicHolidays?: string | undefined, sat?: string | undefined, sun?: string | undefined, thu?: string | undefined, tue?: string | undefined, wed?: string | undefined}; export type Acceptor = {acceptorName?: string | undefined, acceptorNameEn?: string | undefined, active?: boolean | undefined, address?: string | undefined, addressEn?: string | undefined, anonymousPay?: boolean | undefined, apgCallbackUrl?: string | undefined, apgSecond?: boolean | undefined, birthCertDigit?: string | undefined, birthCertLetter?: string | undefined, birthCertNumber?: string | undefined, birthCertSeriesNumber?: string | undefined, cashoutVip?: boolean | undefined, centerUpdatableByOwner?: boolean | undefined, city?: string | undefined, code?: string | undefined, companyName?: string | undefined, companyNationalId?: string | undefined, contacts?: Array | undefined, contractSignDate?: string | undefined, contractSignDateJalali?: string | undefined, couponCreationFeePercentage?: number | undefined, dateOfBirth?: string | undefined, delivery?: boolean | undefined, department?: ('SPORT' | 'CLOTHING' | 'CONSULTING' | 'DIGITAL' | 'RESTAURANT' | 'HEALTH' | 'SCIENCE' | 'STORE' | 'TRAVEL' | 'HOME_APPLIANCE' | 'BEAUTY' | 'JEWELLERY' | 'CULTURE' | 'FORMALITY' | 'ART' | 'CAR' | 'BUILDING') | undefined, departmentRestaurant?: boolean | undefined, description?: string | undefined, discountPercentage?: number | undefined, documents?: Array | undefined, facilities?: Array | undefined, familyName?: string | undefined, familyNameEn?: string | undefined, fatherName?: string | undefined, gender?: ('MALE' | 'FEMALE') | undefined, givenName?: string | undefined, givenNameEn?: string | undefined, group?: AcceptorGroup | undefined, guild?: AcceptorGuild | undefined, hideUnregisteredUsersForFactor?: boolean | undefined, id?: number | undefined, identityType?: ('PERSON' | 'COMPANY') | undefined, introducerPercentage?: number | undefined, ipgOverrideName?: boolean | undefined, kargozar?: User | undefined, makePublic?: boolean | undefined, maxDistance?: number | undefined, mobile?: string | undefined, nationalIdNumber?: string | undefined, nationality?: ('IRANIAN' | 'FOREIGNER') | undefined, noRawFee?: boolean | undefined, notifySdkPaymentUrl?: boolean | undefined, onboarded?: boolean | undefined, onlineShop?: boolean | undefined, ostan?: Ostan | undefined, parent?: Acceptor | undefined, paymentTools?: Array | undefined, phone?: string | undefined, pickup?: boolean | undefined, pickupGap?: number | undefined, platformDiscountPercentage?: number | undefined, postcode?: string | undefined, rank?: number | undefined, rawFee?: boolean | undefined, rawFeeFixed?: boolean | undefined, rawFeePercentage?: number | undefined, referralCode?: number | undefined, registrar?: User | undefined, registrarType?: ('USER' | 'OWNER' | 'EMPLOYEE') | undefined, registrationDate?: string | undefined, registrationNumber?: string | undefined, shahr?: Shahr | undefined, shortDescription?: string | undefined, siteUrl?: string | undefined, soldSum?: number | undefined, state?: string | undefined, status?: ('REQUESTED' | 'CONFIRMED' | 'DOCUMENT_INCOMPLETE' | 'DOCUMENT_CONFIRMED' | 'DOCUMENT_SENT' | 'NEEDTOREVIEW' | 'COMPLETE_PROFILE' | 'ACTIVE' | 'INACTIVE' | 'SYSTEM' | 'EXPIRED' | 'NOTRANSACTION' | 'CLOSED' | 'ORGANIZATIONAL' | 'BUILDING') | undefined, storeType?: ('VIRTUAL' | 'PHYSICAL') | undefined, subGroup?: AcceptorSubGroup | undefined, subGuild?: AcceptorSubGuild | undefined, tables?: boolean | undefined, targetGroup?: ('MALE' | 'FEMALE' | 'UNISEX') | undefined, tax?: boolean | undefined, taxCode?: string | undefined, taxRaw?: boolean | undefined, terminalSecond?: boolean | undefined, terminalSecondId?: string | undefined, tradingHours?: TradingHours | undefined, user?: User | undefined, visible?: boolean | undefined}; export type File = {contentType?: string | undefined, id?: number | undefined, path?: string | undefined, publicId: string, type: 'PHOTO' | 'DOCUMENT' | 'AVATAR'}; export type Club = {apiKey?: string | undefined, banner?: File | undefined, code?: number | undefined, description?: string | undefined, discount?: number | undefined, enabled?: boolean | undefined, id?: number | undefined, logo?: File | undefined, name?: string | undefined, owner?: User | undefined, ownera?: Acceptor | undefined, smallLogo?: File | undefined, theme?: string | undefined, type?: ('AYRIA' | 'PERSEPOLIS' | 'KARAFARIN' | 'BIMEHKHAVARMIYANE') | undefined, valid?: boolean | undefined, voucher?: number | undefined, voucherType?: boolean | undefined}; export type GroupTransferTemplate = {id?: number | undefined, name: string, order?: number | undefined, owner?: User | undefined, ownera?: Acceptor | undefined, receiverDescription?: string | undefined, senderDescription?: string | undefined}; export type GroupTransferInstance = {id?: number | undefined, name?: string | undefined, owner?: User | undefined, ownera?: Acceptor | undefined, receiverDescription?: string | undefined, senderDescription?: string | undefined, template?: GroupTransferTemplate | undefined}; export type WalletEvent = {acceptor?: Acceptor | undefined, actionDescription?: string | undefined, actionType: 'DEPOSIT' | 'WITHDRAW', amount: number, amountDouble?: number | undefined, balance?: number | undefined, club?: Club | undefined, currency: 'IRR', description?: string | undefined, groupTransferInstance?: GroupTransferInstance | undefined, id?: number | undefined, refEvent?: number | undefined, refPayment?: number | undefined, refType?: ('CASHIN' | 'CASHIN_IDENTITY' | 'SELL_SCORE' | 'SELL_PLAN' | 'SETTLEMENT' | 'REFUND_VOUCHER' | 'TRANSFER_OPERATION_COST' | 'NOT_REGISTERED_CUSTOMER_OPERATION_COST' | 'BILL_WAGE' | 'SELL_VOUCHER' | 'TRANSFER' | 'MOBILE_CHARGE' | 'INTERNET_CHARGE' | 'AYRIA_PAYMENT' | 'TIP' | 'CONVERTED_SCORE' | 'CASHOUT' | 'REFUND_CASHOUT' | 'PURCHASE' | 'GROUP_TRANSFER_OPERATION_COST' | 'BALANCE_CORRECTION' | 'PURCHASE_SCORE' | 'PAY_BILL' | 'PURCHASE_VOUCHER' | 'CASHOUT_VIP' | 'COUPON_CENTER_DEPOSIT' | 'COUPON_CENTER_WITHDRAW' | 'COUPON_SHARE') | undefined, transferType?: ('DEBIT' | 'DEBT' | 'GIFT' | 'SALARY' | 'CASH_MANAGEMENT' | 'BUY' | 'OTHER') | undefined, user?: User | undefined}; export type CreateApiApiWalletEventsManualRefundArgs = {body: WalletEvent}; export type CreateApiApiWalletEventsManualRefundOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * manualRefundCashout * * POST /api/wallet-events/manual-refund */ export const createApiApiWalletEventsManualRefund = async (args: CreateApiApiWalletEventsManualRefundArgs, options: CreateApiApiWalletEventsManualRefundOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") headers.set('accept', "*/*") const url = `${baseUrl.replace(/\/+$/, '')}/api/wallet-events/manual-refund${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 res.blob() };