commerce/framework/csv/product/get-all-products.ts
2021-04-18 11:52:51 -03:00

27 lines
426 B
TypeScript

import { Product } from '@commerce/types'
import { CSVConfig } from '../index'
import mock from './mock'
interface GetAllProducts {
products: Product[]
}
interface Parameters {
variables: {
first: number
}
config: CSVConfig
preview?: boolean
}
const getAllProducts = async (
_parameters: Parameters
): Promise<GetAllProducts> => {
return {
products: [mock.full],
}
}
export default getAllProducts