feat(contracts,automation): add multi-group scopes, SMS macros and operator registry

- Allow scheduled operations to resolve multiple device groups.

- Add reusable SMS time and random-value macros.

- Add China operator PLMN metadata shared by API and UI.
This commit is contained in:
chick
2026-09-07 00:44:33 +08:00
parent 8b7df8cb65
commit 8406f14469
9 changed files with 276 additions and 3 deletions
@@ -64,7 +64,7 @@ describe('resolveTargets', () => {
db.close();
});
it('resolves the Hub all-devices and single-group selectors', () => {
it('resolves the Hub all-devices and group selectors', () => {
const db = fixture();
const now = '2026-07-30T00:00:00.000Z';
db.prepare(
@@ -78,6 +78,9 @@ describe('resolveTargets', () => {
expect(resolveTargets(db, { mode: 'group', groupId: 'g-lab' })).toEqual([
{ id: 'a', revision: 3 },
]);
expect(resolveTargets(db, { mode: 'groups', groupIds: ['g-lab', 'g-office'] })).toEqual([
{ id: 'a', revision: 3 },
]);
db.close();
});