@m1kad0/hannah-proto 1.0.2 → 2.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/agent.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
2
  import { EnumValues, StateType } from "./shared";
3
+ import { AgentWeatherUpdate } from "./weather";
3
4
  export declare const protobufPackage = "hannah";
4
5
  export declare enum ResidentType {
5
6
  RESIDENT_TYPE_UNSPECIFIED = 0,
@@ -26,6 +27,7 @@ export interface AgentMessage {
26
27
  askResident?: AgentAskResident | undefined;
27
28
  /** full room catalog, independent of devices */
28
29
  sendRooms?: AgentRoomSnapshot | undefined;
30
+ weatherUpdate?: AgentWeatherUpdate | undefined;
29
31
  }
30
32
  /**
31
33
  * Adapter instructs Hannah to control satellites in a room or a specific satellite.
package/dist/agent.js CHANGED
@@ -9,6 +9,7 @@ exports.AgentSensorUpdate = exports.AgentBleUpdate = exports.AgentResidentAnswer
9
9
  /* eslint-disable */
10
10
  const wire_1 = require("@bufbuild/protobuf/wire");
11
11
  const shared_1 = require("./shared");
12
+ const weather_1 = require("./weather");
12
13
  exports.protobufPackage = "hannah";
13
14
  var ResidentType;
14
15
  (function (ResidentType) {
@@ -28,6 +29,7 @@ function createBaseAgentMessage() {
28
29
  sendResidents: undefined,
29
30
  askResident: undefined,
30
31
  sendRooms: undefined,
32
+ weatherUpdate: undefined,
31
33
  };
32
34
  }
33
35
  exports.AgentMessage = {
@@ -56,6 +58,9 @@ exports.AgentMessage = {
56
58
  if (message.sendRooms !== undefined) {
57
59
  exports.AgentRoomSnapshot.encode(message.sendRooms, writer.uint32(66).fork()).join();
58
60
  }
61
+ if (message.weatherUpdate !== undefined) {
62
+ weather_1.AgentWeatherUpdate.encode(message.weatherUpdate, writer.uint32(74).fork()).join();
63
+ }
59
64
  return writer;
60
65
  },
61
66
  decode(input, length) {
@@ -121,6 +126,13 @@ exports.AgentMessage = {
121
126
  message.sendRooms = exports.AgentRoomSnapshot.decode(reader, reader.uint32());
122
127
  continue;
123
128
  }
129
+ case 9: {
130
+ if (tag !== 74) {
131
+ break;
132
+ }
133
+ message.weatherUpdate = weather_1.AgentWeatherUpdate.decode(reader, reader.uint32());
134
+ continue;
135
+ }
124
136
  }
125
137
  if ((tag & 7) === 4 || tag === 0) {
126
138
  break;
@@ -158,6 +170,9 @@ exports.AgentMessage = {
158
170
  message.sendRooms = (object.sendRooms !== undefined && object.sendRooms !== null)
159
171
  ? exports.AgentRoomSnapshot.fromPartial(object.sendRooms)
160
172
  : undefined;
173
+ message.weatherUpdate = (object.weatherUpdate !== undefined && object.weatherUpdate !== null)
174
+ ? weather_1.AgentWeatherUpdate.fromPartial(object.weatherUpdate)
175
+ : undefined;
161
176
  return message;
162
177
  },
163
178
  };
package/dist/control.d.ts CHANGED
@@ -117,10 +117,24 @@ export interface Room {
117
117
  export interface GetRoomsResponse {
118
118
  rooms: Room[];
119
119
  }
120
+ /**
121
+ * GroupSatellite ist eine schlanke DTO-Projektion (device_id/display_name/room_id),
122
+ * bewusst nicht die volle Satellite-Message: die trägt Live-Verbindungsstatus, den
123
+ * GetGroups nicht braucht und der Server nicht ohne live verbundene Satelliten
124
+ * befüllen kann. Analog zu Room{room_id, display_name} vor #56/hannah-proto#7.
125
+ */
126
+ export interface GroupSatellite {
127
+ deviceId: string;
128
+ /** "" falls nicht provisioniert */
129
+ displayName: string;
130
+ /** "" falls unzugewiesen — Anzeige-Kontext fürs Admin-UI */
131
+ roomId: string;
132
+ }
120
133
  export interface Group {
121
134
  groupId: string;
122
135
  displayName: string;
123
- rooms: Room[];
136
+ /** #56/hannah-proto#7: war "repeated Room rooms" — Gruppen referenzieren Satelliten direkt statt Räume */
137
+ satellites: GroupSatellite[];
124
138
  }
125
139
  export interface GetGroupsResponse {
126
140
  groups: Group[];
@@ -136,9 +150,9 @@ export interface UpdateGroupRequest {
136
150
  export interface DeleteGroupRequest {
137
151
  groupId: string;
138
152
  }
139
- export interface SetGroupRoomsRequest {
153
+ export interface SetGroupSatellitesRequest {
140
154
  groupId: string;
141
- roomIds: string[];
155
+ deviceIds: string[];
142
156
  }
143
157
  export interface Trigger {
144
158
  /** client-assigned slug, e.g. "aussentuer_abend" */
@@ -336,12 +350,13 @@ export declare const SetSatelliteSmalltalkFollowupRequest: MessageFns<SetSatelli
336
350
  export declare const DeleteSatelliteRequest: MessageFns<DeleteSatelliteRequest>;
337
351
  export declare const Room: MessageFns<Room>;
338
352
  export declare const GetRoomsResponse: MessageFns<GetRoomsResponse>;
353
+ export declare const GroupSatellite: MessageFns<GroupSatellite>;
339
354
  export declare const Group: MessageFns<Group>;
340
355
  export declare const GetGroupsResponse: MessageFns<GetGroupsResponse>;
341
356
  export declare const CreateGroupRequest: MessageFns<CreateGroupRequest>;
342
357
  export declare const UpdateGroupRequest: MessageFns<UpdateGroupRequest>;
343
358
  export declare const DeleteGroupRequest: MessageFns<DeleteGroupRequest>;
344
- export declare const SetGroupRoomsRequest: MessageFns<SetGroupRoomsRequest>;
359
+ export declare const SetGroupSatellitesRequest: MessageFns<SetGroupSatellitesRequest>;
345
360
  export declare const Trigger: MessageFns<Trigger>;
346
361
  export declare const GetTriggersResponse: MessageFns<GetTriggersResponse>;
347
362
  export declare const CreateTriggerRequest: MessageFns<CreateTriggerRequest>;
package/dist/control.js CHANGED
@@ -5,7 +5,7 @@
5
5
  // protoc unknown
6
6
  // source: control.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.DeleteCarRequest = exports.UpdateCarRequest = exports.CreateCarResponse = exports.CreateCarRequest = exports.GetCarsResponse = exports.Car = exports.DeleteBleTagRequest = exports.UpdateBleTagRequest = exports.CreateBleTagResponse = exports.CreateBleTagRequest = exports.GetBleTagsResponse = exports.BleTag = exports.UpdateConfigRequest = exports.SettingUpdate = exports.GetSettingsResponse = exports.Setting = exports.Category = exports.DeleteAlarmRequest = exports.UpdateAlarmRequest = exports.CreateAlarmResponse = exports.CreateAlarmRequest = exports.GetAlarmsResponse = exports.Alarm = exports.DeleteTriggerRequest = exports.UpdateTriggerRequest = exports.CreateTriggerRequest = exports.GetTriggersResponse = exports.Trigger = exports.SetGroupRoomsRequest = exports.DeleteGroupRequest = exports.UpdateGroupRequest = exports.CreateGroupRequest = exports.GetGroupsResponse = exports.Group = exports.GetRoomsResponse = exports.Room = exports.DeleteSatelliteRequest = exports.SetSatelliteSmalltalkFollowupRequest = exports.SetSatelliteOwnerRequest = exports.SetSatelliteDisplayNameRequest = exports.SetSatelliteRoomRequest = exports.GetSatellitesResponse = exports.Satellite = exports.AnnounceRequest = exports.SubmitVoiceResponse = exports.SubmitVoiceRequest = exports.SubmitTextResponse = exports.SubmitTextRequest = exports.protobufPackage = void 0;
8
+ exports.DeleteCarRequest = exports.UpdateCarRequest = exports.CreateCarResponse = exports.CreateCarRequest = exports.GetCarsResponse = exports.Car = exports.DeleteBleTagRequest = exports.UpdateBleTagRequest = exports.CreateBleTagResponse = exports.CreateBleTagRequest = exports.GetBleTagsResponse = exports.BleTag = exports.UpdateConfigRequest = exports.SettingUpdate = exports.GetSettingsResponse = exports.Setting = exports.Category = exports.DeleteAlarmRequest = exports.UpdateAlarmRequest = exports.CreateAlarmResponse = exports.CreateAlarmRequest = exports.GetAlarmsResponse = exports.Alarm = exports.DeleteTriggerRequest = exports.UpdateTriggerRequest = exports.CreateTriggerRequest = exports.GetTriggersResponse = exports.Trigger = exports.SetGroupSatellitesRequest = exports.DeleteGroupRequest = exports.UpdateGroupRequest = exports.CreateGroupRequest = exports.GetGroupsResponse = exports.Group = exports.GroupSatellite = exports.GetRoomsResponse = exports.Room = exports.DeleteSatelliteRequest = exports.SetSatelliteSmalltalkFollowupRequest = exports.SetSatelliteOwnerRequest = exports.SetSatelliteDisplayNameRequest = exports.SetSatelliteRoomRequest = exports.GetSatellitesResponse = exports.Satellite = exports.AnnounceRequest = exports.SubmitVoiceResponse = exports.SubmitVoiceRequest = exports.SubmitTextResponse = exports.SubmitTextRequest = exports.protobufPackage = void 0;
9
9
  /* eslint-disable */
10
10
  const wire_1 = require("@bufbuild/protobuf/wire");
11
11
  exports.protobufPackage = "hannah";
@@ -984,8 +984,71 @@ exports.GetRoomsResponse = {
984
984
  return message;
985
985
  },
986
986
  };
987
+ function createBaseGroupSatellite() {
988
+ return { deviceId: "", displayName: "", roomId: "" };
989
+ }
990
+ exports.GroupSatellite = {
991
+ encode(message, writer = new wire_1.BinaryWriter()) {
992
+ if (message.deviceId !== "") {
993
+ writer.uint32(10).string(message.deviceId);
994
+ }
995
+ if (message.displayName !== "") {
996
+ writer.uint32(18).string(message.displayName);
997
+ }
998
+ if (message.roomId !== "") {
999
+ writer.uint32(26).string(message.roomId);
1000
+ }
1001
+ return writer;
1002
+ },
1003
+ decode(input, length) {
1004
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1005
+ const end = length === undefined ? reader.len : reader.pos + length;
1006
+ const message = createBaseGroupSatellite();
1007
+ while (reader.pos < end) {
1008
+ const tag = reader.uint32();
1009
+ switch (tag >>> 3) {
1010
+ case 1: {
1011
+ if (tag !== 10) {
1012
+ break;
1013
+ }
1014
+ message.deviceId = reader.string();
1015
+ continue;
1016
+ }
1017
+ case 2: {
1018
+ if (tag !== 18) {
1019
+ break;
1020
+ }
1021
+ message.displayName = reader.string();
1022
+ continue;
1023
+ }
1024
+ case 3: {
1025
+ if (tag !== 26) {
1026
+ break;
1027
+ }
1028
+ message.roomId = reader.string();
1029
+ continue;
1030
+ }
1031
+ }
1032
+ if ((tag & 7) === 4 || tag === 0) {
1033
+ break;
1034
+ }
1035
+ reader.skip(tag & 7);
1036
+ }
1037
+ return message;
1038
+ },
1039
+ create(base) {
1040
+ return exports.GroupSatellite.fromPartial(base ?? {});
1041
+ },
1042
+ fromPartial(object) {
1043
+ const message = createBaseGroupSatellite();
1044
+ message.deviceId = object.deviceId ?? "";
1045
+ message.displayName = object.displayName ?? "";
1046
+ message.roomId = object.roomId ?? "";
1047
+ return message;
1048
+ },
1049
+ };
987
1050
  function createBaseGroup() {
988
- return { groupId: "", displayName: "", rooms: [] };
1051
+ return { groupId: "", displayName: "", satellites: [] };
989
1052
  }
990
1053
  exports.Group = {
991
1054
  encode(message, writer = new wire_1.BinaryWriter()) {
@@ -995,8 +1058,8 @@ exports.Group = {
995
1058
  if (message.displayName !== "") {
996
1059
  writer.uint32(18).string(message.displayName);
997
1060
  }
998
- for (const v of message.rooms) {
999
- exports.Room.encode(v, writer.uint32(26).fork()).join();
1061
+ for (const v of message.satellites) {
1062
+ exports.GroupSatellite.encode(v, writer.uint32(26).fork()).join();
1000
1063
  }
1001
1064
  return writer;
1002
1065
  },
@@ -1025,7 +1088,7 @@ exports.Group = {
1025
1088
  if (tag !== 26) {
1026
1089
  break;
1027
1090
  }
1028
- message.rooms.push(exports.Room.decode(reader, reader.uint32()));
1091
+ message.satellites.push(exports.GroupSatellite.decode(reader, reader.uint32()));
1029
1092
  continue;
1030
1093
  }
1031
1094
  }
@@ -1043,7 +1106,7 @@ exports.Group = {
1043
1106
  const message = createBaseGroup();
1044
1107
  message.groupId = object.groupId ?? "";
1045
1108
  message.displayName = object.displayName ?? "";
1046
- message.rooms = object.rooms?.map((e) => exports.Room.fromPartial(e)) || [];
1109
+ message.satellites = object.satellites?.map((e) => exports.GroupSatellite.fromPartial(e)) || [];
1047
1110
  return message;
1048
1111
  },
1049
1112
  };
@@ -1233,15 +1296,15 @@ exports.DeleteGroupRequest = {
1233
1296
  return message;
1234
1297
  },
1235
1298
  };
1236
- function createBaseSetGroupRoomsRequest() {
1237
- return { groupId: "", roomIds: [] };
1299
+ function createBaseSetGroupSatellitesRequest() {
1300
+ return { groupId: "", deviceIds: [] };
1238
1301
  }
1239
- exports.SetGroupRoomsRequest = {
1302
+ exports.SetGroupSatellitesRequest = {
1240
1303
  encode(message, writer = new wire_1.BinaryWriter()) {
1241
1304
  if (message.groupId !== "") {
1242
1305
  writer.uint32(10).string(message.groupId);
1243
1306
  }
1244
- for (const v of message.roomIds) {
1307
+ for (const v of message.deviceIds) {
1245
1308
  writer.uint32(18).string(v);
1246
1309
  }
1247
1310
  return writer;
@@ -1249,7 +1312,7 @@ exports.SetGroupRoomsRequest = {
1249
1312
  decode(input, length) {
1250
1313
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1251
1314
  const end = length === undefined ? reader.len : reader.pos + length;
1252
- const message = createBaseSetGroupRoomsRequest();
1315
+ const message = createBaseSetGroupSatellitesRequest();
1253
1316
  while (reader.pos < end) {
1254
1317
  const tag = reader.uint32();
1255
1318
  switch (tag >>> 3) {
@@ -1264,7 +1327,7 @@ exports.SetGroupRoomsRequest = {
1264
1327
  if (tag !== 18) {
1265
1328
  break;
1266
1329
  }
1267
- message.roomIds.push(reader.string());
1330
+ message.deviceIds.push(reader.string());
1268
1331
  continue;
1269
1332
  }
1270
1333
  }
@@ -1276,12 +1339,12 @@ exports.SetGroupRoomsRequest = {
1276
1339
  return message;
1277
1340
  },
1278
1341
  create(base) {
1279
- return exports.SetGroupRoomsRequest.fromPartial(base ?? {});
1342
+ return exports.SetGroupSatellitesRequest.fromPartial(base ?? {});
1280
1343
  },
1281
1344
  fromPartial(object) {
1282
- const message = createBaseSetGroupRoomsRequest();
1345
+ const message = createBaseSetGroupSatellitesRequest();
1283
1346
  message.groupId = object.groupId ?? "";
1284
- message.roomIds = object.roomIds?.map((e) => e) || [];
1347
+ message.deviceIds = object.deviceIds?.map((e) => e) || [];
1285
1348
  return message;
1286
1349
  },
1287
1350
  };
package/dist/hannah.d.ts CHANGED
@@ -2,7 +2,7 @@ import { type CallOptions, type ChannelCredentials, Client, type ClientDuplexStr
2
2
  import { AgentCommand, AgentMessage, AgentNotification } from "./agent";
3
3
  import { AutomationCommand, AutomationMessage } from "./automation";
4
4
  import { CarStateResponse, GetAllCarStatesResponse } from "./car_state";
5
- import { AnnounceRequest, CreateAlarmRequest, CreateAlarmResponse, CreateBleTagRequest, CreateBleTagResponse, CreateCarRequest, CreateCarResponse, CreateGroupRequest, CreateTriggerRequest, DeleteAlarmRequest, DeleteBleTagRequest, DeleteCarRequest, DeleteGroupRequest, DeleteSatelliteRequest, DeleteTriggerRequest, GetAlarmsResponse, GetBleTagsResponse, GetCarsResponse, GetGroupsResponse, GetRoomsResponse, GetSatellitesResponse, GetSettingsResponse, GetTriggersResponse, SetGroupRoomsRequest, SetSatelliteDisplayNameRequest, SetSatelliteOwnerRequest, SetSatelliteRoomRequest, SetSatelliteSmalltalkFollowupRequest, SubmitTextRequest, SubmitTextResponse, SubmitVoiceRequest, SubmitVoiceResponse, UpdateAlarmRequest, UpdateBleTagRequest, UpdateCarRequest, UpdateConfigRequest, UpdateGroupRequest, UpdateTriggerRequest } from "./control";
5
+ import { AnnounceRequest, CreateAlarmRequest, CreateAlarmResponse, CreateBleTagRequest, CreateBleTagResponse, CreateCarRequest, CreateCarResponse, CreateGroupRequest, CreateTriggerRequest, DeleteAlarmRequest, DeleteBleTagRequest, DeleteCarRequest, DeleteGroupRequest, DeleteSatelliteRequest, DeleteTriggerRequest, GetAlarmsResponse, GetBleTagsResponse, GetCarsResponse, GetGroupsResponse, GetRoomsResponse, GetSatellitesResponse, GetSettingsResponse, GetTriggersResponse, SetGroupSatellitesRequest, SetSatelliteDisplayNameRequest, SetSatelliteOwnerRequest, SetSatelliteRoomRequest, SetSatelliteSmalltalkFollowupRequest, SubmitTextRequest, SubmitTextResponse, SubmitVoiceRequest, SubmitVoiceResponse, UpdateAlarmRequest, UpdateBleTagRequest, UpdateCarRequest, UpdateConfigRequest, UpdateGroupRequest, UpdateTriggerRequest } from "./control";
6
6
  import { ControlDeviceRequest, GetDevicesResponse } from "./device_control_menu";
7
7
  import { EventFilter, HannahEvent, TriggerFirmwareUpdateRequest, TriggerSatelliteRestartRequest } from "./event_stream";
8
8
  import { ProvisionSatelliteRequest } from "./satellite_provisioning";
@@ -308,12 +308,12 @@ export declare const HannahServiceService: {
308
308
  readonly responseSerialize: (value: StatusResponse) => Buffer;
309
309
  readonly responseDeserialize: (value: Buffer) => StatusResponse;
310
310
  };
311
- readonly setGroupRooms: {
312
- readonly path: "/hannah.HannahService/SetGroupRooms";
311
+ readonly setGroupSatellites: {
312
+ readonly path: "/hannah.HannahService/SetGroupSatellites";
313
313
  readonly requestStream: false;
314
314
  readonly responseStream: false;
315
- readonly requestSerialize: (value: SetGroupRoomsRequest) => Buffer;
316
- readonly requestDeserialize: (value: Buffer) => SetGroupRoomsRequest;
315
+ readonly requestSerialize: (value: SetGroupSatellitesRequest) => Buffer;
316
+ readonly requestDeserialize: (value: Buffer) => SetGroupSatellitesRequest;
317
317
  readonly responseSerialize: (value: StatusResponse) => Buffer;
318
318
  readonly responseDeserialize: (value: Buffer) => StatusResponse;
319
319
  };
@@ -811,7 +811,7 @@ export interface HannahServiceServer extends UntypedServiceImplementation {
811
811
  createGroup: handleUnaryCall<CreateGroupRequest, StatusResponse>;
812
812
  updateGroup: handleUnaryCall<UpdateGroupRequest, StatusResponse>;
813
813
  deleteGroup: handleUnaryCall<DeleteGroupRequest, StatusResponse>;
814
- setGroupRooms: handleUnaryCall<SetGroupRoomsRequest, StatusResponse>;
814
+ setGroupSatellites: handleUnaryCall<SetGroupSatellitesRequest, StatusResponse>;
815
815
  /** --- Triggers (Admin-UI, #28) --- */
816
816
  getTriggers: handleUnaryCall<Empty, GetTriggersResponse>;
817
817
  createTrigger: handleUnaryCall<CreateTriggerRequest, StatusResponse>;
@@ -1060,9 +1060,9 @@ export interface HannahServiceClient extends Client {
1060
1060
  deleteGroup(request: DeleteGroupRequest, callback: (error: ServiceError | null, response: StatusResponse) => void): ClientUnaryCall;
1061
1061
  deleteGroup(request: DeleteGroupRequest, metadata: Metadata, callback: (error: ServiceError | null, response: StatusResponse) => void): ClientUnaryCall;
1062
1062
  deleteGroup(request: DeleteGroupRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: StatusResponse) => void): ClientUnaryCall;
1063
- setGroupRooms(request: SetGroupRoomsRequest, callback: (error: ServiceError | null, response: StatusResponse) => void): ClientUnaryCall;
1064
- setGroupRooms(request: SetGroupRoomsRequest, metadata: Metadata, callback: (error: ServiceError | null, response: StatusResponse) => void): ClientUnaryCall;
1065
- setGroupRooms(request: SetGroupRoomsRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: StatusResponse) => void): ClientUnaryCall;
1063
+ setGroupSatellites(request: SetGroupSatellitesRequest, callback: (error: ServiceError | null, response: StatusResponse) => void): ClientUnaryCall;
1064
+ setGroupSatellites(request: SetGroupSatellitesRequest, metadata: Metadata, callback: (error: ServiceError | null, response: StatusResponse) => void): ClientUnaryCall;
1065
+ setGroupSatellites(request: SetGroupSatellitesRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: StatusResponse) => void): ClientUnaryCall;
1066
1066
  /** --- Triggers (Admin-UI, #28) --- */
1067
1067
  getTriggers(request: Empty, callback: (error: ServiceError | null, response: GetTriggersResponse) => void): ClientUnaryCall;
1068
1068
  getTriggers(request: Empty, metadata: Metadata, callback: (error: ServiceError | null, response: GetTriggersResponse) => void): ClientUnaryCall;
package/dist/hannah.js CHANGED
@@ -316,12 +316,12 @@ exports.HannahServiceService = {
316
316
  responseSerialize: (value) => Buffer.from(shared_1.StatusResponse.encode(value).finish()),
317
317
  responseDeserialize: (value) => shared_1.StatusResponse.decode(value),
318
318
  },
319
- setGroupRooms: {
320
- path: "/hannah.HannahService/SetGroupRooms",
319
+ setGroupSatellites: {
320
+ path: "/hannah.HannahService/SetGroupSatellites",
321
321
  requestStream: false,
322
322
  responseStream: false,
323
- requestSerialize: (value) => Buffer.from(control_1.SetGroupRoomsRequest.encode(value).finish()),
324
- requestDeserialize: (value) => control_1.SetGroupRoomsRequest.decode(value),
323
+ requestSerialize: (value) => Buffer.from(control_1.SetGroupSatellitesRequest.encode(value).finish()),
324
+ requestDeserialize: (value) => control_1.SetGroupSatellitesRequest.decode(value),
325
325
  responseSerialize: (value) => Buffer.from(shared_1.StatusResponse.encode(value).finish()),
326
326
  responseDeserialize: (value) => shared_1.StatusResponse.decode(value),
327
327
  },
package/dist/index.d.ts CHANGED
@@ -14,3 +14,4 @@ export * as timer_admin from './timer_admin';
14
14
  export * as timer_service from './timer_service';
15
15
  export * as user_registry from './user_registry';
16
16
  export * as wakeword_capture from './wakeword_capture';
17
+ export * as weather from './weather';
package/dist/index.js CHANGED
@@ -36,7 +36,7 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  };
37
37
  })();
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.wakeword_capture = exports.user_registry = exports.timer_service = exports.timer_admin = exports.speaker_enrollment = exports.shared = exports.satellite_proxy = exports.satellite_provisioning = exports.hannah = exports.event_stream = exports.device_control_menu = exports.control = exports.car_state = exports.automation = exports.agent = void 0;
39
+ exports.weather = exports.wakeword_capture = exports.user_registry = exports.timer_service = exports.timer_admin = exports.speaker_enrollment = exports.shared = exports.satellite_proxy = exports.satellite_provisioning = exports.hannah = exports.event_stream = exports.device_control_menu = exports.control = exports.car_state = exports.automation = exports.agent = void 0;
40
40
  __exportStar(require("./version"), exports);
41
41
  exports.agent = __importStar(require("./agent"));
42
42
  exports.automation = __importStar(require("./automation"));
@@ -53,3 +53,4 @@ exports.timer_admin = __importStar(require("./timer_admin"));
53
53
  exports.timer_service = __importStar(require("./timer_service"));
54
54
  exports.user_registry = __importStar(require("./user_registry"));
55
55
  exports.wakeword_capture = __importStar(require("./wakeword_capture"));
56
+ exports.weather = __importStar(require("./weather"));
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const PROTO_VERSION = 4;
1
+ export declare const PROTO_VERSION = 5;
package/dist/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PROTO_VERSION = void 0;
4
- exports.PROTO_VERSION = 4;
4
+ exports.PROTO_VERSION = 5;
@@ -0,0 +1,81 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ export declare const protobufPackage = "hannah";
3
+ /**
4
+ * Current weather conditions, discovered by the ioBroker adapter from a configured
5
+ * weather source and pushed via AgentMessage.weather_update. Field set is deliberately
6
+ * narrow: only what core/hannah/weather.py's spoken answers actually use today, plus
7
+ * humidity (cheap addition). Deliberately excluded from v1 (cheap to add later, not
8
+ * currently used by any sentence): pressure, clouds, wind_gust, visibility, sunrise/sunset.
9
+ */
10
+ export interface WeatherCurrentData {
11
+ /** °C; role value.temperature */
12
+ temperature: number;
13
+ /** % relative humidity; role value.humidity */
14
+ humidity?: number | undefined;
15
+ /** short label e.g. "Rain"; role weather.title */
16
+ conditionSummary: string;
17
+ /** longer description; role weather.state */
18
+ conditionDetail: string;
19
+ /** role weather.precipitation.rain (fallback: weather.precipitation) */
20
+ precipitationMm?: number | undefined;
21
+ /** role value.speed.wind */
22
+ windSpeedMs?: number | undefined;
23
+ /** numeric variant of role value.direction.wind */
24
+ windDirectionDeg?: number | undefined;
25
+ /** string variant of the SAME role (disambiguate via common.type) */
26
+ windDirectionText?: string | undefined;
27
+ /** Unix timestamp of the source reading; role date (unit unverified live) */
28
+ observedAt: bigint;
29
+ }
30
+ /**
31
+ * One forecast day. day_offset 0=today .. 5=five days out, matching ioBroker's dayN
32
+ * channel suffix. Only day-granularity — openweathermap's 3-hourly periodN states
33
+ * (buggy role suffix weather.forecast.undefined) are explicitly out of scope.
34
+ */
35
+ export interface WeatherForecastDay {
36
+ dayOffset: number;
37
+ /** role value.temperature.min */
38
+ temperatureMin?: number | undefined;
39
+ /** role value.temperature.max */
40
+ temperatureMax?: number | undefined;
41
+ /** role weather.title */
42
+ conditionSummary: string;
43
+ /** role weather.state */
44
+ conditionDetail: string;
45
+ /** role weather.precipitation.rain */
46
+ precipitationMm?: number | undefined;
47
+ /** role value.speed.wind */
48
+ windSpeedMs?: number | undefined;
49
+ /** role value.direction.wind (string variant) */
50
+ windDirectionText?: string | undefined;
51
+ }
52
+ /**
53
+ * Sent by the ioBroker adapter whenever its configured weather source changes.
54
+ * Full aggregated state, not a delta — Core replaces its cache wholesale on each message.
55
+ * current is absent until at least one value resolved; forecast is empty in "custom"
56
+ * mapping mode (current-conditions only, v1 scope).
57
+ */
58
+ export interface AgentWeatherUpdate {
59
+ current?: WeatherCurrentData | undefined;
60
+ forecast: WeatherForecastDay[];
61
+ }
62
+ export declare const WeatherCurrentData: MessageFns<WeatherCurrentData>;
63
+ export declare const WeatherForecastDay: MessageFns<WeatherForecastDay>;
64
+ export declare const AgentWeatherUpdate: MessageFns<AgentWeatherUpdate>;
65
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
66
+ export type DeepPartial<T> = T extends bigint ? string | number | bigint : T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
67
+ [K in keyof T]?: DeepPartial<T[K]>;
68
+ } : Partial<T>;
69
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
70
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
71
+ [K in keyof P]: Exact<P[K], I[K]>;
72
+ } & {
73
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
74
+ };
75
+ export interface MessageFns<T> {
76
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
77
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
78
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
79
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
80
+ }
81
+ export {};
@@ -0,0 +1,336 @@
1
+ "use strict";
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v2.12.0
5
+ // protoc unknown
6
+ // source: weather.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.AgentWeatherUpdate = exports.WeatherForecastDay = exports.WeatherCurrentData = exports.protobufPackage = void 0;
9
+ /* eslint-disable */
10
+ const wire_1 = require("@bufbuild/protobuf/wire");
11
+ exports.protobufPackage = "hannah";
12
+ function createBaseWeatherCurrentData() {
13
+ return {
14
+ temperature: 0,
15
+ humidity: undefined,
16
+ conditionSummary: "",
17
+ conditionDetail: "",
18
+ precipitationMm: undefined,
19
+ windSpeedMs: undefined,
20
+ windDirectionDeg: undefined,
21
+ windDirectionText: undefined,
22
+ observedAt: 0n,
23
+ };
24
+ }
25
+ exports.WeatherCurrentData = {
26
+ encode(message, writer = new wire_1.BinaryWriter()) {
27
+ if (message.temperature !== 0) {
28
+ writer.uint32(13).float(message.temperature);
29
+ }
30
+ if (message.humidity !== undefined) {
31
+ writer.uint32(21).float(message.humidity);
32
+ }
33
+ if (message.conditionSummary !== "") {
34
+ writer.uint32(26).string(message.conditionSummary);
35
+ }
36
+ if (message.conditionDetail !== "") {
37
+ writer.uint32(34).string(message.conditionDetail);
38
+ }
39
+ if (message.precipitationMm !== undefined) {
40
+ writer.uint32(45).float(message.precipitationMm);
41
+ }
42
+ if (message.windSpeedMs !== undefined) {
43
+ writer.uint32(53).float(message.windSpeedMs);
44
+ }
45
+ if (message.windDirectionDeg !== undefined) {
46
+ writer.uint32(56).int32(message.windDirectionDeg);
47
+ }
48
+ if (message.windDirectionText !== undefined) {
49
+ writer.uint32(66).string(message.windDirectionText);
50
+ }
51
+ if (message.observedAt !== 0n) {
52
+ if (BigInt.asIntN(64, message.observedAt) !== message.observedAt) {
53
+ throw new globalThis.Error("value provided for field message.observedAt of type int64 too large");
54
+ }
55
+ writer.uint32(72).int64(message.observedAt);
56
+ }
57
+ return writer;
58
+ },
59
+ decode(input, length) {
60
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
61
+ const end = length === undefined ? reader.len : reader.pos + length;
62
+ const message = createBaseWeatherCurrentData();
63
+ while (reader.pos < end) {
64
+ const tag = reader.uint32();
65
+ switch (tag >>> 3) {
66
+ case 1: {
67
+ if (tag !== 13) {
68
+ break;
69
+ }
70
+ message.temperature = reader.float();
71
+ continue;
72
+ }
73
+ case 2: {
74
+ if (tag !== 21) {
75
+ break;
76
+ }
77
+ message.humidity = reader.float();
78
+ continue;
79
+ }
80
+ case 3: {
81
+ if (tag !== 26) {
82
+ break;
83
+ }
84
+ message.conditionSummary = reader.string();
85
+ continue;
86
+ }
87
+ case 4: {
88
+ if (tag !== 34) {
89
+ break;
90
+ }
91
+ message.conditionDetail = reader.string();
92
+ continue;
93
+ }
94
+ case 5: {
95
+ if (tag !== 45) {
96
+ break;
97
+ }
98
+ message.precipitationMm = reader.float();
99
+ continue;
100
+ }
101
+ case 6: {
102
+ if (tag !== 53) {
103
+ break;
104
+ }
105
+ message.windSpeedMs = reader.float();
106
+ continue;
107
+ }
108
+ case 7: {
109
+ if (tag !== 56) {
110
+ break;
111
+ }
112
+ message.windDirectionDeg = reader.int32();
113
+ continue;
114
+ }
115
+ case 8: {
116
+ if (tag !== 66) {
117
+ break;
118
+ }
119
+ message.windDirectionText = reader.string();
120
+ continue;
121
+ }
122
+ case 9: {
123
+ if (tag !== 72) {
124
+ break;
125
+ }
126
+ message.observedAt = reader.int64();
127
+ continue;
128
+ }
129
+ }
130
+ if ((tag & 7) === 4 || tag === 0) {
131
+ break;
132
+ }
133
+ reader.skip(tag & 7);
134
+ }
135
+ return message;
136
+ },
137
+ create(base) {
138
+ return exports.WeatherCurrentData.fromPartial(base ?? {});
139
+ },
140
+ fromPartial(object) {
141
+ const message = createBaseWeatherCurrentData();
142
+ message.temperature = object.temperature ?? 0;
143
+ message.humidity = object.humidity ?? undefined;
144
+ message.conditionSummary = object.conditionSummary ?? "";
145
+ message.conditionDetail = object.conditionDetail ?? "";
146
+ message.precipitationMm = object.precipitationMm ?? undefined;
147
+ message.windSpeedMs = object.windSpeedMs ?? undefined;
148
+ message.windDirectionDeg = object.windDirectionDeg ?? undefined;
149
+ message.windDirectionText = object.windDirectionText ?? undefined;
150
+ message.observedAt = (object.observedAt !== undefined && object.observedAt !== null)
151
+ ? BigInt(object.observedAt)
152
+ : 0n;
153
+ return message;
154
+ },
155
+ };
156
+ function createBaseWeatherForecastDay() {
157
+ return {
158
+ dayOffset: 0,
159
+ temperatureMin: undefined,
160
+ temperatureMax: undefined,
161
+ conditionSummary: "",
162
+ conditionDetail: "",
163
+ precipitationMm: undefined,
164
+ windSpeedMs: undefined,
165
+ windDirectionText: undefined,
166
+ };
167
+ }
168
+ exports.WeatherForecastDay = {
169
+ encode(message, writer = new wire_1.BinaryWriter()) {
170
+ if (message.dayOffset !== 0) {
171
+ writer.uint32(8).int32(message.dayOffset);
172
+ }
173
+ if (message.temperatureMin !== undefined) {
174
+ writer.uint32(21).float(message.temperatureMin);
175
+ }
176
+ if (message.temperatureMax !== undefined) {
177
+ writer.uint32(29).float(message.temperatureMax);
178
+ }
179
+ if (message.conditionSummary !== "") {
180
+ writer.uint32(34).string(message.conditionSummary);
181
+ }
182
+ if (message.conditionDetail !== "") {
183
+ writer.uint32(42).string(message.conditionDetail);
184
+ }
185
+ if (message.precipitationMm !== undefined) {
186
+ writer.uint32(53).float(message.precipitationMm);
187
+ }
188
+ if (message.windSpeedMs !== undefined) {
189
+ writer.uint32(61).float(message.windSpeedMs);
190
+ }
191
+ if (message.windDirectionText !== undefined) {
192
+ writer.uint32(66).string(message.windDirectionText);
193
+ }
194
+ return writer;
195
+ },
196
+ decode(input, length) {
197
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
198
+ const end = length === undefined ? reader.len : reader.pos + length;
199
+ const message = createBaseWeatherForecastDay();
200
+ while (reader.pos < end) {
201
+ const tag = reader.uint32();
202
+ switch (tag >>> 3) {
203
+ case 1: {
204
+ if (tag !== 8) {
205
+ break;
206
+ }
207
+ message.dayOffset = reader.int32();
208
+ continue;
209
+ }
210
+ case 2: {
211
+ if (tag !== 21) {
212
+ break;
213
+ }
214
+ message.temperatureMin = reader.float();
215
+ continue;
216
+ }
217
+ case 3: {
218
+ if (tag !== 29) {
219
+ break;
220
+ }
221
+ message.temperatureMax = reader.float();
222
+ continue;
223
+ }
224
+ case 4: {
225
+ if (tag !== 34) {
226
+ break;
227
+ }
228
+ message.conditionSummary = reader.string();
229
+ continue;
230
+ }
231
+ case 5: {
232
+ if (tag !== 42) {
233
+ break;
234
+ }
235
+ message.conditionDetail = reader.string();
236
+ continue;
237
+ }
238
+ case 6: {
239
+ if (tag !== 53) {
240
+ break;
241
+ }
242
+ message.precipitationMm = reader.float();
243
+ continue;
244
+ }
245
+ case 7: {
246
+ if (tag !== 61) {
247
+ break;
248
+ }
249
+ message.windSpeedMs = reader.float();
250
+ continue;
251
+ }
252
+ case 8: {
253
+ if (tag !== 66) {
254
+ break;
255
+ }
256
+ message.windDirectionText = reader.string();
257
+ continue;
258
+ }
259
+ }
260
+ if ((tag & 7) === 4 || tag === 0) {
261
+ break;
262
+ }
263
+ reader.skip(tag & 7);
264
+ }
265
+ return message;
266
+ },
267
+ create(base) {
268
+ return exports.WeatherForecastDay.fromPartial(base ?? {});
269
+ },
270
+ fromPartial(object) {
271
+ const message = createBaseWeatherForecastDay();
272
+ message.dayOffset = object.dayOffset ?? 0;
273
+ message.temperatureMin = object.temperatureMin ?? undefined;
274
+ message.temperatureMax = object.temperatureMax ?? undefined;
275
+ message.conditionSummary = object.conditionSummary ?? "";
276
+ message.conditionDetail = object.conditionDetail ?? "";
277
+ message.precipitationMm = object.precipitationMm ?? undefined;
278
+ message.windSpeedMs = object.windSpeedMs ?? undefined;
279
+ message.windDirectionText = object.windDirectionText ?? undefined;
280
+ return message;
281
+ },
282
+ };
283
+ function createBaseAgentWeatherUpdate() {
284
+ return { current: undefined, forecast: [] };
285
+ }
286
+ exports.AgentWeatherUpdate = {
287
+ encode(message, writer = new wire_1.BinaryWriter()) {
288
+ if (message.current !== undefined) {
289
+ exports.WeatherCurrentData.encode(message.current, writer.uint32(10).fork()).join();
290
+ }
291
+ for (const v of message.forecast) {
292
+ exports.WeatherForecastDay.encode(v, writer.uint32(18).fork()).join();
293
+ }
294
+ return writer;
295
+ },
296
+ decode(input, length) {
297
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
298
+ const end = length === undefined ? reader.len : reader.pos + length;
299
+ const message = createBaseAgentWeatherUpdate();
300
+ while (reader.pos < end) {
301
+ const tag = reader.uint32();
302
+ switch (tag >>> 3) {
303
+ case 1: {
304
+ if (tag !== 10) {
305
+ break;
306
+ }
307
+ message.current = exports.WeatherCurrentData.decode(reader, reader.uint32());
308
+ continue;
309
+ }
310
+ case 2: {
311
+ if (tag !== 18) {
312
+ break;
313
+ }
314
+ message.forecast.push(exports.WeatherForecastDay.decode(reader, reader.uint32()));
315
+ continue;
316
+ }
317
+ }
318
+ if ((tag & 7) === 4 || tag === 0) {
319
+ break;
320
+ }
321
+ reader.skip(tag & 7);
322
+ }
323
+ return message;
324
+ },
325
+ create(base) {
326
+ return exports.AgentWeatherUpdate.fromPartial(base ?? {});
327
+ },
328
+ fromPartial(object) {
329
+ const message = createBaseAgentWeatherUpdate();
330
+ message.current = (object.current !== undefined && object.current !== null)
331
+ ? exports.WeatherCurrentData.fromPartial(object.current)
332
+ : undefined;
333
+ message.forecast = object.forecast?.map((e) => exports.WeatherForecastDay.fromPartial(e)) || [];
334
+ return message;
335
+ },
336
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m1kad0/hannah-proto",
3
- "version": "1.0.2",
3
+ "version": "2.0.0",
4
4
  "description": "Generated TypeScript gRPC-js client stubs for the Hannah voice assistant proto schema",
5
5
  "license": "UNLICENSED",
6
6
  "main": "dist/index.js",