@camstack/types 1.2.561 → 1.2.562
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.
- package/CHANGELOG.md +12 -0
- package/dist/addon/instances-of-cap.d.ts +7 -2
- package/dist/addon.js +2 -2
- package/dist/addon.mjs +2 -2
- package/dist/automation/codegen.d.ts +6 -0
- package/dist/automation/recipe-literal.d.ts +35 -0
- package/dist/automation/recipe.d.ts +46 -0
- package/dist/automation/template-link.d.ts +206 -0
- package/dist/capabilities/energy-system.cap.d.ts +281 -0
- package/dist/capabilities/index.d.ts +4 -2
- package/dist/capabilities/integration-instances.cap.d.ts +9 -0
- package/dist/capabilities/template.cap.d.ts +39 -2
- package/dist/client.js +8 -0
- package/dist/client.mjs +8 -0
- package/dist/{composed-stable-id-iddnCQ51.mjs → composed-stable-id-B3wcvtvW.mjs} +4 -0
- package/dist/{composed-stable-id-BmJ_5GiE.js → composed-stable-id-Bp33yrYi.js} +4 -0
- package/dist/device/device-control-resolution.d.ts +1 -1
- package/dist/device/device-icon.d.ts +1 -0
- package/dist/device/device-type.d.ts +5 -1
- package/dist/device/hero/hero-layout.d.ts +1 -0
- package/dist/device/hero/hero-look.d.ts +6 -0
- package/dist/device/hero/hero-scene.d.ts +1 -0
- package/dist/generated/addon-api.d.ts +14 -0
- package/dist/generated/addon-cap-facts.d.ts +1 -1
- package/dist/generated/cap-status-types.d.ts +3 -1
- package/dist/generated/cap-vocabulary.d.ts +1 -1
- package/dist/generated/capability-router-map.d.ts +5 -2
- package/dist/generated/customize-catalog.d.ts +1 -1
- package/dist/generated/device-local-state.d.ts +3 -0
- package/dist/generated/device-proxy.d.ts +3 -0
- package/dist/generated/device-scoped-caps.d.ts +1 -1
- package/dist/generated/history-catalog.d.ts +1 -1
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/method-device-selectors.d.ts +1 -1
- package/dist/generated/runtime-state-durability.d.ts +1 -1
- package/dist/{implemented-methods-CfaRR_ki.js → implemented-methods-CDYOCn9a.js} +1 -1
- package/dist/{implemented-methods-CSTk6zYK.mjs → implemented-methods-CgUBu6uM.mjs} +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +1505 -171
- package/dist/index.mjs +1458 -172
- package/dist/node.js +2 -2
- package/dist/node.mjs +2 -2
- package/dist/{sleep-CcUFeK6k.js → sleep-Cb2px0Nb.js} +105 -3
- package/dist/{sleep-C9PbO6Nb.mjs → sleep-Cykc2bzi.mjs} +105 -3
- package/dist/template/automation-template.d.ts +782 -0
- package/dist/template/builtin-automation-templates.d.ts +17 -0
- package/dist/template/template-kinds.d.ts +4 -3
- package/package.json +1 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Automation templates shipped with CamStack (#527). They are read-only records
|
|
3
|
+
* of the template store: `template.list` returns them beside the operator's
|
|
4
|
+
* own, under `builtin:` ids, and an update or delete of one is refused. They
|
|
5
|
+
* are code, not seeded rows, so a new release changes them without a
|
|
6
|
+
* migration and nothing an operator saved is ever overwritten.
|
|
7
|
+
*/
|
|
8
|
+
import { type AutomationTemplatePayload } from './automation-template.js';
|
|
9
|
+
export declare const BUILTIN_TEMPLATE_ID_PREFIX = "builtin:";
|
|
10
|
+
export interface BuiltinAutomationTemplate {
|
|
11
|
+
readonly id: string;
|
|
12
|
+
readonly name: string;
|
|
13
|
+
readonly payload: AutomationTemplatePayload;
|
|
14
|
+
}
|
|
15
|
+
export declare const BUILTIN_AUTOMATION_TEMPLATES: readonly BuiltinAutomationTemplate[];
|
|
16
|
+
export declare function isBuiltinTemplateId(id: string): boolean;
|
|
17
|
+
export declare function builtinAutomationTemplate(id: string): BuiltinAutomationTemplate | undefined;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Template kinds (D963). A template is a named, reusable piece of operator
|
|
3
|
-
* data that more than one device points at —
|
|
4
|
-
*
|
|
3
|
+
* data that more than one device points at — the button grid of a remote,
|
|
4
|
+
* and an automation body with declared inputs (#527). The store is generic: it keeps `{ id, kind, name, payload }` and
|
|
5
5
|
* knows nothing of a remote. Only the SYSTEM declares kinds, here: each kind
|
|
6
6
|
* names the schema its payload must satisfy. Adding a kind is adding a member
|
|
7
7
|
* to `TEMPLATE_KINDS` and a payload schema; the compiler refuses one without
|
|
8
8
|
* the other.
|
|
9
9
|
*/
|
|
10
10
|
import { z } from 'zod';
|
|
11
|
-
export declare const TEMPLATE_KINDS: readonly ['remote'];
|
|
11
|
+
export declare const TEMPLATE_KINDS: readonly ['remote', 'automation'];
|
|
12
12
|
export declare const TemplateKindSchema: z.ZodEnum<{
|
|
13
|
+
automation: "automation";
|
|
13
14
|
remote: "remote";
|
|
14
15
|
}>;
|
|
15
16
|
export type TemplateKind = z.infer<typeof TemplateKindSchema>;
|