Skip to content

Commit d38b43d

Browse files
authored
feat: update to API version 142.7.0 (#73)
1 parent 65f634f commit d38b43d

File tree

3 files changed

+23
-21
lines changed

3 files changed

+23
-21
lines changed

src/gen/chat/ChatApi.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import {
1717
DeleteChannelsResponse,
1818
DeleteCommandResponse,
1919
DeleteMessageResponse,
20+
DeleteReactionResponse,
2021
DeleteSegmentTargetsRequest,
2122
EventResponse,
2223
ExportChannelsRequest,
@@ -74,7 +75,6 @@ import {
7475
QuerySegmentsResponse,
7576
QueryThreadsRequest,
7677
QueryThreadsResponse,
77-
ReactionRemovalResponse,
7878
Response,
7979
SearchPayload,
8080
SearchResponse,
@@ -1231,7 +1231,7 @@ export class ChatApi extends BaseApi {
12311231
id: string;
12321232
type: string;
12331233
user_id?: string;
1234-
}): Promise<StreamResponse<ReactionRemovalResponse>> => {
1234+
}): Promise<StreamResponse<DeleteReactionResponse>> => {
12351235
const queryParams = {
12361236
user_id: request?.user_id,
12371237
};
@@ -1241,15 +1241,15 @@ export class ChatApi extends BaseApi {
12411241
};
12421242

12431243
const response = await this.sendRequest<
1244-
StreamResponse<ReactionRemovalResponse>
1244+
StreamResponse<DeleteReactionResponse>
12451245
>(
12461246
'DELETE',
12471247
'/api/v2/chat/messages/{id}/reaction/{type}',
12481248
pathParams,
12491249
queryParams,
12501250
);
12511251

1252-
decoders.ReactionRemovalResponse?.(response.body);
1252+
decoders.DeleteReactionResponse?.(response.body);
12531253

12541254
return { ...response.body, metadata: response.metadata };
12551255
};

src/gen/model-decoders/index.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,15 @@ decoders.DeleteMessageResponse = (input?: Record<string, any>) => {
575575
return decode(typeMappings, input);
576576
};
577577

578+
decoders.DeleteReactionResponse = (input?: Record<string, any>) => {
579+
const typeMappings: TypeMapping = {
580+
message: { type: 'MessageResponse', isSingle: true },
581+
582+
reaction: { type: 'ReactionResponse', isSingle: true },
583+
};
584+
return decode(typeMappings, input);
585+
};
586+
578587
decoders.Device = (input?: Record<string, any>) => {
579588
const typeMappings: TypeMapping = {
580589
created_at: { type: 'DatetimeType', isSingle: true },
@@ -1559,15 +1568,6 @@ decoders.ReactionGroupResponse = (input?: Record<string, any>) => {
15591568
return decode(typeMappings, input);
15601569
};
15611570

1562-
decoders.ReactionRemovalResponse = (input?: Record<string, any>) => {
1563-
const typeMappings: TypeMapping = {
1564-
message: { type: 'Message', isSingle: true },
1565-
1566-
reaction: { type: 'Reaction', isSingle: true },
1567-
};
1568-
return decode(typeMappings, input);
1569-
};
1570-
15711571
decoders.ReactionResponse = (input?: Record<string, any>) => {
15721572
const typeMappings: TypeMapping = {
15731573
created_at: { type: 'DatetimeType', isSingle: true },

src/gen/models/index.ts

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1447,6 +1447,8 @@ export interface CampaignResponse {
14471447

14481448
sender_id: string;
14491449

1450+
sender_mode: string;
1451+
14501452
skip_push: boolean;
14511453

14521454
skip_webhook: boolean;
@@ -2907,6 +2909,14 @@ export interface DeleteReactionRequest {
29072909
hard_delete?: boolean;
29082910
}
29092911

2912+
export interface DeleteReactionResponse {
2913+
duration: string;
2914+
2915+
message: MessageResponse;
2916+
2917+
reaction: ReactionResponse;
2918+
}
2919+
29102920
export interface DeleteRecordingResponse {
29112921
duration: string;
29122922
}
@@ -6521,14 +6531,6 @@ export interface ReactionNewEvent {
65216531
user?: User;
65226532
}
65236533

6524-
export interface ReactionRemovalResponse {
6525-
duration: string;
6526-
6527-
message?: Message;
6528-
6529-
reaction?: Reaction;
6530-
}
6531-
65326534
export interface ReactionRequest {
65336535
type: string;
65346536

0 commit comments

Comments
 (0)