Skip to content

Commit

Permalink
chore: merge branch '2-dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
sebtiz13 committed Dec 5, 2024
2 parents 8818ba3 + 75ba309 commit 90b9bfa
Show file tree
Hide file tree
Showing 101 changed files with 3,778 additions and 1,076 deletions.
8 changes: 8 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"javascript.preferences.quoteStyle": "double",
"exportall.config.quote": "\"",
"exportall.config.relExclusion": [
"/lib/modules/shared/exports.ts",
"/lib/modules/shared/types/exports.ts"
]
}
67 changes: 67 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,54 @@
# [2.5.0-dev.5](https://github.com/kuzzleio/kuzzle-device-manager/compare/v2.5.0-dev.4...v2.5.0-dev.5) (2024-12-05)


### Bug Fixes

* **assetservice:** can't replace metadata if not present in asset ([#384](https://github.com/kuzzleio/kuzzle-device-manager/issues/384)) ([eb65c0a](https://github.com/kuzzleio/kuzzle-device-manager/commit/eb65c0a1ae65488033a5422ce0879e8820fe05fa))

# [2.5.0-dev.4](https://github.com/kuzzleio/kuzzle-device-manager/compare/v2.5.0-dev.3...v2.5.0-dev.4) (2024-12-05)


### Features

* add editor hint support ([#386](https://github.com/kuzzleio/kuzzle-device-manager/issues/386)) ([a9b62df](https://github.com/kuzzleio/kuzzle-device-manager/commit/a9b62df423f1218c7bd7866e33b33626f4f17e06))

# [2.5.0-dev.3](https://github.com/kuzzleio/kuzzle-device-manager/compare/v2.5.0-dev.2...v2.5.0-dev.3) (2024-12-05)


### Features

* **softTenants:** add softTenant ids to assets measures documents ([#383](https://github.com/kuzzleio/kuzzle-device-manager/issues/383)) ([1b36fe0](https://github.com/kuzzleio/kuzzle-device-manager/commit/1b36fe019ce11a0fb7faf4ce5f3c6c2cff4223e9))

# [2.5.0-beta.2](https://github.com/kuzzleio/kuzzle-device-manager/compare/v2.5.0-beta.1...v2.5.0-beta.2) (2024-11-18)


### Bug Fixes

* backport fix ([#380](https://github.com/kuzzleio/kuzzle-device-manager/issues/380)) ([5392b56](https://github.com/kuzzleio/kuzzle-device-manager/commit/5392b56a9478b1c1932845ee44965d5978197350))
* getAsset should search in commons assets too ([#380](https://github.com/kuzzleio/kuzzle-device-manager/issues/380)) ([d588a93](https://github.com/kuzzleio/kuzzle-device-manager/commit/d588a93b0dd5b270199083cfb0856e34b57afa66))

# [2.5.0-dev.2](https://github.com/kuzzleio/kuzzle-device-manager/compare/v2.5.0-dev.1...v2.5.0-dev.2) (2024-11-18)


### Bug Fixes

* backport fix ([#380](https://github.com/kuzzleio/kuzzle-device-manager/issues/380)) ([5392b56](https://github.com/kuzzleio/kuzzle-device-manager/commit/5392b56a9478b1c1932845ee44965d5978197350))
* getAsset should search in commons assets too ([#380](https://github.com/kuzzleio/kuzzle-device-manager/issues/380)) ([d588a93](https://github.com/kuzzleio/kuzzle-device-manager/commit/d588a93b0dd5b270199083cfb0856e34b57afa66))

# [2.5.0-beta.1](https://github.com/kuzzleio/kuzzle-device-manager/compare/v2.4.3...v2.5.0-beta.1) (2024-11-12)


### Features

* **measure:** allow measures to be pushed on Assets via API (no devices) ([#344](https://github.com/kuzzleio/kuzzle-device-manager/issues/344)) ([c1073c1](https://github.com/kuzzleio/kuzzle-device-manager/commit/c1073c1f0ccb4cfc7cee64d86c51a4999617fd41))

# [2.5.0-dev.1](https://github.com/kuzzleio/kuzzle-device-manager/compare/v2.4.3...v2.5.0-dev.1) (2024-11-08)


### Features

* **measure:** allow measures to be pushed on Assets via API (no devices) ([#344](https://github.com/kuzzleio/kuzzle-device-manager/issues/344)) ([c1073c1](https://github.com/kuzzleio/kuzzle-device-manager/commit/c1073c1f0ccb4cfc7cee64d86c51a4999617fd41))

## [2.4.4](https://github.com/kuzzleio/kuzzle-device-manager/compare/v2.4.3...v2.4.4) (2024-11-18)


Expand Down Expand Up @@ -171,6 +222,22 @@
* **roles:** add specific roles for assets and devices ([#365](https://github.com/kuzzleio/kuzzle-device-manager/issues/365)) ([a01982c](https://github.com/kuzzleio/kuzzle-device-manager/commit/a01982cd025d4436617e710aa407e209f0d4f375))
* upsert devices ([#355](https://github.com/kuzzleio/kuzzle-device-manager/issues/355)) ([c75abef](https://github.com/kuzzleio/kuzzle-device-manager/commit/c75abef4c313bbe33ad833189dfcc6fdc50fc15d))

# [2.4.0-beta.21](https://github.com/kuzzleio/kuzzle-device-manager/compare/v2.4.0-beta.20...v2.4.0-beta.21) (2024-09-18)


### Bug Fixes

* only list asset models for the requested engine group ([#367](https://github.com/kuzzleio/kuzzle-device-manager/issues/367)) ([8a14207](https://github.com/kuzzleio/kuzzle-device-manager/commit/8a14207b14d7f7fd80d9af711f9ba9eed5c58735))


### Features

* add actions to get last measures on digital twins ([#363](https://github.com/kuzzleio/kuzzle-device-manager/issues/363)) ([b8005a2](https://github.com/kuzzleio/kuzzle-device-manager/commit/b8005a2b2fb0071f2efa2ec3adeff9d965840a0c))
* add search actions for the models ([#362](https://github.com/kuzzleio/kuzzle-device-manager/issues/362)) ([9990e57](https://github.com/kuzzleio/kuzzle-device-manager/commit/9990e57db9bc845d6d6df1e64bed05e88e00f377))
* improve search model request types ([#364](https://github.com/kuzzleio/kuzzle-device-manager/issues/364)) ([5310ad1](https://github.com/kuzzleio/kuzzle-device-manager/commit/5310ad1cf8a46b7bce31e6c26d6454f956574a44))
* **metadata:** add optional editor hints for metadata ([#370](https://github.com/kuzzleio/kuzzle-device-manager/issues/370)) ([afc5129](https://github.com/kuzzleio/kuzzle-device-manager/commit/afc51298eb33515ef5325d806150ac0ebf22b69c))
* **roles:** add specific roles for assets and devices ([#365](https://github.com/kuzzleio/kuzzle-device-manager/issues/365)) ([a01982c](https://github.com/kuzzleio/kuzzle-device-manager/commit/a01982cd025d4436617e710aa407e209f0d4f375))

# [2.4.0-beta.20](https://github.com/kuzzleio/kuzzle-device-manager/compare/v2.4.0-beta.19...v2.4.0-beta.20) (2024-08-12)


Expand Down
88 changes: 88 additions & 0 deletions doc/2/controllers/assets/ingest-measure/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
---
code: true
type: page
title: ingestMeasure
description: Kuzzle IoT Platform - Device Manager - Assets Controller
---

# ingestMeasure

Ingest a single measure into an asset.

---

## Query Syntax

### HTTP

```http
URL: http://kuzzle:7512/_/device-manager/:engineId/assets/:assetId/measures/:slotName
Method: POST
```

### Other protocols

```js
{
"controller": "device-manager/assets",
"action": "measureIngest",
"assetId": "<assetId>",
"engineId": "<engineId>",
"slotName": "<slotName>"
"body": {
"dataSource": {
"id": "<id>",
// optional:
"metadata": {
// ...
}
},
"measuredAt": "<measuredAt>"
"values": {
"<valueName>": "<value>",
// ...
}
},

// optional:
"engineGroup": "<engine group>"
}
```

---

## Arguments

- `engineId`: target engine id
- `assetId`: target asset id
- `slotName`: target measure slot name
- `engineGroup` (optional): target engine group

## Body properties
- `dataSource`: the measure source
- `measuredAt`: the timestamp of when the measure was collected
- `values`: the measure values

# Datasource properties

- `id`: the measure source unique identifier
- `metadata`: (optional) additional metadata for the source

---

## Response

```js
{
"status": 200,
"error": null,
"controller": "device-manager/assets",
"action": "measureIngest",
"requestId": "<unique request identifier>",
"result": null,
}
```

## Errors

Ingesting a measure with incorrect values will throw a [ MeasureValidationError ](../../../errors/measure-validation/index.md) with the HTTP code **400**.
98 changes: 98 additions & 0 deletions doc/2/controllers/assets/ingest-measures/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
---
code: true
type: page
title: ingestMeasures
description: Kuzzle IoT Platform - Device Manager - Assets Controller
---

# ingestMeasures

Ingest measures from a data source into an asset.

---

## Query Syntax

### HTTP

```http
URL: http://kuzzle:7512/_/device-manager/:engineId/assets/:assetId/_mMeasureIngest
Method: POST
```

### Other protocols

```js
{
"controller": "device-manager/assets",
"action": "_mMeasureIngest",
"assetId": "<assetId>",
"engineId": "<engineId>",
"body": {
"dataSource": {
"id": "<id>",
// optional:
"metadata": {
// ...
}
},
"measurements": [
{
"slotName": "<measureName>",
"measuredAt": "<measuredAt>",
"values": {
"<valueName>": "<value>",
// ...
}
}
// ...
]
},

// optional:
"engineGroup": "<engine group>"
}
```

---

## Arguments

- `engineId`: target engine id
- `assetId`: target asset id
- `engineGroup`: (optional): target engine group

## Body properties

- `dataSource`: the measures source
- `measurements`: the list of measurements to ingest

# Datasource properties

- `id`: the measure source unique identifier
- `metadata`: (optional) additional metadata for the source

# Measurement properties

- `slotName`: target measure slot name
- `measuredAt`: the timestamp of when the measure was collected
- `values`: the measure values

---

## Response

```js
{
"status": 200,
"error": null,
"controller": "device-manager/assets",
"action": "mMeasureIngest",
"requestId": "<unique request identifier>",
"result": null,
}
```

## Errors

Ingesting measures with incorrect values will throw a [ MeasureValidationError ](../../../errors/measure-validation/index.md) with the HTTP code **400**.
4 changes: 2 additions & 2 deletions doc/2/controllers/assets/upsert/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ The Upsert operation allows you to create a new asset or update an existing one
### HTTP

```http
URL: http://kuzzle:7512/_/device-manager/:engineId/assets/:_id
Method: POST
URL: http://kuzzle:7512/_/device-manager/:engineId/assets
Method: PUT
```

## Other protocols
Expand Down
4 changes: 2 additions & 2 deletions doc/2/controllers/devices/upsert/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ The Upsert operation allows you to create a new device or update an existing one
### HTTP

```http
URL: http://kuzzle:7512/_/device-manager/:engineId/devices/:_id
Method: POST
URL: http://kuzzle:7512/_/device-manager/:engineId/devices
Method: PUT
```

## Other protocols
Expand Down
2 changes: 1 addition & 1 deletion doc/2/controllers/models/get-asset/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Gets an asset model.
### HTTP

```http
URL: http://kuzzle:7512/_/device-manager/models/asset/:_id
URL: http://kuzzle:7512/_/device-manager/models/asset/:model
Method: GET
```

Expand Down
2 changes: 1 addition & 1 deletion doc/2/controllers/models/get-device/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Gets a device model.
### HTTP

```http
URL: http://kuzzle:7512/_/device-manager/models/device/:id
URL: http://kuzzle:7512/_/device-manager/models/device/:model
Method: GET
```

Expand Down
2 changes: 1 addition & 1 deletion doc/2/controllers/models/get-measure/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Gets a measure model.
### HTTP

```http
URL: http://kuzzle:7512/_/device-manager/models/measure/:_id
URL: http://kuzzle:7512/_/device-manager/models/measure/:type
Method: GET
```

Expand Down
6 changes: 5 additions & 1 deletion doc/2/controllers/models/write-asset/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,4 +160,8 @@ Method: POST

## Errors

Writing an asset with metadata mappings can cause conflicts, in this case a [ MappingsConflictsError ](../../../errors/mappings-conflicts/index.md) will be thrown with the HTTP code **409**.
| error | code | cause |
| ------------------------------------------------------------------------------ | ------- | --------------------------------------------------- |
| [ MappingsConflictsError ](../../../errors/mappings-conflicts/index.md) | **409** | Writing an asset with conflicting metadata mappings |
| [ MeasuresNamesDuplicatesError ](../../../errors/measures-duplicates/index.md) | **400** | Defining a measure name more than once |

5 changes: 5 additions & 0 deletions doc/2/controllers/models/write-measure/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ Method: POST
// Optional
"valuesDetails":{
// Values details and translation
},
// Optional
"validationSchema": {
// Valid JSON Schema
}
}
}
Expand All @@ -46,6 +50,7 @@ Method: POST
- `model`: Measure model name
- `valuesMappings`: Mappings of the measure values in Elasticsearch format
- `valuesDetails`: (optional) Measurement translations and units
- `validationSchema`: (optional) Measurement validation JSON schema

---

Expand Down
2 changes: 1 addition & 1 deletion doc/2/errors/mappings-conflicts/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
code: false
type: page
title: Mappings Conflicts
description: Mappings Conflicts
description: Mappings Conflicts | Kuzzle Documentation
---

# Mappings Conflicts
Expand Down
Loading

0 comments on commit 90b9bfa

Please sign in to comment.