import { PochtaRossiiConfig, Order, TariffRequest, TariffResponse, NormalizationRequest, NormalizationResponse, Batch, PostOfficeAddressRequest, PostOfficeIndexRequest, PostOfficeCoordinatesRequest, PostOffice, CountRequestResponse } from './types'; /** * Main class for interacting with Russian Post API * @class PochtaRossiiApi */ export declare class PochtaRossiiApi { private readonly client; private readonly baseUrl; private readonly debug; /** * Creates an instance of PochtaRossiiApi * @param {PochtaRossiiConfig} config - Configuration object containing authentication details */ constructor(config: PochtaRossiiConfig); private handleError; private validateOrder; private validateTariffRequest; private validateNormalizationRequest; private validateBatch; /** * Creates a new order * @param {Order} order - Order details * @returns {Promise} Created order */ createOrder(order: Order): Promise; /** * Retrieves all orders * @returns {Promise} Array of orders */ getOrders(): Promise; /** * Retrieves order by ID * @param {string} orderId - Order ID * @returns {Promise} Order details */ getOrderById(orderId: string): Promise; /** * Deletes order by ID * @param {string} orderId - Order ID * @returns {Promise} */ deleteOrder(orderId: string): Promise; /** * Updates order by ID * @param {string} orderId - Order ID * @param {Order} order - Updated order details * @returns {Promise} Updated order */ updateOrder(orderId: string, order: Order): Promise; /** * Moves order to backlog (shipment to backlog) * @param {string} orderId - Order ID * @returns {Promise} */ moveOrderToBacklog(orderId: string): Promise; /** * Creates a new batch * @param {Batch} batch - Batch details * @returns {Promise} Created batch */ createBatch(batch: Batch): Promise; /** * Retrieves all batches * @returns {Promise} Array of batches */ getBatches(): Promise; /** * Searches batches by name * @param {string} batchName - Batch name to search for * @returns {Promise} Array of matching batches */ searchBatchByName(batchName: string): Promise; /** * Updates batch sending date * @param {string} batchId - Batch ID * @param {string} sendingDate - New sending date (YYYY-MM-DD) * @returns {Promise} */ updateBatchSendingDate(batchId: string, sendingDate: string): Promise; /** * Adds orders to batch * @param {string} batchId - Batch ID * @param {string[]} orderIds - Array of order IDs to add * @returns {Promise} */ addOrdersToBatch(batchId: string, orderIds: string[]): Promise; /** * Retrieves orders in batch * @param {string} batchId - Batch ID * @returns {Promise} Array of orders in batch */ getBatchOrders(batchId: string): Promise; /** * Removes orders from batch * @param {string} batchId - Batch ID * @param {string[]} orderIds - Array of order IDs to remove * @returns {Promise} */ removeOrdersFromBatch(batchId: string, orderIds: string[]): Promise; /** * Calculates delivery tariff * @param {TariffRequest} request - Tariff calculation parameters * @returns {Promise} Calculated tariff details */ calculateTariff(request: TariffRequest): Promise; /** * Normalizes address * @param {NormalizationRequest} request - Address normalization request * @returns {Promise} Normalized address details */ normalizeAddress(request: NormalizationRequest): Promise; /** * Normalizes FIO (Full Name) * @param {NormalizationRequest} request - FIO normalization request * @returns {Promise} Normalized FIO details */ normalizeFio(request: NormalizationRequest): Promise; /** * Normalizes phone number * @param {NormalizationRequest} request - Phone normalization request * @returns {Promise} Normalized phone details */ normalizePhone(request: NormalizationRequest): Promise; /** * Generates all documents for batch * @param {string} batchId - Batch ID * @returns {Promise} ZIP archive with all documents */ generateDocuments(batchId: string): Promise; /** * Generates F103 form * @param {string} batchId - Batch ID * @param {'PAPER' | 'ELECTRONIC'} printType - Form type (default: 'PAPER') * @returns {Promise} Generated form as PDF */ generateF103(batchId: string, printType?: 'PAPER' | 'ELECTRONIC'): Promise; /** * Generates F7p form * @param {string} batchId - Batch ID * @returns {Promise} Generated form as PDF */ generateF7p(batchId: string): Promise; /** * Generates F112 form * @param {string} batchId - Batch ID * @returns {Promise} Generated form as PDF */ generateF112(batchId: string): Promise; /** * Search post offices by address * @param {PostOfficeAddressRequest} request - Address search parameters * @returns {Promise} Array of post offices */ searchPostOfficesByAddress(request: PostOfficeAddressRequest): Promise; /** * Search post offices by postal index * @param {PostOfficeIndexRequest} request - Index search parameters * @returns {Promise} Array of post offices */ searchPostOfficesByIndex(request: PostOfficeIndexRequest): Promise; /** * Search post offices by coordinates * @param {PostOfficeCoordinatesRequest} request - Coordinates search parameters * @returns {Promise} Array of post offices */ searchPostOfficesByCoordinates(request: PostOfficeCoordinatesRequest): Promise; /** * Get all post offices (with optional filters) * @param {number} top - Maximum number of results (default: 100) * @returns {Promise} Array of post offices */ getAllPostOffices(top?: number): Promise; /** * Get API request count statistics * @returns {Promise} Request count information */ countRequest(): Promise; } export * from './types';