@camstack/types 1.2.553 → 1.2.555
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 -4
- package/dist/addon.js +3 -2
- package/dist/addon.mjs +3 -2
- package/dist/capabilities/index.d.ts +2 -2
- package/dist/capabilities/ir-transmitter.cap.d.ts +47 -2
- package/dist/capabilities/notification-rules.cap.d.ts +24 -0
- package/dist/capabilities/remote.cap.d.ts +24 -0
- package/dist/client.js +14 -1
- package/dist/client.mjs +14 -1
- package/dist/generated/addon-api.d.ts +7 -0
- package/dist/generated/cap-input-defaults.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/index.d.ts +1 -0
- package/dist/index.js +289 -15
- package/dist/index.mjs +277 -16
- package/dist/ir/fastlz.d.ts +7 -0
- package/dist/ir/index.d.ts +2 -0
- package/dist/ir/ir-error.d.ts +1 -1
- package/dist/ir/ir-payload.d.ts +7 -1
- package/dist/ir/native.d.ts +24 -0
- package/dist/ir/tuya.d.ts +5 -0
- package/dist/notification/group-within.d.ts +22 -0
- package/dist/remote/remote-config.d.ts +6 -0
- package/dist/remote/remote-sources.d.ts +12 -0
- package/dist/{sleep-dcR4vBFG.js → sleep-4qch9WKa.js} +5 -1
- package/dist/{sleep-D0roI_CZ.mjs → sleep-Ba1dJYDo.mjs} +5 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_sleep = require("./sleep-
|
|
2
|
+
const require_sleep = require("./sleep-4qch9WKa.js");
|
|
3
3
|
const require_event_category = require("./event-category-BC4RRerT.js");
|
|
4
4
|
const require_composed_stable_id = require("./composed-stable-id-CDNLq7Y8.js");
|
|
5
5
|
const require_implemented_methods = require("./implemented-methods-Cj65uy2F.js");
|
|
@@ -46059,16 +46059,193 @@ function decodePronto(code) {
|
|
|
46059
46059
|
};
|
|
46060
46060
|
}
|
|
46061
46061
|
//#endregion
|
|
46062
|
+
//#region src/ir/fastlz.ts
|
|
46063
|
+
/**
|
|
46064
|
+
* FastLZ level 1: a byte-oriented LZ77 stream. A control byte below 32 starts a
|
|
46065
|
+
* literal run of `ctrl + 1` bytes; otherwise it is a back-reference whose length
|
|
46066
|
+
* is `ctrl >> 5` (extended by one byte when 7) and whose distance is split
|
|
46067
|
+
* between the low 5 bits and the next byte.
|
|
46068
|
+
*/
|
|
46069
|
+
var MAX_DISTANCE = 8192;
|
|
46070
|
+
var MAX_LITERAL_RUN = 32;
|
|
46071
|
+
var MIN_MATCH = 3;
|
|
46072
|
+
var MAX_MATCH = 264;
|
|
46073
|
+
/**
|
|
46074
|
+
* Most bytes a decoded IR code may hold: two bytes per timing. A level-1 stream
|
|
46075
|
+
* can expand ~130x, so the decoder checks this bound before every write.
|
|
46076
|
+
*/
|
|
46077
|
+
var IR_DECOMPRESSED_MAX = IR_TIMINGS_MAX * 2;
|
|
46078
|
+
function fastlzDecompress(input) {
|
|
46079
|
+
const out = [];
|
|
46080
|
+
let ip = 0;
|
|
46081
|
+
const room = (count) => {
|
|
46082
|
+
if (out.length + count > IR_DECOMPRESSED_MAX) throw new IrCodecError("tuya-malformed", "decompressed code is larger than any IR train");
|
|
46083
|
+
};
|
|
46084
|
+
const next = () => {
|
|
46085
|
+
const byte = input[ip++];
|
|
46086
|
+
if (byte === void 0) throw new IrCodecError("tuya-malformed", "compressed stream is truncated");
|
|
46087
|
+
return byte;
|
|
46088
|
+
};
|
|
46089
|
+
while (ip < input.length) {
|
|
46090
|
+
const ctrl = next();
|
|
46091
|
+
if (ctrl < 32) {
|
|
46092
|
+
room(ctrl + 1);
|
|
46093
|
+
for (let i = 0; i <= ctrl; i++) out.push(next());
|
|
46094
|
+
continue;
|
|
46095
|
+
}
|
|
46096
|
+
let len = (ctrl >> 5) - 1;
|
|
46097
|
+
if (len === 6) len += next();
|
|
46098
|
+
const distance = ((ctrl & 31) << 8) + next() + 1;
|
|
46099
|
+
const start = out.length - distance;
|
|
46100
|
+
if (start < 0) throw new IrCodecError("tuya-malformed", "back-reference points before the stream");
|
|
46101
|
+
room(len + 3);
|
|
46102
|
+
for (let i = 0; i < len + 3; i++) {
|
|
46103
|
+
const byte = out[start + i];
|
|
46104
|
+
if (byte === void 0) throw new IrCodecError("tuya-malformed", "back-reference is invalid");
|
|
46105
|
+
out.push(byte);
|
|
46106
|
+
}
|
|
46107
|
+
}
|
|
46108
|
+
return Uint8Array.from(out);
|
|
46109
|
+
}
|
|
46110
|
+
function fastlzCompress(input) {
|
|
46111
|
+
const out = [];
|
|
46112
|
+
const lastSeen = /* @__PURE__ */ new Map();
|
|
46113
|
+
let literalStart = 0;
|
|
46114
|
+
const flushLiterals = (end) => {
|
|
46115
|
+
for (let from = literalStart; from < end; from += MAX_LITERAL_RUN) {
|
|
46116
|
+
const to = Math.min(from + MAX_LITERAL_RUN, end);
|
|
46117
|
+
out.push(to - from - 1);
|
|
46118
|
+
for (let i = from; i < to; i++) out.push(input[i] ?? 0);
|
|
46119
|
+
}
|
|
46120
|
+
};
|
|
46121
|
+
let pos = 0;
|
|
46122
|
+
while (pos < input.length) {
|
|
46123
|
+
let matchLen = 0;
|
|
46124
|
+
let matchDistance = 0;
|
|
46125
|
+
if (pos + MIN_MATCH <= input.length) {
|
|
46126
|
+
const key = (input[pos] ?? 0) << 16 | (input[pos + 1] ?? 0) << 8 | (input[pos + 2] ?? 0);
|
|
46127
|
+
const candidate = lastSeen.get(key);
|
|
46128
|
+
lastSeen.set(key, pos);
|
|
46129
|
+
if (candidate !== void 0 && pos - candidate <= MAX_DISTANCE) {
|
|
46130
|
+
let len = 0;
|
|
46131
|
+
while (pos + len < input.length && len < MAX_MATCH && input[candidate + len] === input[pos + len]) len++;
|
|
46132
|
+
if (len >= MIN_MATCH) {
|
|
46133
|
+
matchLen = len;
|
|
46134
|
+
matchDistance = pos - candidate - 1;
|
|
46135
|
+
}
|
|
46136
|
+
}
|
|
46137
|
+
}
|
|
46138
|
+
if (matchLen === 0) {
|
|
46139
|
+
pos++;
|
|
46140
|
+
continue;
|
|
46141
|
+
}
|
|
46142
|
+
flushLiterals(pos);
|
|
46143
|
+
const enc = matchLen - 2;
|
|
46144
|
+
if (enc < 7) out.push(enc << 5 | matchDistance >> 8);
|
|
46145
|
+
else out.push(224 | matchDistance >> 8, enc - 7);
|
|
46146
|
+
out.push(matchDistance & 255);
|
|
46147
|
+
pos += matchLen;
|
|
46148
|
+
literalStart = pos;
|
|
46149
|
+
}
|
|
46150
|
+
flushLiterals(input.length);
|
|
46151
|
+
return Uint8Array.from(out);
|
|
46152
|
+
}
|
|
46153
|
+
//#endregion
|
|
46154
|
+
//#region src/ir/tuya.ts
|
|
46155
|
+
var ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
46156
|
+
var MAX_DURATION_US = 65535;
|
|
46157
|
+
function toBase64(bytes) {
|
|
46158
|
+
let out = "";
|
|
46159
|
+
for (let i = 0; i < bytes.length; i += 3) {
|
|
46160
|
+
const a = bytes[i] ?? 0;
|
|
46161
|
+
const b = bytes[i + 1] ?? 0;
|
|
46162
|
+
const c = bytes[i + 2] ?? 0;
|
|
46163
|
+
const word = a << 16 | b << 8 | c;
|
|
46164
|
+
out += ALPHABET[word >> 18 & 63];
|
|
46165
|
+
out += ALPHABET[word >> 12 & 63];
|
|
46166
|
+
out += i + 1 < bytes.length ? ALPHABET[word >> 6 & 63] : "=";
|
|
46167
|
+
out += i + 2 < bytes.length ? ALPHABET[word & 63] : "=";
|
|
46168
|
+
}
|
|
46169
|
+
return out;
|
|
46170
|
+
}
|
|
46171
|
+
function fromBase64(text) {
|
|
46172
|
+
const clean = text.trim().replace(/=+$/, "");
|
|
46173
|
+
if (clean.length === 0 || clean.length % 4 === 1) throw new IrCodecError("tuya-malformed", "not a base64 string");
|
|
46174
|
+
const out = [];
|
|
46175
|
+
let bits = 0;
|
|
46176
|
+
let acc = 0;
|
|
46177
|
+
for (const ch of clean) {
|
|
46178
|
+
const value = ALPHABET.indexOf(ch);
|
|
46179
|
+
if (value < 0) throw new IrCodecError("tuya-malformed", "not a base64 string");
|
|
46180
|
+
acc = acc << 6 | value;
|
|
46181
|
+
bits += 6;
|
|
46182
|
+
if (bits >= 8) {
|
|
46183
|
+
bits -= 8;
|
|
46184
|
+
out.push(acc >> bits & 255);
|
|
46185
|
+
}
|
|
46186
|
+
}
|
|
46187
|
+
return Uint8Array.from(out);
|
|
46188
|
+
}
|
|
46189
|
+
/** Signed pulse train to a Tuya IR code: base64(FastLZ(uint16 LE durations)). */
|
|
46190
|
+
function encodeTuya(timings) {
|
|
46191
|
+
const bytes = new Uint8Array(timings.length * 2);
|
|
46192
|
+
timings.forEach((value, index) => {
|
|
46193
|
+
const duration = Math.abs(value);
|
|
46194
|
+
if (duration === 0 || duration > MAX_DURATION_US) throw new IrCodecError("invalid-timings", `timing ${index} does not fit 16 bits`);
|
|
46195
|
+
bytes[index * 2] = duration & 255;
|
|
46196
|
+
bytes[index * 2 + 1] = duration >> 8;
|
|
46197
|
+
});
|
|
46198
|
+
return toBase64(fastlzCompress(bytes));
|
|
46199
|
+
}
|
|
46200
|
+
/** A Tuya IR code to a signed pulse train (mark first). Throws `IrCodecError`. */
|
|
46201
|
+
function decodeTuya(code) {
|
|
46202
|
+
const bytes = fastlzDecompress(fromBase64(code));
|
|
46203
|
+
if (bytes.length === 0 || bytes.length % 2 !== 0) throw new IrCodecError("tuya-malformed", "payload is not a list of 16-bit durations");
|
|
46204
|
+
const timings = [];
|
|
46205
|
+
for (let i = 0; i < bytes.length; i += 2) {
|
|
46206
|
+
const duration = (bytes[i] ?? 0) | (bytes[i + 1] ?? 0) << 8;
|
|
46207
|
+
timings.push(i / 2 % 2 === 0 ? duration : -duration);
|
|
46208
|
+
}
|
|
46209
|
+
const checked = IrTimingsSchema.safeParse(timings);
|
|
46210
|
+
if (!checked.success) throw new IrCodecError("tuya-malformed", checked.error.message);
|
|
46211
|
+
return checked.data;
|
|
46212
|
+
}
|
|
46213
|
+
//#endregion
|
|
46214
|
+
//#region src/ir/native.ts
|
|
46215
|
+
/** Device-native IR code formats a transmitter can replay verbatim. */
|
|
46216
|
+
var IrNativeFormatSchema = zod.z.enum(["tuya"]);
|
|
46217
|
+
/**
|
|
46218
|
+
* Longest native code accepted: base64 of the worst-case compressed stream
|
|
46219
|
+
* (every decoded byte as a literal, plus one control byte per 32), with margin.
|
|
46220
|
+
*/
|
|
46221
|
+
var IR_NATIVE_CODE_MAX_CHARS = Math.ceil((IR_DECOMPRESSED_MAX + Math.ceil(IR_DECOMPRESSED_MAX / 32)) / 3) * 4 + 256;
|
|
46222
|
+
var IrNativeCodeSchema = zod.z.object({
|
|
46223
|
+
format: IrNativeFormatSchema,
|
|
46224
|
+
code: zod.z.string().min(1).max(IR_NATIVE_CODE_MAX_CHARS)
|
|
46225
|
+
});
|
|
46226
|
+
var IR_NATIVE_CODECS = { tuya: {
|
|
46227
|
+
encode: encodeTuya,
|
|
46228
|
+
decode: decodeTuya
|
|
46229
|
+
} };
|
|
46230
|
+
//#endregion
|
|
46062
46231
|
//#region src/ir/ir-payload.ts
|
|
46063
|
-
/** What a remote command stores: a raw pulse train,
|
|
46064
|
-
var IrPayloadSchema = zod.z.discriminatedUnion("kind", [
|
|
46065
|
-
|
|
46066
|
-
|
|
46067
|
-
|
|
46068
|
-
|
|
46069
|
-
|
|
46070
|
-
|
|
46071
|
-
|
|
46232
|
+
/** What a remote command stores: a raw pulse train, a learned Pronto code, or a device-native code. */
|
|
46233
|
+
var IrPayloadSchema = zod.z.discriminatedUnion("kind", [
|
|
46234
|
+
zod.z.object({
|
|
46235
|
+
kind: zod.z.literal("raw"),
|
|
46236
|
+
timings: zod.z.array(zod.z.number().int()),
|
|
46237
|
+
settings: TransmitSettingsSchema.optional()
|
|
46238
|
+
}),
|
|
46239
|
+
zod.z.object({
|
|
46240
|
+
kind: zod.z.literal("pronto"),
|
|
46241
|
+
code: zod.z.string()
|
|
46242
|
+
}),
|
|
46243
|
+
zod.z.object({
|
|
46244
|
+
kind: zod.z.literal("native"),
|
|
46245
|
+
format: IrNativeFormatSchema,
|
|
46246
|
+
code: zod.z.string()
|
|
46247
|
+
})
|
|
46248
|
+
]);
|
|
46072
46249
|
/** Resolve a payload to what `ir-transmitter.send` takes. Throws `IrCodecError`. */
|
|
46073
46250
|
function toTimings(payload) {
|
|
46074
46251
|
if (payload.kind === "pronto") {
|
|
@@ -46078,6 +46255,10 @@ function toTimings(payload) {
|
|
|
46078
46255
|
settings: { carrierHz: decoded.carrierHz }
|
|
46079
46256
|
};
|
|
46080
46257
|
}
|
|
46258
|
+
if (payload.kind === "native") return {
|
|
46259
|
+
timings: IR_NATIVE_CODECS[payload.format].decode(payload.code),
|
|
46260
|
+
settings: {}
|
|
46261
|
+
};
|
|
46081
46262
|
const checked = IrTimingsSchema.safeParse(payload.timings);
|
|
46082
46263
|
if (!checked.success) throw new IrCodecError("invalid-timings", checked.error.message);
|
|
46083
46264
|
return {
|
|
@@ -61558,7 +61739,19 @@ var IrSendResultSchema = zod.z.object({
|
|
|
61558
61739
|
var IrTransmitterInfoSchema = zod.z.object({
|
|
61559
61740
|
media: zod.z.array(IrMediumSchema),
|
|
61560
61741
|
settable: zod.z.array(TransmitSettingKeySchema),
|
|
61561
|
-
maxTimings: zod.z.number().int().positive()
|
|
61742
|
+
maxTimings: zod.z.number().int().positive(),
|
|
61743
|
+
/** The transmitter can learn a code (`learn`). */
|
|
61744
|
+
learn: zod.z.boolean().default(false),
|
|
61745
|
+
/** Native code formats the transmitter replays verbatim (`send.native`). */
|
|
61746
|
+
formats: zod.z.array(IrNativeFormatSchema).default([])
|
|
61747
|
+
});
|
|
61748
|
+
var IR_LEARN_TIMEOUT_DEFAULT_MS = 2e4;
|
|
61749
|
+
var IR_LEARN_TIMEOUT_MAX_MS = 6e4;
|
|
61750
|
+
var IrLearnResultSchema = zod.z.object({
|
|
61751
|
+
/** The code in the device's own format, when it reports one. */
|
|
61752
|
+
native: IrNativeCodeSchema.nullable(),
|
|
61753
|
+
timings: IrTimingsSchema,
|
|
61754
|
+
carrierHz: zod.z.number().int().positive().nullable()
|
|
61562
61755
|
});
|
|
61563
61756
|
/**
|
|
61564
61757
|
* ir-transmitter — emit a pulse train (infrared or RF) with settings. One cap
|
|
@@ -61569,7 +61762,12 @@ var IrTransmitterInfoSchema = zod.z.object({
|
|
|
61569
61762
|
* transmitter cannot be reached) and `ir-transmitter.too-long` (more pulses
|
|
61570
61763
|
* than the transmitter's `maxTimings`). A setting the transmitter cannot apply
|
|
61571
61764
|
* is NOT a refusal: the train is sent and the key comes back in
|
|
61572
|
-
* `ignoredSettings`.
|
|
61765
|
+
* `ignoredSettings`. `send` takes exactly one of `timings` or `native` (a code
|
|
61766
|
+
* in a format listed in `getInfo.formats`).
|
|
61767
|
+
*
|
|
61768
|
+
* `learn` waits for the user to point a remote at the transmitter and refuses
|
|
61769
|
+
* with `ir-transmitter.learn-unsupported`, `ir-transmitter.learn-timeout` or
|
|
61770
|
+
* `ir-transmitter.learn-undecodable`.
|
|
61573
61771
|
*/
|
|
61574
61772
|
var irTransmitterCapability = {
|
|
61575
61773
|
name: "ir-transmitter",
|
|
@@ -61580,9 +61778,17 @@ var irTransmitterCapability = {
|
|
|
61580
61778
|
methods: {
|
|
61581
61779
|
send: require_sleep.method(zod.z.object({
|
|
61582
61780
|
deviceId: zod.z.number().int().nonnegative(),
|
|
61583
|
-
timings: IrTimingsSchema,
|
|
61781
|
+
timings: IrTimingsSchema.optional(),
|
|
61782
|
+
native: IrNativeCodeSchema.optional(),
|
|
61584
61783
|
settings: TransmitSettingsSchema.optional()
|
|
61585
|
-
}), IrSendResultSchema, {
|
|
61784
|
+
}).refine((input) => input.timings === void 0 !== (input.native === void 0), { message: "send takes exactly one of timings or native" }), IrSendResultSchema, {
|
|
61785
|
+
kind: "mutation",
|
|
61786
|
+
auth: "protected"
|
|
61787
|
+
}),
|
|
61788
|
+
learn: require_sleep.method(zod.z.object({
|
|
61789
|
+
deviceId: zod.z.number().int().nonnegative(),
|
|
61790
|
+
timeoutMs: zod.z.number().int().positive().max(IR_LEARN_TIMEOUT_MAX_MS).default(IR_LEARN_TIMEOUT_DEFAULT_MS)
|
|
61791
|
+
}), IrLearnResultSchema, {
|
|
61586
61792
|
kind: "mutation",
|
|
61587
61793
|
auth: "protected"
|
|
61588
61794
|
}),
|
|
@@ -76107,6 +76313,16 @@ var NcConfirmSchema = zod.z.object({
|
|
|
76107
76313
|
var NC_GROUPING_MIN_SEC = 5;
|
|
76108
76314
|
var NC_GROUPING_DEFAULT_SEC = 20;
|
|
76109
76315
|
var NC_GROUPING_MAX_SEC = 60;
|
|
76316
|
+
/**
|
|
76317
|
+
* GROUP WITHIN (operator, 2026-11-12). How long deliveries of one rule to one
|
|
76318
|
+
* target wait to be said together. The meaning of ABSENCE is by delivery kind
|
|
76319
|
+
* (`groupWithinSecOf`), so this is `.optional()` and never `.default()`: a Zod
|
|
76320
|
+
* default does not run on the addon cap path, and one default cannot be both
|
|
76321
|
+
* 5 (system events) and 0 (a detection). `0` is "send each one now".
|
|
76322
|
+
*/
|
|
76323
|
+
var NC_GROUP_WITHIN_SYSTEM_DEFAULT_SEC = 5;
|
|
76324
|
+
var NC_GROUP_WITHIN_OTHER_DEFAULT_SEC = 0;
|
|
76325
|
+
var NC_GROUP_WITHIN_MAX_SEC = 300;
|
|
76110
76326
|
/** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
|
|
76111
76327
|
var NcRuleInputSchema = zod.z.object({
|
|
76112
76328
|
name: zod.z.string().min(1).max(200),
|
|
@@ -76229,6 +76445,13 @@ var NcRuleInputSchema = zod.z.object({
|
|
|
76229
76445
|
*/
|
|
76230
76446
|
groupingSec: zod.z.number().int().min(5).max(60).optional(),
|
|
76231
76447
|
/**
|
|
76448
|
+
* Hold deliveries of this rule to one target and, when two or more arrive
|
|
76449
|
+
* before the window ends, send them as one summary. Absent = the kind's
|
|
76450
|
+
* default (`groupWithinSecOf`): 5 s for a system-event rule, 0 for every
|
|
76451
|
+
* other kind. `0` sends each delivery as it does today.
|
|
76452
|
+
*/
|
|
76453
|
+
groupWithinSec: zod.z.number().int().min(0).max(300).optional(),
|
|
76454
|
+
/**
|
|
76232
76455
|
* ASK ME TO CONFIRM DETECTIONS (#243): a DETECTION notification of this rule
|
|
76233
76456
|
* carries "Correct" / "Wrong" buttons (and, where the channel has room, a
|
|
76234
76457
|
* "Wrong, it is a <class>" choice). A tap marks the track for retraining, the
|
|
@@ -77300,7 +77523,12 @@ var NcHistoryEntrySchema = zod.z.object({
|
|
|
77300
77523
|
* Assistant export) must render as "no image right now", never as a
|
|
77301
77524
|
* broken link.
|
|
77302
77525
|
*/
|
|
77303
|
-
artifactIds: zod.z.array(zod.z.string().min(1)).optional()
|
|
77526
|
+
artifactIds: zod.z.array(zod.z.string().min(1)).optional(),
|
|
77527
|
+
/**
|
|
77528
|
+
* When this row was folded into a group-window summary, the outbox id of
|
|
77529
|
+
* that one notification. Absent on a row that was sent as itself.
|
|
77530
|
+
*/
|
|
77531
|
+
groupedInto: zod.z.string().min(1).optional()
|
|
77304
77532
|
});
|
|
77305
77533
|
/** `getHistory` default page size + hard ceiling (bounded output). */
|
|
77306
77534
|
var NC_HISTORY_LIMIT_DEFAULT = 100;
|
|
@@ -112878,6 +113106,13 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
112878
113106
|
access: "view",
|
|
112879
113107
|
role: "viewer"
|
|
112880
113108
|
},
|
|
113109
|
+
"irTransmitter.learn": {
|
|
113110
|
+
capName: "ir-transmitter",
|
|
113111
|
+
capScope: "device",
|
|
113112
|
+
addonId: null,
|
|
113113
|
+
access: "create",
|
|
113114
|
+
role: "viewer"
|
|
113115
|
+
},
|
|
112881
113116
|
"irTransmitter.send": {
|
|
112882
113117
|
capName: "ir-transmitter",
|
|
112883
113118
|
capScope: "device",
|
|
@@ -123165,6 +123400,11 @@ var METHOD_DEVICE_SELECTORS = Object.freeze({
|
|
|
123165
123400
|
form: "single",
|
|
123166
123401
|
optional: false
|
|
123167
123402
|
}],
|
|
123403
|
+
"irTransmitter.learn": [{
|
|
123404
|
+
name: "deviceId",
|
|
123405
|
+
form: "single",
|
|
123406
|
+
optional: false
|
|
123407
|
+
}],
|
|
123168
123408
|
"irTransmitter.send": [{
|
|
123169
123409
|
name: "deviceId",
|
|
123170
123410
|
form: "single",
|
|
@@ -128978,6 +129218,27 @@ function ruleEditorSectionsForKind(kind) {
|
|
|
128978
129218
|
return sections;
|
|
128979
129219
|
}
|
|
128980
129220
|
//#endregion
|
|
129221
|
+
//#region src/notification/group-within.ts
|
|
129222
|
+
/**
|
|
129223
|
+
* How long a rule holds deliveries before it sends them (operator, 2026-11-12).
|
|
129224
|
+
*
|
|
129225
|
+
* Absent means the kind's default: a system-event rule waits
|
|
129226
|
+
* {@link NC_GROUP_WITHIN_SYSTEM_DEFAULT_SEC}, every other rule sends at once.
|
|
129227
|
+
* `0` is the explicit "send each one now". The number is never a Zod default —
|
|
129228
|
+
* the addon cap path does not run those, and a default that depended on
|
|
129229
|
+
* `delivery` cannot be one value on the schema.
|
|
129230
|
+
*
|
|
129231
|
+
* The constants live on the cap schema (one owner). `delivery === 'system-event'`
|
|
129232
|
+
* is the comparison `isSystemDelivery` makes; this module does not import that
|
|
129233
|
+
* function because its module imports the cap, and the cap must not import this.
|
|
129234
|
+
*/
|
|
129235
|
+
var SYSTEM_DELIVERY = "system-event";
|
|
129236
|
+
/** Seconds to hold. `0` sends immediately. */
|
|
129237
|
+
function groupWithinSecOf(rule) {
|
|
129238
|
+
if (rule.groupWithinSec !== void 0) return rule.groupWithinSec;
|
|
129239
|
+
return rule.delivery === SYSTEM_DELIVERY ? 5 : 0;
|
|
129240
|
+
}
|
|
129241
|
+
//#endregion
|
|
128981
129242
|
//#region src/notification/media-image.ts
|
|
128982
129243
|
/** Every mode, in the order an editor offers them. */
|
|
128983
129244
|
var NC_MEDIA_IMAGE_MODES = [
|
|
@@ -139900,6 +140161,10 @@ exports.INITIAL_SPAN = INITIAL_SPAN;
|
|
|
139900
140161
|
exports.INTEGRAL_OUTPUTS = require_implemented_methods.INTEGRAL_OUTPUTS;
|
|
139901
140162
|
exports.INTERNAL_ACTION_PREFIX = INTERNAL_ACTION_PREFIX;
|
|
139902
140163
|
exports.INVERTIBLE_CAPS = INVERTIBLE_CAPS;
|
|
140164
|
+
exports.IR_LEARN_TIMEOUT_DEFAULT_MS = IR_LEARN_TIMEOUT_DEFAULT_MS;
|
|
140165
|
+
exports.IR_LEARN_TIMEOUT_MAX_MS = IR_LEARN_TIMEOUT_MAX_MS;
|
|
140166
|
+
exports.IR_NATIVE_CODECS = IR_NATIVE_CODECS;
|
|
140167
|
+
exports.IR_NATIVE_CODE_MAX_CHARS = IR_NATIVE_CODE_MAX_CHARS;
|
|
139903
140168
|
exports.IR_TIMINGS_MAX = IR_TIMINGS_MAX;
|
|
139904
140169
|
exports.IconKeySchema = IconKeySchema;
|
|
139905
140170
|
exports.ImageContractSchema = ImageContractSchema;
|
|
@@ -139935,7 +140200,10 @@ exports.IntercomAbilitySchema = IntercomAbilitySchema;
|
|
|
139935
140200
|
exports.IntercomStatusSchema = IntercomStatusSchema;
|
|
139936
140201
|
exports.InvalidRecordError = require_sleep.InvalidRecordError;
|
|
139937
140202
|
exports.IrCodecError = IrCodecError;
|
|
140203
|
+
exports.IrLearnResultSchema = IrLearnResultSchema;
|
|
139938
140204
|
exports.IrMediumSchema = IrMediumSchema;
|
|
140205
|
+
exports.IrNativeCodeSchema = IrNativeCodeSchema;
|
|
140206
|
+
exports.IrNativeFormatSchema = IrNativeFormatSchema;
|
|
139939
140207
|
exports.IrPayloadSchema = IrPayloadSchema;
|
|
139940
140208
|
exports.IrSendResultSchema = IrSendResultSchema;
|
|
139941
140209
|
exports.IrTimingsSchema = IrTimingsSchema;
|
|
@@ -140289,6 +140557,9 @@ exports.NC_DEFAULT_SNOOZE_MINUTES = NC_DEFAULT_SNOOZE_MINUTES;
|
|
|
140289
140557
|
exports.NC_GROUPING_DEFAULT_SEC = NC_GROUPING_DEFAULT_SEC;
|
|
140290
140558
|
exports.NC_GROUPING_MAX_SEC = NC_GROUPING_MAX_SEC;
|
|
140291
140559
|
exports.NC_GROUPING_MIN_SEC = NC_GROUPING_MIN_SEC;
|
|
140560
|
+
exports.NC_GROUP_WITHIN_MAX_SEC = NC_GROUP_WITHIN_MAX_SEC;
|
|
140561
|
+
exports.NC_GROUP_WITHIN_OTHER_DEFAULT_SEC = NC_GROUP_WITHIN_OTHER_DEFAULT_SEC;
|
|
140562
|
+
exports.NC_GROUP_WITHIN_SYSTEM_DEFAULT_SEC = NC_GROUP_WITHIN_SYSTEM_DEFAULT_SEC;
|
|
140292
140563
|
exports.NC_HISTORY_LIMIT_DEFAULT = NC_HISTORY_LIMIT_DEFAULT;
|
|
140293
140564
|
exports.NC_HISTORY_LIMIT_MAX = NC_HISTORY_LIMIT_MAX;
|
|
140294
140565
|
exports.NC_LEGACY_SYSTEM_EVENT_KINDS = NC_LEGACY_SYSTEM_EVENT_KINDS;
|
|
@@ -141737,6 +142008,7 @@ exports.decodeKeyedArrayOverride = decodeKeyedArrayOverride;
|
|
|
141737
142008
|
exports.decodePronto = decodePronto;
|
|
141738
142009
|
exports.decodePulseOverride = decodePulseOverride;
|
|
141739
142010
|
exports.decodeScalarOverride = decodeScalarOverride;
|
|
142011
|
+
exports.decodeTuya = decodeTuya;
|
|
141740
142012
|
exports.decodeVectorBase64 = decodeVectorBase64;
|
|
141741
142013
|
exports.decoderCapability = decoderCapability;
|
|
141742
142014
|
exports.defaultDeliveryForSection = defaultDeliveryForSection;
|
|
@@ -141842,6 +142114,7 @@ exports.encodeCardsToComposition = encodeCardsToComposition;
|
|
|
141842
142114
|
exports.encodeFlipperParsed = encodeFlipperParsed;
|
|
141843
142115
|
exports.encodeProfileFromStreamShape = encodeProfileFromStreamShape;
|
|
141844
142116
|
exports.encodeSamsung = encodeSamsung;
|
|
142117
|
+
exports.encodeTuya = encodeTuya;
|
|
141845
142118
|
exports.encodeVectorBase64 = encodeVectorBase64;
|
|
141846
142119
|
exports.ensureAlarmProfiles = ensureAlarmProfiles;
|
|
141847
142120
|
exports.entryBody = require_sleep.entryBody;
|
|
@@ -141967,6 +142240,7 @@ exports.groupActiveCapability = groupActiveCapability;
|
|
|
141967
142240
|
exports.groupCommandsCapability = groupCommandsCapability;
|
|
141968
142241
|
exports.groupStatusCapability = groupStatusCapability;
|
|
141969
142242
|
exports.groupTemplate = groupTemplate;
|
|
142243
|
+
exports.groupWithinSecOf = groupWithinSecOf;
|
|
141970
142244
|
exports.guardInstanceDelete = guardInstanceDelete;
|
|
141971
142245
|
exports.hasEventLeaves = hasEventLeaves;
|
|
141972
142246
|
exports.hasHoldLeaves = hasHoldLeaves;
|