export interface Options { /** * If the xml should be pretty printed * @default false */ prettyPrint?: boolean; /** * Check if the IBAN is valid. (with IBANTools) * @default true */ checkIBAN?: boolean; /** * Check if the BIC is valid. (with IBANTools) * @default true */ checkBIC?: boolean; } export interface Payment { /** Max length is 35 */ id: string; name: string; iban: string; /** Optional sometimes see https://github.com/jerebtw/Sepa-JS-XML/issues/287 */ bic?: string; mandateId?: string; mandateSignatureDate?: Date; amount: number; /** Default is "EUR" */ currency?: string; remittanceInformation: string; end2endReference?: string; } export interface GroupHeader { /** Max length is 35 */ MsgId: string; CreDtTm: string; NbOfTxs: number; CtrlSum: string; BtchBookg?: "true" | "false"; InitgPty: { /** Min length is 1 */ /** Max length is 70 */ Nm: string; }; Grpg?: "MIXD"; } export interface CreditorPayments { /** Max length is 35 */ id: string; batchBooking?: boolean; /** When the payment should be executed */ requestedExecutionDate: Date; collectionDate?: Date; name: string; iban: string; /** Optional sometimes see https://github.com/jerebtw/Sepa-JS-XML/issues/287 */ bic?: string; payments: Payment[]; } export interface SepaData { painVersion?: PAIN_VERSIONS; xmlVersion?: string; xmlEncoding?: string; xsiNamespace?: string; xsiXmls?: string; localInstrumentation?: LOCAL_INSTRUMENTATION; sequenceType?: SEQUENCE_TYPE; batchBooking?: boolean; /** Max length is 35 */ id: string; creationDate: Date; /** Max length is 70 */ initiatorName: string; positions: CreditorPayments[]; } export type PAIN_VERSIONS = "pain.001.001.02" | "pain.001.003.02" | "pain.001.001.03" | "pain.001.003.03" | "pain.008.001.01" | "pain.008.003.01" | "pain.008.001.02" | "pain.008.003.02"; export type LOCAL_INSTRUMENTATION = "CORE" | "COR1" | "B2B"; export type SEQUENCE_TYPE = "FRST" | "RCUR" | "OOFF" | "FNAL"; /** * Generate a SEPA XML file * * If the length of the values is longer than the max length, it will throw an error * or if checkIBAN or checkBIC is true, it will check if the IBAN or BIC is valid and throw an error if it is not */ export declare function createSepaXML(sepaData: SepaData, options?: Options): string;