import { lazy , object , optional , Schema , string } from '../schema' ; import { SourceApplication , sourceApplicationSchema , } from './sourceApplication' ; /**
 * Represents the quantity of an item variation that is physically present
 * at a specific location, verified by a seller or a seller's employee. For example,
 * a physical count might come from an employee counting the item variations on
 * hand or from syncing with an external system.
 */ export interface InventoryPhysicalCount { /**
     * A unique Square-generated ID for the
     * [InventoryPhysicalCount]($m/InventoryPhysicalCount).
     */ id ? : string ; /**
     * An optional ID provided by the application to tie the
     * [InventoryPhysicalCount]($m/InventoryPhysicalCount) to an external
     * system.
     */ referenceId ? : 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 ; /** 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 is being tracked.
     */ locationId ? : string ; /**
     * The number of items affected by the physical count as a decimal string.
     * The number can support up to 5 digits after the decimal point.
     */ quantity ? : 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
     * physical count.
     */ employeeId ? : string ; /**
     * A client-generated RFC 3339-formatted timestamp that indicates when
     * the physical count was examined. For physical count updates, 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 the physical count is received. */ createdAt ? : string ; } export const inventoryPhysicalCountSchema = object ( { id : [ 'id' , optional ( string ( ) ) ] , referenceId : [ 'reference_id' , optional ( string ( ) ) ] , catalogObjectId : [ 'catalog_object_id' , optional ( string ( ) ) ] , catalogObjectType : [ 'catalog_object_type' , optional ( string ( ) ) ] , state : [ 'state' , optional ( string ( ) ) ] , locationId : [ 'location_id' , optional ( string ( ) ) ] , quantity : [ 'quantity' , optional ( string ( ) ) ] , source : [ 'source' , optional ( lazy ( ( ) => sourceApplicationSchema ) ) ] , employeeId : [ 'employee_id' , optional ( string ( ) ) ] , occurredAt : [ 'occurred_at' , optional ( string ( ) ) ] , createdAt : [ 'created_at' , optional ( string ( ) ) ] , } ) ;