UNPKG

@shipengine/connect-carrier-api

Version:

This is the typescript/javascript definitions for carrier api

41 lines (40 loc) 2.25 kB
import { ConfirmationType } from './confirmation-type'; import { CountryAssociation } from './country-association'; import { ServiceAttributesEnum } from './services-attributes'; import { LabelSizesEnum } from './label-sizes'; import { ServiceClassEnum } from './service-class'; import { ServiceGradeEnum } from './service-grade'; import { ServiceRequiredPropertiesEnum } from './service-required-properties'; import Joi from 'joi'; /** @description Basic structure for each shipping service */ export interface ShippingService { /** @description The confirmation types associated with this service */ ConfirmationTypes?: ConfirmationType[]; /** @description A list of attributes about this service */ ServiceAttributes?: ServiceAttributesEnum[]; /** @description A list of countries supported by this service */ SupportedCountries?: CountryAssociation[]; /** @description A list of label sizes supported by this service */ SupportedLabelSizes?: LabelSizesEnum[]; /** @description */ RequiredProperties?: ServiceRequiredPropertiesEnum[]; /** @description The grade of the service. ex: Economy, Expedited, Overnight */ Grade?: ServiceGradeEnum; /** @description The class of service. ex: Ground, OneDay, ThreeDay */ Class?: ServiceClassEnum; /** @description The label code associated with this shipping service */ LabelCode?: string; /** @description Indicates whether or not this service is for international or domestic use */ International?: boolean; /** @description This is the code that will be sent to requests, this should be the same code the carrier's api would expect */ Code: string; /** @description This is an abbreviation of the name, can match the name if it is short enough */ Abbreviation: string; /** @description The name of this shipping service ex: 'Overnight Guarantee' */ Name: string; /** @description The identifier for this shipping service to be used in API calls. Must be snake cased and unique */ ApiCode?: string; /** @description The unique identifier for this shipping service. It should not change after being published */ Id: string; } export declare const ShippingServiceSchema: Joi.ObjectSchema<any>;