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:
@@ -34,6 +34,7 @@ export type ScheduleTargetSelector =
|
||||
| { readonly mode: 'fixed'; readonly instanceIds: readonly string[] }
|
||||
| { readonly mode: 'tags'; readonly match: 'any' | 'all'; readonly tags: readonly string[] }
|
||||
| { readonly mode: 'group'; readonly groupId: string }
|
||||
| { readonly mode: 'groups'; readonly groupIds: readonly string[] }
|
||||
| { readonly mode: 'all' };
|
||||
|
||||
/**
|
||||
@@ -244,6 +245,10 @@ function targetSelector(value: unknown): ScheduleTargetSelector {
|
||||
exactKeys(source, new Set(['mode', 'groupId']));
|
||||
return { mode: 'group', groupId: string(source.groupId, 'groupId', 120) };
|
||||
}
|
||||
if (source.mode === 'groups') {
|
||||
exactKeys(source, new Set(['mode', 'groupIds']));
|
||||
return { mode: 'groups', groupIds: strings(source.groupIds, 'groupIds', 200) };
|
||||
}
|
||||
if (source.mode === 'all') {
|
||||
exactKeys(source, new Set(['mode']));
|
||||
return { mode: 'all' };
|
||||
|
||||
Reference in New Issue
Block a user