@livekit/rtc-node 0.12.1 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (223) hide show
  1. package/dist/audio_frame.cjs +2 -2
  2. package/dist/audio_frame.cjs.map +1 -1
  3. package/dist/audio_frame.d.cts +31 -0
  4. package/dist/audio_frame.d.ts +11 -5
  5. package/dist/audio_frame.d.ts.map +1 -1
  6. package/dist/audio_frame.js +3 -3
  7. package/dist/audio_frame.js.map +1 -1
  8. package/dist/audio_resampler.cjs +10 -7
  9. package/dist/audio_resampler.cjs.map +1 -1
  10. package/dist/audio_resampler.d.cts +59 -0
  11. package/dist/audio_resampler.d.ts +11 -3
  12. package/dist/audio_resampler.d.ts.map +1 -1
  13. package/dist/audio_resampler.js +13 -10
  14. package/dist/audio_resampler.js.map +1 -1
  15. package/dist/audio_source.cjs +6 -4
  16. package/dist/audio_source.cjs.map +1 -1
  17. package/dist/audio_source.d.cts +37 -0
  18. package/dist/audio_source.d.ts +13 -5
  19. package/dist/audio_source.d.ts.map +1 -1
  20. package/dist/audio_source.js +9 -7
  21. package/dist/audio_source.js.map +1 -1
  22. package/dist/audio_stream.cjs +1 -2
  23. package/dist/audio_stream.cjs.map +1 -1
  24. package/dist/audio_stream.d.cts +37 -0
  25. package/dist/audio_stream.d.ts +16 -5
  26. package/dist/audio_stream.d.ts.map +1 -1
  27. package/dist/audio_stream.js +2 -3
  28. package/dist/audio_stream.js.map +1 -1
  29. package/dist/e2ee.cjs +19 -20
  30. package/dist/e2ee.cjs.map +1 -1
  31. package/dist/e2ee.d.cts +47 -0
  32. package/dist/e2ee.d.ts +11 -8
  33. package/dist/e2ee.d.ts.map +1 -1
  34. package/dist/e2ee.js +29 -30
  35. package/dist/e2ee.js.map +1 -1
  36. package/dist/ffi_client.cjs +6 -5
  37. package/dist/ffi_client.cjs.map +1 -1
  38. package/dist/ffi_client.d.cts +35 -0
  39. package/dist/ffi_client.d.ts +23 -11
  40. package/dist/ffi_client.d.ts.map +1 -1
  41. package/dist/ffi_client.js +6 -10
  42. package/dist/ffi_client.js.map +1 -1
  43. package/dist/index.cjs +16 -49
  44. package/dist/index.cjs.map +1 -1
  45. package/dist/index.d.cts +28 -0
  46. package/dist/index.d.ts +20 -41
  47. package/dist/index.d.ts.map +1 -1
  48. package/dist/index.js +7 -46
  49. package/dist/index.js.map +1 -1
  50. package/dist/napi/native.d.cjs.map +1 -1
  51. package/dist/napi/native.d.d.cts +21 -0
  52. package/dist/napi/native.d.d.ts +21 -0
  53. package/dist/napi/native.d.ts +5 -5
  54. package/dist/native.d.ts +5 -5
  55. package/dist/participant.cjs +57 -34
  56. package/dist/participant.cjs.map +1 -1
  57. package/dist/participant.d.cts +126 -0
  58. package/dist/participant.d.ts +34 -20
  59. package/dist/participant.d.ts.map +1 -1
  60. package/dist/participant.js +75 -50
  61. package/dist/participant.js.map +1 -1
  62. package/dist/proto/audio_frame_pb.cjs +977 -125
  63. package/dist/proto/audio_frame_pb.cjs.map +1 -1
  64. package/dist/proto/audio_frame_pb.d.cts +898 -0
  65. package/dist/proto/audio_frame_pb.d.ts +506 -417
  66. package/dist/proto/audio_frame_pb.d.ts.map +1 -1
  67. package/dist/proto/audio_frame_pb.js +943 -85
  68. package/dist/proto/audio_frame_pb.js.map +1 -1
  69. package/dist/proto/e2ee_pb.cjs +700 -85
  70. package/dist/proto/e2ee_pb.cjs.map +1 -1
  71. package/dist/proto/e2ee_pb.d.cts +653 -0
  72. package/dist/proto/e2ee_pb.d.ts +333 -263
  73. package/dist/proto/e2ee_pb.d.ts.map +1 -1
  74. package/dist/proto/e2ee_pb.js +675 -57
  75. package/dist/proto/e2ee_pb.js.map +1 -1
  76. package/dist/proto/ffi_pb.cjs +369 -36
  77. package/dist/proto/ffi_pb.cjs.map +1 -1
  78. package/dist/proto/ffi_pb.d.cts +898 -0
  79. package/dist/proto/ffi_pb.d.ts +164 -112
  80. package/dist/proto/ffi_pb.d.ts.map +1 -1
  81. package/dist/proto/ffi_pb.js +364 -29
  82. package/dist/proto/ffi_pb.js.map +1 -1
  83. package/dist/proto/handle_pb.cjs +27 -7
  84. package/dist/proto/handle_pb.cjs.map +1 -1
  85. package/dist/proto/handle_pb.d.cts +31 -0
  86. package/dist/proto/handle_pb.d.ts +15 -15
  87. package/dist/proto/handle_pb.d.ts.map +1 -1
  88. package/dist/proto/handle_pb.js +26 -5
  89. package/dist/proto/handle_pb.js.map +1 -1
  90. package/dist/proto/participant_pb.cjs +112 -15
  91. package/dist/proto/participant_pb.cjs.map +1 -1
  92. package/dist/proto/participant_pb.d.cts +181 -0
  93. package/dist/proto/participant_pb.d.ts +143 -53
  94. package/dist/proto/participant_pb.d.ts.map +1 -1
  95. package/dist/proto/participant_pb.js +109 -11
  96. package/dist/proto/participant_pb.js.map +1 -1
  97. package/dist/proto/room_pb.cjs +2693 -302
  98. package/dist/proto/room_pb.cjs.map +1 -1
  99. package/dist/proto/room_pb.d.cts +2475 -0
  100. package/dist/proto/room_pb.d.ts +1269 -864
  101. package/dist/proto/room_pb.d.ts.map +1 -1
  102. package/dist/proto/room_pb.js +2603 -210
  103. package/dist/proto/room_pb.js.map +1 -1
  104. package/dist/proto/rpc_pb.cjs +302 -37
  105. package/dist/proto/rpc_pb.cjs.map +1 -1
  106. package/dist/proto/rpc_pb.d.cts +267 -0
  107. package/dist/proto/rpc_pb.d.ts +140 -108
  108. package/dist/proto/rpc_pb.d.ts.map +1 -1
  109. package/dist/proto/rpc_pb.js +291 -25
  110. package/dist/proto/rpc_pb.js.map +1 -1
  111. package/dist/proto/stats_pb.cjs +1253 -139
  112. package/dist/proto/stats_pb.cjs.map +1 -1
  113. package/dist/proto/stats_pb.d.cts +1764 -0
  114. package/dist/proto/stats_pb.d.ts +806 -693
  115. package/dist/proto/stats_pb.d.ts.map +1 -1
  116. package/dist/proto/stats_pb.js +1216 -93
  117. package/dist/proto/stats_pb.js.map +1 -1
  118. package/dist/proto/track_pb.cjs +462 -64
  119. package/dist/proto/track_pb.cjs.map +1 -1
  120. package/dist/proto/track_pb.d.cts +434 -0
  121. package/dist/proto/track_pb.d.ts +254 -220
  122. package/dist/proto/track_pb.d.ts.map +1 -1
  123. package/dist/proto/track_pb.js +447 -45
  124. package/dist/proto/track_pb.js.map +1 -1
  125. package/dist/proto/track_publication_pb.cjs +130 -0
  126. package/dist/proto/track_publication_pb.cjs.map +1 -0
  127. package/dist/proto/track_publication_pb.d.cts +80 -0
  128. package/dist/proto/track_publication_pb.d.ts +80 -0
  129. package/dist/proto/track_publication_pb.d.ts.map +1 -0
  130. package/dist/proto/track_publication_pb.js +103 -0
  131. package/dist/proto/track_publication_pb.js.map +1 -0
  132. package/dist/proto/video_frame_pb.cjs +648 -88
  133. package/dist/proto/video_frame_pb.cjs.map +1 -1
  134. package/dist/proto/video_frame_pb.d.cts +660 -0
  135. package/dist/proto/video_frame_pb.d.ts +375 -328
  136. package/dist/proto/video_frame_pb.d.ts.map +1 -1
  137. package/dist/proto/video_frame_pb.js +626 -60
  138. package/dist/proto/video_frame_pb.js.map +1 -1
  139. package/dist/room.cjs +93 -125
  140. package/dist/room.cjs.map +1 -1
  141. package/dist/room.d.cts +123 -0
  142. package/dist/room.d.ts +37 -34
  143. package/dist/room.d.ts.map +1 -1
  144. package/dist/room.js +92 -122
  145. package/dist/room.js.map +1 -1
  146. package/dist/rpc.cjs.map +1 -1
  147. package/dist/rpc.d.cts +81 -0
  148. package/dist/rpc.d.ts +10 -7
  149. package/dist/rpc.js.map +1 -1
  150. package/dist/track.cjs +12 -8
  151. package/dist/track.cjs.map +1 -1
  152. package/dist/track.d.cts +45 -0
  153. package/dist/track.d.ts +30 -20
  154. package/dist/track.d.ts.map +1 -1
  155. package/dist/track.js +13 -9
  156. package/dist/track.js.map +1 -1
  157. package/dist/track_publication.cjs +21 -12
  158. package/dist/track_publication.cjs.map +1 -1
  159. package/dist/track_publication.d.cts +47 -0
  160. package/dist/track_publication.d.ts +30 -19
  161. package/dist/track_publication.d.ts.map +1 -1
  162. package/dist/track_publication.js +22 -13
  163. package/dist/track_publication.js.map +1 -1
  164. package/dist/transcription.d.cts +15 -0
  165. package/dist/transcription.d.ts +4 -3
  166. package/dist/types.d.cts +9 -0
  167. package/dist/types.d.ts +3 -2
  168. package/dist/version.cjs +1 -1
  169. package/dist/version.cjs.map +1 -1
  170. package/dist/version.d.cts +3 -0
  171. package/dist/version.d.ts +3 -2
  172. package/dist/version.js +1 -1
  173. package/dist/version.js.map +1 -1
  174. package/dist/video_frame.cjs +26 -45
  175. package/dist/video_frame.cjs.map +1 -1
  176. package/dist/video_frame.d.cts +24 -0
  177. package/dist/video_frame.d.ts +10 -4
  178. package/dist/video_frame.d.ts.map +1 -1
  179. package/dist/video_frame.js +29 -48
  180. package/dist/video_frame.js.map +1 -1
  181. package/dist/video_source.cjs +7 -4
  182. package/dist/video_source.cjs.map +1 -1
  183. package/dist/video_source.d.cts +22 -0
  184. package/dist/video_source.d.ts +14 -7
  185. package/dist/video_source.d.ts.map +1 -1
  186. package/dist/video_source.js +9 -6
  187. package/dist/video_source.js.map +1 -1
  188. package/dist/video_stream.cjs +16 -5
  189. package/dist/video_stream.cjs.map +1 -1
  190. package/dist/video_stream.d.cts +40 -0
  191. package/dist/video_stream.d.ts +18 -7
  192. package/dist/video_stream.d.ts.map +1 -1
  193. package/dist/video_stream.js +17 -6
  194. package/dist/video_stream.js.map +1 -1
  195. package/package.json +17 -12
  196. package/src/audio_frame.ts +10 -10
  197. package/src/audio_resampler.ts +15 -13
  198. package/src/audio_source.ts +11 -8
  199. package/src/audio_stream.ts +3 -4
  200. package/src/e2ee.ts +36 -37
  201. package/src/ffi_client.ts +8 -16
  202. package/src/index.ts +5 -68
  203. package/src/napi/native.d.ts +5 -5
  204. package/src/participant.ts +100 -72
  205. package/src/proto/audio_frame_pb.ts +1220 -496
  206. package/src/proto/e2ee_pb.ts +858 -337
  207. package/src/proto/ffi_pb.ts +442 -135
  208. package/src/proto/handle_pb.ts +33 -19
  209. package/src/proto/participant_pb.ts +225 -60
  210. package/src/proto/room_pb.ts +3149 -1013
  211. package/src/proto/rpc_pb.ts +358 -129
  212. package/src/proto/stats_pb.ts +1891 -877
  213. package/src/proto/track_pb.ts +587 -253
  214. package/src/proto/track_publication_pb.ts +180 -0
  215. package/src/proto/video_frame_pb.ts +861 -394
  216. package/src/room.ts +143 -188
  217. package/src/rpc.ts +1 -1
  218. package/src/track.ts +16 -17
  219. package/src/track_publication.ts +25 -26
  220. package/src/version.ts +1 -1
  221. package/src/video_frame.ts +48 -72
  222. package/src/video_source.ts +11 -8
  223. package/src/video_stream.ts +18 -8
@@ -12,299 +12,528 @@
12
12
  // See the License for the specific language governing permissions and
13
13
  // limitations under the License.
14
14
 
15
- // @generated by protoc-gen-es v2.2.0 with parameter "target=ts,import_extension=js"
15
+ // @generated by protoc-gen-es v1.10.0 with parameter "target=ts,import_extension=.js"
16
16
  // @generated from file rpc.proto (package livekit.proto, syntax proto2)
17
17
  /* eslint-disable */
18
+ // @ts-nocheck
18
19
 
19
- import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1";
20
- import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1";
21
- import type { Message } from "@bufbuild/protobuf";
22
-
23
- /**
24
- * Describes the file rpc.proto.
25
- */
26
- export const file_rpc: GenFile = /*@__PURE__*/
27
- fileDesc("CglycGMucHJvdG8SDWxpdmVraXQucHJvdG8iNwoIUnBjRXJyb3ISDAoEY29kZRgBIAIoDRIPCgdtZXNzYWdlGAIgAigJEgwKBGRhdGEYAyABKAkikQEKEVBlcmZvcm1ScGNSZXF1ZXN0EiAKGGxvY2FsX3BhcnRpY2lwYW50X2hhbmRsZRgBIAIoBBIcChRkZXN0aW5hdGlvbl9pZGVudGl0eRgCIAIoCRIOCgZtZXRob2QYAyACKAkSDwoHcGF5bG9hZBgEIAIoCRIbChNyZXNwb25zZV90aW1lb3V0X21zGAUgASgNIkwKGFJlZ2lzdGVyUnBjTWV0aG9kUmVxdWVzdBIgChhsb2NhbF9wYXJ0aWNpcGFudF9oYW5kbGUYASACKAQSDgoGbWV0aG9kGAIgAigJIk4KGlVucmVnaXN0ZXJScGNNZXRob2RSZXF1ZXN0EiAKGGxvY2FsX3BhcnRpY2lwYW50X2hhbmRsZRgBIAIoBBIOCgZtZXRob2QYAiACKAkilgEKIlJwY01ldGhvZEludm9jYXRpb25SZXNwb25zZVJlcXVlc3QSIAoYbG9jYWxfcGFydGljaXBhbnRfaGFuZGxlGAEgAigEEhUKDWludm9jYXRpb25faWQYAiACKAQSDwoHcGF5bG9hZBgDIAEoCRImCgVlcnJvchgEIAEoCzIXLmxpdmVraXQucHJvdG8uUnBjRXJyb3IiJgoSUGVyZm9ybVJwY1Jlc3BvbnNlEhAKCGFzeW5jX2lkGAEgAigEIhsKGVJlZ2lzdGVyUnBjTWV0aG9kUmVzcG9uc2UiHQobVW5yZWdpc3RlclJwY01ldGhvZFJlc3BvbnNlIjQKI1JwY01ldGhvZEludm9jYXRpb25SZXNwb25zZVJlc3BvbnNlEg0KBWVycm9yGAEgASgJIl8KElBlcmZvcm1ScGNDYWxsYmFjaxIQCghhc3luY19pZBgBIAIoBBIPCgdwYXlsb2FkGAIgASgJEiYKBWVycm9yGAMgASgLMhcubGl2ZWtpdC5wcm90by5ScGNFcnJvciK+AQoYUnBjTWV0aG9kSW52b2NhdGlvbkV2ZW50EiAKGGxvY2FsX3BhcnRpY2lwYW50X2hhbmRsZRgBIAIoBBIVCg1pbnZvY2F0aW9uX2lkGAIgAigEEg4KBm1ldGhvZBgDIAIoCRISCgpyZXF1ZXN0X2lkGAQgAigJEhcKD2NhbGxlcl9pZGVudGl0eRgFIAIoCRIPCgdwYXlsb2FkGAYgAigJEhsKE3Jlc3BvbnNlX3RpbWVvdXRfbXMYByACKA1CEKoCDUxpdmVLaXQuUHJvdG8");
20
+ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
21
+ import { Message, proto2 } from "@bufbuild/protobuf";
28
22
 
29
23
  /**
30
24
  * @generated from message livekit.proto.RpcError
31
25
  */
32
- export type RpcError = Message<"livekit.proto.RpcError"> & {
26
+ export class RpcError extends Message<RpcError> {
33
27
  /**
34
28
  * @generated from field: required uint32 code = 1;
35
29
  */
36
- code: number;
30
+ code?: number;
37
31
 
38
32
  /**
39
33
  * @generated from field: required string message = 2;
40
34
  */
41
- message: string;
35
+ message?: string;
42
36
 
43
37
  /**
44
38
  * @generated from field: optional string data = 3;
45
39
  */
46
- data: string;
47
- };
48
-
49
- /**
50
- * Describes the message livekit.proto.RpcError.
51
- * Use `create(RpcErrorSchema)` to create a new message.
52
- */
53
- export const RpcErrorSchema: GenMessage<RpcError> = /*@__PURE__*/
54
- messageDesc(file_rpc, 0);
40
+ data?: string;
41
+
42
+ constructor(data?: PartialMessage<RpcError>) {
43
+ super();
44
+ proto2.util.initPartial(data, this);
45
+ }
46
+
47
+ static readonly runtime: typeof proto2 = proto2;
48
+ static readonly typeName = "livekit.proto.RpcError";
49
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
50
+ { no: 1, name: "code", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true },
51
+ { no: 2, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true },
52
+ { no: 3, name: "data", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
53
+ ]);
54
+
55
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): RpcError {
56
+ return new RpcError().fromBinary(bytes, options);
57
+ }
58
+
59
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): RpcError {
60
+ return new RpcError().fromJson(jsonValue, options);
61
+ }
62
+
63
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): RpcError {
64
+ return new RpcError().fromJsonString(jsonString, options);
65
+ }
66
+
67
+ static equals(a: RpcError | PlainMessage<RpcError> | undefined, b: RpcError | PlainMessage<RpcError> | undefined): boolean {
68
+ return proto2.util.equals(RpcError, a, b);
69
+ }
70
+ }
55
71
 
56
72
  /**
57
73
  * FFI Requests
58
74
  *
59
75
  * @generated from message livekit.proto.PerformRpcRequest
60
76
  */
61
- export type PerformRpcRequest = Message<"livekit.proto.PerformRpcRequest"> & {
77
+ export class PerformRpcRequest extends Message<PerformRpcRequest> {
62
78
  /**
63
79
  * @generated from field: required uint64 local_participant_handle = 1;
64
80
  */
65
- localParticipantHandle: bigint;
81
+ localParticipantHandle?: bigint;
66
82
 
67
83
  /**
68
84
  * @generated from field: required string destination_identity = 2;
69
85
  */
70
- destinationIdentity: string;
86
+ destinationIdentity?: string;
71
87
 
72
88
  /**
73
89
  * @generated from field: required string method = 3;
74
90
  */
75
- method: string;
91
+ method?: string;
76
92
 
77
93
  /**
78
94
  * @generated from field: required string payload = 4;
79
95
  */
80
- payload: string;
96
+ payload?: string;
81
97
 
82
98
  /**
83
99
  * @generated from field: optional uint32 response_timeout_ms = 5;
84
100
  */
85
- responseTimeoutMs: number;
86
- };
87
-
88
- /**
89
- * Describes the message livekit.proto.PerformRpcRequest.
90
- * Use `create(PerformRpcRequestSchema)` to create a new message.
91
- */
92
- export const PerformRpcRequestSchema: GenMessage<PerformRpcRequest> = /*@__PURE__*/
93
- messageDesc(file_rpc, 1);
101
+ responseTimeoutMs?: number;
102
+
103
+ constructor(data?: PartialMessage<PerformRpcRequest>) {
104
+ super();
105
+ proto2.util.initPartial(data, this);
106
+ }
107
+
108
+ static readonly runtime: typeof proto2 = proto2;
109
+ static readonly typeName = "livekit.proto.PerformRpcRequest";
110
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
111
+ { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
112
+ { no: 2, name: "destination_identity", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true },
113
+ { no: 3, name: "method", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true },
114
+ { no: 4, name: "payload", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true },
115
+ { no: 5, name: "response_timeout_ms", kind: "scalar", T: 13 /* ScalarType.UINT32 */, opt: true },
116
+ ]);
117
+
118
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PerformRpcRequest {
119
+ return new PerformRpcRequest().fromBinary(bytes, options);
120
+ }
121
+
122
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PerformRpcRequest {
123
+ return new PerformRpcRequest().fromJson(jsonValue, options);
124
+ }
125
+
126
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PerformRpcRequest {
127
+ return new PerformRpcRequest().fromJsonString(jsonString, options);
128
+ }
129
+
130
+ static equals(a: PerformRpcRequest | PlainMessage<PerformRpcRequest> | undefined, b: PerformRpcRequest | PlainMessage<PerformRpcRequest> | undefined): boolean {
131
+ return proto2.util.equals(PerformRpcRequest, a, b);
132
+ }
133
+ }
94
134
 
95
135
  /**
96
136
  * @generated from message livekit.proto.RegisterRpcMethodRequest
97
137
  */
98
- export type RegisterRpcMethodRequest = Message<"livekit.proto.RegisterRpcMethodRequest"> & {
138
+ export class RegisterRpcMethodRequest extends Message<RegisterRpcMethodRequest> {
99
139
  /**
100
140
  * @generated from field: required uint64 local_participant_handle = 1;
101
141
  */
102
- localParticipantHandle: bigint;
142
+ localParticipantHandle?: bigint;
103
143
 
104
144
  /**
105
145
  * @generated from field: required string method = 2;
106
146
  */
107
- method: string;
108
- };
147
+ method?: string;
109
148
 
110
- /**
111
- * Describes the message livekit.proto.RegisterRpcMethodRequest.
112
- * Use `create(RegisterRpcMethodRequestSchema)` to create a new message.
113
- */
114
- export const RegisterRpcMethodRequestSchema: GenMessage<RegisterRpcMethodRequest> = /*@__PURE__*/
115
- messageDesc(file_rpc, 2);
149
+ constructor(data?: PartialMessage<RegisterRpcMethodRequest>) {
150
+ super();
151
+ proto2.util.initPartial(data, this);
152
+ }
153
+
154
+ static readonly runtime: typeof proto2 = proto2;
155
+ static readonly typeName = "livekit.proto.RegisterRpcMethodRequest";
156
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
157
+ { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
158
+ { no: 2, name: "method", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true },
159
+ ]);
160
+
161
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): RegisterRpcMethodRequest {
162
+ return new RegisterRpcMethodRequest().fromBinary(bytes, options);
163
+ }
164
+
165
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): RegisterRpcMethodRequest {
166
+ return new RegisterRpcMethodRequest().fromJson(jsonValue, options);
167
+ }
168
+
169
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): RegisterRpcMethodRequest {
170
+ return new RegisterRpcMethodRequest().fromJsonString(jsonString, options);
171
+ }
172
+
173
+ static equals(a: RegisterRpcMethodRequest | PlainMessage<RegisterRpcMethodRequest> | undefined, b: RegisterRpcMethodRequest | PlainMessage<RegisterRpcMethodRequest> | undefined): boolean {
174
+ return proto2.util.equals(RegisterRpcMethodRequest, a, b);
175
+ }
176
+ }
116
177
 
117
178
  /**
118
179
  * @generated from message livekit.proto.UnregisterRpcMethodRequest
119
180
  */
120
- export type UnregisterRpcMethodRequest = Message<"livekit.proto.UnregisterRpcMethodRequest"> & {
181
+ export class UnregisterRpcMethodRequest extends Message<UnregisterRpcMethodRequest> {
121
182
  /**
122
183
  * @generated from field: required uint64 local_participant_handle = 1;
123
184
  */
124
- localParticipantHandle: bigint;
185
+ localParticipantHandle?: bigint;
125
186
 
126
187
  /**
127
188
  * @generated from field: required string method = 2;
128
189
  */
129
- method: string;
130
- };
190
+ method?: string;
131
191
 
132
- /**
133
- * Describes the message livekit.proto.UnregisterRpcMethodRequest.
134
- * Use `create(UnregisterRpcMethodRequestSchema)` to create a new message.
135
- */
136
- export const UnregisterRpcMethodRequestSchema: GenMessage<UnregisterRpcMethodRequest> = /*@__PURE__*/
137
- messageDesc(file_rpc, 3);
192
+ constructor(data?: PartialMessage<UnregisterRpcMethodRequest>) {
193
+ super();
194
+ proto2.util.initPartial(data, this);
195
+ }
196
+
197
+ static readonly runtime: typeof proto2 = proto2;
198
+ static readonly typeName = "livekit.proto.UnregisterRpcMethodRequest";
199
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
200
+ { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
201
+ { no: 2, name: "method", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true },
202
+ ]);
203
+
204
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UnregisterRpcMethodRequest {
205
+ return new UnregisterRpcMethodRequest().fromBinary(bytes, options);
206
+ }
207
+
208
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UnregisterRpcMethodRequest {
209
+ return new UnregisterRpcMethodRequest().fromJson(jsonValue, options);
210
+ }
211
+
212
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UnregisterRpcMethodRequest {
213
+ return new UnregisterRpcMethodRequest().fromJsonString(jsonString, options);
214
+ }
215
+
216
+ static equals(a: UnregisterRpcMethodRequest | PlainMessage<UnregisterRpcMethodRequest> | undefined, b: UnregisterRpcMethodRequest | PlainMessage<UnregisterRpcMethodRequest> | undefined): boolean {
217
+ return proto2.util.equals(UnregisterRpcMethodRequest, a, b);
218
+ }
219
+ }
138
220
 
139
221
  /**
140
222
  * @generated from message livekit.proto.RpcMethodInvocationResponseRequest
141
223
  */
142
- export type RpcMethodInvocationResponseRequest = Message<"livekit.proto.RpcMethodInvocationResponseRequest"> & {
224
+ export class RpcMethodInvocationResponseRequest extends Message<RpcMethodInvocationResponseRequest> {
143
225
  /**
144
226
  * @generated from field: required uint64 local_participant_handle = 1;
145
227
  */
146
- localParticipantHandle: bigint;
228
+ localParticipantHandle?: bigint;
147
229
 
148
230
  /**
149
231
  * @generated from field: required uint64 invocation_id = 2;
150
232
  */
151
- invocationId: bigint;
233
+ invocationId?: bigint;
152
234
 
153
235
  /**
154
236
  * @generated from field: optional string payload = 3;
155
237
  */
156
- payload: string;
238
+ payload?: string;
157
239
 
158
240
  /**
159
241
  * @generated from field: optional livekit.proto.RpcError error = 4;
160
242
  */
161
243
  error?: RpcError;
162
- };
163
244
 
164
- /**
165
- * Describes the message livekit.proto.RpcMethodInvocationResponseRequest.
166
- * Use `create(RpcMethodInvocationResponseRequestSchema)` to create a new message.
167
- */
168
- export const RpcMethodInvocationResponseRequestSchema: GenMessage<RpcMethodInvocationResponseRequest> = /*@__PURE__*/
169
- messageDesc(file_rpc, 4);
245
+ constructor(data?: PartialMessage<RpcMethodInvocationResponseRequest>) {
246
+ super();
247
+ proto2.util.initPartial(data, this);
248
+ }
249
+
250
+ static readonly runtime: typeof proto2 = proto2;
251
+ static readonly typeName = "livekit.proto.RpcMethodInvocationResponseRequest";
252
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
253
+ { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
254
+ { no: 2, name: "invocation_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
255
+ { no: 3, name: "payload", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
256
+ { no: 4, name: "error", kind: "message", T: RpcError, opt: true },
257
+ ]);
258
+
259
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): RpcMethodInvocationResponseRequest {
260
+ return new RpcMethodInvocationResponseRequest().fromBinary(bytes, options);
261
+ }
262
+
263
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): RpcMethodInvocationResponseRequest {
264
+ return new RpcMethodInvocationResponseRequest().fromJson(jsonValue, options);
265
+ }
266
+
267
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): RpcMethodInvocationResponseRequest {
268
+ return new RpcMethodInvocationResponseRequest().fromJsonString(jsonString, options);
269
+ }
270
+
271
+ static equals(a: RpcMethodInvocationResponseRequest | PlainMessage<RpcMethodInvocationResponseRequest> | undefined, b: RpcMethodInvocationResponseRequest | PlainMessage<RpcMethodInvocationResponseRequest> | undefined): boolean {
272
+ return proto2.util.equals(RpcMethodInvocationResponseRequest, a, b);
273
+ }
274
+ }
170
275
 
171
276
  /**
172
277
  * FFI Responses
173
278
  *
174
279
  * @generated from message livekit.proto.PerformRpcResponse
175
280
  */
176
- export type PerformRpcResponse = Message<"livekit.proto.PerformRpcResponse"> & {
281
+ export class PerformRpcResponse extends Message<PerformRpcResponse> {
177
282
  /**
178
283
  * @generated from field: required uint64 async_id = 1;
179
284
  */
180
- asyncId: bigint;
181
- };
285
+ asyncId?: bigint;
182
286
 
183
- /**
184
- * Describes the message livekit.proto.PerformRpcResponse.
185
- * Use `create(PerformRpcResponseSchema)` to create a new message.
186
- */
187
- export const PerformRpcResponseSchema: GenMessage<PerformRpcResponse> = /*@__PURE__*/
188
- messageDesc(file_rpc, 5);
287
+ constructor(data?: PartialMessage<PerformRpcResponse>) {
288
+ super();
289
+ proto2.util.initPartial(data, this);
290
+ }
189
291
 
190
- /**
191
- * @generated from message livekit.proto.RegisterRpcMethodResponse
192
- */
193
- export type RegisterRpcMethodResponse = Message<"livekit.proto.RegisterRpcMethodResponse"> & {
194
- };
292
+ static readonly runtime: typeof proto2 = proto2;
293
+ static readonly typeName = "livekit.proto.PerformRpcResponse";
294
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
295
+ { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
296
+ ]);
195
297
 
196
- /**
197
- * Describes the message livekit.proto.RegisterRpcMethodResponse.
198
- * Use `create(RegisterRpcMethodResponseSchema)` to create a new message.
199
- */
200
- export const RegisterRpcMethodResponseSchema: GenMessage<RegisterRpcMethodResponse> = /*@__PURE__*/
201
- messageDesc(file_rpc, 6);
298
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PerformRpcResponse {
299
+ return new PerformRpcResponse().fromBinary(bytes, options);
300
+ }
301
+
302
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PerformRpcResponse {
303
+ return new PerformRpcResponse().fromJson(jsonValue, options);
304
+ }
305
+
306
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PerformRpcResponse {
307
+ return new PerformRpcResponse().fromJsonString(jsonString, options);
308
+ }
309
+
310
+ static equals(a: PerformRpcResponse | PlainMessage<PerformRpcResponse> | undefined, b: PerformRpcResponse | PlainMessage<PerformRpcResponse> | undefined): boolean {
311
+ return proto2.util.equals(PerformRpcResponse, a, b);
312
+ }
313
+ }
202
314
 
203
315
  /**
204
- * @generated from message livekit.proto.UnregisterRpcMethodResponse
316
+ * @generated from message livekit.proto.RegisterRpcMethodResponse
205
317
  */
206
- export type UnregisterRpcMethodResponse = Message<"livekit.proto.UnregisterRpcMethodResponse"> & {
207
- };
318
+ export class RegisterRpcMethodResponse extends Message<RegisterRpcMethodResponse> {
319
+ constructor(data?: PartialMessage<RegisterRpcMethodResponse>) {
320
+ super();
321
+ proto2.util.initPartial(data, this);
322
+ }
323
+
324
+ static readonly runtime: typeof proto2 = proto2;
325
+ static readonly typeName = "livekit.proto.RegisterRpcMethodResponse";
326
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
327
+ ]);
328
+
329
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): RegisterRpcMethodResponse {
330
+ return new RegisterRpcMethodResponse().fromBinary(bytes, options);
331
+ }
332
+
333
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): RegisterRpcMethodResponse {
334
+ return new RegisterRpcMethodResponse().fromJson(jsonValue, options);
335
+ }
336
+
337
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): RegisterRpcMethodResponse {
338
+ return new RegisterRpcMethodResponse().fromJsonString(jsonString, options);
339
+ }
340
+
341
+ static equals(a: RegisterRpcMethodResponse | PlainMessage<RegisterRpcMethodResponse> | undefined, b: RegisterRpcMethodResponse | PlainMessage<RegisterRpcMethodResponse> | undefined): boolean {
342
+ return proto2.util.equals(RegisterRpcMethodResponse, a, b);
343
+ }
344
+ }
208
345
 
209
346
  /**
210
- * Describes the message livekit.proto.UnregisterRpcMethodResponse.
211
- * Use `create(UnregisterRpcMethodResponseSchema)` to create a new message.
347
+ * @generated from message livekit.proto.UnregisterRpcMethodResponse
212
348
  */
213
- export const UnregisterRpcMethodResponseSchema: GenMessage<UnregisterRpcMethodResponse> = /*@__PURE__*/
214
- messageDesc(file_rpc, 7);
349
+ export class UnregisterRpcMethodResponse extends Message<UnregisterRpcMethodResponse> {
350
+ constructor(data?: PartialMessage<UnregisterRpcMethodResponse>) {
351
+ super();
352
+ proto2.util.initPartial(data, this);
353
+ }
354
+
355
+ static readonly runtime: typeof proto2 = proto2;
356
+ static readonly typeName = "livekit.proto.UnregisterRpcMethodResponse";
357
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
358
+ ]);
359
+
360
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UnregisterRpcMethodResponse {
361
+ return new UnregisterRpcMethodResponse().fromBinary(bytes, options);
362
+ }
363
+
364
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UnregisterRpcMethodResponse {
365
+ return new UnregisterRpcMethodResponse().fromJson(jsonValue, options);
366
+ }
367
+
368
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UnregisterRpcMethodResponse {
369
+ return new UnregisterRpcMethodResponse().fromJsonString(jsonString, options);
370
+ }
371
+
372
+ static equals(a: UnregisterRpcMethodResponse | PlainMessage<UnregisterRpcMethodResponse> | undefined, b: UnregisterRpcMethodResponse | PlainMessage<UnregisterRpcMethodResponse> | undefined): boolean {
373
+ return proto2.util.equals(UnregisterRpcMethodResponse, a, b);
374
+ }
375
+ }
215
376
 
216
377
  /**
217
378
  * @generated from message livekit.proto.RpcMethodInvocationResponseResponse
218
379
  */
219
- export type RpcMethodInvocationResponseResponse = Message<"livekit.proto.RpcMethodInvocationResponseResponse"> & {
380
+ export class RpcMethodInvocationResponseResponse extends Message<RpcMethodInvocationResponseResponse> {
220
381
  /**
221
382
  * @generated from field: optional string error = 1;
222
383
  */
223
- error: string;
224
- };
384
+ error?: string;
225
385
 
226
- /**
227
- * Describes the message livekit.proto.RpcMethodInvocationResponseResponse.
228
- * Use `create(RpcMethodInvocationResponseResponseSchema)` to create a new message.
229
- */
230
- export const RpcMethodInvocationResponseResponseSchema: GenMessage<RpcMethodInvocationResponseResponse> = /*@__PURE__*/
231
- messageDesc(file_rpc, 8);
386
+ constructor(data?: PartialMessage<RpcMethodInvocationResponseResponse>) {
387
+ super();
388
+ proto2.util.initPartial(data, this);
389
+ }
390
+
391
+ static readonly runtime: typeof proto2 = proto2;
392
+ static readonly typeName = "livekit.proto.RpcMethodInvocationResponseResponse";
393
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
394
+ { no: 1, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
395
+ ]);
396
+
397
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): RpcMethodInvocationResponseResponse {
398
+ return new RpcMethodInvocationResponseResponse().fromBinary(bytes, options);
399
+ }
400
+
401
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): RpcMethodInvocationResponseResponse {
402
+ return new RpcMethodInvocationResponseResponse().fromJson(jsonValue, options);
403
+ }
404
+
405
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): RpcMethodInvocationResponseResponse {
406
+ return new RpcMethodInvocationResponseResponse().fromJsonString(jsonString, options);
407
+ }
408
+
409
+ static equals(a: RpcMethodInvocationResponseResponse | PlainMessage<RpcMethodInvocationResponseResponse> | undefined, b: RpcMethodInvocationResponseResponse | PlainMessage<RpcMethodInvocationResponseResponse> | undefined): boolean {
410
+ return proto2.util.equals(RpcMethodInvocationResponseResponse, a, b);
411
+ }
412
+ }
232
413
 
233
414
  /**
234
415
  * FFI Callbacks
235
416
  *
236
417
  * @generated from message livekit.proto.PerformRpcCallback
237
418
  */
238
- export type PerformRpcCallback = Message<"livekit.proto.PerformRpcCallback"> & {
419
+ export class PerformRpcCallback extends Message<PerformRpcCallback> {
239
420
  /**
240
421
  * @generated from field: required uint64 async_id = 1;
241
422
  */
242
- asyncId: bigint;
423
+ asyncId?: bigint;
243
424
 
244
425
  /**
245
426
  * @generated from field: optional string payload = 2;
246
427
  */
247
- payload: string;
428
+ payload?: string;
248
429
 
249
430
  /**
250
431
  * @generated from field: optional livekit.proto.RpcError error = 3;
251
432
  */
252
433
  error?: RpcError;
253
- };
254
434
 
255
- /**
256
- * Describes the message livekit.proto.PerformRpcCallback.
257
- * Use `create(PerformRpcCallbackSchema)` to create a new message.
258
- */
259
- export const PerformRpcCallbackSchema: GenMessage<PerformRpcCallback> = /*@__PURE__*/
260
- messageDesc(file_rpc, 9);
435
+ constructor(data?: PartialMessage<PerformRpcCallback>) {
436
+ super();
437
+ proto2.util.initPartial(data, this);
438
+ }
439
+
440
+ static readonly runtime: typeof proto2 = proto2;
441
+ static readonly typeName = "livekit.proto.PerformRpcCallback";
442
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
443
+ { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
444
+ { no: 2, name: "payload", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
445
+ { no: 3, name: "error", kind: "message", T: RpcError, opt: true },
446
+ ]);
447
+
448
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PerformRpcCallback {
449
+ return new PerformRpcCallback().fromBinary(bytes, options);
450
+ }
451
+
452
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PerformRpcCallback {
453
+ return new PerformRpcCallback().fromJson(jsonValue, options);
454
+ }
455
+
456
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PerformRpcCallback {
457
+ return new PerformRpcCallback().fromJsonString(jsonString, options);
458
+ }
459
+
460
+ static equals(a: PerformRpcCallback | PlainMessage<PerformRpcCallback> | undefined, b: PerformRpcCallback | PlainMessage<PerformRpcCallback> | undefined): boolean {
461
+ return proto2.util.equals(PerformRpcCallback, a, b);
462
+ }
463
+ }
261
464
 
262
465
  /**
263
466
  * FFI Events
264
467
  *
265
468
  * @generated from message livekit.proto.RpcMethodInvocationEvent
266
469
  */
267
- export type RpcMethodInvocationEvent = Message<"livekit.proto.RpcMethodInvocationEvent"> & {
470
+ export class RpcMethodInvocationEvent extends Message<RpcMethodInvocationEvent> {
268
471
  /**
269
472
  * @generated from field: required uint64 local_participant_handle = 1;
270
473
  */
271
- localParticipantHandle: bigint;
474
+ localParticipantHandle?: bigint;
272
475
 
273
476
  /**
274
477
  * @generated from field: required uint64 invocation_id = 2;
275
478
  */
276
- invocationId: bigint;
479
+ invocationId?: bigint;
277
480
 
278
481
  /**
279
482
  * @generated from field: required string method = 3;
280
483
  */
281
- method: string;
484
+ method?: string;
282
485
 
283
486
  /**
284
487
  * @generated from field: required string request_id = 4;
285
488
  */
286
- requestId: string;
489
+ requestId?: string;
287
490
 
288
491
  /**
289
492
  * @generated from field: required string caller_identity = 5;
290
493
  */
291
- callerIdentity: string;
494
+ callerIdentity?: string;
292
495
 
293
496
  /**
294
497
  * @generated from field: required string payload = 6;
295
498
  */
296
- payload: string;
499
+ payload?: string;
297
500
 
298
501
  /**
299
502
  * @generated from field: required uint32 response_timeout_ms = 7;
300
503
  */
301
- responseTimeoutMs: number;
302
- };
303
-
304
- /**
305
- * Describes the message livekit.proto.RpcMethodInvocationEvent.
306
- * Use `create(RpcMethodInvocationEventSchema)` to create a new message.
307
- */
308
- export const RpcMethodInvocationEventSchema: GenMessage<RpcMethodInvocationEvent> = /*@__PURE__*/
309
- messageDesc(file_rpc, 10);
504
+ responseTimeoutMs?: number;
505
+
506
+ constructor(data?: PartialMessage<RpcMethodInvocationEvent>) {
507
+ super();
508
+ proto2.util.initPartial(data, this);
509
+ }
510
+
511
+ static readonly runtime: typeof proto2 = proto2;
512
+ static readonly typeName = "livekit.proto.RpcMethodInvocationEvent";
513
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
514
+ { no: 1, name: "local_participant_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
515
+ { no: 2, name: "invocation_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
516
+ { no: 3, name: "method", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true },
517
+ { no: 4, name: "request_id", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true },
518
+ { no: 5, name: "caller_identity", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true },
519
+ { no: 6, name: "payload", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true },
520
+ { no: 7, name: "response_timeout_ms", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true },
521
+ ]);
522
+
523
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): RpcMethodInvocationEvent {
524
+ return new RpcMethodInvocationEvent().fromBinary(bytes, options);
525
+ }
526
+
527
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): RpcMethodInvocationEvent {
528
+ return new RpcMethodInvocationEvent().fromJson(jsonValue, options);
529
+ }
530
+
531
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): RpcMethodInvocationEvent {
532
+ return new RpcMethodInvocationEvent().fromJsonString(jsonString, options);
533
+ }
534
+
535
+ static equals(a: RpcMethodInvocationEvent | PlainMessage<RpcMethodInvocationEvent> | undefined, b: RpcMethodInvocationEvent | PlainMessage<RpcMethodInvocationEvent> | undefined): boolean {
536
+ return proto2.util.equals(RpcMethodInvocationEvent, a, b);
537
+ }
538
+ }
310
539