@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
34 lines (33 loc) • 1.15 kB
TypeScript
import { Builder, Parser } from 'xml2js';
import { ShipperClient, STATUS_TYPES } from './shipper';
declare class UspsClient extends ShipperClient {
private STATUS_MAP;
get userId(): string;
parser: Parser;
builder: Builder;
constructor(options: any);
generateRequest(trk: any, clientIp: any): string;
validateResponse(response: any, cb: any): void;
getEta(shipment: any): Date;
getService(shipment: any): any;
getWeight(shipment: any): void;
presentTimestamp(dateString: any, timeString: any): Date;
findStatusFromMap(statusText: any): STATUS_TYPES;
presentStatus(details: string): STATUS_TYPES;
getDestination(shipment: any): string;
getStatus(shipment: any): STATUS_TYPES.UNKNOWN | STATUS_TYPES.SHIPPING | STATUS_TYPES;
presentActivity(rawActivity: any): any;
getActivitiesAndStatus(shipment: any): {
activities: any[];
status: STATUS_TYPES;
};
requestOptions({ trackingNumber, clientIp, test }: {
trackingNumber: any;
clientIp: any;
test: any;
}): {
method: string;
uri: string;
};
}
export { UspsClient };