@shipengine/js-api 0.48.4 → 0.49.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipengine/js-api",
3
- "version": "0.48.4",
3
+ "version": "0.49.0",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {
@@ -1,4 +1,6 @@
1
+ import { DimensionUnit } from "../dimensions";
1
2
  import { ISOString } from "../resources";
3
+ import { WeightUnit } from "../weight";
2
4
  /**
3
5
  * @category Entities
4
6
  */
@@ -15,6 +17,10 @@ export type RuleValueType = "STRING" | "LIST" | "INTEGER" | "DECIMAL";
15
17
  * @category Entities
16
18
  */
17
19
  export type RuleValueField = "SELECT" | "MULTISELECT" | "FIELD";
20
+ /**
21
+ * @category Entities
22
+ */
23
+ export type RuleValueUnit = DimensionUnit | WeightUnit;
18
24
  /**
19
25
  * @category Entities
20
26
  */
@@ -22,6 +28,7 @@ export interface ShippingRulesConditions {
22
28
  identifier: RuleIdentifier;
23
29
  operation: RuleOperation;
24
30
  value: string;
31
+ valueUnit?: RuleValueUnit;
25
32
  }
26
33
  /**
27
34
  * @category Entities
@@ -63,7 +70,7 @@ export type ShippingRuleInput = Omit<ShippingRule, "shippingRuleId">;
63
70
  export interface RuleConditionsOptions {
64
71
  identifier: RuleIdentifier;
65
72
  operations: RuleOperation[];
66
- unitOptions?: string[];
73
+ unitOptions?: RuleValueUnit[];
67
74
  valueField: RuleValueField;
68
75
  valueOptions?: string[];
69
76
  valueType: RuleValueType;