@nebulahome/integration-sdk 0.0.0-stage → 1.0.0

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/index.js ADDED
@@ -0,0 +1,53 @@
1
+ //#region src/modules.ts
2
+ /**
3
+ * Types a transport module: `manifest.json`'s `transports`. The transport it builds must call
4
+ * itself `<vendor>/<name>`, the name the manifest gives it.
5
+ *
6
+ * @param factory - Builds the transport from the SDK, with `sdk.defineTransport`.
7
+ * @returns The factory, as the module's default export.
8
+ */
9
+ function defineTransportModule(factory) {
10
+ return factory;
11
+ }
12
+ /**
13
+ * Types a code driver's module: `driver.json`'s `entry`, for a driver whose entities depend on
14
+ * what the device says.
15
+ *
16
+ * @param factory - Builds the integration from the SDK.
17
+ * @returns The factory, as the module's default export.
18
+ */
19
+ function defineDriverModule(factory) {
20
+ return factory;
21
+ }
22
+ /**
23
+ * Types a discovery module: `discovery.json`'s `{ "module": "./lan/discovery.js" }`, a listener
24
+ * of the vendor's own for a protocol the platform does not speak.
25
+ *
26
+ * @param factory - Builds what listens, from the SDK.
27
+ * @returns The factory, as the module's default export.
28
+ */
29
+ function defineDiscoveryModule(factory) {
30
+ return factory;
31
+ }
32
+ /**
33
+ * Types an account module: `account.json`'s `module`, which signs in to the account the
34
+ * vendor's devices are reached through.
35
+ *
36
+ * @param factory - Builds the sign-in from the SDK, with `sdk.defineAccount`.
37
+ * @returns The factory, as the module's default export.
38
+ */
39
+ function defineAccountModule(factory) {
40
+ return factory;
41
+ }
42
+ /**
43
+ * Types a stream module: `manifest.json`'s `streams`, a camera's source. It must call itself
44
+ * `<vendor>/<name>`.
45
+ *
46
+ * @param factory - Builds the source from the SDK, with `sdk.defineStreamSource`.
47
+ * @returns The factory, as the module's default export.
48
+ */
49
+ function defineStreamModule(factory) {
50
+ return factory;
51
+ }
52
+ //#endregion
53
+ export { defineAccountModule, defineDiscoveryModule, defineDriverModule, defineStreamModule, defineTransportModule };