@livekit/protocol 1.28.1 → 1.29.1

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.
@@ -29,6 +29,12 @@ __export(livekit_models_pb_exports, {
29
29
  ConnectionQuality: () => ConnectionQuality,
30
30
  DataPacket: () => DataPacket,
31
31
  DataPacket_Kind: () => DataPacket_Kind,
32
+ DataStream: () => DataStream,
33
+ DataStream_Chunk: () => DataStream_Chunk,
34
+ DataStream_FileHeader: () => DataStream_FileHeader,
35
+ DataStream_Header: () => DataStream_Header,
36
+ DataStream_OperationType: () => DataStream_OperationType,
37
+ DataStream_TextHeader: () => DataStream_TextHeader,
32
38
  DisabledCodecs: () => DisabledCodecs,
33
39
  DisconnectReason: () => DisconnectReason,
34
40
  Encryption: () => Encryption,
@@ -1240,7 +1246,9 @@ _DataPacket.fields = import_protobuf.proto3.util.newFieldList(() => [
1240
1246
  { no: 9, name: "chat_message", kind: "message", T: ChatMessage, oneof: "value" },
1241
1247
  { no: 10, name: "rpc_request", kind: "message", T: RpcRequest, oneof: "value" },
1242
1248
  { no: 11, name: "rpc_ack", kind: "message", T: RpcAck, oneof: "value" },
1243
- { no: 12, name: "rpc_response", kind: "message", T: RpcResponse, oneof: "value" }
1249
+ { no: 12, name: "rpc_response", kind: "message", T: RpcResponse, oneof: "value" },
1250
+ { no: 13, name: "stream_header", kind: "message", T: DataStream_Header, oneof: "value" },
1251
+ { no: 14, name: "stream_chunk", kind: "message", T: DataStream_Chunk, oneof: "value" }
1244
1252
  ]);
1245
1253
  let DataPacket = _DataPacket;
1246
1254
  var DataPacket_Kind = /* @__PURE__ */ ((DataPacket_Kind2) => {
@@ -3265,6 +3273,337 @@ _TimedVersion.fields = import_protobuf.proto3.util.newFieldList(() => [
3265
3273
  }
3266
3274
  ]);
3267
3275
  let TimedVersion = _TimedVersion;
3276
+ const _DataStream = class _DataStream extends import_protobuf.Message {
3277
+ constructor(data) {
3278
+ super();
3279
+ import_protobuf.proto3.util.initPartial(data, this);
3280
+ }
3281
+ static fromBinary(bytes, options) {
3282
+ return new _DataStream().fromBinary(bytes, options);
3283
+ }
3284
+ static fromJson(jsonValue, options) {
3285
+ return new _DataStream().fromJson(jsonValue, options);
3286
+ }
3287
+ static fromJsonString(jsonString, options) {
3288
+ return new _DataStream().fromJsonString(jsonString, options);
3289
+ }
3290
+ static equals(a, b) {
3291
+ return import_protobuf.proto3.util.equals(_DataStream, a, b);
3292
+ }
3293
+ };
3294
+ _DataStream.runtime = import_protobuf.proto3;
3295
+ _DataStream.typeName = "livekit.DataStream";
3296
+ _DataStream.fields = import_protobuf.proto3.util.newFieldList(() => []);
3297
+ let DataStream = _DataStream;
3298
+ var DataStream_OperationType = /* @__PURE__ */ ((DataStream_OperationType2) => {
3299
+ DataStream_OperationType2[DataStream_OperationType2["CREATE"] = 0] = "CREATE";
3300
+ DataStream_OperationType2[DataStream_OperationType2["UPDATE"] = 1] = "UPDATE";
3301
+ DataStream_OperationType2[DataStream_OperationType2["DELETE"] = 2] = "DELETE";
3302
+ DataStream_OperationType2[DataStream_OperationType2["REACTION"] = 3] = "REACTION";
3303
+ return DataStream_OperationType2;
3304
+ })(DataStream_OperationType || {});
3305
+ import_protobuf.proto3.util.setEnumType(DataStream_OperationType, "livekit.DataStream.OperationType", [
3306
+ { no: 0, name: "CREATE" },
3307
+ { no: 1, name: "UPDATE" },
3308
+ { no: 2, name: "DELETE" },
3309
+ { no: 3, name: "REACTION" }
3310
+ ]);
3311
+ const _DataStream_TextHeader = class _DataStream_TextHeader extends import_protobuf.Message {
3312
+ constructor(data) {
3313
+ super();
3314
+ /**
3315
+ * @generated from field: livekit.DataStream.OperationType operation_type = 1;
3316
+ */
3317
+ this.operationType = 0 /* CREATE */;
3318
+ /**
3319
+ * Optional: Version for updates/edits
3320
+ *
3321
+ * @generated from field: int32 version = 2;
3322
+ */
3323
+ this.version = 0;
3324
+ /**
3325
+ * Optional: Reply to specific message
3326
+ *
3327
+ * @generated from field: string reply_to_stream_id = 3;
3328
+ */
3329
+ this.replyToStreamId = "";
3330
+ /**
3331
+ * file attachments for text streams
3332
+ *
3333
+ * @generated from field: repeated string attached_stream_ids = 4;
3334
+ */
3335
+ this.attachedStreamIds = [];
3336
+ /**
3337
+ * true if the text has been generated by an agent from a participant's audio transcription
3338
+ *
3339
+ * @generated from field: bool generated = 5;
3340
+ */
3341
+ this.generated = false;
3342
+ import_protobuf.proto3.util.initPartial(data, this);
3343
+ }
3344
+ static fromBinary(bytes, options) {
3345
+ return new _DataStream_TextHeader().fromBinary(bytes, options);
3346
+ }
3347
+ static fromJson(jsonValue, options) {
3348
+ return new _DataStream_TextHeader().fromJson(jsonValue, options);
3349
+ }
3350
+ static fromJsonString(jsonString, options) {
3351
+ return new _DataStream_TextHeader().fromJsonString(jsonString, options);
3352
+ }
3353
+ static equals(a, b) {
3354
+ return import_protobuf.proto3.util.equals(_DataStream_TextHeader, a, b);
3355
+ }
3356
+ };
3357
+ _DataStream_TextHeader.runtime = import_protobuf.proto3;
3358
+ _DataStream_TextHeader.typeName = "livekit.DataStream.TextHeader";
3359
+ _DataStream_TextHeader.fields = import_protobuf.proto3.util.newFieldList(() => [
3360
+ { no: 1, name: "operation_type", kind: "enum", T: import_protobuf.proto3.getEnumType(DataStream_OperationType) },
3361
+ {
3362
+ no: 2,
3363
+ name: "version",
3364
+ kind: "scalar",
3365
+ T: 5
3366
+ /* ScalarType.INT32 */
3367
+ },
3368
+ {
3369
+ no: 3,
3370
+ name: "reply_to_stream_id",
3371
+ kind: "scalar",
3372
+ T: 9
3373
+ /* ScalarType.STRING */
3374
+ },
3375
+ { no: 4, name: "attached_stream_ids", kind: "scalar", T: 9, repeated: true },
3376
+ {
3377
+ no: 5,
3378
+ name: "generated",
3379
+ kind: "scalar",
3380
+ T: 8
3381
+ /* ScalarType.BOOL */
3382
+ }
3383
+ ]);
3384
+ let DataStream_TextHeader = _DataStream_TextHeader;
3385
+ const _DataStream_FileHeader = class _DataStream_FileHeader extends import_protobuf.Message {
3386
+ constructor(data) {
3387
+ super();
3388
+ /**
3389
+ * name of the file
3390
+ *
3391
+ * @generated from field: string file_name = 1;
3392
+ */
3393
+ this.fileName = "";
3394
+ import_protobuf.proto3.util.initPartial(data, this);
3395
+ }
3396
+ static fromBinary(bytes, options) {
3397
+ return new _DataStream_FileHeader().fromBinary(bytes, options);
3398
+ }
3399
+ static fromJson(jsonValue, options) {
3400
+ return new _DataStream_FileHeader().fromJson(jsonValue, options);
3401
+ }
3402
+ static fromJsonString(jsonString, options) {
3403
+ return new _DataStream_FileHeader().fromJsonString(jsonString, options);
3404
+ }
3405
+ static equals(a, b) {
3406
+ return import_protobuf.proto3.util.equals(_DataStream_FileHeader, a, b);
3407
+ }
3408
+ };
3409
+ _DataStream_FileHeader.runtime = import_protobuf.proto3;
3410
+ _DataStream_FileHeader.typeName = "livekit.DataStream.FileHeader";
3411
+ _DataStream_FileHeader.fields = import_protobuf.proto3.util.newFieldList(() => [
3412
+ {
3413
+ no: 1,
3414
+ name: "file_name",
3415
+ kind: "scalar",
3416
+ T: 9
3417
+ /* ScalarType.STRING */
3418
+ }
3419
+ ]);
3420
+ let DataStream_FileHeader = _DataStream_FileHeader;
3421
+ const _DataStream_Header = class _DataStream_Header extends import_protobuf.Message {
3422
+ constructor(data) {
3423
+ super();
3424
+ /**
3425
+ * unique identifier for this data stream
3426
+ *
3427
+ * @generated from field: string stream_id = 1;
3428
+ */
3429
+ this.streamId = "";
3430
+ /**
3431
+ * using int64 for Unix timestamp
3432
+ *
3433
+ * @generated from field: int64 timestamp = 2;
3434
+ */
3435
+ this.timestamp = import_protobuf.protoInt64.zero;
3436
+ /**
3437
+ * @generated from field: string topic = 3;
3438
+ */
3439
+ this.topic = "";
3440
+ /**
3441
+ * @generated from field: string mime_type = 4;
3442
+ */
3443
+ this.mimeType = "";
3444
+ /**
3445
+ * defaults to NONE
3446
+ *
3447
+ * @generated from field: livekit.Encryption.Type encryption_type = 7;
3448
+ */
3449
+ this.encryptionType = 0 /* NONE */;
3450
+ /**
3451
+ * user defined extensions map that can carry additional info
3452
+ *
3453
+ * @generated from field: map<string, string> extensions = 8;
3454
+ */
3455
+ this.extensions = {};
3456
+ /**
3457
+ * oneof to choose between specific header types
3458
+ *
3459
+ * @generated from oneof livekit.DataStream.Header.content_header
3460
+ */
3461
+ this.contentHeader = { case: void 0 };
3462
+ import_protobuf.proto3.util.initPartial(data, this);
3463
+ }
3464
+ static fromBinary(bytes, options) {
3465
+ return new _DataStream_Header().fromBinary(bytes, options);
3466
+ }
3467
+ static fromJson(jsonValue, options) {
3468
+ return new _DataStream_Header().fromJson(jsonValue, options);
3469
+ }
3470
+ static fromJsonString(jsonString, options) {
3471
+ return new _DataStream_Header().fromJsonString(jsonString, options);
3472
+ }
3473
+ static equals(a, b) {
3474
+ return import_protobuf.proto3.util.equals(_DataStream_Header, a, b);
3475
+ }
3476
+ };
3477
+ _DataStream_Header.runtime = import_protobuf.proto3;
3478
+ _DataStream_Header.typeName = "livekit.DataStream.Header";
3479
+ _DataStream_Header.fields = import_protobuf.proto3.util.newFieldList(() => [
3480
+ {
3481
+ no: 1,
3482
+ name: "stream_id",
3483
+ kind: "scalar",
3484
+ T: 9
3485
+ /* ScalarType.STRING */
3486
+ },
3487
+ {
3488
+ no: 2,
3489
+ name: "timestamp",
3490
+ kind: "scalar",
3491
+ T: 3
3492
+ /* ScalarType.INT64 */
3493
+ },
3494
+ {
3495
+ no: 3,
3496
+ name: "topic",
3497
+ kind: "scalar",
3498
+ T: 9
3499
+ /* ScalarType.STRING */
3500
+ },
3501
+ {
3502
+ no: 4,
3503
+ name: "mime_type",
3504
+ kind: "scalar",
3505
+ T: 9
3506
+ /* ScalarType.STRING */
3507
+ },
3508
+ { no: 5, name: "total_length", kind: "scalar", T: 4, opt: true },
3509
+ { no: 6, name: "total_chunks", kind: "scalar", T: 4, opt: true },
3510
+ { no: 7, name: "encryption_type", kind: "enum", T: import_protobuf.proto3.getEnumType(Encryption_Type) },
3511
+ { no: 8, name: "extensions", kind: "map", K: 9, V: {
3512
+ kind: "scalar",
3513
+ T: 9
3514
+ /* ScalarType.STRING */
3515
+ } },
3516
+ { no: 9, name: "text_header", kind: "message", T: DataStream_TextHeader, oneof: "content_header" },
3517
+ { no: 10, name: "file_header", kind: "message", T: DataStream_FileHeader, oneof: "content_header" }
3518
+ ]);
3519
+ let DataStream_Header = _DataStream_Header;
3520
+ const _DataStream_Chunk = class _DataStream_Chunk extends import_protobuf.Message {
3521
+ constructor(data) {
3522
+ super();
3523
+ /**
3524
+ * unique identifier for this data stream to map it to the correct header
3525
+ *
3526
+ * @generated from field: string stream_id = 1;
3527
+ */
3528
+ this.streamId = "";
3529
+ /**
3530
+ * @generated from field: uint64 chunk_index = 2;
3531
+ */
3532
+ this.chunkIndex = import_protobuf.protoInt64.zero;
3533
+ /**
3534
+ * content as binary (bytes)
3535
+ *
3536
+ * @generated from field: bytes content = 3;
3537
+ */
3538
+ this.content = new Uint8Array(0);
3539
+ /**
3540
+ * true only if this is the last chunk of this stream - can also be sent with empty content
3541
+ *
3542
+ * @generated from field: bool complete = 4;
3543
+ */
3544
+ this.complete = false;
3545
+ /**
3546
+ * a version indicating that this chunk_index has been retroactively modified and the original one needs to be replaced
3547
+ *
3548
+ * @generated from field: int32 version = 5;
3549
+ */
3550
+ this.version = 0;
3551
+ import_protobuf.proto3.util.initPartial(data, this);
3552
+ }
3553
+ static fromBinary(bytes, options) {
3554
+ return new _DataStream_Chunk().fromBinary(bytes, options);
3555
+ }
3556
+ static fromJson(jsonValue, options) {
3557
+ return new _DataStream_Chunk().fromJson(jsonValue, options);
3558
+ }
3559
+ static fromJsonString(jsonString, options) {
3560
+ return new _DataStream_Chunk().fromJsonString(jsonString, options);
3561
+ }
3562
+ static equals(a, b) {
3563
+ return import_protobuf.proto3.util.equals(_DataStream_Chunk, a, b);
3564
+ }
3565
+ };
3566
+ _DataStream_Chunk.runtime = import_protobuf.proto3;
3567
+ _DataStream_Chunk.typeName = "livekit.DataStream.Chunk";
3568
+ _DataStream_Chunk.fields = import_protobuf.proto3.util.newFieldList(() => [
3569
+ {
3570
+ no: 1,
3571
+ name: "stream_id",
3572
+ kind: "scalar",
3573
+ T: 9
3574
+ /* ScalarType.STRING */
3575
+ },
3576
+ {
3577
+ no: 2,
3578
+ name: "chunk_index",
3579
+ kind: "scalar",
3580
+ T: 4
3581
+ /* ScalarType.UINT64 */
3582
+ },
3583
+ {
3584
+ no: 3,
3585
+ name: "content",
3586
+ kind: "scalar",
3587
+ T: 12
3588
+ /* ScalarType.BYTES */
3589
+ },
3590
+ {
3591
+ no: 4,
3592
+ name: "complete",
3593
+ kind: "scalar",
3594
+ T: 8
3595
+ /* ScalarType.BOOL */
3596
+ },
3597
+ {
3598
+ no: 5,
3599
+ name: "version",
3600
+ kind: "scalar",
3601
+ T: 5
3602
+ /* ScalarType.INT32 */
3603
+ },
3604
+ { no: 6, name: "iv", kind: "scalar", T: 12, opt: true }
3605
+ ]);
3606
+ let DataStream_Chunk = _DataStream_Chunk;
3268
3607
  // Annotate the CommonJS export names for ESM import in node:
3269
3608
  0 && (module.exports = {
3270
3609
  ActiveSpeakerUpdate,
@@ -3279,6 +3618,12 @@ let TimedVersion = _TimedVersion;
3279
3618
  ConnectionQuality,
3280
3619
  DataPacket,
3281
3620
  DataPacket_Kind,
3621
+ DataStream,
3622
+ DataStream_Chunk,
3623
+ DataStream_FileHeader,
3624
+ DataStream_Header,
3625
+ DataStream_OperationType,
3626
+ DataStream_TextHeader,
3282
3627
  DisabledCodecs,
3283
3628
  DisconnectReason,
3284
3629
  Encryption,