Skip to content

Commit

Permalink
0.213.0
Browse files Browse the repository at this point in the history
  • Loading branch information
wbouvy committed Oct 22, 2024
1 parent a3c0825 commit 34ca6bc
Show file tree
Hide file tree
Showing 45 changed files with 782 additions and 56 deletions.
59 changes: 59 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,64 @@
# Changelog Hiber API

### 0.213 (2024-10-22)

##### AssetService

- Fixed a bug where assets with the same name were allowed in an organization.

##### AssignmentService

- Added `DeleteAssignment` rpc to remove an assignment even if it has a `time_range`.
- Added `remove_time` flag in a new `time` `oneof` to `Unassign` to efffectively do a `DeleteAssignment` command in the `Unassign` command.
- Added `override_conflicting_assignments` to `Assign` to unassign any devices from assets that would conflict with the new assignment.

##### ExportService

- Fixed an issue where CSV exports might fail occasionally.

##### OrganizationService

- Added `ASSETS` and `ASSET_DASHBOARD` organization features.
- Removed unused `BI_TOOLING_BETA` organization feature.

##### TokenService

- Fixed a bug where a token could be created despite failing with a validation error.

##### UserService

- Fixed a bug where user deletion could produce errors.

##### ValueService

- Performance improvements and removed the requirement of setting a time range when selecting values.

### 0.212 (2024-10-08)

##### ValueService

- Added `value_type` to `ByValueType` to select on `Value.Type` (i.e. `Value.Type.TEXT` or `Value.Type.ENUM`)
- Renamed `ByNumericValueType` in `ValueSelection` to `ByValueType` to make it reflect the extra option.
- Renamed `ValueSelection.numeric_value_type` to `value_type` to reflect the extra option.

##### ValueService

- Removed `optional` flag on `DownsampledValues.Request.selection`, since the API actually requires a selection.

##### TokenService

- Added option to limit impersionation (access to child organizations) on a token.

##### DeviceService

- Added `Device.numeric_value_types` to quickly see the primary numeric value types that this device produces.
- The device may produce other values (like battery level), but these are the primary value types.

##### ModemService

- Added `Modem.numeric_value_types` to quickly see the primary numeric value types that this device produces.
- The device may produce other values (like battery level), but these are the primary value types.

### 0.211 (2024-10-01)

##### ValueService
Expand Down
59 changes: 51 additions & 8 deletions assignment.proto
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,12 @@ service AssignmentService {
/* Assign something, like an alarm to a modem. */
rpc Assign (Assign.Request) returns (Assign.Response);

/* Remove an assignment, like an alarm to a modem. */
/* End an assignment, like an alarm to a modem. */
rpc Unassign (Unassign.Request) returns (Unassign.Response);

/* Delete an assignment, even if it has a time range. */
rpc Delete (DeleteAssignment.Request) returns (DeleteAssignment.Response);

/* List assets with the devices and tags they are assigned to. */
rpc AssetAssignments (ListAssetAssignments.Request) returns (ListAssetAssignments.Response);

Expand Down Expand Up @@ -214,6 +217,12 @@ message Assign {
*/
optional Timestamp end_time = 11;

/* Instead of throwing an error when there are conflicting assignments,
* unassign the conflicting assignments with the given time (override_time or now) and
* then making the assignment.
*/
optional bool override_conflicting_assignments = 13;

reserved 3;
}
message Response {
Expand Down Expand Up @@ -241,13 +250,21 @@ message Unassign {
asset.AssetSelection from_assets = 11;
}

/* Time that the assignment ended.
* This marks the assignment as ended at the given moment in the past, but would not have effect in the past
* for assignments like parsers and alarms (i.e. no alarm events are removed).
* It would however work for assets having access to device data.
* This is not allowed to be a value in the future at the moment.
*/
optional Timestamp override_time = 10;
oneof time {
/* Time that the assignment ended.
* This marks the assignment as ended at the given moment in the past, but would not have effect in the past
* for assignments like parsers and alarms (i.e. no alarm events are removed).
* It would however work for assets having access to device data.
* This is not allowed to be a value in the future at the moment.
*/
Timestamp override_time = 10;

/* Remove time from the assignment, if any.
* Effectively deletes the assignment if it was set with a time.
* Setting this to true makes this identical to using the Delete rpc.
*/
bool remove_time = 12;
}

reserved 3;
}
Expand All @@ -257,6 +274,32 @@ message Unassign {
}
}

message DeleteAssignment {
message Request {
/* Pick the organization to use (/impersonate). If unset, your default organization is used. */
optional string organization = 1;

oneof unassign {
modem.message.bodyparser.ModemMessageBodyParserSelection unassign_parsers = 2;
modem.alarm.ModemAlarmSelection unassign_alarms = 4;
modem.ModemSelection unassign_modems = 6;
asset.AssetSelection unassign_assets = 9;
}

oneof from {
modem.ModemSelection from_modems = 5;
tag.TagSelection from_tags = 7;
asset.AssetSelection from_assets = 11;
}

reserved 3;
}
message Response {
repeated Assignment deleted = 1;
Request request = 2;
}
}

message ListAssetAssignments {
message Request {
/* Pick the organization to use (/impersonate). If unset, your default organization is used. */
Expand Down
5 changes: 5 additions & 0 deletions device.proto
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ message Device {
/* The DeviceType for this device. See DeviceType for more information. */
string sensor_brand = 18;

/* The numeric value types that this device produces.
* The device may produce other values (like battery level), but these are the primary value types.
*/
repeated value.Value.Numeric.Type numeric_value_types = 19;

/* Collection of data about the devices it is connected to. */
message Links {
/* Other identifiers for this devices. Could include data like its MAC-address or otherwise unique identifier. */
Expand Down
3 changes: 2 additions & 1 deletion docs/enum-json/organization.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
, "MODEM_CREATION": "Required to manually create modems using the ModemService."
, "EARLY_ACCESS": "Used for organizations that get early access to features."
, "EXPERIMENTAL": "Used for organizations that get access to experimental features. e.g. feature work in progress."
, "BI_TOOLING_BETA": "Integrate BI tooling in the Mission Control interface."
, "ASSETS": "Access the list of assets in Mission Control."
, "ASSET_DASHBOARD": "Use the new assets as primary data owner in Mission Control dashboards."
}
}]
8 changes: 8 additions & 0 deletions docs/html/asset_service.html
Original file line number Diff line number Diff line change
Expand Up @@ -4615,6 +4615,14 @@ <h3 id="hiber.device.Device">Device</h3>
<td><p>The DeviceType for this device. See DeviceType for more information. </p></td>
</tr>

<tr>
<td>numeric_value_types</td>
<td><a href="#hiber.value.Value.Numeric.Type">hiber.value.Value.Numeric.Type</a></td>
<td>repeated</td>
<td><p>The numeric value types that this device produces.
The device may produce other values (like battery level), but these are the primary value types. </p></td>
</tr>

</tbody>
</table>

Expand Down
160 changes: 158 additions & 2 deletions docs/html/assignment.html
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,18 @@ <h2>Table of Contents</h2>
<a href="#hiber.assign.AssignmentSelection.AssignmentTypes"><span class="badge">M</span>AssignmentSelection.AssignmentTypes</a>
</li>

<li>
<a href="#hiber.assign.DeleteAssignment"><span class="badge">M</span>DeleteAssignment</a>
</li>

<li>
<a href="#hiber.assign.DeleteAssignment.Request"><span class="badge">M</span>DeleteAssignment.Request</a>
</li>

<li>
<a href="#hiber.assign.DeleteAssignment.Response"><span class="badge">M</span>DeleteAssignment.Response</a>
</li>

<li>
<a href="#hiber.assign.ListAlarmAssignments"><span class="badge">M</span>ListAlarmAssignments</a>
</li>
Expand Down Expand Up @@ -1348,6 +1360,15 @@ <h3 id="hiber.assign.Assign.Request">Assign.Request</h3>
This is not allowed to be a value in the future at the moment. </p></td>
</tr>

<tr>
<td>override_conflicting_assignments</td>
<td><a href="#bool">bool</a></td>
<td>optional</td>
<td><p>Instead of throwing an error when there are conflicting assignments,
unassign the conflicting assignments with the given time (override_time or now) and
then making the assignment. </p></td>
</tr>

</tbody>
</table>

Expand Down Expand Up @@ -1686,6 +1707,117 @@ <h3 id="hiber.assign.AssignmentSelection.AssignmentTypes">AssignmentSelection.As



<h3 id="hiber.assign.DeleteAssignment">DeleteAssignment</h3>
<p></p>





<h3 id="hiber.assign.DeleteAssignment.Request">DeleteAssignment.Request</h3>
<p></p>


<table class="field-table">
<thead>
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
</thead>
<tbody>

<tr>
<td>organization</td>
<td><a href="#string">string</a></td>
<td>optional</td>
<td><p>Pick the organization to use (/impersonate). If unset, your default organization is used. </p></td>
</tr>

<tr>
<td>unassign_parsers</td>
<td><a href="#hiber.modem.message.bodyparser.ModemMessageBodyParserSelection">hiber.modem.message.bodyparser.ModemMessageBodyParserSelection</a></td>
<td></td>
<td><p> </p></td>
</tr>

<tr>
<td>unassign_alarms</td>
<td><a href="#hiber.modem.alarm.ModemAlarmSelection">hiber.modem.alarm.ModemAlarmSelection</a></td>
<td></td>
<td><p> </p></td>
</tr>

<tr>
<td>unassign_modems</td>
<td><a href="#hiber.modem.ModemSelection">hiber.modem.ModemSelection</a></td>
<td></td>
<td><p> </p></td>
</tr>

<tr>
<td>unassign_assets</td>
<td><a href="#hiber.asset.AssetSelection">hiber.asset.AssetSelection</a></td>
<td></td>
<td><p> </p></td>
</tr>

<tr>
<td>from_modems</td>
<td><a href="#hiber.modem.ModemSelection">hiber.modem.ModemSelection</a></td>
<td></td>
<td><p> </p></td>
</tr>

<tr>
<td>from_tags</td>
<td><a href="#hiber.tag.TagSelection">hiber.tag.TagSelection</a></td>
<td></td>
<td><p> </p></td>
</tr>

<tr>
<td>from_assets</td>
<td><a href="#hiber.asset.AssetSelection">hiber.asset.AssetSelection</a></td>
<td></td>
<td><p> </p></td>
</tr>

</tbody>
</table>





<h3 id="hiber.assign.DeleteAssignment.Response">DeleteAssignment.Response</h3>
<p></p>


<table class="field-table">
<thead>
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
</thead>
<tbody>

<tr>
<td>deleted</td>
<td><a href="#hiber.assign.Assignment">Assignment</a></td>
<td>repeated</td>
<td><p> </p></td>
</tr>

<tr>
<td>request</td>
<td><a href="#hiber.assign.DeleteAssignment.Request">DeleteAssignment.Request</a></td>
<td></td>
<td><p> </p></td>
</tr>

</tbody>
</table>





<h3 id="hiber.assign.ListAlarmAssignments">ListAlarmAssignments</h3>
<p></p>

Expand Down Expand Up @@ -2730,14 +2862,23 @@ <h3 id="hiber.assign.Unassign.Request">Unassign.Request</h3>
<tr>
<td>override_time</td>
<td><a href="#hiber.Timestamp">hiber.Timestamp</a></td>
<td>optional</td>
<td></td>
<td><p>Time that the assignment ended.
This marks the assignment as ended at the given moment in the past, but would not have effect in the past
for assignments like parsers and alarms (i.e. no alarm events are removed).
It would however work for assets having access to device data.
This is not allowed to be a value in the future at the moment. </p></td>
</tr>

<tr>
<td>remove_time</td>
<td><a href="#bool">bool</a></td>
<td></td>
<td><p>Remove time from the assignment, if any.
Effectively deletes the assignment if it was set with a time.
Setting this to true makes this identical to using the Delete rpc. </p></td>
</tr>

</tbody>
</table>

Expand Down Expand Up @@ -2867,7 +3008,14 @@ <h3 id="hiber.assign.AssignmentService">AssignmentService</h3>
<td>Unassign</td>
<td><a href="#hiber.assign.Unassign.Request">Unassign.Request</a></td>
<td><a href="#hiber.assign.Unassign.Response">Unassign.Response</a></td>
<td><p>Remove an assignment, like an alarm to a modem.</p></td>
<td><p>End an assignment, like an alarm to a modem.</p></td>
</tr>

<tr>
<td>Delete</td>
<td><a href="#hiber.assign.DeleteAssignment.Request">DeleteAssignment.Request</a></td>
<td><a href="#hiber.assign.DeleteAssignment.Response">DeleteAssignment.Response</a></td>
<td><p>Delete an assignment, even if it has a time range.</p></td>
</tr>

<tr>
Expand Down Expand Up @@ -6336,6 +6484,14 @@ <h3 id="hiber.modem.Modem">Modem</h3>
<td><p>The expected transmission rate for this modem. </p></td>
</tr>

<tr>
<td>numeric_value_types</td>
<td><a href="#hiber.value.Value.Numeric.Type">hiber.value.Value.Numeric.Type</a></td>
<td>repeated</td>
<td><p>The numeric value types that this device produces.
The device may produce other values (like battery level), but these are the primary value types. </p></td>
</tr>

</tbody>
</table>

Expand Down
Loading

0 comments on commit 34ca6bc

Please sign in to comment.