import { ContractType, ContractStatus } from '@prisma/client'; export interface ContractFilters { customerId?: number; customerIds?: number[]; type?: ContractType; status?: ContractStatus; search?: string; page?: number; limit?: number; } export declare function getAllContracts(filters: ContractFilters): Promise<{ contracts: ({ customer: { id: number; firstName: string; lastName: string; customerNumber: string; companyName: string | null; }; address: { id: number; customerId: number; createdAt: Date; updatedAt: Date; type: import(".prisma/client").$Enums.AddressType; isDefault: boolean; street: string; houseNumber: string; postalCode: string; city: string; country: string; } | null; salesPlatform: { id: number; isActive: boolean; createdAt: Date; updatedAt: Date; name: string; contactInfo: string | null; } | null; tariff: { id: number; isActive: boolean; createdAt: Date; updatedAt: Date; name: string; providerId: number; } | null; provider: { id: number; isActive: boolean; createdAt: Date; updatedAt: Date; name: string; portalUrl: string | null; usernameFieldName: string | null; passwordFieldName: string | null; } | null; contractCategory: { id: number; isActive: boolean; createdAt: Date; updatedAt: Date; name: string; code: string; icon: string | null; color: string | null; sortOrder: number; } | null; billingAddress: { id: number; customerId: number; createdAt: Date; updatedAt: Date; type: import(".prisma/client").$Enums.AddressType; isDefault: boolean; street: string; houseNumber: string; postalCode: string; city: string; country: string; } | null; cancellationPeriod: { id: number; isActive: boolean; createdAt: Date; updatedAt: Date; description: string; code: string; } | null; contractDuration: { id: number; isActive: boolean; createdAt: Date; updatedAt: Date; description: string; code: string; } | null; } & { id: number; customerId: number; createdAt: Date; updatedAt: Date; type: import(".prisma/client").$Enums.ContractType; notes: string | null; portalPasswordEncrypted: string | null; startDate: Date | null; status: import(".prisma/client").$Enums.ContractStatus; customerNumberAtProvider: string | null; tariffName: string | null; providerName: string | null; contractNumber: string; contractCategoryId: number | null; addressId: number | null; billingAddressId: number | null; bankCardId: number | null; identityDocumentId: number | null; salesPlatformId: number | null; cancellationPeriodId: number | null; contractDurationId: number | null; previousContractId: number | null; previousProviderId: number | null; previousCustomerNumber: string | null; previousContractNumber: string | null; providerId: number | null; tariffId: number | null; contractNumberAtProvider: string | null; priceFirst12Months: string | null; priceFrom13Months: string | null; priceAfter24Months: string | null; endDate: Date | null; commission: number | null; cancellationLetterPath: string | null; cancellationConfirmationPath: string | null; cancellationLetterOptionsPath: string | null; cancellationConfirmationOptionsPath: string | null; cancellationConfirmationDate: Date | null; cancellationConfirmationOptionsDate: Date | null; wasSpecialCancellation: boolean; portalUsername: string | null; stressfreiEmailId: number | null; nextReviewDate: Date | null; })[]; pagination: { page: number; limit: number; total: number; totalPages: number; }; }>; export declare function getContractById(id: number, decryptPassword?: boolean): Promise<({ customer: { id: number; email: string | null; firstName: string; lastName: string; createdAt: Date; updatedAt: Date; customerNumber: string; portalEmail: string | null; type: import(".prisma/client").$Enums.CustomerType; salutation: string | null; companyName: string | null; foundingDate: Date | null; birthDate: Date | null; birthPlace: string | null; phone: string | null; mobile: string | null; taxNumber: string | null; businessRegistrationPath: string | null; commercialRegisterPath: string | null; commercialRegisterNumber: string | null; privacyPolicyPath: string | null; notes: string | null; portalEnabled: boolean; portalPasswordHash: string | null; portalPasswordEncrypted: string | null; portalLastLogin: Date | null; }; address: { id: number; customerId: number; createdAt: Date; updatedAt: Date; type: import(".prisma/client").$Enums.AddressType; isDefault: boolean; street: string; houseNumber: string; postalCode: string; city: string; country: string; } | null; salesPlatform: { id: number; isActive: boolean; createdAt: Date; updatedAt: Date; name: string; contactInfo: string | null; } | null; bankCard: { id: number; customerId: number; isActive: boolean; createdAt: Date; updatedAt: Date; accountHolder: string; iban: string; bic: string | null; bankName: string | null; expiryDate: Date | null; documentPath: string | null; } | null; identityDocument: { id: number; customerId: number; isActive: boolean; createdAt: Date; updatedAt: Date; type: import(".prisma/client").$Enums.DocumentType; expiryDate: Date | null; documentPath: string | null; documentNumber: string; issuingAuthority: string | null; issueDate: Date | null; licenseClasses: string | null; licenseIssueDate: Date | null; } | null; energyDetails: ({ meter: ({ readings: { id: number; createdAt: Date; notes: string | null; readingDate: Date; value: number; unit: string; meterId: number; }[]; } & { id: number; customerId: number; isActive: boolean; createdAt: Date; updatedAt: Date; type: import(".prisma/client").$Enums.MeterType; meterNumber: string; location: string | null; }) | null; invoices: { id: number; createdAt: Date; updatedAt: Date; notes: string | null; documentPath: string | null; energyContractDetailsId: number; invoiceDate: Date; invoiceType: import(".prisma/client").$Enums.InvoiceType; }[]; } & { id: number; meterId: number | null; previousCustomerNumber: string | null; contractId: number; maloId: string | null; annualConsumption: number | null; annualConsumptionKwh: number | null; basePrice: number | null; unitPrice: number | null; bonus: number | null; previousProviderName: string | null; }) | null; stressfreiEmail: { id: number; email: string; customerId: number; isActive: boolean; createdAt: Date; updatedAt: Date; notes: string | null; hasMailbox: boolean; platform: string | null; isProvisioned: boolean; provisionedAt: Date | null; provisionError: string | null; emailPasswordEncrypted: string | null; } | null; carInsuranceDetails: { id: number; policyNumber: string | null; vin: string | null; licensePlate: string | null; contractId: number; hsn: string | null; tsn: string | null; vehicleType: string | null; firstRegistration: Date | null; noClaimsClass: string | null; insuranceType: import(".prisma/client").$Enums.InsuranceType; deductiblePartial: number | null; deductibleFull: number | null; previousInsurer: string | null; } | null; tvDetails: { id: number; contractId: number; receiverModel: string | null; smartcardNumber: string | null; package: string | null; } | null; mobileDetails: ({ simCards: { id: number; createdAt: Date; updatedAt: Date; simCardNumber: string | null; phoneNumber: string | null; isMain: boolean; pin: string | null; puk: string | null; isMultisim: boolean; mobileDetailsId: number; }[]; } & { id: number; simCardNumber: string | null; phoneNumber: string | null; deviceImei: string | null; contractId: number; requiresMultisim: boolean; dataVolume: number | null; includedMinutes: number | null; includedSMS: number | null; deviceModel: string | null; }) | null; internetDetails: ({ phoneNumbers: { id: number; phoneNumber: string; isMain: boolean; sipUsername: string | null; sipPasswordEncrypted: string | null; sipServer: string | null; internetContractDetailsId: number; }[]; } & { id: number; activationCode: string | null; homeId: string | null; routerSerialNumber: string | null; contractId: number; downloadSpeed: number | null; uploadSpeed: number | null; routerModel: string | null; installationDate: Date | null; internetUsername: string | null; internetPasswordEncrypted: string | null; }) | null; tariff: { id: number; isActive: boolean; createdAt: Date; updatedAt: Date; name: string; providerId: number; } | null; provider: { id: number; isActive: boolean; createdAt: Date; updatedAt: Date; name: string; portalUrl: string | null; usernameFieldName: string | null; passwordFieldName: string | null; } | null; contractCategory: { id: number; isActive: boolean; createdAt: Date; updatedAt: Date; name: string; code: string; icon: string | null; color: string | null; sortOrder: number; } | null; billingAddress: { id: number; customerId: number; createdAt: Date; updatedAt: Date; type: import(".prisma/client").$Enums.AddressType; isDefault: boolean; street: string; houseNumber: string; postalCode: string; city: string; country: string; } | null; cancellationPeriod: { id: number; isActive: boolean; createdAt: Date; updatedAt: Date; description: string; code: string; } | null; contractDuration: { id: number; isActive: boolean; createdAt: Date; updatedAt: Date; description: string; code: string; } | null; previousContract: ({ energyDetails: ({ meter: ({ readings: { id: number; createdAt: Date; notes: string | null; readingDate: Date; value: number; unit: string; meterId: number; }[]; } & { id: number; customerId: number; isActive: boolean; createdAt: Date; updatedAt: Date; type: import(".prisma/client").$Enums.MeterType; meterNumber: string; location: string | null; }) | null; invoices: { id: number; createdAt: Date; updatedAt: Date; notes: string | null; documentPath: string | null; energyContractDetailsId: number; invoiceDate: Date; invoiceType: import(".prisma/client").$Enums.InvoiceType; }[]; } & { id: number; meterId: number | null; previousCustomerNumber: string | null; contractId: number; maloId: string | null; annualConsumption: number | null; annualConsumptionKwh: number | null; basePrice: number | null; unitPrice: number | null; bonus: number | null; previousProviderName: string | null; }) | null; carInsuranceDetails: { id: number; policyNumber: string | null; vin: string | null; licensePlate: string | null; contractId: number; hsn: string | null; tsn: string | null; vehicleType: string | null; firstRegistration: Date | null; noClaimsClass: string | null; insuranceType: import(".prisma/client").$Enums.InsuranceType; deductiblePartial: number | null; deductibleFull: number | null; previousInsurer: string | null; } | null; tvDetails: { id: number; contractId: number; receiverModel: string | null; smartcardNumber: string | null; package: string | null; } | null; mobileDetails: ({ simCards: { id: number; createdAt: Date; updatedAt: Date; simCardNumber: string | null; phoneNumber: string | null; isMain: boolean; pin: string | null; puk: string | null; isMultisim: boolean; mobileDetailsId: number; }[]; } & { id: number; simCardNumber: string | null; phoneNumber: string | null; deviceImei: string | null; contractId: number; requiresMultisim: boolean; dataVolume: number | null; includedMinutes: number | null; includedSMS: number | null; deviceModel: string | null; }) | null; internetDetails: ({ phoneNumbers: { id: number; phoneNumber: string; isMain: boolean; sipUsername: string | null; sipPasswordEncrypted: string | null; sipServer: string | null; internetContractDetailsId: number; }[]; } & { id: number; activationCode: string | null; homeId: string | null; routerSerialNumber: string | null; contractId: number; downloadSpeed: number | null; uploadSpeed: number | null; routerModel: string | null; installationDate: Date | null; internetUsername: string | null; internetPasswordEncrypted: string | null; }) | null; } & { id: number; customerId: number; createdAt: Date; updatedAt: Date; type: import(".prisma/client").$Enums.ContractType; notes: string | null; portalPasswordEncrypted: string | null; startDate: Date | null; status: import(".prisma/client").$Enums.ContractStatus; customerNumberAtProvider: string | null; tariffName: string | null; providerName: string | null; contractNumber: string; contractCategoryId: number | null; addressId: number | null; billingAddressId: number | null; bankCardId: number | null; identityDocumentId: number | null; salesPlatformId: number | null; cancellationPeriodId: number | null; contractDurationId: number | null; previousContractId: number | null; previousProviderId: number | null; previousCustomerNumber: string | null; previousContractNumber: string | null; providerId: number | null; tariffId: number | null; contractNumberAtProvider: string | null; priceFirst12Months: string | null; priceFrom13Months: string | null; priceAfter24Months: string | null; endDate: Date | null; commission: number | null; cancellationLetterPath: string | null; cancellationConfirmationPath: string | null; cancellationLetterOptionsPath: string | null; cancellationConfirmationOptionsPath: string | null; cancellationConfirmationDate: Date | null; cancellationConfirmationOptionsDate: Date | null; wasSpecialCancellation: boolean; portalUsername: string | null; stressfreiEmailId: number | null; nextReviewDate: Date | null; }) | null; followUpContract: { id: number; status: import(".prisma/client").$Enums.ContractStatus; contractNumber: string; } | null; previousProvider: { id: number; isActive: boolean; createdAt: Date; updatedAt: Date; name: string; portalUrl: string | null; usernameFieldName: string | null; passwordFieldName: string | null; } | null; } & { id: number; customerId: number; createdAt: Date; updatedAt: Date; type: import(".prisma/client").$Enums.ContractType; notes: string | null; portalPasswordEncrypted: string | null; startDate: Date | null; status: import(".prisma/client").$Enums.ContractStatus; customerNumberAtProvider: string | null; tariffName: string | null; providerName: string | null; contractNumber: string; contractCategoryId: number | null; addressId: number | null; billingAddressId: number | null; bankCardId: number | null; identityDocumentId: number | null; salesPlatformId: number | null; cancellationPeriodId: number | null; contractDurationId: number | null; previousContractId: number | null; previousProviderId: number | null; previousCustomerNumber: string | null; previousContractNumber: string | null; providerId: number | null; tariffId: number | null; contractNumberAtProvider: string | null; priceFirst12Months: string | null; priceFrom13Months: string | null; priceAfter24Months: string | null; endDate: Date | null; commission: number | null; cancellationLetterPath: string | null; cancellationConfirmationPath: string | null; cancellationLetterOptionsPath: string | null; cancellationConfirmationOptionsPath: string | null; cancellationConfirmationDate: Date | null; cancellationConfirmationOptionsDate: Date | null; wasSpecialCancellation: boolean; portalUsername: string | null; stressfreiEmailId: number | null; nextReviewDate: Date | null; }) | null>; interface ContractCreateData { customerId: number; type: ContractType; contractCategoryId?: number; status?: ContractStatus; addressId?: number; billingAddressId?: number; bankCardId?: number; identityDocumentId?: number; salesPlatformId?: number; previousContractId?: number; providerId?: number; tariffId?: number; providerName?: string; tariffName?: string; customerNumberAtProvider?: string; priceFirst12Months?: string; priceFrom13Months?: string; priceAfter24Months?: string; startDate?: Date; endDate?: Date; cancellationPeriodId?: number; contractDurationId?: number; commission?: number; portalUsername?: string; portalPassword?: string; stressfreiEmailId?: number; notes?: string; cancellationConfirmationDate?: Date; cancellationConfirmationOptionsDate?: Date; wasSpecialCancellation?: boolean; energyDetails?: { meterId?: number; annualConsumption?: number; basePrice?: number; unitPrice?: number; bonus?: number; previousProviderName?: string; previousCustomerNumber?: string; }; internetDetails?: { downloadSpeed?: number; uploadSpeed?: number; routerModel?: string; routerSerialNumber?: string; installationDate?: Date; internetUsername?: string; internetPassword?: string; homeId?: string; activationCode?: string; phoneNumbers?: { id?: number; phoneNumber: string; isMain?: boolean; sipUsername?: string; sipPassword?: string; sipServer?: string; }[]; }; mobileDetails?: { requiresMultisim?: boolean; dataVolume?: number; includedMinutes?: number; includedSMS?: number; deviceModel?: string; deviceImei?: string; phoneNumber?: string; simCardNumber?: string; simCards?: { id?: number; phoneNumber?: string; simCardNumber?: string; pin?: string; puk?: string; isMultisim?: boolean; isMain?: boolean; }[]; }; tvDetails?: { receiverModel?: string; smartcardNumber?: string; package?: string; }; carInsuranceDetails?: { licensePlate?: string; hsn?: string; tsn?: string; vin?: string; vehicleType?: string; firstRegistration?: Date; noClaimsClass?: string; insuranceType?: 'LIABILITY' | 'PARTIAL' | 'FULL'; deductiblePartial?: number; deductibleFull?: number; policyNumber?: string; previousInsurer?: string; }; } export declare function createContract(data: ContractCreateData): Promise<{ customer: { id: number; email: string | null; firstName: string; lastName: string; createdAt: Date; updatedAt: Date; customerNumber: string; portalEmail: string | null; type: import(".prisma/client").$Enums.CustomerType; salutation: string | null; companyName: string | null; foundingDate: Date | null; birthDate: Date | null; birthPlace: string | null; phone: string | null; mobile: string | null; taxNumber: string | null; businessRegistrationPath: string | null; commercialRegisterPath: string | null; commercialRegisterNumber: string | null; privacyPolicyPath: string | null; notes: string | null; portalEnabled: boolean; portalPasswordHash: string | null; portalPasswordEncrypted: string | null; portalLastLogin: Date | null; }; address: { id: number; customerId: number; createdAt: Date; updatedAt: Date; type: import(".prisma/client").$Enums.AddressType; isDefault: boolean; street: string; houseNumber: string; postalCode: string; city: string; country: string; } | null; salesPlatform: { id: number; isActive: boolean; createdAt: Date; updatedAt: Date; name: string; contactInfo: string | null; } | null; energyDetails: { id: number; meterId: number | null; previousCustomerNumber: string | null; contractId: number; maloId: string | null; annualConsumption: number | null; annualConsumptionKwh: number | null; basePrice: number | null; unitPrice: number | null; bonus: number | null; previousProviderName: string | null; } | null; carInsuranceDetails: { id: number; policyNumber: string | null; vin: string | null; licensePlate: string | null; contractId: number; hsn: string | null; tsn: string | null; vehicleType: string | null; firstRegistration: Date | null; noClaimsClass: string | null; insuranceType: import(".prisma/client").$Enums.InsuranceType; deductiblePartial: number | null; deductibleFull: number | null; previousInsurer: string | null; } | null; tvDetails: { id: number; contractId: number; receiverModel: string | null; smartcardNumber: string | null; package: string | null; } | null; mobileDetails: ({ simCards: { id: number; createdAt: Date; updatedAt: Date; simCardNumber: string | null; phoneNumber: string | null; isMain: boolean; pin: string | null; puk: string | null; isMultisim: boolean; mobileDetailsId: number; }[]; } & { id: number; simCardNumber: string | null; phoneNumber: string | null; deviceImei: string | null; contractId: number; requiresMultisim: boolean; dataVolume: number | null; includedMinutes: number | null; includedSMS: number | null; deviceModel: string | null; }) | null; internetDetails: ({ phoneNumbers: { id: number; phoneNumber: string; isMain: boolean; sipUsername: string | null; sipPasswordEncrypted: string | null; sipServer: string | null; internetContractDetailsId: number; }[]; } & { id: number; activationCode: string | null; homeId: string | null; routerSerialNumber: string | null; contractId: number; downloadSpeed: number | null; uploadSpeed: number | null; routerModel: string | null; installationDate: Date | null; internetUsername: string | null; internetPasswordEncrypted: string | null; }) | null; billingAddress: { id: number; customerId: number; createdAt: Date; updatedAt: Date; type: import(".prisma/client").$Enums.AddressType; isDefault: boolean; street: string; houseNumber: string; postalCode: string; city: string; country: string; } | null; } & { id: number; customerId: number; createdAt: Date; updatedAt: Date; type: import(".prisma/client").$Enums.ContractType; notes: string | null; portalPasswordEncrypted: string | null; startDate: Date | null; status: import(".prisma/client").$Enums.ContractStatus; customerNumberAtProvider: string | null; tariffName: string | null; providerName: string | null; contractNumber: string; contractCategoryId: number | null; addressId: number | null; billingAddressId: number | null; bankCardId: number | null; identityDocumentId: number | null; salesPlatformId: number | null; cancellationPeriodId: number | null; contractDurationId: number | null; previousContractId: number | null; previousProviderId: number | null; previousCustomerNumber: string | null; previousContractNumber: string | null; providerId: number | null; tariffId: number | null; contractNumberAtProvider: string | null; priceFirst12Months: string | null; priceFrom13Months: string | null; priceAfter24Months: string | null; endDate: Date | null; commission: number | null; cancellationLetterPath: string | null; cancellationConfirmationPath: string | null; cancellationLetterOptionsPath: string | null; cancellationConfirmationOptionsPath: string | null; cancellationConfirmationDate: Date | null; cancellationConfirmationOptionsDate: Date | null; wasSpecialCancellation: boolean; portalUsername: string | null; stressfreiEmailId: number | null; nextReviewDate: Date | null; }>; export declare function updateContract(id: number, data: Partial): Promise<({ customer: { id: number; email: string | null; firstName: string; lastName: string; createdAt: Date; updatedAt: Date; customerNumber: string; portalEmail: string | null; type: import(".prisma/client").$Enums.CustomerType; salutation: string | null; companyName: string | null; foundingDate: Date | null; birthDate: Date | null; birthPlace: string | null; phone: string | null; mobile: string | null; taxNumber: string | null; businessRegistrationPath: string | null; commercialRegisterPath: string | null; commercialRegisterNumber: string | null; privacyPolicyPath: string | null; notes: string | null; portalEnabled: boolean; portalPasswordHash: string | null; portalPasswordEncrypted: string | null; portalLastLogin: Date | null; }; address: { id: number; customerId: number; createdAt: Date; updatedAt: Date; type: import(".prisma/client").$Enums.AddressType; isDefault: boolean; street: string; houseNumber: string; postalCode: string; city: string; country: string; } | null; salesPlatform: { id: number; isActive: boolean; createdAt: Date; updatedAt: Date; name: string; contactInfo: string | null; } | null; bankCard: { id: number; customerId: number; isActive: boolean; createdAt: Date; updatedAt: Date; accountHolder: string; iban: string; bic: string | null; bankName: string | null; expiryDate: Date | null; documentPath: string | null; } | null; identityDocument: { id: number; customerId: number; isActive: boolean; createdAt: Date; updatedAt: Date; type: import(".prisma/client").$Enums.DocumentType; expiryDate: Date | null; documentPath: string | null; documentNumber: string; issuingAuthority: string | null; issueDate: Date | null; licenseClasses: string | null; licenseIssueDate: Date | null; } | null; energyDetails: ({ meter: ({ readings: { id: number; createdAt: Date; notes: string | null; readingDate: Date; value: number; unit: string; meterId: number; }[]; } & { id: number; customerId: number; isActive: boolean; createdAt: Date; updatedAt: Date; type: import(".prisma/client").$Enums.MeterType; meterNumber: string; location: string | null; }) | null; invoices: { id: number; createdAt: Date; updatedAt: Date; notes: string | null; documentPath: string | null; energyContractDetailsId: number; invoiceDate: Date; invoiceType: import(".prisma/client").$Enums.InvoiceType; }[]; } & { id: number; meterId: number | null; previousCustomerNumber: string | null; contractId: number; maloId: string | null; annualConsumption: number | null; annualConsumptionKwh: number | null; basePrice: number | null; unitPrice: number | null; bonus: number | null; previousProviderName: string | null; }) | null; stressfreiEmail: { id: number; email: string; customerId: number; isActive: boolean; createdAt: Date; updatedAt: Date; notes: string | null; hasMailbox: boolean; platform: string | null; isProvisioned: boolean; provisionedAt: Date | null; provisionError: string | null; emailPasswordEncrypted: string | null; } | null; carInsuranceDetails: { id: number; policyNumber: string | null; vin: string | null; licensePlate: string | null; contractId: number; hsn: string | null; tsn: string | null; vehicleType: string | null; firstRegistration: Date | null; noClaimsClass: string | null; insuranceType: import(".prisma/client").$Enums.InsuranceType; deductiblePartial: number | null; deductibleFull: number | null; previousInsurer: string | null; } | null; tvDetails: { id: number; contractId: number; receiverModel: string | null; smartcardNumber: string | null; package: string | null; } | null; mobileDetails: ({ simCards: { id: number; createdAt: Date; updatedAt: Date; simCardNumber: string | null; phoneNumber: string | null; isMain: boolean; pin: string | null; puk: string | null; isMultisim: boolean; mobileDetailsId: number; }[]; } & { id: number; simCardNumber: string | null; phoneNumber: string | null; deviceImei: string | null; contractId: number; requiresMultisim: boolean; dataVolume: number | null; includedMinutes: number | null; includedSMS: number | null; deviceModel: string | null; }) | null; internetDetails: ({ phoneNumbers: { id: number; phoneNumber: string; isMain: boolean; sipUsername: string | null; sipPasswordEncrypted: string | null; sipServer: string | null; internetContractDetailsId: number; }[]; } & { id: number; activationCode: string | null; homeId: string | null; routerSerialNumber: string | null; contractId: number; downloadSpeed: number | null; uploadSpeed: number | null; routerModel: string | null; installationDate: Date | null; internetUsername: string | null; internetPasswordEncrypted: string | null; }) | null; tariff: { id: number; isActive: boolean; createdAt: Date; updatedAt: Date; name: string; providerId: number; } | null; provider: { id: number; isActive: boolean; createdAt: Date; updatedAt: Date; name: string; portalUrl: string | null; usernameFieldName: string | null; passwordFieldName: string | null; } | null; contractCategory: { id: number; isActive: boolean; createdAt: Date; updatedAt: Date; name: string; code: string; icon: string | null; color: string | null; sortOrder: number; } | null; billingAddress: { id: number; customerId: number; createdAt: Date; updatedAt: Date; type: import(".prisma/client").$Enums.AddressType; isDefault: boolean; street: string; houseNumber: string; postalCode: string; city: string; country: string; } | null; cancellationPeriod: { id: number; isActive: boolean; createdAt: Date; updatedAt: Date; description: string; code: string; } | null; contractDuration: { id: number; isActive: boolean; createdAt: Date; updatedAt: Date; description: string; code: string; } | null; previousContract: ({ energyDetails: ({ meter: ({ readings: { id: number; createdAt: Date; notes: string | null; readingDate: Date; value: number; unit: string; meterId: number; }[]; } & { id: number; customerId: number; isActive: boolean; createdAt: Date; updatedAt: Date; type: import(".prisma/client").$Enums.MeterType; meterNumber: string; location: string | null; }) | null; invoices: { id: number; createdAt: Date; updatedAt: Date; notes: string | null; documentPath: string | null; energyContractDetailsId: number; invoiceDate: Date; invoiceType: import(".prisma/client").$Enums.InvoiceType; }[]; } & { id: number; meterId: number | null; previousCustomerNumber: string | null; contractId: number; maloId: string | null; annualConsumption: number | null; annualConsumptionKwh: number | null; basePrice: number | null; unitPrice: number | null; bonus: number | null; previousProviderName: string | null; }) | null; carInsuranceDetails: { id: number; policyNumber: string | null; vin: string | null; licensePlate: string | null; contractId: number; hsn: string | null; tsn: string | null; vehicleType: string | null; firstRegistration: Date | null; noClaimsClass: string | null; insuranceType: import(".prisma/client").$Enums.InsuranceType; deductiblePartial: number | null; deductibleFull: number | null; previousInsurer: string | null; } | null; tvDetails: { id: number; contractId: number; receiverModel: string | null; smartcardNumber: string | null; package: string | null; } | null; mobileDetails: ({ simCards: { id: number; createdAt: Date; updatedAt: Date; simCardNumber: string | null; phoneNumber: string | null; isMain: boolean; pin: string | null; puk: string | null; isMultisim: boolean; mobileDetailsId: number; }[]; } & { id: number; simCardNumber: string | null; phoneNumber: string | null; deviceImei: string | null; contractId: number; requiresMultisim: boolean; dataVolume: number | null; includedMinutes: number | null; includedSMS: number | null; deviceModel: string | null; }) | null; internetDetails: ({ phoneNumbers: { id: number; phoneNumber: string; isMain: boolean; sipUsername: string | null; sipPasswordEncrypted: string | null; sipServer: string | null; internetContractDetailsId: number; }[]; } & { id: number; activationCode: string | null; homeId: string | null; routerSerialNumber: string | null; contractId: number; downloadSpeed: number | null; uploadSpeed: number | null; routerModel: string | null; installationDate: Date | null; internetUsername: string | null; internetPasswordEncrypted: string | null; }) | null; } & { id: number; customerId: number; createdAt: Date; updatedAt: Date; type: import(".prisma/client").$Enums.ContractType; notes: string | null; portalPasswordEncrypted: string | null; startDate: Date | null; status: import(".prisma/client").$Enums.ContractStatus; customerNumberAtProvider: string | null; tariffName: string | null; providerName: string | null; contractNumber: string; contractCategoryId: number | null; addressId: number | null; billingAddressId: number | null; bankCardId: number | null; identityDocumentId: number | null; salesPlatformId: number | null; cancellationPeriodId: number | null; contractDurationId: number | null; previousContractId: number | null; previousProviderId: number | null; previousCustomerNumber: string | null; previousContractNumber: string | null; providerId: number | null; tariffId: number | null; contractNumberAtProvider: string | null; priceFirst12Months: string | null; priceFrom13Months: string | null; priceAfter24Months: string | null; endDate: Date | null; commission: number | null; cancellationLetterPath: string | null; cancellationConfirmationPath: string | null; cancellationLetterOptionsPath: string | null; cancellationConfirmationOptionsPath: string | null; cancellationConfirmationDate: Date | null; cancellationConfirmationOptionsDate: Date | null; wasSpecialCancellation: boolean; portalUsername: string | null; stressfreiEmailId: number | null; nextReviewDate: Date | null; }) | null; followUpContract: { id: number; status: import(".prisma/client").$Enums.ContractStatus; contractNumber: string; } | null; previousProvider: { id: number; isActive: boolean; createdAt: Date; updatedAt: Date; name: string; portalUrl: string | null; usernameFieldName: string | null; passwordFieldName: string | null; } | null; } & { id: number; customerId: number; createdAt: Date; updatedAt: Date; type: import(".prisma/client").$Enums.ContractType; notes: string | null; portalPasswordEncrypted: string | null; startDate: Date | null; status: import(".prisma/client").$Enums.ContractStatus; customerNumberAtProvider: string | null; tariffName: string | null; providerName: string | null; contractNumber: string; contractCategoryId: number | null; addressId: number | null; billingAddressId: number | null; bankCardId: number | null; identityDocumentId: number | null; salesPlatformId: number | null; cancellationPeriodId: number | null; contractDurationId: number | null; previousContractId: number | null; previousProviderId: number | null; previousCustomerNumber: string | null; previousContractNumber: string | null; providerId: number | null; tariffId: number | null; contractNumberAtProvider: string | null; priceFirst12Months: string | null; priceFrom13Months: string | null; priceAfter24Months: string | null; endDate: Date | null; commission: number | null; cancellationLetterPath: string | null; cancellationConfirmationPath: string | null; cancellationLetterOptionsPath: string | null; cancellationConfirmationOptionsPath: string | null; cancellationConfirmationDate: Date | null; cancellationConfirmationOptionsDate: Date | null; wasSpecialCancellation: boolean; portalUsername: string | null; stressfreiEmailId: number | null; nextReviewDate: Date | null; }) | null>; export declare function deleteContract(id: number): Promise<{ id: number; customerId: number; createdAt: Date; updatedAt: Date; type: import(".prisma/client").$Enums.ContractType; notes: string | null; portalPasswordEncrypted: string | null; startDate: Date | null; status: import(".prisma/client").$Enums.ContractStatus; customerNumberAtProvider: string | null; tariffName: string | null; providerName: string | null; contractNumber: string; contractCategoryId: number | null; addressId: number | null; billingAddressId: number | null; bankCardId: number | null; identityDocumentId: number | null; salesPlatformId: number | null; cancellationPeriodId: number | null; contractDurationId: number | null; previousContractId: number | null; previousProviderId: number | null; previousCustomerNumber: string | null; previousContractNumber: string | null; providerId: number | null; tariffId: number | null; contractNumberAtProvider: string | null; priceFirst12Months: string | null; priceFrom13Months: string | null; priceAfter24Months: string | null; endDate: Date | null; commission: number | null; cancellationLetterPath: string | null; cancellationConfirmationPath: string | null; cancellationLetterOptionsPath: string | null; cancellationConfirmationOptionsPath: string | null; cancellationConfirmationDate: Date | null; cancellationConfirmationOptionsDate: Date | null; wasSpecialCancellation: boolean; portalUsername: string | null; stressfreiEmailId: number | null; nextReviewDate: Date | null; }>; export declare function createFollowUpContract(previousContractId: number): Promise<{ customer: { id: number; email: string | null; firstName: string; lastName: string; createdAt: Date; updatedAt: Date; customerNumber: string; portalEmail: string | null; type: import(".prisma/client").$Enums.CustomerType; salutation: string | null; companyName: string | null; foundingDate: Date | null; birthDate: Date | null; birthPlace: string | null; phone: string | null; mobile: string | null; taxNumber: string | null; businessRegistrationPath: string | null; commercialRegisterPath: string | null; commercialRegisterNumber: string | null; privacyPolicyPath: string | null; notes: string | null; portalEnabled: boolean; portalPasswordHash: string | null; portalPasswordEncrypted: string | null; portalLastLogin: Date | null; }; address: { id: number; customerId: number; createdAt: Date; updatedAt: Date; type: import(".prisma/client").$Enums.AddressType; isDefault: boolean; street: string; houseNumber: string; postalCode: string; city: string; country: string; } | null; salesPlatform: { id: number; isActive: boolean; createdAt: Date; updatedAt: Date; name: string; contactInfo: string | null; } | null; energyDetails: { id: number; meterId: number | null; previousCustomerNumber: string | null; contractId: number; maloId: string | null; annualConsumption: number | null; annualConsumptionKwh: number | null; basePrice: number | null; unitPrice: number | null; bonus: number | null; previousProviderName: string | null; } | null; carInsuranceDetails: { id: number; policyNumber: string | null; vin: string | null; licensePlate: string | null; contractId: number; hsn: string | null; tsn: string | null; vehicleType: string | null; firstRegistration: Date | null; noClaimsClass: string | null; insuranceType: import(".prisma/client").$Enums.InsuranceType; deductiblePartial: number | null; deductibleFull: number | null; previousInsurer: string | null; } | null; tvDetails: { id: number; contractId: number; receiverModel: string | null; smartcardNumber: string | null; package: string | null; } | null; mobileDetails: ({ simCards: { id: number; createdAt: Date; updatedAt: Date; simCardNumber: string | null; phoneNumber: string | null; isMain: boolean; pin: string | null; puk: string | null; isMultisim: boolean; mobileDetailsId: number; }[]; } & { id: number; simCardNumber: string | null; phoneNumber: string | null; deviceImei: string | null; contractId: number; requiresMultisim: boolean; dataVolume: number | null; includedMinutes: number | null; includedSMS: number | null; deviceModel: string | null; }) | null; internetDetails: ({ phoneNumbers: { id: number; phoneNumber: string; isMain: boolean; sipUsername: string | null; sipPasswordEncrypted: string | null; sipServer: string | null; internetContractDetailsId: number; }[]; } & { id: number; activationCode: string | null; homeId: string | null; routerSerialNumber: string | null; contractId: number; downloadSpeed: number | null; uploadSpeed: number | null; routerModel: string | null; installationDate: Date | null; internetUsername: string | null; internetPasswordEncrypted: string | null; }) | null; billingAddress: { id: number; customerId: number; createdAt: Date; updatedAt: Date; type: import(".prisma/client").$Enums.AddressType; isDefault: boolean; street: string; houseNumber: string; postalCode: string; city: string; country: string; } | null; } & { id: number; customerId: number; createdAt: Date; updatedAt: Date; type: import(".prisma/client").$Enums.ContractType; notes: string | null; portalPasswordEncrypted: string | null; startDate: Date | null; status: import(".prisma/client").$Enums.ContractStatus; customerNumberAtProvider: string | null; tariffName: string | null; providerName: string | null; contractNumber: string; contractCategoryId: number | null; addressId: number | null; billingAddressId: number | null; bankCardId: number | null; identityDocumentId: number | null; salesPlatformId: number | null; cancellationPeriodId: number | null; contractDurationId: number | null; previousContractId: number | null; previousProviderId: number | null; previousCustomerNumber: string | null; previousContractNumber: string | null; providerId: number | null; tariffId: number | null; contractNumberAtProvider: string | null; priceFirst12Months: string | null; priceFrom13Months: string | null; priceAfter24Months: string | null; endDate: Date | null; commission: number | null; cancellationLetterPath: string | null; cancellationConfirmationPath: string | null; cancellationLetterOptionsPath: string | null; cancellationConfirmationOptionsPath: string | null; cancellationConfirmationDate: Date | null; cancellationConfirmationOptionsDate: Date | null; wasSpecialCancellation: boolean; portalUsername: string | null; stressfreiEmailId: number | null; nextReviewDate: Date | null; }>; export declare function getContractPassword(id: number): Promise; export declare function getSimCardCredentials(simCardId: number): Promise<{ pin: string | null; puk: string | null; }>; export declare function getInternetCredentials(contractId: number): Promise<{ password: string | null; }>; export declare function getSipCredentials(phoneNumberId: number): Promise<{ password: string | null; }>; export interface ContractTreeNode { contract: { id: number; contractNumber: string; type: ContractType; status: ContractStatus; startDate: Date | null; endDate: Date | null; providerName: string | null; tariffName: string | null; previousContractId: number | null; provider?: { id: number; name: string; } | null; tariff?: { id: number; name: string; } | null; contractCategory?: { id: number; name: string; } | null; }; predecessors: ContractTreeNode[]; hasHistory: boolean; } /** * Verträge eines Kunden als Baumstruktur abrufen. * Wurzelknoten = Verträge ohne Nachfolger (aktuellste Verträge) * Vorgänger werden rekursiv eingebettet. */ export declare function getContractTreeForCustomer(customerId: number): Promise; export {}; //# sourceMappingURL=contract.service.d.ts.map