@shipengine/js-api 0.12.0 → 0.13.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.
@@ -1,11 +1,11 @@
1
1
  import { AxiosInstance } from "axios";
2
- import { BillingInfo, CarrierRegistration, CarrierRegistrationResponse, CreateFundingSourceResponse, CreditCardInfo, FundingSource, ListFundingSourcesResponse } from "./types";
2
+ import { CarrierRegistration, CarrierRegistrationResponse, CreateFundingSourceResponse, CreditCardInfo, FundingSource, FundingSourceAddress, ListFundingSourcesResponse } from "./types";
3
3
  export declare class FundingSourcesAPI {
4
4
  private client;
5
5
  constructor(client: AxiosInstance);
6
6
  list: () => Promise<import("axios").AxiosResponse<ListFundingSourcesResponse, any>>;
7
7
  get: (fundingSourceId: string) => Promise<import("axios").AxiosResponse<FundingSource, any>>;
8
8
  create: (fundingSource: FundingSource) => Promise<import("axios").AxiosResponse<CreateFundingSourceResponse, any>>;
9
- update: (billingInfo: BillingInfo, creditCardInfo: CreditCardInfo, fundingSourceId: string) => Promise<import("axios").AxiosResponse<CreateFundingSourceResponse, any>>;
9
+ update: (billingInfo: FundingSourceAddress, creditCardInfo: CreditCardInfo, fundingSourceId: string) => Promise<import("axios").AxiosResponse<CreateFundingSourceResponse, any>>;
10
10
  registerCarrier: (carrier: CarrierRegistration) => Promise<import("axios").AxiosResponse<CarrierRegistrationResponse, any>>;
11
11
  }
@@ -2,7 +2,7 @@ import { CreditCardVendor } from "../payments";
2
2
  export type FundingSource = {
3
3
  acceptedTerms: Term[];
4
4
  agreeToTerms: boolean;
5
- billingInfo: BillingInfo;
5
+ billingInfo: FundingSourceAddress;
6
6
  paymentMethod: PaymentMethod;
7
7
  };
8
8
  export interface CarrierRegistration {
@@ -12,10 +12,11 @@ export interface CarrierRegistration {
12
12
  agreeToTerms: boolean;
13
13
  carrierCode: "stamps_com" | "ups_walleted" | "dhl_express_worldwide";
14
14
  fundingSourceId: string;
15
+ pickupAddress?: FundingSourceAddress;
15
16
  }
16
17
  ];
17
18
  }
18
- export interface BillingInfo {
19
+ export interface FundingSourceAddress {
19
20
  addressLine1: string;
20
21
  addressLine2?: string;
21
22
  cityLocality: string;
@@ -55,7 +56,7 @@ export interface CarrierRegistrationResponse {
55
56
  }
56
57
  export interface CreateFundingSourceResponse {
57
58
  fundingSource: {
58
- billingInfo: BillingInfo;
59
+ billingInfo: FundingSourceAddress;
59
60
  currencyCode: string;
60
61
  fundingSourceId: string;
61
62
  PaymentMethod: PaymentMethod | {
@@ -66,7 +67,7 @@ export interface CreateFundingSourceResponse {
66
67
  export interface ListFundingSourcesResponse {
67
68
  fundingSources: [
68
69
  {
69
- billingInfo: BillingInfo;
70
+ billingInfo: FundingSourceAddress;
70
71
  currencyCode: string;
71
72
  fundingSourceId: string;
72
73
  paymentMethod: PaymentMethod | {
package/index.js CHANGED
@@ -2,17 +2,17 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
- var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
6
- var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
7
- var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
5
+ var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
6
+ var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
7
+ var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
8
8
  var __objRest$1 = (source, exclude) => {
9
9
  var target = {};
10
10
  for (var prop in source)
11
- if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)
11
+ if (__hasOwnProp$3.call(source, prop) && exclude.indexOf(prop) < 0)
12
12
  target[prop] = source[prop];
13
- if (source != null && __getOwnPropSymbols$4)
14
- for (var prop of __getOwnPropSymbols$4(source)) {
15
- if (exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop))
13
+ if (source != null && __getOwnPropSymbols$3)
14
+ for (var prop of __getOwnPropSymbols$3(source)) {
15
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$3.call(source, prop))
16
16
  target[prop] = source[prop];
17
17
  }
18
18
  return target;
@@ -2822,21 +2822,21 @@ const getEndUserIpAddress = () => __async$4(void 0, null, function* () {
2822
2822
  }
2823
2823
  });
2824
2824
 
2825
- var __defProp$3 = Object.defineProperty;
2825
+ var __defProp$2 = Object.defineProperty;
2826
2826
  var __defProps$1 = Object.defineProperties;
2827
2827
  var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
2828
- var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
2829
- var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
2830
- var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
2831
- var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2832
- var __spreadValues$3 = (a, b) => {
2828
+ var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
2829
+ var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
2830
+ var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
2831
+ var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2832
+ var __spreadValues$2 = (a, b) => {
2833
2833
  for (var prop in b || (b = {}))
2834
- if (__hasOwnProp$3.call(b, prop))
2835
- __defNormalProp$3(a, prop, b[prop]);
2836
- if (__getOwnPropSymbols$3)
2837
- for (var prop of __getOwnPropSymbols$3(b)) {
2838
- if (__propIsEnum$3.call(b, prop))
2839
- __defNormalProp$3(a, prop, b[prop]);
2834
+ if (__hasOwnProp$2.call(b, prop))
2835
+ __defNormalProp$2(a, prop, b[prop]);
2836
+ if (__getOwnPropSymbols$2)
2837
+ for (var prop of __getOwnPropSymbols$2(b)) {
2838
+ if (__propIsEnum$2.call(b, prop))
2839
+ __defNormalProp$2(a, prop, b[prop]);
2840
2840
  }
2841
2841
  return a;
2842
2842
  };
@@ -2844,11 +2844,11 @@ var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
2844
2844
  var __objRest = (source, exclude) => {
2845
2845
  var target = {};
2846
2846
  for (var prop in source)
2847
- if (__hasOwnProp$3.call(source, prop) && exclude.indexOf(prop) < 0)
2847
+ if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)
2848
2848
  target[prop] = source[prop];
2849
- if (source != null && __getOwnPropSymbols$3)
2850
- for (var prop of __getOwnPropSymbols$3(source)) {
2851
- if (exclude.indexOf(prop) < 0 && __propIsEnum$3.call(source, prop))
2849
+ if (source != null && __getOwnPropSymbols$2)
2850
+ for (var prop of __getOwnPropSymbols$2(source)) {
2851
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop))
2852
2852
  target[prop] = source[prop];
2853
2853
  }
2854
2854
  return target;
@@ -2887,7 +2887,7 @@ class CarriersAPI {
2887
2887
  const endUserIpAddress = yield getEndUserIpAddress();
2888
2888
  if (!endUserIpAddress)
2889
2889
  return Promise.reject([new CodedError("Unable to get IP address")]);
2890
- return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$1(__spreadValues$3({}, connection), {
2890
+ return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$1(__spreadValues$2({}, connection), {
2891
2891
  endUserIpAddress
2892
2892
  }));
2893
2893
  });
@@ -5105,19 +5105,19 @@ class CustomPackagesAPI {
5105
5105
  }
5106
5106
  }
5107
5107
 
5108
- var __defProp$2 = Object.defineProperty;
5109
- var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
5110
- var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
5111
- var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
5112
- var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5113
- var __spreadValues$2 = (a, b) => {
5108
+ var __defProp$1 = Object.defineProperty;
5109
+ var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
5110
+ var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
5111
+ var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
5112
+ var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5113
+ var __spreadValues$1 = (a, b) => {
5114
5114
  for (var prop in b || (b = {}))
5115
- if (__hasOwnProp$2.call(b, prop))
5116
- __defNormalProp$2(a, prop, b[prop]);
5117
- if (__getOwnPropSymbols$2)
5118
- for (var prop of __getOwnPropSymbols$2(b)) {
5119
- if (__propIsEnum$2.call(b, prop))
5120
- __defNormalProp$2(a, prop, b[prop]);
5115
+ if (__hasOwnProp$1.call(b, prop))
5116
+ __defNormalProp$1(a, prop, b[prop]);
5117
+ if (__getOwnPropSymbols$1)
5118
+ for (var prop of __getOwnPropSymbols$1(b)) {
5119
+ if (__propIsEnum$1.call(b, prop))
5120
+ __defNormalProp$1(a, prop, b[prop]);
5121
5121
  }
5122
5122
  return a;
5123
5123
  };
@@ -5154,7 +5154,7 @@ class FundingSourcesAPI {
5154
5154
  const endUserIpAddress = yield getEndUserIpAddress();
5155
5155
  if (!endUserIpAddress)
5156
5156
  return Promise.reject([new CodedError("Unable to get IP address")]);
5157
- return yield this.client.post("/v1/funding_sources", __spreadValues$2({
5157
+ return yield this.client.post("/v1/funding_sources", __spreadValues$1({
5158
5158
  endUserIpAddress
5159
5159
  }, fundingSource));
5160
5160
  });
@@ -5171,7 +5171,7 @@ class FundingSourcesAPI {
5171
5171
  const endUserIpAddress = yield getEndUserIpAddress();
5172
5172
  if (!endUserIpAddress)
5173
5173
  return Promise.reject([new CodedError("Unable to get IP address")]);
5174
- return yield this.client.post("/v1/registration/funding_source", __spreadValues$2({
5174
+ return yield this.client.post("/v1/registration/funding_source", __spreadValues$1({
5175
5175
  endUserIpAddress
5176
5176
  }, carrier));
5177
5177
  });
@@ -5275,22 +5275,6 @@ class SalesOrdersAPI {
5275
5275
  }
5276
5276
  }
5277
5277
 
5278
- var __defProp$1 = Object.defineProperty;
5279
- var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
5280
- var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
5281
- var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
5282
- var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5283
- var __spreadValues$1 = (a, b) => {
5284
- for (var prop in b || (b = {}))
5285
- if (__hasOwnProp$1.call(b, prop))
5286
- __defNormalProp$1(a, prop, b[prop]);
5287
- if (__getOwnPropSymbols$1)
5288
- for (var prop of __getOwnPropSymbols$1(b)) {
5289
- if (__propIsEnum$1.call(b, prop))
5290
- __defNormalProp$1(a, prop, b[prop]);
5291
- }
5292
- return a;
5293
- };
5294
5278
  var __async$1 = (__this, __arguments, generator) => {
5295
5279
  return new Promise((resolve, reject) => {
5296
5280
  var fulfilled = (value) => {
@@ -5320,11 +5304,9 @@ class ShipmentsAPI {
5320
5304
  createdAtStart !== void 0 ? { params: { createdAtStart } } : void 0
5321
5305
  );
5322
5306
  };
5323
- this.create = (shipment) => __async$1(this, null, function* () {
5307
+ this.create = (...shipments) => __async$1(this, null, function* () {
5324
5308
  return this.client.post("/v1/shipments", {
5325
- shipments: [
5326
- __spreadValues$1({}, shipment)
5327
- ]
5309
+ shipments
5328
5310
  });
5329
5311
  });
5330
5312
  this.client = client;
package/index.mjs CHANGED
@@ -1,14 +1,14 @@
1
- var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
2
- var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
3
- var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
1
+ var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
2
+ var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
3
+ var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
4
4
  var __objRest$1 = (source, exclude) => {
5
5
  var target = {};
6
6
  for (var prop in source)
7
- if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)
7
+ if (__hasOwnProp$3.call(source, prop) && exclude.indexOf(prop) < 0)
8
8
  target[prop] = source[prop];
9
- if (source != null && __getOwnPropSymbols$4)
10
- for (var prop of __getOwnPropSymbols$4(source)) {
11
- if (exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop))
9
+ if (source != null && __getOwnPropSymbols$3)
10
+ for (var prop of __getOwnPropSymbols$3(source)) {
11
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$3.call(source, prop))
12
12
  target[prop] = source[prop];
13
13
  }
14
14
  return target;
@@ -2818,21 +2818,21 @@ const getEndUserIpAddress = () => __async$4(void 0, null, function* () {
2818
2818
  }
2819
2819
  });
2820
2820
 
2821
- var __defProp$3 = Object.defineProperty;
2821
+ var __defProp$2 = Object.defineProperty;
2822
2822
  var __defProps$1 = Object.defineProperties;
2823
2823
  var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
2824
- var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
2825
- var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
2826
- var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
2827
- var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2828
- var __spreadValues$3 = (a, b) => {
2824
+ var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
2825
+ var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
2826
+ var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
2827
+ var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2828
+ var __spreadValues$2 = (a, b) => {
2829
2829
  for (var prop in b || (b = {}))
2830
- if (__hasOwnProp$3.call(b, prop))
2831
- __defNormalProp$3(a, prop, b[prop]);
2832
- if (__getOwnPropSymbols$3)
2833
- for (var prop of __getOwnPropSymbols$3(b)) {
2834
- if (__propIsEnum$3.call(b, prop))
2835
- __defNormalProp$3(a, prop, b[prop]);
2830
+ if (__hasOwnProp$2.call(b, prop))
2831
+ __defNormalProp$2(a, prop, b[prop]);
2832
+ if (__getOwnPropSymbols$2)
2833
+ for (var prop of __getOwnPropSymbols$2(b)) {
2834
+ if (__propIsEnum$2.call(b, prop))
2835
+ __defNormalProp$2(a, prop, b[prop]);
2836
2836
  }
2837
2837
  return a;
2838
2838
  };
@@ -2840,11 +2840,11 @@ var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
2840
2840
  var __objRest = (source, exclude) => {
2841
2841
  var target = {};
2842
2842
  for (var prop in source)
2843
- if (__hasOwnProp$3.call(source, prop) && exclude.indexOf(prop) < 0)
2843
+ if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)
2844
2844
  target[prop] = source[prop];
2845
- if (source != null && __getOwnPropSymbols$3)
2846
- for (var prop of __getOwnPropSymbols$3(source)) {
2847
- if (exclude.indexOf(prop) < 0 && __propIsEnum$3.call(source, prop))
2845
+ if (source != null && __getOwnPropSymbols$2)
2846
+ for (var prop of __getOwnPropSymbols$2(source)) {
2847
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop))
2848
2848
  target[prop] = source[prop];
2849
2849
  }
2850
2850
  return target;
@@ -2883,7 +2883,7 @@ class CarriersAPI {
2883
2883
  const endUserIpAddress = yield getEndUserIpAddress();
2884
2884
  if (!endUserIpAddress)
2885
2885
  return Promise.reject([new CodedError("Unable to get IP address")]);
2886
- return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$1(__spreadValues$3({}, connection), {
2886
+ return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$1(__spreadValues$2({}, connection), {
2887
2887
  endUserIpAddress
2888
2888
  }));
2889
2889
  });
@@ -5101,19 +5101,19 @@ class CustomPackagesAPI {
5101
5101
  }
5102
5102
  }
5103
5103
 
5104
- var __defProp$2 = Object.defineProperty;
5105
- var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
5106
- var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
5107
- var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
5108
- var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5109
- var __spreadValues$2 = (a, b) => {
5104
+ var __defProp$1 = Object.defineProperty;
5105
+ var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
5106
+ var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
5107
+ var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
5108
+ var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5109
+ var __spreadValues$1 = (a, b) => {
5110
5110
  for (var prop in b || (b = {}))
5111
- if (__hasOwnProp$2.call(b, prop))
5112
- __defNormalProp$2(a, prop, b[prop]);
5113
- if (__getOwnPropSymbols$2)
5114
- for (var prop of __getOwnPropSymbols$2(b)) {
5115
- if (__propIsEnum$2.call(b, prop))
5116
- __defNormalProp$2(a, prop, b[prop]);
5111
+ if (__hasOwnProp$1.call(b, prop))
5112
+ __defNormalProp$1(a, prop, b[prop]);
5113
+ if (__getOwnPropSymbols$1)
5114
+ for (var prop of __getOwnPropSymbols$1(b)) {
5115
+ if (__propIsEnum$1.call(b, prop))
5116
+ __defNormalProp$1(a, prop, b[prop]);
5117
5117
  }
5118
5118
  return a;
5119
5119
  };
@@ -5150,7 +5150,7 @@ class FundingSourcesAPI {
5150
5150
  const endUserIpAddress = yield getEndUserIpAddress();
5151
5151
  if (!endUserIpAddress)
5152
5152
  return Promise.reject([new CodedError("Unable to get IP address")]);
5153
- return yield this.client.post("/v1/funding_sources", __spreadValues$2({
5153
+ return yield this.client.post("/v1/funding_sources", __spreadValues$1({
5154
5154
  endUserIpAddress
5155
5155
  }, fundingSource));
5156
5156
  });
@@ -5167,7 +5167,7 @@ class FundingSourcesAPI {
5167
5167
  const endUserIpAddress = yield getEndUserIpAddress();
5168
5168
  if (!endUserIpAddress)
5169
5169
  return Promise.reject([new CodedError("Unable to get IP address")]);
5170
- return yield this.client.post("/v1/registration/funding_source", __spreadValues$2({
5170
+ return yield this.client.post("/v1/registration/funding_source", __spreadValues$1({
5171
5171
  endUserIpAddress
5172
5172
  }, carrier));
5173
5173
  });
@@ -5271,22 +5271,6 @@ class SalesOrdersAPI {
5271
5271
  }
5272
5272
  }
5273
5273
 
5274
- var __defProp$1 = Object.defineProperty;
5275
- var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
5276
- var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
5277
- var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
5278
- var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5279
- var __spreadValues$1 = (a, b) => {
5280
- for (var prop in b || (b = {}))
5281
- if (__hasOwnProp$1.call(b, prop))
5282
- __defNormalProp$1(a, prop, b[prop]);
5283
- if (__getOwnPropSymbols$1)
5284
- for (var prop of __getOwnPropSymbols$1(b)) {
5285
- if (__propIsEnum$1.call(b, prop))
5286
- __defNormalProp$1(a, prop, b[prop]);
5287
- }
5288
- return a;
5289
- };
5290
5274
  var __async$1 = (__this, __arguments, generator) => {
5291
5275
  return new Promise((resolve, reject) => {
5292
5276
  var fulfilled = (value) => {
@@ -5316,11 +5300,9 @@ class ShipmentsAPI {
5316
5300
  createdAtStart !== void 0 ? { params: { createdAtStart } } : void 0
5317
5301
  );
5318
5302
  };
5319
- this.create = (shipment) => __async$1(this, null, function* () {
5303
+ this.create = (...shipments) => __async$1(this, null, function* () {
5320
5304
  return this.client.post("/v1/shipments", {
5321
- shipments: [
5322
- __spreadValues$1({}, shipment)
5323
- ]
5305
+ shipments
5324
5306
  });
5325
5307
  });
5326
5308
  this.client = client;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipengine/js-api",
3
- "version": "0.12.0",
3
+ "version": "0.13.1",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {
@@ -12,7 +12,8 @@ export declare class ShipmentsAPI {
12
12
  private client;
13
13
  constructor(client: AxiosInstance);
14
14
  getShipmentRates: ({ shipmentId, createdAtStart }: GetShipmentRatesOptions) => Promise<import("axios").AxiosResponse<ShipmentRateResponse, any>>;
15
- create: (shipment: Partial<Omit<Shipment, "items">>) => Promise<import("axios").AxiosResponse<{
16
- shipments: [Shipment];
15
+ create: (...shipments: Partial<Omit<Shipment, "items">>[]) => Promise<import("axios").AxiosResponse<{
16
+ has_errors: boolean;
17
+ shipments: Shipment[];
17
18
  }, any>>;
18
19
  }