@camstack/types 1.1.10 → 1.1.11
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.
|
@@ -42,6 +42,11 @@ declare const AvailableIntegrationTypeSchema: z.ZodObject<{
|
|
|
42
42
|
iconUrl: z.ZodNullable<z.ZodString>;
|
|
43
43
|
color: z.ZodString;
|
|
44
44
|
instanceMode: z.ZodString;
|
|
45
|
+
mode: z.ZodEnum<{
|
|
46
|
+
broker: "broker";
|
|
47
|
+
standalone: "standalone";
|
|
48
|
+
account: "account";
|
|
49
|
+
}>;
|
|
45
50
|
discoveryMode: z.ZodString;
|
|
46
51
|
kind: z.ZodEnum<{
|
|
47
52
|
"device-adoption": "device-adoption";
|
|
@@ -167,6 +172,11 @@ export declare const integrationsCapability: {
|
|
|
167
172
|
iconUrl: z.ZodNullable<z.ZodString>;
|
|
168
173
|
color: z.ZodString;
|
|
169
174
|
instanceMode: z.ZodString;
|
|
175
|
+
mode: z.ZodEnum<{
|
|
176
|
+
broker: "broker";
|
|
177
|
+
standalone: "standalone";
|
|
178
|
+
account: "account";
|
|
179
|
+
}>;
|
|
170
180
|
discoveryMode: z.ZodString;
|
|
171
181
|
kind: z.ZodEnum<{
|
|
172
182
|
"device-adoption": "device-adoption";
|
|
@@ -6024,6 +6024,7 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
6024
6024
|
iconUrl: string | null;
|
|
6025
6025
|
color: string;
|
|
6026
6026
|
instanceMode: string;
|
|
6027
|
+
mode: "broker" | "standalone" | "account";
|
|
6027
6028
|
discoveryMode: string;
|
|
6028
6029
|
kind: "device-provider" | "device-adoption";
|
|
6029
6030
|
brokerKind: string | null;
|
|
@@ -19751,6 +19752,7 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
19751
19752
|
iconUrl: string | null;
|
|
19752
19753
|
color: string;
|
|
19753
19754
|
instanceMode: string;
|
|
19755
|
+
mode: "broker" | "standalone" | "account";
|
|
19754
19756
|
discoveryMode: string;
|
|
19755
19757
|
kind: "device-provider" | "device-adoption";
|
|
19756
19758
|
brokerKind: string | null;
|
package/dist/index.js
CHANGED
|
@@ -17660,6 +17660,17 @@ var AvailableIntegrationTypeSchema = zod.z.object({
|
|
|
17660
17660
|
iconUrl: zod.z.string().nullable(),
|
|
17661
17661
|
color: zod.z.string(),
|
|
17662
17662
|
instanceMode: zod.z.string(),
|
|
17663
|
+
/**
|
|
17664
|
+
* Integration wizard `mode` (LOCKED MODEL): `standalone` (create
|
|
17665
|
+
* immediately then add devices, no config step/button), `account` (config
|
|
17666
|
+
* step), or `broker` (broker step). Derived server-side by
|
|
17667
|
+
* `getAvailableTypes` when the addon manifest omits an explicit `mode`.
|
|
17668
|
+
*/
|
|
17669
|
+
mode: zod.z.enum([
|
|
17670
|
+
"standalone",
|
|
17671
|
+
"account",
|
|
17672
|
+
"broker"
|
|
17673
|
+
]),
|
|
17663
17674
|
discoveryMode: zod.z.string(),
|
|
17664
17675
|
/**
|
|
17665
17676
|
* Which integration-marker cap the addon declared, so the wizard can
|
package/dist/index.mjs
CHANGED
|
@@ -17659,6 +17659,17 @@ var AvailableIntegrationTypeSchema = z.object({
|
|
|
17659
17659
|
iconUrl: z.string().nullable(),
|
|
17660
17660
|
color: z.string(),
|
|
17661
17661
|
instanceMode: z.string(),
|
|
17662
|
+
/**
|
|
17663
|
+
* Integration wizard `mode` (LOCKED MODEL): `standalone` (create
|
|
17664
|
+
* immediately then add devices, no config step/button), `account` (config
|
|
17665
|
+
* step), or `broker` (broker step). Derived server-side by
|
|
17666
|
+
* `getAvailableTypes` when the addon manifest omits an explicit `mode`.
|
|
17667
|
+
*/
|
|
17668
|
+
mode: z.enum([
|
|
17669
|
+
"standalone",
|
|
17670
|
+
"account",
|
|
17671
|
+
"broker"
|
|
17672
|
+
]),
|
|
17662
17673
|
discoveryMode: z.string(),
|
|
17663
17674
|
/**
|
|
17664
17675
|
* Which integration-marker cap the addon declared, so the wizard can
|
|
@@ -809,6 +809,22 @@ export interface AddonDeclaration {
|
|
|
809
809
|
readonly slot?: PipelineSlot | null;
|
|
810
810
|
/** Instance mode: 'unique' or 'multiple'. Default: 'multiple' */
|
|
811
811
|
readonly instanceMode?: 'unique' | 'multiple';
|
|
812
|
+
/**
|
|
813
|
+
* Integration `mode` — how the Add-Integration wizard behaves for this
|
|
814
|
+
* addon (LOCKED MODEL, supersedes `instanceMode` for wizard routing):
|
|
815
|
+
* - `'standalone'` — NO integration-level config; picking creates the
|
|
816
|
+
* integration immediately (empty settings) and goes straight to
|
|
817
|
+
* adding/discovering the first device. No config step, no config
|
|
818
|
+
* button on the detail page. (Reolink/ONVIF/Ecowitt/Gree.)
|
|
819
|
+
* - `'account'` — account/connection config; wizard shows the config
|
|
820
|
+
* step, then `integrations.create` with those settings.
|
|
821
|
+
* (Dreo/Wyze/Dreame.)
|
|
822
|
+
* - `'broker'` — the shared-bus/session broker step. (HomeAssistant/MQTT.)
|
|
823
|
+
* Optional/transitional: when absent, `getAvailableTypes` DERIVES the mode
|
|
824
|
+
* (broker cap + brokerKind → broker; device-adoption → account; else →
|
|
825
|
+
* standalone). `instanceMode` is kept for now.
|
|
826
|
+
*/
|
|
827
|
+
readonly mode?: 'standalone' | 'account' | 'broker';
|
|
812
828
|
/**
|
|
813
829
|
* For `device-adoption` integration addons (Approach A): the broker
|
|
814
830
|
* kind the integration wizard must create or link (e.g.
|
|
@@ -97,6 +97,13 @@ export interface IntegrationTypeInfo {
|
|
|
97
97
|
readonly iconUrl: string | null;
|
|
98
98
|
readonly color: string;
|
|
99
99
|
readonly instanceMode: 'unique' | 'multiple';
|
|
100
|
+
/**
|
|
101
|
+
* Integration wizard `mode` — how the Add-Integration flow behaves:
|
|
102
|
+
* `'standalone'` (create immediately → add devices, no config),
|
|
103
|
+
* `'account'` (config step), or `'broker'` (broker step). Derived by
|
|
104
|
+
* `getAvailableTypes` when the manifest omits an explicit `mode`.
|
|
105
|
+
*/
|
|
106
|
+
readonly mode: 'standalone' | 'account' | 'broker';
|
|
100
107
|
readonly discoveryMode: string;
|
|
101
108
|
readonly existingInstances: ReadonlyArray<{
|
|
102
109
|
readonly id: string;
|