@shipengine/connect-carrier-api 2.2.2 → 2.2.3
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/lib/models/addresses/address-base.d.ts +13 -13
- package/lib/models/addresses/address-base.js.map +1 -1
- package/lib/models/addresses/address-residential-indicator.d.ts +3 -0
- package/lib/models/addresses/address-residential-indicator.js +3 -0
- package/lib/models/addresses/address-residential-indicator.js.map +1 -1
- package/lib/models/addresses/ship-from-display.d.ts +1 -0
- package/lib/models/addresses/ship-from-display.js +1 -0
- package/lib/models/addresses/ship-from-display.js.map +1 -1
- package/lib/models/addresses/ship-from.d.ts +1 -0
- package/lib/models/addresses/ship-from.js +1 -0
- package/lib/models/addresses/ship-from.js.map +1 -1
- package/lib/models/addresses/ship-to.d.ts +1 -0
- package/lib/models/addresses/ship-to.js +1 -0
- package/lib/models/addresses/ship-to.js.map +1 -1
- package/lib/models/advanced-options.d.ts +1 -1
- package/lib/models/authorization.d.ts +2 -0
- package/lib/models/authorization.js.map +1 -1
- package/lib/models/billing/billing-categories.d.ts +1 -1
- package/lib/models/billing/billing-categories.js +1 -1
- package/lib/models/billing/billing-categories.js.map +1 -1
- package/lib/models/billing/billing-line-item.d.ts +5 -0
- package/lib/models/billing/billing-line-item.js +2 -2
- package/lib/models/billing/billing-line-item.js.map +1 -1
- package/lib/models/confirmation-types.d.ts +5 -5
- package/lib/models/confirmation-types.js +5 -5
- package/lib/models/confirmation-types.js.map +1 -1
- package/lib/models/currency.d.ts +2 -0
- package/lib/models/currency.js.map +1 -1
- package/lib/models/customs/customs-content-types.d.ts +5 -1
- package/lib/models/customs/customs-content-types.js +5 -1
- package/lib/models/customs/customs-content-types.js.map +1 -1
- package/lib/models/customs/customs-item.d.ts +9 -1
- package/lib/models/customs/customs-item.js +1 -1
- package/lib/models/customs/customs-item.js.map +1 -1
- package/lib/models/customs/customs-non-delivery.d.ts +2 -0
- package/lib/models/customs/customs-non-delivery.js +2 -0
- package/lib/models/customs/customs-non-delivery.js.map +1 -1
- package/lib/models/customs/customs.d.ts +6 -1
- package/lib/models/customs/customs.js +1 -1
- package/lib/models/customs/customs.js.map +1 -1
- package/lib/models/documents/document-type.d.ts +4 -0
- package/lib/models/documents/document-type.js +4 -0
- package/lib/models/documents/document-type.js.map +1 -1
- package/lib/models/documents/document.d.ts +3 -0
- package/lib/models/documents/document.js.map +1 -1
- package/lib/models/errors/detailed-error.d.ts +1 -1
- package/lib/models/errors/detailed-error.js +1 -1
- package/lib/models/errors/detailed-error.js.map +1 -1
- package/lib/models/errors/standardized-error-code.d.ts +1 -1
- package/lib/models/errors/standardized-error-code.js +1 -1
- package/lib/models/errors/standardized-error-code.js.map +1 -1
- package/lib/models/fulfillment-plans/fulfillment-plan-details.d.ts +4 -1
- package/lib/models/fulfillment-plans/fulfillment-plan-details.js +1 -1
- package/lib/models/fulfillment-plans/fulfillment-plan-details.js.map +1 -1
- package/lib/models/fulfillment-plans/fulfillment-plan-items.d.ts +4 -4
- package/lib/models/fulfillment-plans/raw-external-source.d.ts +2 -0
- package/lib/models/fulfillment-plans/raw-external-source.js +1 -0
- package/lib/models/fulfillment-plans/raw-external-source.js.map +1 -1
- package/lib/models/labels/form-download.d.ts +2 -0
- package/lib/models/labels/form-download.js +1 -0
- package/lib/models/labels/form-download.js.map +1 -1
- package/lib/models/labels/label-download.d.ts +2 -0
- package/lib/models/labels/label-download.js +1 -0
- package/lib/models/labels/label-download.js.map +1 -1
- package/lib/models/labels/label-package.d.ts +2 -0
- package/lib/models/labels/label-package.js.map +1 -1
- package/lib/models/labels/return-label-details.d.ts +1 -0
- package/lib/models/labels/return-label-details.js.map +1 -1
- package/lib/models/labels/void-request.d.ts +2 -0
- package/lib/models/labels/void-request.js.map +1 -1
- package/lib/models/labels/void-response.d.ts +1 -1
- package/lib/models/manifests/label.d.ts +2 -0
- package/lib/models/manifests/label.js.map +1 -1
- package/lib/models/manifests/manifest.d.ts +5 -1
- package/lib/models/manifests/manifest.js +1 -1
- package/lib/models/manifests/manifest.js.map +1 -1
- package/lib/models/package.d.ts +6 -0
- package/lib/models/package.js.map +1 -1
- package/lib/models/pickup/cancellation-details.d.ts +1 -0
- package/lib/models/pickup/cancellation-details.js.map +1 -1
- package/lib/models/pickup/pickup-confirmation.d.ts +3 -0
- package/lib/models/pickup/pickup-confirmation.js.map +1 -1
- package/lib/models/pickup/pickup-contact-details.d.ts +6 -1
- package/lib/models/pickup/pickup-contact-details.js +1 -1
- package/lib/models/pickup/pickup-contact-details.js.map +1 -1
- package/lib/models/pickup/pickup-location-details.d.ts +1 -0
- package/lib/models/pickup/pickup-location-details.js.map +1 -1
- package/lib/models/pickup/pickup-package.d.ts +7 -0
- package/lib/models/pickup/pickup-package.js.map +1 -1
- package/lib/models/pickup/pickup-shipment-details.d.ts +1 -0
- package/lib/models/pickup/pickup-shipment-details.js.map +1 -1
- package/lib/models/pickup/pickup-window.d.ts +5 -1
- package/lib/models/pickup/pickup-window.js +1 -1
- package/lib/models/pickup/pickup-window.js.map +1 -1
- package/lib/models/pickup/shipment-identifier.d.ts +2 -0
- package/lib/models/pickup/shipment-identifier.js.map +1 -1
- package/lib/models/pickup/shipped-package.d.ts +7 -0
- package/lib/models/pickup/shipped-package.js.map +1 -1
- package/lib/models/pickup/shipped-shipment.d.ts +6 -0
- package/lib/models/pickup/shipped-shipment.js.map +1 -1
- package/lib/models/rates/rate.d.ts +2 -4
- package/lib/models/rates/rate.js.map +1 -1
- package/lib/models/registration/credentials.d.ts +2 -0
- package/lib/models/registration/credentials.js.map +1 -1
- package/lib/models/resource-download.d.ts +2 -0
- package/lib/models/resource-download.js.map +1 -1
- package/lib/models/taxes/tax-identifier.d.ts +1 -1
- package/lib/models/taxes/tax-identifier.js +1 -1
- package/lib/models/taxes/tax-identifier.js.map +1 -1
- package/lib/models/tracking/lat-long.d.ts +2 -2
- package/lib/models/tracking/service.d.ts +2 -0
- package/lib/models/tracking/service.js.map +1 -1
- package/lib/models/tracking/track-event.d.ts +9 -0
- package/lib/models/tracking/track-event.js.map +1 -1
- package/lib/models/tracking/tracking-info.d.ts +18 -0
- package/lib/models/tracking/tracking-info.js.map +1 -1
- package/lib/models/units/dimension-details.d.ts +4 -0
- package/lib/models/units/dimension-details.js.map +1 -1
- package/lib/models/units/weight-details.d.ts +4 -0
- package/lib/models/units/weight-details.js.map +1 -1
- package/package.json +1 -1
- package/spec.json +355 -176
- package/src/models/addresses/address-base.ts +13 -14
- package/src/models/addresses/address-residential-indicator.ts +3 -0
- package/src/models/addresses/ship-from-display.ts +1 -0
- package/src/models/addresses/ship-from.ts +1 -0
- package/src/models/addresses/ship-to.ts +1 -0
- package/src/models/advanced-options.ts +1 -1
- package/src/models/authorization.ts +2 -0
- package/src/models/billing/billing-categories.ts +1 -1
- package/src/models/billing/billing-line-item.ts +7 -2
- package/src/models/confirmation-types.ts +5 -5
- package/src/models/currency.ts +2 -0
- package/src/models/customs/customs-content-types.ts +5 -1
- package/src/models/customs/customs-item.ts +9 -1
- package/src/models/customs/customs-non-delivery.ts +2 -0
- package/src/models/customs/customs.ts +6 -1
- package/src/models/documents/document-type.ts +4 -0
- package/src/models/documents/document.ts +3 -0
- package/src/models/errors/detailed-error.ts +1 -1
- package/src/models/errors/standardized-error-code.ts +1 -1
- package/src/models/fulfillment-plans/fulfillment-plan-details.ts +4 -1
- package/src/models/fulfillment-plans/fulfillment-plan-items.ts +4 -4
- package/src/models/fulfillment-plans/raw-external-source.ts +2 -0
- package/src/models/labels/form-download.ts +2 -0
- package/src/models/labels/label-download.ts +2 -0
- package/src/models/labels/label-package.ts +2 -0
- package/src/models/labels/return-label-details.ts +1 -0
- package/src/models/labels/void-request.ts +2 -0
- package/src/models/labels/void-response.ts +1 -1
- package/src/models/manifests/label.ts +2 -0
- package/src/models/manifests/manifest.ts +5 -1
- package/src/models/package.ts +6 -0
- package/src/models/pickup/cancellation-details.ts +1 -0
- package/src/models/pickup/pickup-confirmation.ts +3 -0
- package/src/models/pickup/pickup-contact-details.ts +6 -1
- package/src/models/pickup/pickup-location-details.ts +1 -0
- package/src/models/pickup/pickup-package.ts +7 -0
- package/src/models/pickup/pickup-shipment-details.ts +1 -0
- package/src/models/pickup/pickup-window.ts +5 -1
- package/src/models/pickup/shipment-identifier.ts +2 -0
- package/src/models/pickup/shipped-package.ts +7 -0
- package/src/models/pickup/shipped-shipment.ts +6 -0
- package/src/models/rates/rate.ts +2 -4
- package/src/models/registration/credentials.ts +2 -0
- package/src/models/resource-download.ts +2 -0
- package/src/models/taxes/tax-identifier.ts +1 -1
- package/src/models/tracking/lat-long.ts +2 -2
- package/src/models/tracking/service.ts +2 -0
- package/src/models/tracking/track-event.ts +9 -0
- package/src/models/tracking/tracking-info.ts +18 -0
- package/src/models/units/dimension-details.ts +4 -0
- package/src/models/units/weight-details.ts +4 -0
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1,35 +1,34 @@
|
|
|
1
1
|
import { AddressResidentialIndicator } from './address-residential-indicator';
|
|
2
2
|
|
|
3
3
|
export class AddressBase {
|
|
4
|
-
/** @description
|
|
4
|
+
/** @description The full name of the contact contact associated with the address */
|
|
5
5
|
name?: string;
|
|
6
|
-
/** @description
|
|
6
|
+
/** @description The first name of the contact associated with the address */
|
|
7
7
|
first_name?: string;
|
|
8
|
-
/** @description
|
|
8
|
+
/** @description The last name of the contact associated with the address */
|
|
9
9
|
last_name?: string;
|
|
10
|
-
/** @description
|
|
10
|
+
/** @description The email of the contact associated with the address */
|
|
11
11
|
email?: string;
|
|
12
|
-
/** @description
|
|
13
|
-
|
|
12
|
+
/** @description The phone number of the contact associated with the address (No Newline Characters) */
|
|
14
13
|
phone_number?: string;
|
|
15
|
-
/** @description
|
|
14
|
+
/** @description The name of the company associated with this address (No Newline Characters) max length 100 characters */
|
|
16
15
|
company_name?: string;
|
|
17
|
-
/** @description
|
|
16
|
+
/** @description The address lines of the address (No Newline Characters) max length 100 characters */
|
|
18
17
|
address_lines?: string[];
|
|
19
|
-
/** @description City or locality
|
|
18
|
+
/** @description City or locality (No Newline Characters) */
|
|
20
19
|
city_locality?: string;
|
|
21
|
-
/** @description State or province
|
|
20
|
+
/** @description State or province (No Newline Characters) */
|
|
22
21
|
state_province?: string;
|
|
23
|
-
/** @description Zip or postal code
|
|
22
|
+
/** @description Zip or postal code (No Newline Characters) */
|
|
24
23
|
postal_code!: string;
|
|
25
|
-
/** @description ISO 3166-1 two-letter country code */
|
|
24
|
+
/** @description ISO 3166-1 two-letter country code max length 2 characters */
|
|
26
25
|
country_code!: string;
|
|
27
26
|
/** @description Whether the address is residential or commercial */
|
|
28
27
|
address_residential_indicator?: AddressResidentialIndicator;
|
|
29
28
|
/** @description Whether the country of the shipment address is a member of the EU */
|
|
30
29
|
is_eu?: boolean;
|
|
31
|
-
/** @description
|
|
30
|
+
/** @description Additional metadata provided for specific requests */
|
|
32
31
|
address_metadata?: { [key: string]: string };
|
|
33
|
-
/** @description Instructions to help the carrier navigate to the address
|
|
32
|
+
/** @description Instructions to help the carrier navigate to the address */
|
|
34
33
|
instructions?: string;
|
|
35
34
|
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/** @description Used for indicating whether an address is residential or commercial */
|
|
2
2
|
export enum AddressResidentialIndicator {
|
|
3
|
+
/** @description Indicates that it is unknown whether or not the address is in a residential or commercial area */
|
|
3
4
|
Unknown = 'unknown',
|
|
5
|
+
/** @description Indicates that the address is in a residential area */
|
|
4
6
|
Yes = 'yes',
|
|
7
|
+
/** @description Indicates that the address is not in a residential area */
|
|
5
8
|
No = 'no',
|
|
6
9
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AddressBase } from './address-base';
|
|
2
2
|
import { TaxIdentifier } from '../taxes/tax-identifier';
|
|
3
3
|
|
|
4
|
+
/** @description The address for where the shipment will be shipped from */
|
|
4
5
|
export class ShipFrom extends AddressBase {
|
|
5
6
|
/** @description Tax IDs associated with the exporter */
|
|
6
7
|
tax_identifiers?: TaxIdentifier[];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AddressBase } from './address-base';
|
|
2
2
|
import { TaxIdentifier } from '../taxes/tax-identifier';
|
|
3
3
|
|
|
4
|
+
/** @description The address that a shipment will be delivered to */
|
|
4
5
|
export class ShipTo extends AddressBase {
|
|
5
6
|
/** @description Tax IDs associated with the consignee */
|
|
6
7
|
tax_identifiers?: TaxIdentifier[];
|
|
@@ -12,7 +12,7 @@ export class AdvancedOptions {
|
|
|
12
12
|
bill_duties_to_sender?: boolean;
|
|
13
13
|
/** @description Whether Saturday delivery is permissible */
|
|
14
14
|
saturday_delivery?: boolean;
|
|
15
|
-
/** @description Amount to be paid to the driver, used for local delivery and courier services
|
|
15
|
+
/** @description Amount to be paid to the driver, used for local delivery and courier services */
|
|
16
16
|
tip?: Currency;
|
|
17
17
|
/** @description Any other custom shipping options */
|
|
18
18
|
[key: string]: any;
|
|
@@ -22,7 +22,7 @@ export enum BillingCategories {
|
|
|
22
22
|
Oversize = 'oversize',
|
|
23
23
|
Returns = 'returns',
|
|
24
24
|
Notifications = 'notifications',
|
|
25
|
-
/** @description Amount to be paid to the driver, used for local delivery and courier services
|
|
25
|
+
/** @description Amount to be paid to the driver, used for local delivery and courier services */
|
|
26
26
|
Tip = 'tip',
|
|
27
27
|
}
|
|
28
28
|
|
|
@@ -7,17 +7,22 @@ import Joi from 'joi';
|
|
|
7
7
|
|
|
8
8
|
/** @description Basic structure of each charge or line item */
|
|
9
9
|
export class BillingLineItem {
|
|
10
|
+
/** A generalized category for what type of billing line item this is */
|
|
10
11
|
billing_category!: BillingCategories;
|
|
12
|
+
/** @description If the carrier provides a description from their API about the billing charge (not specific to the user). Maximum length of 100 characters. */
|
|
11
13
|
carrier_description?: string;
|
|
14
|
+
/** @description If the carrier provides a billing code for */
|
|
12
15
|
carrier_billing_code?: string;
|
|
16
|
+
/** @description This will often be empty; however, if there was additionally specific information about the charge it should go here, could also be a reference number. Maximum length of 250 characters. */
|
|
13
17
|
memo?: string;
|
|
18
|
+
/** @description Total amount of the line item */
|
|
14
19
|
amount!: Currency;
|
|
15
20
|
}
|
|
16
21
|
|
|
17
22
|
export const BillingLineItemSchema = Joi.object({
|
|
18
23
|
billing_category: BillingCategoriesSchema.required(),
|
|
19
|
-
carrier_description: Joi.string().optional().empty(),
|
|
24
|
+
carrier_description: Joi.string().optional().empty().max(100),
|
|
20
25
|
carrier_billing_code: Joi.string().optional().empty(),
|
|
21
|
-
memo: Joi.string().optional().empty(),
|
|
26
|
+
memo: Joi.string().optional().empty().max(250),
|
|
22
27
|
amount: CurrencySchema.required(),
|
|
23
28
|
});
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/** @description Types of delivery confirmation */
|
|
2
2
|
export enum ConfirmationTypes {
|
|
3
|
-
/** @description No confirmation is requested
|
|
3
|
+
/** @description No confirmation is requested */
|
|
4
4
|
None = 'None',
|
|
5
|
-
/** @description Delivery confirmation is requested
|
|
5
|
+
/** @description Delivery confirmation is requested */
|
|
6
6
|
Delivery = 'Delivery',
|
|
7
|
-
/** @description A signature is required. This signature may be a neighbor, building manager, or the recipient can authorize the release of the package (without being present)
|
|
7
|
+
/** @description A signature is required. This signature may be a neighbor, building manager, or the recipient can authorize the release of the package (without being present) */
|
|
8
8
|
Signature = 'Signature',
|
|
9
|
-
/** @description A signature of an adult is required
|
|
9
|
+
/** @description A signature of an adult is required */
|
|
10
10
|
AdultSignature = 'AdultSignature',
|
|
11
|
-
/** @description Only supported by FedEx. The signature of somebody at the address is required
|
|
11
|
+
/** @description Only supported by FedEx. The signature of somebody at the address is required */
|
|
12
12
|
DirectSignature = 'DirectSignature',
|
|
13
13
|
}
|
package/src/models/currency.ts
CHANGED
|
@@ -2,7 +2,9 @@ import Joi from 'joi';
|
|
|
2
2
|
|
|
3
3
|
/** @description Basic structure for defining an amount of money and its currency */
|
|
4
4
|
export class Currency {
|
|
5
|
+
/** @description The ISO 4217 Currency Code (USD, EUR, etc) https://www.iso.org/iso-4217-currency-codes.html */
|
|
5
6
|
currency!: string;
|
|
7
|
+
/** @description The amount */
|
|
6
8
|
amount!: string;
|
|
7
9
|
}
|
|
8
10
|
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
/** @description Denotes the type of content for customs */
|
|
2
2
|
export enum CustomsContentTypes {
|
|
3
|
+
/** @description This is generalized merchandise that someone has purchased */
|
|
3
4
|
Merchandise = 'merchandise',
|
|
5
|
+
/** @description Documents that are being shipped */
|
|
4
6
|
Documents = 'documents',
|
|
7
|
+
/** @description An item that is being shipped as a gift (not purchased) */
|
|
5
8
|
Gift = 'gift',
|
|
6
|
-
/** @description
|
|
9
|
+
/** @description Sample goods that are being shipped */
|
|
7
10
|
Sample = 'sample',
|
|
11
|
+
/** @description Items that are being returned */
|
|
8
12
|
ReturnedGoods = 'returned_goods',
|
|
9
13
|
}
|
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
import { Currency } from '../currency';
|
|
2
2
|
import { WeightDetails } from '../units';
|
|
3
3
|
|
|
4
|
-
/** @description
|
|
4
|
+
/** @description This model represents the customs declaration for a single item */
|
|
5
5
|
export class CustomsItem {
|
|
6
|
+
/** @description A user specified free form string describing this customs item. If the field is absent the user has not specified a description */
|
|
6
7
|
description?: string;
|
|
8
|
+
/** @description The user specified count of items in this declaration. This value should be 1 or greater */
|
|
7
9
|
quantity?: number;
|
|
10
|
+
/** @description The user specified declared customs value of this customs item. Generally, this value needs to be greater than 0 to be accepted through customs */
|
|
8
11
|
value?: Currency;
|
|
12
|
+
/** @description The user specified declared country of origin of this customs item */
|
|
9
13
|
country_of_origin?: string;
|
|
14
|
+
/** @description The user specified Harmonized Tariff Code. See https://hts.usitc.gov/ for more information */
|
|
10
15
|
harmonized_tariff_code?: string;
|
|
16
|
+
/** @description The user specified SKU of this customs item. This field is completely free form. */
|
|
11
17
|
sku?: string;
|
|
18
|
+
/** @description The user specified SKU description of this customs item. This field is completely free form. */
|
|
12
19
|
sku_description?: string;
|
|
20
|
+
/** @description Detailed information about the weight of this item */
|
|
13
21
|
item_weight?: WeightDetails;
|
|
14
22
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/** @description Denotes the action that should be taken when a shipment is not deliverable */
|
|
2
2
|
export enum CustomsNonDelivery {
|
|
3
|
+
/** @description Make an attempt to return this package to sender if unable to deliver */
|
|
3
4
|
ReturnToSender = 'return_to_sender',
|
|
5
|
+
/** @description Do not make an attempt to return this package to sender if unable to deliver */
|
|
4
6
|
TreatAsAbandoned = 'treat_as_abandoned',
|
|
5
7
|
}
|
|
@@ -3,11 +3,16 @@ import { CustomsNonDelivery } from './customs-non-delivery';
|
|
|
3
3
|
import { CustomsItem } from './customs-item';
|
|
4
4
|
import { Currency } from '../currency';
|
|
5
5
|
|
|
6
|
-
/** @description Basic structure for a customs declaration
|
|
6
|
+
/** @description Basic structure for a customs declaration */
|
|
7
7
|
export class Customs {
|
|
8
|
+
/** @description Indicates the type of contents associated with this shipment */
|
|
8
9
|
contents?: CustomsContentTypes;
|
|
10
|
+
/** @description Indicates what the seller would like done in case of an issue with delivery */
|
|
9
11
|
non_delivery?: CustomsNonDelivery;
|
|
12
|
+
/** @description A list of customs items to declare */
|
|
10
13
|
customs_items!: CustomsItem[];
|
|
14
|
+
/** @description Indicates how much the buyer paid for shipping, if any. This amount may be different than the shipping cost billed to the shipper. */
|
|
11
15
|
buyer_shipping_amount_paid?: Currency;
|
|
16
|
+
/** @description The amount of duties paid by the shipper, if any. This is generally only necessary for DDP (bill_duties_to_sender) shipments. */
|
|
12
17
|
duties_paid?: Currency;
|
|
13
18
|
}
|
|
@@ -2,9 +2,13 @@ import Joi from 'joi';
|
|
|
2
2
|
|
|
3
3
|
/** @description Types of documents */
|
|
4
4
|
export enum DocumentType {
|
|
5
|
+
/** @description A shipping label */
|
|
5
6
|
Label = 'label',
|
|
7
|
+
/** @description A form that lists the details of goods that are being imported or exported when a citizen or visitor enters a customs territory (country's borders) */
|
|
6
8
|
CustomsForm = 'customs_form',
|
|
9
|
+
/** @description A legal document issued by the seller (exporter) to the buyer (importer) in an international transaction and serves as a contract and a proof of sale between the buyer and seller */
|
|
7
10
|
CommercialInvoice = 'commercial_invoice',
|
|
11
|
+
/** @description A legal document issued by a carrier to a shipper that details the type, quantity, and destination of the goods being carried (does not indicate the ownership of goods nor does it carry a title to the goods being sold) */
|
|
8
12
|
BillOfLading = 'bill_of_lading',
|
|
9
13
|
}
|
|
10
14
|
|
|
@@ -7,8 +7,11 @@ import Joi from 'joi';
|
|
|
7
7
|
|
|
8
8
|
/** @description Basic structure for a document */
|
|
9
9
|
export class Document {
|
|
10
|
+
/** @description The document type(s) being returned. In most cases this is just a single document type; however, some carriers return multiple document types in the same PDF or ZPL */
|
|
10
11
|
type!: DocumentType[];
|
|
12
|
+
/** @description Base64 encoded data for the document */
|
|
11
13
|
data!: string;
|
|
14
|
+
/** @description The format the document is in (Pdf, Zpl, etc) */
|
|
12
15
|
format!: DocumentFormat;
|
|
13
16
|
}
|
|
14
17
|
export const DocumentSchema = Joi.object({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { StandardizedErrorCode } from './standardized-error-code';
|
|
2
2
|
|
|
3
|
-
/** @
|
|
3
|
+
/** @deprecated Please Use Runtime Errors */
|
|
4
4
|
export class DetailedError {
|
|
5
5
|
standardized_error_code!: StandardizedErrorCode;
|
|
6
6
|
external_error_code?: string;
|
|
@@ -2,9 +2,12 @@ import { Identifier } from '../identifier';
|
|
|
2
2
|
import { FulfillmentPlanItems } from './fulfillment-plan-items';
|
|
3
3
|
import { RawExternalSource } from './raw-external-source';
|
|
4
4
|
|
|
5
|
-
/** @description
|
|
5
|
+
/** @description This model contains information about the fulfillment plan. */
|
|
6
6
|
export class FulfillmentPlanDetails {
|
|
7
|
+
/** @description A list of identifiers for the sales order. */
|
|
7
8
|
external_sales_order_identifiers?: Identifier[];
|
|
9
|
+
/** @description Information about the fulfillment plan item. */
|
|
8
10
|
items?: FulfillmentPlanItems[];
|
|
11
|
+
/** @description This model represents a raw external source of information */
|
|
9
12
|
raw_external_source?: RawExternalSource;
|
|
10
13
|
}
|
|
@@ -2,12 +2,12 @@ import { Identifier } from '../identifier';
|
|
|
2
2
|
|
|
3
3
|
/** @description Information about the fulfillment plan for a set of items */
|
|
4
4
|
export class FulfillmentPlanItems {
|
|
5
|
-
/** @description
|
|
5
|
+
/** @description A list of identifiers for the sales order */
|
|
6
6
|
external_sales_order_identifiers?: Identifier[];
|
|
7
|
-
/** @description
|
|
7
|
+
/** @description A list of identifiers specific to the selling channel */
|
|
8
8
|
external_product_identifiers?: Identifier[];
|
|
9
|
-
/** @description
|
|
9
|
+
/** @description The name of the item */
|
|
10
10
|
name?: string;
|
|
11
|
-
/** @description
|
|
11
|
+
/** @description The number of items */
|
|
12
12
|
quantity?: number;
|
|
13
13
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import Joi from 'joi';
|
|
2
2
|
import { ResourceDownload, ResourceDownloadSchema } from '../resource-download';
|
|
3
3
|
|
|
4
|
+
/** @description This provides any additional forms that go with the label. For example, customs forms. Exactly one of the keys should be populated. Set href is the forms should be downloaded separately. Set data if the forms are returned directly in the response. */
|
|
4
5
|
export class FormDownload extends ResourceDownload {
|
|
6
|
+
/** @description The base64 encoded resource data. */
|
|
5
7
|
form_data?: string;
|
|
6
8
|
}
|
|
7
9
|
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import Joi from 'joi';
|
|
2
2
|
import { ResourceDownload, ResourceDownloadSchema } from '../resource-download';
|
|
3
3
|
|
|
4
|
+
/** @description This object provides the requested label that was just created. Exactly one of the keys should be populated. Set href if the label should be downloaded separately. Set data if the label is returned directly in the response. */
|
|
4
5
|
export class LabelDownload extends ResourceDownload {
|
|
6
|
+
/** @description The base64 encoded resource data. */
|
|
5
7
|
label_data?: string;
|
|
6
8
|
}
|
|
7
9
|
|
|
@@ -4,9 +4,11 @@ import Joi from 'joi';
|
|
|
4
4
|
|
|
5
5
|
/** @description Package information provided by the carrier */
|
|
6
6
|
export class LabelPackage {
|
|
7
|
+
/** @description Tracking number for the package */
|
|
7
8
|
tracking_number?: string;
|
|
8
9
|
/** @description Non-tracking alternative ids associated with this package */
|
|
9
10
|
alternative_identifiers?: Identifier[];
|
|
11
|
+
/** @description Documents associated with this package, if documents are not specified at a package level, use the Documents array at the CreateLabelResponse level. */
|
|
10
12
|
documents?: Document[];
|
|
11
13
|
}
|
|
12
14
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/** @description Basic structure for a return label */
|
|
2
2
|
export class ReturnLabelDetails {
|
|
3
|
+
/** @description A return merchandise authorization (RMA) is an associated number assigned to process the return, this number is often printed on the label, and used when the original shipper processes the inbound return. */
|
|
3
4
|
rma_number?: string;
|
|
4
5
|
}
|
|
@@ -3,6 +3,8 @@ import { ShipFrom } from '../addresses';
|
|
|
3
3
|
|
|
4
4
|
/** @description Basic structure for a request to void a label */
|
|
5
5
|
export class VoidRequest extends ShippedShipment {
|
|
6
|
+
/** @description Uniquely identifies this request to void a label. Must be returned in a void response. */
|
|
6
7
|
void_request_id!: string;
|
|
8
|
+
/** @description The location the shipment was shipped from */
|
|
7
9
|
ship_from!: ShipFrom;
|
|
8
10
|
}
|
|
@@ -8,7 +8,7 @@ export class VoidResponse {
|
|
|
8
8
|
message?: string;
|
|
9
9
|
/** @description Any errors from attempting to void */
|
|
10
10
|
errors?: string[];
|
|
11
|
-
/** @description Individual Billing Line items which remain after voiding the label, e.g. a cancellation fee
|
|
11
|
+
/** @description Individual Billing Line items which remain after voiding the label, e.g. a cancellation fee */
|
|
12
12
|
billing_line_items?: BillingLineItem[];
|
|
13
13
|
}
|
|
14
14
|
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/** @description Basic structure of a manifest label */
|
|
2
2
|
export class Label {
|
|
3
|
+
/** @description The carrier tracking number for this shipment */
|
|
3
4
|
tracking_number?: string;
|
|
5
|
+
/** @description The carrier specific identifier for this shipment */
|
|
4
6
|
carrier_transaction_id?: string;
|
|
5
7
|
}
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import Joi from 'joi';
|
|
2
2
|
import { ResourceDownload, ResourceDownloadSchema } from '../resource-download';
|
|
3
3
|
|
|
4
|
-
/** @description
|
|
4
|
+
/** @description This model represents a single manifest created with a shipping provider. */
|
|
5
5
|
export class Manifest {
|
|
6
|
+
/** @description The unique identifier for this manifest. */
|
|
6
7
|
manifest_id?: string;
|
|
8
|
+
/** @description The resource and where it can be downloaded */
|
|
7
9
|
document_download?: ResourceDownload;
|
|
10
|
+
/** @deprecated This property is no longer used please use the document_download */
|
|
8
11
|
document_href?: string;
|
|
12
|
+
/** @deprecated This property is no longer used please use the document_download */
|
|
9
13
|
document_data?: string;
|
|
10
14
|
}
|
|
11
15
|
|
package/src/models/package.ts
CHANGED
|
@@ -7,10 +7,16 @@ import { Customs } from './customs';
|
|
|
7
7
|
|
|
8
8
|
/** @description Basic structure for a package */
|
|
9
9
|
export class Package {
|
|
10
|
+
/** @description Package code defined for the carrier in ShipEngine. */
|
|
10
11
|
package_code?: string;
|
|
12
|
+
/** @description Details about the dimensions of the package */
|
|
11
13
|
dimension_details?: DimensionDetails;
|
|
14
|
+
/** @description Details about the weight of the package */
|
|
12
15
|
weight_details?: WeightDetails;
|
|
16
|
+
/** @description The insured value of this package. */
|
|
13
17
|
insured_value!: Currency;
|
|
18
|
+
/** @description The message the seller requested to have on their label */
|
|
14
19
|
label_messages?: LabelMessage;
|
|
20
|
+
/** @description Basic structure for a customs declaration (Only available on international shipments) */
|
|
15
21
|
customs?: Customs;
|
|
16
22
|
}
|
|
@@ -2,6 +2,7 @@ import { CancellationReason } from './cancellation-reason';
|
|
|
2
2
|
|
|
3
3
|
/** @description Basic structure for a cancellation */
|
|
4
4
|
export class CancellationDetails {
|
|
5
|
+
/** @description The reason the pickup has been cancelled */
|
|
5
6
|
reason!: CancellationReason;
|
|
6
7
|
/** @description Additional properties about cancellation */
|
|
7
8
|
cancellation_options?: { [key: string]: string };
|
|
@@ -7,8 +7,11 @@ import {
|
|
|
7
7
|
|
|
8
8
|
/** @description Basic structure for a pickup confirmation */
|
|
9
9
|
export class PickupConfirmation {
|
|
10
|
+
/** @description The primary confirmation ID for this request. */
|
|
10
11
|
confirmation_id?: string;
|
|
12
|
+
/** @description Other identifiers potentially needed in other calls. */
|
|
11
13
|
alternate_identifiers?: Identifier[];
|
|
14
|
+
/** @description List of the shipments added for this pickup. */
|
|
12
15
|
shipment_identifiers?: ShipmentIdentifier[];
|
|
13
16
|
}
|
|
14
17
|
export const PickupConfirmationSchema = Joi.object({
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
/** @description Contact
|
|
1
|
+
/** @description Contact information for the person who will be present for the pickup. */
|
|
2
2
|
export class PickupContactDetails {
|
|
3
|
+
/** @description The first name of the person who will be there for the pickup. */
|
|
3
4
|
first_name!: string;
|
|
5
|
+
/** @description The last name of the person who will be there for the pickup. */
|
|
4
6
|
last_name?: string;
|
|
7
|
+
/** @description The e-mail address of the person who will be there for the pickup. */
|
|
5
8
|
email!: string;
|
|
9
|
+
/** @description The phone number of the person who will be there for the pickup. */
|
|
6
10
|
phone_number!: string;
|
|
11
|
+
/** @description The phone extension of the person who will be there for the pickup. */
|
|
7
12
|
phone_number_extension?: string;
|
|
8
13
|
}
|
|
@@ -2,6 +2,7 @@ import { ShipFrom } from '../addresses/ship-from';
|
|
|
2
2
|
|
|
3
3
|
/** @description Location details for pickup */
|
|
4
4
|
export class PickupLocationDetails {
|
|
5
|
+
/** @description The address the pickup will take place */
|
|
5
6
|
pickup_address?: ShipFrom;
|
|
6
7
|
/** @description Any notes that may be helpful for a driver to find the pickup location */
|
|
7
8
|
location_notes?: string;
|
|
@@ -5,11 +5,18 @@ import { Dimensions } from '../units/dimensions';
|
|
|
5
5
|
|
|
6
6
|
/** @description Basic structure for a package to be picked up */
|
|
7
7
|
export class PickupPackage {
|
|
8
|
+
/** @description The carrier tracking number for this shipment */
|
|
8
9
|
tracking_number?: string;
|
|
10
|
+
/** @description Alternative identifiers associated with this package */
|
|
9
11
|
alternative_identifiers?: Identifier[];
|
|
12
|
+
/** @description Details about the dimensions of the package */
|
|
10
13
|
dimension_details?: DimensionDetails;
|
|
14
|
+
/** @description Details about the weight of the package */
|
|
11
15
|
weight_details?: WeightDetails;
|
|
16
|
+
/** @description The code associated with the package type */
|
|
12
17
|
package_code?: string;
|
|
18
|
+
/** @deprectated Please use the weight_details property */
|
|
13
19
|
weight?: number;
|
|
20
|
+
/** @deprectated Please use the dimension_details property */
|
|
14
21
|
dimensions?: Dimensions;
|
|
15
22
|
}
|
|
@@ -2,6 +2,7 @@ import { ShippedShipment } from './shipped-shipment';
|
|
|
2
2
|
|
|
3
3
|
/** @description Details for a pickup shipment */
|
|
4
4
|
export class PickupShipmentDetails {
|
|
5
|
+
/** @description Service category for the carrier (ground, express, next_day) */
|
|
5
6
|
pickup_service_code?: string;
|
|
6
7
|
/** @description List of shipments to be picked up */
|
|
7
8
|
shipments?: ShippedShipment[];
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import Joi from 'joi';
|
|
2
2
|
|
|
3
|
-
/** @description
|
|
3
|
+
/** @description This model represents a window of time a pickup could be made. */
|
|
4
4
|
export class PickupWindow {
|
|
5
|
+
/** @description The local time zone represented in IANA. See https://www.iana.org/time-zones */
|
|
5
6
|
time_zone_iana!: string;
|
|
7
|
+
/** @description The local date the pickup will occur. Formatted per https://tools.ietf.org/html/rfc3339 */
|
|
6
8
|
pickup_date!: string;
|
|
9
|
+
/** @description The time relative to the time_zone_iana that the carrier says that the pickup could occur. Formatted per https://tools.ietf.org/html/rfc3339 */
|
|
7
10
|
start_time?: string;
|
|
11
|
+
/** @description The end of the window when the pickup could be made relative to the time_zone_iana. Formatted per https://tools.ietf.org/html/rfc3339 */
|
|
8
12
|
end_time?: string;
|
|
9
13
|
}
|
|
10
14
|
export const PickupWindowSchema = Joi.object({
|
|
@@ -3,7 +3,9 @@ import { Identifier, IdentifierSchema } from '../identifier';
|
|
|
3
3
|
|
|
4
4
|
/** @description Identifier object for shiments */
|
|
5
5
|
export class ShipmentIdentifier {
|
|
6
|
+
/** @description The carrier tracking number for this shipment */
|
|
6
7
|
tracking_number?: string;
|
|
8
|
+
/** @description A list of alternate identifiers that can be used to identify a shipment */
|
|
7
9
|
alternate_identifiers?: Identifier[];
|
|
8
10
|
}
|
|
9
11
|
|
|
@@ -5,11 +5,18 @@ import { Dimensions } from '../units/dimensions';
|
|
|
5
5
|
|
|
6
6
|
/** @description Basic structure for a package that has been shipped */
|
|
7
7
|
export class ShippedPackage {
|
|
8
|
+
/** @description The carrier tracking number associated with this package */
|
|
8
9
|
tracking_number?: string;
|
|
10
|
+
/** @description Alternative identifiers associated with this package */
|
|
9
11
|
alternative_identifiers?: Identifier[];
|
|
12
|
+
/** @description Details about the dimensions of the package */
|
|
10
13
|
dimension_details?: DimensionDetails;
|
|
14
|
+
/** @description Details about the weight of the package */
|
|
11
15
|
weight_details?: WeightDetails;
|
|
16
|
+
/** @description The code associated with the package type */
|
|
12
17
|
package_code?: string;
|
|
18
|
+
/** @deprectated Please use the weight_details property */
|
|
13
19
|
weight?: number;
|
|
20
|
+
/** @deprectated Please use the dimension_details property */
|
|
14
21
|
dimensions?: Dimensions;
|
|
15
22
|
}
|
|
@@ -6,11 +6,17 @@ import { ShippedPackage } from './shipped-package';
|
|
|
6
6
|
|
|
7
7
|
/** @description Basic structure for a shipment that has been shipped */
|
|
8
8
|
export class ShippedShipment extends Label {
|
|
9
|
+
/** @description The carrier tracking number associated with this package */
|
|
9
10
|
tracking_number?: string;
|
|
11
|
+
/** @description The address that a shipment will be delivered to */
|
|
10
12
|
ship_to?: ShipTo;
|
|
13
|
+
/** @description Non-tracking alternative ids associated with this shipment */
|
|
11
14
|
alternative_identifiers?: Identifier[];
|
|
15
|
+
/** @description The service code used for this shipment */
|
|
12
16
|
service_code?: string;
|
|
17
|
+
/** @description The list of packages associated with this shipment */
|
|
13
18
|
packages?: ShippedPackage[];
|
|
19
|
+
/** @description Advanced shipping options (Contains Alcohol, Non Machinable, etc) */
|
|
14
20
|
advanced_options?: AdvancedOptions;
|
|
15
21
|
}
|
|
16
22
|
|
package/src/models/rates/rate.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { TimeWindow, TimeWindowSchema } from '../time-window';
|
|
|
7
7
|
|
|
8
8
|
/** @description Basic structure for a rate */
|
|
9
9
|
export class Rate {
|
|
10
|
+
/** @description The service code uniquely identifies a shipping service that you offer. Which service codes can be passed to you will be configured in ShipEngine. If this field is missing, the rate will be discarded. */
|
|
10
11
|
service_code?: string;
|
|
11
12
|
/** @description ISO 8601 formatted date for shipment */
|
|
12
13
|
ship_datetime?: string;
|
|
@@ -26,10 +27,7 @@ export class Rate {
|
|
|
26
27
|
delivery_window?: TimeWindow;
|
|
27
28
|
/** @description Unique identifier for the carrier rate */
|
|
28
29
|
carrier_rate_id?: string;
|
|
29
|
-
/** @description DateTime after which the rate will no longer be accepted.
|
|
30
|
-
* ISO 8601 format, with local offset.
|
|
31
|
-
* Example: 2021-08-20T14:38:36.859237-05:00
|
|
32
|
-
*/
|
|
30
|
+
/** @description DateTime after which the rate will no longer be accepted. ISO 8601 format, with local offset. Example: 2021-08-20T14:38:36.859237-05:00 */
|
|
33
31
|
expiration_datetime?: string;
|
|
34
32
|
}
|
|
35
33
|
|
|
@@ -2,7 +2,9 @@ import Joi from 'joi';
|
|
|
2
2
|
|
|
3
3
|
/** @description Basic structure for credentials */
|
|
4
4
|
export class Credentials {
|
|
5
|
+
/** @description The username, used as the unique identifier for the account */
|
|
5
6
|
username!: string;
|
|
7
|
+
/** @description The password that will be sent in future requests */
|
|
6
8
|
password!: string;
|
|
7
9
|
}
|
|
8
10
|
|
|
@@ -2,7 +2,9 @@ import Joi from 'joi';
|
|
|
2
2
|
|
|
3
3
|
/** @description Basic structure for a resource to download */
|
|
4
4
|
export class ResourceDownload {
|
|
5
|
+
/** @deprecated This property is not used by the platform */
|
|
5
6
|
href?: string;
|
|
7
|
+
/** @description Base64 encoded data for the resource */
|
|
6
8
|
data?: string;
|
|
7
9
|
}
|
|
8
10
|
|