@camstack/types 1.1.11 → 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.
- package/dist/addon.js +1 -1
- package/dist/addon.mjs +1 -1
- package/dist/capabilities/addons.cap.d.ts +3 -3
- package/dist/capabilities/climate-control.cap.d.ts +9 -9
- package/dist/capabilities/control.cap.d.ts +4 -4
- package/dist/capabilities/device-manager.cap.d.ts +70 -0
- package/dist/capabilities/device-provider.cap.d.ts +27 -3
- package/dist/capabilities/local-network.cap.d.ts +1 -1
- package/dist/capabilities/media-player.cap.d.ts +4 -4
- package/dist/capabilities/mesh-network.cap.d.ts +3 -3
- package/dist/capabilities/network-access.cap.d.ts +7 -7
- package/dist/capabilities/stream-broker.cap.d.ts +5 -5
- package/dist/capabilities/toast.cap.d.ts +2 -2
- package/dist/capabilities/webrtc-session.cap.d.ts +2 -2
- package/dist/device/base-device-provider.d.ts +17 -5
- package/dist/device/device-type.d.ts +6 -0
- package/dist/generated/addon-api.d.ts +220 -2
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/system-proxy.d.ts +2 -2
- package/dist/index.js +131 -5
- package/dist/index.mjs +131 -5
- package/dist/interfaces/capability.d.ts +11 -11
- package/dist/lifecycle/job.d.ts +3 -3
- package/dist/{sleep-CKc4LLbD.js → sleep-BQzZ7joF.js} +6 -0
- package/dist/{sleep-B3AOslwX.mjs → sleep-C2M2zF7x.mjs} +6 -0
- package/package.json +1 -1
|
@@ -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" | "
|
|
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;
|
|
@@ -15111,7 +15220,7 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
15111
15220
|
nodeId?: string | undefined;
|
|
15112
15221
|
} | undefined;
|
|
15113
15222
|
output: {
|
|
15114
|
-
kind: "system" | "
|
|
15223
|
+
kind: "system" | "framework-update" | "manual" | "framework-bulk-update";
|
|
15115
15224
|
requestedAt: number;
|
|
15116
15225
|
packageName?: string | undefined;
|
|
15117
15226
|
fromVersion?: string | undefined;
|
|
@@ -18681,6 +18790,21 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
18681
18790
|
};
|
|
18682
18791
|
meta: object;
|
|
18683
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
|
+
}>;
|
|
18684
18808
|
adoptionListCandidates: import("@trpc/server").TRPCQueryProcedure<{
|
|
18685
18809
|
input: {
|
|
18686
18810
|
[x: string]: unknown;
|
|
@@ -18764,6 +18888,83 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
18764
18888
|
};
|
|
18765
18889
|
meta: object;
|
|
18766
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
|
+
}>;
|
|
18767
18968
|
testField: import("@trpc/server").TRPCMutationProcedure<{
|
|
18768
18969
|
input: {
|
|
18769
18970
|
[x: string]: unknown;
|
|
@@ -18926,6 +19127,7 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
18926
19127
|
discoverDevices: import("@trpc/server").TRPCMutationProcedure<{
|
|
18927
19128
|
input: {
|
|
18928
19129
|
[x: string]: unknown;
|
|
19130
|
+
params?: Record<string, unknown> | undefined;
|
|
18929
19131
|
};
|
|
18930
19132
|
output: {
|
|
18931
19133
|
stableId: string;
|
|
@@ -18941,6 +19143,22 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
18941
19143
|
}[];
|
|
18942
19144
|
meta: object;
|
|
18943
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
|
+
}>;
|
|
18944
19162
|
adoptDiscoveredDevice: import("@trpc/server").TRPCMutationProcedure<{
|
|
18945
19163
|
input: {
|
|
18946
19164
|
[x: string]: unknown;
|
|
@@ -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:
|
|
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-
|
|
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
|
-
|
|
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.
|
|
@@ -21865,6 +21943,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
21865
21943
|
addonId: null,
|
|
21866
21944
|
access: "create"
|
|
21867
21945
|
},
|
|
21946
|
+
"deviceManager.adoptionListCandidateFilters": {
|
|
21947
|
+
capName: "device-manager",
|
|
21948
|
+
capScope: "system",
|
|
21949
|
+
addonId: null,
|
|
21950
|
+
access: "view"
|
|
21951
|
+
},
|
|
21868
21952
|
"deviceManager.adoptionListCandidates": {
|
|
21869
21953
|
capName: "device-manager",
|
|
21870
21954
|
capScope: "system",
|
|
@@ -21913,12 +21997,30 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
21913
21997
|
addonId: null,
|
|
21914
21998
|
access: "create"
|
|
21915
21999
|
},
|
|
22000
|
+
"deviceManager.discoverAllProviders": {
|
|
22001
|
+
capName: "device-manager",
|
|
22002
|
+
capScope: "system",
|
|
22003
|
+
addonId: null,
|
|
22004
|
+
access: "create"
|
|
22005
|
+
},
|
|
21916
22006
|
"deviceManager.discoverDevices": {
|
|
21917
22007
|
capName: "device-manager",
|
|
21918
22008
|
capScope: "system",
|
|
21919
22009
|
addonId: null,
|
|
21920
22010
|
access: "create"
|
|
21921
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
|
+
},
|
|
21922
22024
|
"deviceManager.enable": {
|
|
21923
22025
|
capName: "device-manager",
|
|
21924
22026
|
capScope: "system",
|
|
@@ -22069,6 +22171,18 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
22069
22171
|
addonId: null,
|
|
22070
22172
|
access: "create"
|
|
22071
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
|
+
},
|
|
22072
22186
|
"deviceManager.registerDevice": {
|
|
22073
22187
|
capName: "device-manager",
|
|
22074
22188
|
capScope: "system",
|
|
@@ -22285,6 +22399,18 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
22285
22399
|
addonId: null,
|
|
22286
22400
|
access: "view"
|
|
22287
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
|
+
},
|
|
22288
22414
|
"deviceProvider.getStatus": {
|
|
22289
22415
|
capName: "device-provider",
|
|
22290
22416
|
capScope: "system",
|