@heuristical/trackit
Version:
This module allows you to connect to many shipping carriers like UPS and FedEx and download tracking data for your packages in a common schema
32 lines (31 loc) • 910 B
TypeScript
import { Parser } from 'xml2js';
import { ShipperClient, STATUS_TYPES } from './shipper';
declare class CanadaPostClient extends ShipperClient {
private STATUS_MAP;
get username(): string;
get password(): string;
parser: Parser;
constructor(options: any);
validateResponse(response: any, cb: any): void;
findStatusFromMap(statusText: any): STATUS_TYPES;
getStatus(lastEvent: any): STATUS_TYPES;
getActivitiesAndStatus(shipment: any): {
activities: any[];
status: STATUS_TYPES;
};
getEta(shipment: any): Date;
getService(shipment: any): any;
getWeight(): void;
getDestination(shipment: any): any;
requestOptions({ trackingNumber }: {
trackingNumber: any;
}): {
method: string;
uri: string;
auth: {
user: string;
pass: string;
};
};
}
export { CanadaPostClient };