import type { Square } from "square" import { defineSquareOperation } from "../lib" /** Provides details about the merchant associated with a given access token. */ export const listSquareMerchants = defineSquareOperation< Square.ListMerchantsRequest, Square.ListMerchantsResponse >({ allowedKeys: ["cursor"], description: "Provides details about the merchant associated with a given access token.", execute: (api, input) => api.merchants.list(input), name: "List Square Merchants", replaySafety: "safe", requiredKeys: [], scopes: ["MERCHANT_PROFILE_READ"], }) /** Retrieves the `Merchant` object for the given `merchant_id`. */ export const retrieveSquareMerchant = defineSquareOperation< Square.GetMerchantsRequest, Square.GetMerchantResponse >({ allowedKeys: ["merchantId"], description: "Retrieves the `Merchant` object for the given `merchant_id`.", execute: (api, input) => api.merchants.get(input), name: "Retrieve Square Merchant", replaySafety: "safe", requiredKeys: ["merchantId"], scopes: ["MERCHANT_PROFILE_READ"], })