-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #74 from kuzzleio/0.2.0-proposal
Release 0.2.0
- Loading branch information
Showing
40 changed files
with
2,375 additions
and
1,246 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
doc/1/classes/assets-custom-properties/constructor/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
code: false | ||
type: page | ||
title: Constructor | ||
description: AssetsCustomProperties class constructor | ||
--- | ||
|
||
# AssetsCustomProperties | ||
|
||
This class is used within the plugin in order to register custom properties definitions to the `assets` collection. | ||
They are automatically loaded at application startup. | ||
--- | ||
|
||
## Constructor | ||
|
||
```ts | ||
AssetsCustomProperties() | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
code: true | ||
type: branch | ||
title: AssetsCustomProperties | ||
description: Kuzzle IoT Platform - AssetsCustomProperties class | ||
--- |
44 changes: 44 additions & 0 deletions
44
doc/1/classes/assets-custom-properties/register-metadata/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
code: true | ||
type: page | ||
title: registerMetadata | ||
description: Add properties definition to the 'metadata' field | ||
--- | ||
|
||
# registerMetadata | ||
|
||
Add properties definition to the `metadata` field of the `assets` collection. | ||
|
||
|
||
```ts | ||
registerMetadata (mapping: JSONObject, options: JSONObject); | ||
``` | ||
|
||
<br/> | ||
|
||
| Arguments | Type | Description | | ||
|-----------|-----------------------|---------------------------------------------| | ||
| `mapping` | <pre>JSONObject</pre> | Mapping definiton of the `metadata` property | | ||
| `options` | <pre>JSONObject</pre> | Additional options | | ||
|
||
### options | ||
|
||
| Properties | Type | Description | | ||
|-----------|-----------------------|---------------------------------------------| | ||
| `tenantGroup` | <pre>string</pre> | Name of the group for which the mapping should apply. If unspecified, mappings will apply to every group who does not have specific definition. | | ||
|
||
## Usage | ||
|
||
```ts | ||
import { DeviceManagerPlugin } from 'kuzzle-plugin-device-manager'; | ||
|
||
const deviceManagerPlugin = new DeviceManagerPlugin(); | ||
|
||
deviceManagerPlugin.assets.registerMetadata({ | ||
serial: { | ||
type: 'keyword', | ||
fields: { | ||
text: { type: 'text' } } | ||
} | ||
}, { tenantGroup: 'water_management' }); | ||
``` |
18 changes: 18 additions & 0 deletions
18
doc/1/classes/devices-custom-properties/constructor/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
code: false | ||
type: page | ||
title: Constructor | ||
description: DevicesCustomProperties class constructor | ||
--- | ||
|
||
# DevicesCustomProperties | ||
|
||
This class is used within the plugin in order to register custom properties definitions to the `devices` collection. | ||
They are automatically loaded at application startup. | ||
--- | ||
|
||
## Constructor | ||
|
||
```ts | ||
DeviceCustomProperties() | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
code: true | ||
type: branch | ||
title: DevicesCustomProperties | ||
description: Kuzzle IoT Platform - DevicesCustomProperties class | ||
--- |
62 changes: 62 additions & 0 deletions
62
doc/1/classes/devices-custom-properties/register-measure/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
--- | ||
code: true | ||
type: page | ||
title: registerMeasure | ||
description: Add properties definition to the 'measures' field | ||
--- | ||
|
||
# registerMeasure | ||
|
||
Add properties definition to the `measures` field of the `devices` collection. | ||
|
||
|
||
```ts | ||
registerMeasure (measureName: string, mapping: JSONObject, options: JSONObject); | ||
``` | ||
|
||
<br/> | ||
|
||
| Arguments | Type | Description | | ||
|-----------|-----------------------|---------------------------------------------| | ||
| `measureName` | <pre>string</pre> | Name of the measure you are willing to add to the `measures` field | | ||
| `mapping` | <pre>JSONObject</pre> | Mapping definiton of the custom measure property | | ||
| `options` | <pre>JSONObject</pre> | Additional options | | ||
|
||
### options | ||
|
||
| Properties | Type | Description | | ||
|-----------|-----------------------|---------------------------------------------| | ||
| `tenantGroup` | <pre>string</pre> | Name of the group for which the mapping should apply. If unspecified, mappings will apply to every group who does not have specific definition | | ||
|
||
## Usage | ||
|
||
```ts | ||
import { DeviceManagerPlugin } from 'kuzzle-plugin-device-manager'; | ||
|
||
const deviceManagerPlugin = new DeviceManagerPlugin(); | ||
|
||
deviceManagerPlugin.devices.registerMeasure( | ||
'temperature', | ||
{ | ||
dynamic: 'false', | ||
properties: { | ||
fahrenheit: { type: 'float' }, | ||
celsius: { type: 'float' } | ||
} | ||
}, | ||
{ tenantGroup: 'water_management' }); | ||
|
||
deviceManagerPlugin.devices.registerMeasure( | ||
'humidity', | ||
{ | ||
dynamic: 'false', | ||
properties: { | ||
percentage: { | ||
type: 'keyword', | ||
fields: { | ||
text: { type: 'text' } } | ||
} | ||
} | ||
}, | ||
{ tenantGroup: 'air_quality' }); | ||
``` |
44 changes: 44 additions & 0 deletions
44
doc/1/classes/devices-custom-properties/register-metadata/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
code: true | ||
type: page | ||
title: registerMetadata | ||
description: Add properties definition to the 'metadata' field | ||
--- | ||
|
||
# registerMetadata | ||
|
||
Add properties definition to the `metadata` field of the `devices` collection. | ||
|
||
|
||
```ts | ||
registerMetadata (mapping: JSONObject, options: JSONObject); | ||
``` | ||
|
||
<br/> | ||
|
||
| Arguments | Type | Description | | ||
|-----------|-----------------------|---------------------------------------------| | ||
| `mapping` | <pre>JSONObject</pre> | Mapping definiton of the `metadata` property | | ||
| `options` | <pre>JSONObject</pre> | Additional options | | ||
|
||
### options | ||
|
||
| Properties | Type | Description | | ||
|-----------|-----------------------|---------------------------------------------| | ||
| `tenantGroup` | <pre>string</pre> | Name of the group for which the mapping should apply. If unspecified, mappings will apply to every group who does not have specific definition. | | ||
|
||
## Usage | ||
|
||
```ts | ||
import { DeviceManagerPlugin } from 'kuzzle-plugin-device-manager'; | ||
|
||
const deviceManagerPlugin = new DeviceManagerPlugin(); | ||
|
||
deviceManagerPlugin.devices.registerMetadata({ | ||
serial: { | ||
type: 'keyword', | ||
fields: { | ||
text: { type: 'text' } } | ||
} | ||
}, { tenantGroup: 'water_management' }); | ||
``` |
Oops, something went wrong.