@shipengine/js-api 0.27.0 → 0.28.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.
@@ -53,7 +53,7 @@ export interface CarrierPackage {
53
53
  */
54
54
  export interface PackageRatingType {
55
55
  apiCode?: string;
56
- carrierPackageTypeCode?: string;
56
+ carrierPackageTypeCode: string;
57
57
  description: string;
58
58
  dimensions: DimensionsWithUnit;
59
59
  maxWeight: WeightWithUnit;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipengine/js-api",
3
- "version": "0.27.0",
3
+ "version": "0.28.0",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {
@@ -1,4 +1,4 @@
1
- import { CarrierRatePackageFormat, CarrierService } from "../carriers";
1
+ import { CarrierService, PackageRatingType } from "../carriers";
2
2
  import { Currency } from "../payments";
3
3
  import { ISOString } from "../resources";
4
4
  import { WeightBandIncremental, WeightBandMinMax } from "../weight-band";
@@ -23,32 +23,32 @@ export interface RateSurcharge {
23
23
  * @category Entities
24
24
  */
25
25
  export type RateService = Pick<CarrierService, "serviceCode" | "name"> & {
26
- packageTypes?: RatePackageType[];
27
26
  surcharges?: RateSurcharge[];
27
+ zones?: RateZone[];
28
28
  };
29
29
  /**
30
30
  * @category Entities
31
31
  */
32
- export type ZoneWithRate = Zone & {
33
- rate?: number;
32
+ export type RateZone = Zone & {
33
+ packageTypes?: RatePackageType[];
34
34
  surcharges?: RateSurcharge[];
35
35
  };
36
36
  /**
37
37
  * @category Entities
38
38
  */
39
39
  export type RateWeightBandMinMax = WeightBandMinMax & {
40
- zones?: ZoneWithRate[];
40
+ rate?: number;
41
41
  };
42
42
  /**
43
43
  * @category Entities
44
44
  */
45
45
  export type RateWeightBandIncremental = WeightBandIncremental & {
46
- zones?: ZoneWithRate[];
46
+ rate?: number;
47
47
  };
48
48
  /**
49
49
  * @category Entities
50
50
  */
51
- export type RatePackageType = Pick<CarrierRatePackageFormat, "packageId" | "name" | "description" | "dimensions" | "maxWeight"> & {
51
+ export type RatePackageType = Pick<PackageRatingType, "packageId" | "name" | "description" | "dimensions" | "maxWeight" | "carrierPackageTypeCode"> & {
52
52
  weightBands?: {
53
53
  incrementalBands?: RateWeightBandIncremental[];
54
54
  minMaxBands?: RateWeightBandMinMax[];
package/zones/types.d.ts CHANGED
@@ -4,5 +4,4 @@
4
4
  export type Zone = {
5
5
  name: string;
6
6
  zoneCode: string;
7
- zoneId: string;
8
7
  };