diff --git a/package.json b/package.json index 58194f3..b77f560 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "aftership", "description": "node.js SDK for AfterShip API", - "version": "7.0.3", + "version": "7.0.4", "homepage": "https://github.com/aftership/aftership-sdk-nodejs", "author": { "name": "AfterShip", diff --git a/src/model/tracking/tracking.ts b/src/model/tracking/tracking.ts index d47334c..5b83087 100644 --- a/src/model/tracking/tracking.ts +++ b/src/model/tracking/tracking.ts @@ -11,55 +11,25 @@ export interface Tracking { * Hash describes the tracking information. */ tracking?: { - /** - * Date and time of the tracking created. - */ - created_at?: string; - - /** - * Date and time of the tracking last updated. - */ - updated_at?: string; - /** * A unique identifier generated by AfterShip for the tracking. */ id?: string; /** - * The postal code of receiver's address. Required by some couriers, such asdeutsch-post - */ - tracking_postal_code?: string; - - /** - * Shipping date inYYYYMMDDformat. Required by some couriers, such asdeutsch-post - */ - tracking_ship_date?: string; - - /** - * Account number of the shipper for a specific courier. Required by some couriers, such asdynamic-logistics - */ - tracking_account_number?: string; - - /** - * Origin Country of the shipment for a specific courier. Required by some couriers, such asdhl - */ - tracking_origin_country?: string; - - /** - * Destination Country of the shipment for a specific courier. Required by some couriers, such aspostnl-3s + * Date and time of the tracking created. */ - tracking_destination_country?: string; + created_at?: string; /** - * Located state of the shipment for a specific courier. Required by some couriers, such asstar-track-courier + * Date and time of the tracking last updated. */ - tracking_state?: string; + updated_at?: string; /** - * Key of the shipment for a specific courier. Required by some couriers, such assic-teliway + * Date and time the tracking was last updated */ - tracking_key?: string; + last_updated_at?: string; /** * Tracking number. @@ -108,6 +78,11 @@ export interface Tracking { */ destination_country_iso3?: string; + /** + * Shipping address that the shipment is shipping to. + */ + destination_raw_location?: string; + /** * Destination country of the tracking detected from the courier. * ISO Alpha-3 (three letters). Value will be null if the courier doesn't provide the destination country. @@ -131,6 +106,11 @@ export interface Tracking { */ ios?: string | [string]; + /** + * Text field for the note. + */ + note?: string; + /** * Text field for order ID */ @@ -141,11 +121,6 @@ export interface Tracking { */ order_id_path?: string; - /** - * Text field for order number - */ - order_number?: string; - /** * Date and time of the order created */ @@ -156,37 +131,11 @@ export interface Tracking { */ origin_country_iso3?: string; - /** - * The token to generate the direct tracking link: - * https://yourusername.aftership.com/unique_token or https://www.aftership.com/unique_token - */ - unique_token?: string; - /** * Number of packages under the tracking (if any). */ shipment_package_count?: number; - /** - * Shipment type provided by carrier (if any). - */ - shipment_type?: string; - - /** - * Shipment weight provied by carrier (if any) - */ - shipment_weight?: number; - - /** - * Weight unit provied by carrier, either in kg or lb (if any) - */ - shipment_weight_unit?: string; - - /** - * Date and time the tracking was last updated - */ - last_updated_at?: string; - /** * Date and time the tracking was picked up */ @@ -198,14 +147,19 @@ export interface Tracking { shipment_delivery_date?: string; /** - * Phone number(s) subscribed to receive sms notifications. Comma separated for multiple values + * Shipment type provided by carrier (if any). */ - subscribed_smses?: [string]; + shipment_type?: string; /** - * Email address(es) subscribed to receive email notifications. Comma separated for multiple values + * Shipment weight provied by carrier (if any) */ - subscribed_emails?: [string]; + shipment_weight?: number; + + /** + * Weight unit provied by carrier, either in kg or lb (if any) + */ + shipment_weight_unit?: string; /** * Signed by information for delivered shipment (if any). @@ -263,6 +217,27 @@ export interface Tracking { */ language?: string | null; + /** + * The token to generate the direct tracking link: + * https://yourusername.aftership.com/unique_token or https://www.aftership.com/unique_token + */ + unique_token?: string; + + /** + * Array of Hash describes the checkpoint information. + */ + checkpoints?: [Checkpoint]; + + /** + * Phone number(s) subscribed to receive sms notifications. Comma separated for multiple values + */ + subscribed_smses?: [string]; + + /** + * Email address(es) subscribed to receive email notifications. Comma separated for multiple values + */ + subscribed_emails?: [string]; + /** * Whether or not the shipment is returned to sender. * Value istruewhen any of its checkpoints has subtagException_010(returning to sender) @@ -299,16 +274,71 @@ export interface Tracking { * date and time of the first attempt by the carrier to deliver the package to the addressee * Available format:YYYY-MM-DDTHH:MM:SS, or YYYY-MM-DDTHH:MM:SS+TIMEZONE */ - first_attempted_at?: string | null; + first_attempted_at?: string; /** - * Array of Hash describes the checkpoint information. + * Delivery instructions (delivery date or address) can be modified by visiting the link if supported by a carrier. */ - checkpoints?: [Checkpoint]; + courier_redirect_link?: string; + + /** + * Account number of the shipper for a specific courier. Required by some couriers, such asdynamic-logistics + */ + tracking_account_number?: string; + + /** + * Origin Country of the shipment for a specific courier. Required by some couriers, such asdhl + */ + tracking_origin_country?: string; + + /** + * Destination Country of the shipment for a specific courier. Required by some couriers, such aspostnl-3s + */ + tracking_destination_country?: string; + + /** + * Key of the shipment for a specific courier. Required by some couriers, such assic-teliway + */ + tracking_key?: string; + + /** + * The postal code of receiver's address. Required by some couriers, such asdeutsch-post + */ + tracking_postal_code?: string; + + /** + * Shipping date inYYYYMMDDformat. Required by some couriers, such asdeutsch-post + */ + tracking_ship_date?: string; + + /** + * Located state of the shipment for a specific courier. Required by some couriers, such asstar-track-courier + */ + tracking_state?: string; + + /** + * Whether the tracking is delivered on time or not. + */ + on_time_status?: string; + + /** + * The difference days of the on time. + */ + on_time_difference?: number; + + /** + * The tags of the order. + */ + order_tags?: [string]; /** * Estimated delivery time of the shipment provided by AfterShip, indicate when the shipment should arrive. */ aftership_estimated_delivery_date?: EstimatedDeliveryDate; + + /** + * Text field for order number + */ + order_number?: string; }; }