forked from EasyPost/easypost-node
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request EasyPost#373 from EasyPost/carrier_metadata_typesc…
…ript feat: carrier metadata typescript definitions
- Loading branch information
Showing
6 changed files
with
73 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "@easypost/api", | ||
"description": "EasyPost Node Client Library", | ||
"version": "6.2.0", | ||
"version": "6.3.0", | ||
"author": "Easypost Engineering <[email protected]>", | ||
"homepage": "https://easypost.com", | ||
"bin": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
/** | ||
* The Carrier Metadata endpoint returns information about all the carriers available on the EasyPost platform. | ||
* This information may include service levels, predefined packages, shipment options, supported features, and | ||
* more that are available per carrier. This metadata can be useful during onboarding and integration or when | ||
* determining the ideal carrier mix for your setup. | ||
* | ||
* @see https://www.easypost.com/docs/api/node#carriermetadata-object | ||
*/ | ||
export declare interface ICarrierMetadata { | ||
/** | ||
* The single-word name of a carrier such as "royalmail" | ||
*/ | ||
carrier: string; | ||
|
||
/** | ||
* The human-readable name of the carrier | ||
*/ | ||
human_readable?: string | null; | ||
|
||
/** | ||
* A list of service level objects for this carrier | ||
*/ | ||
service_levels?: Array<Object> | null; | ||
|
||
/** | ||
* A list of predefined package objects for this carrier | ||
*/ | ||
predefined_packages?: Array<Object> | null; | ||
|
||
/** | ||
* A list of supported feature objects for this carrier | ||
*/ | ||
supported_features?: Array<Object> | null; | ||
|
||
/** | ||
* A list of shipment option objects for this carrier | ||
*/ | ||
shipment_options?: Array<Object> | null; | ||
} | ||
|
||
export declare class CarrierMetadata implements ICarrierMetadata { | ||
carrier: string; | ||
human_readable?: string | null; | ||
service_levels?: Array<Object> | null; | ||
predefined_packages?: Array<Object> | null; | ||
supported_features?: Array<Object> | null; | ||
shipment_options?: Array<Object> | null; | ||
|
||
/** | ||
* Retrieve all Carrier Metadata for all carriers on the EasyPost platform. Optionally, | ||
* filter the response by specifying a list of carriers or metadata types. | ||
* | ||
* @param {Array} carriers A comma-delimited list of single-word carriers you'd like to filter the response by | ||
* @param {Array} types A comma-delimited list of the metadata types you'd like to filter the response by | ||
* | ||
* @see https://www.easypost.com/docs/api/node#retrieve-carrier-metadata | ||
* | ||
* @returns {Promise<CarrierMetadata[]>} The {@link CarrierMetadata} object. | ||
*/ | ||
static retrieveCarrierMetadata( | ||
carriers: Array<string>, | ||
types: Array<string>, | ||
): Promise<CarrierMetadata>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './CarrierMetadata'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export * from './CarrierAccount'; | ||
export * from './CarrierMetadata'; | ||
export * from './CarrierType'; |