@shipengine/js-api 4.4.1 → 4.5.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
@@ -22,6 +22,7 @@ import { ServicePointsAPI } from "./service-points";
22
22
  import { ShipmentsAPI } from "./shipments";
23
23
  import { ShippingRulesAPI } from "./shipping-rules";
24
24
  import { ThemesAPI } from "./themes";
25
+ import { UsersApi } from "./users";
25
26
  import { WarehousesAPI } from "./warehouses";
26
27
  import { WebhooksAPI } from "./webhooks";
27
28
  /**
@@ -252,4 +253,10 @@ export declare class ShipEngineAPI {
252
253
  * @see {@link AuctanePayAPI | The Auctane Pay API module}
253
254
  */
254
255
  get auctanePay(): AuctanePayAPI;
256
+ /**
257
+ * The `users` method provides access to Users endpoints in ShipEngine API.
258
+ *
259
+ * @see {@link UsersApi | The Users API module}
260
+ */
261
+ get users(): UsersApi;
255
262
  }
package/index.d.ts CHANGED
@@ -32,3 +32,4 @@ export * from "./webhooks";
32
32
  export * from "./weight";
33
33
  export * from "./zones";
34
34
  export * from "./sellers";
35
+ export * from "./users";
package/index.js CHANGED
@@ -4284,6 +4284,19 @@ class ThemesAPI {
4284
4284
  }
4285
4285
  }
4286
4286
 
4287
+ class UsersApi {
4288
+ constructor(client) {
4289
+ this.client = client;
4290
+ /**
4291
+ * The `list` gets all the users of the current Seller.
4292
+ */
4293
+ this.list = (options) => {
4294
+ return this.client.get("/v1/users", { params: options });
4295
+ };
4296
+ this.client = client;
4297
+ }
4298
+ }
4299
+
4287
4300
  class WarehousesAPI {
4288
4301
  constructor(client) {
4289
4302
  this.client = client;
@@ -22005,6 +22018,14 @@ class ShipEngineAPI {
22005
22018
  get auctanePay() {
22006
22019
  return new AuctanePayAPI(this.client);
22007
22020
  }
22021
+ /**
22022
+ * The `users` method provides access to Users endpoints in ShipEngine API.
22023
+ *
22024
+ * @see {@link UsersApi | The Users API module}
22025
+ */
22026
+ get users() {
22027
+ return new UsersApi(this.client);
22028
+ }
22008
22029
  }
22009
22030
 
22010
22031
  exports.AccountBillingAPI = AccountBillingAPI;
@@ -22044,6 +22065,7 @@ exports.ShipEngineAPI = ShipEngineAPI;
22044
22065
  exports.ShipmentsAPI = ShipmentsAPI;
22045
22066
  exports.ShippingRulesAPI = ShippingRulesAPI;
22046
22067
  exports.ThemesAPI = ThemesAPI;
22068
+ exports.UsersApi = UsersApi;
22047
22069
  exports.WarehousesAPI = WarehousesAPI;
22048
22070
  exports.WebhooksAPI = WebhooksAPI;
22049
22071
  exports.camelizeKeys = camelizeKeys;
package/index.mjs CHANGED
@@ -4280,6 +4280,19 @@ class ThemesAPI {
4280
4280
  }
4281
4281
  }
4282
4282
 
4283
+ class UsersApi {
4284
+ constructor(client) {
4285
+ this.client = client;
4286
+ /**
4287
+ * The `list` gets all the users of the current Seller.
4288
+ */
4289
+ this.list = (options) => {
4290
+ return this.client.get("/v1/users", { params: options });
4291
+ };
4292
+ this.client = client;
4293
+ }
4294
+ }
4295
+
4283
4296
  class WarehousesAPI {
4284
4297
  constructor(client) {
4285
4298
  this.client = client;
@@ -22001,6 +22014,14 @@ class ShipEngineAPI {
22001
22014
  get auctanePay() {
22002
22015
  return new AuctanePayAPI(this.client);
22003
22016
  }
22017
+ /**
22018
+ * The `users` method provides access to Users endpoints in ShipEngine API.
22019
+ *
22020
+ * @see {@link UsersApi | The Users API module}
22021
+ */
22022
+ get users() {
22023
+ return new UsersApi(this.client);
22024
+ }
22004
22025
  }
22005
22026
 
22006
- export { 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, WarehousesAPI, WebhooksAPI, camelizeKeys, decamelizeKeys, getEndUserIpAddress, isCodedError, isCodedErrors, isDataCodedErrors, isInvalidTokenError, parseError };
22027
+ export { 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 };
package/labels/types.d.ts CHANGED
@@ -10,6 +10,9 @@ export type LabelFormat = "pdf" | "png" | "zpl";
10
10
  export type LabelLayout = "4x6" | "letter";
11
11
  export type LabelStatus = "processing" | "completed" | "error" | "voided";
12
12
  export type LabelTrackingStatus = "unknown" | "in_transit" | "delivered" | "error";
13
+ /**
14
+ * Columns available for label exports
15
+ */
13
16
  export type LabelColumns = "shipment_id" | "label_id" | "external_order_id" | "external_shipment_id" | "packages" | "recipient" | "shipping_service" | "created_date" | "ship_date" | "status" | "tracking_status";
14
17
  export type Label = {
15
18
  alternativeIdentifiers?: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipengine/js-api",
3
- "version": "4.4.1",
3
+ "version": "4.5.0",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {
package/types.d.ts CHANGED
@@ -31,3 +31,4 @@ export * from "./weight/types";
31
31
  export * from "./weight-band/types";
32
32
  export * from "./zones/types";
33
33
  export * from "./sellers/types";
34
+ export * from "./users/types";
package/users/api.d.ts ADDED
@@ -0,0 +1,14 @@
1
+ import { AxiosInstance } from "axios";
2
+ import { UserListOptions, UserListResponse } from "./types";
3
+ /**
4
+ * # Users API module - /v1/users
5
+ * @link https://docs.shipstation.com/openapi/users
6
+ */
7
+ export declare class UsersApi {
8
+ private client;
9
+ constructor(client: AxiosInstance);
10
+ /**
11
+ * The `list` gets all the users of the current Seller.
12
+ */
13
+ list: (options?: UserListOptions) => Promise<import("axios").AxiosResponse<UserListResponse, any>>;
14
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./api";
2
+ export * from "./types";
@@ -0,0 +1,17 @@
1
+ import { CreationRangeQuery, ModificationRangeQuery, PageableQuery, PageableResult, SortableQuery } from "../resources";
2
+ export type UserStatus = "Active" | "Inactive" | "Locked_out" | "Email_lock";
3
+ export type User = {
4
+ createdAt: string;
5
+ email: string;
6
+ lastLoginAt: string;
7
+ name: string;
8
+ status: UserStatus;
9
+ userId: string;
10
+ username: string;
11
+ };
12
+ export type UserListOptions = {
13
+ status?: UserStatus;
14
+ } & PageableQuery & CreationRangeQuery & ModificationRangeQuery & SortableQuery;
15
+ export type UserListResponse = {
16
+ users: User[];
17
+ } & PageableResult;