@camstack/types 0.1.29 → 0.1.31
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/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/home-assistant.cap.d.ts +138 -0
- package/dist/capabilities/home-assistant.cap.d.ts.map +1 -0
- package/dist/capabilities/index.d.ts +16 -1
- package/dist/capabilities/index.d.ts.map +1 -1
- package/dist/capabilities/mesh-network.cap.d.ts +18 -0
- package/dist/capabilities/mesh-network.cap.d.ts.map +1 -1
- package/dist/capabilities/mqtt-provider.cap.d.ts +91 -0
- package/dist/capabilities/mqtt-provider.cap.d.ts.map +1 -0
- 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 +62 -0
- package/dist/capabilities/smtp-provider.cap.d.ts.map +1 -0
- package/dist/capabilities/sso-bridge.cap.d.ts +58 -0
- package/dist/capabilities/sso-bridge.cap.d.ts.map +1 -0
- 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/enums/event-category.d.ts +8 -1
- package/dist/enums/event-category.d.ts.map +1 -1
- package/dist/generated/addon-api.d.ts +472 -86
- package/dist/generated/addon-api.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/method-access-map.d.ts +6 -1
- package/dist/generated/method-access-map.d.ts.map +1 -1
- 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 +2 -2
- package/dist/generated/system-proxy.d.ts.map +1 -1
- package/dist/{index-s8uJNgNs.js → index-BKifir_y.js} +557 -48
- package/dist/index-BKifir_y.js.map +1 -0
- package/dist/{index-DVKPWMwv.mjs → index-BKnvgAep.mjs} +852 -343
- package/dist/index-BKnvgAep.mjs.map +1 -0
- package/dist/index.d.ts +7 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +781 -498
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1038 -755
- 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/api-responses.d.ts +3 -8
- package/dist/interfaces/api-responses.d.ts.map +1 -1
- package/dist/interfaces/auth.d.ts +15 -15
- package/dist/interfaces/auth.d.ts.map +1 -1
- 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
|
@@ -24,8 +24,12 @@ declare const SettingsRecordSchema: z.ZodObject<{
|
|
|
24
24
|
}, z.core.$strip>;
|
|
25
25
|
/**
|
|
26
26
|
* Column declaration for a structured (SQL-backed) collection.
|
|
27
|
-
*
|
|
28
|
-
*
|
|
27
|
+
*
|
|
28
|
+
* Logical types — the backend translates each to the matching SQLite
|
|
29
|
+
* storage class and handles per-type marshaling:
|
|
30
|
+
* - `TEXT` / `INTEGER` / `REAL` — native SQLite types, pass-through
|
|
31
|
+
* - `JSON` — TEXT under the hood; serialised on write, parsed on read
|
|
32
|
+
* - `BOOLEAN` — INTEGER 0/1 under the hood; coerced both directions
|
|
29
33
|
*/
|
|
30
34
|
declare const CollectionColumnSchema: z.ZodObject<{
|
|
31
35
|
name: z.ZodString;
|
|
@@ -34,6 +38,7 @@ declare const CollectionColumnSchema: z.ZodObject<{
|
|
|
34
38
|
INTEGER: "INTEGER";
|
|
35
39
|
REAL: "REAL";
|
|
36
40
|
JSON: "JSON";
|
|
41
|
+
BOOLEAN: "BOOLEAN";
|
|
37
42
|
}>;
|
|
38
43
|
primaryKey: z.ZodOptional<z.ZodBoolean>;
|
|
39
44
|
notNull: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -172,6 +177,7 @@ export declare const settingsStoreCapability: {
|
|
|
172
177
|
INTEGER: "INTEGER";
|
|
173
178
|
REAL: "REAL";
|
|
174
179
|
JSON: "JSON";
|
|
180
|
+
BOOLEAN: "BOOLEAN";
|
|
175
181
|
}>;
|
|
176
182
|
primaryKey: z.ZodOptional<z.ZodBoolean>;
|
|
177
183
|
notNull: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings-store.cap.d.ts","sourceRoot":"","sources":["../../src/capabilities/settings-store.cap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAqC,KAAK,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAElG;;GAEG;AACH,QAAA,MAAM,iBAAiB;;;;;;;;;;;;;iBAUrB,CAAA;AAEF,8CAA8C;AAC9C,QAAA,MAAM,oBAAoB;;;iBAGxB,CAAA;AAEF
|
|
1
|
+
{"version":3,"file":"settings-store.cap.d.ts","sourceRoot":"","sources":["../../src/capabilities/settings-store.cap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,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to: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
5
|
+
cc: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
6
|
+
bcc: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
7
|
+
from: z.ZodOptional<z.ZodString>;
|
|
8
|
+
replyTo: z.ZodOptional<z.ZodString>;
|
|
9
|
+
subject: z.ZodString;
|
|
10
|
+
text: z.ZodString;
|
|
11
|
+
html: z.ZodOptional<z.ZodString>;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
declare const SendEmailResultSchema: z.ZodObject<{
|
|
14
|
+
messageId: z.ZodString;
|
|
15
|
+
accepted: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
16
|
+
rejected: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
declare const SmtpStatusSchema: z.ZodObject<{
|
|
19
|
+
ready: z.ZodBoolean;
|
|
20
|
+
host: z.ZodString;
|
|
21
|
+
error: z.ZodOptional<z.ZodString>;
|
|
22
|
+
lastVerifiedAt: z.ZodOptional<z.ZodNumber>;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
export declare const smtpProviderCapability: {
|
|
25
|
+
readonly name: "smtp-provider";
|
|
26
|
+
readonly scope: "system";
|
|
27
|
+
readonly mode: "collection";
|
|
28
|
+
readonly internal: true;
|
|
29
|
+
readonly methods: {
|
|
30
|
+
readonly sendEmail: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
31
|
+
to: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
32
|
+
cc: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
33
|
+
bcc: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
34
|
+
from: z.ZodOptional<z.ZodString>;
|
|
35
|
+
replyTo: z.ZodOptional<z.ZodString>;
|
|
36
|
+
subject: z.ZodString;
|
|
37
|
+
text: z.ZodString;
|
|
38
|
+
html: z.ZodOptional<z.ZodString>;
|
|
39
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
40
|
+
messageId: z.ZodString;
|
|
41
|
+
accepted: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
42
|
+
rejected: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
43
|
+
}, z.core.$strip>, "mutation">;
|
|
44
|
+
/** Round-trip ping against the SMTP relay (EHLO + AUTH if configured).
|
|
45
|
+
* Used by the operator's "Test connection" button. */
|
|
46
|
+
readonly verify: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodObject<{
|
|
47
|
+
ready: z.ZodBoolean;
|
|
48
|
+
host: z.ZodString;
|
|
49
|
+
error: z.ZodOptional<z.ZodString>;
|
|
50
|
+
lastVerifiedAt: z.ZodOptional<z.ZodNumber>;
|
|
51
|
+
}, z.core.$strip>, "mutation">;
|
|
52
|
+
readonly getStatus: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodObject<{
|
|
53
|
+
ready: z.ZodBoolean;
|
|
54
|
+
host: z.ZodString;
|
|
55
|
+
error: z.ZodOptional<z.ZodString>;
|
|
56
|
+
lastVerifiedAt: z.ZodOptional<z.ZodNumber>;
|
|
57
|
+
}, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
export type ISmtpProvider = InferProvider<typeof smtpProviderCapability>;
|
|
61
|
+
export { SendEmailInputSchema, SendEmailResultSchema, SmtpStatusSchema };
|
|
62
|
+
//# sourceMappingURL=smtp-provider.cap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"smtp-provider.cap.d.ts","sourceRoot":"","sources":["../../src/capabilities/smtp-provider.cap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAqC,KAAK,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAiBlG,QAAA,MAAM,oBAAoB;;;;;;;;;iBAgBxB,CAAA;AAEF,QAAA,MAAM,qBAAqB;;;;iBAIzB,CAAA;AAEF,QAAA,MAAM,gBAAgB;;;;;iBASpB,CAAA;AAEF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;QAW/B;+DACuD;;;;;;;;;;;;;;CAYlB,CAAA;AAEzC,MAAM,MAAM,aAAa,GAAG,aAAa,CAAC,OAAO,sBAAsB,CAAC,CAAA;AACxE,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,CAAA"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { type InferProvider } from './capability-definition.js';
|
|
3
|
+
/**
|
|
4
|
+
* `sso-bridge` — internal hub-only cap that lets SSO-style auth
|
|
5
|
+
* providers (OIDC, SAML, magic-link, …) mint an HMAC-signed token
|
|
6
|
+
* carrying the post-callback claims before redirecting back to
|
|
7
|
+
* `/api/auth/sso/finish`.
|
|
8
|
+
*
|
|
9
|
+
* Without this, any client could craft a `?isAdmin=1` link to
|
|
10
|
+
* `/sso/finish` and become admin. With it, the endpoint accepts ONLY
|
|
11
|
+
* the signed token and rejects everything else.
|
|
12
|
+
*
|
|
13
|
+
* Backed by `AuthManager.{signSsoBridgeToken,verifySsoBridgeToken}` —
|
|
14
|
+
* see `packages/core/src/auth/auth-manager.ts`. The provider is
|
|
15
|
+
* registered at hub boot in `server/backend/src/main.ts`.
|
|
16
|
+
*/
|
|
17
|
+
declare const SsoBridgeClaimsSchema: z.ZodObject<{
|
|
18
|
+
userId: z.ZodString;
|
|
19
|
+
username: z.ZodString;
|
|
20
|
+
isAdmin: z.ZodBoolean;
|
|
21
|
+
provider: z.ZodString;
|
|
22
|
+
email: z.ZodOptional<z.ZodString>;
|
|
23
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
export declare const ssoBridgeCapability: {
|
|
26
|
+
readonly name: "sso-bridge";
|
|
27
|
+
readonly scope: "system";
|
|
28
|
+
readonly mode: "singleton";
|
|
29
|
+
readonly internal: true;
|
|
30
|
+
readonly methods: {
|
|
31
|
+
readonly signBridgeToken: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
32
|
+
claims: z.ZodObject<{
|
|
33
|
+
userId: z.ZodString;
|
|
34
|
+
username: z.ZodString;
|
|
35
|
+
isAdmin: z.ZodBoolean;
|
|
36
|
+
provider: z.ZodString;
|
|
37
|
+
email: z.ZodOptional<z.ZodString>;
|
|
38
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
39
|
+
}, z.core.$strip>;
|
|
40
|
+
ttlSec: z.ZodOptional<z.ZodNumber>;
|
|
41
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
42
|
+
token: z.ZodString;
|
|
43
|
+
}, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
44
|
+
readonly verifyBridgeToken: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
45
|
+
token: z.ZodString;
|
|
46
|
+
}, z.core.$strip>, z.ZodNullable<z.ZodObject<{
|
|
47
|
+
userId: z.ZodString;
|
|
48
|
+
username: z.ZodString;
|
|
49
|
+
isAdmin: z.ZodBoolean;
|
|
50
|
+
provider: z.ZodString;
|
|
51
|
+
email: z.ZodOptional<z.ZodString>;
|
|
52
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
53
|
+
}, z.core.$strip>>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
export type ISsoBridgeProvider = InferProvider<typeof ssoBridgeCapability>;
|
|
57
|
+
export { SsoBridgeClaimsSchema };
|
|
58
|
+
//# sourceMappingURL=sso-bridge.cap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sso-bridge.cap.d.ts","sourceRoot":"","sources":["../../src/capabilities/sso-bridge.cap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAqC,KAAK,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAElG;;;;;;;;;;;;;GAaG;AACH,QAAA,MAAM,qBAAqB;;;;;;;iBAOzB,CAAA;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkBS,CAAA;AAEzC,MAAM,MAAM,kBAAkB,GAAG,aAAa,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAC1E,OAAO,EAAE,qBAAqB,EAAE,CAAA"}
|