import type { Square } from "square" import { defineSquareOperation } from "../lib" /** Retrieves the list of customer segments of a business. */ export const listSquareCustomerSegments = defineSquareOperation< Square.customers.ListSegmentsRequest, Square.ListCustomerSegmentsResponse >({ allowedKeys: ["cursor", "limit"], description: "Retrieves the list of customer segments of a business.", execute: (api, input) => api.customers.segments.list(input), name: "List Square Customer Segments", replaySafety: "safe", requiredKeys: [], scopes: ["CUSTOMERS_READ"], }) /** * Retrieves a specific customer segment as identified by the `segment_id` * value. */ export const retrieveSquareCustomerSegment = defineSquareOperation< Square.customers.GetSegmentsRequest, Square.GetCustomerSegmentResponse >({ allowedKeys: ["segmentId"], description: "Retrieves a specific customer segment as identified by the `segment_id` value.", execute: (api, input) => api.customers.segments.get(input), name: "Retrieve Square Customer Segment", replaySafety: "safe", requiredKeys: ["segmentId"], scopes: ["CUSTOMERS_READ"], })