@camstack/types 1.2.68 → 1.2.69
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/intercom.cap.d.ts +46 -0
- package/dist/capabilities/oauth-integration.cap.d.ts +30 -6
- package/dist/capabilities/sso-bridge.cap.d.ts +45 -9
- package/dist/capabilities/user-management.cap.d.ts +300 -60
- package/dist/generated/addon-api.d.ts +126 -0
- package/dist/generated/device-local-state.d.ts +3 -0
- package/dist/generated/device-proxy.d.ts +1 -0
- package/dist/generated/method-device-selectors.d.ts +27 -0
- package/dist/generated/runtime-state-durability.d.ts +1 -1
- package/dist/generated/scope-presets.d.ts +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +2211 -20
- package/dist/index.mjs +2200 -21
- package/dist/schemas/access-roles.d.ts +92 -0
- package/dist/schemas/auth-records.d.ts +104 -9
- package/dist/schemas/device-selector.d.ts +88 -0
- package/dist/{sleep-CSgK0rNX.mjs → sleep-CwERnGrD.mjs} +1 -0
- package/dist/{sleep-Dh1EJSqF.js → sleep-YuacOD41.js} +1 -0
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_event_category = require("./event-category-DxZbWydC.js");
|
|
3
|
-
const require_sleep = require("./sleep-
|
|
3
|
+
const require_sleep = require("./sleep-YuacOD41.js");
|
|
4
4
|
const require_err_msg = require("./err-msg-COpsHMw2.js");
|
|
5
5
|
//#region src/generated/collection-array-methods.ts
|
|
6
6
|
/**
|
package/dist/addon.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as EventCategory } from "./event-category-Cv9dO26A.mjs";
|
|
2
|
-
import { C as DeviceType, F as nodePin, H as scopeKey, I as readNodePin, R as ReadinessRegistry, _t as normalizeAddonInitResult, a as asJsonObject, bt as emitReadiness, d as DEVICE_SCOPED_CAPS, f as isDeviceScopedCap, gt as BaseAddon, ht as DisposerChain, k as expandCapMethods, mt as DATAPLANE_SECRET_HEADER, p as createDeviceProxy, s as asString, t as sleep, u as parseJsonUnknown, v as deviceOpsCapability, w as adminUiCapability, y as viewerUiCapability, z as ReadinessTimeoutError } from "./sleep-
|
|
2
|
+
import { C as DeviceType, F as nodePin, H as scopeKey, I as readNodePin, R as ReadinessRegistry, _t as normalizeAddonInitResult, a as asJsonObject, bt as emitReadiness, d as DEVICE_SCOPED_CAPS, f as isDeviceScopedCap, gt as BaseAddon, ht as DisposerChain, k as expandCapMethods, mt as DATAPLANE_SECRET_HEADER, p as createDeviceProxy, s as asString, t as sleep, u as parseJsonUnknown, v as deviceOpsCapability, w as adminUiCapability, y as viewerUiCapability, z as ReadinessTimeoutError } from "./sleep-CwERnGrD.mjs";
|
|
3
3
|
import { t as errMsg } from "./err-msg-IQTHeDzc.mjs";
|
|
4
4
|
//#region src/generated/collection-array-methods.ts
|
|
5
5
|
/**
|
|
@@ -177,5 +177,51 @@ export declare const intercomCapability: {
|
|
|
177
177
|
}, z.core.$strip>;
|
|
178
178
|
readonly kind: "command-driven";
|
|
179
179
|
};
|
|
180
|
+
/**
|
|
181
|
+
* Runtime-state slice — mirrored by the kernel.
|
|
182
|
+
*
|
|
183
|
+
* The cap declared `status` and nothing else, so the only two sources an
|
|
184
|
+
* exporter has for a value — the `device.state-changed` slice event and the
|
|
185
|
+
* `deviceState.getAllSnapshots` snapshot, both built from runtime state —
|
|
186
|
+
* carried nothing for `intercom`. A talk-back entity in Home Assistant would
|
|
187
|
+
* have been published and never received a value, which is the defect the
|
|
188
|
+
* export's two classification tables exist to prevent (177 of them, once), so
|
|
189
|
+
* `intercom` was excluded rather than exported.
|
|
190
|
+
*
|
|
191
|
+
* The shape is the status shape: there is exactly one truth about talk-back
|
|
192
|
+
* and duplicating it into a second schema is how two halves of one capability
|
|
193
|
+
* come to disagree. Providers write it through
|
|
194
|
+
* `this.runtimeState.setCapState('intercom', …)` at the four points that open
|
|
195
|
+
* and close a session, and seed it at registration so the slice exists before
|
|
196
|
+
* the first session rather than after it.
|
|
197
|
+
*
|
|
198
|
+
* **Bound, named rather than hidden:** `talking` mirrors the provider's own
|
|
199
|
+
* session handle, so a session torn down by a transport death that never
|
|
200
|
+
* reaches `stopSession` / `endTalkSession` leaves it latched until the next
|
|
201
|
+
* session or the next restart. That is why the slice is `session` and not
|
|
202
|
+
* `restored` — a restart must never restore "talking".
|
|
203
|
+
*/
|
|
204
|
+
readonly runtimeState: z.ZodObject<{
|
|
205
|
+
talking: z.ZodBoolean;
|
|
206
|
+
lastSessionAt: z.ZodNullable<z.ZodNumber>;
|
|
207
|
+
ability: z.ZodNullable<z.ZodObject<{
|
|
208
|
+
codecs: z.ZodArray<z.ZodString>;
|
|
209
|
+
sampleRate: z.ZodNumber;
|
|
210
|
+
duplex: z.ZodEnum<{
|
|
211
|
+
full: "full";
|
|
212
|
+
half: "half";
|
|
213
|
+
}>;
|
|
214
|
+
maxBacklogMs: z.ZodNumber;
|
|
215
|
+
}, z.core.$strip>>;
|
|
216
|
+
}, z.core.$strip>;
|
|
217
|
+
/**
|
|
218
|
+
* Runtime-state durability: **session** — `talking` describes a live audio
|
|
219
|
+
* session, which by definition does not survive the process that held it.
|
|
220
|
+
* Restoring it would publish a camera as talking to nobody.
|
|
221
|
+
*
|
|
222
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
223
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
224
|
+
*/
|
|
225
|
+
readonly durability: "session";
|
|
180
226
|
};
|
|
181
227
|
export type IIntercomProvider = InferProvider<typeof intercomCapability>;
|
|
@@ -80,7 +80,7 @@ import { type InferProvider } from './capability-definition.js';
|
|
|
80
80
|
declare const OauthIntegrationDescriptorSchema: z.ZodObject<{
|
|
81
81
|
integrationId: z.ZodString;
|
|
82
82
|
displayName: z.ZodString;
|
|
83
|
-
requestedScopes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
83
|
+
requestedScopes: z.ZodArray<z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
84
84
|
type: z.ZodLiteral<"category">;
|
|
85
85
|
target: z.ZodEnum<{
|
|
86
86
|
system: "system";
|
|
@@ -109,13 +109,25 @@ declare const OauthIntegrationDescriptorSchema: z.ZodObject<{
|
|
|
109
109
|
}>>;
|
|
110
110
|
}, z.core.$strip>, z.ZodObject<{
|
|
111
111
|
type: z.ZodLiteral<"device">;
|
|
112
|
-
|
|
112
|
+
selector: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
113
|
+
kind: z.ZodLiteral<"all">;
|
|
114
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
115
|
+
kind: z.ZodLiteral<"ids">;
|
|
116
|
+
ids: z.ZodArray<z.ZodNumber>;
|
|
117
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
118
|
+
kind: z.ZodLiteral<"types">;
|
|
119
|
+
types: z.ZodArray<z.ZodEnum<typeof import("../addon.js").DeviceType>>;
|
|
120
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
121
|
+
kind: z.ZodLiteral<"locations">;
|
|
122
|
+
locations: z.ZodArray<z.ZodString>;
|
|
123
|
+
}, z.core.$strip>], "kind">;
|
|
113
124
|
access: z.ZodArray<z.ZodEnum<{
|
|
114
125
|
view: "view";
|
|
115
126
|
create: "create";
|
|
116
127
|
delete: "delete";
|
|
117
128
|
}>>;
|
|
118
|
-
|
|
129
|
+
includeLinked: z.ZodOptional<z.ZodBoolean>;
|
|
130
|
+
}, z.core.$strip>], "type">>>;
|
|
119
131
|
allowedRedirectPrefixes: z.ZodArray<z.ZodString>;
|
|
120
132
|
allowedPrivateHostPaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
121
133
|
requiresPkce: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -131,7 +143,7 @@ export declare const oauthIntegrationCapability: {
|
|
|
131
143
|
readonly getDescriptor: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodObject<{
|
|
132
144
|
integrationId: z.ZodString;
|
|
133
145
|
displayName: z.ZodString;
|
|
134
|
-
requestedScopes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
146
|
+
requestedScopes: z.ZodArray<z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
135
147
|
type: z.ZodLiteral<"category">;
|
|
136
148
|
target: z.ZodEnum<{
|
|
137
149
|
system: "system";
|
|
@@ -160,13 +172,25 @@ export declare const oauthIntegrationCapability: {
|
|
|
160
172
|
}>>;
|
|
161
173
|
}, z.core.$strip>, z.ZodObject<{
|
|
162
174
|
type: z.ZodLiteral<"device">;
|
|
163
|
-
|
|
175
|
+
selector: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
176
|
+
kind: z.ZodLiteral<"all">;
|
|
177
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
178
|
+
kind: z.ZodLiteral<"ids">;
|
|
179
|
+
ids: z.ZodArray<z.ZodNumber>;
|
|
180
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
181
|
+
kind: z.ZodLiteral<"types">;
|
|
182
|
+
types: z.ZodArray<z.ZodEnum<typeof import("../addon.js").DeviceType>>;
|
|
183
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
184
|
+
kind: z.ZodLiteral<"locations">;
|
|
185
|
+
locations: z.ZodArray<z.ZodString>;
|
|
186
|
+
}, z.core.$strip>], "kind">;
|
|
164
187
|
access: z.ZodArray<z.ZodEnum<{
|
|
165
188
|
view: "view";
|
|
166
189
|
create: "create";
|
|
167
190
|
delete: "delete";
|
|
168
191
|
}>>;
|
|
169
|
-
|
|
192
|
+
includeLinked: z.ZodOptional<z.ZodBoolean>;
|
|
193
|
+
}, z.core.$strip>], "type">>>;
|
|
170
194
|
allowedRedirectPrefixes: z.ZodArray<z.ZodString>;
|
|
171
195
|
allowedPrivateHostPaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
172
196
|
requiresPkce: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -22,7 +22,7 @@ declare const SsoBridgeClaimsSchema: z.ZodObject<{
|
|
|
22
22
|
email: z.ZodOptional<z.ZodString>;
|
|
23
23
|
displayName: z.ZodOptional<z.ZodString>;
|
|
24
24
|
hubUrl: z.ZodOptional<z.ZodString>;
|
|
25
|
-
scopes: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
25
|
+
scopes: z.ZodOptional<z.ZodArray<z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
26
26
|
type: z.ZodLiteral<"category">;
|
|
27
27
|
target: z.ZodEnum<{
|
|
28
28
|
system: "system";
|
|
@@ -51,13 +51,25 @@ declare const SsoBridgeClaimsSchema: z.ZodObject<{
|
|
|
51
51
|
}>>;
|
|
52
52
|
}, z.core.$strip>, z.ZodObject<{
|
|
53
53
|
type: z.ZodLiteral<"device">;
|
|
54
|
-
|
|
54
|
+
selector: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
55
|
+
kind: z.ZodLiteral<"all">;
|
|
56
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
57
|
+
kind: z.ZodLiteral<"ids">;
|
|
58
|
+
ids: z.ZodArray<z.ZodNumber>;
|
|
59
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
60
|
+
kind: z.ZodLiteral<"types">;
|
|
61
|
+
types: z.ZodArray<z.ZodEnum<typeof import("../addon.js").DeviceType>>;
|
|
62
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
63
|
+
kind: z.ZodLiteral<"locations">;
|
|
64
|
+
locations: z.ZodArray<z.ZodString>;
|
|
65
|
+
}, z.core.$strip>], "kind">;
|
|
55
66
|
access: z.ZodArray<z.ZodEnum<{
|
|
56
67
|
view: "view";
|
|
57
68
|
create: "create";
|
|
58
69
|
delete: "delete";
|
|
59
70
|
}>>;
|
|
60
|
-
|
|
71
|
+
includeLinked: z.ZodOptional<z.ZodBoolean>;
|
|
72
|
+
}, z.core.$strip>], "type">>>>;
|
|
61
73
|
redirectUri: z.ZodOptional<z.ZodString>;
|
|
62
74
|
integrationId: z.ZodOptional<z.ZodString>;
|
|
63
75
|
jti: z.ZodOptional<z.ZodString>;
|
|
@@ -80,7 +92,7 @@ export declare const ssoBridgeCapability: {
|
|
|
80
92
|
email: z.ZodOptional<z.ZodString>;
|
|
81
93
|
displayName: z.ZodOptional<z.ZodString>;
|
|
82
94
|
hubUrl: z.ZodOptional<z.ZodString>;
|
|
83
|
-
scopes: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
95
|
+
scopes: z.ZodOptional<z.ZodArray<z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
84
96
|
type: z.ZodLiteral<"category">;
|
|
85
97
|
target: z.ZodEnum<{
|
|
86
98
|
system: "system";
|
|
@@ -109,13 +121,25 @@ export declare const ssoBridgeCapability: {
|
|
|
109
121
|
}>>;
|
|
110
122
|
}, z.core.$strip>, z.ZodObject<{
|
|
111
123
|
type: z.ZodLiteral<"device">;
|
|
112
|
-
|
|
124
|
+
selector: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
125
|
+
kind: z.ZodLiteral<"all">;
|
|
126
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
127
|
+
kind: z.ZodLiteral<"ids">;
|
|
128
|
+
ids: z.ZodArray<z.ZodNumber>;
|
|
129
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
130
|
+
kind: z.ZodLiteral<"types">;
|
|
131
|
+
types: z.ZodArray<z.ZodEnum<typeof import("../addon.js").DeviceType>>;
|
|
132
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
133
|
+
kind: z.ZodLiteral<"locations">;
|
|
134
|
+
locations: z.ZodArray<z.ZodString>;
|
|
135
|
+
}, z.core.$strip>], "kind">;
|
|
113
136
|
access: z.ZodArray<z.ZodEnum<{
|
|
114
137
|
view: "view";
|
|
115
138
|
create: "create";
|
|
116
139
|
delete: "delete";
|
|
117
140
|
}>>;
|
|
118
|
-
|
|
141
|
+
includeLinked: z.ZodOptional<z.ZodBoolean>;
|
|
142
|
+
}, z.core.$strip>], "type">>>>;
|
|
119
143
|
redirectUri: z.ZodOptional<z.ZodString>;
|
|
120
144
|
integrationId: z.ZodOptional<z.ZodString>;
|
|
121
145
|
jti: z.ZodOptional<z.ZodString>;
|
|
@@ -137,7 +161,7 @@ export declare const ssoBridgeCapability: {
|
|
|
137
161
|
email: z.ZodOptional<z.ZodString>;
|
|
138
162
|
displayName: z.ZodOptional<z.ZodString>;
|
|
139
163
|
hubUrl: z.ZodOptional<z.ZodString>;
|
|
140
|
-
scopes: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
164
|
+
scopes: z.ZodOptional<z.ZodArray<z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
141
165
|
type: z.ZodLiteral<"category">;
|
|
142
166
|
target: z.ZodEnum<{
|
|
143
167
|
system: "system";
|
|
@@ -166,13 +190,25 @@ export declare const ssoBridgeCapability: {
|
|
|
166
190
|
}>>;
|
|
167
191
|
}, z.core.$strip>, z.ZodObject<{
|
|
168
192
|
type: z.ZodLiteral<"device">;
|
|
169
|
-
|
|
193
|
+
selector: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
194
|
+
kind: z.ZodLiteral<"all">;
|
|
195
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
196
|
+
kind: z.ZodLiteral<"ids">;
|
|
197
|
+
ids: z.ZodArray<z.ZodNumber>;
|
|
198
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
199
|
+
kind: z.ZodLiteral<"types">;
|
|
200
|
+
types: z.ZodArray<z.ZodEnum<typeof import("../addon.js").DeviceType>>;
|
|
201
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
202
|
+
kind: z.ZodLiteral<"locations">;
|
|
203
|
+
locations: z.ZodArray<z.ZodString>;
|
|
204
|
+
}, z.core.$strip>], "kind">;
|
|
170
205
|
access: z.ZodArray<z.ZodEnum<{
|
|
171
206
|
view: "view";
|
|
172
207
|
create: "create";
|
|
173
208
|
delete: "delete";
|
|
174
209
|
}>>;
|
|
175
|
-
|
|
210
|
+
includeLinked: z.ZodOptional<z.ZodBoolean>;
|
|
211
|
+
}, z.core.$strip>], "type">>>>;
|
|
176
212
|
redirectUri: z.ZodOptional<z.ZodString>;
|
|
177
213
|
integrationId: z.ZodOptional<z.ZodString>;
|
|
178
214
|
jti: z.ZodOptional<z.ZodString>;
|