@shipengine/js-api 0.49.0 → 0.50.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/client.d.ts CHANGED
@@ -14,6 +14,7 @@ import { SalesOrderShipmentsAPI } from "./sales-order-shipments";
14
14
  import { SalesOrdersAPI } from "./sales-orders";
15
15
  import { ShipmentsAPI } from "./shipments";
16
16
  import { ShippingRulesAPI } from "./shipping-rules";
17
+ import { ThemesAPI } from "./themes";
17
18
  import { WarehousesAPI } from "./warehouses";
18
19
  /**
19
20
  * # ShipEngine API Client Headers
@@ -145,6 +146,12 @@ export declare class ShipEngineAPI {
145
146
  * @see {@link ShipmentsAPI | The Shipments API module}
146
147
  */
147
148
  get shipments(): ShipmentsAPI;
149
+ /**
150
+ * The `themes` method provides access to the Themes endpoints in ShipEngine API.
151
+ *
152
+ * @see {@link ThemesAPI | The Themes API module}
153
+ */
154
+ get themes(): ThemesAPI;
148
155
  /**
149
156
  * The `warehouses` method provides access to the Warehouses endpoints in ShipEngine
150
157
  * API. e.g. List Warehouses, Get Warehouse, etc.
@@ -15,6 +15,7 @@ export type CreateFundingSource = {
15
15
  };
16
16
  export type FundingSource = {
17
17
  currencyCode: string;
18
+ defaultCarrierId: string;
18
19
  fundingSourceId: string;
19
20
  paymentMethod: {
20
21
  creditCardInfo: AbbreviatedCreditCardInfo | null;
package/index.d.ts CHANGED
@@ -20,6 +20,7 @@ export * from "./sales-orders";
20
20
  export * from "./shipments";
21
21
  export * from "./shipping-rules";
22
22
  export * from "./utilities";
23
+ export * from "./themes";
23
24
  export * from "./warehouses";
24
25
  export * from "./weight";
25
26
  export * from "./zones";
package/index.js CHANGED
@@ -3789,6 +3789,19 @@ class ShippingRulesAPI {
3789
3789
  }
3790
3790
  }
3791
3791
 
3792
+ class ThemesAPI {
3793
+ constructor(client) {
3794
+ this.client = client;
3795
+ /**
3796
+ * The `get` method retrieves a specific theme by `themeId`.
3797
+ */
3798
+ this.get = (themeId) => {
3799
+ return this.client.get(`/v1/themes/${themeId}`);
3800
+ };
3801
+ this.client = client;
3802
+ }
3803
+ }
3804
+
3792
3805
  class WarehousesAPI {
3793
3806
  constructor(client) {
3794
3807
  this.client = client;
@@ -4107,6 +4120,14 @@ class ShipEngineAPI {
4107
4120
  get shipments() {
4108
4121
  return new ShipmentsAPI(this.client);
4109
4122
  }
4123
+ /**
4124
+ * The `themes` method provides access to the Themes endpoints in ShipEngine API.
4125
+ *
4126
+ * @see {@link ThemesAPI | The Themes API module}
4127
+ */
4128
+ get themes() {
4129
+ return new ThemesAPI(this.client);
4130
+ }
4110
4131
  /**
4111
4132
  * The `warehouses` method provides access to the Warehouses endpoints in ShipEngine
4112
4133
  * API. e.g. List Warehouses, Get Warehouse, etc.
@@ -4154,6 +4175,7 @@ exports.SalesOrdersAPI = SalesOrdersAPI;
4154
4175
  exports.ShipEngineAPI = ShipEngineAPI;
4155
4176
  exports.ShipmentsAPI = ShipmentsAPI;
4156
4177
  exports.ShippingRulesAPI = ShippingRulesAPI;
4178
+ exports.ThemesAPI = ThemesAPI;
4157
4179
  exports.WarehousesAPI = WarehousesAPI;
4158
4180
  exports.getEndUserIpAddress = getEndUserIpAddress;
4159
4181
  exports.isCodedError = isCodedError;
package/index.mjs CHANGED
@@ -3785,6 +3785,19 @@ class ShippingRulesAPI {
3785
3785
  }
3786
3786
  }
3787
3787
 
3788
+ class ThemesAPI {
3789
+ constructor(client) {
3790
+ this.client = client;
3791
+ /**
3792
+ * The `get` method retrieves a specific theme by `themeId`.
3793
+ */
3794
+ this.get = (themeId) => {
3795
+ return this.client.get(`/v1/themes/${themeId}`);
3796
+ };
3797
+ this.client = client;
3798
+ }
3799
+ }
3800
+
3788
3801
  class WarehousesAPI {
3789
3802
  constructor(client) {
3790
3803
  this.client = client;
@@ -4103,6 +4116,14 @@ class ShipEngineAPI {
4103
4116
  get shipments() {
4104
4117
  return new ShipmentsAPI(this.client);
4105
4118
  }
4119
+ /**
4120
+ * The `themes` method provides access to the Themes endpoints in ShipEngine API.
4121
+ *
4122
+ * @see {@link ThemesAPI | The Themes API module}
4123
+ */
4124
+ get themes() {
4125
+ return new ThemesAPI(this.client);
4126
+ }
4106
4127
  /**
4107
4128
  * The `warehouses` method provides access to the Warehouses endpoints in ShipEngine
4108
4129
  * API. e.g. List Warehouses, Get Warehouse, etc.
@@ -4123,4 +4144,4 @@ class ShipEngineAPI {
4123
4144
  }
4124
4145
  }
4125
4146
 
4126
- export { AccountSettingsAPI, AddressesAPI, CarriersAPI, CodedError, ConfirmationType, CreditCardVendor, Currency, CustomPackagesAPI, CustomsContentsType, CustomsNonDeliveryType, FundingSourcesAPI, InsuranceAPI, InsuranceProviderType, LabelsAPI, MetadataCapability, MetadataRequirement, MetadataSatisfyingFormTypes, OrderSourcesAPI, RateCardStatus, RateCardsAPI, RatesAPI, types as SE, SalesOrderShipmentsAPI, SalesOrdersAPI, ShipEngineAPI, ShipmentsAPI, ShippingRulesAPI, WarehousesAPI, getEndUserIpAddress, isCodedError, isCodedErrors };
4147
+ export { AccountSettingsAPI, AddressesAPI, CarriersAPI, CodedError, ConfirmationType, CreditCardVendor, Currency, CustomPackagesAPI, CustomsContentsType, CustomsNonDeliveryType, FundingSourcesAPI, InsuranceAPI, InsuranceProviderType, LabelsAPI, MetadataCapability, MetadataRequirement, MetadataSatisfyingFormTypes, OrderSourcesAPI, RateCardStatus, RateCardsAPI, RatesAPI, types as SE, SalesOrderShipmentsAPI, SalesOrdersAPI, ShipEngineAPI, ShipmentsAPI, ShippingRulesAPI, ThemesAPI, WarehousesAPI, getEndUserIpAddress, isCodedError, isCodedErrors };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipengine/js-api",
3
- "version": "0.49.0",
3
+ "version": "0.50.0",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {
@@ -0,0 +1,13 @@
1
+ import { AxiosInstance } from "axios";
2
+ import { PartnerTheme } from "./types";
3
+ /**
4
+ * # Themes API module - /v1/themes
5
+ */
6
+ export declare class ThemesAPI {
7
+ private client;
8
+ constructor(client: AxiosInstance);
9
+ /**
10
+ * The `get` method retrieves a specific theme by `themeId`.
11
+ */
12
+ get: (themeId: string) => Promise<import("axios").AxiosResponse<PartnerTheme, any>>;
13
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./api";
2
+ export * from "./types";
@@ -0,0 +1,21 @@
1
+ export type PartnerThemeLogo = {
2
+ contentType: "image/jpeg" | "image/png";
3
+ imageData: string;
4
+ };
5
+ export type PartnerThemeOnboarding = {
6
+ completeButtonText?: string;
7
+ completeText?: string;
8
+ completeTitle?: string;
9
+ startText?: string;
10
+ startTitle?: string;
11
+ };
12
+ export type PartnerTheme = {
13
+ brand: string;
14
+ createdAt: string;
15
+ logo?: PartnerThemeLogo;
16
+ modifiedAt: string;
17
+ name: string;
18
+ onboarding?: PartnerThemeOnboarding;
19
+ returnUrl?: string;
20
+ themeId: string;
21
+ };
package/types.d.ts CHANGED
@@ -19,6 +19,7 @@ export * from "./sales-order-shipments/types";
19
19
  export * from "./sales-orders/types";
20
20
  export * from "./shipments/types";
21
21
  export * from "./shipping-rules/types";
22
+ export * from "./themes/types";
22
23
  export * from "./warehouses/types";
23
24
  export * from "./weight/types";
24
25
  export * from "./weight-band/types";