@camstack/types 0.1.30 → 0.1.32
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/build-addon-route-provider.d.ts +55 -0
- package/dist/addon/build-addon-route-provider.d.ts.map +1 -0
- package/dist/capabilities/addon-routes.cap.d.ts +64 -0
- package/dist/capabilities/addon-routes.cap.d.ts.map +1 -1
- package/dist/capabilities/admin-ui.cap.d.ts +6 -2
- package/dist/capabilities/admin-ui.cap.d.ts.map +1 -1
- package/dist/capabilities/advanced-notifier.cap.d.ts +202 -29
- package/dist/capabilities/advanced-notifier.cap.d.ts.map +1 -1
- package/dist/capabilities/audio-codec.cap.d.ts +2 -2
- package/dist/capabilities/auth-provider.cap.d.ts +4 -4
- package/dist/capabilities/auth-provider.cap.d.ts.map +1 -1
- package/dist/capabilities/authentication.cap.d.ts +4 -0
- package/dist/capabilities/authentication.cap.d.ts.map +1 -1
- package/dist/capabilities/capability-definition.d.ts +22 -0
- package/dist/capabilities/capability-definition.d.ts.map +1 -1
- package/dist/capabilities/device-export.cap.d.ts +77 -0
- package/dist/capabilities/device-export.cap.d.ts.map +1 -0
- package/dist/capabilities/embedding-encoder.cap.d.ts +14 -7
- package/dist/capabilities/embedding-encoder.cap.d.ts.map +1 -1
- package/dist/capabilities/index.d.ts +24 -5
- package/dist/capabilities/index.d.ts.map +1 -1
- package/dist/capabilities/intercom.cap.d.ts +34 -0
- package/dist/capabilities/intercom.cap.d.ts.map +1 -1
- package/dist/capabilities/mesh-network.cap.d.ts +32 -16
- package/dist/capabilities/mesh-network.cap.d.ts.map +1 -1
- package/dist/capabilities/mqtt-broker.cap.d.ts +153 -0
- package/dist/capabilities/mqtt-broker.cap.d.ts.map +1 -0
- package/dist/capabilities/network-access.cap.d.ts +41 -1
- package/dist/capabilities/network-access.cap.d.ts.map +1 -1
- package/dist/capabilities/platform-probe.cap.d.ts +234 -15
- package/dist/capabilities/platform-probe.cap.d.ts.map +1 -1
- package/dist/capabilities/settings-store.cap.d.ts +8 -2
- package/dist/capabilities/settings-store.cap.d.ts.map +1 -1
- package/dist/capabilities/smtp-provider.cap.d.ts +63 -0
- package/dist/capabilities/smtp-provider.cap.d.ts.map +1 -0
- package/dist/capabilities/sso-bridge.cap.d.ts +61 -0
- package/dist/capabilities/sso-bridge.cap.d.ts.map +1 -0
- package/dist/capabilities/stream-broker.cap.d.ts +90 -85
- package/dist/capabilities/stream-broker.cap.d.ts.map +1 -1
- package/dist/capabilities/user-management.cap.d.ts +513 -184
- package/dist/capabilities/user-management.cap.d.ts.map +1 -1
- package/dist/capabilities/user-passkeys.cap.d.ts +92 -0
- package/dist/capabilities/user-passkeys.cap.d.ts.map +1 -0
- package/dist/capabilities/webrtc-session.cap.d.ts +34 -0
- package/dist/capabilities/webrtc-session.cap.d.ts.map +1 -1
- package/dist/generated/addon-api.d.ts +11940 -9272
- package/dist/generated/addon-api.d.ts.map +1 -1
- package/dist/generated/cap-status-types.d.ts +5 -1
- package/dist/generated/cap-status-types.d.ts.map +1 -1
- package/dist/generated/capability-router-map.d.ts +19 -4
- package/dist/generated/capability-router-map.d.ts.map +1 -1
- package/dist/generated/device-proxy.d.ts +2 -0
- package/dist/generated/device-proxy.d.ts.map +1 -1
- package/dist/generated/method-access-map.d.ts +6 -1
- package/dist/generated/method-access-map.d.ts.map +1 -1
- package/dist/generated/provider-kind-map.d.ts +22 -0
- package/dist/generated/provider-kind-map.d.ts.map +1 -0
- package/dist/generated/scope-presets.d.ts +17 -0
- package/dist/generated/scope-presets.d.ts.map +1 -0
- package/dist/generated/system-proxy.d.ts +8 -4
- package/dist/generated/system-proxy.d.ts.map +1 -1
- package/dist/{index-DVKPWMwv.mjs → index-BBVUwOlZ.mjs} +1040 -500
- package/dist/index-BBVUwOlZ.mjs.map +1 -0
- package/dist/{index-s8uJNgNs.js → index-BUBhoPUu.js} +741 -201
- package/dist/index-BUBhoPUu.js.map +1 -0
- package/dist/index.d.ts +9 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +852 -500
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1109 -757
- package/dist/index.mjs.map +1 -1
- package/dist/interfaces/addon-routes.d.ts +8 -2
- package/dist/interfaces/addon-routes.d.ts.map +1 -1
- package/dist/interfaces/addon.d.ts +14 -3
- package/dist/interfaces/addon.d.ts.map +1 -1
- package/dist/interfaces/advanced-notifier.d.ts +8 -7
- package/dist/interfaces/advanced-notifier.d.ts.map +1 -1
- package/dist/interfaces/api-responses.d.ts +2 -3
- package/dist/interfaces/api-responses.d.ts.map +1 -1
- package/dist/interfaces/auth.d.ts +14 -11
- package/dist/interfaces/auth.d.ts.map +1 -1
- package/dist/interfaces/capability.d.ts +6 -6
- package/dist/interfaces/capability.d.ts.map +1 -1
- package/dist/interfaces/embedding-encoder.d.ts +16 -7
- package/dist/interfaces/embedding-encoder.d.ts.map +1 -1
- package/dist/interfaces/rtp-egress.d.ts +45 -0
- package/dist/interfaces/rtp-egress.d.ts.map +1 -0
- package/dist/interfaces/storage.d.ts +15 -2
- package/dist/interfaces/storage.d.ts.map +1 -1
- package/dist/node.js +1 -1
- package/dist/node.mjs +1 -1
- package/dist/schemas/auth-records.d.ts +105 -50
- package/dist/schemas/auth-records.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/index-DVKPWMwv.mjs.map +0 -1
- package/dist/index-s8uJNgNs.js.map +0 -1
- package/dist/interfaces/auth-provider.d.ts +0 -39
- package/dist/interfaces/auth-provider.d.ts.map +0 -1
|
@@ -11,26 +11,20 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import { z } from 'zod';
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* Auth model (v2 — 2026-05-12 caps-only):
|
|
15
15
|
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* - `
|
|
19
|
-
* - `agent` — agent-process credential; MUST have scopes for hub calls.
|
|
20
|
-
* - `scoped` — synthetic role for `cst_*` token callers; no users-table
|
|
21
|
-
* row; `userId` references the human who minted the token.
|
|
16
|
+
* Two principals:
|
|
17
|
+
* - `isAdmin: true` — full bypass. Admin scope set is ignored.
|
|
18
|
+
* - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
|
|
22
19
|
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
20
|
+
* No role enum. There used to be `viewer / agent / scoped` and earlier
|
|
21
|
+
* `super_admin` — collapsed onto the single boolean because every
|
|
22
|
+
* non-admin caller is governed by the same scope-check rules; the
|
|
23
|
+
* distinction was only ever used to route role-specific procedures
|
|
24
|
+
* which we no longer have. Agents are admin sessions issued via
|
|
25
|
+
* `createServiceToken`; CLI / webhook integrations are `cst_*` tokens
|
|
26
|
+
* with `isAdmin: false` + an explicit scope list.
|
|
26
27
|
*/
|
|
27
|
-
export declare const UserRoleSchema: z.ZodEnum<{
|
|
28
|
-
admin: "admin";
|
|
29
|
-
viewer: "viewer";
|
|
30
|
-
agent: "agent";
|
|
31
|
-
scoped: "scoped";
|
|
32
|
-
}>;
|
|
33
|
-
export type UserRole = z.infer<typeof UserRoleSchema>;
|
|
34
28
|
/** Per-method access flavour. Materialised on every cap method via codegen. */
|
|
35
29
|
export declare const MethodAccessSchema: z.ZodEnum<{
|
|
36
30
|
view: "view";
|
|
@@ -38,49 +32,91 @@ export declare const MethodAccessSchema: z.ZodEnum<{
|
|
|
38
32
|
delete: "delete";
|
|
39
33
|
}>;
|
|
40
34
|
export type MethodAccess = z.infer<typeof MethodAccessSchema>;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
35
|
+
export declare const CapScopeSchema: z.ZodEnum<{
|
|
36
|
+
system: "system";
|
|
37
|
+
device: "device";
|
|
38
|
+
}>;
|
|
39
|
+
export type CapScope = z.infer<typeof CapScopeSchema>;
|
|
40
|
+
export declare const TokenScopeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
41
|
+
type: z.ZodLiteral<"category">;
|
|
42
|
+
target: z.ZodEnum<{
|
|
43
|
+
system: "system";
|
|
44
|
+
device: "device";
|
|
51
45
|
}>;
|
|
46
|
+
access: z.ZodArray<z.ZodEnum<{
|
|
47
|
+
view: "view";
|
|
48
|
+
create: "create";
|
|
49
|
+
delete: "delete";
|
|
50
|
+
}>>;
|
|
51
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
52
|
+
type: z.ZodLiteral<"capability">;
|
|
52
53
|
target: z.ZodString;
|
|
53
54
|
access: z.ZodArray<z.ZodEnum<{
|
|
54
55
|
view: "view";
|
|
55
56
|
create: "create";
|
|
56
57
|
delete: "delete";
|
|
57
58
|
}>>;
|
|
58
|
-
}, z.core.$strip
|
|
59
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
60
|
+
type: z.ZodLiteral<"addon">;
|
|
61
|
+
target: z.ZodString;
|
|
62
|
+
access: z.ZodArray<z.ZodEnum<{
|
|
63
|
+
view: "view";
|
|
64
|
+
create: "create";
|
|
65
|
+
delete: "delete";
|
|
66
|
+
}>>;
|
|
67
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
68
|
+
type: z.ZodLiteral<"device">;
|
|
69
|
+
targets: z.ZodArray<z.ZodString>;
|
|
70
|
+
access: z.ZodArray<z.ZodEnum<{
|
|
71
|
+
view: "view";
|
|
72
|
+
create: "create";
|
|
73
|
+
delete: "delete";
|
|
74
|
+
}>>;
|
|
75
|
+
}, z.core.$strip>], "type">;
|
|
59
76
|
export type TokenScope = z.infer<typeof TokenScopeSchema>;
|
|
60
77
|
export declare const UserRecordSchema: z.ZodObject<{
|
|
61
78
|
id: z.ZodString;
|
|
62
79
|
username: z.ZodString;
|
|
63
80
|
passwordHash: z.ZodString;
|
|
64
|
-
|
|
65
|
-
admin: "admin";
|
|
66
|
-
viewer: "viewer";
|
|
67
|
-
agent: "agent";
|
|
68
|
-
scoped: "scoped";
|
|
69
|
-
}>;
|
|
81
|
+
isAdmin: z.ZodDefault<z.ZodBoolean>;
|
|
70
82
|
allowedProviders: z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodArray<z.ZodString>]>;
|
|
71
83
|
allowedDevices: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodArray<z.ZodString>]>>;
|
|
72
|
-
scopes: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
73
|
-
type: z.
|
|
74
|
-
|
|
75
|
-
|
|
84
|
+
scopes: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
85
|
+
type: z.ZodLiteral<"category">;
|
|
86
|
+
target: z.ZodEnum<{
|
|
87
|
+
system: "system";
|
|
88
|
+
device: "device";
|
|
76
89
|
}>;
|
|
90
|
+
access: z.ZodArray<z.ZodEnum<{
|
|
91
|
+
view: "view";
|
|
92
|
+
create: "create";
|
|
93
|
+
delete: "delete";
|
|
94
|
+
}>>;
|
|
95
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
96
|
+
type: z.ZodLiteral<"capability">;
|
|
77
97
|
target: z.ZodString;
|
|
78
98
|
access: z.ZodArray<z.ZodEnum<{
|
|
79
99
|
view: "view";
|
|
80
100
|
create: "create";
|
|
81
101
|
delete: "delete";
|
|
82
102
|
}>>;
|
|
83
|
-
}, z.core.$strip
|
|
103
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
104
|
+
type: z.ZodLiteral<"addon">;
|
|
105
|
+
target: z.ZodString;
|
|
106
|
+
access: z.ZodArray<z.ZodEnum<{
|
|
107
|
+
view: "view";
|
|
108
|
+
create: "create";
|
|
109
|
+
delete: "delete";
|
|
110
|
+
}>>;
|
|
111
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
112
|
+
type: z.ZodLiteral<"device">;
|
|
113
|
+
targets: z.ZodArray<z.ZodString>;
|
|
114
|
+
access: z.ZodArray<z.ZodEnum<{
|
|
115
|
+
view: "view";
|
|
116
|
+
create: "create";
|
|
117
|
+
delete: "delete";
|
|
118
|
+
}>>;
|
|
119
|
+
}, z.core.$strip>], "type">>>;
|
|
84
120
|
createdAt: z.ZodNumber;
|
|
85
121
|
updatedAt: z.ZodNumber;
|
|
86
122
|
}, z.core.$strip>;
|
|
@@ -88,12 +124,7 @@ export type UserRecord = z.infer<typeof UserRecordSchema>;
|
|
|
88
124
|
export declare const ApiKeyRecordSchema: z.ZodObject<{
|
|
89
125
|
id: z.ZodString;
|
|
90
126
|
label: z.ZodString;
|
|
91
|
-
|
|
92
|
-
admin: "admin";
|
|
93
|
-
viewer: "viewer";
|
|
94
|
-
agent: "agent";
|
|
95
|
-
scoped: "scoped";
|
|
96
|
-
}>;
|
|
127
|
+
isAdmin: z.ZodDefault<z.ZodBoolean>;
|
|
97
128
|
allowedProviders: z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodArray<z.ZodString>]>;
|
|
98
129
|
allowedDevices: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodArray<z.ZodString>]>>;
|
|
99
130
|
tokenHash: z.ZodString;
|
|
@@ -108,18 +139,42 @@ export declare const ScopedTokenSchema: z.ZodObject<{
|
|
|
108
139
|
name: z.ZodString;
|
|
109
140
|
tokenHash: z.ZodString;
|
|
110
141
|
tokenPrefix: z.ZodString;
|
|
111
|
-
scopes: z.ZodArray<z.ZodObject<{
|
|
112
|
-
type: z.
|
|
113
|
-
|
|
114
|
-
|
|
142
|
+
scopes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
143
|
+
type: z.ZodLiteral<"category">;
|
|
144
|
+
target: z.ZodEnum<{
|
|
145
|
+
system: "system";
|
|
146
|
+
device: "device";
|
|
115
147
|
}>;
|
|
148
|
+
access: z.ZodArray<z.ZodEnum<{
|
|
149
|
+
view: "view";
|
|
150
|
+
create: "create";
|
|
151
|
+
delete: "delete";
|
|
152
|
+
}>>;
|
|
153
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
154
|
+
type: z.ZodLiteral<"capability">;
|
|
116
155
|
target: z.ZodString;
|
|
117
156
|
access: z.ZodArray<z.ZodEnum<{
|
|
118
157
|
view: "view";
|
|
119
158
|
create: "create";
|
|
120
159
|
delete: "delete";
|
|
121
160
|
}>>;
|
|
122
|
-
}, z.core.$strip
|
|
161
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
162
|
+
type: z.ZodLiteral<"addon">;
|
|
163
|
+
target: z.ZodString;
|
|
164
|
+
access: z.ZodArray<z.ZodEnum<{
|
|
165
|
+
view: "view";
|
|
166
|
+
create: "create";
|
|
167
|
+
delete: "delete";
|
|
168
|
+
}>>;
|
|
169
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
170
|
+
type: z.ZodLiteral<"device">;
|
|
171
|
+
targets: z.ZodArray<z.ZodString>;
|
|
172
|
+
access: z.ZodArray<z.ZodEnum<{
|
|
173
|
+
view: "view";
|
|
174
|
+
create: "create";
|
|
175
|
+
delete: "delete";
|
|
176
|
+
}>>;
|
|
177
|
+
}, z.core.$strip>], "type">>;
|
|
123
178
|
expiresAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
124
179
|
lastUsedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
125
180
|
createdAt: z.ZodNumber;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-records.d.ts","sourceRoot":"","sources":["../../src/schemas/auth-records.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB
|
|
1
|
+
{"version":3,"file":"auth-records.d.ts","sourceRoot":"","sources":["../../src/schemas/auth-records.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB;;;;;;;;;;;;;;GAcG;AAEH,+EAA+E;AAC/E,eAAO,MAAM,kBAAkB;;;;EAAuC,CAAA;AACtE,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AA0B7D,eAAO,MAAM,cAAc;;;EAA+B,CAAA;AAC1D,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA;AAErD,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BA2B3B,CAAA;AACF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAEzD,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAoB3B,CAAA;AACF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAEzD,eAAO,MAAM,kBAAkB;;;;;;;;;;iBAU7B,CAAA;AACF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAI7D,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAY5B,CAAA;AACF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA"}
|