import { GhnAbstract } from '../ghn.abstract'; import type { GhnProvince, GhnDistrict, GhnWard } from './type'; /** * Đối tượng GhnAddress chứa các phương thức để tương tác với API address * * 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 `GhnAddress` * * @en * GhnAddress instance contains methods to interact with address API * * Can be used through `Ghn` instance or directly initialize from `GhnAddress` instance * * @example * ```ts * import { GhnAddress } from 'giaohangnhanh/address'; * * const ghn = new GhnAddress({ * 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 GhnAddress extends GhnAbstract { /** * Retrieves the list of provinces from the server. * * @return {Promise} The list of provinces * @see https://api.ghn.vn/home/docs/detail?id=60 */ getProvinces(): Promise; /** * Retrieves the districts for a given province ID. * * @param {number} provinceId - The ID of the province for which to retrieve districts * @return {Promise} A Promise that resolves to an array of GhnDistrict objects representing the districts * @see https://api.ghn.vn/home/docs/detail?id=78 */ getDistricts(provinceId: number): Promise; /** * Retrieves a list of wards for the given district ID. * * @param {number} districtId - The ID of the district for which to retrieve wards * @return {Promise} A Promise that resolves to an array of GhnWard objects * @see https://api.ghn.vn/home/docs/detail?id=61 */ getWards(districtId: number): Promise; }