import {z} from 'zod' export type GetApiV1WebhooksIdArgs = {'User-Agent'?: string | undefined, id: string}; export type GetApiV1WebhooksIdOptions = {baseUrl?: string | undefined, bearerAuth?: string | undefined, fetch?: typeof fetch | undefined}; export const webhookObject = z.object({id: z.number().int().optional(), name: z.string().max(255).nullable().optional(), url: z.string().max(255), content_type: z.string().max(255).nullable().optional(), events: z.array(z.enum(["ping", "access_token.db.created", "access_token.db.updated", "access_token.db.deleted", "access_token.reminder", "access_token.expired", "account.updated", "account.blocked", "account.bank_billet_creation_blocked", "bank_billet.created", "bank_billet.updated", "bank_billet.generated", "bank_billet.canceled", "bank_billet.blocked", "bank_billet.overdue", "bank_billet.paid", "bank_billet.due_date", "bank_billet.rejected", "bank_billet.cancel.requested", "bank_billet.cancel.confirmed", "bank_billet.cancel.failed", "bank_billet.cancel.error", "bank_billet.register.requested", "bank_billet.register.confirmed", "bank_billet.register.failed", "bank_billet.register.error", "bank_billet.update.requested", "bank_billet.update.confirmed", "bank_billet.update.failed", "bank_billet.update.error", "bank_billet.registered", "bank_billet.deleted", "bank_billet.sync.requested", "bank_billet.sync.confirmed", "bank_billet.sync.failed", "bank_billet.sync.error", "bank_billet.get.requested", "bank_billet.get.confirmed", "bank_billet.get.failed", "bank_billet.get.error", "bank_billet.get_child.requested", "bank_billet.get_child.confirmed", "bank_billet.get_child.failed", "bank_billet.get_child.error", "bank_billet.find.requested", "bank_billet.find.confirmed", "bank_billet.find.failed", "bank_billet.find.error", "bank_billet.add_pix.requested", "bank_billet.add_pix.confirmed", "bank_billet.add_pix.failed", "bank_billet.add_pix.error", "bank_billet.get_pix.requested", "bank_billet.get_pix.confirmed", "bank_billet.get_pix.failed", "bank_billet.get_pix.error", "bank_billet.protest.requested", "bank_billet.protest.confirmed", "bank_billet.protest.failed", "bank_billet.protest.error", "bank_billet_discharge.created", "bank_billet_discharge.updated", "bank_billet_discharge.deleted", "bank_billet_remittance.created", "bank_billet_remittance.updated", "bank_billet_remittance.deleted", "bank_billet_registration.created", "bank_billet_registration.updated", "bank_billet_registration.deleted", "bank_billet_payment.created", "bank_billet_payment.updated", "bank_billet_payment.deleted", "customer.created", "customer.updated", "customer.portal_password_updated", "customer.deleted", "transaction.created", "transaction.updated", "transaction.processed", "withdrawal.transferred", "withdrawal.requested", "addon.activated", "addon.removed", "plan_subscription.activated", "plan_subscription.removed", "plan_subscription.fee", "plan_subscription.updated", "user.created", "user.updated", "user.deleted", "remittance.created", "remittance.processed", "remittance.downloaded", "remittance.sent", "remittance.deleted", "remittance.line.db.created", "remittance.line.db.updated", "remittance.line.db.deleted", "discharge.created", "discharge.processed", "discharge.deleted", "bank_billet_account.created", "bank_billet_account.homologated", "bank_billet_account.homologation_failed", "bank_billet_account.homologation_started", "bank_billet_account.validated", "bank_billet_account.validation_released", "bank_billet_account.activated", "bank_billet_account.updated", "bank_billet_account.deleted", "edi.remittance_line.created", "edi.remittance_line.updated", "edi.remittance_line.deleted", "edi.edi_box.activated", "edi.edi_box.db.created", "edi.edi_box.db.deleted", "edi.edi_box.db.updated", "edi.edi_box.generated", "edi.edi_box.demand_received", "edi.edi_box.confirming_at_bank", "edi.edi_box.testing_by_customer", "edi.edi_box.waiting_for_validations", "customer_subscription.created", "customer_subscription.updated", "customer_subscription.deleted", "installment.created", "installment.processed", "installment.generated", "installment.deleted", "import.created", "import.processed", "import.deleted", "export.db.created", "export.db.updated", "export.db.deleted", "pix.db.created", "pix.db.updated", "pix.db.deleted", "pix.register.requested", "pix.register.confirmed", "pix.register.failed", "pix.register.error", "pix.update.requested", "pix.update.confirmed", "pix.update.failed", "pix.update.error", "pix.paid", "pix.overdue", "pix.cancel.requested", "pix.cancel.confirmed", "pix.cancel.failed", "pix.cancel.error", "pix.sync.requested", "pix.sync.confirmed", "pix.sync.failed", "pix.sync.error", "pix.get.requested", "pix.get.confirmed", "pix.get.failed", "pix.get.error", "financial.account.balance_sync.requested", "financial.account.balance_sync.confirmed", "financial.account.balance_sync.failed", "financial.account.balance_sync.error", "financial.account.statement_sync.requested", "financial.account.statement_sync.confirmed", "financial.account.statement_sync.failed", "financial.account.statement_sync.error", "financial.account.db.created", "financial.account.db.updated", "financial.account.db.deleted", "financial.account.statement.updated", "financial.account.balance.updated", "financial.account_balance.db.created", "transfer.batch.db.created", "transfer.batch.db.updated", "transfer.batch.db.deleted", "transfer.batch.awaiting_approval", "transfer.pix_batch.awaiting_approval", "transfer.pix_batch.get.requested", "transfer.pix_batch.get.confirmed", "transfer.pix_batch.get.failed", "transfer.pix_batch.get.error", "transfer.pix_batch.sync.requested", "transfer.pix_batch.sync.confirmed", "transfer.pix_batch.sync.failed", "transfer.pix_batch.sync.error", "transfer.pix_batch.register.requested", "transfer.pix_batch.register.confirmed", "transfer.pix_batch.register.failed", "transfer.pix_batch.register.error", "transfer.pix_batch.approve.requested", "transfer.pix_batch.approve.confirmed", "transfer.pix_batch.approve.failed", "transfer.pix_batch.approve.error", "transfer.pix_batch.reprove.requested", "transfer.pix_batch.reprove.confirmed", "transfer.pix_batch.reprove.failed", "transfer.pix_batch.reprove.error", "transfer.pix_batch.cancel.requested", "transfer.pix_batch.cancel.confirmed", "transfer.pix_batch.cancel.failed", "transfer.pix_batch.cancel.error", "transfer.ted_batch.awaiting_approval", "transfer.ted_batch.get.requested", "transfer.ted_batch.get.confirmed", "transfer.ted_batch.get.failed", "transfer.ted_batch.get.error", "transfer.ted_batch.sync.requested", "transfer.ted_batch.sync.confirmed", "transfer.ted_batch.sync.failed", "transfer.ted_batch.sync.error", "transfer.ted_batch.register.requested", "transfer.ted_batch.register.confirmed", "transfer.ted_batch.register.failed", "transfer.ted_batch.register.error", "transfer.ted_batch.approve.requested", "transfer.ted_batch.approve.confirmed", "transfer.ted_batch.approve.failed", "transfer.ted_batch.approve.error", "transfer.ted_batch.reprove.requested", "transfer.ted_batch.reprove.confirmed", "transfer.ted_batch.reprove.failed", "transfer.ted_batch.reprove.error", "transfer.ted_batch.cancel.requested", "transfer.ted_batch.cancel.confirmed", "transfer.ted_batch.cancel.failed", "transfer.ted_batch.cancel.error", "transfer.internal_batch.awaiting_approval", "transfer.internal_batch.get.requested", "transfer.internal_batch.get.confirmed", "transfer.internal_batch.get.failed", "transfer.internal_batch.get.error", "transfer.internal_batch.sync.requested", "transfer.internal_batch.sync.confirmed", "transfer.internal_batch.sync.failed", "transfer.internal_batch.sync.error", "transfer.internal_batch.register.requested", "transfer.internal_batch.register.confirmed", "transfer.internal_batch.register.failed", "transfer.internal_batch.register.error", "transfer.internal_batch.approve.requested", "transfer.internal_batch.approve.confirmed", "transfer.internal_batch.approve.failed", "transfer.internal_batch.approve.error", "transfer.internal_batch.reprove.requested", "transfer.internal_batch.reprove.confirmed", "transfer.internal_batch.reprove.failed", "transfer.internal_batch.reprove.error", "transfer.internal_batch.cancel.requested", "transfer.internal_batch.cancel.confirmed", "transfer.internal_batch.cancel.failed", "transfer.internal_batch.cancel.error", "transfer.db.created", "transfer.db.updated", "transfer.db.deleted", "transfer.pix.register.requested", "transfer.pix.register.confirmed", "transfer.pix.register.failed", "transfer.pix.register.error", "transfer.pix.reschedule.requested", "transfer.pix.reschedule.confirmed", "transfer.pix.reschedule.failed", "transfer.pix.reschedule.error", "transfer.pix.approve.requested", "transfer.pix.approve.confirmed", "transfer.pix.approve.failed", "transfer.pix.approve.error", "transfer.pix.cancel.requested", "transfer.pix.cancel.confirmed", "transfer.pix.cancel.failed", "transfer.pix.cancel.error", "transfer.pix.get.requested", "transfer.pix.get.confirmed", "transfer.pix.get.failed", "transfer.pix.get.error", "transfer.pix.sync.requested", "transfer.pix.sync.confirmed", "transfer.pix.sync.failed", "transfer.pix.sync.error", "transfer.ted.register.requested", "transfer.ted.register.confirmed", "transfer.ted.register.failed", "transfer.ted.register.error", "transfer.ted.reschedule.requested", "transfer.ted.reschedule.confirmed", "transfer.ted.reschedule.failed", "transfer.ted.reschedule.error", "transfer.ted.approve.requested", "transfer.ted.approve.confirmed", "transfer.ted.approve.failed", "transfer.ted.approve.error", "transfer.ted.cancel.requested", "transfer.ted.cancel.confirmed", "transfer.ted.cancel.failed", "transfer.ted.cancel.error", "transfer.ted.get.requested", "transfer.ted.get.confirmed", "transfer.ted.get.failed", "transfer.ted.get.error", "transfer.ted.sync.requested", "transfer.ted.sync.confirmed", "transfer.ted.sync.failed", "transfer.ted.sync.error", "transfer.internal.register.requested", "transfer.internal.register.confirmed", "transfer.internal.register.failed", "transfer.internal.register.error", "transfer.internal.reschedule.requested", "transfer.internal.reschedule.confirmed", "transfer.internal.reschedule.failed", "transfer.internal.reschedule.error", "transfer.internal.approve.requested", "transfer.internal.approve.confirmed", "transfer.internal.approve.failed", "transfer.internal.approve.error", "transfer.internal.cancel.requested", "transfer.internal.cancel.confirmed", "transfer.internal.cancel.failed", "transfer.internal.cancel.error", "transfer.internal.get.requested", "transfer.internal.get.confirmed", "transfer.internal.get.failed", "transfer.internal.get.error", "transfer.internal.sync.requested", "transfer.internal.sync.confirmed", "transfer.internal.sync.failed", "transfer.internal.sync.error", "payment.db.created", "payment.db.updated", "payment.db.deleted", "payment.bank_billet.register.requested", "payment.bank_billet.register.confirmed", "payment.bank_billet.register.failed", "payment.bank_billet.register.error", "payment.bank_billet.approve.requested", "payment.bank_billet.approve.confirmed", "payment.bank_billet.approve.failed", "payment.bank_billet.approve.error", "payment.bank_billet.reschedule.requested", "payment.bank_billet.reschedule.confirmed", "payment.bank_billet.reschedule.failed", "payment.bank_billet.reschedule.error", "payment.bank_billet.cancel.requested", "payment.bank_billet.cancel.confirmed", "payment.bank_billet.cancel.failed", "payment.bank_billet.cancel.error", "payment.bank_billet.get.requested", "payment.bank_billet.get.confirmed", "payment.bank_billet.get.failed", "payment.bank_billet.get.error", "payment.bank_billet.sync.requested", "payment.bank_billet.sync.confirmed", "payment.bank_billet.sync.failed", "payment.bank_billet.sync.error", "payment.darf.register.requested", "payment.darf.register.confirmed", "payment.darf.register.failed", "payment.darf.register.error", "payment.darf.approve.requested", "payment.darf.approve.confirmed", "payment.darf.approve.failed", "payment.darf.approve.error", "payment.darf.reschedule.requested", "payment.darf.reschedule.confirmed", "payment.darf.reschedule.failed", "payment.darf.reschedule.error", "payment.darf.cancel.requested", "payment.darf.cancel.confirmed", "payment.darf.cancel.failed", "payment.darf.cancel.error", "payment.darf.get.requested", "payment.darf.get.confirmed", "payment.darf.get.failed", "payment.darf.get.error", "payment.darf.sync.requested", "payment.darf.sync.confirmed", "payment.darf.sync.failed", "payment.darf.sync.error", "payment.utility.register.requested", "payment.utility.register.confirmed", "payment.utility.register.failed", "payment.utility.register.error", "payment.utility.approve.requested", "payment.utility.approve.confirmed", "payment.utility.approve.failed", "payment.utility.approve.error", "payment.utility.reschedule.requested", "payment.utility.reschedule.confirmed", "payment.utility.reschedule.failed", "payment.utility.reschedule.error", "payment.utility.cancel.requested", "payment.utility.cancel.confirmed", "payment.utility.cancel.failed", "payment.utility.cancel.error", "payment.utility.get.requested", "payment.utility.get.confirmed", "payment.utility.get.failed", "payment.utility.get.error", "payment.utility.sync.requested", "payment.utility.sync.confirmed", "payment.utility.sync.failed", "payment.utility.sync.error", "payment.gru.register.requested", "payment.gru.register.confirmed", "payment.gru.register.failed", "payment.gru.register.error", "payment.gru.approve.requested", "payment.gru.approve.confirmed", "payment.gru.approve.failed", "payment.gru.approve.error", "payment.gru.reschedule.requested", "payment.gru.reschedule.confirmed", "payment.gru.reschedule.failed", "payment.gru.reschedule.error", "payment.gru.cancel.requested", "payment.gru.cancel.confirmed", "payment.gru.cancel.failed", "payment.gru.cancel.error", "payment.gru.get.requested", "payment.gru.get.confirmed", "payment.gru.get.failed", "payment.gru.get.error", "payment.gru.sync.requested", "payment.gru.sync.confirmed", "payment.gru.sync.failed", "payment.gru.sync.error", "payment.pix.register.requested", "payment.pix.register.confirmed", "payment.pix.register.failed", "payment.pix.register.error", "payment.pix.approve.requested", "payment.pix.approve.confirmed", "payment.pix.approve.failed", "payment.pix.approve.error", "payment.pix.reschedule.requested", "payment.pix.reschedule.confirmed", "payment.pix.reschedule.failed", "payment.pix.reschedule.error", "payment.pix.cancel.requested", "payment.pix.cancel.confirmed", "payment.pix.cancel.failed", "payment.pix.cancel.error", "payment.pix.get.requested", "payment.pix.get.confirmed", "payment.pix.get.failed", "payment.pix.get.error", "payment.pix.sync.requested", "payment.pix.sync.confirmed", "payment.pix.sync.failed", "payment.pix.sync.error", "payment.tax.register.requested", "payment.tax.register.confirmed", "payment.tax.register.failed", "payment.tax.register.error", "payment.tax.approve.requested", "payment.tax.approve.confirmed", "payment.tax.approve.failed", "payment.tax.approve.error", "payment.tax.reschedule.requested", "payment.tax.reschedule.confirmed", "payment.tax.reschedule.failed", "payment.tax.reschedule.error", "payment.tax.cancel.requested", "payment.tax.cancel.confirmed", "payment.tax.cancel.failed", "payment.tax.cancel.error", "payment.tax.get.requested", "payment.tax.get.confirmed", "payment.tax.get.failed", "payment.tax.get.error", "payment.tax.sync.requested", "payment.tax.sync.confirmed", "payment.tax.sync.failed", "payment.tax.sync.error", "payment.batch.db.created", "payment.batch.db.updated", "payment.batch.db.deleted", "payment.batch.awaiting_approval", "payment.bank_billet_batch.awaiting_approval", "payment.bank_billet_batch.get.requested", "payment.bank_billet_batch.get.confirmed", "payment.bank_billet_batch.get.failed", "payment.bank_billet_batch.get.error", "payment.bank_billet_batch.sync.requested", "payment.bank_billet_batch.sync.confirmed", "payment.bank_billet_batch.sync.failed", "payment.bank_billet_batch.sync.error", "payment.bank_billet_batch.register.requested", "payment.bank_billet_batch.register.confirmed", "payment.bank_billet_batch.register.failed", "payment.bank_billet_batch.register.error", "payment.bank_billet_batch.approve.requested", "payment.bank_billet_batch.approve.confirmed", "payment.bank_billet_batch.approve.failed", "payment.bank_billet_batch.approve.error", "payment.bank_billet_batch.reprove.requested", "payment.bank_billet_batch.reprove.confirmed", "payment.bank_billet_batch.reprove.failed", "payment.bank_billet_batch.reprove.error", "payment.bank_billet_batch.cancel.requested", "payment.bank_billet_batch.cancel.confirmed", "payment.bank_billet_batch.cancel.failed", "payment.bank_billet_batch.cancel.error", "payment.darf_batch.awaiting_approval", "payment.darf_batch.get.requested", "payment.darf_batch.get.confirmed", "payment.darf_batch.get.failed", "payment.darf_batch.get.error", "payment.darf_batch.sync.requested", "payment.darf_batch.sync.confirmed", "payment.darf_batch.sync.failed", "payment.darf_batch.sync.error", "payment.darf_batch.register.requested", "payment.darf_batch.register.confirmed", "payment.darf_batch.register.failed", "payment.darf_batch.register.error", "payment.darf_batch.approve.requested", "payment.darf_batch.approve.confirmed", "payment.darf_batch.approve.failed", "payment.darf_batch.approve.error", "payment.darf_batch.reprove.requested", "payment.darf_batch.reprove.confirmed", "payment.darf_batch.reprove.failed", "payment.darf_batch.reprove.error", "payment.darf_batch.cancel.requested", "payment.darf_batch.cancel.confirmed", "payment.darf_batch.cancel.failed", "payment.darf_batch.cancel.error", "payment.utility_batch.awaiting_approval", "payment.utility_batch.get.requested", "payment.utility_batch.get.confirmed", "payment.utility_batch.get.failed", "payment.utility_batch.get.error", "payment.utility_batch.sync.requested", "payment.utility_batch.sync.confirmed", "payment.utility_batch.sync.failed", "payment.utility_batch.sync.error", "payment.utility_batch.register.requested", "payment.utility_batch.register.confirmed", "payment.utility_batch.register.failed", "payment.utility_batch.register.error", "payment.utility_batch.approve.requested", "payment.utility_batch.approve.confirmed", "payment.utility_batch.approve.failed", "payment.utility_batch.approve.error", "payment.utility_batch.reprove.requested", "payment.utility_batch.reprove.confirmed", "payment.utility_batch.reprove.failed", "payment.utility_batch.reprove.error", "payment.utility_batch.cancel.requested", "payment.utility_batch.cancel.confirmed", "payment.utility_batch.cancel.failed", "payment.utility_batch.cancel.error", "payment.gru_batch.awaiting_approval", "payment.gru_batch.get.requested", "payment.gru_batch.get.confirmed", "payment.gru_batch.get.failed", "payment.gru_batch.get.error", "payment.gru_batch.sync.requested", "payment.gru_batch.sync.confirmed", "payment.gru_batch.sync.failed", "payment.gru_batch.sync.error", "payment.gru_batch.register.requested", "payment.gru_batch.register.confirmed", "payment.gru_batch.register.failed", "payment.gru_batch.register.error", "payment.gru_batch.approve.requested", "payment.gru_batch.approve.confirmed", "payment.gru_batch.approve.failed", "payment.gru_batch.approve.error", "payment.gru_batch.reprove.requested", "payment.gru_batch.reprove.confirmed", "payment.gru_batch.reprove.failed", "payment.gru_batch.reprove.error", "payment.gru_batch.cancel.requested", "payment.gru_batch.cancel.confirmed", "payment.gru_batch.cancel.failed", "payment.gru_batch.cancel.error", "payment.pix_batch.awaiting_approval", "payment.pix_batch.get.requested", "payment.pix_batch.get.confirmed", "payment.pix_batch.get.failed", "payment.pix_batch.get.error", "payment.pix_batch.sync.requested", "payment.pix_batch.sync.confirmed", "payment.pix_batch.sync.failed", "payment.pix_batch.sync.error", "payment.pix_batch.register.requested", "payment.pix_batch.register.confirmed", "payment.pix_batch.register.failed", "payment.pix_batch.register.error", "payment.pix_batch.approve.requested", "payment.pix_batch.approve.confirmed", "payment.pix_batch.approve.failed", "payment.pix_batch.approve.error", "payment.pix_batch.reprove.requested", "payment.pix_batch.reprove.confirmed", "payment.pix_batch.reprove.failed", "payment.pix_batch.reprove.error", "payment.pix_batch.cancel.requested", "payment.pix_batch.cancel.confirmed", "payment.pix_batch.cancel.failed", "payment.pix_batch.cancel.error", "payment.tax_batch.awaiting_approval", "payment.tax_batch.get.requested", "payment.tax_batch.get.confirmed", "payment.tax_batch.get.failed", "payment.tax_batch.get.error", "payment.tax_batch.sync.requested", "payment.tax_batch.sync.confirmed", "payment.tax_batch.sync.failed", "payment.tax_batch.sync.error", "payment.tax_batch.register.requested", "payment.tax_batch.register.confirmed", "payment.tax_batch.register.failed", "payment.tax_batch.register.error", "payment.tax_batch.approve.requested", "payment.tax_batch.approve.confirmed", "payment.tax_batch.approve.failed", "payment.tax_batch.approve.error", "payment.tax_batch.reprove.requested", "payment.tax_batch.reprove.confirmed", "payment.tax_batch.reprove.failed", "payment.tax_batch.reprove.error", "payment.tax_batch.cancel.requested", "payment.tax_batch.cancel.confirmed", "payment.tax_batch.cancel.failed", "payment.tax_batch.cancel.error", "payment.dda.account.db.created", "payment.dda.account.register.requested", "payment.dda.account.register.failed", "payment.dda.account.register.error", "payment.dda.account.register.confirmed", "payment.dda.account.bank_billets_sync.requested", "payment.dda.account.bank_billets_sync.failed", "payment.dda.account.bank_billets_sync.error", "payment.dda.account.bank_billets_sync.confirmed", "payment.dda.account.unregister.requested", "payment.dda.account.unregister.failed", "payment.dda.account.unregister.error", "payment.dda.account.unregister.confirmed", "payment.dda.bank_billet.db.created", "payment.dda.bank_billet.db.updated", "payment.dda.bank_billet.external_status_changed", "payment.dda.bank_billet.get.requested", "payment.dda.bank_billet.get.confirmed", "payment.dda.bank_billet.get.failed", "payment.dda.bank_billet.get.error", "payment.dda.bank_billet.sync.requested", "payment.dda.bank_billet.sync.confirmed", "payment.dda.bank_billet.sync.failed", "payment.dda.bank_billet.sync.error", "payment.dda.account.db.updated", "payment.dda.account.db.deleted", "payment.dda.account.letter.pending", "payment.dda.account.letter.waiting_signatures", "payment.dda.account.letter.signed", "payment.dda.account.letter.failed", "payment.dda.account.confirmed", "payment.dda.account.rejected", "payment.dda.account.failed", "payment.dda.account.disabled", "payment.dda.account.enabled", "credit.restriction.add.requested", "credit.restriction.add.failed", "credit.restriction.add.error", "credit.restriction.add.confirmed", "credit.restriction.remove.requested", "credit.restriction.remove.confirmed", "credit.restriction.remove.failed", "credit.restriction.remove.error", "charge.automatic_pix.account.db.created", "charge.automatic_pix.account.db.updated", "charge.automatic_pix.account.db.deleted", "charge.automatic_pix.recurrence.db.created", "charge.automatic_pix.recurrence.db.updated", "charge.automatic_pix.recurrence.db.deleted", "charge.automatic_pix.recurrence.cancel.requested", "charge.automatic_pix.recurrence.cancel.confirmed", "charge.automatic_pix.recurrence.cancel.failed", "charge.automatic_pix.recurrence.cancel.error", "charge.automatic_pix.recurrence.register.requested", "charge.automatic_pix.recurrence.register.confirmed", "charge.automatic_pix.recurrence.register.failed", "charge.automatic_pix.recurrence.register.error", "charge.automatic_pix.recurrence.update.requested", "charge.automatic_pix.recurrence.update.confirmed", "charge.automatic_pix.recurrence.update.failed", "charge.automatic_pix.recurrence.update.error", "charge.automatic_pix.recurrence.pending", "charge.automatic_pix.recurrence.created", "charge.automatic_pix.recurrence.approved", "charge.automatic_pix.recurrence.rejected", "charge.automatic_pix.recurrence.expired", "charge.automatic_pix.recurrence.canceled", "charge.automatic_pix.request.db.created", "charge.automatic_pix.request.db.updated", "charge.automatic_pix.request.db.deleted", "charge.automatic_pix.request.cancel.requested", "charge.automatic_pix.request.cancel.confirmed", "charge.automatic_pix.request.cancel.failed", "charge.automatic_pix.request.cancel.error", "charge.automatic_pix.request.register.requested", "charge.automatic_pix.request.register.confirmed", "charge.automatic_pix.request.register.failed", "charge.automatic_pix.request.register.error", "charge.automatic_pix.request.pending", "charge.automatic_pix.request.created", "charge.automatic_pix.request.sent", "charge.automatic_pix.request.received", "charge.automatic_pix.request.rejected", "charge.automatic_pix.request.accepted", "charge.automatic_pix.request.expired", "charge.automatic_pix.request.canceled", "charge.automatic_pix.pix.db.created", "charge.automatic_pix.pix.db.updated", "charge.automatic_pix.pix.db.deleted", "charge.automatic_pix.pix.cancel.requested", "charge.automatic_pix.pix.cancel.confirmed", "charge.automatic_pix.pix.cancel.failed", "charge.automatic_pix.pix.cancel.error", "charge.automatic_pix.pix.register.requested", "charge.automatic_pix.pix.register.confirmed", "charge.automatic_pix.pix.register.failed", "charge.automatic_pix.pix.register.error", "charge.automatic_pix.pix.update.requested", "charge.automatic_pix.pix.update.confirmed", "charge.automatic_pix.pix.update.failed", "charge.automatic_pix.pix.update.error", "charge.automatic_pix.pix.pending", "charge.automatic_pix.pix.created", "charge.automatic_pix.pix.active", "charge.automatic_pix.pix.paid", "charge.automatic_pix.pix.expired", "charge.automatic_pix.pix.rejected", "charge.automatic_pix.pix.canceled", "charge.payment.db.created", "charge.payment.db.updated", "charge.payment.db.deleted", "charge.payment.notified", "charge.payment.canceled", "charge.payment.confirmed", "charge.payment.duplicated", "charge.bank_billet.payment.notified", "charge.bank_billet.payment.canceled", "charge.bank_billet.payment.confirmed", "data.bank_billet_query.success", "data.bank_billet_query.error", "data.bank_billet_query.db.created", "data.bank_billet_query.db.updated", "data.bank_billet_query.db.deleted", "data.pix_qrcode_query.success", "data.pix_qrcode_query.error", "data.pix_qrcode_query.db.created", "data.pix_qrcode_query.db.updated", "data.pix_qrcode_query.db.deleted", "mailbox.entry.db.created", "mailbox.entry.db.updated", "mailbox.entry.db.deleted", "mailbox.entry.file.received", "mailbox.entry.file.sent", "mailbox.file.db.created", "mailbox.file.db.updated", "mailbox.file.db.deleted", "mailbox.channel.s3.db.created", "mailbox.channel.s3.db.updated", "mailbox.channel.s3.db.deleted", "mailbox.channel.s3.fetch_all", "mailbox.channel.email.db.created", "mailbox.channel.email.db.updated", "mailbox.channel.email.db.deleted", "mailbox.channel.whatsapp.db.created", "mailbox.channel.whatsapp.db.updated", "mailbox.channel.whatsapp.db.deleted", "mailbox.channel.sftp.db.created", "mailbox.channel.sftp.db.updated", "mailbox.channel.sftp.db.deleted", "mailbox.channel.sftp.fetch_all", "mailbox.channel.syncthing.db.created", "mailbox.channel.syncthing.db.updated", "mailbox.channel.syncthing.db.deleted", "email_account.db.created", "email_account.db.updated", "email_account.db.deleted", "email_account.identity.pending", "email_account.identity.created", "email_account.identity.error", "email_account.identity.failure", "email_account.dns.not_ready", "email_account.dns.awaiting", "email_account.dns.validated", "email_account.dns.error", "email_account.dns.failure", "integration.connection.db.created", "integration.connection.db.updated", "integration.connection.db.deleted", "webhook.db.created", "webhook.db.updated", "webhook.db.deleted", "enotas.nfe.generated"])), active: z.boolean().nullable().optional(), ssl_verification_enabled: z.boolean().nullable().optional(), subaccounts: z.boolean().optional(), bank_billet_account_id: z.number().int().nullable().optional(), auth_kind: z.enum(["none", "basic_auth", "bearer", "api_key"]).nullable().optional(), auth: z.object({kind: z.enum(["none", "basic_auth", "bearer", "api_key"]).optional(), username: z.string().nullable().optional(), password: z.string().nullable().optional(), token: z.string().nullable().optional(), header_name: z.string().nullable().optional(), header_value: z.string().nullable().optional()}).nullable().optional(), created_at: z.string().nullable().optional(), updated_at: z.string().nullable().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 }; /** * Informações do Webhook * * GET /v1/webhooks/{id} */ export const getApiV1WebhooksId = async (args: GetApiV1WebhooksIdArgs, options?: GetApiV1WebhooksIdOptions) => { const {baseUrl = "https://api-sandbox.kobana.com.br", fetch: fetchFn = fetch, bearerAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "application/json") if (args['User-Agent'] != null) headers.set("User-Agent", String(args['User-Agent'])) if (bearerAuth !== undefined) headers.set('authorization', `Bearer ${bearerAuth}`) const url = `${baseUrl.replace(/\/+$/, '')}/v1/webhooks/${encodeURIComponent(String(args.id))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return validateResponse(webhookObject, await res.json()) };