Provide a code example in TypeScript using the plaid Node SDK:
import { PlaidApi, Configuration, PlaidEnvironments } from "plaid";
const config = new Configuration({
basePath: PlaidEnvironments.sandbox,
baseOptions: {
headers: {
"PLAID-CLIENT-ID": process.env.PLAID_CLIENT_ID,
"PLAID-SECRET": process.env.PLAID_SECRET,
},
},
});
const plaidClient = new PlaidApi(config);
const response = await plaidClient.transactionsSync({
access_token: accessToken,
cursor: lastCursor ?? undefined,
count: 100,
});
const { added, modified, removed, next_cursor, has_more } = response.data;