@shipengine/js-api 2.2.0 → 2.3.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/index.js CHANGED
@@ -113,13 +113,13 @@ var CustomsContentsType = /* @__PURE__ */ ((CustomsContentsType2) => {
113
113
  CustomsContentsType2["SAMPLE"] = "sample";
114
114
  return CustomsContentsType2;
115
115
  })(CustomsContentsType || {});
116
- var MovementType = /* @__PURE__ */ ((MovementType2) => {
117
- MovementType2["B2C"] = "b2c";
118
- MovementType2["C2B"] = "c2b";
119
- MovementType2["C2C"] = "c2c";
120
- MovementType2["B2B"] = "b2b";
121
- return MovementType2;
122
- })(MovementType || {});
116
+ var MovementIndicator = /* @__PURE__ */ ((MovementIndicator2) => {
117
+ MovementIndicator2["B2B"] = "b2b";
118
+ MovementIndicator2["B2C"] = "b2c";
119
+ MovementIndicator2["C2B"] = "c2b";
120
+ MovementIndicator2["C2C"] = "c2c";
121
+ return MovementIndicator2;
122
+ })(MovementIndicator || {});
123
123
  var CustomsNonDeliveryType = /* @__PURE__ */ ((CustomsNonDeliveryType2) => {
124
124
  CustomsNonDeliveryType2["RETURN_TO_SENDER"] = "return_to_sender";
125
125
  CustomsNonDeliveryType2["TREAT_AS_ABANDONED"] = "treat_as_abandoned";
@@ -147,7 +147,7 @@ const types = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
147
147
  MetadataCapability,
148
148
  MetadataRequirement,
149
149
  MetadataSatisfyingFormTypes,
150
- MovementType,
150
+ MovementIndicator,
151
151
  RateCardStatus
152
152
  }, Symbol.toStringTag, { value: 'Module' }));
153
153
 
@@ -3669,6 +3669,14 @@ class OrderSourcesAPI {
3669
3669
  this.list = () => {
3670
3670
  return this.client.get("/v-beta/order_sources");
3671
3671
  };
3672
+ /**
3673
+ * The `listConnections` method retrieves the list of available order sources to be connected with.
3674
+ */
3675
+ this.listConnections = () => {
3676
+ return this.client.get(
3677
+ "/v1/connections/order_sources"
3678
+ );
3679
+ };
3672
3680
  /**
3673
3681
  * The `get` method retrieves a specific order source by `orderSourceId`.
3674
3682
  */
@@ -21741,7 +21749,7 @@ exports.LabelsAPI = LabelsAPI;
21741
21749
  exports.MetadataCapability = MetadataCapability;
21742
21750
  exports.MetadataRequirement = MetadataRequirement;
21743
21751
  exports.MetadataSatisfyingFormTypes = MetadataSatisfyingFormTypes;
21744
- exports.MovementType = MovementType;
21752
+ exports.MovementIndicator = MovementIndicator;
21745
21753
  exports.OrderSourcesAPI = OrderSourcesAPI;
21746
21754
  exports.RateCardStatus = RateCardStatus;
21747
21755
  exports.RateCardsAPI = RateCardsAPI;
package/index.mjs CHANGED
@@ -109,13 +109,13 @@ var CustomsContentsType = /* @__PURE__ */ ((CustomsContentsType2) => {
109
109
  CustomsContentsType2["SAMPLE"] = "sample";
110
110
  return CustomsContentsType2;
111
111
  })(CustomsContentsType || {});
112
- var MovementType = /* @__PURE__ */ ((MovementType2) => {
113
- MovementType2["B2C"] = "b2c";
114
- MovementType2["C2B"] = "c2b";
115
- MovementType2["C2C"] = "c2c";
116
- MovementType2["B2B"] = "b2b";
117
- return MovementType2;
118
- })(MovementType || {});
112
+ var MovementIndicator = /* @__PURE__ */ ((MovementIndicator2) => {
113
+ MovementIndicator2["B2B"] = "b2b";
114
+ MovementIndicator2["B2C"] = "b2c";
115
+ MovementIndicator2["C2B"] = "c2b";
116
+ MovementIndicator2["C2C"] = "c2c";
117
+ return MovementIndicator2;
118
+ })(MovementIndicator || {});
119
119
  var CustomsNonDeliveryType = /* @__PURE__ */ ((CustomsNonDeliveryType2) => {
120
120
  CustomsNonDeliveryType2["RETURN_TO_SENDER"] = "return_to_sender";
121
121
  CustomsNonDeliveryType2["TREAT_AS_ABANDONED"] = "treat_as_abandoned";
@@ -143,7 +143,7 @@ const types = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
143
143
  MetadataCapability,
144
144
  MetadataRequirement,
145
145
  MetadataSatisfyingFormTypes,
146
- MovementType,
146
+ MovementIndicator,
147
147
  RateCardStatus
148
148
  }, Symbol.toStringTag, { value: 'Module' }));
149
149
 
@@ -3665,6 +3665,14 @@ class OrderSourcesAPI {
3665
3665
  this.list = () => {
3666
3666
  return this.client.get("/v-beta/order_sources");
3667
3667
  };
3668
+ /**
3669
+ * The `listConnections` method retrieves the list of available order sources to be connected with.
3670
+ */
3671
+ this.listConnections = () => {
3672
+ return this.client.get(
3673
+ "/v1/connections/order_sources"
3674
+ );
3675
+ };
3668
3676
  /**
3669
3677
  * The `get` method retrieves a specific order source by `orderSourceId`.
3670
3678
  */
@@ -21719,4 +21727,4 @@ class ShipEngineAPI {
21719
21727
  }
21720
21728
  }
21721
21729
 
21722
- export { AccountSettingsAPI, AddressesAPI, CarriersAPI, CodedError, ConfirmationType, ConnectionsAPI, CreditCardVendor, Currency, CustomPackagesAPI, CustomsContentsType, CustomsNonDeliveryType, FundingSourcesAPI, InsuranceAPI, InsuranceProviderType, LabelsAPI, MetadataCapability, MetadataRequirement, MetadataSatisfyingFormTypes, MovementType, OrderSourcesAPI, RateCardStatus, RateCardsAPI, RatesAPI, types as SE, SalesOrderShipmentsAPI, SalesOrdersAPI, SellersAPI, ServicePointsAPI, ShipEngineAPI, ShipmentsAPI, ShippingRulesAPI, ThemesAPI, WarehousesAPI, WebhooksAPI, getEndUserIpAddress, isCodedError, isCodedErrors, isDataCodedErrors, isInvalidTokenError, parseError };
21730
+ export { AccountSettingsAPI, AddressesAPI, CarriersAPI, CodedError, ConfirmationType, ConnectionsAPI, CreditCardVendor, Currency, CustomPackagesAPI, CustomsContentsType, CustomsNonDeliveryType, FundingSourcesAPI, InsuranceAPI, InsuranceProviderType, LabelsAPI, MetadataCapability, MetadataRequirement, MetadataSatisfyingFormTypes, MovementIndicator, OrderSourcesAPI, RateCardStatus, RateCardsAPI, RatesAPI, types as SE, SalesOrderShipmentsAPI, SalesOrdersAPI, SellersAPI, ServicePointsAPI, ShipEngineAPI, ShipmentsAPI, ShippingRulesAPI, ThemesAPI, WarehousesAPI, WebhooksAPI, getEndUserIpAddress, isCodedError, isCodedErrors, isDataCodedErrors, isInvalidTokenError, parseError };
@@ -1,5 +1,5 @@
1
1
  import { AxiosInstance } from "axios";
2
- import { OrderSource } from "./types";
2
+ import { OrderSource, OrderSourceConnection } from "./types";
3
3
  /**
4
4
  * # Order Sources API module - /v-beta/order_sources
5
5
  */
@@ -12,6 +12,12 @@ export declare class OrderSourcesAPI {
12
12
  list: () => Promise<import("axios").AxiosResponse<{
13
13
  orderSources: OrderSource[];
14
14
  }, any>>;
15
+ /**
16
+ * The `listConnections` method retrieves the list of available order sources to be connected with.
17
+ */
18
+ listConnections: () => Promise<import("axios").AxiosResponse<{
19
+ connectableOrderSources: OrderSourceConnection[];
20
+ }, any>>;
15
21
  /**
16
22
  * The `get` method retrieves a specific order source by `orderSourceId`.
17
23
  */
@@ -21,3 +21,9 @@ export interface OrderSource {
21
21
  status: OrderSourceStatus;
22
22
  };
23
23
  }
24
+ export interface OrderSourceConnection {
25
+ isLive: boolean;
26
+ orderSourceCode: OrderSourceCode;
27
+ orderSourceFriendlyName: string;
28
+ orderSourceId: number;
29
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipengine/js-api",
3
- "version": "2.2.0",
3
+ "version": "2.3.1",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {
@@ -26,11 +26,11 @@ export declare enum CustomsContentsType {
26
26
  RETURNED_GOODS = "returned_goods",
27
27
  SAMPLE = "sample"
28
28
  }
29
- export declare enum MovementType {
29
+ export declare enum MovementIndicator {
30
+ B2B = "b2b",
30
31
  B2C = "b2c",
31
32
  C2B = "c2b",
32
- C2C = "c2c",
33
- B2B = "b2b"
33
+ C2C = "c2c"
34
34
  }
35
35
  export declare enum CustomsNonDeliveryType {
36
36
  RETURN_TO_SENDER = "return_to_sender",
@@ -160,7 +160,7 @@ export type Customs = {
160
160
  termsOfTradeCode?: CustomsTermsOfTradeCode;
161
161
  };
162
162
  export type WindsorFrameworkDetails = {
163
- movementIndicator: MovementType;
163
+ movementIndicator: MovementIndicator;
164
164
  notAtRisk: boolean;
165
165
  };
166
166
  export interface Shipment {