import type { Square } from "square" import { defineSquareOperation } from "../lib" /** Provides a paginated list of events for a single cash drawer shift. */ export const listSquareCashDrawerShiftEvents = defineSquareOperation< Square.cashDrawers.ListEventsShiftsRequest, Square.ListCashDrawerShiftEventsResponse >({ allowedKeys: ["shiftId", "locationId", "limit", "cursor"], description: "Provides a paginated list of events for a single cash drawer shift.", execute: (api, input) => api.cashDrawers.shifts.listEvents(input), name: "List Square Cash Drawer Shift Events", replaySafety: "safe", requiredKeys: ["shiftId", "locationId"], scopes: ["CASH_DRAWER_READ"], }) /** * Provides the details for all of the cash drawer shifts for a location in a * date range. */ export const listSquareCashDrawerShifts = defineSquareOperation< Square.cashDrawers.ListShiftsRequest, Square.ListCashDrawerShiftsResponse >({ allowedKeys: [ "locationId", "sortOrder", "beginTime", "endTime", "limit", "cursor", ], description: "Provides the details for all of the cash drawer shifts for a location in a date range.", execute: (api, input) => api.cashDrawers.shifts.list(input), name: "List Square Cash Drawer Shifts", replaySafety: "safe", requiredKeys: ["locationId"], scopes: ["CASH_DRAWER_READ"], }) /** Provides the summary details for a single cash drawer shift. */ export const retrieveSquareCashDrawerShift = defineSquareOperation< Square.cashDrawers.GetShiftsRequest, Square.GetCashDrawerShiftResponse >({ allowedKeys: ["shiftId", "locationId"], description: "Provides the summary details for a single cash drawer shift.", execute: (api, input) => api.cashDrawers.shifts.get(input), name: "Retrieve Square Cash Drawer Shift", replaySafety: "safe", requiredKeys: ["shiftId", "locationId"], scopes: ["CASH_DRAWER_READ"], })