import { MercoaApi, MercoaApiClient } from "@mercoa/javascript"
const mercoa = new MercoaApiClient({
token: 'YOUR_API_KEY',
});
const entity = await mercoa.entity.find({
foreignId: 'YOUR_CUSTOMER_ID'
});
const invoices = await mercoa.entity.invoice.find(entity.id, {
status: [
MercoaApi.InvoiceStatus.APPROVED,
MercoaApi.InvoiceStatus.SCHEDULED
],
});