// @generated — do not edit import { createDomainError } from "@tailor-platform/erp-kit/core"; export const InvalidNameError = createDomainError( "InvalidNameError", "BUSINESS_PARTNER_INVALID_NAME", (identifier: string) => `Name is empty, whitespace-only, or not provided: ${identifier}`, ); export const PartnerNotFoundError = createDomainError( "PartnerNotFoundError", "BUSINESS_PARTNER_PARTNER_NOT_FOUND", (identifier: string) => `Specified partner ID does not exist: ${identifier}`, ); export const PartnerNotActiveError = createDomainError( "PartnerNotActiveError", "BUSINESS_PARTNER_PARTNER_NOT_ACTIVE", (identifier: string) => `Partner status is not ACTIVE: ${identifier}`, ); export const CompanyNotFoundError = createDomainError( "CompanyNotFoundError", "BUSINESS_PARTNER_COMPANY_NOT_FOUND", (identifier: string) => `Company does not exist: ${identifier}`, ); export const CurrencyNotFoundError = createDomainError( "CurrencyNotFoundError", "BUSINESS_PARTNER_CURRENCY_NOT_FOUND", (identifier: string) => `Referenced currency does not exist: ${identifier}`, ); export const InvalidAccountCodeError = createDomainError( "InvalidAccountCodeError", "BUSINESS_PARTNER_INVALID_ACCOUNT_CODE", (identifier: string) => `Account code is empty: ${identifier}`, ); export const DuplicateAccountError = createDomainError( "DuplicateAccountError", "BUSINESS_PARTNER_DUPLICATE_ACCOUNT", (identifier: string) => `Account code already exists in the company: ${identifier}`, ); export const AddressNotFoundError = createDomainError( "AddressNotFoundError", "BUSINESS_PARTNER_ADDRESS_NOT_FOUND", (identifier: string) => `Specified address ID does not exist: ${identifier}`, ); export const BankAccountNotFoundError = createDomainError( "BankAccountNotFoundError", "BUSINESS_PARTNER_BANK_ACCOUNT_NOT_FOUND", (identifier: string) => `Specified bank account ID does not exist: ${identifier}`, ); export const AddressInactiveError = createDomainError( "AddressInactiveError", "BUSINESS_PARTNER_ADDRESS_INACTIVE", (identifier: string) => `Address is unavailable for a new usage: ${identifier}`, ); export const BankAccountInactiveError = createDomainError( "BankAccountInactiveError", "BUSINESS_PARTNER_BANK_ACCOUNT_INACTIVE", (identifier: string) => `Bank account is unavailable for a new usage: ${identifier}`, ); export const AddressNotOwnedByPartnerError = createDomainError( "AddressNotOwnedByPartnerError", "BUSINESS_PARTNER_ADDRESS_NOT_OWNED_BY_PARTNER", (identifier: string) => `Address belongs to another partner: ${identifier}`, ); export const BankAccountNotOwnedByPartnerError = createDomainError( "BankAccountNotOwnedByPartnerError", "BUSINESS_PARTNER_BANK_ACCOUNT_NOT_OWNED_BY_PARTNER", (identifier: string) => `Bank account belongs to another partner: ${identifier}`, ); export const DuplicateDefaultUsageError = createDomainError( "DuplicateDefaultUsageError", "BUSINESS_PARTNER_DUPLICATE_DEFAULT_USAGE", (identifier: string) => `More than one default was supplied for a purpose: ${identifier}`, ); export const DuplicateAddressUsageError = createDomainError( "DuplicateAddressUsageError", "BUSINESS_PARTNER_DUPLICATE_ADDRESS_USAGE", (identifier: string) => `Address and purpose combination already exists in the account: ${identifier}`, ); export const DuplicateBankAccountUsageError = createDomainError( "DuplicateBankAccountUsageError", "BUSINESS_PARTNER_DUPLICATE_BANK_ACCOUNT_USAGE", (identifier: string) => `Bank account and purpose combination already exists in the account: ${identifier}`, ); export const PartnerInactiveError = createDomainError( "PartnerInactiveError", "BUSINESS_PARTNER_PARTNER_INACTIVE", (identifier: string) => `Partner status is INACTIVE: ${identifier}`, ); export const MissingRequiredAddressFieldError = createDomainError( "MissingRequiredAddressFieldError", "BUSINESS_PARTNER_MISSING_REQUIRED_ADDRESS_FIELD", (identifier: string) => `One or more required fields (line1, city, postalCode) are empty or not provided: ${identifier}`, ); export const InvalidCountryCodeError = createDomainError( "InvalidCountryCodeError", "BUSINESS_PARTNER_INVALID_COUNTRY_CODE", (identifier: string) => `Country does not contain exactly two uppercase ASCII letters: ${identifier}`, ); export const MissingAccountIdentifierError = createDomainError( "MissingAccountIdentifierError", "BUSINESS_PARTNER_MISSING_ACCOUNT_IDENTIFIER", (identifier: string) => `Account number is empty or not provided: ${identifier}`, ); export const InvalidBankNameError = createDomainError( "InvalidBankNameError", "BUSINESS_PARTNER_INVALID_BANK_NAME", (identifier: string) => `Bank name is empty, whitespace-only, or not provided: ${identifier}`, ); export const InvalidAccountHolderNameError = createDomainError( "InvalidAccountHolderNameError", "BUSINESS_PARTNER_INVALID_ACCOUNT_HOLDER_NAME", (identifier: string) => `Account holder name is empty, whitespace-only, or not provided: ${identifier}`, ); export const DefaultExpenseAccountNotFoundError = createDomainError( "DefaultExpenseAccountNotFoundError", "BUSINESS_PARTNER_DEFAULT_EXPENSE_ACCOUNT_NOT_FOUND", (identifier: string) => `Referenced default expense account does not exist: ${identifier}`, ); export const InvalidDefaultExpenseAccountError = createDomainError( "InvalidDefaultExpenseAccountError", "BUSINESS_PARTNER_INVALID_DEFAULT_EXPENSE_ACCOUNT", (identifier: string) => `Default expense account is inactive, is not an EXPENSE account, or belongs to another company: ${identifier}`, ); export const CustomerAccountNotFoundError = createDomainError( "CustomerAccountNotFoundError", "BUSINESS_PARTNER_CUSTOMER_ACCOUNT_NOT_FOUND", (identifier: string) => `Account does not exist: ${identifier}`, ); export const InvalidStateTransitionError = createDomainError( "InvalidStateTransitionError", "BUSINESS_PARTNER_INVALID_STATE_TRANSITION", (identifier: string) => `Requested state transition is not allowed from the current status: ${identifier}`, ); export const SupplierAccountNotFoundError = createDomainError( "SupplierAccountNotFoundError", "BUSINESS_PARTNER_SUPPLIER_ACCOUNT_NOT_FOUND", (identifier: string) => `Account does not exist: ${identifier}`, ); export const AddressUsageNotFoundError = createDomainError( "AddressUsageNotFoundError", "BUSINESS_PARTNER_ADDRESS_USAGE_NOT_FOUND", (identifier: string) => `Address usage does not exist on the target account: ${identifier}`, ); export const BankAccountUsageNotFoundError = createDomainError( "BankAccountUsageNotFoundError", "BUSINESS_PARTNER_BANK_ACCOUNT_USAGE_NOT_FOUND", (identifier: string) => `Bank account usage does not exist on the target account: ${identifier}`, ); export const InvalidPaginationError = createDomainError( "InvalidPaginationError", "BUSINESS_PARTNER_INVALID_PAGINATION", (identifier: string) => `offset must be a non-negative integer and limit an integer from 1 to 100: ${identifier}`, );