@camstack/types 1.2.299 → 1.2.302
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/dist/addon.js +1 -1
- package/dist/addon.mjs +1 -1
- package/dist/capabilities/alarm-panel.cap.d.ts +21 -0
- package/dist/capabilities/index.d.ts +1 -1
- package/dist/capabilities/notification-output.cap.d.ts +41 -0
- package/dist/device/device-do-actions.d.ts +12 -0
- package/dist/generated/addon-api.d.ts +14 -0
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/system-proxy.d.ts +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +325 -9
- package/dist/index.mjs +324 -10
- package/dist/interfaces/config-ui.d.ts +85 -1
- package/dist/notification/system-event-summary.d.ts +13 -0
- package/dist/{sleep-G4F3X9X_.js → sleep-C3gDpn7G.js} +783 -637
- package/dist/{sleep-CDCONfkt.mjs → sleep-DXKLNFvA.mjs} +783 -637
- package/package.json +1 -1
|
@@ -80,7 +80,7 @@ export interface ConfigSection {
|
|
|
80
80
|
readonly immediate?: boolean;
|
|
81
81
|
readonly fields: readonly ConfigField[];
|
|
82
82
|
}
|
|
83
|
-
export type ConfigField = ConfigTextField | ConfigNumberField | ConfigBooleanField | ConfigSelectField | ConfigMultiSelectField | ConfigTimezoneField | ConfigDateTimeField | ConfigColorField | ConfigPasswordField | ConfigTextAreaField | ConfigSliderField | ConfigTagsField | ConfigGroupField | ConfigSubTabsField | ConfigSeparatorField | ConfigInfoField | ConfigQrCodeField | ConfigObjectArrayField | ConfigEditableArrayField | ConfigModelSelectorField | ConfigStorageLocationField | ConfigProbeField | ConfigButtonField | ConfigPipelineEditorField | ConfigNodeSelectField | ConfigNodeMultiSelectField | ConfigDeviceSelectField | ConfigDeviceMultiSelectField | ConfigWidgetField | ConfigAddonActionSelectField | ConfigAddonActionButtonField | ConfigDeviceActionButtonField;
|
|
83
|
+
export type ConfigField = ConfigTextField | ConfigNumberField | ConfigBooleanField | ConfigSelectField | ConfigMultiSelectField | ConfigTimezoneField | ConfigDateTimeField | ConfigColorField | ConfigPasswordField | ConfigTextAreaField | ConfigSliderField | ConfigTagsField | ConfigScheduleField | ConfigGroupField | ConfigSubTabsField | ConfigSeparatorField | ConfigInfoField | ConfigQrCodeField | ConfigObjectArrayField | ConfigEditableArrayField | ConfigModelSelectorField | ConfigStorageLocationField | ConfigProbeField | ConfigButtonField | ConfigPipelineEditorField | ConfigNodeSelectField | ConfigNodeMultiSelectField | ConfigDeviceSelectField | ConfigDeviceMultiSelectField | ConfigNotificationTargetSelectField | ConfigNotificationTargetMultiSelectField | ConfigWidgetField | ConfigAddonActionSelectField | ConfigAddonActionButtonField | ConfigDeviceActionButtonField;
|
|
84
84
|
/**
|
|
85
85
|
* Per-MODEL applicability of a pipeline-step setting (D214).
|
|
86
86
|
*
|
|
@@ -324,12 +324,31 @@ export interface ConfigBooleanField extends ConfigFieldBase {
|
|
|
324
324
|
export interface ConfigSelectField extends ConfigFieldBase {
|
|
325
325
|
type: 'select';
|
|
326
326
|
options: readonly ConfigOption[];
|
|
327
|
+
/**
|
|
328
|
+
* Key of a sibling stored `string[]` catalog. Each entry becomes an
|
|
329
|
+
* option `{ value, label }` at hydrate time (merged with `options`).
|
|
330
|
+
* Same idea as tags `suggestionsFrom`, for a closed dropdown.
|
|
331
|
+
*/
|
|
332
|
+
optionsFrom?: string;
|
|
327
333
|
dependsOn?: Record<string, unknown>;
|
|
328
334
|
}
|
|
329
335
|
export interface ConfigMultiSelectField extends ConfigFieldBase {
|
|
330
336
|
type: 'multiselect';
|
|
331
337
|
options: readonly ConfigOption[];
|
|
338
|
+
/**
|
|
339
|
+
* Key of a sibling stored `string[]` catalog. Each entry becomes an
|
|
340
|
+
* option `{ value, label }` at hydrate time (merged with `options`).
|
|
341
|
+
* Same idea as tags `suggestionsFrom`, for a closed multi-picker.
|
|
342
|
+
*/
|
|
343
|
+
optionsFrom?: string;
|
|
332
344
|
maxItems?: number;
|
|
345
|
+
/**
|
|
346
|
+
* When true, the operator may commit values that are not in `options`.
|
|
347
|
+
* Default false — closed catalogs stay closed.
|
|
348
|
+
*/
|
|
349
|
+
creatable?: boolean;
|
|
350
|
+
/** Footer label for the “add value” action in the dropdown. Default “Add new…”. */
|
|
351
|
+
createLabel?: string;
|
|
333
352
|
}
|
|
334
353
|
/**
|
|
335
354
|
* Friendly timezone picker. The stored value is an IANA timezone id
|
|
@@ -423,6 +442,23 @@ export interface ConfigDeviceMultiSelectField extends ConfigFieldBase {
|
|
|
423
442
|
*/
|
|
424
443
|
suggestLocation?: string | null;
|
|
425
444
|
}
|
|
445
|
+
/**
|
|
446
|
+
* Pick a SINGLE `notification-output` target from the live catalog
|
|
447
|
+
* (`listTargets`). Stored value is the target id string. Same control the
|
|
448
|
+
* Notification Center editors use — scripts and addon settings must not
|
|
449
|
+
* invent a parallel free-text "target id" field.
|
|
450
|
+
*/
|
|
451
|
+
export interface ConfigNotificationTargetSelectField extends ConfigFieldBase {
|
|
452
|
+
type: 'notification-target-select';
|
|
453
|
+
}
|
|
454
|
+
/**
|
|
455
|
+
* Pick MULTIPLE `notification-output` targets. Stored value is a `string[]`
|
|
456
|
+
* of target ids.
|
|
457
|
+
*/
|
|
458
|
+
export interface ConfigNotificationTargetMultiSelectField extends ConfigFieldBase {
|
|
459
|
+
type: 'notification-target-multiselect';
|
|
460
|
+
maxItems?: number;
|
|
461
|
+
}
|
|
426
462
|
export interface ConfigPasswordField extends ConfigFieldBase {
|
|
427
463
|
type: 'password';
|
|
428
464
|
showToggle?: boolean;
|
|
@@ -469,7 +505,49 @@ export interface ConfigSliderField extends ConfigFieldBase {
|
|
|
469
505
|
export interface ConfigTagsField extends ConfigFieldBase {
|
|
470
506
|
type: 'tags';
|
|
471
507
|
suggestions?: string[];
|
|
508
|
+
/**
|
|
509
|
+
* Key of a sibling stored value that holds a `string[]` of extra
|
|
510
|
+
* suggestions (e.g. a scrape-filled `channelCatalog`). Merged into
|
|
511
|
+
* `suggestions` at hydrate time so a form can offer a live catalog
|
|
512
|
+
* without baking it into the static schema.
|
|
513
|
+
*/
|
|
514
|
+
suggestionsFrom?: string;
|
|
472
515
|
maxTags?: number;
|
|
516
|
+
/**
|
|
517
|
+
* When true (default for tags fields), the operator may add values outside
|
|
518
|
+
* the suggestion catalog. Set false to restrict to known suggestions only.
|
|
519
|
+
*/
|
|
520
|
+
creatable?: boolean;
|
|
521
|
+
/** Footer label for the “add value” action. Default “Add new…”. */
|
|
522
|
+
createLabel?: string;
|
|
523
|
+
}
|
|
524
|
+
/**
|
|
525
|
+
* Weekly schedule — the same `NcSchedule` editor used by Notification Center.
|
|
526
|
+
* Value shape is {@link NcSchedule} (or `undefined` = always / unset).
|
|
527
|
+
*
|
|
528
|
+
* Two authoring modes, one wire shape:
|
|
529
|
+
* - `windows` (default) — start→end bands ("active WHILE inside")
|
|
530
|
+
* - `times` — one HH:MM per row ("fire AT"), stored as one-minute windows
|
|
531
|
+
*
|
|
532
|
+
* The consumer decides what a window means at evaluation time.
|
|
533
|
+
*/
|
|
534
|
+
export interface ConfigScheduleField extends ConfigFieldBase {
|
|
535
|
+
type: 'schedule';
|
|
536
|
+
/**
|
|
537
|
+
* `windows` — start→end activation bands (default).
|
|
538
|
+
* `times` — punctual send/fire times (single clock per row).
|
|
539
|
+
*/
|
|
540
|
+
mode?: 'windows' | 'times';
|
|
541
|
+
/** Default windows when the store has no value yet. */
|
|
542
|
+
default?: {
|
|
543
|
+
readonly windows: readonly {
|
|
544
|
+
readonly days: readonly number[];
|
|
545
|
+
readonly startMinute: number;
|
|
546
|
+
readonly endMinute: number;
|
|
547
|
+
}[];
|
|
548
|
+
readonly timezone?: string;
|
|
549
|
+
readonly invert?: boolean;
|
|
550
|
+
};
|
|
473
551
|
}
|
|
474
552
|
export interface ConfigGroupField extends ConfigFieldBase {
|
|
475
553
|
type: 'group';
|
|
@@ -914,6 +992,8 @@ export type ConfigFieldWithValue = (ConfigTextField & {
|
|
|
914
992
|
readonly value: unknown;
|
|
915
993
|
}) | (ConfigTagsField & {
|
|
916
994
|
readonly value: unknown;
|
|
995
|
+
}) | (ConfigScheduleField & {
|
|
996
|
+
readonly value: unknown;
|
|
917
997
|
}) | ConfigGroupFieldWithValue | ConfigSubTabsFieldWithValue | ConfigSeparatorField | ConfigInfoField | ConfigQrCodeField | ConfigObjectArrayField | (ConfigEditableArrayField & {
|
|
918
998
|
readonly value: unknown;
|
|
919
999
|
}) | (ConfigModelSelectorField & {
|
|
@@ -932,6 +1012,10 @@ export type ConfigFieldWithValue = (ConfigTextField & {
|
|
|
932
1012
|
readonly value: unknown;
|
|
933
1013
|
}) | (ConfigDeviceMultiSelectField & {
|
|
934
1014
|
readonly value: unknown;
|
|
1015
|
+
}) | (ConfigNotificationTargetSelectField & {
|
|
1016
|
+
readonly value: unknown;
|
|
1017
|
+
}) | (ConfigNotificationTargetMultiSelectField & {
|
|
1018
|
+
readonly value: unknown;
|
|
935
1019
|
}) | ConfigWidgetField | (ConfigAddonActionSelectField & {
|
|
936
1020
|
readonly value: unknown;
|
|
937
1021
|
}) | ConfigAddonActionButtonField | ConfigDeviceActionButtonField;
|
|
@@ -80,6 +80,19 @@ export declare function scheduleForSendTimes(times: readonly NcSummarySendTime[]
|
|
|
80
80
|
* the raw windows and says the summary is sent when each one ENDS.
|
|
81
81
|
*/
|
|
82
82
|
export declare function sendTimesOfSchedule(schedule: NcSchedule): readonly NcSummarySendTime[] | null;
|
|
83
|
+
/**
|
|
84
|
+
* Punctual times for a `mode: 'times'` editor.
|
|
85
|
+
*
|
|
86
|
+
* Exact one-minute windows win. Otherwise each window's END is the fire time
|
|
87
|
+
* (summary delivery fires when a window closes) — so a legacy 17:00→18:00 band
|
|
88
|
+
* authored as a range still opens as a single "At 18:00" row instead of two
|
|
89
|
+
* clocks. `null` only when inverted (cannot map to punctual rows).
|
|
90
|
+
*/
|
|
91
|
+
export declare function sendTimesForEditor(schedule: NcSchedule): {
|
|
92
|
+
readonly times: readonly NcSummarySendTime[];
|
|
93
|
+
/** True when at least one window was longer than one minute. */
|
|
94
|
+
readonly approximated: boolean;
|
|
95
|
+
} | null;
|
|
83
96
|
/**
|
|
84
97
|
* Does a custom BODY carry the summary's content (`{{summaryText}}` or a
|
|
85
98
|
* section variable)? A body that does not would send a summary with nothing
|