@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,277 @@
1
+ /* eslint-disable */
2
+ // @generated by protobuf-ts 2.8.1 with parameter long_type_string,client_generic,server_none,eslint_disable
3
+ // @generated from protobuf file "video/coordinator/user_v1/user.proto" (package "stream.video.coordinator.user_v1", syntax proto3)
4
+ // tslint:disable
5
+ import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
6
+ import type { IBinaryWriter } from "@protobuf-ts/runtime";
7
+ import { WireType } from "@protobuf-ts/runtime";
8
+ import type { BinaryReadOptions } from "@protobuf-ts/runtime";
9
+ import type { IBinaryReader } from "@protobuf-ts/runtime";
10
+ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
11
+ import type { PartialMessage } from "@protobuf-ts/runtime";
12
+ import { reflectionMergePartial } from "@protobuf-ts/runtime";
13
+ import { MESSAGE_TYPE } from "@protobuf-ts/runtime";
14
+ import { MessageType } from "@protobuf-ts/runtime";
15
+ import { Timestamp } from "../../../google/protobuf/timestamp";
16
+ /**
17
+ * @generated from protobuf message stream.video.coordinator.user_v1.User
18
+ */
19
+ export interface User {
20
+ /**
21
+ * @generated from protobuf field: string id = 1;
22
+ */
23
+ id: string;
24
+ /**
25
+ * @generated from protobuf field: repeated string teams = 2;
26
+ */
27
+ teams: string[];
28
+ /**
29
+ * @generated from protobuf field: string role = 3;
30
+ */
31
+ role: string;
32
+ /**
33
+ * @generated from protobuf field: bytes custom_json = 4;
34
+ */
35
+ customJson: Uint8Array;
36
+ /**
37
+ * @generated from protobuf field: string name = 5;
38
+ */
39
+ name: string;
40
+ /**
41
+ * @generated from protobuf field: string image_url = 6;
42
+ */
43
+ imageUrl: string;
44
+ /**
45
+ * User creation date
46
+ *
47
+ * @generated from protobuf field: google.protobuf.Timestamp created_at = 7;
48
+ */
49
+ createdAt?: Timestamp;
50
+ /**
51
+ * User last update date.
52
+ *
53
+ * @generated from protobuf field: google.protobuf.Timestamp updated_at = 8;
54
+ */
55
+ updatedAt?: Timestamp;
56
+ }
57
+ /**
58
+ * A message that is used in User requests to create and modify user data
59
+ *
60
+ * @generated from protobuf message stream.video.coordinator.user_v1.UserInput
61
+ */
62
+ export interface UserInput {
63
+ /**
64
+ * A unique ID for the user
65
+ *
66
+ * @generated from protobuf field: string id = 1;
67
+ */
68
+ id: string;
69
+ /**
70
+ * A human-readable name of the user
71
+ *
72
+ * @generated from protobuf field: string name = 2;
73
+ */
74
+ name: string;
75
+ /**
76
+ * User role, as defined by permission settings
77
+ *
78
+ * @generated from protobuf field: string role = 3;
79
+ */
80
+ role: string;
81
+ /**
82
+ * List of user teams for multi-tenant applications
83
+ *
84
+ * @generated from protobuf field: repeated string teams = 4;
85
+ */
86
+ teams: string[];
87
+ /**
88
+ * A URL that points to a user image
89
+ *
90
+ * @generated from protobuf field: string image_url = 5;
91
+ */
92
+ imageUrl: string;
93
+ /**
94
+ * A JSON object with custom user information
95
+ *
96
+ * @generated from protobuf field: bytes custom_json = 6;
97
+ */
98
+ customJson: Uint8Array;
99
+ }
100
+ // @generated message type with reflection information, may provide speed optimized methods
101
+ class User$Type extends MessageType<User> {
102
+ constructor() {
103
+ super("stream.video.coordinator.user_v1.User", [
104
+ { no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
105
+ { no: 2, name: "teams", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
106
+ { no: 3, name: "role", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
107
+ { no: 4, name: "custom_json", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
108
+ { no: 5, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
109
+ { no: 6, name: "image_url", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
110
+ { no: 7, name: "created_at", kind: "message", T: () => Timestamp },
111
+ { no: 8, name: "updated_at", kind: "message", T: () => Timestamp }
112
+ ]);
113
+ }
114
+ create(value?: PartialMessage<User>): User {
115
+ const message = { id: "", teams: [], role: "", customJson: new Uint8Array(0), name: "", imageUrl: "" };
116
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
117
+ if (value !== undefined)
118
+ reflectionMergePartial<User>(this, message, value);
119
+ return message;
120
+ }
121
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: User): User {
122
+ let message = target ?? this.create(), end = reader.pos + length;
123
+ while (reader.pos < end) {
124
+ let [fieldNo, wireType] = reader.tag();
125
+ switch (fieldNo) {
126
+ case /* string id */ 1:
127
+ message.id = reader.string();
128
+ break;
129
+ case /* repeated string teams */ 2:
130
+ message.teams.push(reader.string());
131
+ break;
132
+ case /* string role */ 3:
133
+ message.role = reader.string();
134
+ break;
135
+ case /* bytes custom_json */ 4:
136
+ message.customJson = reader.bytes();
137
+ break;
138
+ case /* string name */ 5:
139
+ message.name = reader.string();
140
+ break;
141
+ case /* string image_url */ 6:
142
+ message.imageUrl = reader.string();
143
+ break;
144
+ case /* google.protobuf.Timestamp created_at */ 7:
145
+ message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
146
+ break;
147
+ case /* google.protobuf.Timestamp updated_at */ 8:
148
+ message.updatedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.updatedAt);
149
+ break;
150
+ default:
151
+ let u = options.readUnknownField;
152
+ if (u === "throw")
153
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
154
+ let d = reader.skip(wireType);
155
+ if (u !== false)
156
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
157
+ }
158
+ }
159
+ return message;
160
+ }
161
+ internalBinaryWrite(message: User, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
162
+ /* string id = 1; */
163
+ if (message.id !== "")
164
+ writer.tag(1, WireType.LengthDelimited).string(message.id);
165
+ /* repeated string teams = 2; */
166
+ for (let i = 0; i < message.teams.length; i++)
167
+ writer.tag(2, WireType.LengthDelimited).string(message.teams[i]);
168
+ /* string role = 3; */
169
+ if (message.role !== "")
170
+ writer.tag(3, WireType.LengthDelimited).string(message.role);
171
+ /* bytes custom_json = 4; */
172
+ if (message.customJson.length)
173
+ writer.tag(4, WireType.LengthDelimited).bytes(message.customJson);
174
+ /* string name = 5; */
175
+ if (message.name !== "")
176
+ writer.tag(5, WireType.LengthDelimited).string(message.name);
177
+ /* string image_url = 6; */
178
+ if (message.imageUrl !== "")
179
+ writer.tag(6, WireType.LengthDelimited).string(message.imageUrl);
180
+ /* google.protobuf.Timestamp created_at = 7; */
181
+ if (message.createdAt)
182
+ Timestamp.internalBinaryWrite(message.createdAt, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
183
+ /* google.protobuf.Timestamp updated_at = 8; */
184
+ if (message.updatedAt)
185
+ Timestamp.internalBinaryWrite(message.updatedAt, writer.tag(8, WireType.LengthDelimited).fork(), options).join();
186
+ let u = options.writeUnknownFields;
187
+ if (u !== false)
188
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
189
+ return writer;
190
+ }
191
+ }
192
+ /**
193
+ * @generated MessageType for protobuf message stream.video.coordinator.user_v1.User
194
+ */
195
+ export const User = new User$Type();
196
+ // @generated message type with reflection information, may provide speed optimized methods
197
+ class UserInput$Type extends MessageType<UserInput> {
198
+ constructor() {
199
+ super("stream.video.coordinator.user_v1.UserInput", [
200
+ { no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
201
+ { no: 2, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
202
+ { no: 3, name: "role", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
203
+ { no: 4, name: "teams", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
204
+ { no: 5, name: "image_url", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
205
+ { no: 6, name: "custom_json", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }
206
+ ]);
207
+ }
208
+ create(value?: PartialMessage<UserInput>): UserInput {
209
+ const message = { id: "", name: "", role: "", teams: [], imageUrl: "", customJson: new Uint8Array(0) };
210
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
211
+ if (value !== undefined)
212
+ reflectionMergePartial<UserInput>(this, message, value);
213
+ return message;
214
+ }
215
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UserInput): UserInput {
216
+ let message = target ?? this.create(), end = reader.pos + length;
217
+ while (reader.pos < end) {
218
+ let [fieldNo, wireType] = reader.tag();
219
+ switch (fieldNo) {
220
+ case /* string id */ 1:
221
+ message.id = reader.string();
222
+ break;
223
+ case /* string name */ 2:
224
+ message.name = reader.string();
225
+ break;
226
+ case /* string role */ 3:
227
+ message.role = reader.string();
228
+ break;
229
+ case /* repeated string teams */ 4:
230
+ message.teams.push(reader.string());
231
+ break;
232
+ case /* string image_url */ 5:
233
+ message.imageUrl = reader.string();
234
+ break;
235
+ case /* bytes custom_json */ 6:
236
+ message.customJson = reader.bytes();
237
+ break;
238
+ default:
239
+ let u = options.readUnknownField;
240
+ if (u === "throw")
241
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
242
+ let d = reader.skip(wireType);
243
+ if (u !== false)
244
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
245
+ }
246
+ }
247
+ return message;
248
+ }
249
+ internalBinaryWrite(message: UserInput, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
250
+ /* string id = 1; */
251
+ if (message.id !== "")
252
+ writer.tag(1, WireType.LengthDelimited).string(message.id);
253
+ /* string name = 2; */
254
+ if (message.name !== "")
255
+ writer.tag(2, WireType.LengthDelimited).string(message.name);
256
+ /* string role = 3; */
257
+ if (message.role !== "")
258
+ writer.tag(3, WireType.LengthDelimited).string(message.role);
259
+ /* repeated string teams = 4; */
260
+ for (let i = 0; i < message.teams.length; i++)
261
+ writer.tag(4, WireType.LengthDelimited).string(message.teams[i]);
262
+ /* string image_url = 5; */
263
+ if (message.imageUrl !== "")
264
+ writer.tag(5, WireType.LengthDelimited).string(message.imageUrl);
265
+ /* bytes custom_json = 6; */
266
+ if (message.customJson.length)
267
+ writer.tag(6, WireType.LengthDelimited).bytes(message.customJson);
268
+ let u = options.writeUnknownFields;
269
+ if (u !== false)
270
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
271
+ return writer;
272
+ }
273
+ }
274
+ /**
275
+ * @generated MessageType for protobuf message stream.video.coordinator.user_v1.UserInput
276
+ */
277
+ export const UserInput = new UserInput$Type();
@@ -0,0 +1,98 @@
1
+ /* eslint-disable */
2
+ // @generated by protobuf-ts 2.8.1 with parameter long_type_string,client_generic,server_none,eslint_disable
3
+ // @generated from protobuf file "video/coordinator/utils_v1/utils.proto" (package "stream.video.coordinator.utils_v1", syntax proto3)
4
+ // tslint:disable
5
+ import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
6
+ import type { IBinaryWriter } from "@protobuf-ts/runtime";
7
+ import { WireType } from "@protobuf-ts/runtime";
8
+ import type { BinaryReadOptions } from "@protobuf-ts/runtime";
9
+ import type { IBinaryReader } from "@protobuf-ts/runtime";
10
+ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
11
+ import type { PartialMessage } from "@protobuf-ts/runtime";
12
+ import { reflectionMergePartial } from "@protobuf-ts/runtime";
13
+ import { MESSAGE_TYPE } from "@protobuf-ts/runtime";
14
+ import { MessageType } from "@protobuf-ts/runtime";
15
+ /**
16
+ * @generated from protobuf message stream.video.coordinator.utils_v1.Sort
17
+ */
18
+ export interface Sort {
19
+ /**
20
+ * @generated from protobuf field: string field = 1;
21
+ */
22
+ field: string;
23
+ /**
24
+ * @generated from protobuf field: stream.video.coordinator.utils_v1.Direction direction = 2;
25
+ */
26
+ direction: Direction;
27
+ }
28
+ /**
29
+ * @generated from protobuf enum stream.video.coordinator.utils_v1.Direction
30
+ */
31
+ export enum Direction {
32
+ /**
33
+ * @generated from protobuf enum value: DIRECTION_UNSPECIFIED = 0;
34
+ */
35
+ UNSPECIFIED = 0,
36
+ /**
37
+ * @generated from protobuf enum value: DIRECTION_DESC = -1;
38
+ */
39
+ DESC = -1,
40
+ /**
41
+ * @generated from protobuf enum value: DIRECTION_ASC = 1;
42
+ */
43
+ ASC = 1
44
+ }
45
+ // @generated message type with reflection information, may provide speed optimized methods
46
+ class Sort$Type extends MessageType<Sort> {
47
+ constructor() {
48
+ super("stream.video.coordinator.utils_v1.Sort", [
49
+ { no: 1, name: "field", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
50
+ { no: 2, name: "direction", kind: "enum", T: () => ["stream.video.coordinator.utils_v1.Direction", Direction, "DIRECTION_"] }
51
+ ]);
52
+ }
53
+ create(value?: PartialMessage<Sort>): Sort {
54
+ const message = { field: "", direction: 0 };
55
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
56
+ if (value !== undefined)
57
+ reflectionMergePartial<Sort>(this, message, value);
58
+ return message;
59
+ }
60
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Sort): Sort {
61
+ let message = target ?? this.create(), end = reader.pos + length;
62
+ while (reader.pos < end) {
63
+ let [fieldNo, wireType] = reader.tag();
64
+ switch (fieldNo) {
65
+ case /* string field */ 1:
66
+ message.field = reader.string();
67
+ break;
68
+ case /* stream.video.coordinator.utils_v1.Direction direction */ 2:
69
+ message.direction = reader.int32();
70
+ break;
71
+ default:
72
+ let u = options.readUnknownField;
73
+ if (u === "throw")
74
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
75
+ let d = reader.skip(wireType);
76
+ if (u !== false)
77
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
78
+ }
79
+ }
80
+ return message;
81
+ }
82
+ internalBinaryWrite(message: Sort, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
83
+ /* string field = 1; */
84
+ if (message.field !== "")
85
+ writer.tag(1, WireType.LengthDelimited).string(message.field);
86
+ /* stream.video.coordinator.utils_v1.Direction direction = 2; */
87
+ if (message.direction !== 0)
88
+ writer.tag(2, WireType.Varint).int32(message.direction);
89
+ let u = options.writeUnknownFields;
90
+ if (u !== false)
91
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
92
+ return writer;
93
+ }
94
+ }
95
+ /**
96
+ * @generated MessageType for protobuf message stream.video.coordinator.utils_v1.Sort
97
+ */
98
+ export const Sort = new Sort$Type();