@whereby.com/core 1.31.6 → 1.31.7
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.
- package/dist/index.cjs +12 -4
- package/dist/index.d.cts +718 -0
- package/dist/index.d.mts +718 -0
- package/dist/index.d.ts +718 -0
- package/dist/index.mjs +12 -4
- package/dist/legacy-esm.js +12 -4
- package/dist/redux/index.cjs +12 -4
- package/dist/redux/index.d.cts +424 -1
- package/dist/redux/index.d.mts +424 -1
- package/dist/redux/index.d.ts +424 -1
- package/dist/redux/index.js +12 -4
- package/dist/redux/index.mjs +12 -4
- package/package.json +3 -3
package/dist/redux/index.d.mts
CHANGED
|
@@ -35,21 +35,53 @@ type HttpClientRequestConfig = AxiosRequestConfig | {
|
|
|
35
35
|
interface IHttpClient {
|
|
36
36
|
request(url: string, options: HttpClientRequestConfig): Promise<Response>;
|
|
37
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* Class used for making http calls. This is just a pure
|
|
40
|
+
* wrapper around the http lib that we decide to use,
|
|
41
|
+
* so that we can switch implementations.
|
|
42
|
+
*/
|
|
38
43
|
declare class HttpClient implements IHttpClient {
|
|
39
44
|
_baseUrl: string;
|
|
45
|
+
/**
|
|
46
|
+
* Creates an HttpClient instance.
|
|
47
|
+
*
|
|
48
|
+
* @param {string} [baseUrl] - The base URL where all requests are made.
|
|
49
|
+
*/
|
|
40
50
|
constructor({ baseUrl }: {
|
|
41
51
|
baseUrl: string;
|
|
42
52
|
});
|
|
43
53
|
private _requestAxios;
|
|
54
|
+
/**
|
|
55
|
+
* Wrapper for the axios API
|
|
56
|
+
*
|
|
57
|
+
* @param {string} url - Required. URL (appended to base URL) where API call will be made
|
|
58
|
+
* @param {object} options - Required. Contains the data needed for the fetch API
|
|
59
|
+
* @return {Promise<Response>} - A promise which will return a Response object (https://developer.mozilla.org/en-US/docs/Web/API/Response)
|
|
60
|
+
*/
|
|
44
61
|
request(url: string, options: HttpClientRequestConfig): Promise<Response>;
|
|
45
62
|
}
|
|
46
63
|
|
|
64
|
+
/**
|
|
65
|
+
* ApiClient for doing multipart/form-data requests.
|
|
66
|
+
*/
|
|
47
67
|
declare class MultipartHttpClient implements IHttpClient {
|
|
48
68
|
_httpClient: IHttpClient;
|
|
49
69
|
constructor({ httpClient }: {
|
|
50
70
|
httpClient: IHttpClient;
|
|
51
71
|
});
|
|
72
|
+
/**
|
|
73
|
+
* Convert the provided object to a FormData object containing the same keys and values.
|
|
74
|
+
* @param {object} data - the data to convert.
|
|
75
|
+
* @returns {FormData}
|
|
76
|
+
*/
|
|
52
77
|
static dataToFormData(data: Record<string, string>): FormData;
|
|
78
|
+
/**
|
|
79
|
+
* Request a resource using multipart/form-data encoding.
|
|
80
|
+
*
|
|
81
|
+
* @param {string} url - the url to request
|
|
82
|
+
* @param {object} options - Required. Contains the data needed for the fetch API
|
|
83
|
+
* @return {Promise<Response>} - A promise which will return a Response object (https://developer.mozilla.org/en-US/docs/Web/API/Response)
|
|
84
|
+
*/
|
|
53
85
|
request(url: string, options?: HttpClientRequestConfig): Promise<Response>;
|
|
54
86
|
}
|
|
55
87
|
|
|
@@ -83,19 +115,40 @@ interface ApiClientOptions {
|
|
|
83
115
|
baseUrl?: string;
|
|
84
116
|
fetchDeviceCredentials?: AuthenticatedHttpClientOptions["fetchDeviceCredentials"];
|
|
85
117
|
}
|
|
118
|
+
/**
|
|
119
|
+
* Class used for all Whereby API calls.
|
|
120
|
+
*/
|
|
86
121
|
declare class ApiClient {
|
|
87
122
|
authenticatedHttpClient: AuthenticatedHttpClient;
|
|
88
123
|
authenticatedFormDataHttpClient: MultipartHttpClient;
|
|
124
|
+
/**
|
|
125
|
+
* Create an ApiClient instance.
|
|
126
|
+
*/
|
|
89
127
|
constructor({ baseUrl, fetchDeviceCredentials, }?: ApiClientOptions);
|
|
128
|
+
/**
|
|
129
|
+
* Wrapper for the fetch API
|
|
130
|
+
*/
|
|
90
131
|
request(url: string, options: HttpClientRequestConfig): Promise<Response>;
|
|
132
|
+
/**
|
|
133
|
+
* Performs a multipart request where data is multipart/form-data encoded.
|
|
134
|
+
*/
|
|
91
135
|
requestMultipart(url: string, options: HttpClientRequestConfig): Promise<Response>;
|
|
92
136
|
}
|
|
93
137
|
|
|
138
|
+
/**
|
|
139
|
+
* Related to device calls needed to obtain credentials
|
|
140
|
+
*/
|
|
94
141
|
declare class DeviceService {
|
|
95
142
|
_apiClient: ApiClient;
|
|
96
143
|
constructor({ apiClient }: {
|
|
97
144
|
apiClient: ApiClient;
|
|
98
145
|
});
|
|
146
|
+
/**
|
|
147
|
+
* Get's the device credentials needed for most of the other API services
|
|
148
|
+
*
|
|
149
|
+
* @return {Promise} A promise which is fulfilled or failed based on the
|
|
150
|
+
* response.
|
|
151
|
+
*/
|
|
99
152
|
getCredentials(): Promise<Credentials | null>;
|
|
100
153
|
}
|
|
101
154
|
|
|
@@ -108,6 +161,11 @@ declare class CredentialsService extends EventEmitter {
|
|
|
108
161
|
_deviceService: DeviceService;
|
|
109
162
|
_credentialsStore: AbstractStore;
|
|
110
163
|
credentialsPromise?: Promise<Credentials | null>;
|
|
164
|
+
/**
|
|
165
|
+
* Service to manage Whereby's Rest API credentials.
|
|
166
|
+
*
|
|
167
|
+
* @param {ObjectStore} credentialsStore - Store to manage the credentials.
|
|
168
|
+
*/
|
|
111
169
|
constructor({ deviceService, credentialsStore, }: {
|
|
112
170
|
deviceService: DeviceService;
|
|
113
171
|
credentialsStore: AbstractStore;
|
|
@@ -117,10 +175,38 @@ declare class CredentialsService extends EventEmitter {
|
|
|
117
175
|
storeName?: string;
|
|
118
176
|
storeType?: "localStorage" | "chromeStorage";
|
|
119
177
|
}): CredentialsService;
|
|
178
|
+
/**
|
|
179
|
+
* Contacts the REST API to get new credentials. DO NOT USE directly, call getCredentials() instead.
|
|
180
|
+
*
|
|
181
|
+
* @see getCredentials
|
|
182
|
+
* @returns {Promise.<Credentials>} - Promise that resolves with the credentials.
|
|
183
|
+
*/
|
|
120
184
|
_fetchNewCredentialsFromApi(): Promise<Credentials | null>;
|
|
185
|
+
/**
|
|
186
|
+
* Returns the current credentials without triggering an API request to get new ones.
|
|
187
|
+
* If no credentials are currently available it will return null.
|
|
188
|
+
*
|
|
189
|
+
* @returns {?Credentials} - The credentials currently in use, null otherwise.
|
|
190
|
+
*/
|
|
121
191
|
getCurrentCredentials(): Promise<Credentials | null>;
|
|
192
|
+
/**
|
|
193
|
+
* Returns a promise that will contain the credentials for this client.
|
|
194
|
+
* If no credentials are available in local storage, new ones will be fetched from the server.
|
|
195
|
+
*
|
|
196
|
+
* @returns {Promise.<Credentials>} - Promise that resolves with the credentials.
|
|
197
|
+
*/
|
|
122
198
|
getCredentials(): Promise<Credentials | null>;
|
|
199
|
+
/**
|
|
200
|
+
* Saves new credentials which replace the existing ones and abort any pending request to get new ones.
|
|
201
|
+
*
|
|
202
|
+
* @param {Credentials} credentials - New credentials to store.
|
|
203
|
+
*/
|
|
123
204
|
saveCredentials(credentials: Credentials): Promise<Credentials>;
|
|
205
|
+
/**
|
|
206
|
+
* It will set the userId for the current credentials.
|
|
207
|
+
*
|
|
208
|
+
* @param userId - The user id to set.
|
|
209
|
+
*/
|
|
124
210
|
setUserId(userId: string | null): Promise<void>;
|
|
125
211
|
}
|
|
126
212
|
|
|
@@ -267,6 +353,9 @@ declare class OrganizationService {
|
|
|
267
353
|
constructor({ apiClient }: {
|
|
268
354
|
apiClient: ApiClient;
|
|
269
355
|
});
|
|
356
|
+
/**
|
|
357
|
+
* Creates an organization.
|
|
358
|
+
*/
|
|
270
359
|
createOrganization({ organizationName, subdomain, owner, }: {
|
|
271
360
|
organizationName: string;
|
|
272
361
|
subdomain: string;
|
|
@@ -281,8 +370,23 @@ declare class OrganizationService {
|
|
|
281
370
|
consents?: ReadonlyArray<ConsentGrantRequest>;
|
|
282
371
|
};
|
|
283
372
|
}): Promise<string>;
|
|
373
|
+
/**
|
|
374
|
+
* Retrieves the organization based on the subdomain.
|
|
375
|
+
*/
|
|
284
376
|
getOrganizationBySubdomain(subdomain: string): Promise<Organization | null>;
|
|
377
|
+
/**
|
|
378
|
+
* Retrieves the organization based on the organizationId.
|
|
379
|
+
*
|
|
380
|
+
* Note: This endpoint should only be used to retrieve an organization when the device is linked
|
|
381
|
+
* to a user in that organization. Use getOrganizationBySubdomain instead if you just want the information
|
|
382
|
+
* about an organization that is mapped to a given subdomain.
|
|
383
|
+
*/
|
|
285
384
|
getOrganizationByOrganizationId(organizationId: string): Promise<Organization | null>;
|
|
385
|
+
/**
|
|
386
|
+
* Retrieves the organizations that contain a user
|
|
387
|
+
* matching provided the email+code or phoneNumber+code
|
|
388
|
+
* combination.
|
|
389
|
+
*/
|
|
286
390
|
getOrganizationsByContactPoint(options: {
|
|
287
391
|
email: string;
|
|
288
392
|
code: string;
|
|
@@ -290,17 +394,37 @@ declare class OrganizationService {
|
|
|
290
394
|
phoneNumber: string;
|
|
291
395
|
code: string;
|
|
292
396
|
}): Promise<ReadonlyArray<Organization>>;
|
|
397
|
+
/**
|
|
398
|
+
* Retrieves the organizations that contain a user
|
|
399
|
+
* matching provided the idToken
|
|
400
|
+
*/
|
|
293
401
|
getOrganizationsByIdToken({ idToken }: {
|
|
294
402
|
idToken: string;
|
|
295
403
|
}): Promise<ReadonlyArray<Organization>>;
|
|
404
|
+
/**
|
|
405
|
+
* Retrieves the organizations containing a user
|
|
406
|
+
* with either the email or phoneNumber matching the logged in user.
|
|
407
|
+
*
|
|
408
|
+
* This is useful for showing the possible organization that the current
|
|
409
|
+
* user could log in to.
|
|
410
|
+
*/
|
|
296
411
|
getOrganizationsByLoggedInUser(): Promise<ReadonlyArray<Organization>>;
|
|
412
|
+
/**
|
|
413
|
+
* Checks if a subdomain is available and verifies its format.
|
|
414
|
+
*/
|
|
297
415
|
getSubdomainAvailability(subdomain: string): Promise<{
|
|
298
416
|
status: string;
|
|
299
417
|
}>;
|
|
418
|
+
/**
|
|
419
|
+
* Updates preferences of the organization.
|
|
420
|
+
*/
|
|
300
421
|
updatePreferences({ organizationId, preferences, }: {
|
|
301
422
|
organizationId: string;
|
|
302
423
|
preferences: OrganizationPreferences;
|
|
303
424
|
}): Promise<undefined>;
|
|
425
|
+
/**
|
|
426
|
+
* Delete organization
|
|
427
|
+
*/
|
|
304
428
|
deleteOrganization({ organizationId }: {
|
|
305
429
|
organizationId: string;
|
|
306
430
|
}): Promise<undefined>;
|
|
@@ -428,11 +552,17 @@ interface Screenshare {
|
|
|
428
552
|
isLocal: boolean;
|
|
429
553
|
}
|
|
430
554
|
|
|
555
|
+
/**
|
|
556
|
+
* Reducer
|
|
557
|
+
*/
|
|
431
558
|
interface WaitingParticipantsState {
|
|
432
559
|
waitingParticipants: WaitingParticipant[];
|
|
433
560
|
}
|
|
434
561
|
declare const waitingParticipantsSliceInitialState: WaitingParticipantsState;
|
|
435
562
|
declare const waitingParticipantsSlice: _reduxjs_toolkit.Slice<WaitingParticipantsState, {}, "waitingParticipants", "waitingParticipants", _reduxjs_toolkit.SliceSelectors<WaitingParticipantsState>>;
|
|
563
|
+
/**
|
|
564
|
+
* Action creators
|
|
565
|
+
*/
|
|
436
566
|
declare const doAcceptWaitingParticipant: (args: {
|
|
437
567
|
participantId: string;
|
|
438
568
|
}) => AppThunk;
|
|
@@ -444,9 +574,15 @@ declare const doRejectWaitingParticipant: (args: {
|
|
|
444
574
|
participantId: string;
|
|
445
575
|
response?: string;
|
|
446
576
|
}) => AppThunk;
|
|
577
|
+
/**
|
|
578
|
+
* Selectors
|
|
579
|
+
*/
|
|
447
580
|
declare const selectWaitingParticipantsRaw: (state: RootState) => WaitingParticipantsState;
|
|
448
581
|
declare const selectWaitingParticipants: (state: RootState) => WaitingParticipant[];
|
|
449
582
|
|
|
583
|
+
/**
|
|
584
|
+
* Reducer
|
|
585
|
+
*/
|
|
450
586
|
interface StreamingState {
|
|
451
587
|
isStreaming: boolean;
|
|
452
588
|
error: unknown;
|
|
@@ -465,8 +601,14 @@ declare const streamingSlice: _reduxjs_toolkit.Slice<StreamingState, {
|
|
|
465
601
|
startedAt?: number | undefined;
|
|
466
602
|
};
|
|
467
603
|
}, "streaming", "streaming", _reduxjs_toolkit.SliceSelectors<StreamingState>>;
|
|
604
|
+
/**
|
|
605
|
+
* Action creators
|
|
606
|
+
*/
|
|
468
607
|
declare const doHandleStreamingStarted: _reduxjs_toolkit.ActionCreatorWithoutPayload<"streaming/doHandleStreamingStarted">;
|
|
469
608
|
declare const doHandleStreamingStopped: _reduxjs_toolkit.ActionCreatorWithoutPayload<"streaming/doHandleStreamingStopped">;
|
|
609
|
+
/**
|
|
610
|
+
* Selectors
|
|
611
|
+
*/
|
|
470
612
|
declare const selectStreamingRaw: (state: RootState) => StreamingState;
|
|
471
613
|
|
|
472
614
|
type RtcAnalyticsCustomEvent<T = any> = {
|
|
@@ -478,6 +620,9 @@ type RtcAnalyticsCustomEvent<T = any> = {
|
|
|
478
620
|
declare const rtcAnalyticsCustomEvents: {
|
|
479
621
|
[key: string]: RtcAnalyticsCustomEvent;
|
|
480
622
|
};
|
|
623
|
+
/**
|
|
624
|
+
* Reducer
|
|
625
|
+
*/
|
|
481
626
|
interface rtcAnalyticsState {
|
|
482
627
|
reportedValues: {
|
|
483
628
|
[key: string]: unknown;
|
|
@@ -495,6 +640,9 @@ declare const rtcAnalyticsSlice: _reduxjs_toolkit.Slice<rtcAnalyticsState, {
|
|
|
495
640
|
};
|
|
496
641
|
}, "rtcAnalytics", "rtcAnalytics", _reduxjs_toolkit.SliceSelectors<rtcAnalyticsState>>;
|
|
497
642
|
declare const doRtcAnalyticsCustomEventsInitialize: (args: void) => AppThunk;
|
|
643
|
+
/**
|
|
644
|
+
* Action creators
|
|
645
|
+
*/
|
|
498
646
|
declare const updateReportedValues: ActionCreatorWithPayload<{
|
|
499
647
|
rtcEventName: string;
|
|
500
648
|
value: unknown;
|
|
@@ -504,17 +652,26 @@ type ChatMessage = Pick<ChatMessage$1, "id" | "senderId" | "parentId" | "timesta
|
|
|
504
652
|
removed: boolean;
|
|
505
653
|
file?: ChatFileShare;
|
|
506
654
|
};
|
|
655
|
+
/**
|
|
656
|
+
* Reducer
|
|
657
|
+
*/
|
|
507
658
|
interface ChatState {
|
|
508
659
|
chatMessages: ChatMessage[];
|
|
509
660
|
}
|
|
510
661
|
declare const chatSliceInitialState: ChatState;
|
|
511
662
|
declare const chatSlice: _reduxjs_toolkit.Slice<ChatState, {}, "chat", "chat", _reduxjs_toolkit.SliceSelectors<ChatState>>;
|
|
663
|
+
/**
|
|
664
|
+
* Action creators
|
|
665
|
+
*/
|
|
512
666
|
declare const doSendChatMessage: (args: {
|
|
513
667
|
text: string;
|
|
514
668
|
isBroadcast?: boolean;
|
|
515
669
|
parentId?: string;
|
|
516
670
|
}) => AppThunk;
|
|
517
671
|
declare const doRemoveChatMessage: (args: Pick<ChatMessage$1, "id" | "sig">) => AppThunk;
|
|
672
|
+
/**
|
|
673
|
+
* Selectors
|
|
674
|
+
*/
|
|
518
675
|
declare const selectChatRaw: (state: RootState) => ChatState;
|
|
519
676
|
declare const selectChatMessages: (state: RootState) => ChatMessage[];
|
|
520
677
|
|
|
@@ -602,6 +759,9 @@ type NotificationEventMap = {
|
|
|
602
759
|
|
|
603
760
|
type NotificationsEventEmitter = EventEmitter<NotificationEventMap>;
|
|
604
761
|
declare function createNotificationEvent<Type, PropsType>(payload: Notification<Type, PropsType>): NotificationEvent<Type, PropsType>;
|
|
762
|
+
/**
|
|
763
|
+
* Reducer
|
|
764
|
+
*/
|
|
605
765
|
interface NotificationsState {
|
|
606
766
|
emitter: NotificationsEventEmitter;
|
|
607
767
|
events: Array<NotificationEvent>;
|
|
@@ -617,8 +777,14 @@ declare const notificationsSlice: _reduxjs_toolkit.Slice<NotificationsState, {
|
|
|
617
777
|
emitter: immer.WritableDraft<NotificationsEventEmitter>;
|
|
618
778
|
};
|
|
619
779
|
}, "notifications", "notifications", _reduxjs_toolkit.SliceSelectors<NotificationsState>>;
|
|
780
|
+
/**
|
|
781
|
+
* Action creators
|
|
782
|
+
*/
|
|
620
783
|
declare const doClearNotifications: _reduxjs_toolkit.ActionCreatorWithoutPayload<"notifications/doClearNotifications">;
|
|
621
784
|
declare const doSetNotification: (args: NotificationEvents) => AppThunk;
|
|
785
|
+
/**
|
|
786
|
+
* Selectors
|
|
787
|
+
*/
|
|
622
788
|
declare const selectNotificationsRaw: (state: RootState) => NotificationsState;
|
|
623
789
|
declare const selectNotificationsEvents: (state: RootState) => NotificationEvent<string, unknown>[];
|
|
624
790
|
declare const selectNotificationsEmitter: (state: RootState) => NotificationsEventEmitter;
|
|
@@ -630,6 +796,9 @@ interface LocalScreenshareState {
|
|
|
630
796
|
startedAt?: number;
|
|
631
797
|
}
|
|
632
798
|
declare const localScreenshareSliceInitialState: LocalScreenshareState;
|
|
799
|
+
/**
|
|
800
|
+
* Reducer
|
|
801
|
+
*/
|
|
633
802
|
declare const localScreenshareSlice: _reduxjs_toolkit.Slice<LocalScreenshareState, {
|
|
634
803
|
stopScreenshare: (state: immer.WritableDraft<LocalScreenshareState>, action: PayloadAction<{
|
|
635
804
|
stream: MediaStream;
|
|
@@ -646,6 +815,9 @@ declare const localScreenshareSlice: _reduxjs_toolkit.Slice<LocalScreenshareStat
|
|
|
646
815
|
error: undefined;
|
|
647
816
|
};
|
|
648
817
|
}, "localScreenshare", "localScreenshare", _reduxjs_toolkit.SliceSelectors<LocalScreenshareState>>;
|
|
818
|
+
/**
|
|
819
|
+
* Action creators
|
|
820
|
+
*/
|
|
649
821
|
declare const stopScreenshare: _reduxjs_toolkit.ActionCreatorWithPayload<{
|
|
650
822
|
stream: MediaStream;
|
|
651
823
|
}, "localScreenshare/stopScreenshare">;
|
|
@@ -653,6 +825,9 @@ declare const doStartScreenshare: _reduxjs_toolkit.AsyncThunk<{
|
|
|
653
825
|
stream: MediaStream;
|
|
654
826
|
}, undefined, ThunkConfig>;
|
|
655
827
|
declare const doStopScreenshare: (args: void) => AppThunk;
|
|
828
|
+
/**
|
|
829
|
+
* Selectors
|
|
830
|
+
*/
|
|
656
831
|
declare const selectLocalScreenshareRaw: (state: RootState) => LocalScreenshareState;
|
|
657
832
|
declare const selectLocalScreenshareStatus: (state: RootState) => "error" | "active" | "inactive" | "starting";
|
|
658
833
|
declare const selectLocalScreenshareStream: (state: RootState) => MediaStream | undefined;
|
|
@@ -665,6 +840,9 @@ interface LocalParticipantState extends LocalParticipant {
|
|
|
665
840
|
breakoutGroupAssigned: string;
|
|
666
841
|
}
|
|
667
842
|
declare const localParticipantSliceInitialState: LocalParticipantState;
|
|
843
|
+
/**
|
|
844
|
+
* Reducer
|
|
845
|
+
*/
|
|
668
846
|
declare const localParticipantSlice: _reduxjs_toolkit.Slice<LocalParticipantState, {
|
|
669
847
|
setDisplayName: (state: immer.WritableDraft<LocalParticipantState>, action: PayloadAction<{
|
|
670
848
|
displayName: string;
|
|
@@ -701,6 +879,9 @@ declare const localParticipantSlice: _reduxjs_toolkit.Slice<LocalParticipantStat
|
|
|
701
879
|
isAudioRecorder: boolean;
|
|
702
880
|
};
|
|
703
881
|
}, "localParticipant", "localParticipant", _reduxjs_toolkit.SliceSelectors<LocalParticipantState>>;
|
|
882
|
+
/**
|
|
883
|
+
* Action creators
|
|
884
|
+
*/
|
|
704
885
|
declare const setDisplayName: _reduxjs_toolkit.ActionCreatorWithPayload<{
|
|
705
886
|
displayName: string;
|
|
706
887
|
}, "localParticipant/setDisplayName">;
|
|
@@ -724,6 +905,9 @@ declare const doSetLocalStickyReaction: _reduxjs_toolkit.AsyncThunk<{
|
|
|
724
905
|
}, ThunkConfig>;
|
|
725
906
|
declare const doSendClientMetadata: (args: void) => AppThunk;
|
|
726
907
|
|
|
908
|
+
/**
|
|
909
|
+
* Reducer
|
|
910
|
+
*/
|
|
727
911
|
interface LiveTranscriptionState {
|
|
728
912
|
isInitiator: boolean;
|
|
729
913
|
isTranscribing: boolean;
|
|
@@ -741,9 +925,15 @@ declare const liveTranscriptionSlice: _reduxjs_toolkit.Slice<LiveTranscriptionSt
|
|
|
741
925
|
startedAt?: number | undefined;
|
|
742
926
|
};
|
|
743
927
|
}, "liveTranscription", "liveTranscription", _reduxjs_toolkit.SliceSelectors<LiveTranscriptionState>>;
|
|
928
|
+
/**
|
|
929
|
+
* Action creators
|
|
930
|
+
*/
|
|
744
931
|
declare const transcribingRequestStarted: _reduxjs_toolkit.ActionCreatorWithoutPayload<"liveTranscription/transcribingRequestStarted">;
|
|
745
932
|
declare const doStartLiveTranscription: (args: void) => AppThunk;
|
|
746
933
|
declare const doStopLiveTranscription: (args: void) => AppThunk;
|
|
934
|
+
/**
|
|
935
|
+
* Selectors
|
|
936
|
+
*/
|
|
747
937
|
declare const selectLiveTranscriptionRaw: (state: RootState) => LiveTranscriptionState;
|
|
748
938
|
declare const selectLiveTranscriptionStatus: (state: RootState) => "error" | "requested" | "transcribing" | undefined;
|
|
749
939
|
declare const selectLiveTranscriptionStartedAt: (state: RootState) => number | undefined;
|
|
@@ -751,6 +941,9 @@ declare const selectLiveTranscriptionError: (state: RootState) => string | undef
|
|
|
751
941
|
declare const selectIsLiveTranscription: (state: RootState) => boolean;
|
|
752
942
|
declare const selectLiveTranscriptionIsInitiator: (state: RootState) => boolean;
|
|
753
943
|
|
|
944
|
+
/**
|
|
945
|
+
* Reducer
|
|
946
|
+
*/
|
|
754
947
|
interface LiveCaptionsState {
|
|
755
948
|
isCaptioning: boolean;
|
|
756
949
|
error?: string;
|
|
@@ -777,12 +970,18 @@ declare const liveCaptionsSlice: _reduxjs_toolkit.Slice<LiveCaptionsState, {
|
|
|
777
970
|
startedAt?: number | undefined;
|
|
778
971
|
};
|
|
779
972
|
}, "liveCaptions", "liveCaptions", _reduxjs_toolkit.SliceSelectors<LiveCaptionsState>>;
|
|
973
|
+
/**
|
|
974
|
+
* Action creators
|
|
975
|
+
*/
|
|
780
976
|
declare const captioningRequestStarted: _reduxjs_toolkit.ActionCreatorWithoutPayload<"liveCaptions/captioningRequestStarted">;
|
|
781
977
|
declare const clearCaption: _reduxjs_toolkit.ActionCreatorWithPayload<{
|
|
782
978
|
resultId: string;
|
|
783
979
|
}, "liveCaptions/clearCaption">;
|
|
784
980
|
declare const doStartLiveCaptions: (args: void) => AppThunk;
|
|
785
981
|
declare const doStopLiveCaptions: (args: void) => AppThunk;
|
|
982
|
+
/**
|
|
983
|
+
* Selectors
|
|
984
|
+
*/
|
|
786
985
|
declare const selectLiveCaptionsRaw: (state: RootState) => LiveCaptionsState;
|
|
787
986
|
declare const selectLiveCaptionsStatus: (state: RootState) => "error" | "requested" | "captioning" | undefined;
|
|
788
987
|
declare const selectLiveCaptionsStartedAt: (state: RootState) => number | undefined;
|
|
@@ -802,6 +1001,9 @@ interface FileUpload {
|
|
|
802
1001
|
status: "uploading" | "sent" | "error";
|
|
803
1002
|
error?: FileShareError;
|
|
804
1003
|
}
|
|
1004
|
+
/**
|
|
1005
|
+
* Reducer
|
|
1006
|
+
*/
|
|
805
1007
|
interface FileShareState {
|
|
806
1008
|
uploads: FileUpload[];
|
|
807
1009
|
requestInFlight: boolean;
|
|
@@ -839,10 +1041,16 @@ declare const doSendFiles: _reduxjs_toolkit.AsyncThunk<undefined, {
|
|
|
839
1041
|
declare const doDownloadFile: _reduxjs_toolkit.AsyncThunk<Blob, {
|
|
840
1042
|
file: ChatFileShare;
|
|
841
1043
|
}, ThunkConfig>;
|
|
1044
|
+
/**
|
|
1045
|
+
* Selectors
|
|
1046
|
+
*/
|
|
842
1047
|
declare const selectFileShareRaw: (state: RootState) => FileShareState;
|
|
843
1048
|
declare const selectFileUploads: (state: RootState) => FileUpload[];
|
|
844
1049
|
declare const selectFileShareRequestInFlight: (state: RootState) => boolean;
|
|
845
1050
|
|
|
1051
|
+
/**
|
|
1052
|
+
* Reducer
|
|
1053
|
+
*/
|
|
846
1054
|
interface CloudRecordingState {
|
|
847
1055
|
isInitiator: boolean;
|
|
848
1056
|
isRecording: boolean;
|
|
@@ -860,9 +1068,15 @@ declare const cloudRecordingSlice: _reduxjs_toolkit.Slice<CloudRecordingState, {
|
|
|
860
1068
|
startedAt?: number | undefined;
|
|
861
1069
|
};
|
|
862
1070
|
}, "cloudRecording", "cloudRecording", _reduxjs_toolkit.SliceSelectors<CloudRecordingState>>;
|
|
1071
|
+
/**
|
|
1072
|
+
* Action creators
|
|
1073
|
+
*/
|
|
863
1074
|
declare const recordingRequestStarted: _reduxjs_toolkit.ActionCreatorWithoutPayload<"cloudRecording/recordingRequestStarted">;
|
|
864
1075
|
declare const doStartCloudRecording: (args: void) => AppThunk;
|
|
865
1076
|
declare const doStopCloudRecording: (args: void) => AppThunk;
|
|
1077
|
+
/**
|
|
1078
|
+
* Selectors
|
|
1079
|
+
*/
|
|
866
1080
|
declare const selectCloudRecordingRaw: (state: RootState) => CloudRecordingState;
|
|
867
1081
|
declare const selectCloudRecordingStatus: (state: RootState) => "error" | "recording" | "requested" | undefined;
|
|
868
1082
|
declare const selectCloudRecordingStartedAt: (state: RootState) => number | undefined;
|
|
@@ -890,6 +1104,11 @@ interface CameraEffectsState {
|
|
|
890
1104
|
|
|
891
1105
|
type StopFn = () => void;
|
|
892
1106
|
interface AudioDenoiserState {
|
|
1107
|
+
/**
|
|
1108
|
+
* User intent — true if the consumer asked for denoising on. Persists
|
|
1109
|
+
* across mid-flight stops triggered by device/stream switches so we can
|
|
1110
|
+
* auto-reapply after the switch settles.
|
|
1111
|
+
*/
|
|
893
1112
|
wanted: boolean;
|
|
894
1113
|
isSwitching: boolean;
|
|
895
1114
|
error?: unknown;
|
|
@@ -901,6 +1120,14 @@ interface AudioDenoiserState {
|
|
|
901
1120
|
};
|
|
902
1121
|
}
|
|
903
1122
|
|
|
1123
|
+
/**
|
|
1124
|
+
* Reducer
|
|
1125
|
+
*/
|
|
1126
|
+
/**
|
|
1127
|
+
* Whether to join with the camera and/or microphone muted. The devices are still
|
|
1128
|
+
* acquired according to `localMediaOptions` - this only decides the state we join
|
|
1129
|
+
* with. `true` means muted, an omitted key leaves that device untouched.
|
|
1130
|
+
*/
|
|
904
1131
|
type InitialMuteStates = {
|
|
905
1132
|
camera?: boolean;
|
|
906
1133
|
microphone?: boolean;
|
|
@@ -983,8 +1210,14 @@ declare const appSlice: _reduxjs_toolkit.Slice<AppState, {
|
|
|
983
1210
|
userAgent: string | null;
|
|
984
1211
|
};
|
|
985
1212
|
}, "app", "app", _reduxjs_toolkit.SliceSelectors<AppState>>;
|
|
1213
|
+
/**
|
|
1214
|
+
* Action creators
|
|
1215
|
+
*/
|
|
986
1216
|
declare const doAppStop: _reduxjs_toolkit.ActionCreatorWithoutPayload<"app/doAppStop">;
|
|
987
1217
|
declare const doAppStart: _reduxjs_toolkit.ActionCreatorWithPayload<AppConfig, "app/doAppStart">;
|
|
1218
|
+
/**
|
|
1219
|
+
* Selectors
|
|
1220
|
+
*/
|
|
988
1221
|
declare const selectAppRaw: (state: RootState) => AppState;
|
|
989
1222
|
declare const selectAppIsActive: (state: RootState) => boolean;
|
|
990
1223
|
declare const selectAppIsDialIn: (state: RootState) => boolean;
|
|
@@ -1000,6 +1233,9 @@ declare const selectAppInitialConfig: (state: RootState) => AppConfig | undefine
|
|
|
1000
1233
|
declare const selectAppInitialMuteStates: (state: RootState) => InitialMuteStates | undefined;
|
|
1001
1234
|
declare const selectAppIgnoreBreakoutGroups: (state: RootState) => boolean;
|
|
1002
1235
|
|
|
1236
|
+
/**
|
|
1237
|
+
* Reducer
|
|
1238
|
+
*/
|
|
1003
1239
|
interface AuthorizationState {
|
|
1004
1240
|
roomKey: string | null;
|
|
1005
1241
|
assistantKey?: string | null;
|
|
@@ -1013,7 +1249,13 @@ declare const authorizationSlice: _reduxjs_toolkit.Slice<AuthorizationState, {
|
|
|
1013
1249
|
roleName: RoleName;
|
|
1014
1250
|
};
|
|
1015
1251
|
}, "authorization", "authorization", _reduxjs_toolkit.SliceSelectors<AuthorizationState>>;
|
|
1252
|
+
/**
|
|
1253
|
+
* Action creators
|
|
1254
|
+
*/
|
|
1016
1255
|
declare const setRoomKey: _reduxjs_toolkit.ActionCreatorWithPayload<string | null, "authorization/setRoomKey">;
|
|
1256
|
+
/**
|
|
1257
|
+
* Selectors
|
|
1258
|
+
*/
|
|
1017
1259
|
declare const selectRoomKey: (state: RootState) => string | null;
|
|
1018
1260
|
declare const selectAssistantKey: (state: RootState) => string | null | undefined;
|
|
1019
1261
|
declare const selectAuthorizationRoleName: (state: RootState) => RoleName;
|
|
@@ -1508,11 +1750,19 @@ declare const selectIsAuthorizedToManageRoomIntegration: ((state: {
|
|
|
1508
1750
|
memoize: typeof reselect.weakMapMemoize;
|
|
1509
1751
|
};
|
|
1510
1752
|
|
|
1753
|
+
/** Seconds a breakout timer runs for when one is enabled without an explicit duration. */
|
|
1511
1754
|
declare const DEFAULT_BREAKOUT_TIMER_DURATION = 1800;
|
|
1755
|
+
/**
|
|
1756
|
+
* Reducer
|
|
1757
|
+
*/
|
|
1512
1758
|
interface BreakoutState extends BreakoutConfig {
|
|
1513
1759
|
error: string | null;
|
|
1514
1760
|
}
|
|
1515
1761
|
declare const breakoutSliceInitialState: BreakoutState;
|
|
1762
|
+
/**
|
|
1763
|
+
* Breakout groups require an SFU ("group") room. In a peer-to-peer room, moving clients in and out
|
|
1764
|
+
* of groups would tear down peer connections that never get re-established, so we refuse to start.
|
|
1765
|
+
*/
|
|
1516
1766
|
declare const BREAKOUT_UNAVAILABLE_ERROR = "Breakout groups are not available in peer-to-peer rooms";
|
|
1517
1767
|
declare const breakoutSlice: _reduxjs_toolkit.Slice<BreakoutState, {
|
|
1518
1768
|
setBreakoutError: (state: immer.WritableDraft<BreakoutState>, action: PayloadAction<{
|
|
@@ -1545,6 +1795,9 @@ declare const breakoutSlice: _reduxjs_toolkit.Slice<BreakoutState, {
|
|
|
1545
1795
|
startedAt?: (Date | null) | undefined;
|
|
1546
1796
|
};
|
|
1547
1797
|
}, "breakout", "breakout", _reduxjs_toolkit.SliceSelectors<BreakoutState>>;
|
|
1798
|
+
/**
|
|
1799
|
+
* Action creators
|
|
1800
|
+
*/
|
|
1548
1801
|
declare const setBreakoutError: _reduxjs_toolkit.ActionCreatorWithPayload<{
|
|
1549
1802
|
error: string | null;
|
|
1550
1803
|
}, "breakout/setBreakoutError">;
|
|
@@ -1584,6 +1837,9 @@ declare const doAssignBreakoutParticipants: (args: {
|
|
|
1584
1837
|
[clientId: string]: string;
|
|
1585
1838
|
};
|
|
1586
1839
|
}) => AppThunk;
|
|
1840
|
+
/**
|
|
1841
|
+
* Group helpers
|
|
1842
|
+
*/
|
|
1587
1843
|
declare const BREAKOUT_GROUPS_MIN_MAX: [number, number];
|
|
1588
1844
|
declare function defaultBreakoutGroupName(groupId: string): string;
|
|
1589
1845
|
declare function createBreakoutGroups(count?: number): {
|
|
@@ -1596,6 +1852,9 @@ declare const doExtendBreakoutTimer: (args: void | {
|
|
|
1596
1852
|
seconds?: number;
|
|
1597
1853
|
}) => AppThunk;
|
|
1598
1854
|
declare const doStopBreakoutTimer: (args: void) => AppThunk;
|
|
1855
|
+
/**
|
|
1856
|
+
* Selectors
|
|
1857
|
+
*/
|
|
1599
1858
|
declare const selectBreakoutRaw: (state: RootState) => BreakoutState;
|
|
1600
1859
|
declare const selectBreakoutError: (state: RootState) => string | null;
|
|
1601
1860
|
declare const selectBreakoutIsAvailable: (state: RootState) => boolean;
|
|
@@ -1931,6 +2190,7 @@ declare const IN_CALL_QUALITY_LEVELS: {
|
|
|
1931
2190
|
readonly WARNING: "warning";
|
|
1932
2191
|
readonly OK: "ok";
|
|
1933
2192
|
};
|
|
2193
|
+
/** @deprecated Use IN_CALL_QUALITY_LEVELS instead. */
|
|
1934
2194
|
declare const CALL_QUALITY_LEVELS: {
|
|
1935
2195
|
readonly CRITICAL: "critical";
|
|
1936
2196
|
readonly WARNING: "warning";
|
|
@@ -1970,6 +2230,9 @@ type MediaQualityScores = Record<string, {
|
|
|
1970
2230
|
video?: CallQualityLevel;
|
|
1971
2231
|
audio?: CallQualityLevel;
|
|
1972
2232
|
}>;
|
|
2233
|
+
/**
|
|
2234
|
+
* Reducer
|
|
2235
|
+
*/
|
|
1973
2236
|
interface ConnectionMonitorStart {
|
|
1974
2237
|
stopIssueSubscription: () => void;
|
|
1975
2238
|
}
|
|
@@ -2024,6 +2287,9 @@ declare const connectionMonitorSlice: _reduxjs_toolkit.Slice<ConnectionMonitorSt
|
|
|
2024
2287
|
stopCallbackFunction?: () => void;
|
|
2025
2288
|
};
|
|
2026
2289
|
}, "connectionMonitor", "connectionMonitor", _reduxjs_toolkit.SliceSelectors<ConnectionMonitorState>>;
|
|
2290
|
+
/**
|
|
2291
|
+
* Action creators
|
|
2292
|
+
*/
|
|
2027
2293
|
declare const connectionMonitorStarted: _reduxjs_toolkit.ActionCreatorWithPayload<ConnectionMonitorStart, "connectionMonitor/connectionMonitorStarted">;
|
|
2028
2294
|
declare const connectionMonitorStopped: _reduxjs_toolkit.ActionCreatorWithoutPayload<"connectionMonitor/connectionMonitorStopped">;
|
|
2029
2295
|
declare const connectionMonitorReportUpdated: _reduxjs_toolkit.ActionCreatorWithPayload<ConnectionMonitorReport, "connectionMonitor/connectionMonitorReportUpdated">;
|
|
@@ -2034,6 +2300,9 @@ declare const doUpdateConnectionMonitorReport: (args: ConnectionMonitorReport) =
|
|
|
2034
2300
|
declare const doSetRemoteCallQualityScores: (args: RemoteCallQualityScores) => AppThunk;
|
|
2035
2301
|
declare const doSetLocalCallQualityScore: (args: LocalCallQualityScore) => AppThunk;
|
|
2036
2302
|
declare const doStopConnectionMonitor: (args: void) => AppThunk;
|
|
2303
|
+
/**
|
|
2304
|
+
* Selectors
|
|
2305
|
+
*/
|
|
2037
2306
|
declare const selectConnectionMonitorIsRunning: (state: RootState) => boolean;
|
|
2038
2307
|
declare const selectStopCallbackFunction: (state: RootState) => (() => void) | undefined;
|
|
2039
2308
|
declare const selectConnectionMonitorIssuesReport: (state: RootState) => ConnectionMonitorReport | undefined;
|
|
@@ -2533,16 +2802,28 @@ declare const selectCalculatedLocalCallQualityScore: ((state: {
|
|
|
2533
2802
|
memoize: typeof reselect.weakMapMemoize;
|
|
2534
2803
|
};
|
|
2535
2804
|
|
|
2805
|
+
/**
|
|
2806
|
+
* Reducer
|
|
2807
|
+
*/
|
|
2536
2808
|
interface DeviceCredentialsState {
|
|
2537
2809
|
isFetching: boolean;
|
|
2538
2810
|
data?: Credentials | null;
|
|
2539
2811
|
}
|
|
2540
2812
|
declare const deviceCredentialsSliceInitialState: DeviceCredentialsState;
|
|
2541
2813
|
declare const deviceCredentialsSlice: _reduxjs_toolkit.Slice<DeviceCredentialsState, {}, "deviceCredentials", "deviceCredentials", _reduxjs_toolkit.SliceSelectors<DeviceCredentialsState>>;
|
|
2814
|
+
/**
|
|
2815
|
+
* Action creators
|
|
2816
|
+
*/
|
|
2542
2817
|
declare const doGetDeviceCredentials: _reduxjs_toolkit.AsyncThunk<Credentials | null | undefined, undefined, ThunkConfig>;
|
|
2818
|
+
/**
|
|
2819
|
+
* Selectors
|
|
2820
|
+
*/
|
|
2543
2821
|
declare const selectDeviceCredentialsRaw: (state: RootState) => DeviceCredentialsState;
|
|
2544
2822
|
declare const selectHasFetchedDeviceCredentials: (state: RootState) => boolean;
|
|
2545
2823
|
declare const selectDeviceId: (state: RootState) => string | undefined;
|
|
2824
|
+
/**
|
|
2825
|
+
* Reactors
|
|
2826
|
+
*/
|
|
2546
2827
|
declare const selectShouldFetchDeviceCredentials: ((state: {
|
|
2547
2828
|
app: AppState;
|
|
2548
2829
|
audioDenoiser: AudioDenoiserState;
|
|
@@ -2601,6 +2882,9 @@ type LocalMediaOptions = {
|
|
|
2601
2882
|
audio: boolean;
|
|
2602
2883
|
video: boolean;
|
|
2603
2884
|
};
|
|
2885
|
+
/**
|
|
2886
|
+
* Reducer
|
|
2887
|
+
*/
|
|
2604
2888
|
interface LocalMediaState {
|
|
2605
2889
|
beforeEffectTracks?: {
|
|
2606
2890
|
audio?: MediaStreamTrack;
|
|
@@ -3035,6 +3319,9 @@ declare const localMediaSlice: _reduxjs_toolkit.Slice<LocalMediaState, {
|
|
|
3035
3319
|
widescreenMode: boolean;
|
|
3036
3320
|
};
|
|
3037
3321
|
}, "localMedia", "localMedia", _reduxjs_toolkit.SliceSelectors<LocalMediaState>>;
|
|
3322
|
+
/**
|
|
3323
|
+
* Action creators
|
|
3324
|
+
*/
|
|
3038
3325
|
declare const deviceBusy: _reduxjs_toolkit.ActionCreatorWithPayload<{
|
|
3039
3326
|
deviceId: string;
|
|
3040
3327
|
}, "localMedia/deviceBusy">;
|
|
@@ -3070,9 +3357,16 @@ declare const setLocalMediaStream: _reduxjs_toolkit.ActionCreatorWithPayload<{
|
|
|
3070
3357
|
}, "localMedia/setLocalMediaStream">;
|
|
3071
3358
|
declare const localMediaStopped: _reduxjs_toolkit.ActionCreatorWithoutPayload<"localMedia/localMediaStopped">;
|
|
3072
3359
|
declare const localStreamMetadataUpdated: _reduxjs_toolkit.ActionCreatorWithPayload<_whereby_com_media.GetDeviceDataResult, "localMedia/localStreamMetadataUpdated">;
|
|
3073
|
-
declare const doToggleCamera: _reduxjs_toolkit.AsyncThunk<
|
|
3360
|
+
declare const doToggleCamera: _reduxjs_toolkit.AsyncThunk<{
|
|
3361
|
+
changedTracks: {
|
|
3362
|
+
track: MediaStreamTrack;
|
|
3363
|
+
oldTrack: MediaStreamTrack;
|
|
3364
|
+
}[];
|
|
3365
|
+
} | undefined, undefined, ThunkConfig>;
|
|
3366
|
+
/** @deprecated */
|
|
3074
3367
|
declare const doTriggerLocalStreamRefresh: (args: void) => AppThunk;
|
|
3075
3368
|
declare const doSetDevice: _reduxjs_toolkit.AsyncThunk<{
|
|
3369
|
+
/** @deprecated Use changedTracks */
|
|
3076
3370
|
replacedTracks: MediaStreamTrack[] | undefined;
|
|
3077
3371
|
changedTracks: {
|
|
3078
3372
|
track: MediaStreamTrack;
|
|
@@ -3086,6 +3380,7 @@ declare const doUpdateDeviceList: _reduxjs_toolkit.AsyncThunk<{
|
|
|
3086
3380
|
devices: MediaDeviceInfo[];
|
|
3087
3381
|
}, undefined, ThunkConfig>;
|
|
3088
3382
|
declare const doSwitchLocalStream: _reduxjs_toolkit.AsyncThunk<{
|
|
3383
|
+
/** @deprecated Use changedTracks */
|
|
3089
3384
|
replacedTracks: MediaStreamTrack[] | undefined;
|
|
3090
3385
|
beforeEffectTracks: {
|
|
3091
3386
|
audio?: MediaStreamTrack;
|
|
@@ -3113,6 +3408,7 @@ declare const doLocalStreamEffect: _reduxjs_toolkit.AsyncThunk<{
|
|
|
3113
3408
|
audio?: MediaStreamTrack;
|
|
3114
3409
|
video?: MediaStreamTrack;
|
|
3115
3410
|
} | undefined;
|
|
3411
|
+
/** @deprecated Use changedTracks */
|
|
3116
3412
|
replacedTracks: MediaStreamTrack[] | null;
|
|
3117
3413
|
changedTracks: {
|
|
3118
3414
|
track: MediaStreamTrack;
|
|
@@ -3123,6 +3419,9 @@ declare const doLocalStreamEffect: _reduxjs_toolkit.AsyncThunk<{
|
|
|
3123
3419
|
only: "audio" | "video";
|
|
3124
3420
|
stopBeforeTrack?: boolean;
|
|
3125
3421
|
}, ThunkConfig>;
|
|
3422
|
+
/**
|
|
3423
|
+
* Selectors
|
|
3424
|
+
*/
|
|
3126
3425
|
declare const selectBusyDeviceIds: (state: RootState) => string[];
|
|
3127
3426
|
declare const selectCameraDeviceError: (state: RootState) => unknown;
|
|
3128
3427
|
declare const selectCurrentCameraDeviceId: (state: RootState) => string | undefined;
|
|
@@ -3494,6 +3793,9 @@ declare const selectSpeakerDevices: ((state: {
|
|
|
3494
3793
|
argsMemoize: typeof reselect.weakMapMemoize;
|
|
3495
3794
|
memoize: typeof reselect.weakMapMemoize;
|
|
3496
3795
|
};
|
|
3796
|
+
/**
|
|
3797
|
+
* Reactors
|
|
3798
|
+
*/
|
|
3497
3799
|
declare const selectLocalMediaShouldStartWithOptions: ((state: {
|
|
3498
3800
|
app: AppState;
|
|
3499
3801
|
audioDenoiser: AudioDenoiserState;
|
|
@@ -3642,6 +3944,9 @@ declare const selectShouldApplyInitialMuteStates: ((state: {
|
|
|
3642
3944
|
memoize: typeof reselect.weakMapMemoize;
|
|
3643
3945
|
};
|
|
3644
3946
|
|
|
3947
|
+
/**
|
|
3948
|
+
* Reducer
|
|
3949
|
+
*/
|
|
3645
3950
|
interface OrganizationState {
|
|
3646
3951
|
data: Organization | null | undefined;
|
|
3647
3952
|
isFetching: boolean;
|
|
@@ -3649,10 +3954,19 @@ interface OrganizationState {
|
|
|
3649
3954
|
}
|
|
3650
3955
|
declare const organizationSliceInitialState: OrganizationState;
|
|
3651
3956
|
declare const organizationSlice: _reduxjs_toolkit.Slice<OrganizationState, {}, "organization", "organization", _reduxjs_toolkit.SliceSelectors<OrganizationState>>;
|
|
3957
|
+
/**
|
|
3958
|
+
* Action creators
|
|
3959
|
+
*/
|
|
3652
3960
|
declare const doOrganizationFetch: _reduxjs_toolkit.AsyncThunk<Organization, undefined, ThunkConfig>;
|
|
3961
|
+
/**
|
|
3962
|
+
* Selectors
|
|
3963
|
+
*/
|
|
3653
3964
|
declare const selectOrganizationRaw: (state: RootState) => OrganizationState;
|
|
3654
3965
|
declare const selectOrganizationId: (state: RootState) => string | undefined;
|
|
3655
3966
|
declare const selectOrganizationPreferences: (state: RootState) => OrganizationPreferences | null | undefined;
|
|
3967
|
+
/**
|
|
3968
|
+
* Reducers
|
|
3969
|
+
*/
|
|
3656
3970
|
declare const selectShouldFetchOrganization: ((state: {
|
|
3657
3971
|
app: AppState;
|
|
3658
3972
|
audioDenoiser: AudioDenoiserState;
|
|
@@ -3709,7 +4023,13 @@ interface StreamStatusUpdate {
|
|
|
3709
4023
|
state: StreamState;
|
|
3710
4024
|
}
|
|
3711
4025
|
|
|
4026
|
+
/**
|
|
4027
|
+
* State mapping utils
|
|
4028
|
+
*/
|
|
3712
4029
|
declare function createRemoteParticipant(client: SignalClient, newJoiner?: boolean): RemoteParticipant;
|
|
4030
|
+
/**
|
|
4031
|
+
* Reducer
|
|
4032
|
+
*/
|
|
3713
4033
|
interface RemoteParticipantSliceState {
|
|
3714
4034
|
remoteParticipants: RemoteParticipant[];
|
|
3715
4035
|
}
|
|
@@ -3722,6 +4042,9 @@ declare const remoteParticipantsSlice: _reduxjs_toolkit.Slice<RemoteParticipantS
|
|
|
3722
4042
|
streamId: string;
|
|
3723
4043
|
}>) => RemoteParticipantSliceState;
|
|
3724
4044
|
}, "remoteParticipants", "remoteParticipants", _reduxjs_toolkit.SliceSelectors<RemoteParticipantSliceState>>;
|
|
4045
|
+
/**
|
|
4046
|
+
* Action creators
|
|
4047
|
+
*/
|
|
3725
4048
|
declare const participantStreamAdded: _reduxjs_toolkit.ActionCreatorWithPayload<RtcStreamAddedPayload, "remoteParticipants/participantStreamAdded">;
|
|
3726
4049
|
declare const participantStreamIdAdded: _reduxjs_toolkit.ActionCreatorWithPayload<{
|
|
3727
4050
|
clientId: string;
|
|
@@ -3731,7 +4054,13 @@ declare const streamStatusUpdated: _reduxjs_toolkit.ActionCreatorWithPayload<Str
|
|
|
3731
4054
|
declare const doRequestAudioEnable: (args: AudioEnableRequest) => AppThunk;
|
|
3732
4055
|
declare const doRequestVideoEnable: (args: VideoEnableRequest) => AppThunk;
|
|
3733
4056
|
declare const doRequestScreenshareEnable: (args: ScreenshareEnableRequest) => AppThunk;
|
|
4057
|
+
/**
|
|
4058
|
+
* Selectors
|
|
4059
|
+
*/
|
|
3734
4060
|
declare const selectRemoteParticipantsRaw: (state: RootState) => RemoteParticipantSliceState;
|
|
4061
|
+
/**
|
|
4062
|
+
* This includes non human roles such as recorder.
|
|
4063
|
+
*/
|
|
3735
4064
|
declare const selectRemoteClients: (state: RootState) => RemoteParticipant[];
|
|
3736
4065
|
declare const selectRemoteParticipants: ((state: {
|
|
3737
4066
|
app: AppState;
|
|
@@ -3947,12 +4276,18 @@ type ClientView = {
|
|
|
3947
4276
|
breakoutGroupAssigned?: string;
|
|
3948
4277
|
};
|
|
3949
4278
|
|
|
4279
|
+
/**
|
|
4280
|
+
* Reducer
|
|
4281
|
+
*/
|
|
3950
4282
|
interface RoomState {
|
|
3951
4283
|
isLocked: boolean;
|
|
3952
4284
|
mode: RoomMode | null;
|
|
3953
4285
|
}
|
|
3954
4286
|
declare const roomSliceInitialState: RoomState;
|
|
3955
4287
|
declare const roomSlice: _reduxjs_toolkit.Slice<RoomState, {}, "room", "room", _reduxjs_toolkit.SliceSelectors<RoomState>>;
|
|
4288
|
+
/**
|
|
4289
|
+
* Action creators
|
|
4290
|
+
*/
|
|
3956
4291
|
declare const doLockRoom: (args: {
|
|
3957
4292
|
locked: boolean;
|
|
3958
4293
|
}) => AppThunk;
|
|
@@ -3962,6 +4297,9 @@ declare const doKickParticipant: (args: {
|
|
|
3962
4297
|
declare const doEndMeeting: (args: {
|
|
3963
4298
|
stayBehind?: boolean;
|
|
3964
4299
|
}) => AppThunk;
|
|
4300
|
+
/**
|
|
4301
|
+
* Selectors
|
|
4302
|
+
*/
|
|
3965
4303
|
declare const selectRoomIsLocked: (state: RootState) => boolean;
|
|
3966
4304
|
declare const selectRoomMode: (state: RootState) => RoomMode | null;
|
|
3967
4305
|
declare const selectScreenshares: ((state: {
|
|
@@ -5276,6 +5614,9 @@ declare const selectBreakoutGroupedParticipants: ((state: {
|
|
|
5276
5614
|
type ConnectionStatus = "ready" | "connecting" | "connected" | "room_locked" | "knocking" | "knock_on_hold" | "knock_rejected" | "kicked" | "leaving" | "left" | "disconnected" | "reconnecting";
|
|
5277
5615
|
type JoinRoomStage = "credentials" | "organization" | "local_media" | "signal_connect" | "identify_device" | "join_room";
|
|
5278
5616
|
type JoinRoomErrorNames = "organization_fetch_failed" | "join_cancelled";
|
|
5617
|
+
/**
|
|
5618
|
+
* Reducer
|
|
5619
|
+
*/
|
|
5279
5620
|
interface RoomConnectionState {
|
|
5280
5621
|
session: {
|
|
5281
5622
|
createdAt: string;
|
|
@@ -5318,6 +5659,9 @@ declare const roomRejoined: _reduxjs_toolkit.ActionCreatorWithPayload<RoomRejoin
|
|
|
5318
5659
|
declare const doKnockRoom: (args: void) => AppThunk;
|
|
5319
5660
|
declare const doCancelKnock: (args: void) => AppThunk;
|
|
5320
5661
|
declare const doConnectRoom: (args: void) => AppThunk;
|
|
5662
|
+
/**
|
|
5663
|
+
* Selectors
|
|
5664
|
+
*/
|
|
5321
5665
|
declare const selectJoinRoomStage: ((state: {
|
|
5322
5666
|
app: AppState;
|
|
5323
5667
|
audioDenoiser: AudioDenoiserState;
|
|
@@ -5367,6 +5711,9 @@ declare const selectJoinRoomStage: ((state: {
|
|
|
5367
5711
|
argsMemoize: typeof reselect.weakMapMemoize;
|
|
5368
5712
|
memoize: typeof reselect.weakMapMemoize;
|
|
5369
5713
|
};
|
|
5714
|
+
/**
|
|
5715
|
+
* Reactors
|
|
5716
|
+
*/
|
|
5370
5717
|
declare const selectShouldConnectRoom: ((state: {
|
|
5371
5718
|
app: AppState;
|
|
5372
5719
|
audioDenoiser: AudioDenoiserState;
|
|
@@ -5461,6 +5808,9 @@ interface RoomIntegrationErrorDetail {
|
|
|
5461
5808
|
message: string;
|
|
5462
5809
|
}
|
|
5463
5810
|
declare function roomIntegrationSignalError(error: string, action: string): RoomIntegrationErrorDetail;
|
|
5811
|
+
/**
|
|
5812
|
+
* Reducer
|
|
5813
|
+
*/
|
|
5464
5814
|
interface RoomIntegrationsState {
|
|
5465
5815
|
available: RoomIntegration[];
|
|
5466
5816
|
unavailable: RoomIntegration[];
|
|
@@ -5479,6 +5829,9 @@ declare const roomIntegrationsSlice: _reduxjs_toolkit.Slice<RoomIntegrationsStat
|
|
|
5479
5829
|
declare const setRoomIntegrationsError: _reduxjs_toolkit.ActionCreatorWithPayload<{
|
|
5480
5830
|
error: RoomIntegrationErrorDetail | null;
|
|
5481
5831
|
}, "roomIntegrations/setRoomIntegrationsError">;
|
|
5832
|
+
/**
|
|
5833
|
+
* Action creators
|
|
5834
|
+
*/
|
|
5482
5835
|
declare const doFetchRoomIntegrations: _reduxjs_toolkit.AsyncThunk<FindRoomIntegrationsResponse, undefined, ThunkConfig>;
|
|
5483
5836
|
declare const doStartRoomIntegration: (args: {
|
|
5484
5837
|
roomIntegrationId: string;
|
|
@@ -5509,6 +5862,9 @@ declare const doUpdateRoomIntegrationProps: (args: {
|
|
|
5509
5862
|
roomIntegrationSessionId: string;
|
|
5510
5863
|
props: RoomIntegrationProps;
|
|
5511
5864
|
}) => AppThunk;
|
|
5865
|
+
/**
|
|
5866
|
+
* Selectors
|
|
5867
|
+
*/
|
|
5512
5868
|
declare const selectRoomIntegrationsRaw: (state: RootState) => RoomIntegrationsState;
|
|
5513
5869
|
declare const selectRoomIntegrationsError: (state: RootState) => RoomIntegrationErrorDetail | null;
|
|
5514
5870
|
declare const selectRoomIntegrationsIsFetching: (state: RootState) => boolean;
|
|
@@ -6337,6 +6693,9 @@ declare const selectRoomIntegrationForUrl: ((state: {
|
|
|
6337
6693
|
argsMemoize: typeof reselect.weakMapMemoize;
|
|
6338
6694
|
memoize: typeof reselect.weakMapMemoize;
|
|
6339
6695
|
};
|
|
6696
|
+
/**
|
|
6697
|
+
* Reactors
|
|
6698
|
+
*/
|
|
6340
6699
|
declare const selectShouldFetchRoomIntegrations: ((state: {
|
|
6341
6700
|
app: AppState;
|
|
6342
6701
|
audioDenoiser: AudioDenoiserState;
|
|
@@ -6398,6 +6757,9 @@ declare const rtcEvents: {
|
|
|
6398
6757
|
declare const createWebRtcEmitter: (dispatch: AppDispatch) => {
|
|
6399
6758
|
emit: (eventName: keyof RtcEvents, data: RtcEvents[keyof RtcEvents]) => void;
|
|
6400
6759
|
};
|
|
6760
|
+
/**
|
|
6761
|
+
* Reducer
|
|
6762
|
+
*/
|
|
6401
6763
|
interface StreamResolutionUpdate {
|
|
6402
6764
|
streamId: string;
|
|
6403
6765
|
width: number;
|
|
@@ -6548,6 +6910,9 @@ declare const rtcConnectionSlice: _reduxjs_toolkit.Slice<RtcConnectionState, {
|
|
|
6548
6910
|
};
|
|
6549
6911
|
};
|
|
6550
6912
|
}, "rtcConnection", "rtcConnection", _reduxjs_toolkit.SliceSelectors<RtcConnectionState>>;
|
|
6913
|
+
/**
|
|
6914
|
+
* Action creators
|
|
6915
|
+
*/
|
|
6551
6916
|
declare const audioOnlyModeToggled: _reduxjs_toolkit.ActionCreatorWithPayload<{
|
|
6552
6917
|
enabled?: boolean;
|
|
6553
6918
|
}, "rtcConnection/audioOnlyModeToggled">;
|
|
@@ -6575,6 +6940,9 @@ interface ToggleAudioOnlyModeOptions {
|
|
|
6575
6940
|
declare const doToggleAudioOnlyMode: (args: {
|
|
6576
6941
|
enabled?: boolean;
|
|
6577
6942
|
} & ToggleAudioOnlyModeOptions) => AppThunk;
|
|
6943
|
+
/**
|
|
6944
|
+
* Selectors
|
|
6945
|
+
*/
|
|
6578
6946
|
declare const selectRtcConnectionRaw: (state: RootState) => RtcConnectionState;
|
|
6579
6947
|
declare const selectRtcManagerInitialized: (state: RootState) => boolean;
|
|
6580
6948
|
declare const selectRtcManager: (state: RootState) => RtcManager | null;
|
|
@@ -6854,6 +7222,7 @@ declare const selectStreamsToAccept: ((state: {
|
|
|
6854
7222
|
};
|
|
6855
7223
|
|
|
6856
7224
|
interface SignalDisconnectEvent {
|
|
7225
|
+
/** Whether the signal socket will try to reconnect on its own. */
|
|
6857
7226
|
willReconnect: boolean;
|
|
6858
7227
|
}
|
|
6859
7228
|
declare const signalEvents: {
|
|
@@ -6904,6 +7273,9 @@ declare const signalEvents: {
|
|
|
6904
7273
|
liveCaption: _reduxjs_toolkit.ActionCreatorWithPayload<LiveCaptionEvent, string>;
|
|
6905
7274
|
};
|
|
6906
7275
|
|
|
7276
|
+
/**
|
|
7277
|
+
* Reducer
|
|
7278
|
+
*/
|
|
6907
7279
|
interface SignalConnectionState {
|
|
6908
7280
|
deviceIdentified: boolean;
|
|
6909
7281
|
isIdentifyingDevice: boolean;
|
|
@@ -6955,16 +7327,25 @@ declare const socketConnected: _reduxjs_toolkit.ActionCreatorWithPayload<ServerS
|
|
|
6955
7327
|
declare const socketConnecting: _reduxjs_toolkit.ActionCreatorWithoutPayload<"signalConnection/socketConnecting">;
|
|
6956
7328
|
declare const socketDisconnected: _reduxjs_toolkit.ActionCreatorWithoutPayload<"signalConnection/socketDisconnected">;
|
|
6957
7329
|
declare const socketReconnecting: _reduxjs_toolkit.ActionCreatorWithoutPayload<"signalConnection/socketReconnecting">;
|
|
7330
|
+
/**
|
|
7331
|
+
* Action creators
|
|
7332
|
+
*/
|
|
6958
7333
|
declare const doSignalConnect: (args: void) => AppThunk;
|
|
6959
7334
|
declare const doSignalIdentifyDevice: (args: {
|
|
6960
7335
|
deviceCredentials: Credentials;
|
|
6961
7336
|
}) => AppThunk;
|
|
6962
7337
|
declare const doSignalDisconnect: (args: void) => AppThunk;
|
|
7338
|
+
/**
|
|
7339
|
+
* Selectors
|
|
7340
|
+
*/
|
|
6963
7341
|
declare const selectSignalConnectionRaw: (state: RootState) => SignalConnectionState;
|
|
6964
7342
|
declare const selectSignalIsIdentifyingDevice: (state: RootState) => boolean;
|
|
6965
7343
|
declare const selectSignalConnectionDeviceIdentified: (state: RootState) => boolean;
|
|
6966
7344
|
declare const selectSignalStatus: (state: RootState) => "reconnecting" | "ready" | "connecting" | "connected" | "disconnected";
|
|
6967
7345
|
declare const selectSignalConnectionSocket: (state: RootState) => ServerSocket | null;
|
|
7346
|
+
/**
|
|
7347
|
+
* Reactors
|
|
7348
|
+
*/
|
|
6968
7349
|
declare const selectShouldConnectSignal: ((state: {
|
|
6969
7350
|
app: AppState;
|
|
6970
7351
|
audioDenoiser: AudioDenoiserState;
|
|
@@ -7064,6 +7445,9 @@ declare const selectShouldIdentifyDevice: ((state: {
|
|
|
7064
7445
|
memoize: typeof reselect.weakMapMemoize;
|
|
7065
7446
|
};
|
|
7066
7447
|
|
|
7448
|
+
/**
|
|
7449
|
+
* State mapping utils
|
|
7450
|
+
*/
|
|
7067
7451
|
declare function streamIdForClient({ isPresentation, stream }: Pick<ClientView, "isPresentation" | "stream">): string | undefined;
|
|
7068
7452
|
declare function isClientSpotlighted({ spotlights, isPresentation, clientId, stream, }: {
|
|
7069
7453
|
spotlights: Spotlight[];
|
|
@@ -7071,6 +7455,9 @@ declare function isClientSpotlighted({ spotlights, isPresentation, clientId, str
|
|
|
7071
7455
|
clientId: string;
|
|
7072
7456
|
stream: ClientView["stream"];
|
|
7073
7457
|
}): boolean;
|
|
7458
|
+
/**
|
|
7459
|
+
* Reducer
|
|
7460
|
+
*/
|
|
7074
7461
|
interface SpotlightsState {
|
|
7075
7462
|
sorted: {
|
|
7076
7463
|
clientId: string;
|
|
@@ -7099,6 +7486,9 @@ declare const spotlightsSlice: _reduxjs_toolkit.Slice<SpotlightsState, {
|
|
|
7099
7486
|
}>[];
|
|
7100
7487
|
};
|
|
7101
7488
|
}, "spotlights", "spotlights", _reduxjs_toolkit.SliceSelectors<SpotlightsState>>;
|
|
7489
|
+
/**
|
|
7490
|
+
* Action creators
|
|
7491
|
+
*/
|
|
7102
7492
|
declare const addSpotlight: _reduxjs_toolkit.ActionCreatorWithPayload<{
|
|
7103
7493
|
clientId: string;
|
|
7104
7494
|
streamId: string;
|
|
@@ -7113,6 +7503,9 @@ declare const doSpotlightParticipant: (args: {
|
|
|
7113
7503
|
declare const doRemoveSpotlight: (args: {
|
|
7114
7504
|
id: string;
|
|
7115
7505
|
}) => AppThunk;
|
|
7506
|
+
/**
|
|
7507
|
+
* Selectors
|
|
7508
|
+
*/
|
|
7116
7509
|
declare const selectSpotlightsRaw: (state: RootState) => SpotlightsState;
|
|
7117
7510
|
declare const selectSpotlights: (state: RootState) => {
|
|
7118
7511
|
clientId: string;
|
|
@@ -7481,8 +7874,15 @@ declare const selectSpotlightedClientViews: ((state: {
|
|
|
7481
7874
|
memoize: typeof reselect.weakMapMemoize;
|
|
7482
7875
|
};
|
|
7483
7876
|
|
|
7877
|
+
/**
|
|
7878
|
+
* Base URL overrides for `WherebyClient` and `createServices`.
|
|
7879
|
+
*
|
|
7880
|
+
* @internal For Whereby's own development. May change without notice.
|
|
7881
|
+
*/
|
|
7484
7882
|
interface ServicesOptions {
|
|
7883
|
+
/** Base URL of the Whereby API. Defaults to the URL the SDK was built with. */
|
|
7485
7884
|
apiBaseUrl?: string;
|
|
7885
|
+
/** Base URL of the signal server. Defaults to the URL the SDK was built with. */
|
|
7486
7886
|
signalBaseUrl?: string;
|
|
7487
7887
|
}
|
|
7488
7888
|
declare function createServices({ apiBaseUrl, signalBaseUrl }?: ServicesOptions): {
|
|
@@ -7653,12 +8053,32 @@ declare const addAppListener: TypedAddListener<RootState, AppDispatch>;
|
|
|
7653
8053
|
type SelectorResults<Selectors extends Selector<RootState, unknown>[]> = {
|
|
7654
8054
|
[K in keyof Selectors]: Selectors[K] extends Selector<RootState, infer R> ? R : never;
|
|
7655
8055
|
};
|
|
8056
|
+
/**
|
|
8057
|
+
* Creates a reactor that will be called whenever the provided selectors change.
|
|
8058
|
+
* Every reactor needs to update a piece of state that it depends on, to avoid infinite loops.
|
|
8059
|
+
* example:
|
|
8060
|
+
* ```ts
|
|
8061
|
+
* createReactor(
|
|
8062
|
+
* [selectAppIsActive, selectDeviceCredentialsRaw],
|
|
8063
|
+
* ({ dispatch }, appIsActive, deviceCredentialsRaw) => {
|
|
8064
|
+
* if (appIsActive && deviceCredentialsRaw.data) {
|
|
8065
|
+
* dispatch(doSignalIdentifyDevice({ deviceCredentials: deviceCredentialsRaw.data }));
|
|
8066
|
+
* }
|
|
8067
|
+
* });
|
|
8068
|
+
* ```
|
|
8069
|
+
* @param selectors. The selectors to be used to check if the state has changed.
|
|
8070
|
+
* @param callback. The callback to be called on every action. The first argument is the listenerApi, the second argument is the result of the selectors.
|
|
8071
|
+
* @returns The unsubscribe function.
|
|
8072
|
+
*/
|
|
7656
8073
|
declare const createReactor: <Selectors extends Selector<RootState, unknown>[]>(selectors: readonly [...Selectors], callback: (api: {
|
|
7657
8074
|
dispatch: AppDispatch;
|
|
7658
8075
|
getState: () => RootState;
|
|
7659
8076
|
extra: ReturnType<typeof createServices>;
|
|
7660
8077
|
}, ...selectorValues: SelectorResults<Selectors>) => void | Promise<void>) => _reduxjs_toolkit.UnsubscribeListener;
|
|
7661
8078
|
|
|
8079
|
+
/**
|
|
8080
|
+
* Selectors
|
|
8081
|
+
*/
|
|
7662
8082
|
declare const selectLocalParticipantRaw: (state: RootState) => LocalParticipantState;
|
|
7663
8083
|
declare const selectSelfId: (state: RootState) => string;
|
|
7664
8084
|
declare const selectLocalParticipantDisplayName: (state: RootState) => string;
|
|
@@ -7716,6 +8136,9 @@ declare const selectLocalParticipantView: ((state: {
|
|
|
7716
8136
|
memoize: typeof reselect.weakMapMemoize;
|
|
7717
8137
|
};
|
|
7718
8138
|
|
|
8139
|
+
/**
|
|
8140
|
+
* Selectors
|
|
8141
|
+
*/
|
|
7719
8142
|
declare const selectRoomConnectionRaw: (state: RootState) => RoomConnectionState;
|
|
7720
8143
|
declare const selectRoomConnectionSession: (state: RootState) => {
|
|
7721
8144
|
createdAt: string;
|