@camstack/types 1.2.440 → 1.2.441
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 +11 -0
- package/dist/addon.js +9 -3
- package/dist/addon.mjs +9 -3
- package/dist/capabilities/customize-catalog.d.ts +3 -0
- package/dist/capabilities/customize-spec.d.ts +20 -2
- package/dist/capabilities/index.d.ts +6 -2
- package/dist/capabilities/media-player.cap.d.ts +50 -0
- package/dist/capabilities/pet-feeder.cap.d.ts +9 -0
- package/dist/capabilities/remote.cap.d.ts +264 -0
- package/dist/capabilities/template.cap.d.ts +161 -0
- package/dist/client.js +14 -0
- package/dist/client.mjs +14 -0
- package/dist/generated/addon-api.d.ts +86 -0
- package/dist/generated/addon-cap-facts.d.ts +1 -1
- package/dist/generated/cap-input-defaults.d.ts +1 -1
- package/dist/generated/capability-router-map.d.ts +10 -4
- package/dist/generated/collection-array-methods.d.ts +1 -1
- package/dist/generated/customize-catalog.d.ts +18 -1
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/method-device-selectors.d.ts +2 -2
- package/dist/generated/system-proxy.d.ts +4 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +861 -71
- package/dist/index.mjs +814 -72
- package/dist/interfaces/device-call-redirect.d.ts +42 -0
- package/dist/interfaces/kernel-abstractions.d.ts +12 -0
- package/dist/remote/remote-config.d.ts +116 -0
- package/dist/remote/remote-roles.d.ts +21 -0
- package/dist/remote/smartir-draft.d.ts +25 -0
- package/dist/{sleep-g6ZjBHBL.js → sleep-BpwNJ1Su.js} +19 -0
- package/dist/{sleep-BAvUCi_2.mjs → sleep-DJws6ho7.mjs} +19 -0
- package/dist/template/template-kinds.d.ts +26 -0
- package/package.json +1 -1
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The device-call redirect (D963) — the ONE question every resolution of a
|
|
3
|
+
* device-scoped cap call asks before it routes the call to the owning
|
|
4
|
+
* provider: does something take this call over?
|
|
5
|
+
*
|
|
6
|
+
* Today the remote extension is the one that does. A media-player command on a
|
|
7
|
+
* device whose remote binds the command's role runs the binding (an infrared
|
|
8
|
+
* code, a smart-TV call); an unbound role falls through to the native cap. A
|
|
9
|
+
* `getStatus` on a media player no running source answers is served from the
|
|
10
|
+
* remote's own bookkeeping, marked `assumed`. It is a dispatch concern, not a
|
|
11
|
+
* UI one, so it holds for every caller: the admin UI, an automation, an
|
|
12
|
+
* exporter, a forked addon.
|
|
13
|
+
*
|
|
14
|
+
* Declared here, like the claimed-status overlay, because `ICapabilityRegistry`
|
|
15
|
+
* carries the setter and the question; the kernel registry and the transport
|
|
16
|
+
* entries both import from it and neither imports the other.
|
|
17
|
+
*/
|
|
18
|
+
/** A device-scoped cap call as an entry sees it. */
|
|
19
|
+
export interface DeviceCall {
|
|
20
|
+
readonly capName: string;
|
|
21
|
+
readonly method: string;
|
|
22
|
+
readonly deviceId: number;
|
|
23
|
+
readonly args: unknown;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* - `not-redirected`: nothing took the call over — route it as before.
|
|
27
|
+
* - `redirected`: `result` IS the call's answer; the provider is not called.
|
|
28
|
+
* A redirect that FAILS throws instead, so the caller sees the failure and
|
|
29
|
+
* the native cap never silently runs in its place.
|
|
30
|
+
*/
|
|
31
|
+
export type DeviceCallAnswer = {
|
|
32
|
+
readonly kind: 'not-redirected';
|
|
33
|
+
} | {
|
|
34
|
+
readonly kind: 'redirected';
|
|
35
|
+
readonly result: unknown;
|
|
36
|
+
};
|
|
37
|
+
/** Installed by the owner of the redirecting authority (core-blocks, for the remote). */
|
|
38
|
+
export interface DeviceCallRedirect {
|
|
39
|
+
/** Synchronous and cheap: could this `(cap, method)` ever be redirected? */
|
|
40
|
+
covers(capName: string, method: string): boolean;
|
|
41
|
+
attempt(call: DeviceCall): Promise<DeviceCallAnswer>;
|
|
42
|
+
}
|
|
@@ -10,6 +10,7 @@ import type { FrameInput } from '../types/io.js';
|
|
|
10
10
|
import type { CropInput } from '../types/detection.js';
|
|
11
11
|
import type { InferenceOutput } from './pipeline-runner.js';
|
|
12
12
|
import type { CapabilityProviderMap } from './capability.js';
|
|
13
|
+
import type { DeviceCall, DeviceCallAnswer, DeviceCallRedirect } from './device-call-redirect.js';
|
|
13
14
|
import type { StatusOverlay, StatusOverlayAnswer } from './status-overlay.js';
|
|
14
15
|
/**
|
|
15
16
|
* Capability registry interface exposing what core/addon consumers need.
|
|
@@ -53,6 +54,17 @@ export interface ICapabilityRegistry {
|
|
|
53
54
|
* native (D315, D49).
|
|
54
55
|
*/
|
|
55
56
|
resolveClaimedStatus(capName: string, deviceId: number): Promise<StatusOverlayAnswer>;
|
|
57
|
+
/**
|
|
58
|
+
* Install (or remove, with `null`) the device-call redirect (D963). While
|
|
59
|
+
* installed, a covered device-scoped call resolved through the registry —
|
|
60
|
+
* and, through `redirectDeviceCall`, through the transport entries — may be
|
|
61
|
+
* taken over before it reaches the provider.
|
|
62
|
+
*/
|
|
63
|
+
setDeviceCallRedirect(redirect: DeviceCallRedirect | null): void;
|
|
64
|
+
/** Cheap and synchronous: could a redirect take this `(cap, method)` over? Asked before args are decoded. */
|
|
65
|
+
coversDeviceCall(capName: string, method: string): boolean;
|
|
66
|
+
/** The one question every name-resolving entry asks before routing. */
|
|
67
|
+
redirectDeviceCall(call: DeviceCall): Promise<DeviceCallAnswer>;
|
|
56
68
|
/** Get the addonId that registered a native provider for (cap, device). */
|
|
57
69
|
getNativeAddonId(capName: string, deviceId: number): string | null;
|
|
58
70
|
/** List all capability names with a native registration for a device. */
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The per-device configuration of the `remote` Customize extension (D963) and
|
|
3
|
+
* the layout payload of the `remote` template kind. Pure data: no runtime, no
|
|
4
|
+
* node dependency, so the admin UI imports the same schemas the server checks.
|
|
5
|
+
*
|
|
6
|
+
* A binding is the SAME shape an Action step has (`AutomationCapStepSchema`: a
|
|
7
|
+
* cap method called on a device with arguments), narrowed to ONE device: an IR
|
|
8
|
+
* code is `ir-transmitter.send` on the transmitter, a smart TV is a `switch` or a
|
|
9
|
+
* vendor cap — the remote does not know which. How many times a command is sent
|
|
10
|
+
* is the CALLER's (`sendCommand({ repeat })`), never stored here.
|
|
11
|
+
*/
|
|
12
|
+
import { z } from 'zod';
|
|
13
|
+
export declare const RemoteBindingActionSchema: z.ZodObject<{
|
|
14
|
+
kind: z.ZodLiteral<"cap">;
|
|
15
|
+
cap: z.ZodString;
|
|
16
|
+
method: z.ZodString;
|
|
17
|
+
args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
18
|
+
deviceId: z.ZodNumber;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
export type RemoteBindingAction = z.infer<typeof RemoteBindingActionSchema>;
|
|
21
|
+
export declare const RemoteBindingSchema: z.ZodObject<{
|
|
22
|
+
action: z.ZodObject<{
|
|
23
|
+
kind: z.ZodLiteral<"cap">;
|
|
24
|
+
cap: z.ZodString;
|
|
25
|
+
method: z.ZodString;
|
|
26
|
+
args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
27
|
+
deviceId: z.ZodNumber;
|
|
28
|
+
}, z.core.$strip>;
|
|
29
|
+
}, z.core.$strip>;
|
|
30
|
+
export type RemoteBinding = z.infer<typeof RemoteBindingSchema>;
|
|
31
|
+
export declare const RemoteCustomButtonSchema: z.ZodObject<{
|
|
32
|
+
key: z.ZodString;
|
|
33
|
+
name: z.ZodString;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
export type RemoteCustomButton = z.infer<typeof RemoteCustomButtonSchema>;
|
|
36
|
+
export declare const REMOTE_POWER_MODES: readonly ['toggle', 'discrete'];
|
|
37
|
+
export declare const RemotePowerModeSchema: z.ZodEnum<{
|
|
38
|
+
discrete: "discrete";
|
|
39
|
+
toggle: "toggle";
|
|
40
|
+
}>;
|
|
41
|
+
export type RemotePowerMode = z.infer<typeof RemotePowerModeSchema>;
|
|
42
|
+
export declare const MAX_REMOTE_BINDINGS = 200;
|
|
43
|
+
export declare const MAX_REMOTE_CUSTOM_BUTTONS = 100;
|
|
44
|
+
export declare const RemoteConfigSchema: z.ZodObject<{
|
|
45
|
+
layoutTemplateId: z.ZodNullable<z.ZodString>;
|
|
46
|
+
defaultTransmitterId: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
47
|
+
bindings: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
48
|
+
action: z.ZodObject<{
|
|
49
|
+
kind: z.ZodLiteral<"cap">;
|
|
50
|
+
cap: z.ZodString;
|
|
51
|
+
method: z.ZodString;
|
|
52
|
+
args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
53
|
+
deviceId: z.ZodNumber;
|
|
54
|
+
}, z.core.$strip>;
|
|
55
|
+
}, z.core.$strip>>;
|
|
56
|
+
customButtons: z.ZodArray<z.ZodObject<{
|
|
57
|
+
key: z.ZodString;
|
|
58
|
+
name: z.ZodString;
|
|
59
|
+
}, z.core.$strip>>;
|
|
60
|
+
power: z.ZodObject<{
|
|
61
|
+
mode: z.ZodEnum<{
|
|
62
|
+
discrete: "discrete";
|
|
63
|
+
toggle: "toggle";
|
|
64
|
+
}>;
|
|
65
|
+
}, z.core.$strip>;
|
|
66
|
+
}, z.core.$strip>;
|
|
67
|
+
export type RemoteConfig = z.infer<typeof RemoteConfigSchema>;
|
|
68
|
+
export declare const EMPTY_REMOTE_CONFIG: RemoteConfig;
|
|
69
|
+
/**
|
|
70
|
+
* What the remote last SENT and therefore guesses about a device that does not
|
|
71
|
+
* report it (infrared has no feedback). Persisted next to the config so a hub
|
|
72
|
+
* restart does not forget it, and never recorded in history: it is a guess, not
|
|
73
|
+
* a reading. A reading from a running source always outranks it.
|
|
74
|
+
*/
|
|
75
|
+
export declare const RemoteAssumedStateSchema: z.ZodObject<{
|
|
76
|
+
power: z.ZodNullable<z.ZodObject<{
|
|
77
|
+
state: z.ZodEnum<{
|
|
78
|
+
off: "off";
|
|
79
|
+
on: "on";
|
|
80
|
+
}>;
|
|
81
|
+
at: z.ZodNumber;
|
|
82
|
+
}, z.core.$strip>>;
|
|
83
|
+
muted: z.ZodNullable<z.ZodObject<{
|
|
84
|
+
value: z.ZodBoolean;
|
|
85
|
+
at: z.ZodNumber;
|
|
86
|
+
}, z.core.$strip>>;
|
|
87
|
+
}, z.core.$strip>;
|
|
88
|
+
export type RemoteAssumedState = z.infer<typeof RemoteAssumedStateSchema>;
|
|
89
|
+
export declare const EMPTY_REMOTE_ASSUMED_STATE: RemoteAssumedState;
|
|
90
|
+
export declare const MAX_LAYOUT_SPAN = 24;
|
|
91
|
+
export declare const RemoteLayoutButtonSchema: z.ZodObject<{
|
|
92
|
+
id: z.ZodString;
|
|
93
|
+
row: z.ZodNumber;
|
|
94
|
+
col: z.ZodNumber;
|
|
95
|
+
rowSpan: z.ZodNumber;
|
|
96
|
+
colSpan: z.ZodNumber;
|
|
97
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
98
|
+
label: z.ZodOptional<z.ZodString>;
|
|
99
|
+
role: z.ZodString;
|
|
100
|
+
}, z.core.$strip>;
|
|
101
|
+
export type RemoteLayoutButton = z.infer<typeof RemoteLayoutButtonSchema>;
|
|
102
|
+
export declare const RemoteLayoutPayloadSchema: z.ZodObject<{
|
|
103
|
+
columns: z.ZodNumber;
|
|
104
|
+
rows: z.ZodNumber;
|
|
105
|
+
buttons: z.ZodArray<z.ZodObject<{
|
|
106
|
+
id: z.ZodString;
|
|
107
|
+
row: z.ZodNumber;
|
|
108
|
+
col: z.ZodNumber;
|
|
109
|
+
rowSpan: z.ZodNumber;
|
|
110
|
+
colSpan: z.ZodNumber;
|
|
111
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
112
|
+
label: z.ZodOptional<z.ZodString>;
|
|
113
|
+
role: z.ZodString;
|
|
114
|
+
}, z.core.$strip>>;
|
|
115
|
+
}, z.core.$strip>;
|
|
116
|
+
export type RemoteLayoutPayload = z.infer<typeof RemoteLayoutPayloadSchema>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The role vocabulary of a remote (D963): what a button MEANS, independent of
|
|
3
|
+
* how it is wired. A layout template places buttons by role; a device binds a
|
|
4
|
+
* role to an action; an exporter asks for a role by name. Roles are shared so
|
|
5
|
+
* one layout fits every appliance and one voice command fits every binding.
|
|
6
|
+
*
|
|
7
|
+
* A role outside this list is `custom:<key>` — the operator's own button (a
|
|
8
|
+
* SmartIR source, a channel preset). The key is a lowercase slug.
|
|
9
|
+
*/
|
|
10
|
+
import { z } from 'zod';
|
|
11
|
+
export declare const REMOTE_KNOWN_ROLES: readonly ['power', 'power_on', 'power_off', 'volume_up', 'volume_down', 'mute', 'channel_up', 'channel_down', 'up', 'down', 'left', 'right', 'ok', 'back', 'home', 'menu', 'info', 'guide', 'exit', 'input', 'play', 'pause', 'play_pause', 'stop', 'next', 'previous', 'fast_forward', 'rewind', 'digit_0', 'digit_1', 'digit_2', 'digit_3', 'digit_4', 'digit_5', 'digit_6', 'digit_7', 'digit_8', 'digit_9'];
|
|
12
|
+
export type RemoteKnownRole = (typeof REMOTE_KNOWN_ROLES)[number];
|
|
13
|
+
export declare const REMOTE_CUSTOM_ROLE_PREFIX = "custom:";
|
|
14
|
+
export declare function isRemoteKnownRole(value: string): value is RemoteKnownRole;
|
|
15
|
+
export declare function isRemoteCustomKey(key: string): boolean;
|
|
16
|
+
export declare function customRole(key: string): string;
|
|
17
|
+
/** The key of a `custom:<key>` role, or null for any other string. */
|
|
18
|
+
export declare function customKeyOfRole(role: string): string | null;
|
|
19
|
+
export declare function isRemoteRole(value: string): boolean;
|
|
20
|
+
export declare const RemoteRoleSchema: z.ZodString;
|
|
21
|
+
export type RemoteRole = z.infer<typeof RemoteRoleSchema>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { RemoteCommandTable } from '../ir/smartir.js';
|
|
2
|
+
import type { RemoteBinding, RemoteCustomButton, RemotePowerMode } from './remote-config.js';
|
|
3
|
+
/** The transmitter that sends a draft's codes unless a command names its own. */
|
|
4
|
+
export interface SmartIrTarget {
|
|
5
|
+
readonly transmitterDeviceId: number;
|
|
6
|
+
}
|
|
7
|
+
export interface SmartIrSkipped {
|
|
8
|
+
readonly name: string;
|
|
9
|
+
readonly reason: string;
|
|
10
|
+
}
|
|
11
|
+
export interface SmartIrDraft {
|
|
12
|
+
readonly bindings: Record<string, RemoteBinding>;
|
|
13
|
+
readonly customButtons: RemoteCustomButton[];
|
|
14
|
+
readonly power: {
|
|
15
|
+
readonly mode: RemotePowerMode;
|
|
16
|
+
};
|
|
17
|
+
readonly skipped: SmartIrSkipped[];
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* `on` and `off` carrying the SAME pulse train are one power TOGGLE (bound to
|
|
21
|
+
* `power`); different trains are a discrete pair (`power_on` / `power_off`). A
|
|
22
|
+
* command SmartIR knows fills its role; a source, or any command it does not
|
|
23
|
+
* know, becomes a custom button named as the file spells it.
|
|
24
|
+
*/
|
|
25
|
+
export declare function smartIrDraft(table: RemoteCommandTable, target: SmartIrTarget): SmartIrDraft;
|
|
@@ -6785,6 +6785,7 @@ var CAP_NAMES = Object.freeze([
|
|
|
6785
6785
|
"recording-onboard",
|
|
6786
6786
|
"recording-signal",
|
|
6787
6787
|
"records",
|
|
6788
|
+
"remote",
|
|
6788
6789
|
"running-state",
|
|
6789
6790
|
"scene-monitor",
|
|
6790
6791
|
"script-runner",
|
|
@@ -6808,6 +6809,7 @@ var CAP_NAMES = Object.freeze([
|
|
|
6808
6809
|
"system",
|
|
6809
6810
|
"tamper",
|
|
6810
6811
|
"temperature-sensor",
|
|
6812
|
+
"template",
|
|
6811
6813
|
"terminal-session",
|
|
6812
6814
|
"toast",
|
|
6813
6815
|
"training",
|
|
@@ -7749,6 +7751,11 @@ var CAP_STATE_LEAVES = Object.freeze({
|
|
|
7749
7751
|
"standby"
|
|
7750
7752
|
]
|
|
7751
7753
|
},
|
|
7754
|
+
{
|
|
7755
|
+
"path": "stateSource",
|
|
7756
|
+
"valueType": "enum",
|
|
7757
|
+
"enumValues": ["reported", "assumed"]
|
|
7758
|
+
},
|
|
7752
7759
|
{
|
|
7753
7760
|
"path": "volumeLevel",
|
|
7754
7761
|
"valueType": "number"
|
|
@@ -8024,6 +8031,18 @@ var CAP_STATE_LEAVES = Object.freeze({
|
|
|
8024
8031
|
{
|
|
8025
8032
|
"path": "volume",
|
|
8026
8033
|
"valueType": "number"
|
|
8034
|
+
},
|
|
8035
|
+
{
|
|
8036
|
+
"path": "lastFeedGrams",
|
|
8037
|
+
"valueType": "number"
|
|
8038
|
+
},
|
|
8039
|
+
{
|
|
8040
|
+
"path": "lastFeedHopper1",
|
|
8041
|
+
"valueType": "number"
|
|
8042
|
+
},
|
|
8043
|
+
{
|
|
8044
|
+
"path": "lastFeedHopper2",
|
|
8045
|
+
"valueType": "number"
|
|
8027
8046
|
}
|
|
8028
8047
|
],
|
|
8029
8048
|
"power-meter": [
|
|
@@ -6785,6 +6785,7 @@ var CAP_NAMES = Object.freeze([
|
|
|
6785
6785
|
"recording-onboard",
|
|
6786
6786
|
"recording-signal",
|
|
6787
6787
|
"records",
|
|
6788
|
+
"remote",
|
|
6788
6789
|
"running-state",
|
|
6789
6790
|
"scene-monitor",
|
|
6790
6791
|
"script-runner",
|
|
@@ -6808,6 +6809,7 @@ var CAP_NAMES = Object.freeze([
|
|
|
6808
6809
|
"system",
|
|
6809
6810
|
"tamper",
|
|
6810
6811
|
"temperature-sensor",
|
|
6812
|
+
"template",
|
|
6811
6813
|
"terminal-session",
|
|
6812
6814
|
"toast",
|
|
6813
6815
|
"training",
|
|
@@ -7749,6 +7751,11 @@ var CAP_STATE_LEAVES = Object.freeze({
|
|
|
7749
7751
|
"standby"
|
|
7750
7752
|
]
|
|
7751
7753
|
},
|
|
7754
|
+
{
|
|
7755
|
+
"path": "stateSource",
|
|
7756
|
+
"valueType": "enum",
|
|
7757
|
+
"enumValues": ["reported", "assumed"]
|
|
7758
|
+
},
|
|
7752
7759
|
{
|
|
7753
7760
|
"path": "volumeLevel",
|
|
7754
7761
|
"valueType": "number"
|
|
@@ -8024,6 +8031,18 @@ var CAP_STATE_LEAVES = Object.freeze({
|
|
|
8024
8031
|
{
|
|
8025
8032
|
"path": "volume",
|
|
8026
8033
|
"valueType": "number"
|
|
8034
|
+
},
|
|
8035
|
+
{
|
|
8036
|
+
"path": "lastFeedGrams",
|
|
8037
|
+
"valueType": "number"
|
|
8038
|
+
},
|
|
8039
|
+
{
|
|
8040
|
+
"path": "lastFeedHopper1",
|
|
8041
|
+
"valueType": "number"
|
|
8042
|
+
},
|
|
8043
|
+
{
|
|
8044
|
+
"path": "lastFeedHopper2",
|
|
8045
|
+
"valueType": "number"
|
|
8027
8046
|
}
|
|
8028
8047
|
],
|
|
8029
8048
|
"power-meter": [
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Template kinds (D963). A template is a named, reusable piece of operator
|
|
3
|
+
* data that more than one device points at — today the button grid of a
|
|
4
|
+
* remote. The store is generic: it keeps `{ id, kind, name, payload }` and
|
|
5
|
+
* knows nothing of a remote. Only the SYSTEM declares kinds, here: each kind
|
|
6
|
+
* names the schema its payload must satisfy. Adding a kind is adding a member
|
|
7
|
+
* to `TEMPLATE_KINDS` and a payload schema; the compiler refuses one without
|
|
8
|
+
* the other.
|
|
9
|
+
*/
|
|
10
|
+
import { z } from 'zod';
|
|
11
|
+
export declare const TEMPLATE_KINDS: readonly ['remote'];
|
|
12
|
+
export declare const TemplateKindSchema: z.ZodEnum<{
|
|
13
|
+
remote: "remote";
|
|
14
|
+
}>;
|
|
15
|
+
export type TemplateKind = z.infer<typeof TemplateKindSchema>;
|
|
16
|
+
export declare const TEMPLATE_PAYLOAD_SCHEMAS: Readonly<Record<TemplateKind, z.ZodType>>;
|
|
17
|
+
export declare function isTemplateKind(value: string): value is TemplateKind;
|
|
18
|
+
export type TemplatePayloadCheck = {
|
|
19
|
+
readonly ok: true;
|
|
20
|
+
readonly payload: unknown;
|
|
21
|
+
} | {
|
|
22
|
+
readonly ok: false;
|
|
23
|
+
readonly detail: string;
|
|
24
|
+
};
|
|
25
|
+
/** The payload as the kind's schema reads it, or why it is not one. */
|
|
26
|
+
export declare function checkTemplatePayload(kind: TemplateKind, payload: unknown): TemplatePayloadCheck;
|