@camstack/types 1.2.229 → 1.2.230
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -770,6 +770,20 @@ export interface ConfigAddonActionButtonField extends ConfigFieldBase {
|
|
|
770
770
|
paramsFromForm?: Readonly<Record<string, string>>;
|
|
771
771
|
/** Static params merged into the action input. */
|
|
772
772
|
paramsStatic?: Readonly<Record<string, unknown>>;
|
|
773
|
+
/**
|
|
774
|
+
* Merge the form's DEVICE into the action input as `deviceId`.
|
|
775
|
+
*
|
|
776
|
+
* An addon action on a per-camera form almost always needs to know which
|
|
777
|
+
* camera, and a device id is not something a field can carry: it is context,
|
|
778
|
+
* not a value the operator typed. Without this the only way to put an addon
|
|
779
|
+
* action on a device form was `device-action-button`, which goes to a
|
|
780
|
+
* different door (`deviceManager.runDeviceAction`) and therefore to a
|
|
781
|
+
* different registration — so an addon that had registered a customAction
|
|
782
|
+
* could not offer it here at all.
|
|
783
|
+
*
|
|
784
|
+
* No-op on a form with no device.
|
|
785
|
+
*/
|
|
786
|
+
includeDeviceId?: boolean;
|
|
773
787
|
/** Toast/inline success message template. `{key}` placeholders are
|
|
774
788
|
* resolved against the action result. */
|
|
775
789
|
successMessage?: string;
|