UNPKG

@goparrot/franchise-mcp-server

Version:

MCP Server for Franchise API

96 lines (95 loc) 2.87 kB
import { dashboardBaseUrl, makeRequest } from '../../common/index.js'; /** * Method information for dashboard place picker endpoints */ export const PlacePickerMethods = { list: { description: 'List all place picker stores for a merchant', method: 'get', path: '/webstore/api/v2/merchants/{merchantId}/place-picker-stores', pathParams: [ { name: 'merchantId', type: 'string', description: 'Merchant ID', required: true, }, ], queryParams: [], requestType: 'ListPlacePickerStoresRequest', isMultipart: false, originalName: 'list', isWrite: false, permissions: ['merchant:api:read'], }, patch: { description: 'Update place picker store configuration', method: 'patch', path: '/webstore/api/v2/merchants/{merchantId}/place-picker-stores/{storeId}', pathParams: [ { name: 'merchantId', type: 'string', description: 'Merchant ID', required: true, }, { name: 'storeId', type: 'string', description: 'Store ID', required: true, }, ], queryParams: [], requestType: 'PatchPlacePickerStoreRequest', isMultipart: false, originalName: 'patch', isWrite: true, permissions: ['merchant:api:read', 'store:api:read'], }, getTemplate: { description: 'Get place picker template for a merchant', method: 'get', path: '/webstore/api/v2/template-by-merchants/{merchantId}', pathParams: [ { name: 'merchantId', type: 'string', description: 'Merchant ID', required: true, }, ], queryParams: [], requestType: 'GetPlacePickerTemplateRequest', isMultipart: false, originalName: 'getTemplate', isWrite: false, permissions: ['merchant:api:read'], }, }; /** * Handlers for dashboard place picker endpoints */ export const PlacePickerHandlers = { list: async (accessToken, args) => { return makeRequest(PlacePickerMethods.list, { baseUrl: dashboardBaseUrl, accessToken, args, }); }, patch: async (accessToken, args) => { return makeRequest(PlacePickerMethods.patch, { baseUrl: dashboardBaseUrl, accessToken, args, }); }, getTemplate: async (accessToken, args) => { return makeRequest(PlacePickerMethods.getTemplate, { baseUrl: dashboardBaseUrl, accessToken, args, }); }, };