Skip to content

Commit dd442f0

Browse files
authored
feat: update to v171.1.7 (#107)
1 parent 859db1d commit dd442f0

File tree

7 files changed

+339
-368
lines changed

7 files changed

+339
-368
lines changed

__tests__/call.test.ts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -134,20 +134,6 @@ describe('call API', () => {
134134
expect(response.calls).toBeDefined();
135135
});
136136

137-
it('query call stats', async () => {
138-
const response = await client.video.queryCallStats();
139-
140-
expect(response.reports.length).toBeGreaterThan(0);
141-
142-
await expect(() =>
143-
call.getCallStats({
144-
session: '<session id>',
145-
}),
146-
).rejects.toThrowError(
147-
`Stream error code 16: GetCallStats failed with error: "call session not found"`,
148-
);
149-
});
150-
151137
it('query call stats - single call', async () => {
152138
const response = await client.video.queryCallStats({
153139
filter_conditions: { call_cid: call.cid },

src/gen/chat/ChannelApi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ export class ChannelApi {
199199
};
200200

201201
updateMemberPartial = (
202-
request: UpdateMemberPartialRequest & { user_id: string },
202+
request?: UpdateMemberPartialRequest & { user_id?: string },
203203
): Promise<StreamResponse<UpdateMemberPartialResponse>> => {
204204
if (!this.id) {
205205
throw new Error(

src/gen/chat/ChatApi.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -601,13 +601,15 @@ export class ChatApi extends BaseApi {
601601

602602
updateMemberPartial = async (
603603
request: UpdateMemberPartialRequest & {
604-
user_id: string;
605604
type: string;
606605
id: string;
606+
user_id?: string;
607607
},
608608
): Promise<StreamResponse<UpdateMemberPartialResponse>> => {
609-
const pathParams = {
609+
const queryParams = {
610610
user_id: request?.user_id,
611+
};
612+
const pathParams = {
611613
type: request?.type,
612614
id: request?.id,
613615
};
@@ -620,9 +622,9 @@ export class ChatApi extends BaseApi {
620622
StreamResponse<UpdateMemberPartialResponse>
621623
>(
622624
'PATCH',
623-
'/api/v2/chat/channels/{type}/{id}/member/{user_id}',
625+
'/api/v2/chat/channels/{type}/{id}/member',
624626
pathParams,
625-
undefined,
627+
queryParams,
626628
body,
627629
);
628630

@@ -2083,6 +2085,8 @@ export class ChatApi extends BaseApi {
20832085
prev: request?.prev,
20842086
reply_limit: request?.reply_limit,
20852087
user_id: request?.user_id,
2088+
sort: request?.sort,
2089+
filter: request?.filter,
20862090
user: request?.user,
20872091
};
20882092

src/gen/model-decoders/index.ts

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,13 @@ decoders.ChannelTypeConfig = (input?: Record<string, any>) => {
484484
return decode(typeMappings, input);
485485
};
486486

487+
decoders.ChatActivityStatsResponse = (input?: Record<string, any>) => {
488+
const typeMappings: TypeMapping = {
489+
messages: { type: 'MessageStatsResponse', isSingle: true },
490+
};
491+
return decode(typeMappings, input);
492+
};
493+
487494
decoders.CheckResponse = (input?: Record<string, any>) => {
488495
const typeMappings: TypeMapping = {
489496
item: { type: 'ReviewQueueItem', isSingle: true },
@@ -509,6 +516,13 @@ decoders.ConfigResponse = (input?: Record<string, any>) => {
509516
return decode(typeMappings, input);
510517
};
511518

519+
decoders.CountByMinuteResponse = (input?: Record<string, any>) => {
520+
const typeMappings: TypeMapping = {
521+
start_ts: { type: 'DatetimeType', isSingle: true },
522+
};
523+
return decode(typeMappings, input);
524+
};
525+
512526
decoders.CreateBlockListResponse = (input?: Record<string, any>) => {
513527
const typeMappings: TypeMapping = {
514528
blocklist: { type: 'BlockListResponse', isSingle: true },
@@ -785,6 +799,13 @@ decoders.GetBlockedUsersResponse = (input?: Record<string, any>) => {
785799
return decode(typeMappings, input);
786800
};
787801

802+
decoders.GetCallReportResponse = (input?: Record<string, any>) => {
803+
const typeMappings: TypeMapping = {
804+
chat_activity: { type: 'ChatActivityStatsResponse', isSingle: true },
805+
};
806+
return decode(typeMappings, input);
807+
};
808+
788809
decoders.GetCallResponse = (input?: Record<string, any>) => {
789810
const typeMappings: TypeMapping = {
790811
members: { type: 'MemberResponse', isSingle: false },
@@ -883,8 +904,6 @@ decoders.GetRepliesResponse = (input?: Record<string, any>) => {
883904

884905
decoders.GetReviewQueueItemResponse = (input?: Record<string, any>) => {
885906
const typeMappings: TypeMapping = {
886-
history: { type: 'ReviewQueueItemResponse', isSingle: false },
887-
888907
item: { type: 'ReviewQueueItemResponse', isSingle: true },
889908
};
890909
return decode(typeMappings, input);
@@ -1163,6 +1182,13 @@ decoders.MessageResponse = (input?: Record<string, any>) => {
11631182
return decode(typeMappings, input);
11641183
};
11651184

1185+
decoders.MessageStatsResponse = (input?: Record<string, any>) => {
1186+
const typeMappings: TypeMapping = {
1187+
count_over_time: { type: 'CountByMinuteResponse', isSingle: false },
1188+
};
1189+
return decode(typeMappings, input);
1190+
};
1191+
11661192
decoders.MessageWithChannelResponse = (input?: Record<string, any>) => {
11671193
const typeMappings: TypeMapping = {
11681194
created_at: { type: 'DatetimeType', isSingle: true },
@@ -1272,6 +1298,20 @@ decoders.OwnUserResponse = (input?: Record<string, any>) => {
12721298
return decode(typeMappings, input);
12731299
};
12741300

1301+
decoders.ParticipantCountByMinuteResponse = (input?: Record<string, any>) => {
1302+
const typeMappings: TypeMapping = {
1303+
start_ts: { type: 'DatetimeType', isSingle: true },
1304+
};
1305+
return decode(typeMappings, input);
1306+
};
1307+
1308+
decoders.ParticipantCountOverTimeResponse = (input?: Record<string, any>) => {
1309+
const typeMappings: TypeMapping = {
1310+
by_minute: { type: 'ParticipantCountByMinuteResponse', isSingle: false },
1311+
};
1312+
return decode(typeMappings, input);
1313+
};
1314+
12751315
decoders.PendingMessageResponse = (input?: Record<string, any>) => {
12761316
const typeMappings: TypeMapping = {
12771317
channel: { type: 'ChannelResponse', isSingle: true },
@@ -1413,6 +1453,17 @@ decoders.QueryCallMembersResponse = (input?: Record<string, any>) => {
14131453
return decode(typeMappings, input);
14141454
};
14151455

1456+
decoders.QueryCallParticipantsResponse = (input?: Record<string, any>) => {
1457+
const typeMappings: TypeMapping = {
1458+
members: { type: 'MemberResponse', isSingle: false },
1459+
1460+
participants: { type: 'CallParticipantResponse', isSingle: false },
1461+
1462+
call: { type: 'CallResponse', isSingle: true },
1463+
};
1464+
return decode(typeMappings, input);
1465+
};
1466+
14161467
decoders.QueryCallStatsResponse = (input?: Record<string, any>) => {
14171468
const typeMappings: TypeMapping = {
14181469
reports: { type: 'CallStatsReportSummaryResponse', isSingle: false },

0 commit comments

Comments
 (0)