@shipengine/js-api 0.40.0 → 0.40.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipengine/js-api",
3
- "version": "0.40.0",
3
+ "version": "0.40.1",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {
@@ -1,6 +1,5 @@
1
1
  import { AxiosInstance } from "axios";
2
- import { RequiredFields } from "../types";
3
- import { ShippingRule } from "./types";
2
+ import { ShippingRule, ShippingRuleInput } from "./types";
4
3
  /**
5
4
  * # Shipping Rules API module - /v1/shipping_rules
6
5
  */
@@ -16,5 +15,5 @@ export declare class ShippingRulesAPI {
16
15
  /**
17
16
  * The `create` method creates a new shipping rule for a given user.
18
17
  */
19
- create: (shippingRule: ShippingRule) => Promise<import("axios").AxiosResponse<RequiredFields<ShippingRule, "id">, any>>;
18
+ create: (shippingRule: ShippingRuleInput) => Promise<import("axios").AxiosResponse<ShippingRule, any>>;
20
19
  }
@@ -35,7 +35,7 @@ export interface ShippingRule {
35
35
  };
36
36
  deleted?: boolean;
37
37
  deletedAt?: ISOString;
38
- id?: string;
38
+ id: string;
39
39
  name: string;
40
40
  rules?: [
41
41
  {
@@ -47,4 +47,8 @@ export interface ShippingRule {
47
47
  ];
48
48
  updatedAt?: ISOString;
49
49
  }
50
+ /**
51
+ * @category Entities
52
+ */
53
+ export type ShippingRuleInput = Omit<ShippingRule, "id">;
50
54
  export {};