Skip to content

Commit 24b8aa1

Browse files
committed
fix decoders
1 parent f7397ca commit 24b8aa1

File tree

2 files changed

+91
-2
lines changed

2 files changed

+91
-2
lines changed

__tests__/date-transform.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,7 @@ describe('Date conversion', () => {
6161
await call.delete();
6262
});
6363

64-
// Skipping for now, will fix in a follow up PR
65-
it.skip('channel + members', async () => {
64+
it('channel + members', async () => {
6665
const id = uuidv4();
6766
const channel = client.chat.channel('messaging', id);
6867
const response = await channel.getOrCreate({

src/gen/model-decoders/decoders.ts

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -948,6 +948,8 @@ decoders.CallResponse = (input?: Record<string, any>) => {
948948

949949
created_by: { type: 'UserResponse', isSingle: true },
950950

951+
egress: { type: 'EgressResponse', isSingle: true },
952+
951953
ended_at: { type: 'DatetimeType', isSingle: true },
952954

953955
starts_at: { type: 'DatetimeType', isSingle: true },
@@ -1578,6 +1580,13 @@ decoders.ChatActivityStatsResponse = (input?: Record<string, any>) => {
15781580
return decode(typeMappings, input);
15791581
};
15801582

1583+
decoders.CheckResponse = (input?: Record<string, any>) => {
1584+
const typeMappings: TypeMapping = {
1585+
item: { type: 'ReviewQueueItemResponse', isSingle: true },
1586+
};
1587+
return decode(typeMappings, input);
1588+
};
1589+
15811590
decoders.ClosedCaptionEvent = (input?: Record<string, any>) => {
15821591
const typeMappings: TypeMapping = {
15831592
created_at: { type: 'DatetimeType', isSingle: true },
@@ -1986,6 +1995,13 @@ decoders.EgressRTMPResponse = (input?: Record<string, any>) => {
19861995
return decode(typeMappings, input);
19871996
};
19881997

1998+
decoders.EgressResponse = (input?: Record<string, any>) => {
1999+
const typeMappings: TypeMapping = {
2000+
rtmps: { type: 'EgressRTMPResponse', isSingle: false },
2001+
};
2002+
return decode(typeMappings, input);
2003+
};
2004+
19892005
decoders.EnrichedCollection = (input?: Record<string, any>) => {
19902006
const typeMappings: TypeMapping = {
19912007
created_at: { type: 'DatetimeType', isSingle: true },
@@ -2502,12 +2518,16 @@ decoders.GetCallParticipantSessionMetricsResponse = (
25022518
) => {
25032519
const typeMappings: TypeMapping = {
25042520
joined_at: { type: 'DatetimeType', isSingle: true },
2521+
2522+
published_tracks: { type: 'PublishedTrackMetrics', isSingle: false },
25052523
};
25062524
return decode(typeMappings, input);
25072525
};
25082526

25092527
decoders.GetCallReportResponse = (input?: Record<string, any>) => {
25102528
const typeMappings: TypeMapping = {
2529+
report: { type: 'ReportResponse', isSingle: true },
2530+
25112531
video_reactions: { type: 'VideoReactionsResponse', isSingle: false },
25122532

25132533
chat_activity: { type: 'ChatActivityStatsResponse', isSingle: true },
@@ -2526,6 +2546,15 @@ decoders.GetCallResponse = (input?: Record<string, any>) => {
25262546
return decode(typeMappings, input);
25272547
};
25282548

2549+
decoders.GetCallSessionParticipantStatsDetailsResponse = (
2550+
input?: Record<string, any>,
2551+
) => {
2552+
const typeMappings: TypeMapping = {
2553+
timeframe: { type: 'ParticipantSeriesTimeframe', isSingle: true },
2554+
};
2555+
return decode(typeMappings, input);
2556+
};
2557+
25292558
decoders.GetCallTypeResponse = (input?: Record<string, any>) => {
25302559
const typeMappings: TypeMapping = {
25312560
created_at: { type: 'DatetimeType', isSingle: true },
@@ -2535,6 +2564,13 @@ decoders.GetCallTypeResponse = (input?: Record<string, any>) => {
25352564
return decode(typeMappings, input);
25362565
};
25372566

2567+
decoders.GetCampaignResponse = (input?: Record<string, any>) => {
2568+
const typeMappings: TypeMapping = {
2569+
campaign: { type: 'CampaignResponse', isSingle: true },
2570+
};
2571+
return decode(typeMappings, input);
2572+
};
2573+
25382574
decoders.GetChannelTypeResponse = (input?: Record<string, any>) => {
25392575
const typeMappings: TypeMapping = {
25402576
created_at: { type: 'DatetimeType', isSingle: true },
@@ -3495,6 +3531,16 @@ decoders.ParticipantCountOverTimeResponse = (input?: Record<string, any>) => {
34953531
return decode(typeMappings, input);
34963532
};
34973533

3534+
decoders.ParticipantReportResponse = (input?: Record<string, any>) => {
3535+
const typeMappings: TypeMapping = {
3536+
count_over_time: {
3537+
type: 'ParticipantCountOverTimeResponse',
3538+
isSingle: true,
3539+
},
3540+
};
3541+
return decode(typeMappings, input);
3542+
};
3543+
34983544
decoders.ParticipantSeriesTimeframe = (input?: Record<string, any>) => {
34993545
const typeMappings: TypeMapping = {
35003546
since: { type: 'DatetimeType', isSingle: true },
@@ -3606,6 +3652,13 @@ decoders.PollVotesResponse = (input?: Record<string, any>) => {
36063652
return decode(typeMappings, input);
36073653
};
36083654

3655+
decoders.PublishedTrackMetrics = (input?: Record<string, any>) => {
3656+
const typeMappings: TypeMapping = {
3657+
warnings: { type: 'SessionWarningResponse', isSingle: false },
3658+
};
3659+
return decode(typeMappings, input);
3660+
};
3661+
36093662
decoders.PushNotificationFields = (input?: Record<string, any>) => {
36103663
const typeMappings: TypeMapping = {
36113664
providers: { type: 'PushProvider', isSingle: false },
@@ -3801,6 +3854,13 @@ decoders.QueryCampaignsResponse = (input?: Record<string, any>) => {
38013854
return decode(typeMappings, input);
38023855
};
38033856

3857+
decoders.QueryChannelsResponse = (input?: Record<string, any>) => {
3858+
const typeMappings: TypeMapping = {
3859+
channels: { type: 'ChannelStateResponseFields', isSingle: false },
3860+
};
3861+
return decode(typeMappings, input);
3862+
};
3863+
38043864
decoders.QueryCollectionsResponse = (input?: Record<string, any>) => {
38053865
const typeMappings: TypeMapping = {
38063866
collections: { type: 'CollectionResponse', isSingle: false },
@@ -3952,6 +4012,13 @@ decoders.QueryRemindersResponse = (input?: Record<string, any>) => {
39524012
return decode(typeMappings, input);
39534013
};
39544014

4015+
decoders.QueryReviewQueueResponse = (input?: Record<string, any>) => {
4016+
const typeMappings: TypeMapping = {
4017+
items: { type: 'ReviewQueueItemResponse', isSingle: false },
4018+
};
4019+
return decode(typeMappings, input);
4020+
};
4021+
39554022
decoders.QuerySegmentTargetsResponse = (input?: Record<string, any>) => {
39564023
const typeMappings: TypeMapping = {
39574024
targets: { type: 'SegmentTargetResponse', isSingle: false },
@@ -4184,6 +4251,15 @@ decoders.RemoveUserGroupMembersResponse = (input?: Record<string, any>) => {
41844251
return decode(typeMappings, input);
41854252
};
41864253

4254+
decoders.ReportResponse = (input?: Record<string, any>) => {
4255+
const typeMappings: TypeMapping = {
4256+
call: { type: 'CallReportResponse', isSingle: true },
4257+
4258+
participants: { type: 'ParticipantReportResponse', isSingle: true },
4259+
};
4260+
return decode(typeMappings, input);
4261+
};
4262+
41874263
decoders.ResolveSipInboundResponse = (input?: Record<string, any>) => {
41884264
const typeMappings: TypeMapping = {
41894265
sip_routing_rule: { type: 'SIPInboundRoutingRuleResponse', isSingle: true },
@@ -4319,6 +4395,13 @@ decoders.SIPTrunkResponse = (input?: Record<string, any>) => {
43194395
return decode(typeMappings, input);
43204396
};
43214397

4398+
decoders.SearchResponse = (input?: Record<string, any>) => {
4399+
const typeMappings: TypeMapping = {
4400+
results: { type: 'SearchResult', isSingle: false },
4401+
};
4402+
return decode(typeMappings, input);
4403+
};
4404+
43224405
decoders.SearchResult = (input?: Record<string, any>) => {
43234406
const typeMappings: TypeMapping = {
43244407
message: { type: 'SearchResultMessage', isSingle: true },
@@ -4484,6 +4567,13 @@ decoders.SingleFollowResponse = (input?: Record<string, any>) => {
44844567
return decode(typeMappings, input);
44854568
};
44864569

4570+
decoders.StartCampaignResponse = (input?: Record<string, any>) => {
4571+
const typeMappings: TypeMapping = {
4572+
campaign: { type: 'CampaignResponse', isSingle: true },
4573+
};
4574+
return decode(typeMappings, input);
4575+
};
4576+
44874577
decoders.StopLiveResponse = (input?: Record<string, any>) => {
44884578
const typeMappings: TypeMapping = {
44894579
call: { type: 'CallResponse', isSingle: true },

0 commit comments

Comments
 (0)