@camstack/types 1.2.555 → 1.2.556
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.js +2 -2
- package/dist/addon.mjs +2 -2
- package/dist/audit/device-transition.d.ts +53 -0
- package/dist/capabilities/index.d.ts +1 -1
- package/dist/capabilities/notification-rules.cap.d.ts +237 -0
- package/dist/capabilities/osd-manager.cap.d.ts +96 -0
- package/dist/client.js +75 -8
- package/dist/client.mjs +75 -8
- package/dist/device/hero/hero-row.d.ts +6 -1
- package/dist/enums/event-category.d.ts +9 -0
- package/dist/enums.js +1 -1
- package/dist/enums.mjs +1 -1
- package/dist/{event-category-78tcBemo.mjs → event-category-Dv-Gcv1f.mjs} +9 -0
- package/dist/{event-category-BC4RRerT.js → event-category-Ps2LC8dN.js} +9 -0
- package/dist/index.js +114 -11
- package/dist/index.mjs +112 -12
- package/dist/notification/system-event-families.d.ts +5 -0
- package/dist/notification/system-event-filters.d.ts +1 -1
- package/dist/{sleep-4qch9WKa.js → sleep-BRGFFgr9.js} +41 -1
- package/dist/{sleep-Ba1dJYDo.mjs → sleep-Czv-4wFH.mjs} +36 -2
- package/package.json +1 -1
|
@@ -65,6 +65,11 @@ export type NcSystemEventFamilyProblem = {
|
|
|
65
65
|
readonly code: 'filter-outside-family';
|
|
66
66
|
readonly filter: NcSystemEventConditionFilterKey;
|
|
67
67
|
readonly family: NcSystemEventFamily;
|
|
68
|
+
}
|
|
69
|
+
/** A `commandActions` entry the vocabulary action index (D983) does not know. */
|
|
70
|
+
| {
|
|
71
|
+
readonly code: 'unknown-command-action';
|
|
72
|
+
readonly action: string;
|
|
68
73
|
};
|
|
69
74
|
/**
|
|
70
75
|
* Why the hub refuses this condition on a new or updated rule. Empty = accepted.
|
|
@@ -41,7 +41,7 @@ import { type NcSystemEventKind } from '../capabilities/notification-rules.cap.j
|
|
|
41
41
|
* two sides has to be able to say which field it is talking about without a
|
|
42
42
|
* translation table in the middle.
|
|
43
43
|
*/
|
|
44
|
-
export type NcSystemEventFilterKey = 'deviceIds' | 'deviceTypes' | 'nodeIds' | 'packageNames' | 'consumableLowPercent';
|
|
44
|
+
export type NcSystemEventFilterKey = 'deviceIds' | 'deviceTypes' | 'nodeIds' | 'packageNames' | 'consumableLowPercent' | 'commandActions' | 'commandOutcomes' | 'commandActorKinds';
|
|
45
45
|
/**
|
|
46
46
|
* Every filter, for the callers that must cover all of them (guards, tests).
|
|
47
47
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_event_category = require("./event-category-
|
|
1
|
+
const require_event_category = require("./event-category-Ps2LC8dN.js");
|
|
2
2
|
const require_composed_stable_id = require("./composed-stable-id-CDNLq7Y8.js");
|
|
3
3
|
let zod = require("zod");
|
|
4
4
|
//#region src/audio/audio-chunk-format.ts
|
|
@@ -936,6 +936,13 @@ async function runAddonMigrations(host, migrations, logger, options = {}) {
|
|
|
936
936
|
else skipped.push(id);
|
|
937
937
|
};
|
|
938
938
|
const selected = options.only === void 0 ? null : new Set(options.only);
|
|
939
|
+
const deferred = /* @__PURE__ */ new Set();
|
|
940
|
+
const deferredBy = (reason) => {
|
|
941
|
+
if (selected === null || reason === null) return null;
|
|
942
|
+
const dep = /^dependency-(?:pending|blocked):(.+)$/.exec(reason)?.[1];
|
|
943
|
+
if (dep === void 0 || !byId.has(dep)) return null;
|
|
944
|
+
return !selected.has(dep) || deferred.has(dep) ? dep : null;
|
|
945
|
+
};
|
|
939
946
|
for (const step of declaration.steps) {
|
|
940
947
|
if (selected !== null && !selected.has(step.id)) continue;
|
|
941
948
|
const bound = byId.get(step.id);
|
|
@@ -947,6 +954,19 @@ async function runAddonMigrations(host, migrations, logger, options = {}) {
|
|
|
947
954
|
try {
|
|
948
955
|
const gate = await host.startMigration({ id: step.id });
|
|
949
956
|
if (!gate.proceed) {
|
|
957
|
+
const waitsFor = deferredBy(gate.reason);
|
|
958
|
+
if (waitsFor !== null) {
|
|
959
|
+
log.info("migration deferred: its predecessor runs in another phase of this owner", {
|
|
960
|
+
tags,
|
|
961
|
+
meta: {
|
|
962
|
+
waitsFor,
|
|
963
|
+
reason: gate.reason
|
|
964
|
+
}
|
|
965
|
+
});
|
|
966
|
+
deferred.add(step.id);
|
|
967
|
+
skipped.push(step.id);
|
|
968
|
+
continue;
|
|
969
|
+
}
|
|
950
970
|
log.warn("migration not run", {
|
|
951
971
|
tags,
|
|
952
972
|
meta: {
|
|
@@ -6761,6 +6781,20 @@ var DeviceTransitionSchema = zod.z.object({
|
|
|
6761
6781
|
actor: TransitionActorSchema,
|
|
6762
6782
|
command: TransitionCommandSchema.optional()
|
|
6763
6783
|
});
|
|
6784
|
+
/**
|
|
6785
|
+
* The payload of `EventCategory.DeviceCommandSettled`: a command the audit
|
|
6786
|
+
* settled, without its arguments (they stay redacted in the row). A command is
|
|
6787
|
+
* named ONLY by its vocabulary action id (`powerSource.forceRestart`, D983) -
|
|
6788
|
+
* the one dictionary the automation action blocks use; the cap is derived from
|
|
6789
|
+
* the action index, never carried.
|
|
6790
|
+
*/
|
|
6791
|
+
var DeviceCommandSettledEventSchema = zod.z.object({
|
|
6792
|
+
deviceId: zod.z.number().int(),
|
|
6793
|
+
action: zod.z.string(),
|
|
6794
|
+
outcome: TransitionOutcomeSchema,
|
|
6795
|
+
actor: TransitionActorSchema,
|
|
6796
|
+
at: zod.z.number()
|
|
6797
|
+
});
|
|
6764
6798
|
var READING_QUANTITIES = [
|
|
6765
6799
|
"temperature",
|
|
6766
6800
|
"pressure",
|
|
@@ -17194,6 +17228,12 @@ Object.defineProperty(exports, "DecodedAudioChunkSchema", {
|
|
|
17194
17228
|
return DecodedAudioChunkSchema;
|
|
17195
17229
|
}
|
|
17196
17230
|
});
|
|
17231
|
+
Object.defineProperty(exports, "DeviceCommandSettledEventSchema", {
|
|
17232
|
+
enumerable: true,
|
|
17233
|
+
get: function() {
|
|
17234
|
+
return DeviceCommandSettledEventSchema;
|
|
17235
|
+
}
|
|
17236
|
+
});
|
|
17197
17237
|
Object.defineProperty(exports, "DeviceTransitionSchema", {
|
|
17198
17238
|
enumerable: true,
|
|
17199
17239
|
get: function() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as EventCategory } from "./event-category-
|
|
1
|
+
import { t as EventCategory } from "./event-category-Dv-Gcv1f.mjs";
|
|
2
2
|
import { a as DeviceType, i as DeviceRole, s as errMsg } from "./composed-stable-id-CPp3votu.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region src/audio/audio-chunk-format.ts
|
|
@@ -936,6 +936,13 @@ async function runAddonMigrations(host, migrations, logger, options = {}) {
|
|
|
936
936
|
else skipped.push(id);
|
|
937
937
|
};
|
|
938
938
|
const selected = options.only === void 0 ? null : new Set(options.only);
|
|
939
|
+
const deferred = /* @__PURE__ */ new Set();
|
|
940
|
+
const deferredBy = (reason) => {
|
|
941
|
+
if (selected === null || reason === null) return null;
|
|
942
|
+
const dep = /^dependency-(?:pending|blocked):(.+)$/.exec(reason)?.[1];
|
|
943
|
+
if (dep === void 0 || !byId.has(dep)) return null;
|
|
944
|
+
return !selected.has(dep) || deferred.has(dep) ? dep : null;
|
|
945
|
+
};
|
|
939
946
|
for (const step of declaration.steps) {
|
|
940
947
|
if (selected !== null && !selected.has(step.id)) continue;
|
|
941
948
|
const bound = byId.get(step.id);
|
|
@@ -947,6 +954,19 @@ async function runAddonMigrations(host, migrations, logger, options = {}) {
|
|
|
947
954
|
try {
|
|
948
955
|
const gate = await host.startMigration({ id: step.id });
|
|
949
956
|
if (!gate.proceed) {
|
|
957
|
+
const waitsFor = deferredBy(gate.reason);
|
|
958
|
+
if (waitsFor !== null) {
|
|
959
|
+
log.info("migration deferred: its predecessor runs in another phase of this owner", {
|
|
960
|
+
tags,
|
|
961
|
+
meta: {
|
|
962
|
+
waitsFor,
|
|
963
|
+
reason: gate.reason
|
|
964
|
+
}
|
|
965
|
+
});
|
|
966
|
+
deferred.add(step.id);
|
|
967
|
+
skipped.push(step.id);
|
|
968
|
+
continue;
|
|
969
|
+
}
|
|
950
970
|
log.warn("migration not run", {
|
|
951
971
|
tags,
|
|
952
972
|
meta: {
|
|
@@ -6761,6 +6781,20 @@ var DeviceTransitionSchema = z.object({
|
|
|
6761
6781
|
actor: TransitionActorSchema,
|
|
6762
6782
|
command: TransitionCommandSchema.optional()
|
|
6763
6783
|
});
|
|
6784
|
+
/**
|
|
6785
|
+
* The payload of `EventCategory.DeviceCommandSettled`: a command the audit
|
|
6786
|
+
* settled, without its arguments (they stay redacted in the row). A command is
|
|
6787
|
+
* named ONLY by its vocabulary action id (`powerSource.forceRestart`, D983) -
|
|
6788
|
+
* the one dictionary the automation action blocks use; the cap is derived from
|
|
6789
|
+
* the action index, never carried.
|
|
6790
|
+
*/
|
|
6791
|
+
var DeviceCommandSettledEventSchema = z.object({
|
|
6792
|
+
deviceId: z.number().int(),
|
|
6793
|
+
action: z.string(),
|
|
6794
|
+
outcome: TransitionOutcomeSchema,
|
|
6795
|
+
actor: TransitionActorSchema,
|
|
6796
|
+
at: z.number()
|
|
6797
|
+
});
|
|
6764
6798
|
var READING_QUANTITIES = [
|
|
6765
6799
|
"temperature",
|
|
6766
6800
|
"pressure",
|
|
@@ -16924,4 +16958,4 @@ function sleepCancellable(ms, signal) {
|
|
|
16924
16958
|
});
|
|
16925
16959
|
}
|
|
16926
16960
|
//#endregion
|
|
16927
|
-
export { DEVICE_CHILDREN_BATCH_MAX as $,
|
|
16961
|
+
export { DEVICE_CHILDREN_BATCH_MAX as $, WELL_KNOWN_TABS as $i, HISTORY_DEFAULT_MIN_INTERVAL_MS as $n, RECORD_CLASSES as $r, displayUnitFor as $t, CAP_ADVANCE_FIELDS as A, RecordNotFoundError as Ai, PeerBytesTicketSchema as An, SCOPED_SETTINGS_SCOPES as Ar, CAM_PROFILE_ORDER as At, CAP_COMMAND_ORIGIN_CONTEXT_KEY as B, recordsErrorFromMessage as Bi, RecordKindDeclarationSchema as Bn, RecordIntegrationInstances as Br, StreamSourceEntrySchema$1 as Bt, auditedFields as C, findMigrationsBlocked as Ca, DeclarationRefusedError as Ci, registerKnownSecret as Cn, secretTreeFromPaths as Cr, createDebugEmitter as Ct, HF_BASE_URL as D, isAudioChunkFormat as Da, NoCallerError as Di, PEER_BYTES_MAX_OUTSTANDING as Dn, isSecretRefOwnedBy as Dr, AudioStreamPickSchema as Dt, DEFAULT_TOKEN_EXPIRY as E, expandAudioChunkToF32le as Ea, InvalidRecordError as Ei, PEER_BYTES_CHUNK_BYTES as En, collectSecretMarkerRefs as Er, AudioChunkFormatSchema as Et, withoutCallerStamp as F, RevConflictError as Fi, defineEntryKind as Fn, createDurableState as Fr, DecodedAudioChunkSchema as Ft, readNodePin as G, secretsOverMigrationApi as Gi, declarationsOf as Gn, mapSecretLeaves as Gr, makeSourceBrokerId as Gt, commandOrigin as H, integrationRowsApiOver as Hi, RecordRetentionSchema as Hn, secretViewsOf as Hr, SubscribeAudioChunksInputSchema as Ht, customAction as I, TransactRefusedError as Ii, entryBody as In, moveRegistrySwitchToBody as Ir, FrameHandleSchema as It, PipelineRunResultBridge as J, defineAddonMigrations as Ji, collectZodSecretPaths as Jn, recordSecretCollection as Jr, DEFAULT_DISPLAY_PREFERENCE as Jt, toNodeId as K, switchRecordsOverMigrationApi as Ki, defineRecordKinds as Kn, parseSecretPath as Kr, parseProfileBrokerId as Kt, defineCustomActions as L, UnindexedFilterError as Li, EntryDescriptorSchema as Ln, registrySwitchPortsOver as Lr, ProfileRtspEntrySchema as Lt, CAP_NAMES as M, RecordTooLargeError as Mi, DATAPLANE_SECRET_HEADER as Mn, resolveDeviceSettings as Mr, CamStreamKindSchema as Mt, CAP_STATE_LEAVES as N, RecordUniqueViolationError as Ni, SHARE_VIEW_KINDS as Nn, resolvedValues as Nr, CamStreamResolutionSchema as Nt, HF_REPO as O, PlaintextSecretError as Oi, PEER_BYTES_STALL_MS as On, resolveSecretMarkers as Or, BrokerStatsSchema as Ot, CALLER_STAMPED_CAPABILITIES as P, RecordsError as Pi, DisposerChain as Pn, normalizeNodeId as Pr, CameraStreamSchema as Pt, deviceOpsCapability as Q, isEvent as Qi, DEVICE_STATUS_METHOD as Qn, RECORD_BATCH_MAX_BYTES as Qr, baseUnitOf as Qt, describeCustomActions as R, UnknownRecordKindError as Ri, RecordFieldPathSchema as Rn, registrySwitchToBodyId as Rr, ProfileSlotSchema as Rt, createSliceHandle as S, AddonMigrationsBlockedError as Sa, BatchTooLargeError as Si, knownSecretCount as Sn, parseSecretStatePath as Sr, __resetDebugInterestForTests as St, isCommand as T, audioChunkBytesPerSample as Ta, ForeignSecretMarkerError as Ti, shortSecretRefHash as Tn, KeychainWriteRefusedError as Tr, isDebugChannelName as Tt, nodePin as U, recordsOverMigrationApi as Ui, StoredRecordKindDeclarationSchema as Un, REMOVE_LEAF as Ur, SubscribeAudioChunksResultSchema as Ut, CAP_NODE_PIN_CONTEXT_KEY as V, defaultIntegrationDepsOver as Vi, RecordKindNameSchema as Vn, isInstanceEnabled as Vr, StreamSourceSchema as Vt, readCommandOrigin as W, rowsDepsOver as Wi, assertValidDeclaration as Wn, collectSecretLeaves as Wr, makeProfileBrokerId as Wt, MIGRATION_API_VERSION as X, createEvent as Xi, DEFAULT_RUNTIME_STATE_DURABILITY as Xn, secretArrayPrefixes as Xr, QUANTITY_BASE as Xt, PipelineStepInputSchema as Y, runAddonMigrations as Yi, isZodSecret as Yn, recordSecretRef as Yr, DISPLAY_PREFERENCES as Yt, RawStateResultSchema as Z, emitReadiness as Zi, DEVICE_SETTINGS_CONTRIBUTION_METHODS as Zn, RECORD_BATCH_MAX as Zr, ReadingQuantitySchema as Zt, invokeTrpcLeaf as _, collectSecretConfigKeys as _a, normalizeSecretOwner as _i, REVALIDATE_AFTER_MS as _n, BaseAddon as _r, DEBUG_WATCH_HARD_CAP_MS as _t, asJsonArray as a, hydrateSchema as aa, RECORD_MAX_INDEXES as ai, TransitionActorKindSchema as an, isDeviceConfigCap as ar, findVocabAction as at, createLazyTrpcSource as b, omitTransientConfig as ba, linksOfKind as bi, clearKnownSecrets as bn, normalizeAddonInitResult as br, DebugInterest as bt, asString as c, classifySecretWrite as ca, RECORD_SECRET_COLLECTION_PREFIX as ci, TransitionOutcomeSchema as cn, resolveCapMount as cr, CAP_VOCABULARY_BY_NAME as ct, parseJsonUnknown as d, isSecretMarker as da, SECRET_REF_SCHEME as di, RuleFireOriginSchema as dn, ErrorCodeSchema as dr, ReadinessRegistry as dt, WELL_KNOWN_TAB_MAP as ea, RECORD_DATABASES as ei, historyUnitFor as en, HISTORY_UNIT_LABELS as er, adminUiCapability as et, hfModelUrl as f, isSecretMarkerLike as fa, arrayItemFieldPath as fi, ruleFireOfClaim as fn, ErrorI18nPayloadSchema as fr, ReadinessTimeoutError as ft, createDeviceProxy as g, collectKeychainStoredKeys as ga, isSecretRef as gi, resolveSecretViewsIn as gn, userError as gr, DEBUG_CHANNEL_PREFIX as gt, isDeviceScopedCap as h, REDACTED_SECRET as ha, globalSecretScope as hi, assertTransactScope as hn, readErrorI18n as hr, scopeKey as ht, asBoolean as i, dehydrateSchema as ia, RECORD_MAX_DATA_BYTES as ii, DeviceTransitionSchema as in, historyItemFieldPath as ir, allVocabActions as it, CAP_METHOD_TIMEOUTS_MS as j, RecordSecretUnavailableError as ji, CALLER_USERNAME_HEADER as jn, nodeIdOfScopedKey as jr, CamProfileSchema as jt, RUNTIME_DEFAULTS as k, RECORDS_ERROR_CODES as ki, PEER_BYTES_TICKET_TTL_MS as kn, transformSecretWrite as kr, BrokerStatusSchema as kt, parseJsonArray as l, isSecretClear as la, RECORD_SETTINGS_MAX_ROWS as li, TransitionValueSchema as ln, systemMethod as lr, t as lt, DEVICE_SCOPED_CAPS as m, toSecretFieldView as ma, formatSecretScope as mi, createRecordsAccess as mn, forbiddenError as mr, readinessKey as mt, sleepCancellable as n, collectHydratedFieldValues as na, RECORD_DELETE_BATCH as ni, readingMeta as nn, event as nr, addonPagesSourceCapability as nt, asJsonObject as o, resolveHydratedFieldValue as oa, RECORD_MAX_INDEX_FIELDS as oi, TransitionActorSchema as on, method as or, vocabActionIdFor as ot, BOOT_RECOVERY_BACKOFF_MS as p, makeSecretMarker as pa, buildSecretRef as pi, makeInMemoryRecords as pn, FORBIDDEN_MESSAGE_PREFIX as pr, emitDownForOwnedCaps as pt, viewerUiCapability as q, AddonMigrationDefinitionError as qi, SECRET_META as qn, recordArrayItemPath as qr, selectAssignedProfileSlots as qt, maskUrlCredentials as r, dehydrateConfigField as ra, RECORD_ID_MAX_LENGTH as ri, DeviceCommandSettledEventSchema as rn, expandCapMethods as rr, actionEffect as rt, asNumber as s, SECRET_CLEAR as sa, RECORD_QUERY_MAX as si, TransitionCommandSchema as sn, optionalMethod as sr, CAP_VOCABULARY as st, sleep as t, collectHydratedFieldEntries as ta, RECORD_DEFAULT_MAX_DATA_BYTES as ti, isReadingQuantity as tn, PROVIDER_PIN_FIELD as tr, AddonPageDeclarationSchema as tt, parseJsonObject as u, isSecretFieldView as ua, RECORD_SWEEP_INTERVAL_MS as ui, CommandOriginClaimSchema as un, CamstackError as ur, MODEL_FORMATS as ut, addonSliceHandleApi as v, isKeychainStoredField as va, parseSecretRef as vi, createSecretsAccess as vn, classifyStoreError as vr, DEBUG_WATCH_REARM_EVERY_MS as vt, commandEffect as w, AUDIO_CHUNK_FORMATS as wa, FilterRequiredError as wi, scrubKnownSecrets as wn, secretTreeFromSchema as wr, getDebugInterest as wt, createMirrorSource as x, schemaDeclaresAnyField as xa, optionalLinkField as xi, forgetKnownSecret as xn, mergeSecretStatePaths as xr, DebugWatchTable as xt, createEventBusSliceSource as y, isSecretConfigField as ya, linkField as yi, MIN_SCRUBBED_LENGTH as yn, migrationSet as yr, DEBUG_WATCH_WINDOW_MS as yt, deviceCustomAction as z, asRecordsError as zi, RecordIndexSchema as zn, registrySwitchToBodyMigration as zr, ProfileSlotStatusSchema as zt };
|