@livekit/rtc-node 0.13.14 → 0.13.16

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.
Files changed (122) hide show
  1. package/dist/audio_stream.cjs +3 -2
  2. package/dist/audio_stream.cjs.map +1 -1
  3. package/dist/audio_stream.d.cts +2 -1
  4. package/dist/audio_stream.d.ts +2 -1
  5. package/dist/audio_stream.d.ts.map +1 -1
  6. package/dist/audio_stream.js +2 -1
  7. package/dist/audio_stream.js.map +1 -1
  8. package/dist/data_streams/index.d.cts +2 -2
  9. package/dist/data_streams/index.d.ts +2 -2
  10. package/dist/data_streams/stream_reader.cjs.map +1 -1
  11. package/dist/data_streams/stream_reader.d.cts +2 -2
  12. package/dist/data_streams/stream_reader.d.ts +2 -2
  13. package/dist/data_streams/stream_reader.d.ts.map +1 -1
  14. package/dist/data_streams/stream_reader.js.map +1 -1
  15. package/dist/data_streams/stream_writer.cjs.map +1 -1
  16. package/dist/data_streams/stream_writer.d.cts +2 -2
  17. package/dist/data_streams/stream_writer.d.ts +2 -2
  18. package/dist/data_streams/stream_writer.d.ts.map +1 -1
  19. package/dist/data_streams/stream_writer.js.map +1 -1
  20. package/dist/data_streams/types.d.cts +2 -2
  21. package/dist/data_streams/types.d.ts +2 -2
  22. package/dist/ffi_client.d.cts +1 -0
  23. package/dist/ffi_client.d.ts +1 -0
  24. package/dist/index.d.cts +2 -2
  25. package/dist/index.d.ts +2 -2
  26. package/dist/participant.cjs +13 -15
  27. package/dist/participant.cjs.map +1 -1
  28. package/dist/participant.d.cts +2 -2
  29. package/dist/participant.d.ts +2 -2
  30. package/dist/participant.d.ts.map +1 -1
  31. package/dist/participant.js +5 -7
  32. package/dist/participant.js.map +1 -1
  33. package/dist/proto/audio_frame_pb.cjs +4 -2
  34. package/dist/proto/audio_frame_pb.cjs.map +1 -1
  35. package/dist/proto/audio_frame_pb.d.cts +8 -0
  36. package/dist/proto/audio_frame_pb.d.ts +8 -0
  37. package/dist/proto/audio_frame_pb.d.ts.map +1 -1
  38. package/dist/proto/audio_frame_pb.js +4 -2
  39. package/dist/proto/audio_frame_pb.js.map +1 -1
  40. package/dist/proto/data_stream_pb.cjs +1549 -0
  41. package/dist/proto/data_stream_pb.cjs.map +1 -0
  42. package/dist/proto/data_stream_pb.d.cts +1358 -0
  43. package/dist/proto/data_stream_pb.d.ts +1358 -0
  44. package/dist/proto/data_stream_pb.d.ts.map +1 -0
  45. package/dist/proto/data_stream_pb.js +1473 -0
  46. package/dist/proto/data_stream_pb.js.map +1 -0
  47. package/dist/proto/ffi_pb.cjs +43 -3
  48. package/dist/proto/ffi_pb.cjs.map +1 -1
  49. package/dist/proto/ffi_pb.d.cts +244 -1
  50. package/dist/proto/ffi_pb.d.ts +244 -1
  51. package/dist/proto/ffi_pb.d.ts.map +1 -1
  52. package/dist/proto/ffi_pb.js +43 -3
  53. package/dist/proto/ffi_pb.js.map +1 -1
  54. package/dist/proto/participant_pb.cjs +5 -1
  55. package/dist/proto/participant_pb.cjs.map +1 -1
  56. package/dist/proto/participant_pb.d.cts +9 -1
  57. package/dist/proto/participant_pb.d.ts +9 -1
  58. package/dist/proto/participant_pb.d.ts.map +1 -1
  59. package/dist/proto/participant_pb.js +5 -1
  60. package/dist/proto/participant_pb.js.map +1 -1
  61. package/dist/proto/room_pb.cjs +99 -2
  62. package/dist/proto/room_pb.cjs.map +1 -1
  63. package/dist/proto/room_pb.d.cts +130 -2
  64. package/dist/proto/room_pb.d.ts +130 -2
  65. package/dist/proto/room_pb.d.ts.map +1 -1
  66. package/dist/proto/room_pb.js +97 -3
  67. package/dist/proto/room_pb.js.map +1 -1
  68. package/dist/proto/track_pb.cjs +27 -1
  69. package/dist/proto/track_pb.cjs.map +1 -1
  70. package/dist/proto/track_pb.d.cts +40 -1
  71. package/dist/proto/track_pb.d.ts +40 -1
  72. package/dist/proto/track_pb.d.ts.map +1 -1
  73. package/dist/proto/track_pb.js +26 -1
  74. package/dist/proto/track_pb.js.map +1 -1
  75. package/dist/room.cjs +79 -3
  76. package/dist/room.cjs.map +1 -1
  77. package/dist/room.d.cts +51 -3
  78. package/dist/room.d.ts +51 -3
  79. package/dist/room.d.ts.map +1 -1
  80. package/dist/room.js +77 -1
  81. package/dist/room.js.map +1 -1
  82. package/dist/{stream_reader-a8_oiaOi.d.cts → stream_reader-Ch2zvjU3.d.cts} +0 -1
  83. package/dist/{stream_reader-DWUV4eJB.d.ts → stream_reader-DRyR29vo.d.ts} +0 -1
  84. package/dist/track.cjs +23 -4
  85. package/dist/track.cjs.map +1 -1
  86. package/dist/track.d.cts +8 -2
  87. package/dist/track.d.ts +8 -2
  88. package/dist/track.d.ts.map +1 -1
  89. package/dist/track.js +23 -4
  90. package/dist/track.js.map +1 -1
  91. package/dist/track_publication.d.cts +1 -0
  92. package/dist/track_publication.d.ts +1 -0
  93. package/dist/version.cjs +1 -1
  94. package/dist/version.cjs.map +1 -1
  95. package/dist/version.d.cts +1 -1
  96. package/dist/version.d.ts +1 -1
  97. package/dist/version.js +1 -1
  98. package/dist/version.js.map +1 -1
  99. package/dist/video_source.d.cts +1 -0
  100. package/dist/video_source.d.ts +1 -0
  101. package/dist/video_stream.cjs +1 -2
  102. package/dist/video_stream.cjs.map +1 -1
  103. package/dist/video_stream.d.cts +1 -1
  104. package/dist/video_stream.d.ts +1 -1
  105. package/dist/video_stream.d.ts.map +1 -1
  106. package/dist/video_stream.js +0 -1
  107. package/dist/video_stream.js.map +1 -1
  108. package/package.json +7 -7
  109. package/src/audio_stream.ts +5 -1
  110. package/src/data_streams/stream_reader.ts +0 -1
  111. package/src/data_streams/stream_writer.ts +0 -1
  112. package/src/participant.ts +13 -15
  113. package/src/proto/audio_frame_pb.ts +12 -0
  114. package/src/proto/data_stream_pb.ts +2515 -0
  115. package/src/proto/ffi_pb.ts +283 -1
  116. package/src/proto/participant_pb.ts +12 -0
  117. package/src/proto/room_pb.ts +212 -1
  118. package/src/proto/track_pb.ts +58 -0
  119. package/src/room.ts +79 -1
  120. package/src/track.ts +28 -4
  121. package/src/version.ts +1 -1
  122. package/src/video_stream.ts +1 -1
@@ -0,0 +1,2515 @@
1
+ // Copyright 2025 LiveKit, Inc.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ // @generated by protoc-gen-es v1.10.0 with parameter "target=ts,import_extension=.js"
16
+ // @generated from file data_stream.proto (package livekit.proto, syntax proto2)
17
+ /* eslint-disable */
18
+ // @ts-nocheck
19
+
20
+ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
21
+ import { Message, proto2 } from "@bufbuild/protobuf";
22
+ import { FfiOwnedHandle } from "./handle_pb.js";
23
+
24
+ /**
25
+ * A reader for an incoming stream.
26
+ *
27
+ * @generated from message livekit.proto.OwnedTextStreamReader
28
+ */
29
+ export class OwnedTextStreamReader extends Message<OwnedTextStreamReader> {
30
+ /**
31
+ * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1;
32
+ */
33
+ handle?: FfiOwnedHandle;
34
+
35
+ /**
36
+ * @generated from field: required livekit.proto.TextStreamInfo info = 2;
37
+ */
38
+ info?: TextStreamInfo;
39
+
40
+ constructor(data?: PartialMessage<OwnedTextStreamReader>) {
41
+ super();
42
+ proto2.util.initPartial(data, this);
43
+ }
44
+
45
+ static readonly runtime: typeof proto2 = proto2;
46
+ static readonly typeName = "livekit.proto.OwnedTextStreamReader";
47
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
48
+ { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle, req: true },
49
+ { no: 2, name: "info", kind: "message", T: TextStreamInfo, req: true },
50
+ ]);
51
+
52
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): OwnedTextStreamReader {
53
+ return new OwnedTextStreamReader().fromBinary(bytes, options);
54
+ }
55
+
56
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): OwnedTextStreamReader {
57
+ return new OwnedTextStreamReader().fromJson(jsonValue, options);
58
+ }
59
+
60
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): OwnedTextStreamReader {
61
+ return new OwnedTextStreamReader().fromJsonString(jsonString, options);
62
+ }
63
+
64
+ static equals(a: OwnedTextStreamReader | PlainMessage<OwnedTextStreamReader> | undefined, b: OwnedTextStreamReader | PlainMessage<OwnedTextStreamReader> | undefined): boolean {
65
+ return proto2.util.equals(OwnedTextStreamReader, a, b);
66
+ }
67
+ }
68
+
69
+ /**
70
+ * Reads an incoming text stream incrementally.
71
+ *
72
+ * @generated from message livekit.proto.TextStreamReaderReadIncrementalRequest
73
+ */
74
+ export class TextStreamReaderReadIncrementalRequest extends Message<TextStreamReaderReadIncrementalRequest> {
75
+ /**
76
+ * @generated from field: required uint64 reader_handle = 1;
77
+ */
78
+ readerHandle?: bigint;
79
+
80
+ constructor(data?: PartialMessage<TextStreamReaderReadIncrementalRequest>) {
81
+ super();
82
+ proto2.util.initPartial(data, this);
83
+ }
84
+
85
+ static readonly runtime: typeof proto2 = proto2;
86
+ static readonly typeName = "livekit.proto.TextStreamReaderReadIncrementalRequest";
87
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
88
+ { no: 1, name: "reader_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
89
+ ]);
90
+
91
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TextStreamReaderReadIncrementalRequest {
92
+ return new TextStreamReaderReadIncrementalRequest().fromBinary(bytes, options);
93
+ }
94
+
95
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TextStreamReaderReadIncrementalRequest {
96
+ return new TextStreamReaderReadIncrementalRequest().fromJson(jsonValue, options);
97
+ }
98
+
99
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TextStreamReaderReadIncrementalRequest {
100
+ return new TextStreamReaderReadIncrementalRequest().fromJsonString(jsonString, options);
101
+ }
102
+
103
+ static equals(a: TextStreamReaderReadIncrementalRequest | PlainMessage<TextStreamReaderReadIncrementalRequest> | undefined, b: TextStreamReaderReadIncrementalRequest | PlainMessage<TextStreamReaderReadIncrementalRequest> | undefined): boolean {
104
+ return proto2.util.equals(TextStreamReaderReadIncrementalRequest, a, b);
105
+ }
106
+ }
107
+
108
+ /**
109
+ * @generated from message livekit.proto.TextStreamReaderReadIncrementalResponse
110
+ */
111
+ export class TextStreamReaderReadIncrementalResponse extends Message<TextStreamReaderReadIncrementalResponse> {
112
+ constructor(data?: PartialMessage<TextStreamReaderReadIncrementalResponse>) {
113
+ super();
114
+ proto2.util.initPartial(data, this);
115
+ }
116
+
117
+ static readonly runtime: typeof proto2 = proto2;
118
+ static readonly typeName = "livekit.proto.TextStreamReaderReadIncrementalResponse";
119
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
120
+ ]);
121
+
122
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TextStreamReaderReadIncrementalResponse {
123
+ return new TextStreamReaderReadIncrementalResponse().fromBinary(bytes, options);
124
+ }
125
+
126
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TextStreamReaderReadIncrementalResponse {
127
+ return new TextStreamReaderReadIncrementalResponse().fromJson(jsonValue, options);
128
+ }
129
+
130
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TextStreamReaderReadIncrementalResponse {
131
+ return new TextStreamReaderReadIncrementalResponse().fromJsonString(jsonString, options);
132
+ }
133
+
134
+ static equals(a: TextStreamReaderReadIncrementalResponse | PlainMessage<TextStreamReaderReadIncrementalResponse> | undefined, b: TextStreamReaderReadIncrementalResponse | PlainMessage<TextStreamReaderReadIncrementalResponse> | undefined): boolean {
135
+ return proto2.util.equals(TextStreamReaderReadIncrementalResponse, a, b);
136
+ }
137
+ }
138
+
139
+ /**
140
+ * Reads an incoming text stream in its entirety.
141
+ *
142
+ * @generated from message livekit.proto.TextStreamReaderReadAllRequest
143
+ */
144
+ export class TextStreamReaderReadAllRequest extends Message<TextStreamReaderReadAllRequest> {
145
+ /**
146
+ * @generated from field: required uint64 reader_handle = 1;
147
+ */
148
+ readerHandle?: bigint;
149
+
150
+ constructor(data?: PartialMessage<TextStreamReaderReadAllRequest>) {
151
+ super();
152
+ proto2.util.initPartial(data, this);
153
+ }
154
+
155
+ static readonly runtime: typeof proto2 = proto2;
156
+ static readonly typeName = "livekit.proto.TextStreamReaderReadAllRequest";
157
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
158
+ { no: 1, name: "reader_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
159
+ ]);
160
+
161
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TextStreamReaderReadAllRequest {
162
+ return new TextStreamReaderReadAllRequest().fromBinary(bytes, options);
163
+ }
164
+
165
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TextStreamReaderReadAllRequest {
166
+ return new TextStreamReaderReadAllRequest().fromJson(jsonValue, options);
167
+ }
168
+
169
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TextStreamReaderReadAllRequest {
170
+ return new TextStreamReaderReadAllRequest().fromJsonString(jsonString, options);
171
+ }
172
+
173
+ static equals(a: TextStreamReaderReadAllRequest | PlainMessage<TextStreamReaderReadAllRequest> | undefined, b: TextStreamReaderReadAllRequest | PlainMessage<TextStreamReaderReadAllRequest> | undefined): boolean {
174
+ return proto2.util.equals(TextStreamReaderReadAllRequest, a, b);
175
+ }
176
+ }
177
+
178
+ /**
179
+ * @generated from message livekit.proto.TextStreamReaderReadAllResponse
180
+ */
181
+ export class TextStreamReaderReadAllResponse extends Message<TextStreamReaderReadAllResponse> {
182
+ /**
183
+ * @generated from field: required uint64 async_id = 1;
184
+ */
185
+ asyncId?: bigint;
186
+
187
+ constructor(data?: PartialMessage<TextStreamReaderReadAllResponse>) {
188
+ super();
189
+ proto2.util.initPartial(data, this);
190
+ }
191
+
192
+ static readonly runtime: typeof proto2 = proto2;
193
+ static readonly typeName = "livekit.proto.TextStreamReaderReadAllResponse";
194
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
195
+ { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
196
+ ]);
197
+
198
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TextStreamReaderReadAllResponse {
199
+ return new TextStreamReaderReadAllResponse().fromBinary(bytes, options);
200
+ }
201
+
202
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TextStreamReaderReadAllResponse {
203
+ return new TextStreamReaderReadAllResponse().fromJson(jsonValue, options);
204
+ }
205
+
206
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TextStreamReaderReadAllResponse {
207
+ return new TextStreamReaderReadAllResponse().fromJsonString(jsonString, options);
208
+ }
209
+
210
+ static equals(a: TextStreamReaderReadAllResponse | PlainMessage<TextStreamReaderReadAllResponse> | undefined, b: TextStreamReaderReadAllResponse | PlainMessage<TextStreamReaderReadAllResponse> | undefined): boolean {
211
+ return proto2.util.equals(TextStreamReaderReadAllResponse, a, b);
212
+ }
213
+ }
214
+
215
+ /**
216
+ * @generated from message livekit.proto.TextStreamReaderReadAllCallback
217
+ */
218
+ export class TextStreamReaderReadAllCallback extends Message<TextStreamReaderReadAllCallback> {
219
+ /**
220
+ * @generated from field: required uint64 async_id = 1;
221
+ */
222
+ asyncId?: bigint;
223
+
224
+ /**
225
+ * @generated from oneof livekit.proto.TextStreamReaderReadAllCallback.result
226
+ */
227
+ result: {
228
+ /**
229
+ * @generated from field: string content = 2;
230
+ */
231
+ value: string;
232
+ case: "content";
233
+ } | {
234
+ /**
235
+ * @generated from field: livekit.proto.StreamError error = 3;
236
+ */
237
+ value: StreamError;
238
+ case: "error";
239
+ } | { case: undefined; value?: undefined } = { case: undefined };
240
+
241
+ constructor(data?: PartialMessage<TextStreamReaderReadAllCallback>) {
242
+ super();
243
+ proto2.util.initPartial(data, this);
244
+ }
245
+
246
+ static readonly runtime: typeof proto2 = proto2;
247
+ static readonly typeName = "livekit.proto.TextStreamReaderReadAllCallback";
248
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
249
+ { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
250
+ { no: 2, name: "content", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "result" },
251
+ { no: 3, name: "error", kind: "message", T: StreamError, oneof: "result" },
252
+ ]);
253
+
254
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TextStreamReaderReadAllCallback {
255
+ return new TextStreamReaderReadAllCallback().fromBinary(bytes, options);
256
+ }
257
+
258
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TextStreamReaderReadAllCallback {
259
+ return new TextStreamReaderReadAllCallback().fromJson(jsonValue, options);
260
+ }
261
+
262
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TextStreamReaderReadAllCallback {
263
+ return new TextStreamReaderReadAllCallback().fromJsonString(jsonString, options);
264
+ }
265
+
266
+ static equals(a: TextStreamReaderReadAllCallback | PlainMessage<TextStreamReaderReadAllCallback> | undefined, b: TextStreamReaderReadAllCallback | PlainMessage<TextStreamReaderReadAllCallback> | undefined): boolean {
267
+ return proto2.util.equals(TextStreamReaderReadAllCallback, a, b);
268
+ }
269
+ }
270
+
271
+ /**
272
+ * @generated from message livekit.proto.TextStreamReaderEvent
273
+ */
274
+ export class TextStreamReaderEvent extends Message<TextStreamReaderEvent> {
275
+ /**
276
+ * @generated from field: required uint64 reader_handle = 1;
277
+ */
278
+ readerHandle?: bigint;
279
+
280
+ /**
281
+ * @generated from oneof livekit.proto.TextStreamReaderEvent.detail
282
+ */
283
+ detail: {
284
+ /**
285
+ * @generated from field: livekit.proto.TextStreamReaderChunkReceived chunk_received = 2;
286
+ */
287
+ value: TextStreamReaderChunkReceived;
288
+ case: "chunkReceived";
289
+ } | {
290
+ /**
291
+ * @generated from field: livekit.proto.TextStreamReaderEOS eos = 3;
292
+ */
293
+ value: TextStreamReaderEOS;
294
+ case: "eos";
295
+ } | { case: undefined; value?: undefined } = { case: undefined };
296
+
297
+ constructor(data?: PartialMessage<TextStreamReaderEvent>) {
298
+ super();
299
+ proto2.util.initPartial(data, this);
300
+ }
301
+
302
+ static readonly runtime: typeof proto2 = proto2;
303
+ static readonly typeName = "livekit.proto.TextStreamReaderEvent";
304
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
305
+ { no: 1, name: "reader_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
306
+ { no: 2, name: "chunk_received", kind: "message", T: TextStreamReaderChunkReceived, oneof: "detail" },
307
+ { no: 3, name: "eos", kind: "message", T: TextStreamReaderEOS, oneof: "detail" },
308
+ ]);
309
+
310
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TextStreamReaderEvent {
311
+ return new TextStreamReaderEvent().fromBinary(bytes, options);
312
+ }
313
+
314
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TextStreamReaderEvent {
315
+ return new TextStreamReaderEvent().fromJson(jsonValue, options);
316
+ }
317
+
318
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TextStreamReaderEvent {
319
+ return new TextStreamReaderEvent().fromJsonString(jsonString, options);
320
+ }
321
+
322
+ static equals(a: TextStreamReaderEvent | PlainMessage<TextStreamReaderEvent> | undefined, b: TextStreamReaderEvent | PlainMessage<TextStreamReaderEvent> | undefined): boolean {
323
+ return proto2.util.equals(TextStreamReaderEvent, a, b);
324
+ }
325
+ }
326
+
327
+ /**
328
+ * @generated from message livekit.proto.TextStreamReaderChunkReceived
329
+ */
330
+ export class TextStreamReaderChunkReceived extends Message<TextStreamReaderChunkReceived> {
331
+ /**
332
+ * @generated from field: required string content = 1;
333
+ */
334
+ content?: string;
335
+
336
+ constructor(data?: PartialMessage<TextStreamReaderChunkReceived>) {
337
+ super();
338
+ proto2.util.initPartial(data, this);
339
+ }
340
+
341
+ static readonly runtime: typeof proto2 = proto2;
342
+ static readonly typeName = "livekit.proto.TextStreamReaderChunkReceived";
343
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
344
+ { no: 1, name: "content", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true },
345
+ ]);
346
+
347
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TextStreamReaderChunkReceived {
348
+ return new TextStreamReaderChunkReceived().fromBinary(bytes, options);
349
+ }
350
+
351
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TextStreamReaderChunkReceived {
352
+ return new TextStreamReaderChunkReceived().fromJson(jsonValue, options);
353
+ }
354
+
355
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TextStreamReaderChunkReceived {
356
+ return new TextStreamReaderChunkReceived().fromJsonString(jsonString, options);
357
+ }
358
+
359
+ static equals(a: TextStreamReaderChunkReceived | PlainMessage<TextStreamReaderChunkReceived> | undefined, b: TextStreamReaderChunkReceived | PlainMessage<TextStreamReaderChunkReceived> | undefined): boolean {
360
+ return proto2.util.equals(TextStreamReaderChunkReceived, a, b);
361
+ }
362
+ }
363
+
364
+ /**
365
+ * @generated from message livekit.proto.TextStreamReaderEOS
366
+ */
367
+ export class TextStreamReaderEOS extends Message<TextStreamReaderEOS> {
368
+ /**
369
+ * @generated from field: optional livekit.proto.StreamError error = 1;
370
+ */
371
+ error?: StreamError;
372
+
373
+ constructor(data?: PartialMessage<TextStreamReaderEOS>) {
374
+ super();
375
+ proto2.util.initPartial(data, this);
376
+ }
377
+
378
+ static readonly runtime: typeof proto2 = proto2;
379
+ static readonly typeName = "livekit.proto.TextStreamReaderEOS";
380
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
381
+ { no: 1, name: "error", kind: "message", T: StreamError, opt: true },
382
+ ]);
383
+
384
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TextStreamReaderEOS {
385
+ return new TextStreamReaderEOS().fromBinary(bytes, options);
386
+ }
387
+
388
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TextStreamReaderEOS {
389
+ return new TextStreamReaderEOS().fromJson(jsonValue, options);
390
+ }
391
+
392
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TextStreamReaderEOS {
393
+ return new TextStreamReaderEOS().fromJsonString(jsonString, options);
394
+ }
395
+
396
+ static equals(a: TextStreamReaderEOS | PlainMessage<TextStreamReaderEOS> | undefined, b: TextStreamReaderEOS | PlainMessage<TextStreamReaderEOS> | undefined): boolean {
397
+ return proto2.util.equals(TextStreamReaderEOS, a, b);
398
+ }
399
+ }
400
+
401
+ /**
402
+ * A reader for an incoming stream.
403
+ *
404
+ * @generated from message livekit.proto.OwnedByteStreamReader
405
+ */
406
+ export class OwnedByteStreamReader extends Message<OwnedByteStreamReader> {
407
+ /**
408
+ * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1;
409
+ */
410
+ handle?: FfiOwnedHandle;
411
+
412
+ /**
413
+ * @generated from field: required livekit.proto.ByteStreamInfo info = 2;
414
+ */
415
+ info?: ByteStreamInfo;
416
+
417
+ constructor(data?: PartialMessage<OwnedByteStreamReader>) {
418
+ super();
419
+ proto2.util.initPartial(data, this);
420
+ }
421
+
422
+ static readonly runtime: typeof proto2 = proto2;
423
+ static readonly typeName = "livekit.proto.OwnedByteStreamReader";
424
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
425
+ { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle, req: true },
426
+ { no: 2, name: "info", kind: "message", T: ByteStreamInfo, req: true },
427
+ ]);
428
+
429
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): OwnedByteStreamReader {
430
+ return new OwnedByteStreamReader().fromBinary(bytes, options);
431
+ }
432
+
433
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): OwnedByteStreamReader {
434
+ return new OwnedByteStreamReader().fromJson(jsonValue, options);
435
+ }
436
+
437
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): OwnedByteStreamReader {
438
+ return new OwnedByteStreamReader().fromJsonString(jsonString, options);
439
+ }
440
+
441
+ static equals(a: OwnedByteStreamReader | PlainMessage<OwnedByteStreamReader> | undefined, b: OwnedByteStreamReader | PlainMessage<OwnedByteStreamReader> | undefined): boolean {
442
+ return proto2.util.equals(OwnedByteStreamReader, a, b);
443
+ }
444
+ }
445
+
446
+ /**
447
+ * Reads an incoming byte stream incrementally.
448
+ *
449
+ * @generated from message livekit.proto.ByteStreamReaderReadIncrementalRequest
450
+ */
451
+ export class ByteStreamReaderReadIncrementalRequest extends Message<ByteStreamReaderReadIncrementalRequest> {
452
+ /**
453
+ * @generated from field: required uint64 reader_handle = 1;
454
+ */
455
+ readerHandle?: bigint;
456
+
457
+ constructor(data?: PartialMessage<ByteStreamReaderReadIncrementalRequest>) {
458
+ super();
459
+ proto2.util.initPartial(data, this);
460
+ }
461
+
462
+ static readonly runtime: typeof proto2 = proto2;
463
+ static readonly typeName = "livekit.proto.ByteStreamReaderReadIncrementalRequest";
464
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
465
+ { no: 1, name: "reader_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
466
+ ]);
467
+
468
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ByteStreamReaderReadIncrementalRequest {
469
+ return new ByteStreamReaderReadIncrementalRequest().fromBinary(bytes, options);
470
+ }
471
+
472
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ByteStreamReaderReadIncrementalRequest {
473
+ return new ByteStreamReaderReadIncrementalRequest().fromJson(jsonValue, options);
474
+ }
475
+
476
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ByteStreamReaderReadIncrementalRequest {
477
+ return new ByteStreamReaderReadIncrementalRequest().fromJsonString(jsonString, options);
478
+ }
479
+
480
+ static equals(a: ByteStreamReaderReadIncrementalRequest | PlainMessage<ByteStreamReaderReadIncrementalRequest> | undefined, b: ByteStreamReaderReadIncrementalRequest | PlainMessage<ByteStreamReaderReadIncrementalRequest> | undefined): boolean {
481
+ return proto2.util.equals(ByteStreamReaderReadIncrementalRequest, a, b);
482
+ }
483
+ }
484
+
485
+ /**
486
+ * @generated from message livekit.proto.ByteStreamReaderReadIncrementalResponse
487
+ */
488
+ export class ByteStreamReaderReadIncrementalResponse extends Message<ByteStreamReaderReadIncrementalResponse> {
489
+ constructor(data?: PartialMessage<ByteStreamReaderReadIncrementalResponse>) {
490
+ super();
491
+ proto2.util.initPartial(data, this);
492
+ }
493
+
494
+ static readonly runtime: typeof proto2 = proto2;
495
+ static readonly typeName = "livekit.proto.ByteStreamReaderReadIncrementalResponse";
496
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
497
+ ]);
498
+
499
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ByteStreamReaderReadIncrementalResponse {
500
+ return new ByteStreamReaderReadIncrementalResponse().fromBinary(bytes, options);
501
+ }
502
+
503
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ByteStreamReaderReadIncrementalResponse {
504
+ return new ByteStreamReaderReadIncrementalResponse().fromJson(jsonValue, options);
505
+ }
506
+
507
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ByteStreamReaderReadIncrementalResponse {
508
+ return new ByteStreamReaderReadIncrementalResponse().fromJsonString(jsonString, options);
509
+ }
510
+
511
+ static equals(a: ByteStreamReaderReadIncrementalResponse | PlainMessage<ByteStreamReaderReadIncrementalResponse> | undefined, b: ByteStreamReaderReadIncrementalResponse | PlainMessage<ByteStreamReaderReadIncrementalResponse> | undefined): boolean {
512
+ return proto2.util.equals(ByteStreamReaderReadIncrementalResponse, a, b);
513
+ }
514
+ }
515
+
516
+ /**
517
+ * Reads an incoming byte stream in its entirety.
518
+ *
519
+ * @generated from message livekit.proto.ByteStreamReaderReadAllRequest
520
+ */
521
+ export class ByteStreamReaderReadAllRequest extends Message<ByteStreamReaderReadAllRequest> {
522
+ /**
523
+ * @generated from field: required uint64 reader_handle = 1;
524
+ */
525
+ readerHandle?: bigint;
526
+
527
+ constructor(data?: PartialMessage<ByteStreamReaderReadAllRequest>) {
528
+ super();
529
+ proto2.util.initPartial(data, this);
530
+ }
531
+
532
+ static readonly runtime: typeof proto2 = proto2;
533
+ static readonly typeName = "livekit.proto.ByteStreamReaderReadAllRequest";
534
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
535
+ { no: 1, name: "reader_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
536
+ ]);
537
+
538
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ByteStreamReaderReadAllRequest {
539
+ return new ByteStreamReaderReadAllRequest().fromBinary(bytes, options);
540
+ }
541
+
542
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ByteStreamReaderReadAllRequest {
543
+ return new ByteStreamReaderReadAllRequest().fromJson(jsonValue, options);
544
+ }
545
+
546
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ByteStreamReaderReadAllRequest {
547
+ return new ByteStreamReaderReadAllRequest().fromJsonString(jsonString, options);
548
+ }
549
+
550
+ static equals(a: ByteStreamReaderReadAllRequest | PlainMessage<ByteStreamReaderReadAllRequest> | undefined, b: ByteStreamReaderReadAllRequest | PlainMessage<ByteStreamReaderReadAllRequest> | undefined): boolean {
551
+ return proto2.util.equals(ByteStreamReaderReadAllRequest, a, b);
552
+ }
553
+ }
554
+
555
+ /**
556
+ * @generated from message livekit.proto.ByteStreamReaderReadAllResponse
557
+ */
558
+ export class ByteStreamReaderReadAllResponse extends Message<ByteStreamReaderReadAllResponse> {
559
+ /**
560
+ * @generated from field: required uint64 async_id = 1;
561
+ */
562
+ asyncId?: bigint;
563
+
564
+ constructor(data?: PartialMessage<ByteStreamReaderReadAllResponse>) {
565
+ super();
566
+ proto2.util.initPartial(data, this);
567
+ }
568
+
569
+ static readonly runtime: typeof proto2 = proto2;
570
+ static readonly typeName = "livekit.proto.ByteStreamReaderReadAllResponse";
571
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
572
+ { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
573
+ ]);
574
+
575
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ByteStreamReaderReadAllResponse {
576
+ return new ByteStreamReaderReadAllResponse().fromBinary(bytes, options);
577
+ }
578
+
579
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ByteStreamReaderReadAllResponse {
580
+ return new ByteStreamReaderReadAllResponse().fromJson(jsonValue, options);
581
+ }
582
+
583
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ByteStreamReaderReadAllResponse {
584
+ return new ByteStreamReaderReadAllResponse().fromJsonString(jsonString, options);
585
+ }
586
+
587
+ static equals(a: ByteStreamReaderReadAllResponse | PlainMessage<ByteStreamReaderReadAllResponse> | undefined, b: ByteStreamReaderReadAllResponse | PlainMessage<ByteStreamReaderReadAllResponse> | undefined): boolean {
588
+ return proto2.util.equals(ByteStreamReaderReadAllResponse, a, b);
589
+ }
590
+ }
591
+
592
+ /**
593
+ * @generated from message livekit.proto.ByteStreamReaderReadAllCallback
594
+ */
595
+ export class ByteStreamReaderReadAllCallback extends Message<ByteStreamReaderReadAllCallback> {
596
+ /**
597
+ * @generated from field: required uint64 async_id = 1;
598
+ */
599
+ asyncId?: bigint;
600
+
601
+ /**
602
+ * @generated from oneof livekit.proto.ByteStreamReaderReadAllCallback.result
603
+ */
604
+ result: {
605
+ /**
606
+ * @generated from field: bytes content = 2;
607
+ */
608
+ value: Uint8Array;
609
+ case: "content";
610
+ } | {
611
+ /**
612
+ * @generated from field: livekit.proto.StreamError error = 3;
613
+ */
614
+ value: StreamError;
615
+ case: "error";
616
+ } | { case: undefined; value?: undefined } = { case: undefined };
617
+
618
+ constructor(data?: PartialMessage<ByteStreamReaderReadAllCallback>) {
619
+ super();
620
+ proto2.util.initPartial(data, this);
621
+ }
622
+
623
+ static readonly runtime: typeof proto2 = proto2;
624
+ static readonly typeName = "livekit.proto.ByteStreamReaderReadAllCallback";
625
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
626
+ { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
627
+ { no: 2, name: "content", kind: "scalar", T: 12 /* ScalarType.BYTES */, oneof: "result" },
628
+ { no: 3, name: "error", kind: "message", T: StreamError, oneof: "result" },
629
+ ]);
630
+
631
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ByteStreamReaderReadAllCallback {
632
+ return new ByteStreamReaderReadAllCallback().fromBinary(bytes, options);
633
+ }
634
+
635
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ByteStreamReaderReadAllCallback {
636
+ return new ByteStreamReaderReadAllCallback().fromJson(jsonValue, options);
637
+ }
638
+
639
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ByteStreamReaderReadAllCallback {
640
+ return new ByteStreamReaderReadAllCallback().fromJsonString(jsonString, options);
641
+ }
642
+
643
+ static equals(a: ByteStreamReaderReadAllCallback | PlainMessage<ByteStreamReaderReadAllCallback> | undefined, b: ByteStreamReaderReadAllCallback | PlainMessage<ByteStreamReaderReadAllCallback> | undefined): boolean {
644
+ return proto2.util.equals(ByteStreamReaderReadAllCallback, a, b);
645
+ }
646
+ }
647
+
648
+ /**
649
+ * Writes data from an incoming stream to a file as it arrives.
650
+ *
651
+ * @generated from message livekit.proto.ByteStreamReaderWriteToFileRequest
652
+ */
653
+ export class ByteStreamReaderWriteToFileRequest extends Message<ByteStreamReaderWriteToFileRequest> {
654
+ /**
655
+ * @generated from field: required uint64 reader_handle = 1;
656
+ */
657
+ readerHandle?: bigint;
658
+
659
+ /**
660
+ * Directory to write the file in (must be writable by the current process).
661
+ * If not provided, the file will be written to the system's temp directory.
662
+ *
663
+ * @generated from field: optional string directory = 3;
664
+ */
665
+ directory?: string;
666
+
667
+ /**
668
+ * Name to use for the written file.
669
+ * If not provided, the file's name and extension will be inferred from
670
+ * the stream's info.
671
+ *
672
+ * @generated from field: optional string name_override = 4;
673
+ */
674
+ nameOverride?: string;
675
+
676
+ constructor(data?: PartialMessage<ByteStreamReaderWriteToFileRequest>) {
677
+ super();
678
+ proto2.util.initPartial(data, this);
679
+ }
680
+
681
+ static readonly runtime: typeof proto2 = proto2;
682
+ static readonly typeName = "livekit.proto.ByteStreamReaderWriteToFileRequest";
683
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
684
+ { no: 1, name: "reader_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
685
+ { no: 3, name: "directory", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
686
+ { no: 4, name: "name_override", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
687
+ ]);
688
+
689
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ByteStreamReaderWriteToFileRequest {
690
+ return new ByteStreamReaderWriteToFileRequest().fromBinary(bytes, options);
691
+ }
692
+
693
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ByteStreamReaderWriteToFileRequest {
694
+ return new ByteStreamReaderWriteToFileRequest().fromJson(jsonValue, options);
695
+ }
696
+
697
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ByteStreamReaderWriteToFileRequest {
698
+ return new ByteStreamReaderWriteToFileRequest().fromJsonString(jsonString, options);
699
+ }
700
+
701
+ static equals(a: ByteStreamReaderWriteToFileRequest | PlainMessage<ByteStreamReaderWriteToFileRequest> | undefined, b: ByteStreamReaderWriteToFileRequest | PlainMessage<ByteStreamReaderWriteToFileRequest> | undefined): boolean {
702
+ return proto2.util.equals(ByteStreamReaderWriteToFileRequest, a, b);
703
+ }
704
+ }
705
+
706
+ /**
707
+ * @generated from message livekit.proto.ByteStreamReaderWriteToFileResponse
708
+ */
709
+ export class ByteStreamReaderWriteToFileResponse extends Message<ByteStreamReaderWriteToFileResponse> {
710
+ /**
711
+ * @generated from field: required uint64 async_id = 1;
712
+ */
713
+ asyncId?: bigint;
714
+
715
+ constructor(data?: PartialMessage<ByteStreamReaderWriteToFileResponse>) {
716
+ super();
717
+ proto2.util.initPartial(data, this);
718
+ }
719
+
720
+ static readonly runtime: typeof proto2 = proto2;
721
+ static readonly typeName = "livekit.proto.ByteStreamReaderWriteToFileResponse";
722
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
723
+ { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
724
+ ]);
725
+
726
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ByteStreamReaderWriteToFileResponse {
727
+ return new ByteStreamReaderWriteToFileResponse().fromBinary(bytes, options);
728
+ }
729
+
730
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ByteStreamReaderWriteToFileResponse {
731
+ return new ByteStreamReaderWriteToFileResponse().fromJson(jsonValue, options);
732
+ }
733
+
734
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ByteStreamReaderWriteToFileResponse {
735
+ return new ByteStreamReaderWriteToFileResponse().fromJsonString(jsonString, options);
736
+ }
737
+
738
+ static equals(a: ByteStreamReaderWriteToFileResponse | PlainMessage<ByteStreamReaderWriteToFileResponse> | undefined, b: ByteStreamReaderWriteToFileResponse | PlainMessage<ByteStreamReaderWriteToFileResponse> | undefined): boolean {
739
+ return proto2.util.equals(ByteStreamReaderWriteToFileResponse, a, b);
740
+ }
741
+ }
742
+
743
+ /**
744
+ * @generated from message livekit.proto.ByteStreamReaderWriteToFileCallback
745
+ */
746
+ export class ByteStreamReaderWriteToFileCallback extends Message<ByteStreamReaderWriteToFileCallback> {
747
+ /**
748
+ * @generated from field: required uint64 async_id = 1;
749
+ */
750
+ asyncId?: bigint;
751
+
752
+ /**
753
+ * @generated from oneof livekit.proto.ByteStreamReaderWriteToFileCallback.result
754
+ */
755
+ result: {
756
+ /**
757
+ * Path the file was written to.
758
+ *
759
+ * @generated from field: string file_path = 2;
760
+ */
761
+ value: string;
762
+ case: "filePath";
763
+ } | {
764
+ /**
765
+ * @generated from field: livekit.proto.StreamError error = 3;
766
+ */
767
+ value: StreamError;
768
+ case: "error";
769
+ } | { case: undefined; value?: undefined } = { case: undefined };
770
+
771
+ constructor(data?: PartialMessage<ByteStreamReaderWriteToFileCallback>) {
772
+ super();
773
+ proto2.util.initPartial(data, this);
774
+ }
775
+
776
+ static readonly runtime: typeof proto2 = proto2;
777
+ static readonly typeName = "livekit.proto.ByteStreamReaderWriteToFileCallback";
778
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
779
+ { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
780
+ { no: 2, name: "file_path", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "result" },
781
+ { no: 3, name: "error", kind: "message", T: StreamError, oneof: "result" },
782
+ ]);
783
+
784
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ByteStreamReaderWriteToFileCallback {
785
+ return new ByteStreamReaderWriteToFileCallback().fromBinary(bytes, options);
786
+ }
787
+
788
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ByteStreamReaderWriteToFileCallback {
789
+ return new ByteStreamReaderWriteToFileCallback().fromJson(jsonValue, options);
790
+ }
791
+
792
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ByteStreamReaderWriteToFileCallback {
793
+ return new ByteStreamReaderWriteToFileCallback().fromJsonString(jsonString, options);
794
+ }
795
+
796
+ static equals(a: ByteStreamReaderWriteToFileCallback | PlainMessage<ByteStreamReaderWriteToFileCallback> | undefined, b: ByteStreamReaderWriteToFileCallback | PlainMessage<ByteStreamReaderWriteToFileCallback> | undefined): boolean {
797
+ return proto2.util.equals(ByteStreamReaderWriteToFileCallback, a, b);
798
+ }
799
+ }
800
+
801
+ /**
802
+ * @generated from message livekit.proto.ByteStreamReaderEvent
803
+ */
804
+ export class ByteStreamReaderEvent extends Message<ByteStreamReaderEvent> {
805
+ /**
806
+ * @generated from field: required uint64 reader_handle = 1;
807
+ */
808
+ readerHandle?: bigint;
809
+
810
+ /**
811
+ * @generated from oneof livekit.proto.ByteStreamReaderEvent.detail
812
+ */
813
+ detail: {
814
+ /**
815
+ * @generated from field: livekit.proto.ByteStreamReaderChunkReceived chunk_received = 2;
816
+ */
817
+ value: ByteStreamReaderChunkReceived;
818
+ case: "chunkReceived";
819
+ } | {
820
+ /**
821
+ * @generated from field: livekit.proto.ByteStreamReaderEOS eos = 3;
822
+ */
823
+ value: ByteStreamReaderEOS;
824
+ case: "eos";
825
+ } | { case: undefined; value?: undefined } = { case: undefined };
826
+
827
+ constructor(data?: PartialMessage<ByteStreamReaderEvent>) {
828
+ super();
829
+ proto2.util.initPartial(data, this);
830
+ }
831
+
832
+ static readonly runtime: typeof proto2 = proto2;
833
+ static readonly typeName = "livekit.proto.ByteStreamReaderEvent";
834
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
835
+ { no: 1, name: "reader_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
836
+ { no: 2, name: "chunk_received", kind: "message", T: ByteStreamReaderChunkReceived, oneof: "detail" },
837
+ { no: 3, name: "eos", kind: "message", T: ByteStreamReaderEOS, oneof: "detail" },
838
+ ]);
839
+
840
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ByteStreamReaderEvent {
841
+ return new ByteStreamReaderEvent().fromBinary(bytes, options);
842
+ }
843
+
844
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ByteStreamReaderEvent {
845
+ return new ByteStreamReaderEvent().fromJson(jsonValue, options);
846
+ }
847
+
848
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ByteStreamReaderEvent {
849
+ return new ByteStreamReaderEvent().fromJsonString(jsonString, options);
850
+ }
851
+
852
+ static equals(a: ByteStreamReaderEvent | PlainMessage<ByteStreamReaderEvent> | undefined, b: ByteStreamReaderEvent | PlainMessage<ByteStreamReaderEvent> | undefined): boolean {
853
+ return proto2.util.equals(ByteStreamReaderEvent, a, b);
854
+ }
855
+ }
856
+
857
+ /**
858
+ * @generated from message livekit.proto.ByteStreamReaderChunkReceived
859
+ */
860
+ export class ByteStreamReaderChunkReceived extends Message<ByteStreamReaderChunkReceived> {
861
+ /**
862
+ * @generated from field: required bytes content = 1;
863
+ */
864
+ content?: Uint8Array;
865
+
866
+ constructor(data?: PartialMessage<ByteStreamReaderChunkReceived>) {
867
+ super();
868
+ proto2.util.initPartial(data, this);
869
+ }
870
+
871
+ static readonly runtime: typeof proto2 = proto2;
872
+ static readonly typeName = "livekit.proto.ByteStreamReaderChunkReceived";
873
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
874
+ { no: 1, name: "content", kind: "scalar", T: 12 /* ScalarType.BYTES */, req: true },
875
+ ]);
876
+
877
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ByteStreamReaderChunkReceived {
878
+ return new ByteStreamReaderChunkReceived().fromBinary(bytes, options);
879
+ }
880
+
881
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ByteStreamReaderChunkReceived {
882
+ return new ByteStreamReaderChunkReceived().fromJson(jsonValue, options);
883
+ }
884
+
885
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ByteStreamReaderChunkReceived {
886
+ return new ByteStreamReaderChunkReceived().fromJsonString(jsonString, options);
887
+ }
888
+
889
+ static equals(a: ByteStreamReaderChunkReceived | PlainMessage<ByteStreamReaderChunkReceived> | undefined, b: ByteStreamReaderChunkReceived | PlainMessage<ByteStreamReaderChunkReceived> | undefined): boolean {
890
+ return proto2.util.equals(ByteStreamReaderChunkReceived, a, b);
891
+ }
892
+ }
893
+
894
+ /**
895
+ * @generated from message livekit.proto.ByteStreamReaderEOS
896
+ */
897
+ export class ByteStreamReaderEOS extends Message<ByteStreamReaderEOS> {
898
+ /**
899
+ * @generated from field: optional livekit.proto.StreamError error = 1;
900
+ */
901
+ error?: StreamError;
902
+
903
+ constructor(data?: PartialMessage<ByteStreamReaderEOS>) {
904
+ super();
905
+ proto2.util.initPartial(data, this);
906
+ }
907
+
908
+ static readonly runtime: typeof proto2 = proto2;
909
+ static readonly typeName = "livekit.proto.ByteStreamReaderEOS";
910
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
911
+ { no: 1, name: "error", kind: "message", T: StreamError, opt: true },
912
+ ]);
913
+
914
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ByteStreamReaderEOS {
915
+ return new ByteStreamReaderEOS().fromBinary(bytes, options);
916
+ }
917
+
918
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ByteStreamReaderEOS {
919
+ return new ByteStreamReaderEOS().fromJson(jsonValue, options);
920
+ }
921
+
922
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ByteStreamReaderEOS {
923
+ return new ByteStreamReaderEOS().fromJsonString(jsonString, options);
924
+ }
925
+
926
+ static equals(a: ByteStreamReaderEOS | PlainMessage<ByteStreamReaderEOS> | undefined, b: ByteStreamReaderEOS | PlainMessage<ByteStreamReaderEOS> | undefined): boolean {
927
+ return proto2.util.equals(ByteStreamReaderEOS, a, b);
928
+ }
929
+ }
930
+
931
+ /**
932
+ * Sends the contents of a file over a data stream.
933
+ *
934
+ * @generated from message livekit.proto.StreamSendFileRequest
935
+ */
936
+ export class StreamSendFileRequest extends Message<StreamSendFileRequest> {
937
+ /**
938
+ * @generated from field: required uint64 local_participant_handle = 1;
939
+ */
940
+ localParticipantHandle?: bigint;
941
+
942
+ /**
943
+ * @generated from field: required livekit.proto.StreamByteOptions options = 2;
944
+ */
945
+ options?: StreamByteOptions;
946
+
947
+ /**
948
+ * Path of the file to send (must be readable by the current process).
949
+ *
950
+ * @generated from field: required string file_path = 3;
951
+ */
952
+ filePath?: string;
953
+
954
+ constructor(data?: PartialMessage<StreamSendFileRequest>) {
955
+ super();
956
+ proto2.util.initPartial(data, this);
957
+ }
958
+
959
+ static readonly runtime: typeof proto2 = proto2;
960
+ static readonly typeName = "livekit.proto.StreamSendFileRequest";
961
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
962
+ { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
963
+ { no: 2, name: "options", kind: "message", T: StreamByteOptions, req: true },
964
+ { no: 3, name: "file_path", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true },
965
+ ]);
966
+
967
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): StreamSendFileRequest {
968
+ return new StreamSendFileRequest().fromBinary(bytes, options);
969
+ }
970
+
971
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): StreamSendFileRequest {
972
+ return new StreamSendFileRequest().fromJson(jsonValue, options);
973
+ }
974
+
975
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): StreamSendFileRequest {
976
+ return new StreamSendFileRequest().fromJsonString(jsonString, options);
977
+ }
978
+
979
+ static equals(a: StreamSendFileRequest | PlainMessage<StreamSendFileRequest> | undefined, b: StreamSendFileRequest | PlainMessage<StreamSendFileRequest> | undefined): boolean {
980
+ return proto2.util.equals(StreamSendFileRequest, a, b);
981
+ }
982
+ }
983
+
984
+ /**
985
+ * @generated from message livekit.proto.StreamSendFileResponse
986
+ */
987
+ export class StreamSendFileResponse extends Message<StreamSendFileResponse> {
988
+ /**
989
+ * @generated from field: required uint64 async_id = 1;
990
+ */
991
+ asyncId?: bigint;
992
+
993
+ constructor(data?: PartialMessage<StreamSendFileResponse>) {
994
+ super();
995
+ proto2.util.initPartial(data, this);
996
+ }
997
+
998
+ static readonly runtime: typeof proto2 = proto2;
999
+ static readonly typeName = "livekit.proto.StreamSendFileResponse";
1000
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
1001
+ { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
1002
+ ]);
1003
+
1004
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): StreamSendFileResponse {
1005
+ return new StreamSendFileResponse().fromBinary(bytes, options);
1006
+ }
1007
+
1008
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): StreamSendFileResponse {
1009
+ return new StreamSendFileResponse().fromJson(jsonValue, options);
1010
+ }
1011
+
1012
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): StreamSendFileResponse {
1013
+ return new StreamSendFileResponse().fromJsonString(jsonString, options);
1014
+ }
1015
+
1016
+ static equals(a: StreamSendFileResponse | PlainMessage<StreamSendFileResponse> | undefined, b: StreamSendFileResponse | PlainMessage<StreamSendFileResponse> | undefined): boolean {
1017
+ return proto2.util.equals(StreamSendFileResponse, a, b);
1018
+ }
1019
+ }
1020
+
1021
+ /**
1022
+ * @generated from message livekit.proto.StreamSendFileCallback
1023
+ */
1024
+ export class StreamSendFileCallback extends Message<StreamSendFileCallback> {
1025
+ /**
1026
+ * @generated from field: required uint64 async_id = 1;
1027
+ */
1028
+ asyncId?: bigint;
1029
+
1030
+ /**
1031
+ * @generated from oneof livekit.proto.StreamSendFileCallback.result
1032
+ */
1033
+ result: {
1034
+ /**
1035
+ * @generated from field: livekit.proto.ByteStreamInfo info = 2;
1036
+ */
1037
+ value: ByteStreamInfo;
1038
+ case: "info";
1039
+ } | {
1040
+ /**
1041
+ * @generated from field: livekit.proto.StreamError error = 3;
1042
+ */
1043
+ value: StreamError;
1044
+ case: "error";
1045
+ } | { case: undefined; value?: undefined } = { case: undefined };
1046
+
1047
+ constructor(data?: PartialMessage<StreamSendFileCallback>) {
1048
+ super();
1049
+ proto2.util.initPartial(data, this);
1050
+ }
1051
+
1052
+ static readonly runtime: typeof proto2 = proto2;
1053
+ static readonly typeName = "livekit.proto.StreamSendFileCallback";
1054
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
1055
+ { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
1056
+ { no: 2, name: "info", kind: "message", T: ByteStreamInfo, oneof: "result" },
1057
+ { no: 3, name: "error", kind: "message", T: StreamError, oneof: "result" },
1058
+ ]);
1059
+
1060
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): StreamSendFileCallback {
1061
+ return new StreamSendFileCallback().fromBinary(bytes, options);
1062
+ }
1063
+
1064
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): StreamSendFileCallback {
1065
+ return new StreamSendFileCallback().fromJson(jsonValue, options);
1066
+ }
1067
+
1068
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): StreamSendFileCallback {
1069
+ return new StreamSendFileCallback().fromJsonString(jsonString, options);
1070
+ }
1071
+
1072
+ static equals(a: StreamSendFileCallback | PlainMessage<StreamSendFileCallback> | undefined, b: StreamSendFileCallback | PlainMessage<StreamSendFileCallback> | undefined): boolean {
1073
+ return proto2.util.equals(StreamSendFileCallback, a, b);
1074
+ }
1075
+ }
1076
+
1077
+ /**
1078
+ * Sends text over a data stream.
1079
+ *
1080
+ * @generated from message livekit.proto.StreamSendTextRequest
1081
+ */
1082
+ export class StreamSendTextRequest extends Message<StreamSendTextRequest> {
1083
+ /**
1084
+ * @generated from field: required uint64 local_participant_handle = 1;
1085
+ */
1086
+ localParticipantHandle?: bigint;
1087
+
1088
+ /**
1089
+ * @generated from field: required livekit.proto.StreamTextOptions options = 2;
1090
+ */
1091
+ options?: StreamTextOptions;
1092
+
1093
+ /**
1094
+ * Text to send.
1095
+ *
1096
+ * @generated from field: required string text = 3;
1097
+ */
1098
+ text?: string;
1099
+
1100
+ constructor(data?: PartialMessage<StreamSendTextRequest>) {
1101
+ super();
1102
+ proto2.util.initPartial(data, this);
1103
+ }
1104
+
1105
+ static readonly runtime: typeof proto2 = proto2;
1106
+ static readonly typeName = "livekit.proto.StreamSendTextRequest";
1107
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
1108
+ { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
1109
+ { no: 2, name: "options", kind: "message", T: StreamTextOptions, req: true },
1110
+ { no: 3, name: "text", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true },
1111
+ ]);
1112
+
1113
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): StreamSendTextRequest {
1114
+ return new StreamSendTextRequest().fromBinary(bytes, options);
1115
+ }
1116
+
1117
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): StreamSendTextRequest {
1118
+ return new StreamSendTextRequest().fromJson(jsonValue, options);
1119
+ }
1120
+
1121
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): StreamSendTextRequest {
1122
+ return new StreamSendTextRequest().fromJsonString(jsonString, options);
1123
+ }
1124
+
1125
+ static equals(a: StreamSendTextRequest | PlainMessage<StreamSendTextRequest> | undefined, b: StreamSendTextRequest | PlainMessage<StreamSendTextRequest> | undefined): boolean {
1126
+ return proto2.util.equals(StreamSendTextRequest, a, b);
1127
+ }
1128
+ }
1129
+
1130
+ /**
1131
+ * @generated from message livekit.proto.StreamSendTextResponse
1132
+ */
1133
+ export class StreamSendTextResponse extends Message<StreamSendTextResponse> {
1134
+ /**
1135
+ * @generated from field: required uint64 async_id = 1;
1136
+ */
1137
+ asyncId?: bigint;
1138
+
1139
+ constructor(data?: PartialMessage<StreamSendTextResponse>) {
1140
+ super();
1141
+ proto2.util.initPartial(data, this);
1142
+ }
1143
+
1144
+ static readonly runtime: typeof proto2 = proto2;
1145
+ static readonly typeName = "livekit.proto.StreamSendTextResponse";
1146
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
1147
+ { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
1148
+ ]);
1149
+
1150
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): StreamSendTextResponse {
1151
+ return new StreamSendTextResponse().fromBinary(bytes, options);
1152
+ }
1153
+
1154
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): StreamSendTextResponse {
1155
+ return new StreamSendTextResponse().fromJson(jsonValue, options);
1156
+ }
1157
+
1158
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): StreamSendTextResponse {
1159
+ return new StreamSendTextResponse().fromJsonString(jsonString, options);
1160
+ }
1161
+
1162
+ static equals(a: StreamSendTextResponse | PlainMessage<StreamSendTextResponse> | undefined, b: StreamSendTextResponse | PlainMessage<StreamSendTextResponse> | undefined): boolean {
1163
+ return proto2.util.equals(StreamSendTextResponse, a, b);
1164
+ }
1165
+ }
1166
+
1167
+ /**
1168
+ * @generated from message livekit.proto.StreamSendTextCallback
1169
+ */
1170
+ export class StreamSendTextCallback extends Message<StreamSendTextCallback> {
1171
+ /**
1172
+ * @generated from field: required uint64 async_id = 1;
1173
+ */
1174
+ asyncId?: bigint;
1175
+
1176
+ /**
1177
+ * @generated from oneof livekit.proto.StreamSendTextCallback.result
1178
+ */
1179
+ result: {
1180
+ /**
1181
+ * @generated from field: livekit.proto.TextStreamInfo info = 2;
1182
+ */
1183
+ value: TextStreamInfo;
1184
+ case: "info";
1185
+ } | {
1186
+ /**
1187
+ * @generated from field: livekit.proto.StreamError error = 3;
1188
+ */
1189
+ value: StreamError;
1190
+ case: "error";
1191
+ } | { case: undefined; value?: undefined } = { case: undefined };
1192
+
1193
+ constructor(data?: PartialMessage<StreamSendTextCallback>) {
1194
+ super();
1195
+ proto2.util.initPartial(data, this);
1196
+ }
1197
+
1198
+ static readonly runtime: typeof proto2 = proto2;
1199
+ static readonly typeName = "livekit.proto.StreamSendTextCallback";
1200
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
1201
+ { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
1202
+ { no: 2, name: "info", kind: "message", T: TextStreamInfo, oneof: "result" },
1203
+ { no: 3, name: "error", kind: "message", T: StreamError, oneof: "result" },
1204
+ ]);
1205
+
1206
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): StreamSendTextCallback {
1207
+ return new StreamSendTextCallback().fromBinary(bytes, options);
1208
+ }
1209
+
1210
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): StreamSendTextCallback {
1211
+ return new StreamSendTextCallback().fromJson(jsonValue, options);
1212
+ }
1213
+
1214
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): StreamSendTextCallback {
1215
+ return new StreamSendTextCallback().fromJsonString(jsonString, options);
1216
+ }
1217
+
1218
+ static equals(a: StreamSendTextCallback | PlainMessage<StreamSendTextCallback> | undefined, b: StreamSendTextCallback | PlainMessage<StreamSendTextCallback> | undefined): boolean {
1219
+ return proto2.util.equals(StreamSendTextCallback, a, b);
1220
+ }
1221
+ }
1222
+
1223
+ /**
1224
+ * @generated from message livekit.proto.OwnedByteStreamWriter
1225
+ */
1226
+ export class OwnedByteStreamWriter extends Message<OwnedByteStreamWriter> {
1227
+ /**
1228
+ * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1;
1229
+ */
1230
+ handle?: FfiOwnedHandle;
1231
+
1232
+ /**
1233
+ * @generated from field: required livekit.proto.ByteStreamInfo info = 2;
1234
+ */
1235
+ info?: ByteStreamInfo;
1236
+
1237
+ constructor(data?: PartialMessage<OwnedByteStreamWriter>) {
1238
+ super();
1239
+ proto2.util.initPartial(data, this);
1240
+ }
1241
+
1242
+ static readonly runtime: typeof proto2 = proto2;
1243
+ static readonly typeName = "livekit.proto.OwnedByteStreamWriter";
1244
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
1245
+ { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle, req: true },
1246
+ { no: 2, name: "info", kind: "message", T: ByteStreamInfo, req: true },
1247
+ ]);
1248
+
1249
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): OwnedByteStreamWriter {
1250
+ return new OwnedByteStreamWriter().fromBinary(bytes, options);
1251
+ }
1252
+
1253
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): OwnedByteStreamWriter {
1254
+ return new OwnedByteStreamWriter().fromJson(jsonValue, options);
1255
+ }
1256
+
1257
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): OwnedByteStreamWriter {
1258
+ return new OwnedByteStreamWriter().fromJsonString(jsonString, options);
1259
+ }
1260
+
1261
+ static equals(a: OwnedByteStreamWriter | PlainMessage<OwnedByteStreamWriter> | undefined, b: OwnedByteStreamWriter | PlainMessage<OwnedByteStreamWriter> | undefined): boolean {
1262
+ return proto2.util.equals(OwnedByteStreamWriter, a, b);
1263
+ }
1264
+ }
1265
+
1266
+ /**
1267
+ * Opens an outgoing stream.
1268
+ * Call must be balanced with a StreamCloseRequest.
1269
+ *
1270
+ * @generated from message livekit.proto.ByteStreamOpenRequest
1271
+ */
1272
+ export class ByteStreamOpenRequest extends Message<ByteStreamOpenRequest> {
1273
+ /**
1274
+ * @generated from field: required uint64 local_participant_handle = 1;
1275
+ */
1276
+ localParticipantHandle?: bigint;
1277
+
1278
+ /**
1279
+ * Options to use for opening the stream.
1280
+ *
1281
+ * @generated from field: required livekit.proto.StreamByteOptions options = 2;
1282
+ */
1283
+ options?: StreamByteOptions;
1284
+
1285
+ constructor(data?: PartialMessage<ByteStreamOpenRequest>) {
1286
+ super();
1287
+ proto2.util.initPartial(data, this);
1288
+ }
1289
+
1290
+ static readonly runtime: typeof proto2 = proto2;
1291
+ static readonly typeName = "livekit.proto.ByteStreamOpenRequest";
1292
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
1293
+ { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
1294
+ { no: 2, name: "options", kind: "message", T: StreamByteOptions, req: true },
1295
+ ]);
1296
+
1297
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ByteStreamOpenRequest {
1298
+ return new ByteStreamOpenRequest().fromBinary(bytes, options);
1299
+ }
1300
+
1301
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ByteStreamOpenRequest {
1302
+ return new ByteStreamOpenRequest().fromJson(jsonValue, options);
1303
+ }
1304
+
1305
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ByteStreamOpenRequest {
1306
+ return new ByteStreamOpenRequest().fromJsonString(jsonString, options);
1307
+ }
1308
+
1309
+ static equals(a: ByteStreamOpenRequest | PlainMessage<ByteStreamOpenRequest> | undefined, b: ByteStreamOpenRequest | PlainMessage<ByteStreamOpenRequest> | undefined): boolean {
1310
+ return proto2.util.equals(ByteStreamOpenRequest, a, b);
1311
+ }
1312
+ }
1313
+
1314
+ /**
1315
+ * @generated from message livekit.proto.ByteStreamOpenResponse
1316
+ */
1317
+ export class ByteStreamOpenResponse extends Message<ByteStreamOpenResponse> {
1318
+ /**
1319
+ * @generated from field: required uint64 async_id = 1;
1320
+ */
1321
+ asyncId?: bigint;
1322
+
1323
+ constructor(data?: PartialMessage<ByteStreamOpenResponse>) {
1324
+ super();
1325
+ proto2.util.initPartial(data, this);
1326
+ }
1327
+
1328
+ static readonly runtime: typeof proto2 = proto2;
1329
+ static readonly typeName = "livekit.proto.ByteStreamOpenResponse";
1330
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
1331
+ { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
1332
+ ]);
1333
+
1334
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ByteStreamOpenResponse {
1335
+ return new ByteStreamOpenResponse().fromBinary(bytes, options);
1336
+ }
1337
+
1338
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ByteStreamOpenResponse {
1339
+ return new ByteStreamOpenResponse().fromJson(jsonValue, options);
1340
+ }
1341
+
1342
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ByteStreamOpenResponse {
1343
+ return new ByteStreamOpenResponse().fromJsonString(jsonString, options);
1344
+ }
1345
+
1346
+ static equals(a: ByteStreamOpenResponse | PlainMessage<ByteStreamOpenResponse> | undefined, b: ByteStreamOpenResponse | PlainMessage<ByteStreamOpenResponse> | undefined): boolean {
1347
+ return proto2.util.equals(ByteStreamOpenResponse, a, b);
1348
+ }
1349
+ }
1350
+
1351
+ /**
1352
+ * @generated from message livekit.proto.ByteStreamOpenCallback
1353
+ */
1354
+ export class ByteStreamOpenCallback extends Message<ByteStreamOpenCallback> {
1355
+ /**
1356
+ * @generated from field: required uint64 async_id = 1;
1357
+ */
1358
+ asyncId?: bigint;
1359
+
1360
+ /**
1361
+ * @generated from oneof livekit.proto.ByteStreamOpenCallback.result
1362
+ */
1363
+ result: {
1364
+ /**
1365
+ * @generated from field: livekit.proto.OwnedByteStreamWriter writer = 2;
1366
+ */
1367
+ value: OwnedByteStreamWriter;
1368
+ case: "writer";
1369
+ } | {
1370
+ /**
1371
+ * @generated from field: livekit.proto.StreamError error = 3;
1372
+ */
1373
+ value: StreamError;
1374
+ case: "error";
1375
+ } | { case: undefined; value?: undefined } = { case: undefined };
1376
+
1377
+ constructor(data?: PartialMessage<ByteStreamOpenCallback>) {
1378
+ super();
1379
+ proto2.util.initPartial(data, this);
1380
+ }
1381
+
1382
+ static readonly runtime: typeof proto2 = proto2;
1383
+ static readonly typeName = "livekit.proto.ByteStreamOpenCallback";
1384
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
1385
+ { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
1386
+ { no: 2, name: "writer", kind: "message", T: OwnedByteStreamWriter, oneof: "result" },
1387
+ { no: 3, name: "error", kind: "message", T: StreamError, oneof: "result" },
1388
+ ]);
1389
+
1390
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ByteStreamOpenCallback {
1391
+ return new ByteStreamOpenCallback().fromBinary(bytes, options);
1392
+ }
1393
+
1394
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ByteStreamOpenCallback {
1395
+ return new ByteStreamOpenCallback().fromJson(jsonValue, options);
1396
+ }
1397
+
1398
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ByteStreamOpenCallback {
1399
+ return new ByteStreamOpenCallback().fromJsonString(jsonString, options);
1400
+ }
1401
+
1402
+ static equals(a: ByteStreamOpenCallback | PlainMessage<ByteStreamOpenCallback> | undefined, b: ByteStreamOpenCallback | PlainMessage<ByteStreamOpenCallback> | undefined): boolean {
1403
+ return proto2.util.equals(ByteStreamOpenCallback, a, b);
1404
+ }
1405
+ }
1406
+
1407
+ /**
1408
+ * Writes data to a stream writer.
1409
+ *
1410
+ * @generated from message livekit.proto.ByteStreamWriterWriteRequest
1411
+ */
1412
+ export class ByteStreamWriterWriteRequest extends Message<ByteStreamWriterWriteRequest> {
1413
+ /**
1414
+ * @generated from field: required uint64 writer_handle = 1;
1415
+ */
1416
+ writerHandle?: bigint;
1417
+
1418
+ /**
1419
+ * @generated from field: required bytes bytes = 2;
1420
+ */
1421
+ bytes?: Uint8Array;
1422
+
1423
+ constructor(data?: PartialMessage<ByteStreamWriterWriteRequest>) {
1424
+ super();
1425
+ proto2.util.initPartial(data, this);
1426
+ }
1427
+
1428
+ static readonly runtime: typeof proto2 = proto2;
1429
+ static readonly typeName = "livekit.proto.ByteStreamWriterWriteRequest";
1430
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
1431
+ { no: 1, name: "writer_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
1432
+ { no: 2, name: "bytes", kind: "scalar", T: 12 /* ScalarType.BYTES */, req: true },
1433
+ ]);
1434
+
1435
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ByteStreamWriterWriteRequest {
1436
+ return new ByteStreamWriterWriteRequest().fromBinary(bytes, options);
1437
+ }
1438
+
1439
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ByteStreamWriterWriteRequest {
1440
+ return new ByteStreamWriterWriteRequest().fromJson(jsonValue, options);
1441
+ }
1442
+
1443
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ByteStreamWriterWriteRequest {
1444
+ return new ByteStreamWriterWriteRequest().fromJsonString(jsonString, options);
1445
+ }
1446
+
1447
+ static equals(a: ByteStreamWriterWriteRequest | PlainMessage<ByteStreamWriterWriteRequest> | undefined, b: ByteStreamWriterWriteRequest | PlainMessage<ByteStreamWriterWriteRequest> | undefined): boolean {
1448
+ return proto2.util.equals(ByteStreamWriterWriteRequest, a, b);
1449
+ }
1450
+ }
1451
+
1452
+ /**
1453
+ * @generated from message livekit.proto.ByteStreamWriterWriteResponse
1454
+ */
1455
+ export class ByteStreamWriterWriteResponse extends Message<ByteStreamWriterWriteResponse> {
1456
+ /**
1457
+ * @generated from field: required uint64 async_id = 1;
1458
+ */
1459
+ asyncId?: bigint;
1460
+
1461
+ constructor(data?: PartialMessage<ByteStreamWriterWriteResponse>) {
1462
+ super();
1463
+ proto2.util.initPartial(data, this);
1464
+ }
1465
+
1466
+ static readonly runtime: typeof proto2 = proto2;
1467
+ static readonly typeName = "livekit.proto.ByteStreamWriterWriteResponse";
1468
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
1469
+ { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
1470
+ ]);
1471
+
1472
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ByteStreamWriterWriteResponse {
1473
+ return new ByteStreamWriterWriteResponse().fromBinary(bytes, options);
1474
+ }
1475
+
1476
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ByteStreamWriterWriteResponse {
1477
+ return new ByteStreamWriterWriteResponse().fromJson(jsonValue, options);
1478
+ }
1479
+
1480
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ByteStreamWriterWriteResponse {
1481
+ return new ByteStreamWriterWriteResponse().fromJsonString(jsonString, options);
1482
+ }
1483
+
1484
+ static equals(a: ByteStreamWriterWriteResponse | PlainMessage<ByteStreamWriterWriteResponse> | undefined, b: ByteStreamWriterWriteResponse | PlainMessage<ByteStreamWriterWriteResponse> | undefined): boolean {
1485
+ return proto2.util.equals(ByteStreamWriterWriteResponse, a, b);
1486
+ }
1487
+ }
1488
+
1489
+ /**
1490
+ * @generated from message livekit.proto.ByteStreamWriterWriteCallback
1491
+ */
1492
+ export class ByteStreamWriterWriteCallback extends Message<ByteStreamWriterWriteCallback> {
1493
+ /**
1494
+ * @generated from field: required uint64 async_id = 1;
1495
+ */
1496
+ asyncId?: bigint;
1497
+
1498
+ /**
1499
+ * @generated from field: optional livekit.proto.StreamError error = 2;
1500
+ */
1501
+ error?: StreamError;
1502
+
1503
+ constructor(data?: PartialMessage<ByteStreamWriterWriteCallback>) {
1504
+ super();
1505
+ proto2.util.initPartial(data, this);
1506
+ }
1507
+
1508
+ static readonly runtime: typeof proto2 = proto2;
1509
+ static readonly typeName = "livekit.proto.ByteStreamWriterWriteCallback";
1510
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
1511
+ { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
1512
+ { no: 2, name: "error", kind: "message", T: StreamError, opt: true },
1513
+ ]);
1514
+
1515
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ByteStreamWriterWriteCallback {
1516
+ return new ByteStreamWriterWriteCallback().fromBinary(bytes, options);
1517
+ }
1518
+
1519
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ByteStreamWriterWriteCallback {
1520
+ return new ByteStreamWriterWriteCallback().fromJson(jsonValue, options);
1521
+ }
1522
+
1523
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ByteStreamWriterWriteCallback {
1524
+ return new ByteStreamWriterWriteCallback().fromJsonString(jsonString, options);
1525
+ }
1526
+
1527
+ static equals(a: ByteStreamWriterWriteCallback | PlainMessage<ByteStreamWriterWriteCallback> | undefined, b: ByteStreamWriterWriteCallback | PlainMessage<ByteStreamWriterWriteCallback> | undefined): boolean {
1528
+ return proto2.util.equals(ByteStreamWriterWriteCallback, a, b);
1529
+ }
1530
+ }
1531
+
1532
+ /**
1533
+ * Closes a stream writer.
1534
+ *
1535
+ * @generated from message livekit.proto.ByteStreamWriterCloseRequest
1536
+ */
1537
+ export class ByteStreamWriterCloseRequest extends Message<ByteStreamWriterCloseRequest> {
1538
+ /**
1539
+ * @generated from field: required uint64 writer_handle = 1;
1540
+ */
1541
+ writerHandle?: bigint;
1542
+
1543
+ /**
1544
+ * @generated from field: optional string reason = 2;
1545
+ */
1546
+ reason?: string;
1547
+
1548
+ constructor(data?: PartialMessage<ByteStreamWriterCloseRequest>) {
1549
+ super();
1550
+ proto2.util.initPartial(data, this);
1551
+ }
1552
+
1553
+ static readonly runtime: typeof proto2 = proto2;
1554
+ static readonly typeName = "livekit.proto.ByteStreamWriterCloseRequest";
1555
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
1556
+ { no: 1, name: "writer_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
1557
+ { no: 2, name: "reason", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
1558
+ ]);
1559
+
1560
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ByteStreamWriterCloseRequest {
1561
+ return new ByteStreamWriterCloseRequest().fromBinary(bytes, options);
1562
+ }
1563
+
1564
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ByteStreamWriterCloseRequest {
1565
+ return new ByteStreamWriterCloseRequest().fromJson(jsonValue, options);
1566
+ }
1567
+
1568
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ByteStreamWriterCloseRequest {
1569
+ return new ByteStreamWriterCloseRequest().fromJsonString(jsonString, options);
1570
+ }
1571
+
1572
+ static equals(a: ByteStreamWriterCloseRequest | PlainMessage<ByteStreamWriterCloseRequest> | undefined, b: ByteStreamWriterCloseRequest | PlainMessage<ByteStreamWriterCloseRequest> | undefined): boolean {
1573
+ return proto2.util.equals(ByteStreamWriterCloseRequest, a, b);
1574
+ }
1575
+ }
1576
+
1577
+ /**
1578
+ * @generated from message livekit.proto.ByteStreamWriterCloseResponse
1579
+ */
1580
+ export class ByteStreamWriterCloseResponse extends Message<ByteStreamWriterCloseResponse> {
1581
+ /**
1582
+ * @generated from field: required uint64 async_id = 1;
1583
+ */
1584
+ asyncId?: bigint;
1585
+
1586
+ constructor(data?: PartialMessage<ByteStreamWriterCloseResponse>) {
1587
+ super();
1588
+ proto2.util.initPartial(data, this);
1589
+ }
1590
+
1591
+ static readonly runtime: typeof proto2 = proto2;
1592
+ static readonly typeName = "livekit.proto.ByteStreamWriterCloseResponse";
1593
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
1594
+ { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
1595
+ ]);
1596
+
1597
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ByteStreamWriterCloseResponse {
1598
+ return new ByteStreamWriterCloseResponse().fromBinary(bytes, options);
1599
+ }
1600
+
1601
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ByteStreamWriterCloseResponse {
1602
+ return new ByteStreamWriterCloseResponse().fromJson(jsonValue, options);
1603
+ }
1604
+
1605
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ByteStreamWriterCloseResponse {
1606
+ return new ByteStreamWriterCloseResponse().fromJsonString(jsonString, options);
1607
+ }
1608
+
1609
+ static equals(a: ByteStreamWriterCloseResponse | PlainMessage<ByteStreamWriterCloseResponse> | undefined, b: ByteStreamWriterCloseResponse | PlainMessage<ByteStreamWriterCloseResponse> | undefined): boolean {
1610
+ return proto2.util.equals(ByteStreamWriterCloseResponse, a, b);
1611
+ }
1612
+ }
1613
+
1614
+ /**
1615
+ * @generated from message livekit.proto.ByteStreamWriterCloseCallback
1616
+ */
1617
+ export class ByteStreamWriterCloseCallback extends Message<ByteStreamWriterCloseCallback> {
1618
+ /**
1619
+ * @generated from field: required uint64 async_id = 1;
1620
+ */
1621
+ asyncId?: bigint;
1622
+
1623
+ /**
1624
+ * @generated from field: optional livekit.proto.StreamError error = 2;
1625
+ */
1626
+ error?: StreamError;
1627
+
1628
+ constructor(data?: PartialMessage<ByteStreamWriterCloseCallback>) {
1629
+ super();
1630
+ proto2.util.initPartial(data, this);
1631
+ }
1632
+
1633
+ static readonly runtime: typeof proto2 = proto2;
1634
+ static readonly typeName = "livekit.proto.ByteStreamWriterCloseCallback";
1635
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
1636
+ { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
1637
+ { no: 2, name: "error", kind: "message", T: StreamError, opt: true },
1638
+ ]);
1639
+
1640
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ByteStreamWriterCloseCallback {
1641
+ return new ByteStreamWriterCloseCallback().fromBinary(bytes, options);
1642
+ }
1643
+
1644
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ByteStreamWriterCloseCallback {
1645
+ return new ByteStreamWriterCloseCallback().fromJson(jsonValue, options);
1646
+ }
1647
+
1648
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ByteStreamWriterCloseCallback {
1649
+ return new ByteStreamWriterCloseCallback().fromJsonString(jsonString, options);
1650
+ }
1651
+
1652
+ static equals(a: ByteStreamWriterCloseCallback | PlainMessage<ByteStreamWriterCloseCallback> | undefined, b: ByteStreamWriterCloseCallback | PlainMessage<ByteStreamWriterCloseCallback> | undefined): boolean {
1653
+ return proto2.util.equals(ByteStreamWriterCloseCallback, a, b);
1654
+ }
1655
+ }
1656
+
1657
+ /**
1658
+ * @generated from message livekit.proto.OwnedTextStreamWriter
1659
+ */
1660
+ export class OwnedTextStreamWriter extends Message<OwnedTextStreamWriter> {
1661
+ /**
1662
+ * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1;
1663
+ */
1664
+ handle?: FfiOwnedHandle;
1665
+
1666
+ /**
1667
+ * @generated from field: required livekit.proto.TextStreamInfo info = 2;
1668
+ */
1669
+ info?: TextStreamInfo;
1670
+
1671
+ constructor(data?: PartialMessage<OwnedTextStreamWriter>) {
1672
+ super();
1673
+ proto2.util.initPartial(data, this);
1674
+ }
1675
+
1676
+ static readonly runtime: typeof proto2 = proto2;
1677
+ static readonly typeName = "livekit.proto.OwnedTextStreamWriter";
1678
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
1679
+ { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle, req: true },
1680
+ { no: 2, name: "info", kind: "message", T: TextStreamInfo, req: true },
1681
+ ]);
1682
+
1683
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): OwnedTextStreamWriter {
1684
+ return new OwnedTextStreamWriter().fromBinary(bytes, options);
1685
+ }
1686
+
1687
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): OwnedTextStreamWriter {
1688
+ return new OwnedTextStreamWriter().fromJson(jsonValue, options);
1689
+ }
1690
+
1691
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): OwnedTextStreamWriter {
1692
+ return new OwnedTextStreamWriter().fromJsonString(jsonString, options);
1693
+ }
1694
+
1695
+ static equals(a: OwnedTextStreamWriter | PlainMessage<OwnedTextStreamWriter> | undefined, b: OwnedTextStreamWriter | PlainMessage<OwnedTextStreamWriter> | undefined): boolean {
1696
+ return proto2.util.equals(OwnedTextStreamWriter, a, b);
1697
+ }
1698
+ }
1699
+
1700
+ /**
1701
+ * Opens an outgoing text stream.
1702
+ * Call must be balanced with a TextStreamCloseRequest.
1703
+ *
1704
+ * @generated from message livekit.proto.TextStreamOpenRequest
1705
+ */
1706
+ export class TextStreamOpenRequest extends Message<TextStreamOpenRequest> {
1707
+ /**
1708
+ * @generated from field: required uint64 local_participant_handle = 1;
1709
+ */
1710
+ localParticipantHandle?: bigint;
1711
+
1712
+ /**
1713
+ * Options to use for opening the stream.
1714
+ *
1715
+ * @generated from field: required livekit.proto.StreamTextOptions options = 2;
1716
+ */
1717
+ options?: StreamTextOptions;
1718
+
1719
+ constructor(data?: PartialMessage<TextStreamOpenRequest>) {
1720
+ super();
1721
+ proto2.util.initPartial(data, this);
1722
+ }
1723
+
1724
+ static readonly runtime: typeof proto2 = proto2;
1725
+ static readonly typeName = "livekit.proto.TextStreamOpenRequest";
1726
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
1727
+ { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
1728
+ { no: 2, name: "options", kind: "message", T: StreamTextOptions, req: true },
1729
+ ]);
1730
+
1731
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TextStreamOpenRequest {
1732
+ return new TextStreamOpenRequest().fromBinary(bytes, options);
1733
+ }
1734
+
1735
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TextStreamOpenRequest {
1736
+ return new TextStreamOpenRequest().fromJson(jsonValue, options);
1737
+ }
1738
+
1739
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TextStreamOpenRequest {
1740
+ return new TextStreamOpenRequest().fromJsonString(jsonString, options);
1741
+ }
1742
+
1743
+ static equals(a: TextStreamOpenRequest | PlainMessage<TextStreamOpenRequest> | undefined, b: TextStreamOpenRequest | PlainMessage<TextStreamOpenRequest> | undefined): boolean {
1744
+ return proto2.util.equals(TextStreamOpenRequest, a, b);
1745
+ }
1746
+ }
1747
+
1748
+ /**
1749
+ * @generated from message livekit.proto.TextStreamOpenResponse
1750
+ */
1751
+ export class TextStreamOpenResponse extends Message<TextStreamOpenResponse> {
1752
+ /**
1753
+ * @generated from field: required uint64 async_id = 1;
1754
+ */
1755
+ asyncId?: bigint;
1756
+
1757
+ constructor(data?: PartialMessage<TextStreamOpenResponse>) {
1758
+ super();
1759
+ proto2.util.initPartial(data, this);
1760
+ }
1761
+
1762
+ static readonly runtime: typeof proto2 = proto2;
1763
+ static readonly typeName = "livekit.proto.TextStreamOpenResponse";
1764
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
1765
+ { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
1766
+ ]);
1767
+
1768
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TextStreamOpenResponse {
1769
+ return new TextStreamOpenResponse().fromBinary(bytes, options);
1770
+ }
1771
+
1772
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TextStreamOpenResponse {
1773
+ return new TextStreamOpenResponse().fromJson(jsonValue, options);
1774
+ }
1775
+
1776
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TextStreamOpenResponse {
1777
+ return new TextStreamOpenResponse().fromJsonString(jsonString, options);
1778
+ }
1779
+
1780
+ static equals(a: TextStreamOpenResponse | PlainMessage<TextStreamOpenResponse> | undefined, b: TextStreamOpenResponse | PlainMessage<TextStreamOpenResponse> | undefined): boolean {
1781
+ return proto2.util.equals(TextStreamOpenResponse, a, b);
1782
+ }
1783
+ }
1784
+
1785
+ /**
1786
+ * @generated from message livekit.proto.TextStreamOpenCallback
1787
+ */
1788
+ export class TextStreamOpenCallback extends Message<TextStreamOpenCallback> {
1789
+ /**
1790
+ * @generated from field: required uint64 async_id = 1;
1791
+ */
1792
+ asyncId?: bigint;
1793
+
1794
+ /**
1795
+ * @generated from oneof livekit.proto.TextStreamOpenCallback.result
1796
+ */
1797
+ result: {
1798
+ /**
1799
+ * @generated from field: livekit.proto.OwnedTextStreamWriter writer = 2;
1800
+ */
1801
+ value: OwnedTextStreamWriter;
1802
+ case: "writer";
1803
+ } | {
1804
+ /**
1805
+ * @generated from field: livekit.proto.StreamError error = 3;
1806
+ */
1807
+ value: StreamError;
1808
+ case: "error";
1809
+ } | { case: undefined; value?: undefined } = { case: undefined };
1810
+
1811
+ constructor(data?: PartialMessage<TextStreamOpenCallback>) {
1812
+ super();
1813
+ proto2.util.initPartial(data, this);
1814
+ }
1815
+
1816
+ static readonly runtime: typeof proto2 = proto2;
1817
+ static readonly typeName = "livekit.proto.TextStreamOpenCallback";
1818
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
1819
+ { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
1820
+ { no: 2, name: "writer", kind: "message", T: OwnedTextStreamWriter, oneof: "result" },
1821
+ { no: 3, name: "error", kind: "message", T: StreamError, oneof: "result" },
1822
+ ]);
1823
+
1824
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TextStreamOpenCallback {
1825
+ return new TextStreamOpenCallback().fromBinary(bytes, options);
1826
+ }
1827
+
1828
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TextStreamOpenCallback {
1829
+ return new TextStreamOpenCallback().fromJson(jsonValue, options);
1830
+ }
1831
+
1832
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TextStreamOpenCallback {
1833
+ return new TextStreamOpenCallback().fromJsonString(jsonString, options);
1834
+ }
1835
+
1836
+ static equals(a: TextStreamOpenCallback | PlainMessage<TextStreamOpenCallback> | undefined, b: TextStreamOpenCallback | PlainMessage<TextStreamOpenCallback> | undefined): boolean {
1837
+ return proto2.util.equals(TextStreamOpenCallback, a, b);
1838
+ }
1839
+ }
1840
+
1841
+ /**
1842
+ * Writes text to a text stream writer.
1843
+ *
1844
+ * @generated from message livekit.proto.TextStreamWriterWriteRequest
1845
+ */
1846
+ export class TextStreamWriterWriteRequest extends Message<TextStreamWriterWriteRequest> {
1847
+ /**
1848
+ * @generated from field: required uint64 writer_handle = 1;
1849
+ */
1850
+ writerHandle?: bigint;
1851
+
1852
+ /**
1853
+ * @generated from field: required string text = 2;
1854
+ */
1855
+ text?: string;
1856
+
1857
+ constructor(data?: PartialMessage<TextStreamWriterWriteRequest>) {
1858
+ super();
1859
+ proto2.util.initPartial(data, this);
1860
+ }
1861
+
1862
+ static readonly runtime: typeof proto2 = proto2;
1863
+ static readonly typeName = "livekit.proto.TextStreamWriterWriteRequest";
1864
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
1865
+ { no: 1, name: "writer_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
1866
+ { no: 2, name: "text", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true },
1867
+ ]);
1868
+
1869
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TextStreamWriterWriteRequest {
1870
+ return new TextStreamWriterWriteRequest().fromBinary(bytes, options);
1871
+ }
1872
+
1873
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TextStreamWriterWriteRequest {
1874
+ return new TextStreamWriterWriteRequest().fromJson(jsonValue, options);
1875
+ }
1876
+
1877
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TextStreamWriterWriteRequest {
1878
+ return new TextStreamWriterWriteRequest().fromJsonString(jsonString, options);
1879
+ }
1880
+
1881
+ static equals(a: TextStreamWriterWriteRequest | PlainMessage<TextStreamWriterWriteRequest> | undefined, b: TextStreamWriterWriteRequest | PlainMessage<TextStreamWriterWriteRequest> | undefined): boolean {
1882
+ return proto2.util.equals(TextStreamWriterWriteRequest, a, b);
1883
+ }
1884
+ }
1885
+
1886
+ /**
1887
+ * @generated from message livekit.proto.TextStreamWriterWriteResponse
1888
+ */
1889
+ export class TextStreamWriterWriteResponse extends Message<TextStreamWriterWriteResponse> {
1890
+ /**
1891
+ * @generated from field: required uint64 async_id = 1;
1892
+ */
1893
+ asyncId?: bigint;
1894
+
1895
+ constructor(data?: PartialMessage<TextStreamWriterWriteResponse>) {
1896
+ super();
1897
+ proto2.util.initPartial(data, this);
1898
+ }
1899
+
1900
+ static readonly runtime: typeof proto2 = proto2;
1901
+ static readonly typeName = "livekit.proto.TextStreamWriterWriteResponse";
1902
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
1903
+ { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
1904
+ ]);
1905
+
1906
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TextStreamWriterWriteResponse {
1907
+ return new TextStreamWriterWriteResponse().fromBinary(bytes, options);
1908
+ }
1909
+
1910
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TextStreamWriterWriteResponse {
1911
+ return new TextStreamWriterWriteResponse().fromJson(jsonValue, options);
1912
+ }
1913
+
1914
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TextStreamWriterWriteResponse {
1915
+ return new TextStreamWriterWriteResponse().fromJsonString(jsonString, options);
1916
+ }
1917
+
1918
+ static equals(a: TextStreamWriterWriteResponse | PlainMessage<TextStreamWriterWriteResponse> | undefined, b: TextStreamWriterWriteResponse | PlainMessage<TextStreamWriterWriteResponse> | undefined): boolean {
1919
+ return proto2.util.equals(TextStreamWriterWriteResponse, a, b);
1920
+ }
1921
+ }
1922
+
1923
+ /**
1924
+ * @generated from message livekit.proto.TextStreamWriterWriteCallback
1925
+ */
1926
+ export class TextStreamWriterWriteCallback extends Message<TextStreamWriterWriteCallback> {
1927
+ /**
1928
+ * @generated from field: required uint64 async_id = 1;
1929
+ */
1930
+ asyncId?: bigint;
1931
+
1932
+ /**
1933
+ * @generated from field: optional livekit.proto.StreamError error = 2;
1934
+ */
1935
+ error?: StreamError;
1936
+
1937
+ constructor(data?: PartialMessage<TextStreamWriterWriteCallback>) {
1938
+ super();
1939
+ proto2.util.initPartial(data, this);
1940
+ }
1941
+
1942
+ static readonly runtime: typeof proto2 = proto2;
1943
+ static readonly typeName = "livekit.proto.TextStreamWriterWriteCallback";
1944
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
1945
+ { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
1946
+ { no: 2, name: "error", kind: "message", T: StreamError, opt: true },
1947
+ ]);
1948
+
1949
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TextStreamWriterWriteCallback {
1950
+ return new TextStreamWriterWriteCallback().fromBinary(bytes, options);
1951
+ }
1952
+
1953
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TextStreamWriterWriteCallback {
1954
+ return new TextStreamWriterWriteCallback().fromJson(jsonValue, options);
1955
+ }
1956
+
1957
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TextStreamWriterWriteCallback {
1958
+ return new TextStreamWriterWriteCallback().fromJsonString(jsonString, options);
1959
+ }
1960
+
1961
+ static equals(a: TextStreamWriterWriteCallback | PlainMessage<TextStreamWriterWriteCallback> | undefined, b: TextStreamWriterWriteCallback | PlainMessage<TextStreamWriterWriteCallback> | undefined): boolean {
1962
+ return proto2.util.equals(TextStreamWriterWriteCallback, a, b);
1963
+ }
1964
+ }
1965
+
1966
+ /**
1967
+ * Closes a text stream writer.
1968
+ *
1969
+ * @generated from message livekit.proto.TextStreamWriterCloseRequest
1970
+ */
1971
+ export class TextStreamWriterCloseRequest extends Message<TextStreamWriterCloseRequest> {
1972
+ /**
1973
+ * @generated from field: required uint64 writer_handle = 1;
1974
+ */
1975
+ writerHandle?: bigint;
1976
+
1977
+ /**
1978
+ * @generated from field: optional string reason = 2;
1979
+ */
1980
+ reason?: string;
1981
+
1982
+ constructor(data?: PartialMessage<TextStreamWriterCloseRequest>) {
1983
+ super();
1984
+ proto2.util.initPartial(data, this);
1985
+ }
1986
+
1987
+ static readonly runtime: typeof proto2 = proto2;
1988
+ static readonly typeName = "livekit.proto.TextStreamWriterCloseRequest";
1989
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
1990
+ { no: 1, name: "writer_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
1991
+ { no: 2, name: "reason", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
1992
+ ]);
1993
+
1994
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TextStreamWriterCloseRequest {
1995
+ return new TextStreamWriterCloseRequest().fromBinary(bytes, options);
1996
+ }
1997
+
1998
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TextStreamWriterCloseRequest {
1999
+ return new TextStreamWriterCloseRequest().fromJson(jsonValue, options);
2000
+ }
2001
+
2002
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TextStreamWriterCloseRequest {
2003
+ return new TextStreamWriterCloseRequest().fromJsonString(jsonString, options);
2004
+ }
2005
+
2006
+ static equals(a: TextStreamWriterCloseRequest | PlainMessage<TextStreamWriterCloseRequest> | undefined, b: TextStreamWriterCloseRequest | PlainMessage<TextStreamWriterCloseRequest> | undefined): boolean {
2007
+ return proto2.util.equals(TextStreamWriterCloseRequest, a, b);
2008
+ }
2009
+ }
2010
+
2011
+ /**
2012
+ * @generated from message livekit.proto.TextStreamWriterCloseResponse
2013
+ */
2014
+ export class TextStreamWriterCloseResponse extends Message<TextStreamWriterCloseResponse> {
2015
+ /**
2016
+ * @generated from field: required uint64 async_id = 1;
2017
+ */
2018
+ asyncId?: bigint;
2019
+
2020
+ constructor(data?: PartialMessage<TextStreamWriterCloseResponse>) {
2021
+ super();
2022
+ proto2.util.initPartial(data, this);
2023
+ }
2024
+
2025
+ static readonly runtime: typeof proto2 = proto2;
2026
+ static readonly typeName = "livekit.proto.TextStreamWriterCloseResponse";
2027
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
2028
+ { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
2029
+ ]);
2030
+
2031
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TextStreamWriterCloseResponse {
2032
+ return new TextStreamWriterCloseResponse().fromBinary(bytes, options);
2033
+ }
2034
+
2035
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TextStreamWriterCloseResponse {
2036
+ return new TextStreamWriterCloseResponse().fromJson(jsonValue, options);
2037
+ }
2038
+
2039
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TextStreamWriterCloseResponse {
2040
+ return new TextStreamWriterCloseResponse().fromJsonString(jsonString, options);
2041
+ }
2042
+
2043
+ static equals(a: TextStreamWriterCloseResponse | PlainMessage<TextStreamWriterCloseResponse> | undefined, b: TextStreamWriterCloseResponse | PlainMessage<TextStreamWriterCloseResponse> | undefined): boolean {
2044
+ return proto2.util.equals(TextStreamWriterCloseResponse, a, b);
2045
+ }
2046
+ }
2047
+
2048
+ /**
2049
+ * @generated from message livekit.proto.TextStreamWriterCloseCallback
2050
+ */
2051
+ export class TextStreamWriterCloseCallback extends Message<TextStreamWriterCloseCallback> {
2052
+ /**
2053
+ * @generated from field: required uint64 async_id = 1;
2054
+ */
2055
+ asyncId?: bigint;
2056
+
2057
+ /**
2058
+ * @generated from field: optional livekit.proto.StreamError error = 2;
2059
+ */
2060
+ error?: StreamError;
2061
+
2062
+ constructor(data?: PartialMessage<TextStreamWriterCloseCallback>) {
2063
+ super();
2064
+ proto2.util.initPartial(data, this);
2065
+ }
2066
+
2067
+ static readonly runtime: typeof proto2 = proto2;
2068
+ static readonly typeName = "livekit.proto.TextStreamWriterCloseCallback";
2069
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
2070
+ { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
2071
+ { no: 2, name: "error", kind: "message", T: StreamError, opt: true },
2072
+ ]);
2073
+
2074
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TextStreamWriterCloseCallback {
2075
+ return new TextStreamWriterCloseCallback().fromBinary(bytes, options);
2076
+ }
2077
+
2078
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TextStreamWriterCloseCallback {
2079
+ return new TextStreamWriterCloseCallback().fromJson(jsonValue, options);
2080
+ }
2081
+
2082
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TextStreamWriterCloseCallback {
2083
+ return new TextStreamWriterCloseCallback().fromJsonString(jsonString, options);
2084
+ }
2085
+
2086
+ static equals(a: TextStreamWriterCloseCallback | PlainMessage<TextStreamWriterCloseCallback> | undefined, b: TextStreamWriterCloseCallback | PlainMessage<TextStreamWriterCloseCallback> | undefined): boolean {
2087
+ return proto2.util.equals(TextStreamWriterCloseCallback, a, b);
2088
+ }
2089
+ }
2090
+
2091
+ /**
2092
+ * @generated from message livekit.proto.TextStreamInfo
2093
+ */
2094
+ export class TextStreamInfo extends Message<TextStreamInfo> {
2095
+ /**
2096
+ * unique identifier for this data stream
2097
+ *
2098
+ * @generated from field: required string stream_id = 1;
2099
+ */
2100
+ streamId?: string;
2101
+
2102
+ /**
2103
+ * using int64 for Unix timestamp
2104
+ *
2105
+ * @generated from field: required int64 timestamp = 2;
2106
+ */
2107
+ timestamp?: bigint;
2108
+
2109
+ /**
2110
+ * @generated from field: required string mime_type = 3;
2111
+ */
2112
+ mimeType?: string;
2113
+
2114
+ /**
2115
+ * @generated from field: required string topic = 4;
2116
+ */
2117
+ topic?: string;
2118
+
2119
+ /**
2120
+ * only populated for finite streams, if it's a stream of unknown size this stays empty
2121
+ *
2122
+ * @generated from field: optional uint64 total_length = 5;
2123
+ */
2124
+ totalLength?: bigint;
2125
+
2126
+ /**
2127
+ * user defined attributes map that can carry additional info
2128
+ *
2129
+ * @generated from field: map<string, string> attributes = 6;
2130
+ */
2131
+ attributes: { [key: string]: string } = {};
2132
+
2133
+ /**
2134
+ * @generated from field: required livekit.proto.TextStreamInfo.OperationType operation_type = 7;
2135
+ */
2136
+ operationType?: TextStreamInfo_OperationType;
2137
+
2138
+ /**
2139
+ * Optional: Version for updates/edits
2140
+ *
2141
+ * @generated from field: optional int32 version = 8;
2142
+ */
2143
+ version?: number;
2144
+
2145
+ /**
2146
+ * Optional: Reply to specific message
2147
+ *
2148
+ * @generated from field: optional string reply_to_stream_id = 9;
2149
+ */
2150
+ replyToStreamId?: string;
2151
+
2152
+ /**
2153
+ * file attachments for text streams
2154
+ *
2155
+ * @generated from field: repeated string attached_stream_ids = 10;
2156
+ */
2157
+ attachedStreamIds: string[] = [];
2158
+
2159
+ /**
2160
+ * true if the text has been generated by an agent from a participant's audio transcription
2161
+ *
2162
+ * @generated from field: optional bool generated = 11;
2163
+ */
2164
+ generated?: boolean;
2165
+
2166
+ constructor(data?: PartialMessage<TextStreamInfo>) {
2167
+ super();
2168
+ proto2.util.initPartial(data, this);
2169
+ }
2170
+
2171
+ static readonly runtime: typeof proto2 = proto2;
2172
+ static readonly typeName = "livekit.proto.TextStreamInfo";
2173
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
2174
+ { no: 1, name: "stream_id", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true },
2175
+ { no: 2, name: "timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */, req: true },
2176
+ { no: 3, name: "mime_type", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true },
2177
+ { no: 4, name: "topic", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true },
2178
+ { no: 5, name: "total_length", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true },
2179
+ { no: 6, name: "attributes", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} },
2180
+ { no: 7, name: "operation_type", kind: "enum", T: proto2.getEnumType(TextStreamInfo_OperationType), req: true },
2181
+ { no: 8, name: "version", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
2182
+ { no: 9, name: "reply_to_stream_id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
2183
+ { no: 10, name: "attached_stream_ids", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
2184
+ { no: 11, name: "generated", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
2185
+ ]);
2186
+
2187
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TextStreamInfo {
2188
+ return new TextStreamInfo().fromBinary(bytes, options);
2189
+ }
2190
+
2191
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TextStreamInfo {
2192
+ return new TextStreamInfo().fromJson(jsonValue, options);
2193
+ }
2194
+
2195
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TextStreamInfo {
2196
+ return new TextStreamInfo().fromJsonString(jsonString, options);
2197
+ }
2198
+
2199
+ static equals(a: TextStreamInfo | PlainMessage<TextStreamInfo> | undefined, b: TextStreamInfo | PlainMessage<TextStreamInfo> | undefined): boolean {
2200
+ return proto2.util.equals(TextStreamInfo, a, b);
2201
+ }
2202
+ }
2203
+
2204
+ /**
2205
+ * @generated from enum livekit.proto.TextStreamInfo.OperationType
2206
+ */
2207
+ export enum TextStreamInfo_OperationType {
2208
+ /**
2209
+ * @generated from enum value: CREATE = 0;
2210
+ */
2211
+ CREATE = 0,
2212
+
2213
+ /**
2214
+ * @generated from enum value: UPDATE = 1;
2215
+ */
2216
+ UPDATE = 1,
2217
+
2218
+ /**
2219
+ * @generated from enum value: DELETE = 2;
2220
+ */
2221
+ DELETE = 2,
2222
+
2223
+ /**
2224
+ * @generated from enum value: REACTION = 3;
2225
+ */
2226
+ REACTION = 3,
2227
+ }
2228
+ // Retrieve enum metadata with: proto2.getEnumType(TextStreamInfo_OperationType)
2229
+ proto2.util.setEnumType(TextStreamInfo_OperationType, "livekit.proto.TextStreamInfo.OperationType", [
2230
+ { no: 0, name: "CREATE" },
2231
+ { no: 1, name: "UPDATE" },
2232
+ { no: 2, name: "DELETE" },
2233
+ { no: 3, name: "REACTION" },
2234
+ ]);
2235
+
2236
+ /**
2237
+ * @generated from message livekit.proto.ByteStreamInfo
2238
+ */
2239
+ export class ByteStreamInfo extends Message<ByteStreamInfo> {
2240
+ /**
2241
+ * unique identifier for this data stream
2242
+ *
2243
+ * @generated from field: required string stream_id = 1;
2244
+ */
2245
+ streamId?: string;
2246
+
2247
+ /**
2248
+ * using int64 for Unix timestamp
2249
+ *
2250
+ * @generated from field: required int64 timestamp = 2;
2251
+ */
2252
+ timestamp?: bigint;
2253
+
2254
+ /**
2255
+ * @generated from field: required string mime_type = 3;
2256
+ */
2257
+ mimeType?: string;
2258
+
2259
+ /**
2260
+ * @generated from field: required string topic = 4;
2261
+ */
2262
+ topic?: string;
2263
+
2264
+ /**
2265
+ * only populated for finite streams, if it's a stream of unknown size this stays empty
2266
+ *
2267
+ * @generated from field: optional uint64 total_length = 5;
2268
+ */
2269
+ totalLength?: bigint;
2270
+
2271
+ /**
2272
+ * user defined attributes map that can carry additional info
2273
+ *
2274
+ * @generated from field: map<string, string> attributes = 6;
2275
+ */
2276
+ attributes: { [key: string]: string } = {};
2277
+
2278
+ /**
2279
+ * @generated from field: required string name = 7;
2280
+ */
2281
+ name?: string;
2282
+
2283
+ constructor(data?: PartialMessage<ByteStreamInfo>) {
2284
+ super();
2285
+ proto2.util.initPartial(data, this);
2286
+ }
2287
+
2288
+ static readonly runtime: typeof proto2 = proto2;
2289
+ static readonly typeName = "livekit.proto.ByteStreamInfo";
2290
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
2291
+ { no: 1, name: "stream_id", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true },
2292
+ { no: 2, name: "timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */, req: true },
2293
+ { no: 3, name: "mime_type", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true },
2294
+ { no: 4, name: "topic", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true },
2295
+ { no: 5, name: "total_length", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true },
2296
+ { no: 6, name: "attributes", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} },
2297
+ { no: 7, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true },
2298
+ ]);
2299
+
2300
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ByteStreamInfo {
2301
+ return new ByteStreamInfo().fromBinary(bytes, options);
2302
+ }
2303
+
2304
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ByteStreamInfo {
2305
+ return new ByteStreamInfo().fromJson(jsonValue, options);
2306
+ }
2307
+
2308
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ByteStreamInfo {
2309
+ return new ByteStreamInfo().fromJsonString(jsonString, options);
2310
+ }
2311
+
2312
+ static equals(a: ByteStreamInfo | PlainMessage<ByteStreamInfo> | undefined, b: ByteStreamInfo | PlainMessage<ByteStreamInfo> | undefined): boolean {
2313
+ return proto2.util.equals(ByteStreamInfo, a, b);
2314
+ }
2315
+ }
2316
+
2317
+ /**
2318
+ * @generated from message livekit.proto.StreamTextOptions
2319
+ */
2320
+ export class StreamTextOptions extends Message<StreamTextOptions> {
2321
+ /**
2322
+ * @generated from field: required string topic = 1;
2323
+ */
2324
+ topic?: string;
2325
+
2326
+ /**
2327
+ * @generated from field: map<string, string> attributes = 2;
2328
+ */
2329
+ attributes: { [key: string]: string } = {};
2330
+
2331
+ /**
2332
+ * @generated from field: repeated string destination_identities = 3;
2333
+ */
2334
+ destinationIdentities: string[] = [];
2335
+
2336
+ /**
2337
+ * @generated from field: optional string id = 4;
2338
+ */
2339
+ id?: string;
2340
+
2341
+ /**
2342
+ * @generated from field: optional livekit.proto.TextStreamInfo.OperationType operation_type = 5;
2343
+ */
2344
+ operationType?: TextStreamInfo_OperationType;
2345
+
2346
+ /**
2347
+ * @generated from field: optional int32 version = 6;
2348
+ */
2349
+ version?: number;
2350
+
2351
+ /**
2352
+ * @generated from field: optional string reply_to_stream_id = 7;
2353
+ */
2354
+ replyToStreamId?: string;
2355
+
2356
+ /**
2357
+ * @generated from field: repeated string attached_stream_ids = 8;
2358
+ */
2359
+ attachedStreamIds: string[] = [];
2360
+
2361
+ /**
2362
+ * @generated from field: optional bool generated = 9;
2363
+ */
2364
+ generated?: boolean;
2365
+
2366
+ constructor(data?: PartialMessage<StreamTextOptions>) {
2367
+ super();
2368
+ proto2.util.initPartial(data, this);
2369
+ }
2370
+
2371
+ static readonly runtime: typeof proto2 = proto2;
2372
+ static readonly typeName = "livekit.proto.StreamTextOptions";
2373
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
2374
+ { no: 1, name: "topic", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true },
2375
+ { no: 2, name: "attributes", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} },
2376
+ { no: 3, name: "destination_identities", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
2377
+ { no: 4, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
2378
+ { no: 5, name: "operation_type", kind: "enum", T: proto2.getEnumType(TextStreamInfo_OperationType), opt: true },
2379
+ { no: 6, name: "version", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
2380
+ { no: 7, name: "reply_to_stream_id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
2381
+ { no: 8, name: "attached_stream_ids", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
2382
+ { no: 9, name: "generated", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
2383
+ ]);
2384
+
2385
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): StreamTextOptions {
2386
+ return new StreamTextOptions().fromBinary(bytes, options);
2387
+ }
2388
+
2389
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): StreamTextOptions {
2390
+ return new StreamTextOptions().fromJson(jsonValue, options);
2391
+ }
2392
+
2393
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): StreamTextOptions {
2394
+ return new StreamTextOptions().fromJsonString(jsonString, options);
2395
+ }
2396
+
2397
+ static equals(a: StreamTextOptions | PlainMessage<StreamTextOptions> | undefined, b: StreamTextOptions | PlainMessage<StreamTextOptions> | undefined): boolean {
2398
+ return proto2.util.equals(StreamTextOptions, a, b);
2399
+ }
2400
+ }
2401
+
2402
+ /**
2403
+ * @generated from message livekit.proto.StreamByteOptions
2404
+ */
2405
+ export class StreamByteOptions extends Message<StreamByteOptions> {
2406
+ /**
2407
+ * @generated from field: required string topic = 1;
2408
+ */
2409
+ topic?: string;
2410
+
2411
+ /**
2412
+ * @generated from field: map<string, string> attributes = 2;
2413
+ */
2414
+ attributes: { [key: string]: string } = {};
2415
+
2416
+ /**
2417
+ * @generated from field: repeated string destination_identities = 3;
2418
+ */
2419
+ destinationIdentities: string[] = [];
2420
+
2421
+ /**
2422
+ * @generated from field: optional string id = 4;
2423
+ */
2424
+ id?: string;
2425
+
2426
+ /**
2427
+ * @generated from field: optional string name = 5;
2428
+ */
2429
+ name?: string;
2430
+
2431
+ /**
2432
+ * @generated from field: optional string mime_type = 6;
2433
+ */
2434
+ mimeType?: string;
2435
+
2436
+ /**
2437
+ * @generated from field: optional uint64 total_length = 7;
2438
+ */
2439
+ totalLength?: bigint;
2440
+
2441
+ constructor(data?: PartialMessage<StreamByteOptions>) {
2442
+ super();
2443
+ proto2.util.initPartial(data, this);
2444
+ }
2445
+
2446
+ static readonly runtime: typeof proto2 = proto2;
2447
+ static readonly typeName = "livekit.proto.StreamByteOptions";
2448
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
2449
+ { no: 1, name: "topic", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true },
2450
+ { no: 2, name: "attributes", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} },
2451
+ { no: 3, name: "destination_identities", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
2452
+ { no: 4, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
2453
+ { no: 5, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
2454
+ { no: 6, name: "mime_type", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
2455
+ { no: 7, name: "total_length", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true },
2456
+ ]);
2457
+
2458
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): StreamByteOptions {
2459
+ return new StreamByteOptions().fromBinary(bytes, options);
2460
+ }
2461
+
2462
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): StreamByteOptions {
2463
+ return new StreamByteOptions().fromJson(jsonValue, options);
2464
+ }
2465
+
2466
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): StreamByteOptions {
2467
+ return new StreamByteOptions().fromJsonString(jsonString, options);
2468
+ }
2469
+
2470
+ static equals(a: StreamByteOptions | PlainMessage<StreamByteOptions> | undefined, b: StreamByteOptions | PlainMessage<StreamByteOptions> | undefined): boolean {
2471
+ return proto2.util.equals(StreamByteOptions, a, b);
2472
+ }
2473
+ }
2474
+
2475
+ /**
2476
+ * Error pertaining to a stream.
2477
+ *
2478
+ * @generated from message livekit.proto.StreamError
2479
+ */
2480
+ export class StreamError extends Message<StreamError> {
2481
+ /**
2482
+ * TODO(ladvoc): make this an enum.
2483
+ *
2484
+ * @generated from field: required string description = 1;
2485
+ */
2486
+ description?: string;
2487
+
2488
+ constructor(data?: PartialMessage<StreamError>) {
2489
+ super();
2490
+ proto2.util.initPartial(data, this);
2491
+ }
2492
+
2493
+ static readonly runtime: typeof proto2 = proto2;
2494
+ static readonly typeName = "livekit.proto.StreamError";
2495
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
2496
+ { no: 1, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true },
2497
+ ]);
2498
+
2499
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): StreamError {
2500
+ return new StreamError().fromBinary(bytes, options);
2501
+ }
2502
+
2503
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): StreamError {
2504
+ return new StreamError().fromJson(jsonValue, options);
2505
+ }
2506
+
2507
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): StreamError {
2508
+ return new StreamError().fromJsonString(jsonString, options);
2509
+ }
2510
+
2511
+ static equals(a: StreamError | PlainMessage<StreamError> | undefined, b: StreamError | PlainMessage<StreamError> | undefined): boolean {
2512
+ return proto2.util.equals(StreamError, a, b);
2513
+ }
2514
+ }
2515
+