UNPKG

@shipengine/connect-order-source-api

Version:

This is the typescript/javascript definitions for the order source api

76 lines 3.54 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.AddressSchema = exports.Address = exports.ResidentialIndicatorSchema = exports.ResidentialIndicator = exports.PickupLocationSchema = exports.PickupLocation = void 0; const tslib_1 = require("tslib"); const joi_1 = tslib_1.__importDefault(require("joi")); /** * @description Describes information about a drop off / pickup location */ class PickupLocation { /** @description An id specific to the carrier about this drop off / pickup location */ carrier_id; /** @description The id of a relay point used for the drop off / pickup location */ relay_id; } exports.PickupLocation = PickupLocation; exports.PickupLocationSchema = joi_1.default.object({ carrier_id: joi_1.default.string().required(), relay_id: joi_1.default.string().required(), }); /** * @description Used to indicate whether an address is in a residential or commercial area */ var ResidentialIndicator; (function (ResidentialIndicator) { ResidentialIndicator["Residential"] = "R"; ResidentialIndicator["Commercial"] = "C"; })(ResidentialIndicator || (exports.ResidentialIndicator = ResidentialIndicator = {})); exports.ResidentialIndicatorSchema = joi_1.default.string().valid(...Object.values(ResidentialIndicator)); /** * @description This defines the shape of an address */ class Address { /** @description The name of the individual associated with this address */ name; /** @description The name of the company associated with this address */ company; /** @description The phone number associated with this address */ phone; /** @description The first line of the address */ address_line_1; /** @description The second line of the address */ address_line_2; /** @description The third line of the address */ address_line_3; /** @description The city associated with this address */ city; /** @description The state, province, or municipality of the address */ state_province; /** @description The postal code associated with this address */ postal_code; /** @description The two character ISO 3166 country code of this address @example ("US","MX","CA") */ country_code; /** @description Indicates this is a residential or commercial address. Values: 'R', 'C', and null */ residential_indicator; /** @description Indicates whether or not this address has been verified using an Address Verification Service. Values: true, false, and null */ is_verified; /** @description Information details related to a pickup location if applicable */ pickup_location; } exports.Address = Address; exports.AddressSchema = joi_1.default.object({ name: joi_1.default.string().optional().empty(), company: joi_1.default.string().optional().empty(), phone: joi_1.default.string().optional().empty(), address_line_1: joi_1.default.string().optional().empty(), address_line_2: joi_1.default.string().optional().empty(), address_line_3: joi_1.default.string().optional().empty(), city: joi_1.default.string().optional().empty(), state_province: joi_1.default.string().optional().empty(), postal_code: joi_1.default.string().optional().empty(), country_code: joi_1.default.string().optional().empty(), residential_indicator: exports.ResidentialIndicatorSchema.optional(), is_verified: joi_1.default.boolean().optional(), pickup_location: exports.PickupLocationSchema.optional(), }); //# sourceMappingURL=address.js.map