import type * as Square from "../index"; /** * Represents an action processed by the Square Terminal. */ export interface TerminalAction { /** A unique ID for this `TerminalAction`. */ id?: string; /** * The unique Id of the device intended for this `TerminalAction`. * The Id can be retrieved from /v2/devices api. */ deviceId?: string | null; /** * The duration as an RFC 3339 duration, after which the action will be automatically canceled. * TerminalActions that are `PENDING` will be automatically `CANCELED` and have a cancellation reason * of `TIMED_OUT` * * Default: 5 minutes from creation * * Maximum: 5 minutes */ deadlineDuration?: string | null; /** * The status of the `TerminalAction`. * Options: `PENDING`, `IN_PROGRESS`, `CANCEL_REQUESTED`, `CANCELED`, `COMPLETED` */ status?: string; /** * The reason why `TerminalAction` is canceled. Present if the status is `CANCELED`. * See [ActionCancelReason](#type-actioncancelreason) for possible values */ cancelReason?: Square.ActionCancelReason; /** The time when the `TerminalAction` was created as an RFC 3339 timestamp. */ createdAt?: string; /** The time when the `TerminalAction` was last updated as an RFC 3339 timestamp. */ updatedAt?: string; /** The ID of the application that created the action. */ appId?: string; /** The location id the action is attached to, if a link can be made. */ locationId?: string; /** * Represents the type of the action. * See [ActionType](#type-actiontype) for possible values */ type?: Square.TerminalActionActionType; /** Describes configuration for the QR code action. Requires `QR_CODE` type. */ qrCodeOptions?: Square.QrCodeOptions; /** Describes configuration for the save-card action. Requires `SAVE_CARD` type. */ saveCardOptions?: Square.SaveCardOptions; /** Describes configuration for the signature capture action. Requires `SIGNATURE` type. */ signatureOptions?: Square.SignatureOptions; /** Describes configuration for the confirmation action. Requires `CONFIRMATION` type. */ confirmationOptions?: Square.ConfirmationOptions; /** Describes configuration for the receipt action. Requires `RECEIPT` type. */ receiptOptions?: Square.ReceiptOptions; /** Describes configuration for the data collection action. Requires `DATA_COLLECTION` type. */ dataCollectionOptions?: Square.DataCollectionOptions; /** Describes configuration for the select action. Requires `SELECT` type. */ selectOptions?: Square.SelectOptions; /** * Details about the Terminal that received the action request (such as battery level, * operating system version, and network connection settings). * * Only available for `PING` action type. */ deviceMetadata?: Square.DeviceMetadata; /** * Indicates the action will be linked to another action and requires a waiting dialog to be * displayed instead of returning to the idle screen on completion of the action. * * Only supported on SIGNATURE, CONFIRMATION, DATA_COLLECTION, and SELECT types. */ awaitNextAction?: boolean | null; /** * The timeout duration of the waiting dialog as an RFC 3339 duration, after which the * waiting dialog will no longer be displayed and the Terminal will return to the idle screen. * * Default: 5 minutes from when the waiting dialog is displayed * * Maximum: 5 minutes */ awaitNextActionDuration?: string | null; }