@stream-io/video-client 0.0.1-alpha.10

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 (222) hide show
  1. package/LICENSE +219 -0
  2. package/README.md +14 -0
  3. package/coverage/lcov-report/base.css +224 -0
  4. package/coverage/lcov-report/block-navigation.js +87 -0
  5. package/coverage/lcov-report/favicon.png +0 -0
  6. package/coverage/lcov-report/index.html +296 -0
  7. package/coverage/lcov-report/prettify.css +1 -0
  8. package/coverage/lcov-report/prettify.js +2 -0
  9. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  10. package/coverage/lcov-report/sorter.js +196 -0
  11. package/coverage/lcov-report/src/Batcher.ts.html +214 -0
  12. package/coverage/lcov-report/src/CallDropScheduler.ts.html +661 -0
  13. package/coverage/lcov-report/src/StreamSfuClient.ts.html +640 -0
  14. package/coverage/lcov-report/src/StreamVideoClient.ts.html +1594 -0
  15. package/coverage/lcov-report/src/config/defaultConfigs.ts.html +130 -0
  16. package/coverage/lcov-report/src/config/index.html +116 -0
  17. package/coverage/lcov-report/src/coordinator/StreamCoordinatorClient.ts.html +430 -0
  18. package/coverage/lcov-report/src/coordinator/connection/base64.ts.html +325 -0
  19. package/coverage/lcov-report/src/coordinator/connection/client.ts.html +2527 -0
  20. package/coverage/lcov-report/src/coordinator/connection/connection.ts.html +2335 -0
  21. package/coverage/lcov-report/src/coordinator/connection/connection_fallback.ts.html +802 -0
  22. package/coverage/lcov-report/src/coordinator/connection/errors.ts.html +295 -0
  23. package/coverage/lcov-report/src/coordinator/connection/index.html +251 -0
  24. package/coverage/lcov-report/src/coordinator/connection/insights.ts.html +349 -0
  25. package/coverage/lcov-report/src/coordinator/connection/signing.ts.html +397 -0
  26. package/coverage/lcov-report/src/coordinator/connection/token_manager.ts.html +565 -0
  27. package/coverage/lcov-report/src/coordinator/connection/types.ts.html +418 -0
  28. package/coverage/lcov-report/src/coordinator/connection/utils.ts.html +529 -0
  29. package/coverage/lcov-report/src/coordinator/index.html +116 -0
  30. package/coverage/lcov-report/src/events/call.ts.html +583 -0
  31. package/coverage/lcov-report/src/events/index.html +161 -0
  32. package/coverage/lcov-report/src/events/internal.ts.html +226 -0
  33. package/coverage/lcov-report/src/events/participant.ts.html +376 -0
  34. package/coverage/lcov-report/src/events/speaker.ts.html +271 -0
  35. package/coverage/lcov-report/src/gen/google/protobuf/index.html +131 -0
  36. package/coverage/lcov-report/src/gen/google/protobuf/struct.ts.html +1528 -0
  37. package/coverage/lcov-report/src/gen/google/protobuf/timestamp.ts.html +958 -0
  38. package/coverage/lcov-report/src/gen/video/sfu/event/events.ts.html +5971 -0
  39. package/coverage/lcov-report/src/gen/video/sfu/event/index.html +116 -0
  40. package/coverage/lcov-report/src/gen/video/sfu/models/index.html +116 -0
  41. package/coverage/lcov-report/src/gen/video/sfu/models/models.ts.html +3271 -0
  42. package/coverage/lcov-report/src/index.html +161 -0
  43. package/coverage/lcov-report/src/rpc/index.html +131 -0
  44. package/coverage/lcov-report/src/rpc/index.ts.html +91 -0
  45. package/coverage/lcov-report/src/rpc/latency.ts.html +214 -0
  46. package/coverage/lcov-report/src/rtc/Call.ts.html +1840 -0
  47. package/coverage/lcov-report/src/rtc/CallMetadata.ts.html +157 -0
  48. package/coverage/lcov-report/src/rtc/Dispatcher.ts.html +223 -0
  49. package/coverage/lcov-report/src/rtc/IceTrickleBuffer.ts.html +148 -0
  50. package/coverage/lcov-report/src/rtc/callEventHandlers.ts.html +196 -0
  51. package/coverage/lcov-report/src/rtc/codecs.ts.html +268 -0
  52. package/coverage/lcov-report/src/rtc/helpers/iceCandidate.ts.html +133 -0
  53. package/coverage/lcov-report/src/rtc/helpers/index.html +131 -0
  54. package/coverage/lcov-report/src/rtc/helpers/tracks.ts.html +139 -0
  55. package/coverage/lcov-report/src/rtc/index.html +251 -0
  56. package/coverage/lcov-report/src/rtc/publisher.ts.html +1000 -0
  57. package/coverage/lcov-report/src/rtc/signal.ts.html +187 -0
  58. package/coverage/lcov-report/src/rtc/subscriber.ts.html +340 -0
  59. package/coverage/lcov-report/src/rtc/videoLayers.ts.html +394 -0
  60. package/coverage/lcov-report/src/stats/index.html +116 -0
  61. package/coverage/lcov-report/src/stats/state-store-stats-reporter.ts.html +1177 -0
  62. package/coverage/lcov-report/src/store/index.html +146 -0
  63. package/coverage/lcov-report/src/store/index.ts.html +91 -0
  64. package/coverage/lcov-report/src/store/rxUtils.ts.html +211 -0
  65. package/coverage/lcov-report/src/store/stateStore.ts.html +1108 -0
  66. package/coverage/lcov.info +11463 -0
  67. package/coverage/tmp/coverage-2131-1675959950516-2.json +1 -0
  68. package/dist/index.d.ts +18 -0
  69. package/dist/index.js +8636 -0
  70. package/dist/index.js.map +1 -0
  71. package/dist/src/Batcher.d.ts +12 -0
  72. package/dist/src/CallDropScheduler.d.ts +44 -0
  73. package/dist/src/StreamSfuClient.d.ts +25 -0
  74. package/dist/src/StreamVideoClient.d.ts +145 -0
  75. package/dist/src/__tests__/StreamVideoClient.test.d.ts +1 -0
  76. package/dist/src/config/defaultConfigs.d.ts +2 -0
  77. package/dist/src/config/types.d.ts +29 -0
  78. package/dist/src/coordinator/StreamCoordinatorClient.d.ts +19 -0
  79. package/dist/src/coordinator/connection/base64.d.ts +2 -0
  80. package/dist/src/coordinator/connection/client.d.ts +174 -0
  81. package/dist/src/coordinator/connection/connection.d.ts +139 -0
  82. package/dist/src/coordinator/connection/connection_fallback.d.ts +38 -0
  83. package/dist/src/coordinator/connection/errors.d.ts +16 -0
  84. package/dist/src/coordinator/connection/events.d.ts +10 -0
  85. package/dist/src/coordinator/connection/insights.d.ts +58 -0
  86. package/dist/src/coordinator/connection/signing.d.ts +30 -0
  87. package/dist/src/coordinator/connection/token_manager.d.ts +39 -0
  88. package/dist/src/coordinator/connection/types.d.ts +87 -0
  89. package/dist/src/coordinator/connection/utils.d.ts +25 -0
  90. package/dist/src/devices.d.ts +79 -0
  91. package/dist/src/events/call.d.ts +26 -0
  92. package/dist/src/events/internal.d.ts +8 -0
  93. package/dist/src/events/participant.d.ts +21 -0
  94. package/dist/src/events/speaker.d.ts +10 -0
  95. package/dist/src/gen/coordinator/index.d.ts +1973 -0
  96. package/dist/src/gen/google/protobuf/descriptor.d.ts +1650 -0
  97. package/dist/src/gen/google/protobuf/duration.d.ts +113 -0
  98. package/dist/src/gen/google/protobuf/struct.d.ts +184 -0
  99. package/dist/src/gen/google/protobuf/timestamp.d.ts +158 -0
  100. package/dist/src/gen/video/coordinator/broadcast_v1/broadcast.d.ts +66 -0
  101. package/dist/src/gen/video/coordinator/call_v1/call.d.ts +254 -0
  102. package/dist/src/gen/video/coordinator/client_v1_rpc/client_rpc.client.d.ts +351 -0
  103. package/dist/src/gen/video/coordinator/client_v1_rpc/client_rpc.d.ts +1488 -0
  104. package/dist/src/gen/video/coordinator/client_v1_rpc/envelopes.d.ts +143 -0
  105. package/dist/src/gen/video/coordinator/client_v1_rpc/websocket.d.ts +292 -0
  106. package/dist/src/gen/video/coordinator/edge_v1/edge.d.ts +183 -0
  107. package/dist/src/gen/video/coordinator/event_v1/event.d.ts +411 -0
  108. package/dist/src/gen/video/coordinator/geofence_v1/geofence.d.ts +63 -0
  109. package/dist/src/gen/video/coordinator/member_v1/member.d.ts +59 -0
  110. package/dist/src/gen/video/coordinator/participant_v1/participant.d.ts +103 -0
  111. package/dist/src/gen/video/coordinator/push_v1/push.d.ts +240 -0
  112. package/dist/src/gen/video/coordinator/stat_v1/stat.d.ts +308 -0
  113. package/dist/src/gen/video/coordinator/user_v1/user.d.ts +112 -0
  114. package/dist/src/gen/video/coordinator/utils_v1/utils.d.ts +47 -0
  115. package/dist/src/gen/video/sfu/event/events.d.ts +736 -0
  116. package/dist/src/gen/video/sfu/models/models.d.ts +460 -0
  117. package/dist/src/gen/video/sfu/signal_rpc/signal.client.d.ts +89 -0
  118. package/dist/src/gen/video/sfu/signal_rpc/signal.d.ts +320 -0
  119. package/dist/src/helpers/browsers.d.ts +8 -0
  120. package/dist/src/helpers/sound-detector.d.ts +34 -0
  121. package/dist/src/rpc/createClient.d.ts +10 -0
  122. package/dist/src/rpc/index.d.ts +2 -0
  123. package/dist/src/rpc/latency.d.ts +9 -0
  124. package/dist/src/rtc/Call.d.ts +180 -0
  125. package/dist/src/rtc/CallMetadata.d.ts +9 -0
  126. package/dist/src/rtc/Dispatcher.d.ts +9 -0
  127. package/dist/src/rtc/IceTrickleBuffer.d.ts +11 -0
  128. package/dist/src/rtc/callEventHandlers.d.ts +5 -0
  129. package/dist/src/rtc/codecs.d.ts +2 -0
  130. package/dist/src/rtc/helpers/iceCandidate.d.ts +2 -0
  131. package/dist/src/rtc/helpers/tracks.d.ts +3 -0
  132. package/dist/src/rtc/publisher.d.ts +53 -0
  133. package/dist/src/rtc/signal.d.ts +5 -0
  134. package/dist/src/rtc/subscriber.d.ts +7 -0
  135. package/dist/src/rtc/types.d.ts +84 -0
  136. package/dist/src/rtc/videoLayers.d.ts +17 -0
  137. package/dist/src/stats/coordinator-stats-reporter.d.ts +10 -0
  138. package/dist/src/stats/state-store-stats-reporter.d.ts +57 -0
  139. package/dist/src/stats/types.d.ts +42 -0
  140. package/dist/src/store/index.d.ts +2 -0
  141. package/dist/src/store/rxUtils.d.ts +18 -0
  142. package/dist/src/store/stateStore.d.ts +182 -0
  143. package/generate-openapi.sh +32 -0
  144. package/index.ts +31 -0
  145. package/openapitools.json +7 -0
  146. package/package.json +54 -0
  147. package/rollup.config.mjs +48 -0
  148. package/src/Batcher.ts +43 -0
  149. package/src/CallDropScheduler.ts +192 -0
  150. package/src/StreamSfuClient.ts +185 -0
  151. package/src/StreamVideoClient.ts +503 -0
  152. package/src/__tests__/StreamVideoClient.test.ts +83 -0
  153. package/src/config/defaultConfigs.ts +15 -0
  154. package/src/config/types.ts +30 -0
  155. package/src/coordinator/StreamCoordinatorClient.ts +115 -0
  156. package/src/coordinator/connection/base64.ts +80 -0
  157. package/src/coordinator/connection/client.ts +814 -0
  158. package/src/coordinator/connection/connection.ts +750 -0
  159. package/src/coordinator/connection/connection_fallback.ts +239 -0
  160. package/src/coordinator/connection/errors.ts +70 -0
  161. package/src/coordinator/connection/events.ts +13 -0
  162. package/src/coordinator/connection/insights.ts +88 -0
  163. package/src/coordinator/connection/signing.ts +104 -0
  164. package/src/coordinator/connection/token_manager.ts +160 -0
  165. package/src/coordinator/connection/types.ts +111 -0
  166. package/src/coordinator/connection/utils.ts +148 -0
  167. package/src/devices.ts +266 -0
  168. package/src/events/call.ts +166 -0
  169. package/src/events/internal.ts +47 -0
  170. package/src/events/participant.ts +97 -0
  171. package/src/events/speaker.ts +62 -0
  172. package/src/gen/coordinator/index.ts +1956 -0
  173. package/src/gen/google/protobuf/descriptor.ts +3466 -0
  174. package/src/gen/google/protobuf/duration.ts +232 -0
  175. package/src/gen/google/protobuf/struct.ts +481 -0
  176. package/src/gen/google/protobuf/timestamp.ts +291 -0
  177. package/src/gen/video/coordinator/broadcast_v1/broadcast.ts +154 -0
  178. package/src/gen/video/coordinator/call_v1/call.ts +651 -0
  179. package/src/gen/video/coordinator/client_v1_rpc/client_rpc.client.ts +463 -0
  180. package/src/gen/video/coordinator/client_v1_rpc/client_rpc.ts +3819 -0
  181. package/src/gen/video/coordinator/client_v1_rpc/envelopes.ts +424 -0
  182. package/src/gen/video/coordinator/client_v1_rpc/websocket.ts +719 -0
  183. package/src/gen/video/coordinator/edge_v1/edge.ts +532 -0
  184. package/src/gen/video/coordinator/event_v1/event.ts +1171 -0
  185. package/src/gen/video/coordinator/geofence_v1/geofence.ts +128 -0
  186. package/src/gen/video/coordinator/member_v1/member.ts +138 -0
  187. package/src/gen/video/coordinator/participant_v1/participant.ts +261 -0
  188. package/src/gen/video/coordinator/push_v1/push.ts +651 -0
  189. package/src/gen/video/coordinator/stat_v1/stat.ts +656 -0
  190. package/src/gen/video/coordinator/user_v1/user.ts +277 -0
  191. package/src/gen/video/coordinator/utils_v1/utils.ts +98 -0
  192. package/src/gen/video/sfu/event/events.ts +1962 -0
  193. package/src/gen/video/sfu/models/models.ts +1062 -0
  194. package/src/gen/video/sfu/signal_rpc/signal.client.ts +108 -0
  195. package/src/gen/video/sfu/signal_rpc/signal.ts +906 -0
  196. package/src/helpers/browsers.ts +13 -0
  197. package/src/helpers/sound-detector.ts +85 -0
  198. package/src/rpc/createClient.ts +50 -0
  199. package/src/rpc/index.ts +2 -0
  200. package/src/rpc/latency.ts +43 -0
  201. package/src/rtc/Call.ts +585 -0
  202. package/src/rtc/CallMetadata.ts +24 -0
  203. package/src/rtc/Dispatcher.ts +46 -0
  204. package/src/rtc/IceTrickleBuffer.ts +21 -0
  205. package/src/rtc/callEventHandlers.ts +37 -0
  206. package/src/rtc/codecs.ts +61 -0
  207. package/src/rtc/helpers/iceCandidate.ts +16 -0
  208. package/src/rtc/helpers/tracks.ts +18 -0
  209. package/src/rtc/publisher.ts +305 -0
  210. package/src/rtc/signal.ts +34 -0
  211. package/src/rtc/subscriber.ts +85 -0
  212. package/src/rtc/types.ts +105 -0
  213. package/src/rtc/videoLayers.ts +103 -0
  214. package/src/stats/coordinator-stats-reporter.ts +167 -0
  215. package/src/stats/state-store-stats-reporter.ts +364 -0
  216. package/src/stats/types.ts +46 -0
  217. package/src/store/index.ts +2 -0
  218. package/src/store/rxUtils.ts +42 -0
  219. package/src/store/stateStore.ts +341 -0
  220. package/tsconfig.json +25 -0
  221. package/typedoc.json +11 -0
  222. package/vite.config.ts +11 -0
@@ -0,0 +1,143 @@
1
+ import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
2
+ import type { IBinaryWriter } from "@protobuf-ts/runtime";
3
+ import type { BinaryReadOptions } from "@protobuf-ts/runtime";
4
+ import type { IBinaryReader } from "@protobuf-ts/runtime";
5
+ import type { PartialMessage } from "@protobuf-ts/runtime";
6
+ import { MessageType } from "@protobuf-ts/runtime";
7
+ import { Member } from "../member_v1/member";
8
+ import { CallDetails } from "../call_v1/call";
9
+ import { Call } from "../call_v1/call";
10
+ import { User } from "../user_v1/user";
11
+ /**
12
+ * CallEnvelope contains Call and all related information to it
13
+ * Only used in reponse types that return a single call
14
+ *
15
+ * @generated from protobuf message stream.video.coordinator.client_v1_rpc.CallEnvelope
16
+ */
17
+ export interface CallEnvelope {
18
+ /**
19
+ * All users referenced in the response
20
+ *
21
+ * @generated from protobuf field: map<string, stream.video.coordinator.user_v1.User> users = 1;
22
+ */
23
+ users: {
24
+ [key: string]: User;
25
+ };
26
+ /**
27
+ * Call object
28
+ *
29
+ * @generated from protobuf field: stream.video.coordinator.call_v1.Call call = 2;
30
+ */
31
+ call?: Call;
32
+ /**
33
+ * Call details
34
+ *
35
+ * @generated from protobuf field: stream.video.coordinator.call_v1.CallDetails details = 3;
36
+ */
37
+ details?: CallDetails;
38
+ }
39
+ /**
40
+ * CallsEnvelope contains list of calls and all related information to them
41
+ * Only used in response types that return list of calls
42
+ *
43
+ * @generated from protobuf message stream.video.coordinator.client_v1_rpc.CallsEnvelope
44
+ */
45
+ export interface CallsEnvelope {
46
+ /**
47
+ * All users referenced in the response
48
+ *
49
+ * @generated from protobuf field: map<string, stream.video.coordinator.user_v1.User> users = 1;
50
+ */
51
+ users: {
52
+ [key: string]: User;
53
+ };
54
+ /**
55
+ * Ordered list of Call.call_cid
56
+ *
57
+ * @generated from protobuf field: repeated string call_cids = 2;
58
+ */
59
+ callCids: string[];
60
+ /**
61
+ * Call objects, indexed by Call.call_cid
62
+ *
63
+ * @generated from protobuf field: map<string, stream.video.coordinator.call_v1.Call> calls = 3;
64
+ */
65
+ calls: {
66
+ [key: string]: Call;
67
+ };
68
+ /**
69
+ * Call details, indexed by Call.call_cid
70
+ *
71
+ * @generated from protobuf field: map<string, stream.video.coordinator.call_v1.CallDetails> details = 4;
72
+ */
73
+ details: {
74
+ [key: string]: CallDetails;
75
+ };
76
+ }
77
+ /**
78
+ * CallsEnvelope contains list of members and all related information to them
79
+ * Only used in response types that return list of members
80
+ *
81
+ * @generated from protobuf message stream.video.coordinator.client_v1_rpc.MembersEnvelope
82
+ */
83
+ export interface MembersEnvelope {
84
+ /**
85
+ * All users referenced in the response
86
+ *
87
+ * @generated from protobuf field: map<string, stream.video.coordinator.user_v1.User> users = 1;
88
+ */
89
+ users: {
90
+ [key: string]: User;
91
+ };
92
+ /**
93
+ * Ordered list of Member.user_id
94
+ *
95
+ * @generated from protobuf field: repeated string member_user_ids = 2;
96
+ */
97
+ memberUserIds: string[];
98
+ /**
99
+ * Map of members indexed by Member.user_id
100
+ *
101
+ * @generated from protobuf field: map<string, stream.video.coordinator.member_v1.Member> members = 3;
102
+ */
103
+ members: {
104
+ [key: string]: Member;
105
+ };
106
+ }
107
+ declare class CallEnvelope$Type extends MessageType<CallEnvelope> {
108
+ constructor();
109
+ create(value?: PartialMessage<CallEnvelope>): CallEnvelope;
110
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CallEnvelope): CallEnvelope;
111
+ private binaryReadMap1;
112
+ internalBinaryWrite(message: CallEnvelope, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
113
+ }
114
+ /**
115
+ * @generated MessageType for protobuf message stream.video.coordinator.client_v1_rpc.CallEnvelope
116
+ */
117
+ export declare const CallEnvelope: CallEnvelope$Type;
118
+ declare class CallsEnvelope$Type extends MessageType<CallsEnvelope> {
119
+ constructor();
120
+ create(value?: PartialMessage<CallsEnvelope>): CallsEnvelope;
121
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CallsEnvelope): CallsEnvelope;
122
+ private binaryReadMap1;
123
+ private binaryReadMap3;
124
+ private binaryReadMap4;
125
+ internalBinaryWrite(message: CallsEnvelope, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
126
+ }
127
+ /**
128
+ * @generated MessageType for protobuf message stream.video.coordinator.client_v1_rpc.CallsEnvelope
129
+ */
130
+ export declare const CallsEnvelope: CallsEnvelope$Type;
131
+ declare class MembersEnvelope$Type extends MessageType<MembersEnvelope> {
132
+ constructor();
133
+ create(value?: PartialMessage<MembersEnvelope>): MembersEnvelope;
134
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MembersEnvelope): MembersEnvelope;
135
+ private binaryReadMap1;
136
+ private binaryReadMap3;
137
+ internalBinaryWrite(message: MembersEnvelope, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
138
+ }
139
+ /**
140
+ * @generated MessageType for protobuf message stream.video.coordinator.client_v1_rpc.MembersEnvelope
141
+ */
142
+ export declare const MembersEnvelope: MembersEnvelope$Type;
143
+ export {};
@@ -0,0 +1,292 @@
1
+ import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
2
+ import type { IBinaryWriter } from "@protobuf-ts/runtime";
3
+ import type { BinaryReadOptions } from "@protobuf-ts/runtime";
4
+ import type { IBinaryReader } from "@protobuf-ts/runtime";
5
+ import type { PartialMessage } from "@protobuf-ts/runtime";
6
+ import { MessageType } from "@protobuf-ts/runtime";
7
+ import { DeviceInput } from "../push_v1/push";
8
+ import { UserInput } from "../user_v1/user";
9
+ import { CallCustom } from "../event_v1/event";
10
+ import { UserUpdated } from "../event_v1/event";
11
+ import { CallCancelled } from "../event_v1/event";
12
+ import { CallRejected } from "../event_v1/event";
13
+ import { CallAccepted } from "../event_v1/event";
14
+ import { CallEnded } from "../event_v1/event";
15
+ import { CallMembersDeleted } from "../event_v1/event";
16
+ import { CallMembersUpdated } from "../event_v1/event";
17
+ import { CallMembersCreated } from "../event_v1/event";
18
+ import { CallDeleted } from "../event_v1/event";
19
+ import { CallUpdated } from "../event_v1/event";
20
+ import { CallCreated } from "../event_v1/event";
21
+ import { User } from "../user_v1/user";
22
+ /**
23
+ * WebsocketEvent only includes events that are sent to the client via websocket connection
24
+ * This is not an exhaustive list of events, since not all of them are sent via websocket
25
+ *
26
+ * @generated from protobuf message stream.video.coordinator.client_v1_rpc.WebsocketEvent
27
+ */
28
+ export interface WebsocketEvent {
29
+ /**
30
+ * All users mentioned in the event payload, indexed by User.id
31
+ *
32
+ * @generated from protobuf field: map<string, stream.video.coordinator.user_v1.User> users = 1;
33
+ */
34
+ users: {
35
+ [key: string]: User;
36
+ };
37
+ /**
38
+ * @generated from protobuf oneof: event
39
+ */
40
+ event: {
41
+ oneofKind: "error";
42
+ /**
43
+ * @generated from protobuf field: stream.video.coordinator.client_v1_rpc.WebsocketError error = 19;
44
+ */
45
+ error: WebsocketError;
46
+ } | {
47
+ oneofKind: "healthcheck";
48
+ /**
49
+ * @generated from protobuf field: stream.video.coordinator.client_v1_rpc.WebsocketHealthcheck healthcheck = 20;
50
+ */
51
+ healthcheck: WebsocketHealthcheck;
52
+ } | {
53
+ oneofKind: "callCreated";
54
+ /**
55
+ * Call events
56
+ *
57
+ * @generated from protobuf field: stream.video.coordinator.event_v1.CallCreated call_created = 30;
58
+ */
59
+ callCreated: CallCreated;
60
+ } | {
61
+ oneofKind: "callUpdated";
62
+ /**
63
+ * @generated from protobuf field: stream.video.coordinator.event_v1.CallUpdated call_updated = 31;
64
+ */
65
+ callUpdated: CallUpdated;
66
+ } | {
67
+ oneofKind: "callDeleted";
68
+ /**
69
+ * @generated from protobuf field: stream.video.coordinator.event_v1.CallDeleted call_deleted = 32;
70
+ */
71
+ callDeleted: CallDeleted;
72
+ } | {
73
+ oneofKind: "callMembersCreated";
74
+ /**
75
+ * @generated from protobuf field: stream.video.coordinator.event_v1.CallMembersCreated call_members_created = 33;
76
+ */
77
+ callMembersCreated: CallMembersCreated;
78
+ } | {
79
+ oneofKind: "callMembersUpdated";
80
+ /**
81
+ * @generated from protobuf field: stream.video.coordinator.event_v1.CallMembersUpdated call_members_updated = 34;
82
+ */
83
+ callMembersUpdated: CallMembersUpdated;
84
+ } | {
85
+ oneofKind: "callMembersDeleted";
86
+ /**
87
+ * @generated from protobuf field: stream.video.coordinator.event_v1.CallMembersDeleted call_members_deleted = 35;
88
+ */
89
+ callMembersDeleted: CallMembersDeleted;
90
+ } | {
91
+ oneofKind: "callEnded";
92
+ /**
93
+ * @generated from protobuf field: stream.video.coordinator.event_v1.CallEnded call_ended = 36;
94
+ */
95
+ callEnded: CallEnded;
96
+ } | {
97
+ oneofKind: "callAccepted";
98
+ /**
99
+ * User initiated call events
100
+ *
101
+ * @generated from protobuf field: stream.video.coordinator.event_v1.CallAccepted call_accepted = 40;
102
+ */
103
+ callAccepted: CallAccepted;
104
+ } | {
105
+ oneofKind: "callRejected";
106
+ /**
107
+ * @generated from protobuf field: stream.video.coordinator.event_v1.CallRejected call_rejected = 41;
108
+ */
109
+ callRejected: CallRejected;
110
+ } | {
111
+ oneofKind: "callCancelled";
112
+ /**
113
+ * @generated from protobuf field: stream.video.coordinator.event_v1.CallCancelled call_cancelled = 42;
114
+ */
115
+ callCancelled: CallCancelled;
116
+ } | {
117
+ oneofKind: "userUpdated";
118
+ /**
119
+ * User events
120
+ *
121
+ * @generated from protobuf field: stream.video.coordinator.event_v1.UserUpdated user_updated = 50;
122
+ */
123
+ userUpdated: UserUpdated;
124
+ } | {
125
+ oneofKind: "callCustom";
126
+ /**
127
+ * Custom event
128
+ *
129
+ * @generated from protobuf field: stream.video.coordinator.event_v1.CallCustom call_custom = 99;
130
+ */
131
+ callCustom: CallCustom;
132
+ } | {
133
+ oneofKind: undefined;
134
+ };
135
+ }
136
+ /**
137
+ * WebsocketClientEvent contains all events that client is allowed to send to the server
138
+ * When clients sends any of mentioned events, they should be wrapped into ClientEvent
139
+ *
140
+ * @generated from protobuf message stream.video.coordinator.client_v1_rpc.WebsocketClientEvent
141
+ */
142
+ export interface WebsocketClientEvent {
143
+ /**
144
+ * @generated from protobuf oneof: event
145
+ */
146
+ event: {
147
+ oneofKind: "healthcheck";
148
+ /**
149
+ * @generated from protobuf field: stream.video.coordinator.client_v1_rpc.WebsocketHealthcheck healthcheck = 1;
150
+ */
151
+ healthcheck: WebsocketHealthcheck;
152
+ } | {
153
+ oneofKind: "authRequest";
154
+ /**
155
+ * @generated from protobuf field: stream.video.coordinator.client_v1_rpc.WebsocketAuthRequest auth_request = 2;
156
+ */
157
+ authRequest: WebsocketAuthRequest;
158
+ } | {
159
+ oneofKind: undefined;
160
+ };
161
+ }
162
+ /**
163
+ * A payload that is sent through websocket to authenticate a connection
164
+ *
165
+ * @generated from protobuf message stream.video.coordinator.client_v1_rpc.WebsocketAuthRequest
166
+ */
167
+ export interface WebsocketAuthRequest {
168
+ /**
169
+ * Application API key that matches a secret is used to sign a token
170
+ *
171
+ * @generated from protobuf field: string api_key = 1;
172
+ */
173
+ apiKey: string;
174
+ /**
175
+ * A client JWT token
176
+ *
177
+ * @generated from protobuf field: string token = 2;
178
+ */
179
+ token: string;
180
+ /**
181
+ * Optional UserInput. When present, it is used to create or update user information.
182
+ * If contains some changes, a permission check will be performed
183
+ *
184
+ * @generated from protobuf field: stream.video.coordinator.user_v1.UserInput user = 3;
185
+ */
186
+ user?: UserInput;
187
+ /**
188
+ * Optional DeviceInput. When present, a device will be created for a user. If device
189
+ * already exists, nothing will happen
190
+ *
191
+ * @generated from protobuf field: stream.video.coordinator.push_v1.DeviceInput device = 4;
192
+ */
193
+ device?: DeviceInput;
194
+ }
195
+ /**
196
+ * Healthcheck is sent back and forth between websocket client and server
197
+ * When server sends a healthcheck, it is wrapped into WebsocketEvent
198
+ * When client sends healthcheck, it should be wrapped into WebsocketClientEvent
199
+ *
200
+ * @generated from protobuf message stream.video.coordinator.client_v1_rpc.WebsocketHealthcheck
201
+ */
202
+ export interface WebsocketHealthcheck {
203
+ /**
204
+ * @generated from protobuf field: string user_id = 1;
205
+ */
206
+ userId: string;
207
+ /**
208
+ * @generated from protobuf field: string client_id = 2;
209
+ */
210
+ clientId: string;
211
+ /**
212
+ * @generated from protobuf field: string call_type = 3;
213
+ */
214
+ callType: string;
215
+ /**
216
+ * @generated from protobuf field: string call_id = 4;
217
+ */
218
+ callId: string;
219
+ /**
220
+ * @generated from protobuf field: bool video = 5;
221
+ */
222
+ video: boolean;
223
+ /**
224
+ * @generated from protobuf field: bool audio = 6;
225
+ */
226
+ audio: boolean;
227
+ }
228
+ /**
229
+ * @generated from protobuf message stream.video.coordinator.client_v1_rpc.WebsocketError
230
+ */
231
+ export interface WebsocketError {
232
+ /**
233
+ * @generated from protobuf field: int32 code = 1;
234
+ */
235
+ code: number;
236
+ /**
237
+ * @generated from protobuf field: string message = 2;
238
+ */
239
+ message: string;
240
+ }
241
+ declare class WebsocketEvent$Type extends MessageType<WebsocketEvent> {
242
+ constructor();
243
+ create(value?: PartialMessage<WebsocketEvent>): WebsocketEvent;
244
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: WebsocketEvent): WebsocketEvent;
245
+ private binaryReadMap1;
246
+ internalBinaryWrite(message: WebsocketEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
247
+ }
248
+ /**
249
+ * @generated MessageType for protobuf message stream.video.coordinator.client_v1_rpc.WebsocketEvent
250
+ */
251
+ export declare const WebsocketEvent: WebsocketEvent$Type;
252
+ declare class WebsocketClientEvent$Type extends MessageType<WebsocketClientEvent> {
253
+ constructor();
254
+ create(value?: PartialMessage<WebsocketClientEvent>): WebsocketClientEvent;
255
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: WebsocketClientEvent): WebsocketClientEvent;
256
+ internalBinaryWrite(message: WebsocketClientEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
257
+ }
258
+ /**
259
+ * @generated MessageType for protobuf message stream.video.coordinator.client_v1_rpc.WebsocketClientEvent
260
+ */
261
+ export declare const WebsocketClientEvent: WebsocketClientEvent$Type;
262
+ declare class WebsocketAuthRequest$Type extends MessageType<WebsocketAuthRequest> {
263
+ constructor();
264
+ create(value?: PartialMessage<WebsocketAuthRequest>): WebsocketAuthRequest;
265
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: WebsocketAuthRequest): WebsocketAuthRequest;
266
+ internalBinaryWrite(message: WebsocketAuthRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
267
+ }
268
+ /**
269
+ * @generated MessageType for protobuf message stream.video.coordinator.client_v1_rpc.WebsocketAuthRequest
270
+ */
271
+ export declare const WebsocketAuthRequest: WebsocketAuthRequest$Type;
272
+ declare class WebsocketHealthcheck$Type extends MessageType<WebsocketHealthcheck> {
273
+ constructor();
274
+ create(value?: PartialMessage<WebsocketHealthcheck>): WebsocketHealthcheck;
275
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: WebsocketHealthcheck): WebsocketHealthcheck;
276
+ internalBinaryWrite(message: WebsocketHealthcheck, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
277
+ }
278
+ /**
279
+ * @generated MessageType for protobuf message stream.video.coordinator.client_v1_rpc.WebsocketHealthcheck
280
+ */
281
+ export declare const WebsocketHealthcheck: WebsocketHealthcheck$Type;
282
+ declare class WebsocketError$Type extends MessageType<WebsocketError> {
283
+ constructor();
284
+ create(value?: PartialMessage<WebsocketError>): WebsocketError;
285
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: WebsocketError): WebsocketError;
286
+ internalBinaryWrite(message: WebsocketError, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
287
+ }
288
+ /**
289
+ * @generated MessageType for protobuf message stream.video.coordinator.client_v1_rpc.WebsocketError
290
+ */
291
+ export declare const WebsocketError: WebsocketError$Type;
292
+ export {};
@@ -0,0 +1,183 @@
1
+ import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
2
+ import type { IBinaryWriter } from "@protobuf-ts/runtime";
3
+ import type { BinaryReadOptions } from "@protobuf-ts/runtime";
4
+ import type { IBinaryReader } from "@protobuf-ts/runtime";
5
+ import type { PartialMessage } from "@protobuf-ts/runtime";
6
+ import { MessageType } from "@protobuf-ts/runtime";
7
+ /**
8
+ * @generated from protobuf message stream.video.coordinator.edge_v1.Credentials
9
+ */
10
+ export interface Credentials {
11
+ /**
12
+ * Edge server to connect to
13
+ *
14
+ * @generated from protobuf field: stream.video.coordinator.edge_v1.EdgeServer server = 1;
15
+ */
16
+ server?: EdgeServer;
17
+ /**
18
+ * The auth token needed to authenticate to the edge server
19
+ *
20
+ * @generated from protobuf field: string token = 2;
21
+ */
22
+ token: string;
23
+ /**
24
+ * The list of ICE servers
25
+ *
26
+ * @generated from protobuf field: repeated stream.video.coordinator.edge_v1.ICEServer ice_servers = 3;
27
+ */
28
+ iceServers: ICEServer[];
29
+ }
30
+ /**
31
+ * @generated from protobuf message stream.video.coordinator.edge_v1.LatencyMeasurements
32
+ */
33
+ export interface LatencyMeasurements {
34
+ /**
35
+ * @generated from protobuf field: map<string, stream.video.coordinator.edge_v1.Latency> measurements = 1;
36
+ */
37
+ measurements: {
38
+ [key: string]: Latency;
39
+ };
40
+ }
41
+ /**
42
+ * @generated from protobuf message stream.video.coordinator.edge_v1.Latency
43
+ */
44
+ export interface Latency {
45
+ /**
46
+ * @generated from protobuf field: repeated double measurements_seconds = 1;
47
+ */
48
+ measurementsSeconds: number[];
49
+ }
50
+ /**
51
+ * @generated from protobuf message stream.video.coordinator.edge_v1.Coordinates
52
+ */
53
+ export interface Coordinates {
54
+ /**
55
+ * @generated from protobuf field: float lat = 1;
56
+ */
57
+ lat: number;
58
+ /**
59
+ * @generated from protobuf field: float long = 2;
60
+ */
61
+ long: number;
62
+ }
63
+ /**
64
+ * Edges are where we deploy video servers
65
+ *
66
+ * @generated from protobuf message stream.video.coordinator.edge_v1.Edge
67
+ */
68
+ export interface Edge {
69
+ /**
70
+ * @generated from protobuf field: string name = 1;
71
+ */
72
+ name: string;
73
+ /**
74
+ * @generated from protobuf field: string latency_url = 2;
75
+ */
76
+ latencyUrl: string;
77
+ /**
78
+ * @generated from protobuf field: stream.video.coordinator.edge_v1.Coordinates coordinates = 3;
79
+ */
80
+ coordinates?: Coordinates;
81
+ }
82
+ /**
83
+ * @generated from protobuf message stream.video.coordinator.edge_v1.ICEServer
84
+ */
85
+ export interface ICEServer {
86
+ /**
87
+ * @generated from protobuf field: repeated string urls = 1;
88
+ */
89
+ urls: string[];
90
+ /**
91
+ * @generated from protobuf field: string username = 2;
92
+ */
93
+ username: string;
94
+ /**
95
+ * @generated from protobuf field: string password = 3;
96
+ */
97
+ password: string;
98
+ }
99
+ /**
100
+ * @generated from protobuf message stream.video.coordinator.edge_v1.EdgeServer
101
+ */
102
+ export interface EdgeServer {
103
+ /**
104
+ * @generated from protobuf field: string url = 1;
105
+ */
106
+ url: string;
107
+ /**
108
+ * @generated from protobuf field: string edge_name = 2;
109
+ */
110
+ edgeName: string;
111
+ }
112
+ declare class Credentials$Type extends MessageType<Credentials> {
113
+ constructor();
114
+ create(value?: PartialMessage<Credentials>): Credentials;
115
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Credentials): Credentials;
116
+ internalBinaryWrite(message: Credentials, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
117
+ }
118
+ /**
119
+ * @generated MessageType for protobuf message stream.video.coordinator.edge_v1.Credentials
120
+ */
121
+ export declare const Credentials: Credentials$Type;
122
+ declare class LatencyMeasurements$Type extends MessageType<LatencyMeasurements> {
123
+ constructor();
124
+ create(value?: PartialMessage<LatencyMeasurements>): LatencyMeasurements;
125
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: LatencyMeasurements): LatencyMeasurements;
126
+ private binaryReadMap1;
127
+ internalBinaryWrite(message: LatencyMeasurements, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
128
+ }
129
+ /**
130
+ * @generated MessageType for protobuf message stream.video.coordinator.edge_v1.LatencyMeasurements
131
+ */
132
+ export declare const LatencyMeasurements: LatencyMeasurements$Type;
133
+ declare class Latency$Type extends MessageType<Latency> {
134
+ constructor();
135
+ create(value?: PartialMessage<Latency>): Latency;
136
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Latency): Latency;
137
+ internalBinaryWrite(message: Latency, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
138
+ }
139
+ /**
140
+ * @generated MessageType for protobuf message stream.video.coordinator.edge_v1.Latency
141
+ */
142
+ export declare const Latency: Latency$Type;
143
+ declare class Coordinates$Type extends MessageType<Coordinates> {
144
+ constructor();
145
+ create(value?: PartialMessage<Coordinates>): Coordinates;
146
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Coordinates): Coordinates;
147
+ internalBinaryWrite(message: Coordinates, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
148
+ }
149
+ /**
150
+ * @generated MessageType for protobuf message stream.video.coordinator.edge_v1.Coordinates
151
+ */
152
+ export declare const Coordinates: Coordinates$Type;
153
+ declare class Edge$Type extends MessageType<Edge> {
154
+ constructor();
155
+ create(value?: PartialMessage<Edge>): Edge;
156
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Edge): Edge;
157
+ internalBinaryWrite(message: Edge, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
158
+ }
159
+ /**
160
+ * @generated MessageType for protobuf message stream.video.coordinator.edge_v1.Edge
161
+ */
162
+ export declare const Edge: Edge$Type;
163
+ declare class ICEServer$Type extends MessageType<ICEServer> {
164
+ constructor();
165
+ create(value?: PartialMessage<ICEServer>): ICEServer;
166
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ICEServer): ICEServer;
167
+ internalBinaryWrite(message: ICEServer, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
168
+ }
169
+ /**
170
+ * @generated MessageType for protobuf message stream.video.coordinator.edge_v1.ICEServer
171
+ */
172
+ export declare const ICEServer: ICEServer$Type;
173
+ declare class EdgeServer$Type extends MessageType<EdgeServer> {
174
+ constructor();
175
+ create(value?: PartialMessage<EdgeServer>): EdgeServer;
176
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EdgeServer): EdgeServer;
177
+ internalBinaryWrite(message: EdgeServer, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
178
+ }
179
+ /**
180
+ * @generated MessageType for protobuf message stream.video.coordinator.edge_v1.EdgeServer
181
+ */
182
+ export declare const EdgeServer: EdgeServer$Type;
183
+ export {};