Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions __tests__/call.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,20 +134,6 @@ describe('call API', () => {
expect(response.calls).toBeDefined();
});

it('query call stats', async () => {
const response = await client.video.queryCallStats();

expect(response.reports.length).toBeGreaterThan(0);

await expect(() =>
call.getCallStats({
session: '<session id>',
}),
).rejects.toThrowError(
`Stream error code 16: GetCallStats failed with error: "call session not found"`,
);
});

it('query call stats - single call', async () => {
const response = await client.video.queryCallStats({
filter_conditions: { call_cid: call.cid },
Expand Down
2 changes: 1 addition & 1 deletion src/gen/chat/ChannelApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ export class ChannelApi {
};

updateMemberPartial = (
request: UpdateMemberPartialRequest & { user_id: string },
request?: UpdateMemberPartialRequest & { user_id?: string },
): Promise<StreamResponse<UpdateMemberPartialResponse>> => {
if (!this.id) {
throw new Error(
Expand Down
12 changes: 8 additions & 4 deletions src/gen/chat/ChatApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -601,13 +601,15 @@ export class ChatApi extends BaseApi {

updateMemberPartial = async (
request: UpdateMemberPartialRequest & {
user_id: string;
type: string;
id: string;
user_id?: string;
},
): Promise<StreamResponse<UpdateMemberPartialResponse>> => {
const pathParams = {
const queryParams = {
user_id: request?.user_id,
};
const pathParams = {
type: request?.type,
id: request?.id,
};
Expand All @@ -620,9 +622,9 @@ export class ChatApi extends BaseApi {
StreamResponse<UpdateMemberPartialResponse>
>(
'PATCH',
'/api/v2/chat/channels/{type}/{id}/member/{user_id}',
'/api/v2/chat/channels/{type}/{id}/member',
pathParams,
undefined,
queryParams,
body,
);

Expand Down Expand Up @@ -2083,6 +2085,8 @@ export class ChatApi extends BaseApi {
prev: request?.prev,
reply_limit: request?.reply_limit,
user_id: request?.user_id,
sort: request?.sort,
filter: request?.filter,
user: request?.user,
};

Expand Down
55 changes: 53 additions & 2 deletions src/gen/model-decoders/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,13 @@ decoders.ChannelTypeConfig = (input?: Record<string, any>) => {
return decode(typeMappings, input);
};

decoders.ChatActivityStatsResponse = (input?: Record<string, any>) => {
const typeMappings: TypeMapping = {
messages: { type: 'MessageStatsResponse', isSingle: true },
};
return decode(typeMappings, input);
};

decoders.CheckResponse = (input?: Record<string, any>) => {
const typeMappings: TypeMapping = {
item: { type: 'ReviewQueueItem', isSingle: true },
Expand All @@ -509,6 +516,13 @@ decoders.ConfigResponse = (input?: Record<string, any>) => {
return decode(typeMappings, input);
};

decoders.CountByMinuteResponse = (input?: Record<string, any>) => {
const typeMappings: TypeMapping = {
start_ts: { type: 'DatetimeType', isSingle: true },
};
return decode(typeMappings, input);
};

decoders.CreateBlockListResponse = (input?: Record<string, any>) => {
const typeMappings: TypeMapping = {
blocklist: { type: 'BlockListResponse', isSingle: true },
Expand Down Expand Up @@ -785,6 +799,13 @@ decoders.GetBlockedUsersResponse = (input?: Record<string, any>) => {
return decode(typeMappings, input);
};

decoders.GetCallReportResponse = (input?: Record<string, any>) => {
const typeMappings: TypeMapping = {
chat_activity: { type: 'ChatActivityStatsResponse', isSingle: true },
};
return decode(typeMappings, input);
};

decoders.GetCallResponse = (input?: Record<string, any>) => {
const typeMappings: TypeMapping = {
members: { type: 'MemberResponse', isSingle: false },
Expand Down Expand Up @@ -883,8 +904,6 @@ decoders.GetRepliesResponse = (input?: Record<string, any>) => {

decoders.GetReviewQueueItemResponse = (input?: Record<string, any>) => {
const typeMappings: TypeMapping = {
history: { type: 'ReviewQueueItemResponse', isSingle: false },

item: { type: 'ReviewQueueItemResponse', isSingle: true },
};
return decode(typeMappings, input);
Expand Down Expand Up @@ -1163,6 +1182,13 @@ decoders.MessageResponse = (input?: Record<string, any>) => {
return decode(typeMappings, input);
};

decoders.MessageStatsResponse = (input?: Record<string, any>) => {
const typeMappings: TypeMapping = {
count_over_time: { type: 'CountByMinuteResponse', isSingle: false },
};
return decode(typeMappings, input);
};

decoders.MessageWithChannelResponse = (input?: Record<string, any>) => {
const typeMappings: TypeMapping = {
created_at: { type: 'DatetimeType', isSingle: true },
Expand Down Expand Up @@ -1272,6 +1298,20 @@ decoders.OwnUserResponse = (input?: Record<string, any>) => {
return decode(typeMappings, input);
};

decoders.ParticipantCountByMinuteResponse = (input?: Record<string, any>) => {
const typeMappings: TypeMapping = {
start_ts: { type: 'DatetimeType', isSingle: true },
};
return decode(typeMappings, input);
};

decoders.ParticipantCountOverTimeResponse = (input?: Record<string, any>) => {
const typeMappings: TypeMapping = {
by_minute: { type: 'ParticipantCountByMinuteResponse', isSingle: false },
};
return decode(typeMappings, input);
};

decoders.PendingMessageResponse = (input?: Record<string, any>) => {
const typeMappings: TypeMapping = {
channel: { type: 'ChannelResponse', isSingle: true },
Expand Down Expand Up @@ -1413,6 +1453,17 @@ decoders.QueryCallMembersResponse = (input?: Record<string, any>) => {
return decode(typeMappings, input);
};

decoders.QueryCallParticipantsResponse = (input?: Record<string, any>) => {
const typeMappings: TypeMapping = {
members: { type: 'MemberResponse', isSingle: false },

participants: { type: 'CallParticipantResponse', isSingle: false },

call: { type: 'CallResponse', isSingle: true },
};
return decode(typeMappings, input);
};

decoders.QueryCallStatsResponse = (input?: Record<string, any>) => {
const typeMappings: TypeMapping = {
reports: { type: 'CallStatsReportSummaryResponse', isSingle: false },
Expand Down
Loading
Loading