@camstack/types 1.2.406 → 1.2.407
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/capabilities/battery.cap.d.ts +46 -0
- package/dist/capabilities/capability-definition.d.ts +8 -0
- package/dist/capabilities/consumables.cap.d.ts +110 -0
- package/dist/capabilities/customize-catalog.d.ts +72 -0
- package/dist/capabilities/customize-spec.d.ts +202 -0
- package/dist/capabilities/doorbell.cap.d.ts +39 -0
- package/dist/capabilities/index.d.ts +2 -2
- package/dist/capabilities/motion.cap.d.ts +39 -0
- package/dist/capabilities/running-state.cap.d.ts +68 -4
- package/dist/catalogs/sensor-active-state.d.ts +1 -1
- package/dist/client.js +1 -1
- package/dist/client.mjs +1 -1
- package/dist/composition/customize/__fixtures__/refs.d.ts +27 -0
- package/dist/composition/customize/__fixtures__/stored-cases.d.ts +13 -0
- package/dist/composition/customize/event-compile.d.ts +20 -0
- package/dist/composition/customize/event-decode.d.ts +19 -0
- package/dist/composition/customize/event-eval.d.ts +35 -0
- package/dist/composition/customize/event-status.d.ts +49 -0
- package/dist/composition/customize/field-source.d.ts +5 -0
- package/dist/composition/customize/keyed-array-compile.d.ts +26 -0
- package/dist/composition/customize/keyed-array-decode.d.ts +20 -0
- package/dist/composition/customize/keyed-array-expr.d.ts +10 -0
- package/dist/composition/customize/keyed-array-status.d.ts +22 -0
- package/dist/composition/customize/normalize.d.ts +4 -0
- package/dist/composition/customize/override-draft.d.ts +311 -0
- package/dist/composition/customize/scalar-compile.d.ts +13 -0
- package/dist/composition/customize/scalar-decode.d.ts +17 -0
- package/dist/composition/customize/scalar-expr.d.ts +33 -0
- package/dist/composition/customize/scalar-status.d.ts +31 -0
- package/dist/composition/customize/stored.d.ts +15 -0
- package/dist/composition/index.d.ts +0 -1
- package/dist/{composition-xz-ud5EQ.mjs → composition-BJ8iAZb3.mjs} +1 -1
- package/dist/{composition-RmnnN39T.js → composition-CSLSFGTO.js} +1 -1
- package/dist/generated/customize-catalog.d.ts +229 -0
- package/dist/index.d.ts +14 -1
- package/dist/index.js +2245 -290
- package/dist/index.mjs +2223 -286
- package/dist/node.js +1 -1
- package/dist/node.mjs +1 -1
- package/dist/running-state/defaults.d.ts +3 -0
- package/dist/running-state/from-operation.d.ts +4 -4
- package/package.json +1 -1
- package/dist/composition/presets/doorbell-feature.d.ts +0 -20
- package/dist/running-state/assignment.d.ts +0 -34
|
@@ -14,7 +14,7 @@ export declare const RunningStateStatusSchema: z.ZodObject<{
|
|
|
14
14
|
native: "native";
|
|
15
15
|
}>;
|
|
16
16
|
phase: z.ZodNullable<z.ZodString>;
|
|
17
|
-
lastFetchedAt: z.ZodNumber
|
|
17
|
+
lastFetchedAt: z.ZodNullable<z.ZodNumber>;
|
|
18
18
|
}, z.core.$strip>;
|
|
19
19
|
export type RunningStateStatus = z.infer<typeof RunningStateStatusSchema>;
|
|
20
20
|
export declare const runningStateCapability: {
|
|
@@ -22,7 +22,7 @@ export declare const runningStateCapability: {
|
|
|
22
22
|
readonly scope: 'device';
|
|
23
23
|
readonly deviceNative: true;
|
|
24
24
|
readonly mode: 'singleton';
|
|
25
|
-
readonly deviceTypes: DeviceType[];
|
|
25
|
+
readonly deviceTypes: readonly DeviceType[];
|
|
26
26
|
readonly methods: {};
|
|
27
27
|
readonly events: {
|
|
28
28
|
readonly onStarted: {
|
|
@@ -49,7 +49,7 @@ export declare const runningStateCapability: {
|
|
|
49
49
|
native: "native";
|
|
50
50
|
}>;
|
|
51
51
|
phase: z.ZodNullable<z.ZodString>;
|
|
52
|
-
lastFetchedAt: z.ZodNumber
|
|
52
|
+
lastFetchedAt: z.ZodNullable<z.ZodNumber>;
|
|
53
53
|
}, z.core.$strip>;
|
|
54
54
|
readonly kind: 'push';
|
|
55
55
|
};
|
|
@@ -61,7 +61,7 @@ export declare const runningStateCapability: {
|
|
|
61
61
|
native: "native";
|
|
62
62
|
}>;
|
|
63
63
|
phase: z.ZodNullable<z.ZodString>;
|
|
64
|
-
lastFetchedAt: z.ZodNumber
|
|
64
|
+
lastFetchedAt: z.ZodNullable<z.ZodNumber>;
|
|
65
65
|
}, z.core.$strip>;
|
|
66
66
|
readonly durability: 'restored';
|
|
67
67
|
readonly history: {
|
|
@@ -72,5 +72,69 @@ export declare const runningStateCapability: {
|
|
|
72
72
|
};
|
|
73
73
|
};
|
|
74
74
|
readonly volatileStateFields: readonly ["lastFetchedAt"];
|
|
75
|
+
readonly customize: {
|
|
76
|
+
readonly version: 1;
|
|
77
|
+
readonly targets: readonly [{
|
|
78
|
+
readonly id: 'running';
|
|
79
|
+
readonly cardinality: 'scalar';
|
|
80
|
+
readonly vocabulary: {
|
|
81
|
+
readonly cap: 'running-state';
|
|
82
|
+
readonly stateField: 'running';
|
|
83
|
+
};
|
|
84
|
+
readonly deviceTypes: readonly [DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder];
|
|
85
|
+
readonly apply: 'add-or-replace';
|
|
86
|
+
readonly path: 'running';
|
|
87
|
+
readonly sources: readonly [{
|
|
88
|
+
readonly kind: 'switch';
|
|
89
|
+
readonly transforms: readonly [{
|
|
90
|
+
readonly kind: 'identity';
|
|
91
|
+
}];
|
|
92
|
+
}, {
|
|
93
|
+
readonly kind: 'binary';
|
|
94
|
+
readonly transforms: readonly [{
|
|
95
|
+
readonly kind: 'identity';
|
|
96
|
+
}, {
|
|
97
|
+
readonly kind: 'invert';
|
|
98
|
+
}];
|
|
99
|
+
}, {
|
|
100
|
+
readonly kind: 'numeric';
|
|
101
|
+
readonly requiredUnit: 'W';
|
|
102
|
+
readonly transforms: readonly [{
|
|
103
|
+
readonly kind: 'threshold';
|
|
104
|
+
readonly comparison: 'gte';
|
|
105
|
+
readonly defaultThreshold: 5;
|
|
106
|
+
readonly defaultStartDwellMs: 30000;
|
|
107
|
+
readonly defaultStopDwellMs: 180000;
|
|
108
|
+
readonly thresholdUnit: 'W';
|
|
109
|
+
}];
|
|
110
|
+
}];
|
|
111
|
+
readonly companions: readonly [{
|
|
112
|
+
readonly kind: 'constant';
|
|
113
|
+
readonly path: 'source';
|
|
114
|
+
readonly value: 'assigned';
|
|
115
|
+
readonly when: 'always';
|
|
116
|
+
}, {
|
|
117
|
+
readonly kind: 'constant';
|
|
118
|
+
readonly path: 'phase';
|
|
119
|
+
readonly value: null;
|
|
120
|
+
readonly when: 'always';
|
|
121
|
+
}, {
|
|
122
|
+
readonly kind: 'clock';
|
|
123
|
+
readonly path: 'lastFetchedAt';
|
|
124
|
+
readonly when: 'always';
|
|
125
|
+
}, {
|
|
126
|
+
readonly kind: 'transition-time';
|
|
127
|
+
readonly path: 'since';
|
|
128
|
+
readonly sourceChangedAt: 'prefer';
|
|
129
|
+
}];
|
|
130
|
+
readonly sourceReport: {
|
|
131
|
+
readonly status: 'assignment-status';
|
|
132
|
+
readonly runtimeField: 'source';
|
|
133
|
+
readonly nativeValue: 'native';
|
|
134
|
+
readonly assignedValue: 'assigned';
|
|
135
|
+
};
|
|
136
|
+
readonly advancedExpression: true;
|
|
137
|
+
}];
|
|
138
|
+
};
|
|
75
139
|
};
|
|
76
140
|
export type IRunningStateProvider = InferProvider<typeof runningStateCapability>;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* ONE table for everyone who asks "is this device HIGH?": the
|
|
6
6
|
* recorder's `RecordingTriggers.sensorDeviceIds` trigger, the post-analysis
|
|
7
7
|
* sensor markers, the orchestrator's camera-sensors bridge and
|
|
8
|
-
* the sources of a
|
|
8
|
+
* the sources of a pulse (`compilePulseOverride`, D936).
|
|
9
9
|
* A second copy would diverge at the first cap added, and the symptom — "the
|
|
10
10
|
* sensor rings the doorbell but does not record" — is exactly D62.
|
|
11
11
|
*
|
package/dist/client.js
CHANGED
|
@@ -909,7 +909,7 @@ zod.z.object({
|
|
|
909
909
|
* ONE table for everyone who asks "is this device HIGH?": the
|
|
910
910
|
* recorder's `RecordingTriggers.sensorDeviceIds` trigger, the post-analysis
|
|
911
911
|
* sensor markers, the orchestrator's camera-sensors bridge and
|
|
912
|
-
* the sources of a
|
|
912
|
+
* the sources of a pulse (`compilePulseOverride`, D936).
|
|
913
913
|
* A second copy would diverge at the first cap added, and the symptom — "the
|
|
914
914
|
* sensor rings the doorbell but does not record" — is exactly D62.
|
|
915
915
|
*
|
package/dist/client.mjs
CHANGED
|
@@ -908,7 +908,7 @@ z.object({
|
|
|
908
908
|
* ONE table for everyone who asks "is this device HIGH?": the
|
|
909
909
|
* recorder's `RecordingTriggers.sensorDeviceIds` trigger, the post-analysis
|
|
910
910
|
* sensor markers, the orchestrator's camera-sensors bridge and
|
|
911
|
-
* the sources of a
|
|
911
|
+
* the sources of a pulse (`compilePulseOverride`, D936).
|
|
912
912
|
* A second copy would diverge at the first cap added, and the symptom — "the
|
|
913
913
|
* sensor rings the doorbell but does not record" — is exactly D62.
|
|
914
914
|
*
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Source devices the generic compiler fixtures name. Not a new catalogue.
|
|
3
|
+
*/
|
|
4
|
+
import type { CompositionSourceRef } from '../../composition.js';
|
|
5
|
+
export interface FixtureFieldRead {
|
|
6
|
+
readonly source: CompositionSourceRef;
|
|
7
|
+
readonly cap: string;
|
|
8
|
+
readonly fieldPath: string;
|
|
9
|
+
readonly valueKind: 'boolean' | 'number' | 'string';
|
|
10
|
+
}
|
|
11
|
+
export declare const FEEDER: CompositionSourceRef;
|
|
12
|
+
export declare const BATTERY_NUMBER: FixtureFieldRead;
|
|
13
|
+
export declare const DESICCANT_STRING: FixtureFieldRead;
|
|
14
|
+
export declare const DISHWASHER: CompositionSourceRef;
|
|
15
|
+
export declare const SWITCH_REF: CompositionSourceRef;
|
|
16
|
+
export declare const CAMERA_615: CompositionSourceRef;
|
|
17
|
+
export declare const DOORBELL_SWITCH: CompositionSourceRef;
|
|
18
|
+
export declare const PIR_SENSOR: {
|
|
19
|
+
readonly addonId: 'provider-homeassistant';
|
|
20
|
+
readonly stableId: 'ha:pir';
|
|
21
|
+
readonly mode: 'in-addition';
|
|
22
|
+
};
|
|
23
|
+
export declare const GATE_SENSOR: {
|
|
24
|
+
readonly addonId: 'provider-zigbee';
|
|
25
|
+
readonly stableId: 'z:gate';
|
|
26
|
+
readonly mode: 'confirm';
|
|
27
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ScalarCompileInput } from '../scalar-compile.js';
|
|
2
|
+
import type { CustomizeStored } from '../stored.js';
|
|
3
|
+
export interface CustomizeStoredCase {
|
|
4
|
+
readonly id: string;
|
|
5
|
+
readonly input: ScalarCompileInput;
|
|
6
|
+
readonly stored: CustomizeStored;
|
|
7
|
+
}
|
|
8
|
+
export declare const CUSTOMIZE_STORED_CASES: readonly CustomizeStoredCase[];
|
|
9
|
+
export interface NoncanonicalCustomizeStored {
|
|
10
|
+
readonly id: string;
|
|
11
|
+
readonly stored: CustomizeStored;
|
|
12
|
+
}
|
|
13
|
+
export declare const NONCANONICAL_CUSTOMIZE_STORED: readonly NoncanonicalCustomizeStored[];
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { CompositionFieldsFeature, CompositionSourceRef } from '../composition.js';
|
|
2
|
+
import { type CameraSensorsConfig } from '../../pipeline/camera-sensors.js';
|
|
3
|
+
import type { PulseOverrideDraft, SpanOverrideDraft } from './override-draft.js';
|
|
4
|
+
import type { CustomizeRoundTrip } from './stored.js';
|
|
5
|
+
export interface PulseCompileInput {
|
|
6
|
+
readonly draft: PulseOverrideDraft;
|
|
7
|
+
readonly device: CompositionSourceRef;
|
|
8
|
+
readonly changedAtFields: readonly string[];
|
|
9
|
+
}
|
|
10
|
+
export interface SpanCompiled {
|
|
11
|
+
readonly config: CameraSensorsConfig | null;
|
|
12
|
+
readonly timeoutMs: number;
|
|
13
|
+
readonly cooldownMs: number | undefined;
|
|
14
|
+
}
|
|
15
|
+
export interface SpanCompileInput {
|
|
16
|
+
readonly draft: SpanOverrideDraft;
|
|
17
|
+
readonly device: CompositionSourceRef;
|
|
18
|
+
}
|
|
19
|
+
export declare function compilePulseOverride(input: PulseCompileInput): CustomizeRoundTrip<CompositionFieldsFeature>;
|
|
20
|
+
export declare function compileSpanOverride(input: SpanCompileInput): CustomizeRoundTrip<SpanCompiled>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recover a pulse draft only when compiling it again reproduces the stored
|
|
3
|
+
* feature. Anything else is another formula.
|
|
4
|
+
*/
|
|
5
|
+
import type { CompositionFieldsFeature, CompositionSourceRef } from '../composition.js';
|
|
6
|
+
import type { PulseOverrideDraft } from './override-draft.js';
|
|
7
|
+
export interface PulseDecoded {
|
|
8
|
+
readonly draft: PulseOverrideDraft;
|
|
9
|
+
readonly changedAtFields: readonly string[];
|
|
10
|
+
}
|
|
11
|
+
export interface PulseDecodeInput {
|
|
12
|
+
readonly feature: CompositionFieldsFeature;
|
|
13
|
+
readonly device: CompositionSourceRef;
|
|
14
|
+
readonly cap: string;
|
|
15
|
+
readonly targetId: string;
|
|
16
|
+
readonly timestampPath: string;
|
|
17
|
+
readonly counterPath: string;
|
|
18
|
+
}
|
|
19
|
+
export declare function decodePulseOverride(input: PulseDecodeInput): PulseDecoded | null;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pulse and span edges for Customize preview (D936 §5.5).
|
|
3
|
+
*
|
|
4
|
+
* An unread sample is not a level. It does not arm, start, end or count
|
|
5
|
+
* (D49): a failed read must not look like a falling edge.
|
|
6
|
+
*/
|
|
7
|
+
export type LevelSample = {
|
|
8
|
+
readonly kind: 'unread';
|
|
9
|
+
} | {
|
|
10
|
+
readonly kind: 'level';
|
|
11
|
+
readonly active: boolean;
|
|
12
|
+
readonly changedAt: number | null;
|
|
13
|
+
};
|
|
14
|
+
export interface PulseState {
|
|
15
|
+
readonly priorActive: boolean | undefined;
|
|
16
|
+
readonly lastPressedAt: number | null;
|
|
17
|
+
readonly count: number;
|
|
18
|
+
readonly acceptedAt: number | null;
|
|
19
|
+
}
|
|
20
|
+
export interface SpanState {
|
|
21
|
+
readonly open: boolean;
|
|
22
|
+
readonly startedAt: number | null;
|
|
23
|
+
readonly endedAt: number | null;
|
|
24
|
+
readonly quietUntil: number | null;
|
|
25
|
+
readonly priorActive: boolean | undefined;
|
|
26
|
+
}
|
|
27
|
+
export interface SpanTiming {
|
|
28
|
+
readonly timeoutMs: number;
|
|
29
|
+
readonly cooldownMs: number;
|
|
30
|
+
readonly nowMs: number;
|
|
31
|
+
}
|
|
32
|
+
export declare const INITIAL_PULSE: PulseState;
|
|
33
|
+
export declare const INITIAL_SPAN: SpanState;
|
|
34
|
+
export declare function stepPulse(state: PulseState, sample: LevelSample, debounceMs: number): PulseState;
|
|
35
|
+
export declare function stepSpan(state: SpanState, sample: LevelSample, timing: SpanTiming): SpanState;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Assignment status for a pulse feature and a span's camera-sensors
|
|
3
|
+
* authority (D936, D315, D49). Pending and unreadable are not an empty list.
|
|
4
|
+
*/
|
|
5
|
+
import type { CompositionFieldsFeature, CompositionSourceRef } from '../composition.js';
|
|
6
|
+
import type { CameraSensorAttachment, CameraSensorMode, CameraSensorsStatus } from '../../pipeline/camera-sensors.js';
|
|
7
|
+
import type { CustomizeAssignmentStatus } from './override-draft.js';
|
|
8
|
+
import type { ScalarRead, ScalarSourcePresence } from './scalar-status.js';
|
|
9
|
+
export interface PulseStatusInput {
|
|
10
|
+
readonly cap: string;
|
|
11
|
+
readonly targetId: string;
|
|
12
|
+
readonly device: CompositionSourceRef;
|
|
13
|
+
readonly timestampPath: string;
|
|
14
|
+
readonly counterPath: string;
|
|
15
|
+
readonly apply: 'add' | 'replace';
|
|
16
|
+
readonly stored: ScalarRead<CompositionFieldsFeature | null>;
|
|
17
|
+
readonly sourcePresence: ScalarSourcePresence;
|
|
18
|
+
readonly sourceUnknownReason: string | null;
|
|
19
|
+
}
|
|
20
|
+
export interface PulseAssignmentProjection {
|
|
21
|
+
readonly text: string;
|
|
22
|
+
readonly status: CustomizeAssignmentStatus;
|
|
23
|
+
}
|
|
24
|
+
export interface SpanSensorRow {
|
|
25
|
+
readonly key: string;
|
|
26
|
+
readonly addonId: string;
|
|
27
|
+
readonly stableId: string;
|
|
28
|
+
readonly name: string;
|
|
29
|
+
readonly mode: CameraSensorMode;
|
|
30
|
+
readonly state: CameraSensorAttachment['state'];
|
|
31
|
+
readonly reason: string | null;
|
|
32
|
+
}
|
|
33
|
+
export interface SpanAssignmentProjection {
|
|
34
|
+
readonly text: string;
|
|
35
|
+
readonly writable: boolean;
|
|
36
|
+
readonly rows: readonly SpanSensorRow[];
|
|
37
|
+
readonly status: CustomizeAssignmentStatus;
|
|
38
|
+
}
|
|
39
|
+
export type SpanRead = {
|
|
40
|
+
readonly kind: 'pending';
|
|
41
|
+
} | {
|
|
42
|
+
readonly kind: 'unknown';
|
|
43
|
+
readonly reason: string | null;
|
|
44
|
+
} | {
|
|
45
|
+
readonly kind: 'known';
|
|
46
|
+
readonly value: CameraSensorsStatus;
|
|
47
|
+
};
|
|
48
|
+
export declare function projectPulseAssignment(input: PulseStatusInput): PulseAssignmentProjection;
|
|
49
|
+
export declare function projectSpanAssignment(targetId: string, stored: SpanRead): SpanAssignmentProjection;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { CompositionExpressionSource, CompositionFieldSource, CompositionFromSource, CompositionSourceRef } from '../composition.js';
|
|
2
|
+
export declare function fromRead(source: CompositionSourceRef, cap: string, fieldPath: string): CompositionFromSource;
|
|
3
|
+
export declare function expression(expr: string, bindings: CompositionExpressionSource['bindings']): CompositionFieldSource;
|
|
4
|
+
export declare function literal(expr: string): CompositionFieldSource;
|
|
5
|
+
export declare function isLiteral(source: CompositionFieldSource | undefined, expr: string): boolean;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type CompositionFieldsFeature, type CompositionSourceRef } from '../composition.js';
|
|
2
|
+
import type { KeyedArrayOverrideDraft } from './override-draft.js';
|
|
3
|
+
import type { CustomizeRoundTrip } from './stored.js';
|
|
4
|
+
export type KeyedSourceValueKind = 'boolean' | 'number' | 'string' | 'enum';
|
|
5
|
+
export interface KeyedArrayLiteral {
|
|
6
|
+
readonly path: string;
|
|
7
|
+
readonly value: string;
|
|
8
|
+
}
|
|
9
|
+
export interface KeyedArrayItemCompile {
|
|
10
|
+
readonly draft: KeyedArrayOverrideDraft;
|
|
11
|
+
readonly sourceValueKind: KeyedSourceValueKind;
|
|
12
|
+
readonly sourceUnit: string | null;
|
|
13
|
+
readonly literals: readonly KeyedArrayLiteral[];
|
|
14
|
+
}
|
|
15
|
+
export interface KeyedArrayCompileInput {
|
|
16
|
+
readonly cap: string;
|
|
17
|
+
readonly targetId: string;
|
|
18
|
+
readonly device: CompositionSourceRef;
|
|
19
|
+
readonly apply: 'add' | 'replace';
|
|
20
|
+
readonly items: readonly KeyedArrayItemCompile[];
|
|
21
|
+
}
|
|
22
|
+
export declare function compileKeyedArrayOverride(input: KeyedArrayCompileInput): CustomizeRoundTrip<CompositionFieldsFeature>;
|
|
23
|
+
/** Put one compiled item into an existing feature. Other items stay as stored. */
|
|
24
|
+
export declare function mergeKeyedArrayItem(current: CompositionFieldsFeature | null, compiled: CompositionFieldsFeature, key: string): CompositionFieldsFeature | null;
|
|
25
|
+
/** The feature without item `key`. Null when that item was the last one. */
|
|
26
|
+
export declare function withoutKeyedArrayItem(feature: CompositionFieldsFeature, key: string): CompositionFieldsFeature | null;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { CompositionFieldsFeature, CompositionSourceRef } from '../composition.js';
|
|
2
|
+
import { type KeyedArrayItemCompile } from './keyed-array-compile.js';
|
|
3
|
+
export interface KeyedArrayItemView {
|
|
4
|
+
readonly key: string;
|
|
5
|
+
readonly label: string;
|
|
6
|
+
readonly recognized: boolean;
|
|
7
|
+
readonly compile: KeyedArrayItemCompile | null;
|
|
8
|
+
}
|
|
9
|
+
export interface KeyedArrayRead {
|
|
10
|
+
readonly canonical: boolean;
|
|
11
|
+
readonly apply: 'add' | 'replace';
|
|
12
|
+
readonly items: readonly KeyedArrayItemView[];
|
|
13
|
+
}
|
|
14
|
+
export declare function readKeyedArrayItems(feature: CompositionFieldsFeature, cap: string, targetId: string): KeyedArrayRead | null;
|
|
15
|
+
export declare function decodeKeyedArrayOverride(input: {
|
|
16
|
+
readonly feature: CompositionFieldsFeature;
|
|
17
|
+
readonly device: CompositionSourceRef;
|
|
18
|
+
readonly cap: string;
|
|
19
|
+
readonly targetId: string;
|
|
20
|
+
}): KeyedArrayRead | null;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical expression text for one keyed-array transform. The decoder reads
|
|
3
|
+
* only this spelling.
|
|
4
|
+
*/
|
|
5
|
+
import type { CustomizeTransformDraft } from './override-draft.js';
|
|
6
|
+
export declare function enumMapExpr(mapping: Readonly<Record<string, string | null>>): string | null;
|
|
7
|
+
export declare function parseEnumMap(expr: string): Readonly<Record<string, string | null>> | null;
|
|
8
|
+
export declare function enumMapDraft(mapping: Readonly<Record<string, string | null>>): Extract<CustomizeTransformDraft, {
|
|
9
|
+
kind: 'enum-map';
|
|
10
|
+
}>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Assignment-status projection for one keyed-array target (D936). Pending and
|
|
3
|
+
* unknown are unanswered reads. A confirmed-gone source leaves an added array
|
|
4
|
+
* assigned: the native rows are a different authority.
|
|
5
|
+
*/
|
|
6
|
+
import type { CompositionFieldsFeature, CompositionSourceRef } from '../composition.js';
|
|
7
|
+
import type { CustomizeAssignmentStatus } from './override-draft.js';
|
|
8
|
+
import type { ScalarRead, ScalarSourcePresence } from './scalar-status.js';
|
|
9
|
+
export interface KeyedArrayStatusInput {
|
|
10
|
+
readonly cap: string;
|
|
11
|
+
readonly targetId: string;
|
|
12
|
+
readonly device: CompositionSourceRef;
|
|
13
|
+
readonly stored: ScalarRead<CompositionFieldsFeature | null>;
|
|
14
|
+
readonly sourcePresence: ScalarSourcePresence;
|
|
15
|
+
readonly sourceUnknownReason: string | null;
|
|
16
|
+
}
|
|
17
|
+
export interface KeyedArrayAssignmentProjection {
|
|
18
|
+
readonly text: string;
|
|
19
|
+
readonly assignedCount: number;
|
|
20
|
+
readonly status: CustomizeAssignmentStatus;
|
|
21
|
+
}
|
|
22
|
+
export declare function projectKeyedArrayAssignment(input: KeyedArrayStatusInput): KeyedArrayAssignmentProjection;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { CustomizeStored } from './stored.js';
|
|
2
|
+
/** Key order is not part of the stored contract. Array order is. */
|
|
3
|
+
export declare function normalizeStored(stored: CustomizeStored): unknown;
|
|
4
|
+
export declare function sameStored(a: CustomizeStored, b: CustomizeStored): boolean;
|