import { GhnAbstract } from '../ghn.abstract'; import type { CalculateShippingFee, CalculateShippingFeeResponse, GetServiceResponse } from './type'; /** * Đối tượng CalculateFee chứa các phương thức để tương tác với API calculateFee * * Có thể sử dụng thông qua đối tượng `Ghn` hoặc khởi tạo trực tiếp từ đối tượng `CalculateFee` * * @en * CalculateFee instance contains methods to interact with calculateFee API * * Can be used through `Ghn` instance or directly initialize from `CalculateFee` instance * * @example * ```ts * import { CalculateFee } from 'giaohangnhanh/calculate-fee'; * * const ghn = new CalculateFee({ * token: 'YOUR_GHN_TOKEN', // Change to your token * shopId: 123456, // Change to your shopId * host: 'https://dev-online-gateway.ghn.vn', * testMode: true, // Enable test mode to override host * }); * ``` * * */ export declare class CalculateFee extends GhnAbstract { /** * Get the list of available services for shipping orders. * * @param {number} fromDistrictId - the ID of the district where the shipment will be sent from * @param {number} toDistrictId - the ID of the district where the shipment will be sent to * @return {GetServiceResponse[]} the list of available services for shipping orders * @see https://api.ghn.vn/home/docs/detail?id=77 */ getServiceList(fromDistrictId: number, toDistrictId: number): Promise; /** * Calculate the shipping fee based on the provided ship data. * * @param {CalculateShippingFee} shipData - the data used for calculating the shipping fee * @return {Promise} the calculated shipping fee response * @see https://api.ghn.vn/home/docs/detail?id=76 */ calculateShippingFee(shipData: CalculateShippingFee): Promise; }