import { definePlay } from 'deepline';
type Account = {
domain: string;
};
export default definePlay('account-refresh', async (ctx, input: { accounts: Account[] }) => {
const rows = await ctx
.dataset('account_refresh', input.accounts)
.withColumn('company_signal', (account, rowCtx) =>
rowCtx.tools.execute({
id: 'company_signal',
tool: 'test_rate_limit',
input: { key: account.domain },
description: 'Refresh one account signal.',
}),
)
.run({ key: 'domain' });
return { rows };
}, {
billing: { maxCreditsPerRun: 25 },
});