@artaio/node-api 1.3.1 → 1.4.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.
@@ -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[];
@@ -30,6 +30,7 @@ type GenericMetadata = Pick<BaseMetadata<string>, 'id' | 'name'>;
30
30
  export type InsurancesMetadata = BaseMetadata<Insurance>;
31
31
  export type LocationAccessRestrictionMetadata = BaseMetadata<AccessRestriction>;
32
32
  export type ObjectMaterialsMetadata = BaseMetadata<ObjectMaterial>;
33
+ export type QuotingStrategyMetadata = BaseMetadata<QuotingStrategy>;
33
34
  export interface ObjectMetadata extends BaseMetadata<ObjectType> {
34
35
  subtypes: BaseMetadata<ObjectSubType>[];
35
36
  }
@@ -67,6 +68,7 @@ export declare class MetadataEndpoint {
67
68
  parcelTransportServices(auth?: string): Promise<ParcelTransportServicesMetadata[]>;
68
69
  paymentProcessTypes(auth?: string): Promise<PaymentProcessTypeMetadata[]>;
69
70
  quotes(auth?: string): Promise<QuotesMetadata[]>;
71
+ quotingStrategies(auth?: string): Promise<QuotingStrategyMetadata[]>;
70
72
  referenceRateProviders(auth?: string): Promise<GenericMetadata[]>;
71
73
  referenceRateServiceLevels(auth?: string): Promise<GenericMetadata[]>;
72
74
  requestStatuses(auth?: string): Promise<RequestStatusesMetadata[]>;
@@ -42,6 +42,9 @@ 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
+ };
45
48
  MetadataEndpoint.prototype.referenceRateProviders = function (auth) {
46
49
  return this.artaClient.get("".concat(this.path, "/reference_rate_providers"), auth);
47
50
  };
@@ -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
  }
@@ -25,8 +26,12 @@ export interface QuoteRequestCreate {
25
26
  request: QuoteRequestCreateBody;
26
27
  }
27
28
  export interface UpdateRequestsContactsBody {
28
- origin?: Nullable<Contact[]>;
29
- destination?: Nullable<Contact[]>;
29
+ origin?: {
30
+ contacts: Array<Partial<Contact>>;
31
+ };
32
+ destination?: {
33
+ contacts: Array<Partial<Contact>>;
34
+ };
30
35
  }
31
36
  export interface CustomQuotePayload {
32
37
  note: string;
@@ -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;
@@ -316,6 +318,16 @@ export type Shipment = {
316
318
  tracking?: ({
317
319
  carrier_name: string;
318
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;
319
331
  package_id: number;
320
332
  tracking_number: string;
321
333
  url: string;
@@ -406,6 +418,7 @@ export type HostedSession = {
406
418
  estimated_region?: string | undefined;
407
419
  estimated_city?: string | undefined;
408
420
  };
421
+ preferred_parcel_transport_services?: (("economy" | "economy_freight" | "ground" | "next_day_air" | "priority" | "priority_freight" | "second_day_air" | "standard")[] | null) | undefined;
409
422
  preferred_quote_types?: (("parcel" | "premium" | "select" | "self_ship")[] | null) | undefined;
410
423
  public_reference?: (string | null) | undefined;
411
424
  shipping_notes?: (string | null) | undefined;
@@ -679,6 +692,16 @@ export type ShipmentSchedule = {
679
692
  export type ShipmentTracking = {
680
693
  carrier_name: string;
681
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;
682
705
  package_id: number;
683
706
  tracking_number: string;
684
707
  url: string;
@@ -729,6 +752,7 @@ export type Quote = {
729
752
  total: number;
730
753
  total_currency: "CAD" | "CHF" | "EUR" | "GBP" | "HKD" | "USD";
731
754
  };
755
+ export type QuotingStrategy = "best_rate" | "compare_carriers";
732
756
  export type QuoteRequestListItem = {
733
757
  updated_at: Date;
734
758
  created_at: Date;
@@ -782,6 +806,7 @@ export type QuoteRequestListItem = {
782
806
  };
783
807
  public_reference?: (string | null) | undefined;
784
808
  quote_types: ("parcel" | "premium" | "select" | "self_ship")[];
809
+ quoting_strategy: "best_rate" | "compare_carriers";
785
810
  shortcode: string;
786
811
  status: "cancelled" | "closed" | "disqualified" | "expired" | "in_progress" | "pending" | "quoted";
787
812
  tags: {
@@ -800,3 +825,4 @@ export type EmailNotificationId = "booking" | "cancelled" | "collected" | "colle
800
825
  export type Recipient = "payer" | "origin" | "destination";
801
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";
802
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.1",
3
+ "version": "1.4.1",
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",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artaio/node-api",
3
- "version": "1.3.1",
3
+ "version": "1.4.1",
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",