Skip to content

Commit fc4edf5

Browse files
committed
add a new method and corresponding request/response types to support QA testing for the new endpoint GetOrCreateFeedGroup.
1 parent 9df1cfc commit fc4edf5

File tree

4 files changed

+441
-17
lines changed

4 files changed

+441
-17
lines changed

src/gen/common/CommonApi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ export class CommonApi {
132132
sqs_key: request?.sqs_key,
133133
sqs_secret: request?.sqs_secret,
134134
sqs_url: request?.sqs_url,
135+
user_response_time_enabled: request?.user_response_time_enabled,
135136
webhook_url: request?.webhook_url,
136137
allowed_flag_reasons: request?.allowed_flag_reasons,
137138
event_hooks: request?.event_hooks,
@@ -1379,7 +1380,6 @@ export class CommonApi {
13791380
user_id: request?.user_id,
13801381
};
13811382
const body = {
1382-
created_by_device_id: request?.created_by_device_id,
13831383
message_id: request?.message_id,
13841384
end_at: request?.end_at,
13851385
latitude: request?.latitude,

src/gen/feeds/FeedsApi.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ import {
4545
GetFeedGroupResponse,
4646
GetFeedViewResponse,
4747
GetFollowSuggestionsResponse,
48+
GetOrCreateFeedGroupRequest,
49+
GetOrCreateFeedGroupResponse,
4850
GetOrCreateFeedRequest,
4951
GetOrCreateFeedResponse,
5052
ListFeedGroupsResponse,
@@ -1044,6 +1046,35 @@ export class FeedsApi {
10441046
return { ...response.body, metadata: response.metadata };
10451047
}
10461048

1049+
async getOrCreateFeedGroup(
1050+
request: GetOrCreateFeedGroupRequest & { feed_group_id: string },
1051+
): Promise<StreamResponse<GetOrCreateFeedGroupResponse>> {
1052+
const pathParams = {
1053+
feed_group_id: request?.feed_group_id,
1054+
};
1055+
const body = {
1056+
default_view_id: request?.default_view_id,
1057+
default_visibility: request?.default_visibility,
1058+
custom: request?.custom,
1059+
notification: request?.notification,
1060+
};
1061+
1062+
const response = await this.apiClient.sendRequest<
1063+
StreamResponse<GetOrCreateFeedGroupResponse>
1064+
>(
1065+
'POST',
1066+
'/api/v2/feeds/feed_groups/{feed_group_id}',
1067+
pathParams,
1068+
undefined,
1069+
body,
1070+
'application/json',
1071+
);
1072+
1073+
decoders.GetOrCreateFeedGroupResponse?.(response.body);
1074+
1075+
return { ...response.body, metadata: response.metadata };
1076+
}
1077+
10471078
async updateFeedGroup(
10481079
request: UpdateFeedGroupRequest & { feed_group_id: string },
10491080
): Promise<StreamResponse<UpdateFeedGroupResponse>> {
@@ -1183,6 +1214,7 @@ export class FeedsApi {
11831214
mark_all_seen: request?.mark_all_seen,
11841215
user_id: request?.user_id,
11851216
mark_read: request?.mark_read,
1217+
mark_seen: request?.mark_seen,
11861218
mark_watched: request?.mark_watched,
11871219
user: request?.user,
11881220
};

src/gen/model-decoders/decoders.ts

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -917,6 +917,15 @@ decoders.CallSessionEndedEvent = (input?: Record<string, any>) => {
917917
return decode(typeMappings, input);
918918
};
919919

920+
decoders.CallSessionParticipantCountsUpdatedEvent = (
921+
input?: Record<string, any>,
922+
) => {
923+
const typeMappings: TypeMapping = {
924+
created_at: { type: 'DatetimeType', isSingle: true },
925+
};
926+
return decode(typeMappings, input);
927+
};
928+
920929
decoders.CallSessionParticipantJoinedEvent = (input?: Record<string, any>) => {
921930
const typeMappings: TypeMapping = {
922931
created_at: { type: 'DatetimeType', isSingle: true },
@@ -1944,6 +1953,8 @@ decoders.FeedResponse = (input?: Record<string, any>) => {
19441953
created_by: { type: 'UserResponse', isSingle: true },
19451954

19461955
deleted_at: { type: 'DatetimeType', isSingle: true },
1956+
1957+
own_follows: { type: 'FollowResponse', isSingle: false },
19471958
};
19481959
return decode(typeMappings, input);
19491960
};
@@ -2262,6 +2273,13 @@ decoders.GetOrCreateCallResponse = (input?: Record<string, any>) => {
22622273
return decode(typeMappings, input);
22632274
};
22642275

2276+
decoders.GetOrCreateFeedGroupResponse = (input?: Record<string, any>) => {
2277+
const typeMappings: TypeMapping = {
2278+
feed_group: { type: 'FeedGroupResponse', isSingle: true },
2279+
};
2280+
return decode(typeMappings, input);
2281+
};
2282+
22652283
decoders.GetOrCreateFeedResponse = (input?: Record<string, any>) => {
22662284
const typeMappings: TypeMapping = {
22672285
activities: { type: 'ActivityResponse', isSingle: false },
@@ -2860,6 +2878,24 @@ decoders.MuteResponse = (input?: Record<string, any>) => {
28602878
return decode(typeMappings, input);
28612879
};
28622880

2881+
decoders.NotificationFeedUpdatedEvent = (input?: Record<string, any>) => {
2882+
const typeMappings: TypeMapping = {
2883+
created_at: { type: 'DatetimeType', isSingle: true },
2884+
2885+
received_at: { type: 'DatetimeType', isSingle: true },
2886+
2887+
aggregated_activities: {
2888+
type: 'AggregatedActivityResponse',
2889+
isSingle: false,
2890+
},
2891+
2892+
notification_status: { type: 'NotificationStatusResponse', isSingle: true },
2893+
2894+
user: { type: 'UserResponseCommonFields', isSingle: true },
2895+
};
2896+
return decode(typeMappings, input);
2897+
};
2898+
28632899
decoders.NotificationMarkUnreadEvent = (input?: Record<string, any>) => {
28642900
const typeMappings: TypeMapping = {
28652901
created_at: { type: 'DatetimeType', isSingle: true },
@@ -2875,6 +2911,8 @@ decoders.NotificationMarkUnreadEvent = (input?: Record<string, any>) => {
28752911

28762912
decoders.NotificationStatusResponse = (input?: Record<string, any>) => {
28772913
const typeMappings: TypeMapping = {
2914+
last_read_at: { type: 'DatetimeType', isSingle: true },
2915+
28782916
last_seen_at: { type: 'DatetimeType', isSingle: true },
28792917
};
28802918
return decode(typeMappings, input);
@@ -3451,6 +3489,39 @@ decoders.RejectFollowResponse = (input?: Record<string, any>) => {
34513489
return decode(typeMappings, input);
34523490
};
34533491

3492+
decoders.ReminderCreatedEvent = (input?: Record<string, any>) => {
3493+
const typeMappings: TypeMapping = {
3494+
created_at: { type: 'DatetimeType', isSingle: true },
3495+
3496+
received_at: { type: 'DatetimeType', isSingle: true },
3497+
3498+
reminder: { type: 'ReminderResponseData', isSingle: true },
3499+
};
3500+
return decode(typeMappings, input);
3501+
};
3502+
3503+
decoders.ReminderDeletedEvent = (input?: Record<string, any>) => {
3504+
const typeMappings: TypeMapping = {
3505+
created_at: { type: 'DatetimeType', isSingle: true },
3506+
3507+
received_at: { type: 'DatetimeType', isSingle: true },
3508+
3509+
reminder: { type: 'ReminderResponseData', isSingle: true },
3510+
};
3511+
return decode(typeMappings, input);
3512+
};
3513+
3514+
decoders.ReminderNotificationEvent = (input?: Record<string, any>) => {
3515+
const typeMappings: TypeMapping = {
3516+
created_at: { type: 'DatetimeType', isSingle: true },
3517+
3518+
received_at: { type: 'DatetimeType', isSingle: true },
3519+
3520+
reminder: { type: 'ReminderResponseData', isSingle: true },
3521+
};
3522+
return decode(typeMappings, input);
3523+
};
3524+
34543525
decoders.ReminderResponseData = (input?: Record<string, any>) => {
34553526
const typeMappings: TypeMapping = {
34563527
created_at: { type: 'DatetimeType', isSingle: true },
@@ -3468,6 +3539,17 @@ decoders.ReminderResponseData = (input?: Record<string, any>) => {
34683539
return decode(typeMappings, input);
34693540
};
34703541

3542+
decoders.ReminderUpdatedEvent = (input?: Record<string, any>) => {
3543+
const typeMappings: TypeMapping = {
3544+
created_at: { type: 'DatetimeType', isSingle: true },
3545+
3546+
received_at: { type: 'DatetimeType', isSingle: true },
3547+
3548+
reminder: { type: 'ReminderResponseData', isSingle: true },
3549+
};
3550+
return decode(typeMappings, input);
3551+
};
3552+
34713553
decoders.ReviewQueueItemNewEvent = (input?: Record<string, any>) => {
34723554
const typeMappings: TypeMapping = {
34733555
created_at: { type: 'DatetimeType', isSingle: true },
@@ -3818,6 +3900,20 @@ decoders.UnblockedUserEvent = (input?: Record<string, any>) => {
38183900
return decode(typeMappings, input);
38193901
};
38203902

3903+
decoders.UnfollowBatchResponse = (input?: Record<string, any>) => {
3904+
const typeMappings: TypeMapping = {
3905+
follows: { type: 'FollowResponse', isSingle: false },
3906+
};
3907+
return decode(typeMappings, input);
3908+
};
3909+
3910+
decoders.UnfollowResponse = (input?: Record<string, any>) => {
3911+
const typeMappings: TypeMapping = {
3912+
follow: { type: 'FollowResponse', isSingle: true },
3913+
};
3914+
return decode(typeMappings, input);
3915+
};
3916+
38213917
decoders.UnpinActivityResponse = (input?: Record<string, any>) => {
38223918
const typeMappings: TypeMapping = {
38233919
activity: { type: 'ActivityResponse', isSingle: true },

0 commit comments

Comments
 (0)