UNPKG

aramex-service-api

Version:

An Aramex client package for shipment operations using TypeScript and OOP.

53 lines (52 loc) 1.7 kB
import { AramexClientConfig, ShipperDetails } from './types'; export declare class AramexClient { private clientInfo; private shipper; constructor(config: AramexClientConfig); /** * Update the shipper details dynamically. * @param shipper New shipper details. */ setShipper(shipper: ShipperDetails): void; /** * Create a shipment. * @param order Order data. * @returns The response from the Aramex API. */ createShipment(order: any): Promise<any>; /** * Track shipments. * @param shipments A string identifier (or comma-separated IDs) for shipments. * @returns The tracking response. */ trackShipments(shipments: string): Promise<any>; /** * Print a shipment label. * @param shipmentNumber The shipment number. * @returns The label printing response. */ printShipmentLabel(shipmentNumber: string): Promise<any>; /** * Validate an address. * @param order Order data. * @returns The address validation response. */ validateAddress(order: any): Promise<any>; /** * Fetch all countries. * @returns The countries fetching response. */ fetchAllCountries(): Promise<any>; /** * Fetch cities by country code. * @param countryCode The country code. * @returns The cities fetching response. */ fetchCitiesByCountry(countryCode: string): Promise<any>; /** * Fetch offices by country code. * @param countryCode The country code. * @returns The offices fetching response. */ fetchOfficesByCountry(countryCode: string): Promise<any>; }