@m1kad0/hannah-proto 4.4.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 -85
- package/dist/descriptor.binpb +0 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3 -1
- package/dist/logging.d.ts +189 -0
- package/dist/logging.js +775 -0
- 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,60 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
+
export declare const protobufPackage = "hannah.v1";
|
|
3
|
+
export interface ActivityLogEntry {
|
|
4
|
+
id: bigint;
|
|
5
|
+
ts: string;
|
|
6
|
+
channelType: string;
|
|
7
|
+
channelId: string;
|
|
8
|
+
/** 0 = unresolved/unset */
|
|
9
|
+
userId: number;
|
|
10
|
+
rawText: string;
|
|
11
|
+
intentName: string;
|
|
12
|
+
/** JSON-encoded, "" = none */
|
|
13
|
+
intentMetaJson: string;
|
|
14
|
+
answerText: string;
|
|
15
|
+
/** audio_path was set — tells the caller whether to offer playback */
|
|
16
|
+
hasAudio: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface ListActivityLogRequest {
|
|
19
|
+
requestorId: number;
|
|
20
|
+
/** only honored when requestor's trust_level >= 10; 0 = no target filter */
|
|
21
|
+
filterUserId: number;
|
|
22
|
+
pageSize: number;
|
|
23
|
+
/** cursor, 0 = start from newest */
|
|
24
|
+
beforeId: bigint;
|
|
25
|
+
}
|
|
26
|
+
export interface ListActivityLogResponse {
|
|
27
|
+
entries: ActivityLogEntry[];
|
|
28
|
+
hasMore: boolean;
|
|
29
|
+
}
|
|
30
|
+
export interface StreamActivityAudioRequest {
|
|
31
|
+
requestorId: number;
|
|
32
|
+
activityLogId: bigint;
|
|
33
|
+
}
|
|
34
|
+
/** A chunk of raw PCM audio (16-bit signed, mono) streamed from a single Activity Log entry. */
|
|
35
|
+
export interface ActivityAudioChunk {
|
|
36
|
+
pcm: Uint8Array;
|
|
37
|
+
sampleRate: number;
|
|
38
|
+
}
|
|
39
|
+
export declare const ActivityLogEntry: MessageFns<ActivityLogEntry>;
|
|
40
|
+
export declare const ListActivityLogRequest: MessageFns<ListActivityLogRequest>;
|
|
41
|
+
export declare const ListActivityLogResponse: MessageFns<ListActivityLogResponse>;
|
|
42
|
+
export declare const StreamActivityAudioRequest: MessageFns<StreamActivityAudioRequest>;
|
|
43
|
+
export declare const ActivityAudioChunk: MessageFns<ActivityAudioChunk>;
|
|
44
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
|
|
45
|
+
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 {} ? {
|
|
46
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
47
|
+
} : Partial<T>;
|
|
48
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
49
|
+
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
50
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
51
|
+
} & {
|
|
52
|
+
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
53
|
+
};
|
|
54
|
+
export interface MessageFns<T> {
|
|
55
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
56
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
57
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
58
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
59
|
+
}
|
|
60
|
+
export {};
|
|
@@ -0,0 +1,453 @@
|
|
|
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/activity_log.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.ActivityAudioChunk = exports.StreamActivityAudioRequest = exports.ListActivityLogResponse = exports.ListActivityLogRequest = exports.ActivityLogEntry = exports.protobufPackage = void 0;
|
|
9
|
+
/* eslint-disable */
|
|
10
|
+
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
11
|
+
exports.protobufPackage = "hannah.v1";
|
|
12
|
+
function createBaseActivityLogEntry() {
|
|
13
|
+
return {
|
|
14
|
+
id: 0n,
|
|
15
|
+
ts: "",
|
|
16
|
+
channelType: "",
|
|
17
|
+
channelId: "",
|
|
18
|
+
userId: 0,
|
|
19
|
+
rawText: "",
|
|
20
|
+
intentName: "",
|
|
21
|
+
intentMetaJson: "",
|
|
22
|
+
answerText: "",
|
|
23
|
+
hasAudio: false,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
exports.ActivityLogEntry = {
|
|
27
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
28
|
+
if (message.id !== 0n) {
|
|
29
|
+
if (BigInt.asIntN(64, message.id) !== message.id) {
|
|
30
|
+
throw new globalThis.Error("value provided for field message.id of type int64 too large");
|
|
31
|
+
}
|
|
32
|
+
writer.uint32(8).int64(message.id);
|
|
33
|
+
}
|
|
34
|
+
if (message.ts !== "") {
|
|
35
|
+
writer.uint32(18).string(message.ts);
|
|
36
|
+
}
|
|
37
|
+
if (message.channelType !== "") {
|
|
38
|
+
writer.uint32(26).string(message.channelType);
|
|
39
|
+
}
|
|
40
|
+
if (message.channelId !== "") {
|
|
41
|
+
writer.uint32(34).string(message.channelId);
|
|
42
|
+
}
|
|
43
|
+
if (message.userId !== 0) {
|
|
44
|
+
writer.uint32(40).int32(message.userId);
|
|
45
|
+
}
|
|
46
|
+
if (message.rawText !== "") {
|
|
47
|
+
writer.uint32(50).string(message.rawText);
|
|
48
|
+
}
|
|
49
|
+
if (message.intentName !== "") {
|
|
50
|
+
writer.uint32(58).string(message.intentName);
|
|
51
|
+
}
|
|
52
|
+
if (message.intentMetaJson !== "") {
|
|
53
|
+
writer.uint32(66).string(message.intentMetaJson);
|
|
54
|
+
}
|
|
55
|
+
if (message.answerText !== "") {
|
|
56
|
+
writer.uint32(74).string(message.answerText);
|
|
57
|
+
}
|
|
58
|
+
if (message.hasAudio !== false) {
|
|
59
|
+
writer.uint32(80).bool(message.hasAudio);
|
|
60
|
+
}
|
|
61
|
+
return writer;
|
|
62
|
+
},
|
|
63
|
+
decode(input, length) {
|
|
64
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
65
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
66
|
+
if (previousRecursionDepth >= 100) {
|
|
67
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
68
|
+
}
|
|
69
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
70
|
+
try {
|
|
71
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
72
|
+
const message = createBaseActivityLogEntry();
|
|
73
|
+
while (reader.pos < end) {
|
|
74
|
+
const tag = reader.uint32();
|
|
75
|
+
switch (tag >>> 3) {
|
|
76
|
+
case 1: {
|
|
77
|
+
if (tag !== 8) {
|
|
78
|
+
break;
|
|
79
|
+
}
|
|
80
|
+
message.id = reader.int64();
|
|
81
|
+
continue;
|
|
82
|
+
}
|
|
83
|
+
case 2: {
|
|
84
|
+
if (tag !== 18) {
|
|
85
|
+
break;
|
|
86
|
+
}
|
|
87
|
+
message.ts = reader.string();
|
|
88
|
+
continue;
|
|
89
|
+
}
|
|
90
|
+
case 3: {
|
|
91
|
+
if (tag !== 26) {
|
|
92
|
+
break;
|
|
93
|
+
}
|
|
94
|
+
message.channelType = reader.string();
|
|
95
|
+
continue;
|
|
96
|
+
}
|
|
97
|
+
case 4: {
|
|
98
|
+
if (tag !== 34) {
|
|
99
|
+
break;
|
|
100
|
+
}
|
|
101
|
+
message.channelId = reader.string();
|
|
102
|
+
continue;
|
|
103
|
+
}
|
|
104
|
+
case 5: {
|
|
105
|
+
if (tag !== 40) {
|
|
106
|
+
break;
|
|
107
|
+
}
|
|
108
|
+
message.userId = reader.int32();
|
|
109
|
+
continue;
|
|
110
|
+
}
|
|
111
|
+
case 6: {
|
|
112
|
+
if (tag !== 50) {
|
|
113
|
+
break;
|
|
114
|
+
}
|
|
115
|
+
message.rawText = reader.string();
|
|
116
|
+
continue;
|
|
117
|
+
}
|
|
118
|
+
case 7: {
|
|
119
|
+
if (tag !== 58) {
|
|
120
|
+
break;
|
|
121
|
+
}
|
|
122
|
+
message.intentName = reader.string();
|
|
123
|
+
continue;
|
|
124
|
+
}
|
|
125
|
+
case 8: {
|
|
126
|
+
if (tag !== 66) {
|
|
127
|
+
break;
|
|
128
|
+
}
|
|
129
|
+
message.intentMetaJson = reader.string();
|
|
130
|
+
continue;
|
|
131
|
+
}
|
|
132
|
+
case 9: {
|
|
133
|
+
if (tag !== 74) {
|
|
134
|
+
break;
|
|
135
|
+
}
|
|
136
|
+
message.answerText = reader.string();
|
|
137
|
+
continue;
|
|
138
|
+
}
|
|
139
|
+
case 10: {
|
|
140
|
+
if (tag !== 80) {
|
|
141
|
+
break;
|
|
142
|
+
}
|
|
143
|
+
message.hasAudio = reader.bool();
|
|
144
|
+
continue;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
148
|
+
break;
|
|
149
|
+
}
|
|
150
|
+
reader.skip(tag & 7);
|
|
151
|
+
}
|
|
152
|
+
return message;
|
|
153
|
+
}
|
|
154
|
+
finally {
|
|
155
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
create(base) {
|
|
159
|
+
return exports.ActivityLogEntry.fromPartial(base ?? {});
|
|
160
|
+
},
|
|
161
|
+
fromPartial(object) {
|
|
162
|
+
const message = createBaseActivityLogEntry();
|
|
163
|
+
message.id = (object.id !== undefined && object.id !== null) ? BigInt(object.id) : 0n;
|
|
164
|
+
message.ts = object.ts ?? "";
|
|
165
|
+
message.channelType = object.channelType ?? "";
|
|
166
|
+
message.channelId = object.channelId ?? "";
|
|
167
|
+
message.userId = object.userId ?? 0;
|
|
168
|
+
message.rawText = object.rawText ?? "";
|
|
169
|
+
message.intentName = object.intentName ?? "";
|
|
170
|
+
message.intentMetaJson = object.intentMetaJson ?? "";
|
|
171
|
+
message.answerText = object.answerText ?? "";
|
|
172
|
+
message.hasAudio = object.hasAudio ?? false;
|
|
173
|
+
return message;
|
|
174
|
+
},
|
|
175
|
+
};
|
|
176
|
+
function createBaseListActivityLogRequest() {
|
|
177
|
+
return { requestorId: 0, filterUserId: 0, pageSize: 0, beforeId: 0n };
|
|
178
|
+
}
|
|
179
|
+
exports.ListActivityLogRequest = {
|
|
180
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
181
|
+
if (message.requestorId !== 0) {
|
|
182
|
+
writer.uint32(8).int32(message.requestorId);
|
|
183
|
+
}
|
|
184
|
+
if (message.filterUserId !== 0) {
|
|
185
|
+
writer.uint32(16).int32(message.filterUserId);
|
|
186
|
+
}
|
|
187
|
+
if (message.pageSize !== 0) {
|
|
188
|
+
writer.uint32(24).int32(message.pageSize);
|
|
189
|
+
}
|
|
190
|
+
if (message.beforeId !== 0n) {
|
|
191
|
+
if (BigInt.asIntN(64, message.beforeId) !== message.beforeId) {
|
|
192
|
+
throw new globalThis.Error("value provided for field message.beforeId of type int64 too large");
|
|
193
|
+
}
|
|
194
|
+
writer.uint32(32).int64(message.beforeId);
|
|
195
|
+
}
|
|
196
|
+
return writer;
|
|
197
|
+
},
|
|
198
|
+
decode(input, length) {
|
|
199
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
200
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
201
|
+
if (previousRecursionDepth >= 100) {
|
|
202
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
203
|
+
}
|
|
204
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
205
|
+
try {
|
|
206
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
207
|
+
const message = createBaseListActivityLogRequest();
|
|
208
|
+
while (reader.pos < end) {
|
|
209
|
+
const tag = reader.uint32();
|
|
210
|
+
switch (tag >>> 3) {
|
|
211
|
+
case 1: {
|
|
212
|
+
if (tag !== 8) {
|
|
213
|
+
break;
|
|
214
|
+
}
|
|
215
|
+
message.requestorId = reader.int32();
|
|
216
|
+
continue;
|
|
217
|
+
}
|
|
218
|
+
case 2: {
|
|
219
|
+
if (tag !== 16) {
|
|
220
|
+
break;
|
|
221
|
+
}
|
|
222
|
+
message.filterUserId = reader.int32();
|
|
223
|
+
continue;
|
|
224
|
+
}
|
|
225
|
+
case 3: {
|
|
226
|
+
if (tag !== 24) {
|
|
227
|
+
break;
|
|
228
|
+
}
|
|
229
|
+
message.pageSize = reader.int32();
|
|
230
|
+
continue;
|
|
231
|
+
}
|
|
232
|
+
case 4: {
|
|
233
|
+
if (tag !== 32) {
|
|
234
|
+
break;
|
|
235
|
+
}
|
|
236
|
+
message.beforeId = reader.int64();
|
|
237
|
+
continue;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
241
|
+
break;
|
|
242
|
+
}
|
|
243
|
+
reader.skip(tag & 7);
|
|
244
|
+
}
|
|
245
|
+
return message;
|
|
246
|
+
}
|
|
247
|
+
finally {
|
|
248
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
create(base) {
|
|
252
|
+
return exports.ListActivityLogRequest.fromPartial(base ?? {});
|
|
253
|
+
},
|
|
254
|
+
fromPartial(object) {
|
|
255
|
+
const message = createBaseListActivityLogRequest();
|
|
256
|
+
message.requestorId = object.requestorId ?? 0;
|
|
257
|
+
message.filterUserId = object.filterUserId ?? 0;
|
|
258
|
+
message.pageSize = object.pageSize ?? 0;
|
|
259
|
+
message.beforeId = (object.beforeId !== undefined && object.beforeId !== null) ? BigInt(object.beforeId) : 0n;
|
|
260
|
+
return message;
|
|
261
|
+
},
|
|
262
|
+
};
|
|
263
|
+
function createBaseListActivityLogResponse() {
|
|
264
|
+
return { entries: [], hasMore: false };
|
|
265
|
+
}
|
|
266
|
+
exports.ListActivityLogResponse = {
|
|
267
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
268
|
+
for (const v of message.entries) {
|
|
269
|
+
exports.ActivityLogEntry.encode(v, writer.uint32(10).fork()).join();
|
|
270
|
+
}
|
|
271
|
+
if (message.hasMore !== false) {
|
|
272
|
+
writer.uint32(16).bool(message.hasMore);
|
|
273
|
+
}
|
|
274
|
+
return writer;
|
|
275
|
+
},
|
|
276
|
+
decode(input, length) {
|
|
277
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
278
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
279
|
+
if (previousRecursionDepth >= 100) {
|
|
280
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
281
|
+
}
|
|
282
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
283
|
+
try {
|
|
284
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
285
|
+
const message = createBaseListActivityLogResponse();
|
|
286
|
+
while (reader.pos < end) {
|
|
287
|
+
const tag = reader.uint32();
|
|
288
|
+
switch (tag >>> 3) {
|
|
289
|
+
case 1: {
|
|
290
|
+
if (tag !== 10) {
|
|
291
|
+
break;
|
|
292
|
+
}
|
|
293
|
+
message.entries.push(exports.ActivityLogEntry.decode(reader, reader.uint32()));
|
|
294
|
+
continue;
|
|
295
|
+
}
|
|
296
|
+
case 2: {
|
|
297
|
+
if (tag !== 16) {
|
|
298
|
+
break;
|
|
299
|
+
}
|
|
300
|
+
message.hasMore = reader.bool();
|
|
301
|
+
continue;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
305
|
+
break;
|
|
306
|
+
}
|
|
307
|
+
reader.skip(tag & 7);
|
|
308
|
+
}
|
|
309
|
+
return message;
|
|
310
|
+
}
|
|
311
|
+
finally {
|
|
312
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
313
|
+
}
|
|
314
|
+
},
|
|
315
|
+
create(base) {
|
|
316
|
+
return exports.ListActivityLogResponse.fromPartial(base ?? {});
|
|
317
|
+
},
|
|
318
|
+
fromPartial(object) {
|
|
319
|
+
const message = createBaseListActivityLogResponse();
|
|
320
|
+
message.entries = object.entries?.map((e) => exports.ActivityLogEntry.fromPartial(e)) || [];
|
|
321
|
+
message.hasMore = object.hasMore ?? false;
|
|
322
|
+
return message;
|
|
323
|
+
},
|
|
324
|
+
};
|
|
325
|
+
function createBaseStreamActivityAudioRequest() {
|
|
326
|
+
return { requestorId: 0, activityLogId: 0n };
|
|
327
|
+
}
|
|
328
|
+
exports.StreamActivityAudioRequest = {
|
|
329
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
330
|
+
if (message.requestorId !== 0) {
|
|
331
|
+
writer.uint32(8).int32(message.requestorId);
|
|
332
|
+
}
|
|
333
|
+
if (message.activityLogId !== 0n) {
|
|
334
|
+
if (BigInt.asIntN(64, message.activityLogId) !== message.activityLogId) {
|
|
335
|
+
throw new globalThis.Error("value provided for field message.activityLogId of type int64 too large");
|
|
336
|
+
}
|
|
337
|
+
writer.uint32(16).int64(message.activityLogId);
|
|
338
|
+
}
|
|
339
|
+
return writer;
|
|
340
|
+
},
|
|
341
|
+
decode(input, length) {
|
|
342
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
343
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
344
|
+
if (previousRecursionDepth >= 100) {
|
|
345
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
346
|
+
}
|
|
347
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
348
|
+
try {
|
|
349
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
350
|
+
const message = createBaseStreamActivityAudioRequest();
|
|
351
|
+
while (reader.pos < end) {
|
|
352
|
+
const tag = reader.uint32();
|
|
353
|
+
switch (tag >>> 3) {
|
|
354
|
+
case 1: {
|
|
355
|
+
if (tag !== 8) {
|
|
356
|
+
break;
|
|
357
|
+
}
|
|
358
|
+
message.requestorId = reader.int32();
|
|
359
|
+
continue;
|
|
360
|
+
}
|
|
361
|
+
case 2: {
|
|
362
|
+
if (tag !== 16) {
|
|
363
|
+
break;
|
|
364
|
+
}
|
|
365
|
+
message.activityLogId = reader.int64();
|
|
366
|
+
continue;
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
370
|
+
break;
|
|
371
|
+
}
|
|
372
|
+
reader.skip(tag & 7);
|
|
373
|
+
}
|
|
374
|
+
return message;
|
|
375
|
+
}
|
|
376
|
+
finally {
|
|
377
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
378
|
+
}
|
|
379
|
+
},
|
|
380
|
+
create(base) {
|
|
381
|
+
return exports.StreamActivityAudioRequest.fromPartial(base ?? {});
|
|
382
|
+
},
|
|
383
|
+
fromPartial(object) {
|
|
384
|
+
const message = createBaseStreamActivityAudioRequest();
|
|
385
|
+
message.requestorId = object.requestorId ?? 0;
|
|
386
|
+
message.activityLogId = (object.activityLogId !== undefined && object.activityLogId !== null)
|
|
387
|
+
? BigInt(object.activityLogId)
|
|
388
|
+
: 0n;
|
|
389
|
+
return message;
|
|
390
|
+
},
|
|
391
|
+
};
|
|
392
|
+
function createBaseActivityAudioChunk() {
|
|
393
|
+
return { pcm: new Uint8Array(0), sampleRate: 0 };
|
|
394
|
+
}
|
|
395
|
+
exports.ActivityAudioChunk = {
|
|
396
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
397
|
+
if (message.pcm.length !== 0) {
|
|
398
|
+
writer.uint32(10).bytes(message.pcm);
|
|
399
|
+
}
|
|
400
|
+
if (message.sampleRate !== 0) {
|
|
401
|
+
writer.uint32(16).int32(message.sampleRate);
|
|
402
|
+
}
|
|
403
|
+
return writer;
|
|
404
|
+
},
|
|
405
|
+
decode(input, length) {
|
|
406
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
407
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
408
|
+
if (previousRecursionDepth >= 100) {
|
|
409
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
410
|
+
}
|
|
411
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
412
|
+
try {
|
|
413
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
414
|
+
const message = createBaseActivityAudioChunk();
|
|
415
|
+
while (reader.pos < end) {
|
|
416
|
+
const tag = reader.uint32();
|
|
417
|
+
switch (tag >>> 3) {
|
|
418
|
+
case 1: {
|
|
419
|
+
if (tag !== 10) {
|
|
420
|
+
break;
|
|
421
|
+
}
|
|
422
|
+
message.pcm = reader.bytes();
|
|
423
|
+
continue;
|
|
424
|
+
}
|
|
425
|
+
case 2: {
|
|
426
|
+
if (tag !== 16) {
|
|
427
|
+
break;
|
|
428
|
+
}
|
|
429
|
+
message.sampleRate = reader.int32();
|
|
430
|
+
continue;
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
434
|
+
break;
|
|
435
|
+
}
|
|
436
|
+
reader.skip(tag & 7);
|
|
437
|
+
}
|
|
438
|
+
return message;
|
|
439
|
+
}
|
|
440
|
+
finally {
|
|
441
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
442
|
+
}
|
|
443
|
+
},
|
|
444
|
+
create(base) {
|
|
445
|
+
return exports.ActivityAudioChunk.fromPartial(base ?? {});
|
|
446
|
+
},
|
|
447
|
+
fromPartial(object) {
|
|
448
|
+
const message = createBaseActivityAudioChunk();
|
|
449
|
+
message.pcm = object.pcm ?? new Uint8Array(0);
|
|
450
|
+
message.sampleRate = object.sampleRate ?? 0;
|
|
451
|
+
return message;
|
|
452
|
+
},
|
|
453
|
+
};
|