equal<Key extends keyof WebhookBody,Value extends WebhookBody[Key],>(key: Key,value: Value,): UpdateFilter<[K in Key]: Value, { TerminalKey?: string | undefined; Amount?: number | undefined; OrderId?: string | undefined; Success?: boolean | undefined; Status?: string | undefined; PaymentId?: string | undefined; ErrorCode?: string | undefined; Message?: string | undefined; Details?: string | undefined; RebillId?: number | undefined; CardId?: number | undefined; Pan?: string | undefined; ExpDate?: string | undefined; Token?: string | undefined; DATA?: { Route?: "TCB" | undefined; Source?: "Installment" | undefined; CreditAmount?: number | undefined; } | undefined; }
& { TerminalKey?: string | undefined; CustomerKey?: string | undefined; RequestKey?: string | undefined; Success?: boolean | undefined; Status?: "COMPLETED"
| "REJECTED"
| undefined; PaymentId?: string | undefined; ErrorCode?: string | undefined; RebillId?: string | undefined; CardId?: string | undefined; Pan?: string | undefined; ExpDate?: string | undefined; Token?: string | undefined; }
& { TerminalKey?: string | undefined; OrderId?: string | undefined; Success?: boolean | undefined; Status: string; PaymentId?: string | undefined; ErrorCode?: string | undefined; ErrorMessage?: string | undefined; Amount?: number | undefined; FiscalNumber?: number | undefined; ShiftNumber?: number | undefined; ReceiptDatetime?: string | undefined; FnNumber?: string | undefined; EcrRegNumber?: string | undefined; FiscalDocumentNumber?: number | undefined; FiscalDocumentAttribute?: number | undefined; Receipt?: { FfdVersion?: string | undefined; ClientInfo?: { Birthdate?: string | undefined; Citizenship?: string | undefined; DocumentСode?: string | undefined; DocumentData?: string | undefined; Address?: string | undefined; } | undefined; Taxation?: "osn"
| "usn_income"
| "usn_income_outcome"
| "envd"
| "esn"
| "patent"
| undefined; Email?: string | undefined; Phone?: string | undefined; Customer?: string | undefined; CustomerInn?: string | undefined; Items?: { AgentData?: { AgentSign?: string | undefined; OperationName?: string | undefined; Phones?: string[] | undefined; ReceiverPhones?: unknown; TransferPhones?: unknown; OperatorName?: string | undefined; OperatorAddress?: string | undefined; OperatorInn?: string | undefined; } | undefined; SupplierInfo?: { Phones?: string[] | undefined; Name?: string | undefined; Inn?: string | undefined; } | undefined; Name: string; Price: number; Quantity: number; Amount: number; Tax: "none"
| "vat0"
| "vat10"
| "vat20"
| "vat110"
| "vat120"; PaymentMethod: "full_prepayment"
| "prepayment"
| "advance"
| "full_payment"
| "partial_payment"
| "credit"
| "credit_payment"; PaymentObject: "commodity"
| "excise"
| "job"
| "service"
| "gambling_bet"
| "gambling_prize"
| "lottery"
| "lottery_prize"
| "intellectual_activity"
| "payment"
| "agent_commission"
| "contribution"
| "property_rights"
| "unrealization"
| "tax_reduction"
| "trade_fee"
| "resort_tax"
| "pledge"
| "income_decrease"
| "ie_pension_insurance_without_payments"
| "ie_pension_insurance_with_payments"
| "ie_medical_insurance_without_payments"
| "ie_medical_insurance_with_payments"
| "social_insurance"
| "casino_chips"
| "agent_payment"
| "excisable_goods_without_marking_code"
| "excisable_goods_with_marking_code"
| "goods_without_marking_code"
| "goods_with_marking_code"
| "another"; UserData?: string | undefined; Excise?: string | undefined; CountryCode?: string | undefined; DeclarationNumber?: string | undefined; MeasurementUnit: string; MarkProcessingMode?: string | undefined; MarkCode?: { MarkCodeType: string; Value: string; } | undefined; MarkQuantity?: { Numerator?: number | undefined; Denominator?: number | undefined; } | undefined; SectoralItemProps?: { FederalId: string; Date: string; Number: string; Value: string; } | undefined; }[] | undefined; Payments?: { Cash?: number | undefined; Electronic: number; AdvancePayment?: number | undefined; Credit?: number | undefined; Provision?: number | undefined; }[] | undefined; }
| { Items?: { Name: string; Price: number; Quantity: number; Amount: number; PaymentMethod: "full_prepayment"
| "prepayment"
| "advance"
| "full_payment"
| "partial_payment"
| "credit"
| "credit_payment"; PaymentObject: "commodity"
| "excise"
| "job"
| "service"
| "gambling_bet"
| "gambling_prize"
| "lottery"
| "lottery_prize"
| "intellectual_activity"
| "payment"
| "agent_commission"
| "another"
| "composite"; Tax: "none"
| "vat0"
| "vat10"
| "vat20"
| "vat110"
| "vat120"; Ean13?: string | undefined; ShopCode?: string | undefined; AgentData?: { AgentSign?: string | undefined; OperationName?: string | undefined; Phones?: string[] | undefined; ReceiverPhones?: unknown; TransferPhones?: unknown; OperatorName?: string | undefined; OperatorAddress?: string | undefined; OperatorInn?: string | undefined; } | undefined; SupplierInfo?: { Phones?: string[] | undefined; Name?: string | undefined; Inn?: string | undefined; } | undefined; }[] | undefined; FfdVersion: string; Email?: string | undefined; Phone?: string | undefined; Taxation?: "osn"
| "usn_income"
| "usn_income_outcome"
| "envd"
| "esn"
| "patent"
| undefined; Payments?: { Cash?: number | undefined; Electronic: number; AdvancePayment?: number | undefined; Credit?: number | undefined; Provision?: number | undefined; }[] | undefined; }
| undefined; Type?: string | undefined; Token?: string | undefined; Ofd?: string | undefined; Url?: string | undefined; QrCodeUrl?: string | undefined; CalculationPlace?: string | undefined; CashierName?: string | undefined; SettlePlace?: string | undefined; }
& { TerminalKey: string; RequestKey: string; AccountToken?: string | undefined; BankMemberId?: string | undefined; BankMemberName?: string | undefined; NotificationType: string; Success: boolean; ErrorCode: string; Message?: string | undefined; Token: string; Status: string; }>
Фильтр, который проверяет равняется ли значение по ключу тому что вы передали
Value extends WebhookBody[Key]
UpdateFilter<[K in Key]: Value, { TerminalKey?: string | undefined; Amount?: number | undefined; OrderId?: string | undefined; Success?: boolean | undefined; Status?: string | undefined; PaymentId?: string | undefined; ErrorCode?: string | undefined; Message?: string | undefined; Details?: string | undefined; RebillId?: number | undefined; CardId?: number | undefined; Pan?: string | undefined; ExpDate?: string | undefined; Token?: string | undefined; DATA?: { Route?: "TCB" | undefined; Source?: "Installment" | undefined; CreditAmount?: number | undefined; } | undefined; }
& { TerminalKey?: string | undefined; CustomerKey?: string | undefined; RequestKey?: string | undefined; Success?: boolean | undefined; Status?: "COMPLETED"
| "REJECTED"
| undefined; PaymentId?: string | undefined; ErrorCode?: string | undefined; RebillId?: string | undefined; CardId?: string | undefined; Pan?: string | undefined; ExpDate?: string | undefined; Token?: string | undefined; }
& { TerminalKey?: string | undefined; OrderId?: string | undefined; Success?: boolean | undefined; Status: string; PaymentId?: string | undefined; ErrorCode?: string | undefined; ErrorMessage?: string | undefined; Amount?: number | undefined; FiscalNumber?: number | undefined; ShiftNumber?: number | undefined; ReceiptDatetime?: string | undefined; FnNumber?: string | undefined; EcrRegNumber?: string | undefined; FiscalDocumentNumber?: number | undefined; FiscalDocumentAttribute?: number | undefined; Receipt?: { FfdVersion?: string | undefined; ClientInfo?: { Birthdate?: string | undefined; Citizenship?: string | undefined; DocumentСode?: string | undefined; DocumentData?: string | undefined; Address?: string | undefined; } | undefined; Taxation?: "osn"
| "usn_income"
| "usn_income_outcome"
| "envd"
| "esn"
| "patent"
| undefined; Email?: string | undefined; Phone?: string | undefined; Customer?: string | undefined; CustomerInn?: string | undefined; Items?: { AgentData?: { AgentSign?: string | undefined; OperationName?: string | undefined; Phones?: string[] | undefined; ReceiverPhones?: unknown; TransferPhones?: unknown; OperatorName?: string | undefined; OperatorAddress?: string | undefined; OperatorInn?: string | undefined; } | undefined; SupplierInfo?: { Phones?: string[] | undefined; Name?: string | undefined; Inn?: string | undefined; } | undefined; Name: string; Price: number; Quantity: number; Amount: number; Tax: "none"
| "vat0"
| "vat10"
| "vat20"
| "vat110"
| "vat120"; PaymentMethod: "full_prepayment"
| "prepayment"
| "advance"
| "full_payment"
| "partial_payment"
| "credit"
| "credit_payment"; PaymentObject: "commodity"
| "excise"
| "job"
| "service"
| "gambling_bet"
| "gambling_prize"
| "lottery"
| "lottery_prize"
| "intellectual_activity"
| "payment"
| "agent_commission"
| "contribution"
| "property_rights"
| "unrealization"
| "tax_reduction"
| "trade_fee"
| "resort_tax"
| "pledge"
| "income_decrease"
| "ie_pension_insurance_without_payments"
| "ie_pension_insurance_with_payments"
| "ie_medical_insurance_without_payments"
| "ie_medical_insurance_with_payments"
| "social_insurance"
| "casino_chips"
| "agent_payment"
| "excisable_goods_without_marking_code"
| "excisable_goods_with_marking_code"
| "goods_without_marking_code"
| "goods_with_marking_code"
| "another"; UserData?: string | undefined; Excise?: string | undefined; CountryCode?: string | undefined; DeclarationNumber?: string | undefined; MeasurementUnit: string; MarkProcessingMode?: string | undefined; MarkCode?: { MarkCodeType: string; Value: string; } | undefined; MarkQuantity?: { Numerator?: number | undefined; Denominator?: number | undefined; } | undefined; SectoralItemProps?: { FederalId: string; Date: string; Number: string; Value: string; } | undefined; }[] | undefined; Payments?: { Cash?: number | undefined; Electronic: number; AdvancePayment?: number | undefined; Credit?: number | undefined; Provision?: number | undefined; }[] | undefined; }
| { Items?: { Name: string; Price: number; Quantity: number; Amount: number; PaymentMethod: "full_prepayment"
| "prepayment"
| "advance"
| "full_payment"
| "partial_payment"
| "credit"
| "credit_payment"; PaymentObject: "commodity"
| "excise"
| "job"
| "service"
| "gambling_bet"
| "gambling_prize"
| "lottery"
| "lottery_prize"
| "intellectual_activity"
| "payment"
| "agent_commission"
| "another"
| "composite"; Tax: "none"
| "vat0"
| "vat10"
| "vat20"
| "vat110"
| "vat120"; Ean13?: string | undefined; ShopCode?: string | undefined; AgentData?: { AgentSign?: string | undefined; OperationName?: string | undefined; Phones?: string[] | undefined; ReceiverPhones?: unknown; TransferPhones?: unknown; OperatorName?: string | undefined; OperatorAddress?: string | undefined; OperatorInn?: string | undefined; } | undefined; SupplierInfo?: { Phones?: string[] | undefined; Name?: string | undefined; Inn?: string | undefined; } | undefined; }[] | undefined; FfdVersion: string; Email?: string | undefined; Phone?: string | undefined; Taxation?: "osn"
| "usn_income"
| "usn_income_outcome"
| "envd"
| "esn"
| "patent"
| undefined; Payments?: { Cash?: number | undefined; Electronic: number; AdvancePayment?: number | undefined; Credit?: number | undefined; Provision?: number | undefined; }[] | undefined; }
| undefined; Type?: string | undefined; Token?: string | undefined; Ofd?: string | undefined; Url?: string | undefined; QrCodeUrl?: string | undefined; CalculationPlace?: string | undefined; CashierName?: string | undefined; SettlePlace?: string | undefined; }
& { TerminalKey: string; RequestKey: string; AccountToken?: string | undefined; BankMemberId?: string | undefined; BankMemberName?: string | undefined; NotificationType: string; Success: boolean; ErrorCode: string; Message?: string | undefined; Token: string; Status: string; }>