rajaongkir-v2
Version:
A package to connect with Rajaongkir API
110 lines (109 loc) • 2.63 kB
TypeScript
export type MetaResponse = {
code: number;
status: string;
message: string;
};
export type SearchDomesticsDestinationRequest = {
search?: string;
limit?: number;
offset?: number;
};
export type SearchDomesticsDestinationResponse = {
id: number;
label: string;
subdistrict_name: string;
district_name: string;
city_name: string;
province_name: string;
zip_code: string;
};
export type SearchInternationalDestinationRequest = {
search?: string;
limit?: number;
offset?: number;
};
export type SearchInternationalDestinationResponse = {
country_id: string;
country_name: string;
};
export type CalculateDomesticsCostRequest = {
origin: number;
destination: number;
weight: number;
courier: string;
price?: string;
};
export type CalculateDomesticsCostResponse = {
name: string;
code: string;
service: string;
description: string;
cost: number;
etd: string;
};
export type CalculateInternationalCostRequest = {
origin: number;
destination: number;
weight: number;
courier: string;
price?: string;
};
export type CalculateInternationalCostResponse = {
name: string;
code: string;
service: string;
description: string;
cost: number;
currency: string;
etd: string;
};
export type TrackingAirwaybillsRequest = {
awb?: string;
courier?: string;
};
export type TrackingAirwaybillsResponse = {
delivered: boolean;
summary: {
courier_code: string;
courier_name: string;
waybill_number: string;
service_code: string;
waybill_date: string;
shipper_name: string;
receiver_name: string;
origin: string;
destination: string;
status: string;
};
details: {
waybill_number: string;
waybill_date: string;
waybill_time: string;
weight: string;
origin: string;
destination: string;
shipper_name: string;
shipper_address1: string;
shipper_address2: string;
shipper_address3: string;
shipper_city: string;
receiver_name: string;
receiver_address1: string;
receiver_address2: string;
receiver_address3: string;
receiver_city: string;
};
delivery_status: {
status: string;
pod_receiver: string;
pod_date: string;
pod_time: string;
};
manifest: {
manifest_code: string;
manifest_description: string;
manifest_date: string;
manifest_time: string;
city_name: string;
}[];
};