import { lazy , object , optional , Schema , string } from '../schema' ; import { SourceApplication , sourceApplicationSchema , } from './sourceApplication' ; /**
 * Represents the transfer of a quantity of product inventory at a
 * particular time from one location to another.
 */ export interface InventoryTransfer { /**
     * A unique ID generated by Square for the
     * `InventoryTransfer`.
     */ id ? : string ; /**
     * An optional ID provided by the application to tie the
     * `InventoryTransfer` to an external system.
     */ referenceId ? : string ; /** Indicates the state of a tracked item quantity in the lifecycle of goods. */ state ? : string ; /**
     * The Square-generated ID of the [Location]($m/Location) where the related
     * quantity of items was tracked before the transfer.
     */ fromLocationId ? : string ; /**
     * The Square-generated ID of the [Location]($m/Location) where the related
     * quantity of items was tracked after the transfer.
     */ toLocationId ? : string ; /**
     * The Square-generated ID of the
     * [CatalogObject]($m/CatalogObject) being tracked.
     */ catalogObjectId ? : string ; /**
     * The [type]($m/CatalogObjectType) of the
     * [CatalogObject]($m/CatalogObject) being tracked.Tracking is only
     * supported for the `ITEM_VARIATION` type.
     */ catalogObjectType ? : string ; /**
     * The number of items affected by the transfer as a decimal string.
     * Can support up to 5 digits after the decimal point.
     */ quantity ? : string ; /**
     * A client-generated RFC 3339-formatted timestamp that indicates when
     * the transfer took place. For write actions, the `occurred_at` timestamp
     * cannot be older than 24 hours or in the future relative to the time of the
     * request.
     */ occurredAt ? : string ; /**
     * An RFC 3339-formatted timestamp that indicates when Square
     * received the transfer request.
     */ createdAt ? : string ; /** Provides information about the application used to generate a change. */ source ? : SourceApplication ; /**
     * The Square-generated ID of the [Employee]($m/Employee) responsible for the
     * inventory transfer.
     */ employeeId ? : string ; } export const inventoryTransferSchema = object ( { id : [ 'id' , optional ( string ( ) ) ] , referenceId : [ 'reference_id' , optional ( string ( ) ) ] , state : [ 'state' , optional ( string ( ) ) ] , fromLocationId : [ 'from_location_id' , optional ( string ( ) ) ] , toLocationId : [ 'to_location_id' , optional ( string ( ) ) ] , catalogObjectId : [ 'catalog_object_id' , optional ( string ( ) ) ] , catalogObjectType : [ 'catalog_object_type' , optional ( string ( ) ) ] , quantity : [ 'quantity' , optional ( string ( ) ) ] , occurredAt : [ 'occurred_at' , optional ( string ( ) ) ] , createdAt : [ 'created_at' , optional ( string ( ) ) ] , source : [ 'source' , optional ( lazy ( ( ) => sourceApplicationSchema ) ) ] , employeeId : [ 'employee_id' , optional ( string ( ) ) ] , } ) ;