@artaio/node-api 1.3.0 → 1.4.0

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.
@@ -6,7 +6,6 @@ export type PackingType = 'alcohol_case' | 'blanket' | 'box' | 'cbin_closed' | '
6
6
  export type PackingSubType = 'alcohol_case' | 'lay_flat_wine_box' | 'blanket' | 'wardrobe_box' | 'cardboard_box' | 'chandelier_box' | 'chair_box' | 'cbin_closed' | 'cbin_open' | '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' | 'foam_lined_box' | 'cavity_box' | 'strongbox' | 'double_box' | 'travel_frame' | 'travel_frame_art' | 'travel_frame_other' | 'a_frame' | 'slat_crate' | 'tri_wall_crate' | 'lockbox' | 'no_packing' | 'pallet' | 'international_pallet' | 'portfolio' | 'rug_rolled' | 'shadow_box' | 'slipcase' | 'slipcase_glass_tape' | 'poly_cardboard' | 'bubble_cardboard' | 'garment_bag' | 'poly_only' | 'dartek_only' | 'bubble_only' | 'cling_wrap' | 'cbin_communal' | 'sonotube' | 'stabilizing_box' | 'shipping_tube_small' | 'shipping_tube_large';
7
7
  export type ObjectType = 'art' | 'furniture' | 'jewelry' | 'decorative_arts' | 'collectibles' | 'alcohol' | 'automotive' | 'fashion' | 'other';
8
8
  export type ObjectSubType = 'painting_unframed' | 'painting_framed' | 'painting_framed_plexi' | 'painting_framed_glass' | 'work_on_paper_unframed' | 'work_on_paper_framed' | 'work_on_paper_framed_plexi' | 'work_on_paper_framed_glass' | 'mixed_media_unframed' | 'mixed_media_framed' | 'mixed_media_framed_plexi' | 'mixed_media_framed_glass' | 'photograph_unframed' | 'photograph_framed' | 'photograph_framed_plexi' | 'photograph_framed_glass' | 'new_media' | 'sculpture' | 'pedestal' | 'pedestal_case_glass' | 'pedestal_case_plexi' | 'ceramic' | 'neon' | 'tapestry' | 'other_art' | 'table' | 'chair' | 'sofa_loveseat_chaise' | 'floor_lamp' | 'floor_lamp_shade' | 'table_lamp' | 'table_lamp_shade' | 'sconce' | 'ottoman' | 'bookcase_storage' | 'nightstand' | 'armoire_dresser' | 'carpet_rug' | 'mirror' | 'chandelier' | 'bedframe' | 'headboard' | 'desk_vanity' | 'media_console' | 'other_furniture' | 'earrings' | 'necklace' | 'bracelet' | 'ring' | 'brooch' | 'watch' | 'cufflinks' | 'eyeglasses' | 'set' | 'precious_stones' | 'snuff_box_cigarette_case' | 'other_jewelry' | 'vase_vessel' | 'bowl' | 'plaque' | 'object_of_vertu' | 'candelabra_candlestick' | 'dinnerware' | 'flatware' | 'glassware' | 'serveware' | 'porcelain_plate' | 'porcelain_bowl' | 'tabletop_accessory' | 'clock' | 'other_decorative_arts' | 'stamp' | 'book' | 'coin' | 'document_manuscript' | 'toy' | 'miniature_model' | 'figurine_doll' | 'neon_sign' | 'memorabilia' | 'camera_electrical' | 'other_collectibles' | 'wine_bottle' | 'spirits_bottle' | 'beer_bottle' | 'wine_case' | 'spirits_case' | 'beer_case' | 'wine_barrel' | 'spirits_barrel' | 'beer_barrel' | 'other_alcohols' | 'car' | 'motorcycle' | 'bus' | 'van' | 'limousine' | 'carriage' | 'trailer' | 'sidecar' | 'other_automotive' | 'clothing' | 'footwear' | 'handbag' | 'accessories' | 'other_fashion' | 'musical_instrument' | 'firearm_weapon' | 'hunting_fishing' | 'medical_equipment' | 'other';
9
- export type ParcelTransportServices = 'economy' | 'economy_freight' | 'ground' | 'next_day_air' | 'priority' | 'priority_freight' | 'second_day_air' | 'standard';
10
9
  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';
11
10
  export type ArtaTrackingServiceType = 'transport' | 'location' | 'handling' | 'packing' | 'storage' | 'administration' | 'taxes_duties_fees' | 'security' | 'equipment';
12
11
  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';
@@ -1,7 +1,7 @@
1
1
  import type { ArtaID } from '../ArtaClient';
2
2
  import type { RestClient } from '../net/RestClient';
3
3
  import type { Page } from '../pagination';
4
- import type { AdditionalService, ArtaLocation, ArtaObject, HostedSession, Insurance, QuoteType } from '../MetadataTypes';
4
+ import type { AdditionalService, ArtaLocation, ArtaObject, HostedSession, Insurance, ParcelTransportServices, QuoteType } from '../MetadataTypes';
5
5
  import { type Nullable, type NullableString } from '../utils';
6
6
  import type { HostedSessionsSearch } from '../search';
7
7
  export type EnrichedHostedSession = HostedSession & {
@@ -16,6 +16,7 @@ export interface HostedSessionCreateBody {
16
16
  objects: ArtaObject[];
17
17
  origin: ArtaLocation;
18
18
  preferred_quote_types?: Nullable<QuoteType[]>;
19
+ preferred_parcel_transport_services?: Nullable<ParcelTransportServices[]>;
19
20
  public_reference?: NullableString;
20
21
  shipping_notes?: NullableString;
21
22
  success_url?: NullableString;
@@ -1,4 +1,4 @@
1
- import type { AccessRestriction, APIStatus, ArtaTrackingServiceSubSubType, ArtaTrackingServiceSubType, ArtaTrackingServiceType, AuthTypes, EmailNotificationId, Insurance, ObjectMaterial, ObjectSubType, ObjectType, PackageStatus, PackingSubType, PackingType, ParcelTransportServices, PaymentProcessType, QuoteRequestStatus, QuoteType, Recipient, ShipmentExceptionTypeId, ShipmentStatus, SupportedCurrency } from '../MetadataTypes';
1
+ import type { AccessRestriction, APIStatus, ArtaTrackingServiceSubSubType, ArtaTrackingServiceSubType, ArtaTrackingServiceType, AuthTypes, EmailNotificationId, Insurance, ObjectMaterial, ObjectSubType, ObjectType, PackageStatus, PackingSubType, PackingType, ParcelTransportServices, PaymentProcessType, QuoteRequestStatus, QuoteType, QuotingStrategy, Recipient, ShipmentExceptionTypeId, ShipmentStatus, SupportedCurrency } from '../MetadataTypes';
2
2
  import type { RestClient } from '../net/RestClient';
3
3
  export interface APIVersionMetadata {
4
4
  authentication: AuthTypes[];
@@ -26,9 +26,11 @@ export interface BaseMetadata<T> {
26
26
  id: T;
27
27
  name: string;
28
28
  }
29
+ type GenericMetadata = Pick<BaseMetadata<string>, 'id' | 'name'>;
29
30
  export type InsurancesMetadata = BaseMetadata<Insurance>;
30
31
  export type LocationAccessRestrictionMetadata = BaseMetadata<AccessRestriction>;
31
32
  export type ObjectMaterialsMetadata = BaseMetadata<ObjectMaterial>;
33
+ export type QuotingStrategyMetadata = BaseMetadata<QuotingStrategy>;
32
34
  export interface ObjectMetadata extends BaseMetadata<ObjectType> {
33
35
  subtypes: BaseMetadata<ObjectSubType>[];
34
36
  }
@@ -66,8 +68,12 @@ export declare class MetadataEndpoint {
66
68
  parcelTransportServices(auth?: string): Promise<ParcelTransportServicesMetadata[]>;
67
69
  paymentProcessTypes(auth?: string): Promise<PaymentProcessTypeMetadata[]>;
68
70
  quotes(auth?: string): Promise<QuotesMetadata[]>;
71
+ quotingStrategies(auth?: string): Promise<QuotingStrategyMetadata[]>;
72
+ referenceRateProviders(auth?: string): Promise<GenericMetadata[]>;
73
+ referenceRateServiceLevels(auth?: string): Promise<GenericMetadata[]>;
69
74
  requestStatuses(auth?: string): Promise<RequestStatusesMetadata[]>;
70
75
  services(auth?: string): Promise<ServicesMetadata[]>;
71
76
  shipmentExceptionTypes(auth?: string): Promise<ShipmentExceptionTypeMetadata[]>;
72
77
  shipmentStatuses(auth?: string): Promise<ShipmentStatusesMetadata[]>;
73
78
  }
79
+ export {};
@@ -42,6 +42,15 @@ var MetadataEndpoint = /** @class */ (function () {
42
42
  MetadataEndpoint.prototype.quotes = function (auth) {
43
43
  return this.artaClient.get("".concat(this.path, "/quotes"), auth);
44
44
  };
45
+ MetadataEndpoint.prototype.quotingStrategies = function (auth) {
46
+ return this.artaClient.get("".concat(this.path, "/quoting_strategies"), auth);
47
+ };
48
+ MetadataEndpoint.prototype.referenceRateProviders = function (auth) {
49
+ return this.artaClient.get("".concat(this.path, "/reference_rate_providers"), auth);
50
+ };
51
+ MetadataEndpoint.prototype.referenceRateServiceLevels = function (auth) {
52
+ return this.artaClient.get("".concat(this.path, "/reference_rate_service_levels"), auth);
53
+ };
45
54
  MetadataEndpoint.prototype.requestStatuses = function (auth) {
46
55
  return this.artaClient.get("".concat(this.path, "/request_statuses"), auth);
47
56
  };
@@ -1,8 +1,7 @@
1
- import type { AdditionalService, ArtaLocation, ArtaObject, Contact, Insurance, QuoteType, SupportedCurrency } from '../types';
1
+ import type { AdditionalService, ArtaLocation, ArtaObject, Contact, Insurance, ParcelTransportServices, QuoteRequest, QuoteRequestListItem, QuoteType, QuotingStrategy, SupportedCurrency } from '../types';
2
2
  import type { RestClient } from '../net/RestClient';
3
3
  import type { Page } from '../pagination';
4
4
  import type { RequestsSearch } from '../search';
5
- import type { QuoteRequest, QuoteRequestListItem } from '../types';
6
5
  import type { Nullable, NullableString } from '../utils';
7
6
  export type EnrichRequest<T> = T & {
8
7
  updateContacts: (contacts: UpdateRequestsContactsBody, auth?: string) => Promise<T>;
@@ -17,7 +16,9 @@ export interface QuoteRequestCreateBody {
17
16
  internal_reference?: NullableString;
18
17
  objects: ArtaObject[];
19
18
  origin: ArtaLocation;
19
+ preferred_parcel_transport_services?: Nullable<ParcelTransportServices[]>;
20
20
  preferred_quote_types?: Nullable<QuoteType[]>;
21
+ quoting_strategy?: QuotingStrategy;
21
22
  public_reference?: NullableString;
22
23
  shipping_notes?: NullableString;
23
24
  }
@@ -70,6 +70,7 @@ export type QuoteRequest = {
70
70
  };
71
71
  public_reference?: (string | null) | undefined;
72
72
  quote_types: ("parcel" | "premium" | "select" | "self_ship")[];
73
+ quoting_strategy: "best_rate" | "compare_carriers";
73
74
  shortcode: string;
74
75
  status: "cancelled" | "closed" | "disqualified" | "expired" | "in_progress" | "pending" | "quoted";
75
76
  tags: {
@@ -116,6 +117,7 @@ export type QuoteRequest = {
116
117
  }[];
117
118
  payment_process: "checkout" | "checkout_direct" | "invoicing";
118
119
  preferred_quote_types?: (("parcel" | "premium" | "select" | "self_ship")[] | null) | undefined;
120
+ preferred_parcel_transport_services?: (("economy" | "economy_freight" | "ground" | "next_day_air" | "priority" | "priority_freight" | "second_day_air" | "standard")[] | null) | undefined;
119
121
  shipping_notes?: (string | null) | undefined;
120
122
  quotes: {
121
123
  id: number;
@@ -129,6 +131,9 @@ export type QuoteRequest = {
129
131
  subtype: "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";
130
132
  type: "transport" | "location" | "handling" | "packing" | "storage" | "administration" | "taxes_duties_fees" | "security" | "equipment";
131
133
  included_services: any[];
134
+ metadata: {
135
+ [x: string]: unknown;
136
+ };
132
137
  }[];
133
138
  included_insurance_policy?: ({
134
139
  amount: number;
@@ -289,6 +294,9 @@ export type Shipment = {
289
294
  subtype: "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";
290
295
  type: "transport" | "location" | "handling" | "packing" | "storage" | "administration" | "taxes_duties_fees" | "security" | "equipment";
291
296
  included_services: any[];
297
+ metadata: {
298
+ [x: string]: unknown;
299
+ };
292
300
  }[] | null) | undefined;
293
301
  shipping_notes?: (string | null) | undefined;
294
302
  shortcode: string;
@@ -310,6 +318,16 @@ export type Shipment = {
310
318
  tracking?: ({
311
319
  carrier_name: string;
312
320
  label_url?: (string | null) | undefined;
321
+ label_format_urls: {
322
+ pdf_4_x_6?: (string | null) | undefined;
323
+ pdf_a4?: (string | null) | undefined;
324
+ pdf_a4_half_page?: (string | null) | undefined;
325
+ pdf_letter?: (string | null) | undefined;
326
+ pdf_letter_half_page?: (string | null) | undefined;
327
+ png_4_x_6?: (string | null) | undefined;
328
+ zpl_12dpmm?: (string | null) | undefined;
329
+ zpl_8dpmm?: (string | null) | undefined;
330
+ } | null;
313
331
  package_id: number;
314
332
  tracking_number: string;
315
333
  url: string;
@@ -400,6 +418,7 @@ export type HostedSession = {
400
418
  estimated_region?: string | undefined;
401
419
  estimated_city?: string | undefined;
402
420
  };
421
+ preferred_parcel_transport_services?: (("economy" | "economy_freight" | "ground" | "next_day_air" | "priority" | "priority_freight" | "second_day_air" | "standard")[] | null) | undefined;
403
422
  preferred_quote_types?: (("parcel" | "premium" | "select" | "self_ship")[] | null) | undefined;
404
423
  public_reference?: (string | null) | undefined;
405
424
  shipping_notes?: (string | null) | undefined;
@@ -673,6 +692,16 @@ export type ShipmentSchedule = {
673
692
  export type ShipmentTracking = {
674
693
  carrier_name: string;
675
694
  label_url?: (string | null) | undefined;
695
+ label_format_urls: {
696
+ pdf_4_x_6?: (string | null) | undefined;
697
+ pdf_a4?: (string | null) | undefined;
698
+ pdf_a4_half_page?: (string | null) | undefined;
699
+ pdf_letter?: (string | null) | undefined;
700
+ pdf_letter_half_page?: (string | null) | undefined;
701
+ png_4_x_6?: (string | null) | undefined;
702
+ zpl_12dpmm?: (string | null) | undefined;
703
+ zpl_8dpmm?: (string | null) | undefined;
704
+ } | null;
676
705
  package_id: number;
677
706
  tracking_number: string;
678
707
  url: string;
@@ -696,6 +725,9 @@ export type Quote = {
696
725
  subtype: "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";
697
726
  type: "transport" | "location" | "handling" | "packing" | "storage" | "administration" | "taxes_duties_fees" | "security" | "equipment";
698
727
  included_services: any[];
728
+ metadata: {
729
+ [x: string]: unknown;
730
+ };
699
731
  }[];
700
732
  included_insurance_policy?: ({
701
733
  amount: number;
@@ -720,6 +752,7 @@ export type Quote = {
720
752
  total: number;
721
753
  total_currency: "CAD" | "CHF" | "EUR" | "GBP" | "HKD" | "USD";
722
754
  };
755
+ export type QuotingStrategy = "best_rate" | "compare_carriers";
723
756
  export type QuoteRequestListItem = {
724
757
  updated_at: Date;
725
758
  created_at: Date;
@@ -773,6 +806,7 @@ export type QuoteRequestListItem = {
773
806
  };
774
807
  public_reference?: (string | null) | undefined;
775
808
  quote_types: ("parcel" | "premium" | "select" | "self_ship")[];
809
+ quoting_strategy: "best_rate" | "compare_carriers";
776
810
  shortcode: string;
777
811
  status: "cancelled" | "closed" | "disqualified" | "expired" | "in_progress" | "pending" | "quoted";
778
812
  tags: {
@@ -791,3 +825,4 @@ export type EmailNotificationId = "booking" | "cancelled" | "collected" | "colle
791
825
  export type Recipient = "payer" | "origin" | "destination";
792
826
  export type ArtaMimeType = "application/pdf" | "application/vnd.ms-excel" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" | "application/vnd.openxmlformats-officedocument.wordprocessingml.document" | "image/jpeg" | "image/png" | "text/csv" | "video/mp4" | "video/quicktime" | "application/msword";
793
827
  export type ArtaDocumentType = "bill_of_lading" | "certificate_of_insurance" | "certificate_of_insurance_template" | "condition_report" | "condition_check" | "image" | "instructions" | "airway_bill" | "commercial_invoice" | "power_of_attorney" | "proof_of_export" | "proof_of_delivery" | "quote" | "shipping_label" | "other";
828
+ export type ParcelTransportServices = "economy" | "economy_freight" | "ground" | "next_day_air" | "priority" | "priority_freight" | "second_day_air" | "standard";
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artaio/node-api",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "The Arta Node library provides a seamless integration to Arta API for backend applications using both Typescript or Javascript.",
5
5
  "scripts": {
6
6
  "build": "npm run build:types && tsc -p tsconfig-build.json",
@@ -47,7 +47,7 @@
47
47
  "eslint-plugin-promise": "^6.1.1",
48
48
  "husky": "^9.0.11",
49
49
  "jest": "^29.7.0",
50
- "nock": "^14.0.0-beta.5",
50
+ "nock": "^14.0.1",
51
51
  "pinst": "^3.0.0",
52
52
  "prettier": "3.0.3",
53
53
  "ts-jest": "^29.1.1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artaio/node-api",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "The Arta Node library provides a seamless integration to Arta API for backend applications using both Typescript or Javascript.",
5
5
  "scripts": {
6
6
  "build": "npm run build:types && tsc -p tsconfig-build.json",
@@ -47,7 +47,7 @@
47
47
  "eslint-plugin-promise": "^6.1.1",
48
48
  "husky": "^9.0.11",
49
49
  "jest": "^29.7.0",
50
- "nock": "^14.0.0-beta.5",
50
+ "nock": "^14.0.1",
51
51
  "pinst": "^3.0.0",
52
52
  "prettier": "3.0.3",
53
53
  "ts-jest": "^29.1.1",