@artaio/node-api 0.29.3 → 0.30.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -16,6 +16,7 @@ export type ObjectSubType = 'painting_unframed' | 'painting_framed' | 'painting_
|
|
|
16
16
|
export type ParcelTransportServices = 'economy' | 'economy_freight' | 'ground' | 'next_day_air' | 'priority' | 'priority_freight' | 'second_day_air' | 'standard';
|
|
17
17
|
export type WebhookDeliveryType = 'request.created' | 'request.status.updated' | 'shipment.created' | 'shipment.eei_form_status.updated' | 'shipment.schedule.updated' | 'shipment.status.updated' | 'shipment.tracking.updated' | 'ping';
|
|
18
18
|
export type ObjectMaterial = 'stone_marble' | 'precious_stones' | 'fiber_synthetic' | 'fabric_natural' | 'taxidermy' | 'carbon_fiber' | 'live_animal' | 'paper' | 'glass' | 'presious_metals' | 'particleboard' | 'styrofoam' | 'wood' | 'photo_film' | 'sand' | 'metal' | 'plexiglass' | 'aquatic_life' | 'canvas' | 'drywall' | 'hard_plastic' | 'vinyl' | 'soft_plastic' | 'leather' | 'rubber' | 'concreate' | 'paint' | 'electronics' | 'fiber_natural' | 'gas' | 'fabric_synthetic' | 'CITES' | 'liquids' | 'salts';
|
|
19
|
+
export type ShipmentExceptionTypeId = 'change_of_address_request' | 'customs_information_required' | 'damaged_items' | 'direct_payment_required' | 'held_at_customs' | 'inaccurate_object_details' | 'incorrect_address' | 'lost_in_transit' | 'not_ready_for_delivery' | 'not_ready_for_release' | 'other' | 'prepayment_required' | 'requested_hold_to_collect' | 'requested_hold_to_deliver' | 'wrong_item';
|
|
19
20
|
export type ArtaTrackingServiceType = 'transport' | 'location' | 'handling' | 'packing' | 'storage' | 'administration' | 'taxes_duties_fees' | 'security' | 'equipment';
|
|
20
21
|
export type ArtaTrackingServiceSubType = 'specialized' | 'consolidated' | 'freight' | 'parcel' | 'collection' | 'delivery' | 'location' | 'unpacking' | 'condition' | 'installation' | 'deinstallation' | 'debris_disposal' | 'site_visit' | 'handling' | 'packing' | 'packing_materials' | 'receive_release' | 'warehouse' | 'customs' | 'coi' | 'administration' | 'taxes_duties' | 'fees' | 'security' | 'equipment';
|
|
21
22
|
export type ArtaTrackingServiceSubSubType = 'armored_transport' | 'dedicated_transport' | 'specialized_shuttle' | 'road_groupage' | 'sea_groupage' | 'sea_freight' | 'ltl_freight' | 'ftl_freight' | 'air_freight' | 'cargo_air_freight' | 'parcel' | 'priority_freight' | 'economy_freight' | 'collection' | 'art_fair_collection' | 'residential_collection' | 'airport_collection' | 'port_collection' | 'dock_collection' | 'consolidated_collection' | 'failed_collection' | 'recollection' | 'delivery' | 'inside_delivery' | 'art_fair_delivery' | 'room_of_choice_delivery' | 'curbside_delivery' | 'residential_delivery' | 'signature_delivery' | 'saturday_delivery' | 'sunday_delivery' | 'scheduled_delivery' | 'after_hours_delivery' | 'airport_delivery' | 'port_delivery' | 'dock_delivery' | 'failed_delivery' | 'redelivery' | 'origin_additional_stops' | 'destination_additional_stops' | 'origin_off_route' | 'destination_off_route' | 'must_fly' | 'origin_unpacking_soft' | 'destination_unpacking_soft' | 'origin_unpacking_wood' | 'destination_unpacking_wood' | 'origin_unpacking' | 'destination_unpacking' | 'origin_full_condition_report' | 'destination_full_condition_report' | 'origin_condition_check' | 'destination_condition_check' | 'installation' | 'placement' | 'assembly' | 'deinstallation' | 'disassembly' | 'debris_disposal' | 'crate_disposal' | 'soft_packed_disposal' | 'origin_site_visit' | 'destination_site_visit' | 'origin_additional_labor' | 'destination_additional_labor' | 'airport_handling' | 'origin_oversized_handling' | 'destination_oversized_handling' | 'origin_additional_stairs' | 'destination_additional_stairs' | 'packing_labor' | 'crate_fabrication' | 't_frame_fabrication' | 'fabrication' | 'retrofitting' | 'additional_packing' | 'pack_into' | 'poly' | 'dartek' | 'bubble' | 'cling_wrap' | 'cbin_communal' | 'blanket' | 'portfolio' | 'poly_cardboard' | 'bubble_cardboard' | 'rug_rolled' | 'cbin_closed' | 'cbin_open' | 'garment_bag' | 'wardrobe_box' | 'cardboard_box' | 'chandelier_box' | 'chair_box' | 'slipcase' | 'glass_tape' | 'stabilizing_box' | 'shadow_box' | 'foam_lined_box' | 'cavity_box' | 'strongbox' | 'double_box' | 'shipping_tube_small' | 'shipping_tube_large' | 'sonotube' | 'alcohol_case' | 'lay_flat_wine_box' | 'lockbox' | 'travel_frame' | 'travel_frame_art' | 'travel_frame_other' | 'a_frame' | 'slat_crate' | 'tri_wall_crate' | 'ply_box' | 'fine_art_econo_crate' | 'fine_art_international_crate' | 'econo_crate' | 'international_econo_crate' | 'furniture_crate' | 'international_furniture_crate' | 'parcel_crate' | 'museum_crate' | 'international_museum_crate' | 'pallet' | 'international_pallet' | 'warehouse_handling' | 'receive_in_fee' | 'release_fee' | 'storage' | 'temp_storage' | 'viewing_room' | 'staging' | 'import_customs_formalities' | 'export_customs_formalities' | 'origin_building_coi' | 'destination_building_coi' | 'double_blind_bols' | 'power_of_attorney' | 'administrative' | 'mpf' | 'bond' | 'duties' | 'taxes' | 'disbursement' | 'temporary_customs_entry' | 'fuel_surcharge' | 'tarmac_supervision' | 'courier_onboard' | 'fork_lift' | 'gantry' | 'pallet_jack' | 'scaffolding' | 'rigging' | 'lift_gate' | 'ramp' | 'floor_protection';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AccessRestriction, APIStatus, ArtaTrackingServiceSubSubType, ArtaTrackingServiceSubType, ArtaTrackingServiceType, AuthTypes, EmailNotificationId, Insurance, ObjectMaterial, ObjectSubType, ObjectType, PackageStatus, PackingSubType, PackingType, ParcelTransportServices, PaymentProcessType, QuoteRequestStatus, QuoteType, Recipients, ShipmentStatus, SupportedCurrency } from '../MetadataTypes';
|
|
1
|
+
import { AccessRestriction, APIStatus, ArtaTrackingServiceSubSubType, ArtaTrackingServiceSubType, ArtaTrackingServiceType, AuthTypes, EmailNotificationId, Insurance, ObjectMaterial, ObjectSubType, ObjectType, PackageStatus, PackingSubType, PackingType, ParcelTransportServices, PaymentProcessType, QuoteRequestStatus, QuoteType, Recipients, ShipmentExceptionTypeId, ShipmentStatus, SupportedCurrency } from '../MetadataTypes';
|
|
2
2
|
import { RestClient } from '../net/RestClient';
|
|
3
3
|
export interface APIVersionMetadata {
|
|
4
4
|
authentication: AuthTypes[];
|
|
@@ -16,6 +16,11 @@ export interface EmailNotificationMetadata {
|
|
|
16
16
|
optional_recipients: Recipients;
|
|
17
17
|
id: EmailNotificationId;
|
|
18
18
|
}
|
|
19
|
+
export interface ShipmentExceptionTypeMetadata {
|
|
20
|
+
id: ShipmentExceptionTypeId;
|
|
21
|
+
name: string;
|
|
22
|
+
resolutions: string[];
|
|
23
|
+
}
|
|
19
24
|
export interface BaseMetadata<T> {
|
|
20
25
|
description: string;
|
|
21
26
|
id: T;
|
|
@@ -63,5 +68,6 @@ export declare class MetadataEndpoint {
|
|
|
63
68
|
quotes(auth?: string): Promise<QuotesMetadata[]>;
|
|
64
69
|
requestStatuses(auth?: string): Promise<RequestStatusesMetadata[]>;
|
|
65
70
|
services(auth?: string): Promise<ServicesMetadata[]>;
|
|
71
|
+
shipmentExceptionTypes(auth?: string): Promise<ShipmentExceptionTypeMetadata[]>;
|
|
66
72
|
shipmentStatuses(auth?: string): Promise<ShipmentStatusesMetadata[]>;
|
|
67
73
|
}
|
|
@@ -48,6 +48,9 @@ var MetadataEndpoint = /** @class */ (function () {
|
|
|
48
48
|
MetadataEndpoint.prototype.services = function (auth) {
|
|
49
49
|
return this.artaClient.get("".concat(this.path, "/services"), auth);
|
|
50
50
|
};
|
|
51
|
+
MetadataEndpoint.prototype.shipmentExceptionTypes = function (auth) {
|
|
52
|
+
return this.artaClient.get("".concat(this.path, "/shipment_exception_types"), auth);
|
|
53
|
+
};
|
|
51
54
|
MetadataEndpoint.prototype.shipmentStatuses = function (auth) {
|
|
52
55
|
return this.artaClient.get("".concat(this.path, "/shipment_statuses"), auth);
|
|
53
56
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ArtaID } from '../ArtaClient';
|
|
2
|
-
import { ArtaLocation, ArtaObject, ArtaService, EEIFormStatus, InsurancePolicy, PackageStatus, PackingSubType, PaymentProcessType, QuoteType, ShipmentStatus, SupportedCurrency } from '../MetadataTypes';
|
|
2
|
+
import { ArtaLocation, ArtaObject, ArtaService, EEIFormStatus, InsurancePolicy, PackageStatus, PackingSubType, PaymentProcessType, QuoteType, ShipmentStatus, ShipmentExceptionTypeId, SupportedCurrency } from '../MetadataTypes';
|
|
3
3
|
import { RestClient } from '../net/RestClient';
|
|
4
4
|
import { Page } from '../pagination';
|
|
5
5
|
import { ShipmentsSearch } from '../search';
|
|
@@ -19,6 +19,15 @@ export interface Package {
|
|
|
19
19
|
weight_unit: string;
|
|
20
20
|
width: number;
|
|
21
21
|
}
|
|
22
|
+
export type ShipmentExceptionStatus = 'in_progress' | 'new' | 'resolved';
|
|
23
|
+
export interface ShipmentException extends DatedInterface {
|
|
24
|
+
exception_type_label: NullableString;
|
|
25
|
+
id: ArtaID;
|
|
26
|
+
package_id: Nullable<number>;
|
|
27
|
+
resolution: NullableString;
|
|
28
|
+
status: ShipmentExceptionStatus;
|
|
29
|
+
type: ShipmentExceptionTypeId;
|
|
30
|
+
}
|
|
22
31
|
export interface ShipmentSchedule {
|
|
23
32
|
delivery_end: Nullable<Date>;
|
|
24
33
|
delivery_start: Nullable<Date>;
|
|
@@ -38,6 +47,9 @@ export interface Shipment extends DatedInterface {
|
|
|
38
47
|
id: ArtaID;
|
|
39
48
|
destination: ArtaLocation;
|
|
40
49
|
eei_form_status?: Nullable<EEIFormStatus>;
|
|
50
|
+
emissions?: Nullable<number>;
|
|
51
|
+
emissions_unit?: NullableString;
|
|
52
|
+
exceptions?: Nullable<ShipmentException[]>;
|
|
41
53
|
hosted_session_id?: Nullable<number>;
|
|
42
54
|
insurance_policy?: Nullable<InsurancePolicy>;
|
|
43
55
|
internal_reference?: NullableString;
|
|
@@ -11,6 +11,9 @@ var ShipmentsEndpoint = /** @class */ (function () {
|
|
|
11
11
|
}
|
|
12
12
|
ShipmentsEndpoint.prototype.enrichFields = function (r) {
|
|
13
13
|
r.total = Number(r.total);
|
|
14
|
+
if (r.emissions) {
|
|
15
|
+
r.emissions = Number(r.emissions);
|
|
16
|
+
}
|
|
14
17
|
if (r.schedule) {
|
|
15
18
|
r.schedule.delivery_end = new Date(r.schedule.delivery_end);
|
|
16
19
|
r.schedule.delivery_start = new Date(r.schedule.delivery_start);
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@artaio/node-api",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.30.1",
|
|
4
4
|
"description": "The Arta Node library provides a seamless integration to Arta API for applications running on Node.js using both Typescript or Javascript.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "tsc -p tsconfig-build.json",
|
|
@@ -31,25 +31,25 @@
|
|
|
31
31
|
"Selman Uysal <selman@arta.io>"
|
|
32
32
|
],
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@commitlint/cli": "^17.
|
|
35
|
-
"@commitlint/config-conventional": "^17.
|
|
36
|
-
"@types/jest": "^29.1
|
|
34
|
+
"@commitlint/cli": "^17.6.3",
|
|
35
|
+
"@commitlint/config-conventional": "^17.6.3",
|
|
36
|
+
"@types/jest": "^29.5.1",
|
|
37
37
|
"@types/nock": "^11.1.0",
|
|
38
|
-
"@types/node": "^
|
|
39
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
40
|
-
"@typescript-eslint/parser": "^5.
|
|
41
|
-
"eslint": "^8.
|
|
42
|
-
"eslint-config-prettier": "^8.
|
|
43
|
-
"eslint-plugin-import": "^2.
|
|
44
|
-
"eslint-plugin-n": "^
|
|
45
|
-
"eslint-plugin-promise": "^6.
|
|
46
|
-
"husky": "^8.0.
|
|
47
|
-
"jest": "^29.
|
|
48
|
-
"nock": "^13.
|
|
38
|
+
"@types/node": "^20.2.1",
|
|
39
|
+
"@typescript-eslint/eslint-plugin": "^5.59.6",
|
|
40
|
+
"@typescript-eslint/parser": "^5.59.6",
|
|
41
|
+
"eslint": "^8.40.0",
|
|
42
|
+
"eslint-config-prettier": "^8.8.0",
|
|
43
|
+
"eslint-plugin-import": "^2.27.5",
|
|
44
|
+
"eslint-plugin-n": "^16.0.0",
|
|
45
|
+
"eslint-plugin-promise": "^6.1.1",
|
|
46
|
+
"husky": "^8.0.3",
|
|
47
|
+
"jest": "^29.5.0",
|
|
48
|
+
"nock": "^13.3.1",
|
|
49
49
|
"pinst": "^3.0.0",
|
|
50
|
-
"prettier": "2.
|
|
51
|
-
"ts-jest": "^29.0
|
|
52
|
-
"typescript": "^
|
|
50
|
+
"prettier": "2.8.8",
|
|
51
|
+
"ts-jest": "^29.1.0",
|
|
52
|
+
"typescript": "^5.0.4"
|
|
53
53
|
},
|
|
54
54
|
"bugs": {
|
|
55
55
|
"url": "https://github.com/artaio/arta-node-api/issues"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@artaio/node-api",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.30.1",
|
|
4
4
|
"description": "The Arta Node library provides a seamless integration to Arta API for applications running on Node.js using both Typescript or Javascript.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "tsc -p tsconfig-build.json",
|
|
@@ -31,25 +31,25 @@
|
|
|
31
31
|
"Selman Uysal <selman@arta.io>"
|
|
32
32
|
],
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@commitlint/cli": "^17.
|
|
35
|
-
"@commitlint/config-conventional": "^17.
|
|
36
|
-
"@types/jest": "^29.1
|
|
34
|
+
"@commitlint/cli": "^17.6.3",
|
|
35
|
+
"@commitlint/config-conventional": "^17.6.3",
|
|
36
|
+
"@types/jest": "^29.5.1",
|
|
37
37
|
"@types/nock": "^11.1.0",
|
|
38
|
-
"@types/node": "^
|
|
39
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
40
|
-
"@typescript-eslint/parser": "^5.
|
|
41
|
-
"eslint": "^8.
|
|
42
|
-
"eslint-config-prettier": "^8.
|
|
43
|
-
"eslint-plugin-import": "^2.
|
|
44
|
-
"eslint-plugin-n": "^
|
|
45
|
-
"eslint-plugin-promise": "^6.
|
|
46
|
-
"husky": "^8.0.
|
|
47
|
-
"jest": "^29.
|
|
48
|
-
"nock": "^13.
|
|
38
|
+
"@types/node": "^20.2.1",
|
|
39
|
+
"@typescript-eslint/eslint-plugin": "^5.59.6",
|
|
40
|
+
"@typescript-eslint/parser": "^5.59.6",
|
|
41
|
+
"eslint": "^8.40.0",
|
|
42
|
+
"eslint-config-prettier": "^8.8.0",
|
|
43
|
+
"eslint-plugin-import": "^2.27.5",
|
|
44
|
+
"eslint-plugin-n": "^16.0.0",
|
|
45
|
+
"eslint-plugin-promise": "^6.1.1",
|
|
46
|
+
"husky": "^8.0.3",
|
|
47
|
+
"jest": "^29.5.0",
|
|
48
|
+
"nock": "^13.3.1",
|
|
49
49
|
"pinst": "^3.0.0",
|
|
50
|
-
"prettier": "2.
|
|
51
|
-
"ts-jest": "^29.0
|
|
52
|
-
"typescript": "^
|
|
50
|
+
"prettier": "2.8.8",
|
|
51
|
+
"ts-jest": "^29.1.0",
|
|
52
|
+
"typescript": "^5.0.4"
|
|
53
53
|
},
|
|
54
54
|
"bugs": {
|
|
55
55
|
"url": "https://github.com/artaio/arta-node-api/issues"
|