Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Aggregate stats reports - request and response objects #1614

Merged
merged 9 commits into from
Dec 10, 2024
17 changes: 17 additions & 0 deletions packages/client/src/StreamVideoClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import type {
CreateGuestResponse,
GetEdgesResponse,
ListDevicesResponse,
QueryAggregateCallStatsRequest,
QueryAggregateCallStatsResponse,
QueryCallsRequest,
QueryCallsResponse,
QueryCallStatsRequest,
Expand Down Expand Up @@ -439,6 +441,21 @@ export class StreamVideoClient {
>(`/call/stats`, data);
};

/**
* Retrieve the list of available reports aggregated from the call stats.
*
* @param data Specify filter conditions like from and to (within last 30 days) and the report types
* @returns Requested reports with (mostly) raw daily data for each report type requested
*/
queryAggregateCallStats = async (
data: QueryAggregateCallStatsRequest = {},
) => {
return this.streamClient.post<
QueryAggregateCallStatsResponse,
QueryAggregateCallStatsRequest
>(`/stats`, data);
};

/**
* Returns a list of available data centers available for hosting calls.
*/
Expand Down
Loading
Loading