vg-x07df 0.1.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 (140) hide show
  1. package/.azure-pipelines/publish-public.yml +37 -0
  2. package/.azure-pipelines/publish.yml +39 -0
  3. package/.changeset/README.md +8 -0
  4. package/.changeset/config.json +11 -0
  5. package/AUTO_JOIN_GUIDE.md +411 -0
  6. package/README.md +215 -0
  7. package/Screenshot 2025-09-24 at 14.34.48.png +0 -0
  8. package/Screenshot 2025-10-04 at 12.58.54.png +0 -0
  9. package/biome.json +48 -0
  10. package/examples/demo/.env.example +19 -0
  11. package/examples/demo/CHANGELOG.md +22 -0
  12. package/examples/demo/README.md +72 -0
  13. package/examples/demo/eslint.config.js +23 -0
  14. package/examples/demo/index.html +13 -0
  15. package/examples/demo/package.json +34 -0
  16. package/examples/demo/pnpm-lock.yaml +2098 -0
  17. package/examples/demo/pnpm-workspace.yaml +1 -0
  18. package/examples/demo/public/vite.svg +1 -0
  19. package/examples/demo/src/App.css +52 -0
  20. package/examples/demo/src/App.tsx +176 -0
  21. package/examples/demo/src/assets/react.svg +1 -0
  22. package/examples/demo/src/components/auth/LoginForm.css +144 -0
  23. package/examples/demo/src/components/auth/LoginForm.tsx +80 -0
  24. package/examples/demo/src/components/calling/AutoJoinSettings.tsx +213 -0
  25. package/examples/demo/src/components/calling/AutoJoinStatus.tsx +72 -0
  26. package/examples/demo/src/components/calling/CallInitiator.css +258 -0
  27. package/examples/demo/src/components/calling/CallInitiator.tsx +142 -0
  28. package/examples/demo/src/components/calling/CallNotifications.css +119 -0
  29. package/examples/demo/src/components/calling/CallNotifications.tsx +108 -0
  30. package/examples/demo/src/components/calling/IncomingCallModal.css +192 -0
  31. package/examples/demo/src/components/calling/IncomingCallModal.tsx +78 -0
  32. package/examples/demo/src/components/calling/MinimizedCall.css +156 -0
  33. package/examples/demo/src/components/calling/MinimizedCall.tsx +78 -0
  34. package/examples/demo/src/components/conference/ConferenceHeader.css +265 -0
  35. package/examples/demo/src/components/conference/ConferenceHeader.tsx +78 -0
  36. package/examples/demo/src/components/conference/EnhancedControlBar.css +356 -0
  37. package/examples/demo/src/components/conference/EnhancedControlBar.tsx +262 -0
  38. package/examples/demo/src/components/conference/PaginationControls.css +67 -0
  39. package/examples/demo/src/components/conference/PaginationControls.tsx +64 -0
  40. package/examples/demo/src/components/conference/ParticipantGrid.css +153 -0
  41. package/examples/demo/src/components/conference/ParticipantGrid.tsx +87 -0
  42. package/examples/demo/src/components/conference/ParticipantTile.css +210 -0
  43. package/examples/demo/src/components/conference/ParticipantTile.tsx +114 -0
  44. package/examples/demo/src/components/conference/VideoConference.css +214 -0
  45. package/examples/demo/src/components/conference/VideoConference.tsx +93 -0
  46. package/examples/demo/src/contexts/AuthContext.tsx +105 -0
  47. package/examples/demo/src/hooks/useAuth.ts +5 -0
  48. package/examples/demo/src/hooks/useCallTimer.ts +42 -0
  49. package/examples/demo/src/index.css +68 -0
  50. package/examples/demo/src/main.tsx +10 -0
  51. package/examples/demo/src/services/auth.service.ts +153 -0
  52. package/examples/demo/src/types/auth.types.ts +31 -0
  53. package/examples/demo/tsconfig.app.json +28 -0
  54. package/examples/demo/tsconfig.json +7 -0
  55. package/examples/demo/tsconfig.node.json +26 -0
  56. package/examples/demo/vite.config.ts +15 -0
  57. package/images/callpad-without-ai.png +0 -0
  58. package/package.json +28 -0
  59. package/packages/sdk/CHANGELOG.md +33 -0
  60. package/packages/sdk/LICENSE +21 -0
  61. package/packages/sdk/README.md +97 -0
  62. package/packages/sdk/documentation.md +1132 -0
  63. package/packages/sdk/openapi-ts.config.ts +7 -0
  64. package/packages/sdk/package.json +88 -0
  65. package/packages/sdk/src/core/auth.manager.ts +52 -0
  66. package/packages/sdk/src/core/events/event-bus.ts +301 -0
  67. package/packages/sdk/src/core/events/index.ts +8 -0
  68. package/packages/sdk/src/core/events/types.ts +165 -0
  69. package/packages/sdk/src/core/index.ts +3 -0
  70. package/packages/sdk/src/core/signal/api.config.ts +49 -0
  71. package/packages/sdk/src/core/signal/index.ts +16 -0
  72. package/packages/sdk/src/core/signal/signal.client.ts +101 -0
  73. package/packages/sdk/src/core/signal/types.ts +110 -0
  74. package/packages/sdk/src/core/socketio/handlers/base.handler.ts +212 -0
  75. package/packages/sdk/src/core/socketio/handlers/call-accepted.handler.ts +34 -0
  76. package/packages/sdk/src/core/socketio/handlers/call-canceled.handler.ts +34 -0
  77. package/packages/sdk/src/core/socketio/handlers/call-declined.handler.ts +29 -0
  78. package/packages/sdk/src/core/socketio/handlers/call-ended.handler.ts +40 -0
  79. package/packages/sdk/src/core/socketio/handlers/call-incoming.handler.ts +72 -0
  80. package/packages/sdk/src/core/socketio/handlers/call-join-info.handler.ts +181 -0
  81. package/packages/sdk/src/core/socketio/handlers/call-participant-joined.handler.ts +42 -0
  82. package/packages/sdk/src/core/socketio/handlers/call-participant-joining.handler.ts +42 -0
  83. package/packages/sdk/src/core/socketio/handlers/call-timeout.handler.ts +31 -0
  84. package/packages/sdk/src/core/socketio/handlers/handler.registry.ts +62 -0
  85. package/packages/sdk/src/core/socketio/handlers/index.ts +21 -0
  86. package/packages/sdk/src/core/socketio/handlers/participant-left.handler.ts +37 -0
  87. package/packages/sdk/src/core/socketio/handlers/schema.ts +130 -0
  88. package/packages/sdk/src/core/socketio/index.ts +5 -0
  89. package/packages/sdk/src/core/socketio/socket.manager.ts +187 -0
  90. package/packages/sdk/src/core/socketio/types.ts +14 -0
  91. package/packages/sdk/src/core/types.ts +23 -0
  92. package/packages/sdk/src/generated/api/core/ApiError.ts +21 -0
  93. package/packages/sdk/src/generated/api/core/ApiRequestOptions.ts +13 -0
  94. package/packages/sdk/src/generated/api/core/ApiResult.ts +7 -0
  95. package/packages/sdk/src/generated/api/core/CancelablePromise.ts +126 -0
  96. package/packages/sdk/src/generated/api/core/OpenAPI.ts +55 -0
  97. package/packages/sdk/src/generated/api/core/request.ts +339 -0
  98. package/packages/sdk/src/generated/api/index.ts +5 -0
  99. package/packages/sdk/src/generated/api/models.ts +219 -0
  100. package/packages/sdk/src/generated/api/services.ts +225 -0
  101. package/packages/sdk/src/hooks/index.ts +21 -0
  102. package/packages/sdk/src/hooks/useAutoJoin.ts +66 -0
  103. package/packages/sdk/src/hooks/useCallActions.ts +28 -0
  104. package/packages/sdk/src/hooks/useCallQuality.ts +416 -0
  105. package/packages/sdk/src/hooks/useCallState.ts +23 -0
  106. package/packages/sdk/src/hooks/useConnection.ts +15 -0
  107. package/packages/sdk/src/hooks/useDevices.ts +296 -0
  108. package/packages/sdk/src/hooks/useErrorRecovery.ts +299 -0
  109. package/packages/sdk/src/hooks/useErrors.ts +84 -0
  110. package/packages/sdk/src/hooks/useEvent.ts +188 -0
  111. package/packages/sdk/src/hooks/useMediaControls.ts +215 -0
  112. package/packages/sdk/src/hooks/useParticipantStatus.ts +318 -0
  113. package/packages/sdk/src/hooks/useParticipants.ts +111 -0
  114. package/packages/sdk/src/index.ts +66 -0
  115. package/packages/sdk/src/livekit/constants.ts +76 -0
  116. package/packages/sdk/src/livekit/device.manager.ts +172 -0
  117. package/packages/sdk/src/livekit/error-classifier.ts +155 -0
  118. package/packages/sdk/src/livekit/events/eventBridge.ts +371 -0
  119. package/packages/sdk/src/livekit/events/trackRegistry.ts +114 -0
  120. package/packages/sdk/src/livekit/index.ts +49 -0
  121. package/packages/sdk/src/livekit/livekit.service.ts +110 -0
  122. package/packages/sdk/src/livekit/media.controls.ts +315 -0
  123. package/packages/sdk/src/livekit/room.manager.ts +79 -0
  124. package/packages/sdk/src/livekit/track.utils.ts +230 -0
  125. package/packages/sdk/src/livekit/types.ts +135 -0
  126. package/packages/sdk/src/provider/RtcProvider.tsx +78 -0
  127. package/packages/sdk/src/services/call-actions.ts +260 -0
  128. package/packages/sdk/src/services/error-recovery.ts +461 -0
  129. package/packages/sdk/src/services/index.ts +2 -0
  130. package/packages/sdk/src/services/sdk-builder.ts +104 -0
  131. package/packages/sdk/src/state/errors.ts +163 -0
  132. package/packages/sdk/src/state/selectors.ts +28 -0
  133. package/packages/sdk/src/state/store.ts +36 -0
  134. package/packages/sdk/src/state/types.ts +151 -0
  135. package/packages/sdk/src/utils/logger.ts +183 -0
  136. package/packages/sdk/tsconfig.json +49 -0
  137. package/packages/sdk/tsup.config.ts +51 -0
  138. package/pnpm-workspace.yaml +4 -0
  139. package/tsconfig.base.json +19 -0
  140. package/turbo.json +34 -0
@@ -0,0 +1,339 @@
1
+ import { ApiError } from './ApiError';
2
+ import type { ApiRequestOptions } from './ApiRequestOptions';
3
+ import type { ApiResult } from './ApiResult';
4
+ import { CancelablePromise } from './CancelablePromise';
5
+ import type { OnCancel } from './CancelablePromise';
6
+ import type { OpenAPIConfig } from './OpenAPI';
7
+
8
+ export const isString = (value: unknown): value is string => {
9
+ return typeof value === 'string';
10
+ };
11
+
12
+ export const isStringWithValue = (value: unknown): value is string => {
13
+ return isString(value) && value !== '';
14
+ };
15
+
16
+ export const isBlob = (value: any): value is Blob => {
17
+ return value instanceof Blob;
18
+ };
19
+
20
+ export const isFormData = (value: unknown): value is FormData => {
21
+ return value instanceof FormData;
22
+ };
23
+
24
+ export const base64 = (str: string): string => {
25
+ try {
26
+ return btoa(str);
27
+ } catch (err) {
28
+ // @ts-ignore
29
+ return Buffer.from(str).toString('base64');
30
+ }
31
+ };
32
+
33
+ export const getQueryString = (params: Record<string, unknown>): string => {
34
+ const qs: string[] = [];
35
+
36
+ const append = (key: string, value: unknown) => {
37
+ qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`);
38
+ };
39
+
40
+ const encodePair = (key: string, value: unknown) => {
41
+ if (value === undefined || value === null) {
42
+ return;
43
+ }
44
+
45
+ if (Array.isArray(value)) {
46
+ value.forEach(v => encodePair(key, v));
47
+ } else if (typeof value === 'object') {
48
+ Object.entries(value).forEach(([k, v]) => encodePair(`${key}[${k}]`, v));
49
+ } else {
50
+ append(key, value);
51
+ }
52
+ };
53
+
54
+ Object.entries(params).forEach(([key, value]) => encodePair(key, value));
55
+
56
+ return qs.length ? `?${qs.join('&')}` : '';
57
+ };
58
+
59
+ const getUrl = (config: OpenAPIConfig, options: ApiRequestOptions): string => {
60
+ const encoder = config.ENCODE_PATH || encodeURI;
61
+
62
+ const path = options.url
63
+ .replace('{api-version}', config.VERSION)
64
+ .replace(/{(.*?)}/g, (substring: string, group: string) => {
65
+ if (options.path?.hasOwnProperty(group)) {
66
+ return encoder(String(options.path[group]));
67
+ }
68
+ return substring;
69
+ });
70
+
71
+ const url = config.BASE + path;
72
+ return options.query ? url + getQueryString(options.query) : url;
73
+ };
74
+
75
+ export const getFormData = (options: ApiRequestOptions): FormData | undefined => {
76
+ if (options.formData) {
77
+ const formData = new FormData();
78
+
79
+ const process = (key: string, value: unknown) => {
80
+ if (isString(value) || isBlob(value)) {
81
+ formData.append(key, value);
82
+ } else {
83
+ formData.append(key, JSON.stringify(value));
84
+ }
85
+ };
86
+
87
+ Object.entries(options.formData)
88
+ .filter(([, value]) => value !== undefined && value !== null)
89
+ .forEach(([key, value]) => {
90
+ if (Array.isArray(value)) {
91
+ value.forEach(v => process(key, v));
92
+ } else {
93
+ process(key, value);
94
+ }
95
+ });
96
+
97
+ return formData;
98
+ }
99
+ return undefined;
100
+ };
101
+
102
+ type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;
103
+
104
+ export const resolve = async <T>(options: ApiRequestOptions, resolver?: T | Resolver<T>): Promise<T | undefined> => {
105
+ if (typeof resolver === 'function') {
106
+ return (resolver as Resolver<T>)(options);
107
+ }
108
+ return resolver;
109
+ };
110
+
111
+ export const getHeaders = async (config: OpenAPIConfig, options: ApiRequestOptions): Promise<Headers> => {
112
+ const [token, username, password, additionalHeaders] = await Promise.all([
113
+ resolve(options, config.TOKEN),
114
+ resolve(options, config.USERNAME),
115
+ resolve(options, config.PASSWORD),
116
+ resolve(options, config.HEADERS),
117
+ ]);
118
+
119
+ const headers = Object.entries({
120
+ Accept: 'application/json',
121
+ ...additionalHeaders,
122
+ ...options.headers,
123
+ })
124
+ .filter(([, value]) => value !== undefined && value !== null)
125
+ .reduce((headers, [key, value]) => ({
126
+ ...headers,
127
+ [key]: String(value),
128
+ }), {} as Record<string, string>);
129
+
130
+ if (isStringWithValue(token)) {
131
+ headers['Authorization'] = `Bearer ${token}`;
132
+ }
133
+
134
+ if (isStringWithValue(username) && isStringWithValue(password)) {
135
+ const credentials = base64(`${username}:${password}`);
136
+ headers['Authorization'] = `Basic ${credentials}`;
137
+ }
138
+
139
+ if (options.body !== undefined) {
140
+ if (options.mediaType) {
141
+ headers['Content-Type'] = options.mediaType;
142
+ } else if (isBlob(options.body)) {
143
+ headers['Content-Type'] = options.body.type || 'application/octet-stream';
144
+ } else if (isString(options.body)) {
145
+ headers['Content-Type'] = 'text/plain';
146
+ } else if (!isFormData(options.body)) {
147
+ headers['Content-Type'] = 'application/json';
148
+ }
149
+ }
150
+
151
+ return new Headers(headers);
152
+ };
153
+
154
+ export const getRequestBody = (options: ApiRequestOptions): unknown => {
155
+ if (options.body !== undefined) {
156
+ if (options.mediaType?.includes('application/json') || options.mediaType?.includes('+json')) {
157
+ return JSON.stringify(options.body)
158
+ } else if (isString(options.body) || isBlob(options.body) || isFormData(options.body)) {
159
+ return options.body;
160
+ } else {
161
+ return JSON.stringify(options.body);
162
+ }
163
+ }
164
+ return undefined;
165
+ };
166
+
167
+ export const sendRequest = async (
168
+ config: OpenAPIConfig,
169
+ options: ApiRequestOptions,
170
+ url: string,
171
+ body: any,
172
+ formData: FormData | undefined,
173
+ headers: Headers,
174
+ onCancel: OnCancel
175
+ ): Promise<Response> => {
176
+ const controller = new AbortController();
177
+
178
+ let request: RequestInit = {
179
+ headers,
180
+ body: body ?? formData,
181
+ method: options.method,
182
+ signal: controller.signal,
183
+ };
184
+
185
+ if (config.WITH_CREDENTIALS) {
186
+ request.credentials = config.CREDENTIALS;
187
+ }
188
+
189
+ for (const fn of config.interceptors.request._fns) {
190
+ request = await fn(request)
191
+ }
192
+
193
+ onCancel(() => controller.abort());
194
+
195
+ return await fetch(url, request);
196
+ };
197
+
198
+ export const getResponseHeader = (response: Response, responseHeader?: string): string | undefined => {
199
+ if (responseHeader) {
200
+ const content = response.headers.get(responseHeader);
201
+ if (isString(content)) {
202
+ return content;
203
+ }
204
+ }
205
+ return undefined;
206
+ };
207
+
208
+ export const getResponseBody = async (response: Response): Promise<unknown> => {
209
+ if (response.status !== 204) {
210
+ try {
211
+ const contentType = response.headers.get('Content-Type');
212
+ if (contentType) {
213
+ const binaryTypes = ['application/octet-stream', 'application/pdf', 'application/zip', 'audio/', 'image/', 'video/'];
214
+ if (contentType.includes('application/json') || contentType.includes('+json')) {
215
+ return await response.json();
216
+ } else if (binaryTypes.some(type => contentType.includes(type))) {
217
+ return await response.blob();
218
+ } else if (contentType.includes('multipart/form-data')) {
219
+ return await response.formData();
220
+ } else if (contentType.includes('text/')) {
221
+ return await response.text();
222
+ }
223
+ }
224
+ } catch (error) {
225
+ // Response parsing error - silently ignore
226
+ }
227
+ }
228
+ return undefined;
229
+ };
230
+
231
+ export const catchErrorCodes = (options: ApiRequestOptions, result: ApiResult): void => {
232
+ const errors: Record<number, string> = {
233
+ 400: 'Bad Request',
234
+ 401: 'Unauthorized',
235
+ 402: 'Payment Required',
236
+ 403: 'Forbidden',
237
+ 404: 'Not Found',
238
+ 405: 'Method Not Allowed',
239
+ 406: 'Not Acceptable',
240
+ 407: 'Proxy Authentication Required',
241
+ 408: 'Request Timeout',
242
+ 409: 'Conflict',
243
+ 410: 'Gone',
244
+ 411: 'Length Required',
245
+ 412: 'Precondition Failed',
246
+ 413: 'Payload Too Large',
247
+ 414: 'URI Too Long',
248
+ 415: 'Unsupported Media Type',
249
+ 416: 'Range Not Satisfiable',
250
+ 417: 'Expectation Failed',
251
+ 418: 'Im a teapot',
252
+ 421: 'Misdirected Request',
253
+ 422: 'Unprocessable Content',
254
+ 423: 'Locked',
255
+ 424: 'Failed Dependency',
256
+ 425: 'Too Early',
257
+ 426: 'Upgrade Required',
258
+ 428: 'Precondition Required',
259
+ 429: 'Too Many Requests',
260
+ 431: 'Request Header Fields Too Large',
261
+ 451: 'Unavailable For Legal Reasons',
262
+ 500: 'Internal Server Error',
263
+ 501: 'Not Implemented',
264
+ 502: 'Bad Gateway',
265
+ 503: 'Service Unavailable',
266
+ 504: 'Gateway Timeout',
267
+ 505: 'HTTP Version Not Supported',
268
+ 506: 'Variant Also Negotiates',
269
+ 507: 'Insufficient Storage',
270
+ 508: 'Loop Detected',
271
+ 510: 'Not Extended',
272
+ 511: 'Network Authentication Required',
273
+ ...options.errors,
274
+ }
275
+
276
+ const error = errors[result.status];
277
+ if (error) {
278
+ throw new ApiError(options, result, error);
279
+ }
280
+
281
+ if (!result.ok) {
282
+ const errorStatus = result.status ?? 'unknown';
283
+ const errorStatusText = result.statusText ?? 'unknown';
284
+ const errorBody = (() => {
285
+ try {
286
+ return JSON.stringify(result.body, null, 2);
287
+ } catch (e) {
288
+ return undefined;
289
+ }
290
+ })();
291
+
292
+ throw new ApiError(options, result,
293
+ `Generic Error: status: ${errorStatus}; status text: ${errorStatusText}; body: ${errorBody}`
294
+ );
295
+ }
296
+ };
297
+
298
+ /**
299
+ * Request method
300
+ * @param config The OpenAPI configuration object
301
+ * @param options The request options from the service
302
+ * @returns CancelablePromise<T>
303
+ * @throws ApiError
304
+ */
305
+ export const request = <T>(config: OpenAPIConfig, options: ApiRequestOptions): CancelablePromise<T> => {
306
+ return new CancelablePromise(async (resolve, reject, onCancel) => {
307
+ try {
308
+ const url = getUrl(config, options);
309
+ const formData = getFormData(options);
310
+ const body = getRequestBody(options);
311
+ const headers = await getHeaders(config, options);
312
+
313
+ if (!onCancel.isCancelled) {
314
+ let response = await sendRequest(config, options, url, body, formData, headers, onCancel);
315
+
316
+ for (const fn of config.interceptors.response._fns) {
317
+ response = await fn(response)
318
+ }
319
+
320
+ const responseBody = await getResponseBody(response);
321
+ const responseHeader = getResponseHeader(response, options.responseHeader);
322
+
323
+ const result: ApiResult = {
324
+ url,
325
+ ok: response.ok,
326
+ status: response.status,
327
+ statusText: response.statusText,
328
+ body: responseHeader ?? responseBody,
329
+ };
330
+
331
+ catchErrorCodes(options, result);
332
+
333
+ resolve(result.body);
334
+ }
335
+ } catch (error) {
336
+ reject(error);
337
+ }
338
+ });
339
+ };
@@ -0,0 +1,5 @@
1
+
2
+ export { ApiError } from './core/ApiError';
3
+ export { CancelablePromise, CancelError } from './core/CancelablePromise';
4
+ export { OpenAPI, type OpenAPIConfig } from './core/OpenAPI';
5
+ export * from './services';
@@ -0,0 +1,219 @@
1
+
2
+
3
+ export type HealthData = {
4
+
5
+
6
+ responses: {
7
+ GetHealth: {
8
+ status: string
9
+ timestamp: string
10
+ uptime: number
11
+ service: string
12
+ }
13
+ ,GetSignalHealth: {
14
+ status: string
15
+ timestamp: string
16
+ uptime: number
17
+ service: string
18
+ }
19
+
20
+ }
21
+
22
+ }
23
+
24
+ export type UserPresenceData = {
25
+
26
+ payloads: {
27
+ GetSignalPresenceByUserId: {
28
+ userId: string
29
+
30
+ };
31
+ GetSignalPresenceBulk: {
32
+ userIds: string
33
+
34
+ };
35
+ }
36
+
37
+
38
+ responses: {
39
+ GetSignalPresenceByUserId: {
40
+ userId: number
41
+ status: 'online' | 'offline'
42
+ lastActive: number
43
+ connections: Array<{
44
+ connectionId: string
45
+ connectedAt: number
46
+ lastActive: number
47
+ state: 'connecting' | 'connected' | 'disconnecting' | 'disconnected'
48
+ metadata?: {
49
+ device?: string
50
+ }
51
+ }>
52
+ timestamp: number
53
+ }
54
+ ,GetSignalPresenceBulk: {
55
+ presences: Array<{
56
+ userId: number
57
+ status: 'online' | 'offline'
58
+ lastActive: number
59
+ connections: Array<{
60
+ connectionId: string
61
+ connectedAt: number
62
+ lastActive: number
63
+ state: 'connecting' | 'connected' | 'disconnecting' | 'disconnected'
64
+ metadata?: {
65
+ device?: string
66
+ }
67
+ }>
68
+ timestamp: number
69
+ }>
70
+ timestamp: number
71
+ }
72
+
73
+ }
74
+
75
+ }
76
+
77
+ export type CallsData = {
78
+
79
+ payloads: {
80
+ PostSignalCalls: {
81
+ appId: string
82
+ requestBody?: {
83
+ mode: 'AUDIO' | 'VIDEO'
84
+ participants: Array<{
85
+ userId: string
86
+ }>
87
+ }
88
+
89
+ };
90
+ PostSignalCallsByCallIdAccept: {
91
+ appId: string
92
+ callId: string
93
+
94
+ };
95
+ PostSignalCallsByCallIdDecline: {
96
+ appId: string
97
+ callId: string
98
+
99
+ };
100
+ PostSignalCallsByCallIdLeave: {
101
+ appId: string
102
+ callId: string
103
+
104
+ };
105
+ GetSignalCallsByCallId: {
106
+ appId: string
107
+ callId: string
108
+
109
+ };
110
+ }
111
+
112
+
113
+ responses: {
114
+ PostSignalCalls: {
115
+ id: string
116
+ mode: 'AUDIO' | 'VIDEO'
117
+ state: 'RINGING' | 'ACTIVE' | 'ON_HOLD' | 'ENDED'
118
+ callerId: string
119
+ roomName: string
120
+ lkRoomSid?: string
121
+ createdAt: string
122
+ startedAt?: string
123
+ endedAt?: string
124
+ participants: Array<{
125
+ id: string
126
+ userId: string
127
+ joinedAt?: string
128
+ leftAt?: string
129
+ lkIdentity?: string
130
+ lkParticipantSid?: string
131
+ createdAt: string
132
+ updatedAt: string
133
+ }>
134
+ }
135
+ ,PostSignalCallsByCallIdAccept: {
136
+ callId: string
137
+ success: boolean
138
+ action: 'accepted' | 'declined' | 'left' | 'initiated'
139
+ participant?: {
140
+ inviteState: 'INVITED' | 'REMINDED' | 'ACCEPTED' | 'DECLINED' | 'MISSED' | 'TIMEOUT'
141
+ joinState: 'NOT_JOINED' | 'JOINING' | 'JOINED' | 'LEFT' | 'KICKED'
142
+ respondedAt?: string
143
+ joinedAt?: string
144
+ leftAt?: string
145
+ }
146
+ call?: {
147
+ globalState: 'RINGING' | 'ACTIVE' | 'ON_HOLD' | 'ENDED'
148
+ activeParticipants?: number
149
+ pendingParticipants?: number
150
+ }
151
+ token?: string
152
+ roomName?: string
153
+ message: string
154
+ }
155
+ ,PostSignalCallsByCallIdDecline: {
156
+ callId: string
157
+ success: boolean
158
+ action: 'accepted' | 'declined' | 'left' | 'initiated'
159
+ participant?: {
160
+ inviteState: 'INVITED' | 'REMINDED' | 'ACCEPTED' | 'DECLINED' | 'MISSED' | 'TIMEOUT'
161
+ joinState: 'NOT_JOINED' | 'JOINING' | 'JOINED' | 'LEFT' | 'KICKED'
162
+ respondedAt?: string
163
+ joinedAt?: string
164
+ leftAt?: string
165
+ }
166
+ call?: {
167
+ globalState: 'RINGING' | 'ACTIVE' | 'ON_HOLD' | 'ENDED'
168
+ activeParticipants?: number
169
+ pendingParticipants?: number
170
+ }
171
+ token?: string
172
+ roomName?: string
173
+ message: string
174
+ }
175
+ ,PostSignalCallsByCallIdLeave: {
176
+ callId: string
177
+ success: boolean
178
+ action: 'accepted' | 'declined' | 'left' | 'initiated'
179
+ participant?: {
180
+ inviteState: 'INVITED' | 'REMINDED' | 'ACCEPTED' | 'DECLINED' | 'MISSED' | 'TIMEOUT'
181
+ joinState: 'NOT_JOINED' | 'JOINING' | 'JOINED' | 'LEFT' | 'KICKED'
182
+ respondedAt?: string
183
+ joinedAt?: string
184
+ leftAt?: string
185
+ }
186
+ call?: {
187
+ globalState: 'RINGING' | 'ACTIVE' | 'ON_HOLD' | 'ENDED'
188
+ activeParticipants?: number
189
+ pendingParticipants?: number
190
+ }
191
+ token?: string
192
+ roomName?: string
193
+ message: string
194
+ }
195
+ ,GetSignalCallsByCallId: {
196
+ id: string
197
+ mode: 'AUDIO' | 'VIDEO'
198
+ state: 'RINGING' | 'ACTIVE' | 'ON_HOLD' | 'ENDED'
199
+ callerId: string
200
+ roomName: string
201
+ lkRoomSid?: string
202
+ createdAt: string
203
+ startedAt?: string
204
+ endedAt?: string
205
+ participants: Array<{
206
+ id: string
207
+ userId: string
208
+ joinedAt?: string
209
+ leftAt?: string
210
+ lkIdentity?: string
211
+ lkParticipantSid?: string
212
+ createdAt: string
213
+ updatedAt: string
214
+ }>
215
+ }
216
+
217
+ }
218
+
219
+ }