@stream-io/video-client 0.0.27 → 0.0.28

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.
@@ -1,11 +1,11 @@
1
1
  import { SfuEventKinds, SfuEventListener } from './rtc';
2
2
  import { TrackType } from './gen/video/sfu/models/models';
3
3
  import { CallState } from './store';
4
- import { AcceptCallResponse, BlockUserResponse, EndCallResponse, GetCallResponse, GetOrCreateCallRequest, GetOrCreateCallResponse, GoLiveResponse, ListRecordingsResponse, MuteUsersResponse, QueryMembersRequest, QueryMembersResponse, RejectCallResponse, RequestPermissionRequest, RequestPermissionResponse, SendEventRequest, SendEventResponse, SendReactionRequest, SendReactionResponse, StartBroadcastingResponse, StartRecordingResponse, StopBroadcastingResponse, StopLiveResponse, StopRecordingResponse, UnblockUserResponse, UpdateCallMembersRequest, UpdateCallMembersResponse, UpdateCallRequest, UpdateCallResponse, UpdateUserPermissionsRequest, UpdateUserPermissionsResponse } from './gen/coordinator';
4
+ import { AcceptCallResponse, BlockUserResponse, EndCallResponse, GetCallResponse, GetOrCreateCallRequest, GetOrCreateCallResponse, GoLiveResponse, ListRecordingsResponse, MuteUsersResponse, QueryMembersRequest, QueryMembersResponse, RejectCallResponse, RequestPermissionRequest, RequestPermissionResponse, SendEventResponse, SendReactionRequest, SendReactionResponse, StartBroadcastingResponse, StartRecordingResponse, StopBroadcastingResponse, StopLiveResponse, StopRecordingResponse, UnblockUserResponse, UpdateCallMembersRequest, UpdateCallMembersResponse, UpdateCallRequest, UpdateCallResponse, UpdateUserPermissionsRequest, UpdateUserPermissionsResponse } from './gen/coordinator';
5
5
  import { CallConstructor, CallLeaveOptions, DebounceType, JoinCallData, PublishOptions, SubscriptionChanges } from './types';
6
6
  import { ViewportTracker } from './helpers/ViewportTracker';
7
7
  import { PermissionsContext } from './permissions';
8
- import { CallEventHandler, CallEventTypes, Logger, StreamCallEvent } from './coordinator/connection/types';
8
+ import { CallEventHandler, CallEventTypes, Logger } from './coordinator/connection/types';
9
9
  /**
10
10
  * An object representation of a `Call`.
11
11
  */
@@ -432,11 +432,11 @@ export declare class Call {
432
432
  */
433
433
  queryRecordings: (callSessionId?: string) => Promise<ListRecordingsResponse>;
434
434
  /**
435
- * Sends an event to all call participants.
435
+ * Sends a custom event to all call participants.
436
436
  *
437
437
  * @param event the event to send.
438
438
  */
439
- sendEvent: (event: SendEventRequest & {
440
- type: StreamCallEvent['type'];
439
+ sendCustomEvent: (payload: {
440
+ [key: string]: any;
441
441
  }) => Promise<SendEventResponse>;
442
442
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stream-io/video-client",
3
- "version": "0.0.27",
3
+ "version": "0.0.28",
4
4
  "packageManager": "yarn@3.2.4",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.es.js",
package/src/Call.ts CHANGED
@@ -1605,16 +1605,14 @@ export class Call {
1605
1605
  };
1606
1606
 
1607
1607
  /**
1608
- * Sends an event to all call participants.
1608
+ * Sends a custom event to all call participants.
1609
1609
  *
1610
1610
  * @param event the event to send.
1611
1611
  */
1612
- sendEvent = async (
1613
- event: SendEventRequest & { type: StreamCallEvent['type'] },
1614
- ) => {
1612
+ sendCustomEvent = async (payload: { [key: string]: any }) => {
1615
1613
  return this.streamClient.post<SendEventResponse, SendEventRequest>(
1616
1614
  `${this.streamClientBasePath}/event`,
1617
- event,
1615
+ { custom: payload },
1618
1616
  );
1619
1617
  };
1620
1618
  }