@m1kad0/hannah-proto 4.7.0 → 4.8.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/compat_versions.js
CHANGED
|
@@ -106,7 +106,7 @@ exports.REQUIRED_COMPAT_VERSIONS = {
|
|
|
106
106
|
"/hannah.v1.HannahService/DeleteUser": 1,
|
|
107
107
|
"/hannah.v1.HannahService/GetResidents": 1,
|
|
108
108
|
"/hannah.v1.HannahService/GetDevices": 1,
|
|
109
|
-
"/hannah.v1.HannahService/ControlDevice":
|
|
109
|
+
"/hannah.v1.HannahService/ControlDevice": 2,
|
|
110
110
|
"/hannah.v1.HannahService/SubmitText": 1,
|
|
111
111
|
"/hannah.v1.HannahService/SubmitVoice": 1,
|
|
112
112
|
"/hannah.v1.HannahService/Announce": 1,
|
package/dist/descriptor.binpb
CHANGED
|
Binary file
|
package/dist/v1/agent.d.ts
CHANGED
|
@@ -105,6 +105,8 @@ export interface AgentStateUpdate {
|
|
|
105
105
|
ack: boolean;
|
|
106
106
|
/** Unix timestamp in milliseconds */
|
|
107
107
|
ts: bigint;
|
|
108
|
+
/** semantic role of this state, resolved by the adapter from common.role (e.g. "on", "level", "color", "current", "expected"); empty = adapter hasn't been updated yet or role is unresolvable */
|
|
109
|
+
canonicalKey?: string | undefined;
|
|
108
110
|
}
|
|
109
111
|
/** The text-command state in ioBroker changed — treat as a SubmitText call. */
|
|
110
112
|
export interface AgentTextCommand {
|
package/dist/v1/agent.js
CHANGED
|
@@ -448,7 +448,7 @@ exports.CaptureControl = {
|
|
|
448
448
|
},
|
|
449
449
|
};
|
|
450
450
|
function createBaseAgentStateUpdate() {
|
|
451
|
-
return { stateId: "", value: "", ack: false, ts: 0n };
|
|
451
|
+
return { stateId: "", value: "", ack: false, ts: 0n, canonicalKey: undefined };
|
|
452
452
|
}
|
|
453
453
|
exports.AgentStateUpdate = {
|
|
454
454
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
@@ -467,6 +467,9 @@ exports.AgentStateUpdate = {
|
|
|
467
467
|
}
|
|
468
468
|
writer.uint32(32).int64(message.ts);
|
|
469
469
|
}
|
|
470
|
+
if (message.canonicalKey !== undefined) {
|
|
471
|
+
writer.uint32(42).string(message.canonicalKey);
|
|
472
|
+
}
|
|
470
473
|
return writer;
|
|
471
474
|
},
|
|
472
475
|
decode(input, length) {
|
|
@@ -510,6 +513,13 @@ exports.AgentStateUpdate = {
|
|
|
510
513
|
message.ts = reader.int64();
|
|
511
514
|
continue;
|
|
512
515
|
}
|
|
516
|
+
case 5: {
|
|
517
|
+
if (tag !== 42) {
|
|
518
|
+
break;
|
|
519
|
+
}
|
|
520
|
+
message.canonicalKey = reader.string();
|
|
521
|
+
continue;
|
|
522
|
+
}
|
|
513
523
|
}
|
|
514
524
|
if ((tag & 7) === 4 || tag === 0) {
|
|
515
525
|
break;
|
|
@@ -531,6 +541,7 @@ exports.AgentStateUpdate = {
|
|
|
531
541
|
message.value = object.value ?? "";
|
|
532
542
|
message.ack = object.ack ?? false;
|
|
533
543
|
message.ts = (object.ts !== undefined && object.ts !== null) ? BigInt(object.ts) : 0n;
|
|
544
|
+
message.canonicalKey = object.canonicalKey ?? undefined;
|
|
534
545
|
return message;
|
|
535
546
|
},
|
|
536
547
|
};
|
|
@@ -60,6 +60,14 @@ export interface ControlDeviceRequest {
|
|
|
60
60
|
state: string;
|
|
61
61
|
/** string-serialised value: "true", "false", "50", "#FF0000" */
|
|
62
62
|
value: string;
|
|
63
|
+
/**
|
|
64
|
+
* The calling service and its user, same as SubmitTextRequest: Core looks up
|
|
65
|
+
* the user via linked_accounts to check AgentDevice.required_trust_level.
|
|
66
|
+
* Unset or not linked = guest (trust level 0) (hannah-proto#17).
|
|
67
|
+
*/
|
|
68
|
+
sourceService: string;
|
|
69
|
+
/** e.g. Telegram chat_id as string */
|
|
70
|
+
sourceUserId: string;
|
|
63
71
|
}
|
|
64
72
|
export declare const DeviceInfo: MessageFns<DeviceInfo>;
|
|
65
73
|
export declare const DeviceInfo_CurrentEntry: MessageFns<DeviceInfo_CurrentEntry>;
|
|
@@ -555,7 +555,7 @@ exports.GetDevicesResponse = {
|
|
|
555
555
|
},
|
|
556
556
|
};
|
|
557
557
|
function createBaseControlDeviceRequest() {
|
|
558
|
-
return { deviceId: "", state: "", value: "" };
|
|
558
|
+
return { deviceId: "", state: "", value: "", sourceService: "", sourceUserId: "" };
|
|
559
559
|
}
|
|
560
560
|
exports.ControlDeviceRequest = {
|
|
561
561
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
@@ -568,6 +568,12 @@ exports.ControlDeviceRequest = {
|
|
|
568
568
|
if (message.value !== "") {
|
|
569
569
|
writer.uint32(26).string(message.value);
|
|
570
570
|
}
|
|
571
|
+
if (message.sourceService !== "") {
|
|
572
|
+
writer.uint32(34).string(message.sourceService);
|
|
573
|
+
}
|
|
574
|
+
if (message.sourceUserId !== "") {
|
|
575
|
+
writer.uint32(42).string(message.sourceUserId);
|
|
576
|
+
}
|
|
571
577
|
return writer;
|
|
572
578
|
},
|
|
573
579
|
decode(input, length) {
|
|
@@ -604,6 +610,20 @@ exports.ControlDeviceRequest = {
|
|
|
604
610
|
message.value = reader.string();
|
|
605
611
|
continue;
|
|
606
612
|
}
|
|
613
|
+
case 4: {
|
|
614
|
+
if (tag !== 34) {
|
|
615
|
+
break;
|
|
616
|
+
}
|
|
617
|
+
message.sourceService = reader.string();
|
|
618
|
+
continue;
|
|
619
|
+
}
|
|
620
|
+
case 5: {
|
|
621
|
+
if (tag !== 42) {
|
|
622
|
+
break;
|
|
623
|
+
}
|
|
624
|
+
message.sourceUserId = reader.string();
|
|
625
|
+
continue;
|
|
626
|
+
}
|
|
607
627
|
}
|
|
608
628
|
if ((tag & 7) === 4 || tag === 0) {
|
|
609
629
|
break;
|
|
@@ -624,6 +644,8 @@ exports.ControlDeviceRequest = {
|
|
|
624
644
|
message.deviceId = object.deviceId ?? "";
|
|
625
645
|
message.state = object.state ?? "";
|
|
626
646
|
message.value = object.value ?? "";
|
|
647
|
+
message.sourceService = object.sourceService ?? "";
|
|
648
|
+
message.sourceUserId = object.sourceUserId ?? "";
|
|
627
649
|
return message;
|
|
628
650
|
},
|
|
629
651
|
};
|
package/package.json
CHANGED