@nebulahome/integration-sdk 0.0.0-stage → 1.1.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/CHANGELOG.md +33 -0
- package/FILES.md +703 -0
- package/LICENSE +21 -0
- package/README.md +128 -2
- package/dist/chunks/node-dist.js +9253 -0
- package/dist/chunks/node-index.d.ts +2090 -0
- package/dist/chunks/node-project.js +545 -0
- package/dist/chunks/node-rolldown-runtime.js +24 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +3783 -0
- package/dist/index.d.ts +1427 -0
- package/dist/index.js +53 -0
- package/dist/schemas.d.ts +741 -0
- package/dist/schemas.js +53 -0
- package/dist/testing.d.ts +286 -0
- package/dist/testing.js +271 -0
- package/package.json +76 -3
- package/schemas/account.schema.json +595 -0
- package/schemas/discovery.schema.json +613 -0
- package/schemas/driver.schema.json +119 -0
- package/schemas/manifest.schema.json +557 -0
- package/schemas/profile.schema.json +1480 -0
- package/schemas/setup.schema.json +1166 -0
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 };
|