@shipengine/js-api 4.17.1 → 4.18.2-next.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.
@@ -0,0 +1,17 @@
1
+ import { AxiosInstance } from "axios";
2
+ import { Feature } from "./types";
3
+ /**
4
+ * # Account Features API module - /v1/account/features
5
+ * @docs https://auctane.atlassian.net/wiki/spaces/SEEU/pages/6364332064/Add-ons+New+endpoints+definition
6
+ */
7
+ export declare class AccountFeaturesAPI {
8
+ private client;
9
+ constructor(client: AxiosInstance);
10
+ /**
11
+ * The `list` method retrieves a list of all available features, also includes
12
+ * if its avaiable for the current user
13
+ */
14
+ list: () => Promise<import("axios").AxiosResponse<{
15
+ features: Feature[];
16
+ }, any>>;
17
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./api";
2
+ export * from "./types";
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Feature ID is always a numeric value, to help identify the value (and avoid magic numbers)
3
+ * we will use an enum
4
+ */
5
+ export declare enum FeatureId {
6
+ SSApiAnalytics = 182
7
+ }
8
+ export type Feature = {
9
+ active: boolean;
10
+ featureId: FeatureId;
11
+ isAvailableToConnect: boolean;
12
+ name: string;
13
+ };
@@ -55,22 +55,22 @@ export interface CreateSessionRequest {
55
55
  }
56
56
  export interface UpdatePaymentMethodRequest {
57
57
  /** Billing Address associated with the Payment Method */
58
- billingAddress: {
59
- addressLine1: string;
60
- addressLine2: string;
61
- cityLocality: string;
62
- countryCode: string;
63
- postalCode: string;
64
- stateProvince: string;
58
+ billingAddress?: {
59
+ addressLine1?: string;
60
+ addressLine2?: string;
61
+ cityLocality?: string;
62
+ countryCode?: string;
63
+ postalCode?: string;
64
+ stateProvince?: string;
65
65
  };
66
66
  /** Transaction categories for this Payment Method */
67
- defaultPaymentMethodCategories: AuctanePayTransactionCategory[];
67
+ defaultPaymentMethodCategories?: AuctanePayTransactionCategory[];
68
68
  /** Expiration Date for the Payment Method (Format: MM/YYYY) */
69
- expirationDate: string;
69
+ expirationDate?: string;
70
70
  /** Holder name for the payment method */
71
- holderName: string;
71
+ holderName?: string;
72
72
  /** Nickname used for this Payment Method */
73
- nickname: string;
73
+ nickname?: string;
74
74
  }
75
75
  /**
76
76
  * @category Entities
package/client.d.ts CHANGED
@@ -2,6 +2,7 @@ import { AxiosError, AxiosRequestHeaders } from "axios";
2
2
  import { AccountAddonsAPI } from "./account-addons";
3
3
  import { AccountBillingAPI } from "./account-billing";
4
4
  import { AccountBillingPlanAPI } from "./account-billing-plan";
5
+ import { AccountFeaturesAPI } from "./account-features";
5
6
  import { AccountSettingsAPI } from "./account-settings";
6
7
  import { AddressesAPI } from "./addresses";
7
8
  import { AuctanePayAPI } from "./auctane-pay";
@@ -116,6 +117,11 @@ export declare class ShipEngineAPI {
116
117
  * in ShipEngine API.
117
118
  */
118
119
  get accountAddons(): AccountAddonsAPI;
120
+ /**
121
+ * The `accountFeatures` method provides access to the Account Features endpoints
122
+ * in ShipEngine API.
123
+ */
124
+ get accountFeatures(): AccountFeaturesAPI;
119
125
  /**
120
126
  * The `accountBilling` method provides access to the Account Billing (Recurly) endpoints
121
127
  * in ShipEngine API.
package/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export * as SE from "./types";
2
2
  export * from "./account-settings";
3
3
  export * from "./account-addons";
4
+ export * from "./account-features";
4
5
  export * from "./addresses";
5
6
  export * from "./auctane-pay";
6
7
  export * from "./account-billing-plan";
package/index.js CHANGED
@@ -10,6 +10,11 @@ var AccountBillingPlanChangeType = /* @__PURE__ */ ((AccountBillingPlanChangeTyp
10
10
  return AccountBillingPlanChangeType2;
11
11
  })(AccountBillingPlanChangeType || {});
12
12
 
13
+ var FeatureId = /* @__PURE__ */ ((FeatureId2) => {
14
+ FeatureId2[FeatureId2["SSApiAnalytics"] = 182] = "SSApiAnalytics";
15
+ return FeatureId2;
16
+ })(FeatureId || {});
17
+
13
18
  var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
14
19
  var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
15
20
  var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
@@ -147,6 +152,7 @@ const types = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
147
152
  Currency,
148
153
  CustomsContentsType,
149
154
  CustomsNonDeliveryType,
155
+ FeatureId,
150
156
  InsuranceProviderType,
151
157
  MetadataCapability,
152
158
  MetadataRequirement,
@@ -236,6 +242,20 @@ class AccountAddonsAPI {
236
242
  }
237
243
  }
238
244
 
245
+ class AccountFeaturesAPI {
246
+ constructor(client) {
247
+ this.client = client;
248
+ /**
249
+ * The `list` method retrieves a list of all available features, also includes
250
+ * if its avaiable for the current user
251
+ */
252
+ this.list = () => {
253
+ return this.client.get("/v1/account/features");
254
+ };
255
+ this.client = client;
256
+ }
257
+ }
258
+
239
259
  class AddressesAPI {
240
260
  constructor(client) {
241
261
  this.client = client;
@@ -21936,6 +21956,13 @@ class ShipEngineAPI {
21936
21956
  get accountAddons() {
21937
21957
  return new AccountAddonsAPI(this.client);
21938
21958
  }
21959
+ /**
21960
+ * The `accountFeatures` method provides access to the Account Features endpoints
21961
+ * in ShipEngine API.
21962
+ */
21963
+ get accountFeatures() {
21964
+ return new AccountFeaturesAPI(this.client);
21965
+ }
21939
21966
  /**
21940
21967
  * The `accountBilling` method provides access to the Account Billing (Recurly) endpoints
21941
21968
  * in ShipEngine API.
@@ -22142,6 +22169,7 @@ exports.AccountAddonsAPI = AccountAddonsAPI;
22142
22169
  exports.AccountBillingAPI = AccountBillingAPI;
22143
22170
  exports.AccountBillingPlanAPI = AccountBillingPlanAPI;
22144
22171
  exports.AccountBillingPlanChangeType = AccountBillingPlanChangeType;
22172
+ exports.AccountFeaturesAPI = AccountFeaturesAPI;
22145
22173
  exports.AccountSettingsAPI = AccountSettingsAPI;
22146
22174
  exports.AddressesAPI = AddressesAPI;
22147
22175
  exports.AuctanePayAPI = AuctanePayAPI;
@@ -22154,6 +22182,7 @@ exports.Currency = Currency;
22154
22182
  exports.CustomPackagesAPI = CustomPackagesAPI;
22155
22183
  exports.CustomsContentsType = CustomsContentsType;
22156
22184
  exports.CustomsNonDeliveryType = CustomsNonDeliveryType;
22185
+ exports.FeatureId = FeatureId;
22157
22186
  exports.FundingSourcesAPI = FundingSourcesAPI;
22158
22187
  exports.InsuranceAPI = InsuranceAPI;
22159
22188
  exports.InsuranceProviderType = InsuranceProviderType;
package/index.mjs CHANGED
@@ -6,6 +6,11 @@ var AccountBillingPlanChangeType = /* @__PURE__ */ ((AccountBillingPlanChangeTyp
6
6
  return AccountBillingPlanChangeType2;
7
7
  })(AccountBillingPlanChangeType || {});
8
8
 
9
+ var FeatureId = /* @__PURE__ */ ((FeatureId2) => {
10
+ FeatureId2[FeatureId2["SSApiAnalytics"] = 182] = "SSApiAnalytics";
11
+ return FeatureId2;
12
+ })(FeatureId || {});
13
+
9
14
  var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
10
15
  var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
11
16
  var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
@@ -143,6 +148,7 @@ const types = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
143
148
  Currency,
144
149
  CustomsContentsType,
145
150
  CustomsNonDeliveryType,
151
+ FeatureId,
146
152
  InsuranceProviderType,
147
153
  MetadataCapability,
148
154
  MetadataRequirement,
@@ -232,6 +238,20 @@ class AccountAddonsAPI {
232
238
  }
233
239
  }
234
240
 
241
+ class AccountFeaturesAPI {
242
+ constructor(client) {
243
+ this.client = client;
244
+ /**
245
+ * The `list` method retrieves a list of all available features, also includes
246
+ * if its avaiable for the current user
247
+ */
248
+ this.list = () => {
249
+ return this.client.get("/v1/account/features");
250
+ };
251
+ this.client = client;
252
+ }
253
+ }
254
+
235
255
  class AddressesAPI {
236
256
  constructor(client) {
237
257
  this.client = client;
@@ -21932,6 +21952,13 @@ class ShipEngineAPI {
21932
21952
  get accountAddons() {
21933
21953
  return new AccountAddonsAPI(this.client);
21934
21954
  }
21955
+ /**
21956
+ * The `accountFeatures` method provides access to the Account Features endpoints
21957
+ * in ShipEngine API.
21958
+ */
21959
+ get accountFeatures() {
21960
+ return new AccountFeaturesAPI(this.client);
21961
+ }
21935
21962
  /**
21936
21963
  * The `accountBilling` method provides access to the Account Billing (Recurly) endpoints
21937
21964
  * in ShipEngine API.
@@ -22134,4 +22161,4 @@ class ShipEngineAPI {
22134
22161
  }
22135
22162
  }
22136
22163
 
22137
- export { AccountAddonsAPI, AccountBillingAPI, AccountBillingPlanAPI, AccountBillingPlanChangeType, AccountSettingsAPI, AddressesAPI, AuctanePayAPI, CarriersAPI, CodedError, ConfirmationType, ConnectionsAPI, CreditCardVendor, Currency, CustomPackagesAPI, CustomsContentsType, CustomsNonDeliveryType, FundingSourcesAPI, InsuranceAPI, InsuranceProviderType, InvoiceAddressAPI, LabelsAPI, MetadataCapability, MetadataRequirement, MetadataSatisfyingFormTypes, MovementIndicator, OrderSourcesAPI, RateCardStatus, RateCardsAPI, RatesAPI, types as SE, SalesOrderShipmentsAPI, SalesOrdersAPI, SellersAPI, ServicePointsAPI, ShipEngineAPI, ShipmentsAPI, ShippingRulesAPI, ThemesAPI, UsersApi, WarehousesAPI, WebhooksAPI, camelizeKeys, decamelizeKeys, getEndUserIpAddress, isCodedError, isCodedErrors, isDataCodedErrors, isInvalidTokenError, parseError };
22164
+ export { AccountAddonsAPI, AccountBillingAPI, AccountBillingPlanAPI, AccountBillingPlanChangeType, AccountFeaturesAPI, AccountSettingsAPI, AddressesAPI, AuctanePayAPI, CarriersAPI, CodedError, ConfirmationType, ConnectionsAPI, CreditCardVendor, Currency, CustomPackagesAPI, CustomsContentsType, CustomsNonDeliveryType, FeatureId, FundingSourcesAPI, InsuranceAPI, InsuranceProviderType, InvoiceAddressAPI, LabelsAPI, MetadataCapability, MetadataRequirement, MetadataSatisfyingFormTypes, MovementIndicator, OrderSourcesAPI, RateCardStatus, RateCardsAPI, RatesAPI, types as SE, SalesOrderShipmentsAPI, SalesOrdersAPI, SellersAPI, ServicePointsAPI, ShipEngineAPI, ShipmentsAPI, ShippingRulesAPI, ThemesAPI, UsersApi, WarehousesAPI, WebhooksAPI, camelizeKeys, decamelizeKeys, getEndUserIpAddress, isCodedError, isCodedErrors, isDataCodedErrors, isInvalidTokenError, parseError };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipengine/js-api",
3
- "version": "4.17.1",
3
+ "version": "4.18.2-next.0",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {
package/types.d.ts CHANGED
@@ -3,6 +3,7 @@ export * from "./account-settings/types";
3
3
  export * from "./account-billing-plan/types";
4
4
  export * from "./account-billing/types";
5
5
  export * from "./account-addons/types";
6
+ export * from "./account-features/types";
6
7
  export * from "./addresses/types";
7
8
  export * from "./auctane-pay/types";
8
9
  export * from "./carriers/types";