feat: scope blacklists and paginate phone segments

This commit is contained in:
hectorzhao
2026-07-10 13:42:39 +08:00
parent ff0756ff9c
commit d5e668a2e6
18 changed files with 322 additions and 86 deletions
@@ -490,6 +490,7 @@ describe('SendChainService', () => {
await expect(
service.previewImport({
tenantId: 'tenant-1',
applicationId: 'app-1',
content: 'phoneNumber,code\n13800000001,1234\n13800000001,1234\nbad,1234\n13800000003,1234\n13900000001,',
requiredVariables: ['code'],
}),
@@ -507,6 +508,10 @@ describe('SendChainService', () => {
]),
}),
);
expect(prisma.enterpriseBlacklist.findMany).toHaveBeenCalledWith({
where: { tenantId: 'tenant-1', applicationId: 'app-1', status: 'active' },
select: { phoneNumber: true },
});
});
it('adds queued message jobs for a batch task', async () => {