@camstack/types 1.2.332 → 1.2.334
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/base-addon.d.ts +32 -0
- package/dist/addon/secret-aware-context.d.ts +49 -6
- package/dist/addon/secret-settings-view.d.ts +23 -1
- package/dist/addon/secret-write-back.d.ts +40 -0
- package/dist/addon.js +5 -7
- package/dist/addon.mjs +5 -7
- package/dist/auth/app-callback.d.ts +28 -0
- package/dist/auth/sso-state.d.ts +16 -0
- package/dist/capabilities/addon-routes.cap.d.ts +3 -0
- package/dist/capabilities/addons.cap.d.ts +4 -4
- package/dist/capabilities/backup.cap.d.ts +101 -1
- package/dist/capabilities/broker.cap.d.ts +4 -4
- package/dist/capabilities/custom-model-registry.cap.d.ts +520 -0
- package/dist/capabilities/device-manager.cap.d.ts +4 -4
- package/dist/capabilities/hub-address.d.ts +2 -2
- package/dist/capabilities/index.d.ts +12 -6
- package/dist/capabilities/keychain-admin.cap.d.ts +83 -0
- package/dist/capabilities/login-method.cap.d.ts +5 -6
- package/dist/capabilities/nodes.cap.d.ts +8 -0
- package/dist/capabilities/notification-output.cap.d.ts +4 -4
- package/dist/capabilities/notification-rules.cap.d.ts +6 -6
- package/dist/capabilities/osd-manager.cap.d.ts +5 -5
- package/dist/capabilities/pipeline-analytics.cap.d.ts +39 -8
- package/dist/capabilities/recording.cap.d.ts +3 -3
- package/dist/capabilities/server-management.cap.d.ts +5 -5
- package/dist/capabilities/snapshot.cap.d.ts +2 -2
- package/dist/capabilities/sso-bridge.cap.d.ts +5 -2
- package/dist/capabilities/training-provider.cap.d.ts +373 -0
- package/dist/capabilities/training.cap.d.ts +1896 -0
- package/dist/capabilities/user-management.cap.d.ts +1 -64
- package/dist/capabilities/videoclips.cap.d.ts +3 -3
- package/dist/client.js +33 -5
- package/dist/client.mjs +33 -5
- package/dist/generated/addon-api.d.ts +872 -173
- package/dist/generated/cap-input-defaults.d.ts +1 -1
- package/dist/generated/capability-router-map.d.ts +10 -4
- package/dist/generated/collection-array-methods.d.ts +1 -1
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/method-device-selectors.d.ts +2 -2
- package/dist/generated/system-proxy.d.ts +5 -3
- package/dist/index.d.ts +3 -0
- package/dist/index.js +1469 -94
- package/dist/index.mjs +1420 -93
- package/dist/interfaces/addon-routes.d.ts +7 -0
- package/dist/interfaces/addon.d.ts +8 -0
- package/dist/interfaces/auth.d.ts +6 -3
- package/dist/interfaces/event-bus.d.ts +5 -0
- package/dist/schemas/auth-records.d.ts +1 -2
- package/dist/{sleep-ClNXPpWR.js → sleep-DiQYrfm9.js} +425 -75
- package/dist/{sleep-DujUvOcb.mjs → sleep-r3RWkGVx.mjs} +425 -75
- package/dist/training/index.d.ts +1 -0
- package/dist/training/trainer-contract.d.ts +468 -0
- package/package.json +1 -1
|
@@ -39,11 +39,18 @@ export interface AddonHttpReply {
|
|
|
39
39
|
/**
|
|
40
40
|
* A single HTTP route registered by an addon.
|
|
41
41
|
*/
|
|
42
|
+
/**
|
|
43
|
+
* Per-client-IP limiting the HUB applies before a route's handler runs.
|
|
44
|
+
* `'auth'` — a public sign-in leg (an IdP start or callback): 30 per minute
|
|
45
|
+
* per client address. The address is the real client behind a trusted proxy.
|
|
46
|
+
*/
|
|
47
|
+
export type RouteRateLimit = 'auth';
|
|
42
48
|
export interface IAddonHttpRoute {
|
|
43
49
|
readonly method: 'GET' | 'POST' | 'PUT' | 'DELETE';
|
|
44
50
|
readonly path: string;
|
|
45
51
|
readonly access: RouteAccess;
|
|
46
52
|
readonly description?: string;
|
|
53
|
+
readonly rateLimit?: RouteRateLimit;
|
|
47
54
|
readonly handler: (request: AddonHttpRequest, reply: AddonHttpReply) => Promise<void>;
|
|
48
55
|
}
|
|
49
56
|
/**
|
|
@@ -475,6 +475,14 @@ export interface AddonContext<TConfig = Record<string, unknown>> {
|
|
|
475
475
|
* getDeviceSettings` on `ICamstackAddon`. There is no defaults
|
|
476
476
|
* injection or cross-level merge at this layer.
|
|
477
477
|
*
|
|
478
|
+
* KEYCHAIN (D798): the view a `BaseAddon` reaches as `this.ctx.settings`
|
|
479
|
+
* answers keychain VALUES on every read — `readAddonStore`,
|
|
480
|
+
* `readAddonStoreResult`, `readAddonStoreKeyResult`, `readDeviceStore`,
|
|
481
|
+
* `readDeviceStoreBatch` — never `{ $secret }` markers. A value the keychain
|
|
482
|
+
* cannot serve right now stays a marker ("stored, unavailable"), never `''`.
|
|
483
|
+
* Writing a resolved read back is a no-op for every unchanged secret.
|
|
484
|
+
* The marker-bearing blob is private to `BaseAddon`.
|
|
485
|
+
*
|
|
478
486
|
* Cleanup note: the earlier `getGlobal / getDevice / updateGlobal /
|
|
479
487
|
* updateDevice` trio (with a polymorphic `getGlobal({ section })`
|
|
480
488
|
* overload) was removed after every caller migrated. The only
|
|
@@ -6,8 +6,12 @@ export interface UserPermissions {
|
|
|
6
6
|
allowedDevices: Record<string, string[] | '*'>;
|
|
7
7
|
}
|
|
8
8
|
export interface TokenPayload {
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
/**
|
|
10
|
+
* The server-side login session this token belongs to. Every session token
|
|
11
|
+
* minted since sessions exist carries one; the hub refuses the token once
|
|
12
|
+
* the session is revoked or expired. A token without it predates sessions.
|
|
13
|
+
*/
|
|
14
|
+
sid?: string;
|
|
11
15
|
userId?: string;
|
|
12
16
|
username?: string;
|
|
13
17
|
/**
|
|
@@ -16,7 +20,6 @@ export interface TokenPayload {
|
|
|
16
20
|
* in v2.
|
|
17
21
|
*/
|
|
18
22
|
isAdmin: boolean;
|
|
19
|
-
agentId?: string;
|
|
20
23
|
allowedProviders: string[] | '*';
|
|
21
24
|
allowedDevices: Record<string, string[] | '*'>;
|
|
22
25
|
/**
|
|
@@ -718,6 +718,11 @@ export interface TopologyNode {
|
|
|
718
718
|
readonly name: string;
|
|
719
719
|
readonly version: string;
|
|
720
720
|
} | null;
|
|
721
|
+
/**
|
|
722
|
+
* How an online agent reaches the hub (mesh mTLS Release A). Absent for the
|
|
723
|
+
* hub, offline rows, and when the hub cannot tell. Mirrors `TopologyNodeSchema`.
|
|
724
|
+
*/
|
|
725
|
+
readonly meshTransport?: 'tls' | 'clear';
|
|
721
726
|
}
|
|
722
727
|
/**
|
|
723
728
|
* Why a broker's stream health flipped — the discriminator that separates an
|
|
@@ -22,8 +22,7 @@ import { DeviceType } from '../device/device-type.js';
|
|
|
22
22
|
* `super_admin` — collapsed onto the single boolean because every
|
|
23
23
|
* non-admin caller is governed by the same scope-check rules; the
|
|
24
24
|
* distinction was only ever used to route role-specific procedures
|
|
25
|
-
* which we no longer have.
|
|
26
|
-
* `createServiceToken`; CLI / webhook integrations are `cst_*` tokens
|
|
25
|
+
* which we no longer have. CLI / webhook integrations are `cst_*` tokens
|
|
27
26
|
* with `isAdmin: false` + an explicit scope list.
|
|
28
27
|
*/
|
|
29
28
|
/** Per-method access flavour. Materialised on every cap method via codegen. */
|