@shipengine/js-api 1.24.0 → 1.26.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.
@@ -1,3 +1,4 @@
1
+ export type AddressResidentialIndicator = "yes" | "no" | "unknown";
1
2
  /**
2
3
  * @category Entities
3
4
  */
@@ -5,7 +6,7 @@ export interface Address {
5
6
  addressLine1: string;
6
7
  addressLine2?: string;
7
8
  addressLine3?: string;
8
- addressResidentialIndicator?: "yes" | "no" | "unknown";
9
+ addressResidentialIndicator?: AddressResidentialIndicator;
9
10
  cityLocality: string;
10
11
  companyName?: string;
11
12
  countryCode: string;
@@ -81,7 +82,7 @@ export interface AddressExtraction {
81
82
  type: "postal_code";
82
83
  } | {
83
84
  result: {
84
- value: "yes" | "no" | "unknown";
85
+ value: AddressResidentialIndicator;
85
86
  };
86
87
  type: "residential_indicator";
87
88
  } | {
@@ -1,5 +1,6 @@
1
1
  import { Address } from "../addresses";
2
2
  import { DimensionsWithUnit } from "../dimensions";
3
+ import { LabelDisplayScheme } from "../labels";
3
4
  import { CreditCard, Money } from "../payments";
4
5
  import { WeightWithUnit } from "../weight";
5
6
  /**
@@ -32,6 +33,7 @@ export interface CarrierAutoFundingSettingsResponse {
32
33
  export interface CarrierService {
33
34
  carrierCode: string;
34
35
  carrierId: string;
36
+ displaySchemes: LabelDisplayScheme[];
35
37
  domestic: boolean;
36
38
  international: boolean;
37
39
  isMultiPackageSupported: boolean;
package/labels/types.d.ts CHANGED
@@ -5,7 +5,7 @@ import { CreationRangeQuery, Download, LinkedResource, PageableQuery, PageableRe
5
5
  import { ShipmentPackage } from "../shipments";
6
6
  import { RateDetail } from "../types";
7
7
  export type LabelChargeEvent = "carrier_default" | "on_creation" | "on_carrier_acceptance";
8
- export type LabelDisplayScheme = "label" | "qr_code" | "label_and_paperless";
8
+ export type LabelDisplayScheme = "label" | "paperless" | "qr_code" | "label_and_paperless";
9
9
  export type LabelFormat = "pdf" | "png" | "zpl";
10
10
  export type LabelLayout = "4x6" | "letter";
11
11
  export type LabelStatus = "processing" | "completed" | "error" | "voided";
@@ -106,7 +106,7 @@ export interface CreateLabelOptions {
106
106
  /**
107
107
  * `displayScheme` is an optional string to control the display scheme of the label.
108
108
  */
109
- displayScheme?: string;
109
+ displayScheme?: LabelDisplayScheme;
110
110
  /**
111
111
  * `labelDownloadType` is an optional string to control the download type of the label.
112
112
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipengine/js-api",
3
- "version": "1.24.0",
3
+ "version": "1.26.0",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {
package/rates/types.d.ts CHANGED
@@ -1,6 +1,8 @@
1
+ import { AddressResidentialIndicator } from "../addresses";
1
2
  import { DimensionsWithUnit } from "../dimensions";
2
3
  import { CodedError } from "../errors";
3
4
  import { Currency, Money } from "../payments";
5
+ import { ConfirmationType } from "../shipments";
4
6
  import { WeightWithUnit } from "../weight";
5
7
  export type RateType = "check" | "shipment";
6
8
  export type RateDetailType = "uncategorized" | "shipping" | "insurance" | "confirmation" | "discount" | "fuel_charge" | "additional_fees" | "tariff" | "tax" | "delivery" | "handling" | "special_goods" | "pickup" | "location_fee" | "oversize" | "returns" | "notifications" | "tip" | "duties_and_taxes" | "brokerage_fee" | "admin_fee" | "adjustment";
@@ -81,9 +83,9 @@ export interface CalculateRatesOptions {
81
83
  serviceCodes?: string[];
82
84
  }
83
85
  export interface RatesEstimateParams {
84
- addressResidentialIndicator: string;
86
+ addressResidentialIndicator: AddressResidentialIndicator;
85
87
  carrierIds: string[];
86
- confirmation: string;
88
+ confirmation: ConfirmationType;
87
89
  dimensions: DimensionsWithUnit;
88
90
  fromCityLocality: string;
89
91
  fromCountryCode: string;