@m1kad0/hannah-proto 4.5.0 → 4.6.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/README.md +21 -0
- package/dist/compat_interceptor.js +6 -6
- package/dist/compat_versions.js +176 -88
- package/dist/descriptor.binpb +0 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -1
- package/dist/v1/activity_log.d.ts +60 -0
- package/dist/v1/activity_log.js +453 -0
- package/dist/v1/agent.d.ts +433 -0
- package/dist/v1/agent.js +2527 -0
- package/dist/v1/automation.d.ts +54 -0
- package/dist/v1/automation.js +303 -0
- package/dist/v1/car_state.d.ts +72 -0
- package/dist/v1/car_state.js +516 -0
- package/dist/v1/channel.d.ts +102 -0
- package/dist/v1/channel.js +587 -0
- package/dist/v1/control.d.ts +383 -0
- package/dist/v1/control.js +3879 -0
- package/dist/v1/device_control_menu.d.ts +88 -0
- package/dist/v1/device_control_menu.js +629 -0
- package/dist/v1/event_stream.d.ts +63 -0
- package/dist/v1/event_stream.js +494 -0
- package/dist/v1/hannah.d.ts +1644 -0
- package/dist/v1/hannah.js +968 -0
- package/dist/v1/index.d.ts +22 -0
- package/dist/v1/index.js +58 -0
- package/dist/v1/infrastructure.d.ts +98 -0
- package/dist/v1/infrastructure.js +652 -0
- package/dist/v1/logging.d.ts +189 -0
- package/dist/v1/logging.js +775 -0
- package/dist/v1/messages.d.ts +56 -0
- package/dist/v1/messages.js +398 -0
- package/dist/v1/satellite.d.ts +90 -0
- package/dist/v1/satellite.js +637 -0
- package/dist/v1/satellite_provisioning.d.ts +33 -0
- package/dist/v1/satellite_provisioning.js +84 -0
- package/dist/v1/satellite_proxy.d.ts +100 -0
- package/dist/v1/satellite_proxy.js +546 -0
- package/dist/v1/shared.d.ts +54 -0
- package/dist/v1/shared.js +249 -0
- package/dist/v1/speaker_enrollment.d.ts +44 -0
- package/dist/v1/speaker_enrollment.js +157 -0
- package/dist/v1/timer_admin.d.ts +42 -0
- package/dist/v1/timer_admin.js +273 -0
- package/dist/v1/timer_service.d.ts +133 -0
- package/dist/v1/timer_service.js +945 -0
- package/dist/v1/user_registry.d.ts +187 -0
- package/dist/v1/user_registry.js +1612 -0
- package/dist/v1/wakeword_capture.d.ts +101 -0
- package/dist/v1/wakeword_capture.js +611 -0
- package/dist/v1/weather.d.ts +81 -0
- package/dist/v1/weather.js +366 -0
- package/package.json +1 -1
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
|
+
// versions:
|
|
4
|
+
// protoc-gen-ts_proto v2.12.1
|
|
5
|
+
// protoc unknown
|
|
6
|
+
// source: hannah/v1/shared.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.EnumValues_ValuesEntry = exports.EnumValues = exports.StatusResponse = exports.Empty = exports.StateType = exports.protobufPackage = void 0;
|
|
9
|
+
/* eslint-disable */
|
|
10
|
+
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
11
|
+
exports.protobufPackage = "hannah.v1";
|
|
12
|
+
/**
|
|
13
|
+
* Classification of an ioBroker state's value, derived from common.type/role/states.
|
|
14
|
+
* Lets consumers (e.g. the WebUI trigger editor) offer the right operators/input widget
|
|
15
|
+
* per state instead of requiring a free-text ioBroker state ID.
|
|
16
|
+
*/
|
|
17
|
+
var StateType;
|
|
18
|
+
(function (StateType) {
|
|
19
|
+
StateType[StateType["STATE_TYPE_UNSPECIFIED"] = 0] = "STATE_TYPE_UNSPECIFIED";
|
|
20
|
+
StateType[StateType["BOOLEAN"] = 1] = "BOOLEAN";
|
|
21
|
+
StateType[StateType["NUMERIC"] = 2] = "NUMERIC";
|
|
22
|
+
StateType[StateType["ENUM"] = 3] = "ENUM";
|
|
23
|
+
StateType[StateType["COLOR"] = 4] = "COLOR";
|
|
24
|
+
StateType[StateType["TEXT"] = 5] = "TEXT";
|
|
25
|
+
StateType[StateType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
26
|
+
})(StateType || (exports.StateType = StateType = {}));
|
|
27
|
+
function createBaseEmpty() {
|
|
28
|
+
return {};
|
|
29
|
+
}
|
|
30
|
+
exports.Empty = {
|
|
31
|
+
encode(_, writer = new wire_1.BinaryWriter()) {
|
|
32
|
+
return writer;
|
|
33
|
+
},
|
|
34
|
+
decode(input, length) {
|
|
35
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
36
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
37
|
+
if (previousRecursionDepth >= 100) {
|
|
38
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
39
|
+
}
|
|
40
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
41
|
+
try {
|
|
42
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
43
|
+
const message = createBaseEmpty();
|
|
44
|
+
while (reader.pos < end) {
|
|
45
|
+
const tag = reader.uint32();
|
|
46
|
+
switch (tag >>> 3) {
|
|
47
|
+
}
|
|
48
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
49
|
+
break;
|
|
50
|
+
}
|
|
51
|
+
reader.skip(tag & 7);
|
|
52
|
+
}
|
|
53
|
+
return message;
|
|
54
|
+
}
|
|
55
|
+
finally {
|
|
56
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
create(base) {
|
|
60
|
+
return exports.Empty.fromPartial(base ?? {});
|
|
61
|
+
},
|
|
62
|
+
fromPartial(_) {
|
|
63
|
+
const message = createBaseEmpty();
|
|
64
|
+
return message;
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
function createBaseStatusResponse() {
|
|
68
|
+
return { ok: false, message: "" };
|
|
69
|
+
}
|
|
70
|
+
exports.StatusResponse = {
|
|
71
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
72
|
+
if (message.ok !== false) {
|
|
73
|
+
writer.uint32(8).bool(message.ok);
|
|
74
|
+
}
|
|
75
|
+
if (message.message !== "") {
|
|
76
|
+
writer.uint32(18).string(message.message);
|
|
77
|
+
}
|
|
78
|
+
return writer;
|
|
79
|
+
},
|
|
80
|
+
decode(input, length) {
|
|
81
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
82
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
83
|
+
if (previousRecursionDepth >= 100) {
|
|
84
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
85
|
+
}
|
|
86
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
87
|
+
try {
|
|
88
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
89
|
+
const message = createBaseStatusResponse();
|
|
90
|
+
while (reader.pos < end) {
|
|
91
|
+
const tag = reader.uint32();
|
|
92
|
+
switch (tag >>> 3) {
|
|
93
|
+
case 1: {
|
|
94
|
+
if (tag !== 8) {
|
|
95
|
+
break;
|
|
96
|
+
}
|
|
97
|
+
message.ok = reader.bool();
|
|
98
|
+
continue;
|
|
99
|
+
}
|
|
100
|
+
case 2: {
|
|
101
|
+
if (tag !== 18) {
|
|
102
|
+
break;
|
|
103
|
+
}
|
|
104
|
+
message.message = reader.string();
|
|
105
|
+
continue;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
109
|
+
break;
|
|
110
|
+
}
|
|
111
|
+
reader.skip(tag & 7);
|
|
112
|
+
}
|
|
113
|
+
return message;
|
|
114
|
+
}
|
|
115
|
+
finally {
|
|
116
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
create(base) {
|
|
120
|
+
return exports.StatusResponse.fromPartial(base ?? {});
|
|
121
|
+
},
|
|
122
|
+
fromPartial(object) {
|
|
123
|
+
const message = createBaseStatusResponse();
|
|
124
|
+
message.ok = object.ok ?? false;
|
|
125
|
+
message.message = object.message ?? "";
|
|
126
|
+
return message;
|
|
127
|
+
},
|
|
128
|
+
};
|
|
129
|
+
function createBaseEnumValues() {
|
|
130
|
+
return { values: {} };
|
|
131
|
+
}
|
|
132
|
+
exports.EnumValues = {
|
|
133
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
134
|
+
globalThis.Object.entries(message.values).forEach(([key, value]) => {
|
|
135
|
+
exports.EnumValues_ValuesEntry.encode({ key: key, value }, writer.uint32(10).fork()).join();
|
|
136
|
+
});
|
|
137
|
+
return writer;
|
|
138
|
+
},
|
|
139
|
+
decode(input, length) {
|
|
140
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
141
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
142
|
+
if (previousRecursionDepth >= 100) {
|
|
143
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
144
|
+
}
|
|
145
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
146
|
+
try {
|
|
147
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
148
|
+
const message = createBaseEnumValues();
|
|
149
|
+
while (reader.pos < end) {
|
|
150
|
+
const tag = reader.uint32();
|
|
151
|
+
switch (tag >>> 3) {
|
|
152
|
+
case 1: {
|
|
153
|
+
if (tag !== 10) {
|
|
154
|
+
break;
|
|
155
|
+
}
|
|
156
|
+
const entry1 = exports.EnumValues_ValuesEntry.decode(reader, reader.uint32());
|
|
157
|
+
if (entry1.value !== undefined) {
|
|
158
|
+
message.values[entry1.key] = entry1.value;
|
|
159
|
+
}
|
|
160
|
+
continue;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
164
|
+
break;
|
|
165
|
+
}
|
|
166
|
+
reader.skip(tag & 7);
|
|
167
|
+
}
|
|
168
|
+
return message;
|
|
169
|
+
}
|
|
170
|
+
finally {
|
|
171
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
create(base) {
|
|
175
|
+
return exports.EnumValues.fromPartial(base ?? {});
|
|
176
|
+
},
|
|
177
|
+
fromPartial(object) {
|
|
178
|
+
const message = createBaseEnumValues();
|
|
179
|
+
message.values = globalThis.Object.entries(object.values ?? {}).reduce((acc, [key, value]) => {
|
|
180
|
+
if (value !== undefined) {
|
|
181
|
+
acc[key] = globalThis.String(value);
|
|
182
|
+
}
|
|
183
|
+
return acc;
|
|
184
|
+
}, {});
|
|
185
|
+
return message;
|
|
186
|
+
},
|
|
187
|
+
};
|
|
188
|
+
function createBaseEnumValues_ValuesEntry() {
|
|
189
|
+
return { key: "", value: "" };
|
|
190
|
+
}
|
|
191
|
+
exports.EnumValues_ValuesEntry = {
|
|
192
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
193
|
+
if (message.key !== "") {
|
|
194
|
+
writer.uint32(10).string(message.key);
|
|
195
|
+
}
|
|
196
|
+
if (message.value !== "") {
|
|
197
|
+
writer.uint32(18).string(message.value);
|
|
198
|
+
}
|
|
199
|
+
return writer;
|
|
200
|
+
},
|
|
201
|
+
decode(input, length) {
|
|
202
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
203
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
204
|
+
if (previousRecursionDepth >= 100) {
|
|
205
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
206
|
+
}
|
|
207
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
208
|
+
try {
|
|
209
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
210
|
+
const message = createBaseEnumValues_ValuesEntry();
|
|
211
|
+
while (reader.pos < end) {
|
|
212
|
+
const tag = reader.uint32();
|
|
213
|
+
switch (tag >>> 3) {
|
|
214
|
+
case 1: {
|
|
215
|
+
if (tag !== 10) {
|
|
216
|
+
break;
|
|
217
|
+
}
|
|
218
|
+
message.key = reader.string();
|
|
219
|
+
continue;
|
|
220
|
+
}
|
|
221
|
+
case 2: {
|
|
222
|
+
if (tag !== 18) {
|
|
223
|
+
break;
|
|
224
|
+
}
|
|
225
|
+
message.value = reader.string();
|
|
226
|
+
continue;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
230
|
+
break;
|
|
231
|
+
}
|
|
232
|
+
reader.skip(tag & 7);
|
|
233
|
+
}
|
|
234
|
+
return message;
|
|
235
|
+
}
|
|
236
|
+
finally {
|
|
237
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
create(base) {
|
|
241
|
+
return exports.EnumValues_ValuesEntry.fromPartial(base ?? {});
|
|
242
|
+
},
|
|
243
|
+
fromPartial(object) {
|
|
244
|
+
const message = createBaseEnumValues_ValuesEntry();
|
|
245
|
+
message.key = object.key ?? "";
|
|
246
|
+
message.value = object.value ?? "";
|
|
247
|
+
return message;
|
|
248
|
+
},
|
|
249
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
+
export declare const protobufPackage = "hannah.v1";
|
|
3
|
+
export interface EnrollVoiceprintRequest {
|
|
4
|
+
/** Hannah user this voice sample belongs to (users.id, stable) */
|
|
5
|
+
userId: string;
|
|
6
|
+
/** raw PCM, 16-bit signed mono */
|
|
7
|
+
audioPcm: Uint8Array;
|
|
8
|
+
/** e.g. 16000 */
|
|
9
|
+
sampleRate: number;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Triggers a guided voice-enrollment dialog (hannah#8) for user_id at satellite_id.
|
|
13
|
+
* Called by an already-authenticated external client (WebUI/Telegram) against Core,
|
|
14
|
+
* which then orchestrates the recording dialog itself (STT prompts, sample capture,
|
|
15
|
+
* eventually calling voiceid_client.enroll() directly) instead of the caller submitting
|
|
16
|
+
* samples via EnrollVoiceprint. requestor_id/user_id follow the same split as
|
|
17
|
+
* ListActivityLogRequest (activity_log.proto): enrolling another user
|
|
18
|
+
* (requestor_id != user_id) requires the requestor's trust_level >= 10 — enforced by
|
|
19
|
+
* Core, not expressed in this schema.
|
|
20
|
+
*/
|
|
21
|
+
export interface StartVoiceEnrollmentRequest {
|
|
22
|
+
requestorId: number;
|
|
23
|
+
userId: number;
|
|
24
|
+
satelliteId: string;
|
|
25
|
+
}
|
|
26
|
+
export declare const EnrollVoiceprintRequest: MessageFns<EnrollVoiceprintRequest>;
|
|
27
|
+
export declare const StartVoiceEnrollmentRequest: MessageFns<StartVoiceEnrollmentRequest>;
|
|
28
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
|
|
29
|
+
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 {} ? {
|
|
30
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
31
|
+
} : Partial<T>;
|
|
32
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
33
|
+
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
34
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
35
|
+
} & {
|
|
36
|
+
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
37
|
+
};
|
|
38
|
+
export interface MessageFns<T> {
|
|
39
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
40
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
41
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
42
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
43
|
+
}
|
|
44
|
+
export {};
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
|
+
// versions:
|
|
4
|
+
// protoc-gen-ts_proto v2.12.1
|
|
5
|
+
// protoc unknown
|
|
6
|
+
// source: hannah/v1/speaker_enrollment.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.StartVoiceEnrollmentRequest = exports.EnrollVoiceprintRequest = exports.protobufPackage = void 0;
|
|
9
|
+
/* eslint-disable */
|
|
10
|
+
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
11
|
+
exports.protobufPackage = "hannah.v1";
|
|
12
|
+
function createBaseEnrollVoiceprintRequest() {
|
|
13
|
+
return { userId: "", audioPcm: new Uint8Array(0), sampleRate: 0 };
|
|
14
|
+
}
|
|
15
|
+
exports.EnrollVoiceprintRequest = {
|
|
16
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
17
|
+
if (message.userId !== "") {
|
|
18
|
+
writer.uint32(10).string(message.userId);
|
|
19
|
+
}
|
|
20
|
+
if (message.audioPcm.length !== 0) {
|
|
21
|
+
writer.uint32(18).bytes(message.audioPcm);
|
|
22
|
+
}
|
|
23
|
+
if (message.sampleRate !== 0) {
|
|
24
|
+
writer.uint32(24).int32(message.sampleRate);
|
|
25
|
+
}
|
|
26
|
+
return writer;
|
|
27
|
+
},
|
|
28
|
+
decode(input, length) {
|
|
29
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
30
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
31
|
+
if (previousRecursionDepth >= 100) {
|
|
32
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
33
|
+
}
|
|
34
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
35
|
+
try {
|
|
36
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
37
|
+
const message = createBaseEnrollVoiceprintRequest();
|
|
38
|
+
while (reader.pos < end) {
|
|
39
|
+
const tag = reader.uint32();
|
|
40
|
+
switch (tag >>> 3) {
|
|
41
|
+
case 1: {
|
|
42
|
+
if (tag !== 10) {
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
message.userId = reader.string();
|
|
46
|
+
continue;
|
|
47
|
+
}
|
|
48
|
+
case 2: {
|
|
49
|
+
if (tag !== 18) {
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
message.audioPcm = reader.bytes();
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
case 3: {
|
|
56
|
+
if (tag !== 24) {
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
message.sampleRate = reader.int32();
|
|
60
|
+
continue;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
reader.skip(tag & 7);
|
|
67
|
+
}
|
|
68
|
+
return message;
|
|
69
|
+
}
|
|
70
|
+
finally {
|
|
71
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
create(base) {
|
|
75
|
+
return exports.EnrollVoiceprintRequest.fromPartial(base ?? {});
|
|
76
|
+
},
|
|
77
|
+
fromPartial(object) {
|
|
78
|
+
const message = createBaseEnrollVoiceprintRequest();
|
|
79
|
+
message.userId = object.userId ?? "";
|
|
80
|
+
message.audioPcm = object.audioPcm ?? new Uint8Array(0);
|
|
81
|
+
message.sampleRate = object.sampleRate ?? 0;
|
|
82
|
+
return message;
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
function createBaseStartVoiceEnrollmentRequest() {
|
|
86
|
+
return { requestorId: 0, userId: 0, satelliteId: "" };
|
|
87
|
+
}
|
|
88
|
+
exports.StartVoiceEnrollmentRequest = {
|
|
89
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
90
|
+
if (message.requestorId !== 0) {
|
|
91
|
+
writer.uint32(8).int32(message.requestorId);
|
|
92
|
+
}
|
|
93
|
+
if (message.userId !== 0) {
|
|
94
|
+
writer.uint32(16).int32(message.userId);
|
|
95
|
+
}
|
|
96
|
+
if (message.satelliteId !== "") {
|
|
97
|
+
writer.uint32(26).string(message.satelliteId);
|
|
98
|
+
}
|
|
99
|
+
return writer;
|
|
100
|
+
},
|
|
101
|
+
decode(input, length) {
|
|
102
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
103
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
104
|
+
if (previousRecursionDepth >= 100) {
|
|
105
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
106
|
+
}
|
|
107
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
108
|
+
try {
|
|
109
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
110
|
+
const message = createBaseStartVoiceEnrollmentRequest();
|
|
111
|
+
while (reader.pos < end) {
|
|
112
|
+
const tag = reader.uint32();
|
|
113
|
+
switch (tag >>> 3) {
|
|
114
|
+
case 1: {
|
|
115
|
+
if (tag !== 8) {
|
|
116
|
+
break;
|
|
117
|
+
}
|
|
118
|
+
message.requestorId = reader.int32();
|
|
119
|
+
continue;
|
|
120
|
+
}
|
|
121
|
+
case 2: {
|
|
122
|
+
if (tag !== 16) {
|
|
123
|
+
break;
|
|
124
|
+
}
|
|
125
|
+
message.userId = reader.int32();
|
|
126
|
+
continue;
|
|
127
|
+
}
|
|
128
|
+
case 3: {
|
|
129
|
+
if (tag !== 26) {
|
|
130
|
+
break;
|
|
131
|
+
}
|
|
132
|
+
message.satelliteId = reader.string();
|
|
133
|
+
continue;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
137
|
+
break;
|
|
138
|
+
}
|
|
139
|
+
reader.skip(tag & 7);
|
|
140
|
+
}
|
|
141
|
+
return message;
|
|
142
|
+
}
|
|
143
|
+
finally {
|
|
144
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
create(base) {
|
|
148
|
+
return exports.StartVoiceEnrollmentRequest.fromPartial(base ?? {});
|
|
149
|
+
},
|
|
150
|
+
fromPartial(object) {
|
|
151
|
+
const message = createBaseStartVoiceEnrollmentRequest();
|
|
152
|
+
message.requestorId = object.requestorId ?? 0;
|
|
153
|
+
message.userId = object.userId ?? 0;
|
|
154
|
+
message.satelliteId = object.satelliteId ?? "";
|
|
155
|
+
return message;
|
|
156
|
+
},
|
|
157
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
+
export declare const protobufPackage = "hannah.v1";
|
|
3
|
+
export interface Timer {
|
|
4
|
+
timerId: string;
|
|
5
|
+
label: string;
|
|
6
|
+
/** remaining seconds until fire, computed relative to now */
|
|
7
|
+
seconds: bigint;
|
|
8
|
+
roomId: string;
|
|
9
|
+
userId: number;
|
|
10
|
+
}
|
|
11
|
+
export interface GetTimersRequest {
|
|
12
|
+
userId: number;
|
|
13
|
+
}
|
|
14
|
+
export interface GetTimersResponse {
|
|
15
|
+
timers: Timer[];
|
|
16
|
+
}
|
|
17
|
+
export interface DeleteTimerRequest {
|
|
18
|
+
timerId: string;
|
|
19
|
+
/** caller performing the deletion, may differ from the timer's owner */
|
|
20
|
+
requestorId: number;
|
|
21
|
+
}
|
|
22
|
+
export declare const Timer: MessageFns<Timer>;
|
|
23
|
+
export declare const GetTimersRequest: MessageFns<GetTimersRequest>;
|
|
24
|
+
export declare const GetTimersResponse: MessageFns<GetTimersResponse>;
|
|
25
|
+
export declare const DeleteTimerRequest: MessageFns<DeleteTimerRequest>;
|
|
26
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
|
|
27
|
+
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 {} ? {
|
|
28
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
29
|
+
} : Partial<T>;
|
|
30
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
31
|
+
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
32
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
33
|
+
} & {
|
|
34
|
+
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
35
|
+
};
|
|
36
|
+
export interface MessageFns<T> {
|
|
37
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
38
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
39
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
40
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
41
|
+
}
|
|
42
|
+
export {};
|