@camstack/types 1.1.10 → 1.1.12

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.
@@ -1383,7 +1383,7 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
1383
1383
  nodeId?: string | undefined;
1384
1384
  } | undefined;
1385
1385
  output: {
1386
- kind: "system" | "manual" | "framework-update" | "framework-bulk-update";
1386
+ kind: "system" | "framework-update" | "manual" | "framework-bulk-update";
1387
1387
  requestedAt: number;
1388
1388
  packageName?: string | undefined;
1389
1389
  fromVersion?: string | undefined;
@@ -4953,6 +4953,21 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
4953
4953
  };
4954
4954
  meta: object;
4955
4955
  }>;
4956
+ adoptionListCandidateFilters: import("@trpc/server").TRPCQueryProcedure<{
4957
+ input: {
4958
+ [x: string]: unknown;
4959
+ addonId: string;
4960
+ integrationId: string;
4961
+ };
4962
+ output: {
4963
+ filters: {
4964
+ id: string;
4965
+ label: string;
4966
+ isDefault?: boolean | undefined;
4967
+ }[];
4968
+ };
4969
+ meta: object;
4970
+ }>;
4956
4971
  adoptionListCandidates: import("@trpc/server").TRPCQueryProcedure<{
4957
4972
  input: {
4958
4973
  [x: string]: unknown;
@@ -5036,6 +5051,83 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
5036
5051
  };
5037
5052
  meta: object;
5038
5053
  }>;
5054
+ discoveryProviders: import("@trpc/server").TRPCQueryProcedure<{
5055
+ input: {
5056
+ [x: string]: unknown;
5057
+ };
5058
+ output: {
5059
+ providers: readonly {
5060
+ addonId: string;
5061
+ label: string;
5062
+ }[];
5063
+ };
5064
+ meta: object;
5065
+ }>;
5066
+ discoverAllProviders: import("@trpc/server").TRPCMutationProcedure<{
5067
+ input: {
5068
+ [x: string]: unknown;
5069
+ };
5070
+ output: {
5071
+ groups: readonly {
5072
+ addonId: string;
5073
+ label: string;
5074
+ candidates: readonly {
5075
+ stableId: string;
5076
+ type: import("@camstack/types").DeviceType;
5077
+ suggestedName: string;
5078
+ prefilledConfig: Record<string, unknown>;
5079
+ sourceInfo?: {
5080
+ id: string;
5081
+ system: string;
5082
+ uniqueId?: string | undefined;
5083
+ raw?: Record<string, unknown> | undefined;
5084
+ } | undefined;
5085
+ }[];
5086
+ error: string | null;
5087
+ }[];
5088
+ };
5089
+ meta: object;
5090
+ }>;
5091
+ discoverProvider: import("@trpc/server").TRPCMutationProcedure<{
5092
+ input: {
5093
+ [x: string]: unknown;
5094
+ addonId: string;
5095
+ params?: Record<string, unknown> | undefined;
5096
+ };
5097
+ output: {
5098
+ candidates: readonly {
5099
+ stableId: string;
5100
+ type: import("@camstack/types").DeviceType;
5101
+ suggestedName: string;
5102
+ prefilledConfig: Record<string, unknown>;
5103
+ sourceInfo?: {
5104
+ id: string;
5105
+ system: string;
5106
+ uniqueId?: string | undefined;
5107
+ raw?: Record<string, unknown> | undefined;
5108
+ } | undefined;
5109
+ }[];
5110
+ };
5111
+ meta: object;
5112
+ }>;
5113
+ providerCreationType: import("@trpc/server").TRPCQueryProcedure<{
5114
+ input: {
5115
+ [x: string]: unknown;
5116
+ addonId: string;
5117
+ };
5118
+ output: {
5119
+ deviceType: import("@camstack/types").DeviceType | null;
5120
+ };
5121
+ meta: object;
5122
+ }>;
5123
+ providerDiscoveryParamsSchema: import("@trpc/server").TRPCQueryProcedure<{
5124
+ input: {
5125
+ [x: string]: unknown;
5126
+ addonId: string;
5127
+ };
5128
+ output: unknown;
5129
+ meta: object;
5130
+ }>;
5039
5131
  testField: import("@trpc/server").TRPCMutationProcedure<{
5040
5132
  input: {
5041
5133
  [x: string]: unknown;
@@ -5198,6 +5290,7 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
5198
5290
  discoverDevices: import("@trpc/server").TRPCMutationProcedure<{
5199
5291
  input: {
5200
5292
  [x: string]: unknown;
5293
+ params?: Record<string, unknown> | undefined;
5201
5294
  };
5202
5295
  output: {
5203
5296
  stableId: string;
@@ -5213,6 +5306,22 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
5213
5306
  }[];
5214
5307
  meta: object;
5215
5308
  }>;
5309
+ getDiscoveryParamsSchema: import("@trpc/server").TRPCQueryProcedure<{
5310
+ input: {
5311
+ [x: string]: unknown;
5312
+ };
5313
+ output: unknown;
5314
+ meta: object;
5315
+ }>;
5316
+ getManualCreationType: import("@trpc/server").TRPCQueryProcedure<{
5317
+ input: {
5318
+ [x: string]: unknown;
5319
+ };
5320
+ output: {
5321
+ deviceType: import("@camstack/types").DeviceType | null;
5322
+ };
5323
+ meta: object;
5324
+ }>;
5216
5325
  adoptDiscoveredDevice: import("@trpc/server").TRPCMutationProcedure<{
5217
5326
  input: {
5218
5327
  [x: string]: unknown;
@@ -6024,6 +6133,7 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
6024
6133
  iconUrl: string | null;
6025
6134
  color: string;
6026
6135
  instanceMode: string;
6136
+ mode: "broker" | "standalone" | "account";
6027
6137
  discoveryMode: string;
6028
6138
  kind: "device-provider" | "device-adoption";
6029
6139
  brokerKind: string | null;
@@ -15110,7 +15220,7 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
15110
15220
  nodeId?: string | undefined;
15111
15221
  } | undefined;
15112
15222
  output: {
15113
- kind: "system" | "manual" | "framework-update" | "framework-bulk-update";
15223
+ kind: "system" | "framework-update" | "manual" | "framework-bulk-update";
15114
15224
  requestedAt: number;
15115
15225
  packageName?: string | undefined;
15116
15226
  fromVersion?: string | undefined;
@@ -18680,6 +18790,21 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
18680
18790
  };
18681
18791
  meta: object;
18682
18792
  }>;
18793
+ adoptionListCandidateFilters: import("@trpc/server").TRPCQueryProcedure<{
18794
+ input: {
18795
+ [x: string]: unknown;
18796
+ addonId: string;
18797
+ integrationId: string;
18798
+ };
18799
+ output: {
18800
+ filters: {
18801
+ id: string;
18802
+ label: string;
18803
+ isDefault?: boolean | undefined;
18804
+ }[];
18805
+ };
18806
+ meta: object;
18807
+ }>;
18683
18808
  adoptionListCandidates: import("@trpc/server").TRPCQueryProcedure<{
18684
18809
  input: {
18685
18810
  [x: string]: unknown;
@@ -18763,6 +18888,83 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
18763
18888
  };
18764
18889
  meta: object;
18765
18890
  }>;
18891
+ discoveryProviders: import("@trpc/server").TRPCQueryProcedure<{
18892
+ input: {
18893
+ [x: string]: unknown;
18894
+ };
18895
+ output: {
18896
+ providers: readonly {
18897
+ addonId: string;
18898
+ label: string;
18899
+ }[];
18900
+ };
18901
+ meta: object;
18902
+ }>;
18903
+ discoverAllProviders: import("@trpc/server").TRPCMutationProcedure<{
18904
+ input: {
18905
+ [x: string]: unknown;
18906
+ };
18907
+ output: {
18908
+ groups: readonly {
18909
+ addonId: string;
18910
+ label: string;
18911
+ candidates: readonly {
18912
+ stableId: string;
18913
+ type: import("@camstack/types").DeviceType;
18914
+ suggestedName: string;
18915
+ prefilledConfig: Record<string, unknown>;
18916
+ sourceInfo?: {
18917
+ id: string;
18918
+ system: string;
18919
+ uniqueId?: string | undefined;
18920
+ raw?: Record<string, unknown> | undefined;
18921
+ } | undefined;
18922
+ }[];
18923
+ error: string | null;
18924
+ }[];
18925
+ };
18926
+ meta: object;
18927
+ }>;
18928
+ discoverProvider: import("@trpc/server").TRPCMutationProcedure<{
18929
+ input: {
18930
+ [x: string]: unknown;
18931
+ addonId: string;
18932
+ params?: Record<string, unknown> | undefined;
18933
+ };
18934
+ output: {
18935
+ candidates: readonly {
18936
+ stableId: string;
18937
+ type: import("@camstack/types").DeviceType;
18938
+ suggestedName: string;
18939
+ prefilledConfig: Record<string, unknown>;
18940
+ sourceInfo?: {
18941
+ id: string;
18942
+ system: string;
18943
+ uniqueId?: string | undefined;
18944
+ raw?: Record<string, unknown> | undefined;
18945
+ } | undefined;
18946
+ }[];
18947
+ };
18948
+ meta: object;
18949
+ }>;
18950
+ providerCreationType: import("@trpc/server").TRPCQueryProcedure<{
18951
+ input: {
18952
+ [x: string]: unknown;
18953
+ addonId: string;
18954
+ };
18955
+ output: {
18956
+ deviceType: import("@camstack/types").DeviceType | null;
18957
+ };
18958
+ meta: object;
18959
+ }>;
18960
+ providerDiscoveryParamsSchema: import("@trpc/server").TRPCQueryProcedure<{
18961
+ input: {
18962
+ [x: string]: unknown;
18963
+ addonId: string;
18964
+ };
18965
+ output: unknown;
18966
+ meta: object;
18967
+ }>;
18766
18968
  testField: import("@trpc/server").TRPCMutationProcedure<{
18767
18969
  input: {
18768
18970
  [x: string]: unknown;
@@ -18925,6 +19127,7 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
18925
19127
  discoverDevices: import("@trpc/server").TRPCMutationProcedure<{
18926
19128
  input: {
18927
19129
  [x: string]: unknown;
19130
+ params?: Record<string, unknown> | undefined;
18928
19131
  };
18929
19132
  output: {
18930
19133
  stableId: string;
@@ -18940,6 +19143,22 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
18940
19143
  }[];
18941
19144
  meta: object;
18942
19145
  }>;
19146
+ getDiscoveryParamsSchema: import("@trpc/server").TRPCQueryProcedure<{
19147
+ input: {
19148
+ [x: string]: unknown;
19149
+ };
19150
+ output: unknown;
19151
+ meta: object;
19152
+ }>;
19153
+ getManualCreationType: import("@trpc/server").TRPCQueryProcedure<{
19154
+ input: {
19155
+ [x: string]: unknown;
19156
+ };
19157
+ output: {
19158
+ deviceType: import("@camstack/types").DeviceType | null;
19159
+ };
19160
+ meta: object;
19161
+ }>;
18943
19162
  adoptDiscoveredDevice: import("@trpc/server").TRPCMutationProcedure<{
18944
19163
  input: {
18945
19164
  [x: string]: unknown;
@@ -19751,6 +19970,7 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
19751
19970
  iconUrl: string | null;
19752
19971
  color: string;
19753
19972
  instanceMode: string;
19973
+ mode: "broker" | "standalone" | "account";
19754
19974
  discoveryMode: string;
19755
19975
  kind: "device-provider" | "device-adoption";
19756
19976
  brokerKind: string | null;
@@ -6,7 +6,7 @@
6
6
  * scope+access check inside `protectedProcedure` (see
7
7
  * `server/backend/src/api/trpc/trpc.middleware.ts`).
8
8
  *
9
- * Coverage: 710 method paths across 110 capabilities.
9
+ * Coverage: 718 method paths across 110 capabilities.
10
10
  */
11
11
  import type { CapabilityMethodAccess } from '../capabilities/capability-definition.js';
12
12
  export interface MethodAccessRecord {
@@ -58,8 +58,8 @@ export interface SystemProxy {
58
58
  readonly decoder: Pick<InferProvider<typeof decoderCapability>, 'supportsCodec' | 'getInfo' | 'createSession' | 'destroySession' | 'pushPacket' | 'openStream' | 'pullFrames' | 'pullHandles' | 'getFrame' | 'getShmStats' | 'updateConfig' | 'getStats' | 'listActiveSessions' | 'reprobeHwaccel'>;
59
59
  readonly deviceAdoption: Pick<InferProvider<typeof deviceAdoptionCapability>, 'listCandidateFilters' | 'listCandidates' | 'getCandidate' | 'refresh' | 'adopt' | 'release' | 'resync'>;
60
60
  readonly deviceExport: Pick<InferProvider<typeof deviceExportCapability>, 'getStatus' | 'listSupportedDeviceKinds' | 'listExposedDevices' | 'exposeDevice' | 'unexposeDevice'>;
61
- readonly deviceManager: Pick<InferProvider<typeof deviceManagerCapability>, 'allocateDeviceId' | 'registerDevice' | 'removeDevice' | 'persistConfig' | 'listLocations' | 'addLocation' | 'removeLocation' | 'listPersistedByAddon' | 'listAll' | 'getChildren' | 'removeByIntegration' | 'listWrappersForCap' | 'listBindableCapsForDeviceType' | 'discoverDevices' | 'adoptDevice' | 'getCreationSchema' | 'createDevice' | 'testCreationField' | 'adoptionListCandidates' | 'adoptionRefresh' | 'adoptionAdopt' | 'adoptionRelease' | 'adoptionResync'>;
62
- readonly deviceProvider: Pick<InferProvider<typeof deviceProviderCapability>, 'start' | 'stop' | 'getStatus' | 'getDevices' | 'supportsDiscovery' | 'discoverDevices' | 'adoptDiscoveredDevice' | 'supportsManualCreation' | 'getChildCreationSchema' | 'createDevice' | 'testCreationField'>;
61
+ readonly deviceManager: Pick<InferProvider<typeof deviceManagerCapability>, 'allocateDeviceId' | 'registerDevice' | 'removeDevice' | 'persistConfig' | 'listLocations' | 'addLocation' | 'removeLocation' | 'listPersistedByAddon' | 'listAll' | 'getChildren' | 'removeByIntegration' | 'listWrappersForCap' | 'listBindableCapsForDeviceType' | 'discoverDevices' | 'adoptDevice' | 'getCreationSchema' | 'createDevice' | 'testCreationField' | 'adoptionListCandidateFilters' | 'adoptionListCandidates' | 'adoptionRefresh' | 'adoptionAdopt' | 'adoptionRelease' | 'adoptionResync' | 'discoveryProviders' | 'discoverAllProviders' | 'discoverProvider' | 'providerCreationType' | 'providerDiscoveryParamsSchema'>;
62
+ readonly deviceProvider: Pick<InferProvider<typeof deviceProviderCapability>, 'start' | 'stop' | 'getStatus' | 'getDevices' | 'supportsDiscovery' | 'discoverDevices' | 'getDiscoveryParamsSchema' | 'getManualCreationType' | 'adoptDiscoveredDevice' | 'supportsManualCreation' | 'getChildCreationSchema' | 'createDevice' | 'testCreationField'>;
63
63
  readonly deviceState: Pick<InferProvider<typeof deviceStateCapability>, 'getAllSnapshots'>;
64
64
  readonly faceGallery: Pick<InferProvider<typeof faceGalleryCapability>, 'listIdentities' | 'createIdentity' | 'renameIdentity' | 'deleteIdentity' | 'listIdentitySamples' | 'removeSample' | 'listRecentFaces' | 'getFaceMedia' | 'assignFace' | 'unassignFace' | 'deleteFace' | 'assignFaces' | 'unassignFaces' | 'suggestFaceClusters'>;
65
65
  readonly integrations: Pick<InferProvider<typeof integrationsCapability>, 'list' | 'get' | 'getByAddonId' | 'create' | 'update' | 'delete' | 'getSettings' | 'setSettings' | 'getAvailableTypes' | 'testConnection'>;
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_sleep = require("./sleep-CKc4LLbD.js");
2
+ const require_sleep = require("./sleep-BQzZ7joF.js");
3
3
  const require_err_msg = require("./err-msg-COpsHMw2.js");
4
4
  let zod = require("zod");
5
5
  //#region src/health/wiring-health.ts
@@ -4216,7 +4216,7 @@ var climateControlCapability = {
4216
4216
  scope: "device",
4217
4217
  deviceNative: true,
4218
4218
  mode: "singleton",
4219
- deviceTypes: [require_sleep.DeviceType.Thermostat],
4219
+ deviceTypes: [require_sleep.DeviceType.Thermostat, require_sleep.DeviceType.Climate],
4220
4220
  methods: {
4221
4221
  setMode: require_sleep.method(zod.z.object({
4222
4222
  deviceId: zod.z.number().int().nonnegative(),
@@ -9427,10 +9427,30 @@ var deviceProviderCapability = {
9427
9427
  type: zod.z.string()
9428
9428
  }))),
9429
9429
  supportsDiscovery: require_sleep.method(zod.z.object({}), zod.z.boolean()),
9430
- discoverDevices: require_sleep.method(zod.z.object({}), zod.z.array(DiscoveryCandidateSchema), {
9430
+ /**
9431
+ * Run a network scan. `params` carries optional provider-specific scan
9432
+ * inputs (e.g. a broadcast address / subnet for cross-subnet discovery),
9433
+ * shaped by `getDiscoveryParamsSchema`. Omitted for the generic scan
9434
+ * (provider uses its local-network default).
9435
+ */
9436
+ discoverDevices: require_sleep.method(zod.z.object({ params: zod.z.record(zod.z.string(), zod.z.unknown()).optional() }), zod.z.array(DiscoveryCandidateSchema), {
9431
9437
  kind: "mutation",
9432
9438
  auth: "admin"
9433
9439
  }),
9440
+ /**
9441
+ * Optional form schema (`ConfigUISchema`) for the EXTRA per-scan inputs a
9442
+ * provider accepts (e.g. Gree's broadcast address for a different subnet).
9443
+ * `null` when the provider takes no extra scan params — the generic
9444
+ * aggregated scan never renders this; the per-integration scan does.
9445
+ */
9446
+ getDiscoveryParamsSchema: require_sleep.method(zod.z.object({}), CreationSchemaOutputSchema),
9447
+ /**
9448
+ * The DeviceType this provider creates via manual add (Camera for
9449
+ * Reolink/ONVIF, Container for Gree, Hub for Ecowitt). `null` when the
9450
+ * provider does not support manual creation. Lets the Add-Device dialog
9451
+ * pick the right type instead of assuming Camera.
9452
+ */
9453
+ getManualCreationType: require_sleep.method(zod.z.object({}), zod.z.object({ deviceType: zod.z.enum(require_sleep.DeviceType).nullable() })),
9434
9454
  adoptDiscoveredDevice: require_sleep.method(zod.z.object({ candidate: DiscoveryCandidateSchema }), DeviceSummarySchema, {
9435
9455
  kind: "mutation",
9436
9456
  auth: "admin"
@@ -9556,9 +9576,23 @@ var BaseDeviceProvider = class extends require_sleep.BaseAddon {
9556
9576
  async supportsDiscovery() {
9557
9577
  return false;
9558
9578
  }
9559
- async discoverDevices() {
9579
+ async discoverDevices(_input) {
9560
9580
  return [];
9561
9581
  }
9582
+ /** Extra per-scan input form (e.g. a broadcast address for another subnet).
9583
+ * Null = no extra params. Override in providers that support scoped scans. */
9584
+ async getDiscoveryParamsSchema() {
9585
+ return null;
9586
+ }
9587
+ /**
9588
+ * The DeviceType this provider creates via manual add — derived from the
9589
+ * `deviceClasses` map (first registered type). `null` when manual creation is
9590
+ * unsupported. Lets the Add-Device dialog pick the right type per provider.
9591
+ */
9592
+ async getManualCreationType() {
9593
+ if (!await this.supportsManualCreation()) return { deviceType: null };
9594
+ return { deviceType: Object.values(require_sleep.DeviceType).find((t) => this.deviceClasses[t] !== void 0) ?? null };
9595
+ }
9562
9596
  async adoptDiscoveredDevice(_input) {
9563
9597
  throw new Error(`${this.providerName} provider does not support discovery-based adoption`);
9564
9598
  }
@@ -10169,11 +10203,17 @@ function createSystemProxy(api) {
10169
10203
  getCreationSchema: (input) => dispatch("deviceManager", "getCreationSchema", "query", input),
10170
10204
  createDevice: (input) => dispatch("deviceManager", "createDevice", "mutation", input),
10171
10205
  testCreationField: (input) => dispatch("deviceManager", "testCreationField", "mutation", input),
10206
+ adoptionListCandidateFilters: (input) => dispatch("deviceManager", "adoptionListCandidateFilters", "query", input),
10172
10207
  adoptionListCandidates: (input) => dispatch("deviceManager", "adoptionListCandidates", "query", input),
10173
10208
  adoptionRefresh: (input) => dispatch("deviceManager", "adoptionRefresh", "mutation", input),
10174
10209
  adoptionAdopt: (input) => dispatch("deviceManager", "adoptionAdopt", "mutation", input),
10175
10210
  adoptionRelease: (input) => dispatch("deviceManager", "adoptionRelease", "mutation", input),
10176
- adoptionResync: (input) => dispatch("deviceManager", "adoptionResync", "mutation", input)
10211
+ adoptionResync: (input) => dispatch("deviceManager", "adoptionResync", "mutation", input),
10212
+ discoveryProviders: (input) => dispatch("deviceManager", "discoveryProviders", "query", input),
10213
+ discoverAllProviders: (input) => dispatch("deviceManager", "discoverAllProviders", "mutation", input),
10214
+ discoverProvider: (input) => dispatch("deviceManager", "discoverProvider", "mutation", input),
10215
+ providerCreationType: (input) => dispatch("deviceManager", "providerCreationType", "query", input),
10216
+ providerDiscoveryParamsSchema: (input) => dispatch("deviceManager", "providerDiscoveryParamsSchema", "query", input)
10177
10217
  },
10178
10218
  deviceProvider: {
10179
10219
  start: (input) => dispatch("deviceProvider", "start", "mutation", input),
@@ -10182,6 +10222,8 @@ function createSystemProxy(api) {
10182
10222
  getDevices: (input) => dispatch("deviceProvider", "getDevices", "query", input),
10183
10223
  supportsDiscovery: (input) => dispatch("deviceProvider", "supportsDiscovery", "query", input),
10184
10224
  discoverDevices: (input) => dispatch("deviceProvider", "discoverDevices", "mutation", input),
10225
+ getDiscoveryParamsSchema: (input) => dispatch("deviceProvider", "getDiscoveryParamsSchema", "query", input),
10226
+ getManualCreationType: (input) => dispatch("deviceProvider", "getManualCreationType", "query", input),
10185
10227
  adoptDiscoveredDevice: (input) => dispatch("deviceProvider", "adoptDiscoveredDevice", "mutation", input),
10186
10228
  supportsManualCreation: (input) => dispatch("deviceProvider", "supportsManualCreation", "query", input),
10187
10229
  getChildCreationSchema: (input) => dispatch("deviceProvider", "getChildCreationSchema", "query", input),
@@ -13651,6 +13693,12 @@ var deviceManagerCapability = {
13651
13693
  kind: "mutation",
13652
13694
  auth: "admin"
13653
13695
  }),
13696
+ /** List candidate filter chips for an integration via its device-adoption
13697
+ * provider — addonId-routed so it never hits the singleton shadow. */
13698
+ adoptionListCandidateFilters: require_sleep.method(zod.z.object({
13699
+ addonId: zod.z.string(),
13700
+ integrationId: zod.z.string()
13701
+ }), zod.z.object({ filters: zod.z.array(AdoptionFilterSchema) }), { auth: "admin" }),
13654
13702
  /** List adoption candidates for an integration via its device-adoption provider. */
13655
13703
  adoptionListCandidates: require_sleep.method(ListCandidatesInputSchema.extend({ addonId: zod.z.string() }), ListCandidatesOutputSchema, { auth: "admin" }),
13656
13704
  /** Trigger a discovery refresh on the integration's device-adoption provider. */
@@ -13681,6 +13729,36 @@ var deviceManagerCapability = {
13681
13729
  kind: "mutation",
13682
13730
  auth: "admin"
13683
13731
  }),
13732
+ /** Addons whose device-provider reports `supportsDiscovery` (for the modal). */
13733
+ discoveryProviders: require_sleep.method(zod.z.object({}), zod.z.object({ providers: zod.z.array(zod.z.object({
13734
+ addonId: zod.z.string(),
13735
+ label: zod.z.string()
13736
+ })).readonly() }), { auth: "admin" }),
13737
+ /** Scan EVERY discovery-capable provider; returns candidates grouped by addon. */
13738
+ discoverAllProviders: require_sleep.method(zod.z.object({}), zod.z.object({ groups: zod.z.array(zod.z.object({
13739
+ addonId: zod.z.string(),
13740
+ label: zod.z.string(),
13741
+ candidates: zod.z.array(DiscoveryCandidateSchema).readonly(),
13742
+ error: zod.z.string().nullable()
13743
+ })).readonly() }), {
13744
+ kind: "mutation",
13745
+ auth: "admin"
13746
+ }),
13747
+ /** Scan ONE provider with optional provider-specific params (subnet /
13748
+ * broadcast addr) — the per-integration "Scan network" surface. */
13749
+ discoverProvider: require_sleep.method(zod.z.object({
13750
+ addonId: zod.z.string(),
13751
+ params: zod.z.record(zod.z.string(), zod.z.unknown()).optional()
13752
+ }), zod.z.object({ candidates: zod.z.array(DiscoveryCandidateSchema).readonly() }), {
13753
+ kind: "mutation",
13754
+ auth: "admin"
13755
+ }),
13756
+ /** The device type a provider creates via manual add (Camera/Container/Hub),
13757
+ * so the Add-Device dialog uses the right type instead of assuming Camera. */
13758
+ providerCreationType: require_sleep.method(zod.z.object({ addonId: zod.z.string() }), zod.z.object({ deviceType: zod.z.enum(require_sleep.DeviceType).nullable() }), { auth: "admin" }),
13759
+ /** A provider's extra per-scan param form (ConfigUISchema) for the
13760
+ * per-integration scan, or null when it takes none. */
13761
+ providerDiscoveryParamsSchema: require_sleep.method(zod.z.object({ addonId: zod.z.string() }), zod.z.unknown(), { auth: "admin" }),
13684
13762
  /**
13685
13763
  * Test a field value on an existing device (e.g. probe an RTSP URL).
13686
13764
  * Routes through the device-provider for the owning addon.
@@ -17660,6 +17738,17 @@ var AvailableIntegrationTypeSchema = zod.z.object({
17660
17738
  iconUrl: zod.z.string().nullable(),
17661
17739
  color: zod.z.string(),
17662
17740
  instanceMode: zod.z.string(),
17741
+ /**
17742
+ * Integration wizard `mode` (LOCKED MODEL): `standalone` (create
17743
+ * immediately then add devices, no config step/button), `account` (config
17744
+ * step), or `broker` (broker step). Derived server-side by
17745
+ * `getAvailableTypes` when the addon manifest omits an explicit `mode`.
17746
+ */
17747
+ mode: zod.z.enum([
17748
+ "standalone",
17749
+ "account",
17750
+ "broker"
17751
+ ]),
17663
17752
  discoveryMode: zod.z.string(),
17664
17753
  /**
17665
17754
  * Which integration-marker cap the addon declared, so the wizard can
@@ -21854,6 +21943,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
21854
21943
  addonId: null,
21855
21944
  access: "create"
21856
21945
  },
21946
+ "deviceManager.adoptionListCandidateFilters": {
21947
+ capName: "device-manager",
21948
+ capScope: "system",
21949
+ addonId: null,
21950
+ access: "view"
21951
+ },
21857
21952
  "deviceManager.adoptionListCandidates": {
21858
21953
  capName: "device-manager",
21859
21954
  capScope: "system",
@@ -21902,12 +21997,30 @@ var METHOD_ACCESS_MAP = Object.freeze({
21902
21997
  addonId: null,
21903
21998
  access: "create"
21904
21999
  },
22000
+ "deviceManager.discoverAllProviders": {
22001
+ capName: "device-manager",
22002
+ capScope: "system",
22003
+ addonId: null,
22004
+ access: "create"
22005
+ },
21905
22006
  "deviceManager.discoverDevices": {
21906
22007
  capName: "device-manager",
21907
22008
  capScope: "system",
21908
22009
  addonId: null,
21909
22010
  access: "create"
21910
22011
  },
22012
+ "deviceManager.discoverProvider": {
22013
+ capName: "device-manager",
22014
+ capScope: "system",
22015
+ addonId: null,
22016
+ access: "create"
22017
+ },
22018
+ "deviceManager.discoveryProviders": {
22019
+ capName: "device-manager",
22020
+ capScope: "system",
22021
+ addonId: null,
22022
+ access: "view"
22023
+ },
21911
22024
  "deviceManager.enable": {
21912
22025
  capName: "device-manager",
21913
22026
  capScope: "system",
@@ -22058,6 +22171,18 @@ var METHOD_ACCESS_MAP = Object.freeze({
22058
22171
  addonId: null,
22059
22172
  access: "create"
22060
22173
  },
22174
+ "deviceManager.providerCreationType": {
22175
+ capName: "device-manager",
22176
+ capScope: "system",
22177
+ addonId: null,
22178
+ access: "view"
22179
+ },
22180
+ "deviceManager.providerDiscoveryParamsSchema": {
22181
+ capName: "device-manager",
22182
+ capScope: "system",
22183
+ addonId: null,
22184
+ access: "view"
22185
+ },
22061
22186
  "deviceManager.registerDevice": {
22062
22187
  capName: "device-manager",
22063
22188
  capScope: "system",
@@ -22274,6 +22399,18 @@ var METHOD_ACCESS_MAP = Object.freeze({
22274
22399
  addonId: null,
22275
22400
  access: "view"
22276
22401
  },
22402
+ "deviceProvider.getDiscoveryParamsSchema": {
22403
+ capName: "device-provider",
22404
+ capScope: "system",
22405
+ addonId: null,
22406
+ access: "view"
22407
+ },
22408
+ "deviceProvider.getManualCreationType": {
22409
+ capName: "device-provider",
22410
+ capScope: "system",
22411
+ addonId: null,
22412
+ access: "view"
22413
+ },
22277
22414
  "deviceProvider.getStatus": {
22278
22415
  capName: "device-provider",
22279
22416
  capScope: "system",