import * as z from "zod/v4-mini"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { Address } from "./address.js"; import { CustomsDeclaration } from "./customsdeclaration.js"; import { Parcel } from "./parcel.js"; import { Rate } from "./rate.js"; import { ResponseMessage } from "./responsemessage.js"; import { ShipmentExtra } from "./shipmentextra.js"; /** * `Waiting` shipments have been successfully submitted but not yet been processed. * * @remarks * `Queued` shipments are currently being processed. * `Success` shipments have been processed successfully, meaning that rate generation has concluded. * `Error` does not occur currently and is reserved for future use. */ export declare const ShipmentStatus: { readonly Error: "ERROR"; readonly Queued: "QUEUED"; readonly Success: "SUCCESS"; readonly Waiting: "WAITING"; }; /** * `Waiting` shipments have been successfully submitted but not yet been processed. * * @remarks * `Queued` shipments are currently being processed. * `Success` shipments have been processed successfully, meaning that rate generation has concluded. * `Error` does not occur currently and is reserved for future use. */ export type ShipmentStatus = ClosedEnum; /** * Shipment represents the parcel as retrieved from the database */ export type Shipment = { /** * An object holding optional extra services to be requested. */ extra?: ShipmentExtra | undefined; /** * A string of up to 100 characters that can be filled with any additional information you want to attach to the object. */ metadata: string; /** * Date the shipment will be tendered to the carrier. Must be in the format `2014-01-18T00:35:03.463Z`. * * @remarks * Defaults to current date and time if no value is provided. Please note that some carriers require this value to * be in the future, on a working day, or similar. */ shipmentDate?: string | undefined; /** * Address object of the sender / seller. Will be returned expanded by default. */ addressFrom: Address; /** * ID of the Address object where the shipment will be sent back to if it is not delivered * * @remarks * (Only available for UPS, USPS, and Fedex shipments).
* If this field is not set, your shipments will be returned to the address_from. */ addressReturn?: Address | undefined; /** * Address object of the recipient / buyer. Will be returned expanded by default. */ addressTo: Address; /** * An array of object_ids of the carrier account objects to be used for getting shipping rates for this shipment. * * @remarks * If no carrier account object_ids are set in this field, Shippo will attempt to generate rates using all the * carrier accounts that have the `active` field set. */ carrierAccounts: Array; customsDeclaration?: CustomsDeclaration | undefined; messages: Array; /** * Date and time of Shipment creation. */ objectCreated: Date; /** * Unique identifier of the given Shipment object. */ objectId: string; /** * Username of the user who created the Shipment object. */ objectOwner: string; /** * Date and time of last Shipment update. */ objectUpdated: Date; /** * List of Parcel objects to be shipped. */ parcels: Array; /** * An array with all available rates. If async has been set to false in the request, * * @remarks * this will be populated with all available rates in the response. Otherwise rates will be created * asynchronously and this array will initially be empty. */ rates: Array; /** * `Waiting` shipments have been successfully submitted but not yet been processed. * * @remarks * `Queued` shipments are currently being processed. * `Success` shipments have been processed successfully, meaning that rate generation has concluded. * `Error` does not occur currently and is reserved for future use. */ status: ShipmentStatus; /** * Indicates whether the object has been created in test mode. */ test?: boolean | undefined; }; /** @internal */ export declare const ShipmentStatus$inboundSchema: z.ZodMiniEnum; /** @internal */ export declare const Shipment$inboundSchema: z.ZodMiniType; export declare function shipmentFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=shipment.d.ts.map