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
24 changes: 14 additions & 10 deletions src/gen/chat/ChatApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import {
MarkUnreadRequest,
MembersResponse,
MessageActionRequest,
MessageResponse,
MessageActionResponse,
MuteChannelRequest,
MuteChannelResponse,
PollVoteResponse,
Expand Down Expand Up @@ -961,6 +961,7 @@ export class ChatApi {
partition_size: request?.partition_size,
partition_ttl: request?.partition_ttl,
polls: request?.polls,
push_level: request?.push_level,
push_notifications: request?.push_notifications,
reactions: request?.reactions,
read_events: request?.read_events,
Expand Down Expand Up @@ -1051,6 +1052,7 @@ export class ChatApi {
partition_size: request?.partition_size,
partition_ttl: request?.partition_ttl,
polls: request?.polls,
push_level: request?.push_level,
push_notifications: request?.push_notifications,
quotes: request?.quotes,
reactions: request?.reactions,
Expand Down Expand Up @@ -1365,6 +1367,7 @@ export class ChatApi {
};
const body = {
skip_enrich_url: request?.skip_enrich_url,
skip_push: request?.skip_push,
user_id: request?.user_id,
unset: request?.unset,
set: request?.set,
Expand All @@ -1389,7 +1392,7 @@ export class ChatApi {

async runMessageAction(
request: MessageActionRequest & { id: string },
): Promise<StreamResponse<MessageResponse>> {
): Promise<StreamResponse<MessageActionResponse>> {
const pathParams = {
id: request?.id,
};
Expand All @@ -1400,7 +1403,7 @@ export class ChatApi {
};

const response = await this.apiClient.sendRequest<
StreamResponse<MessageResponse>
StreamResponse<MessageActionResponse>
>(
'POST',
'/api/v2/chat/messages/{id}/action',
Expand All @@ -1410,21 +1413,21 @@ export class ChatApi {
'application/json',
);

decoders.MessageResponse?.(response.body);
decoders.MessageActionResponse?.(response.body);

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

async commitMessage(
request: CommitMessageRequest & { id: string },
): Promise<StreamResponse<MessageResponse>> {
): Promise<StreamResponse<MessageActionResponse>> {
const pathParams = {
id: request?.id,
};
const body = {};

const response = await this.apiClient.sendRequest<
StreamResponse<MessageResponse>
StreamResponse<MessageActionResponse>
>(
'POST',
'/api/v2/chat/messages/{id}/commit',
Expand All @@ -1434,7 +1437,7 @@ export class ChatApi {
'application/json',
);

decoders.MessageResponse?.(response.body);
decoders.MessageActionResponse?.(response.body);

return { ...response.body, metadata: response.metadata };
}
Expand All @@ -1447,6 +1450,7 @@ export class ChatApi {
};
const body = {
skip_enrich_url: request?.skip_enrich_url,
skip_push: request?.skip_push,
user_id: request?.user_id,
unset: request?.unset,
set: request?.set,
Expand Down Expand Up @@ -1580,7 +1584,7 @@ export class ChatApi {

async translateMessage(
request: TranslateMessageRequest & { id: string },
): Promise<StreamResponse<MessageResponse>> {
): Promise<StreamResponse<MessageActionResponse>> {
const pathParams = {
id: request?.id,
};
Expand All @@ -1589,7 +1593,7 @@ export class ChatApi {
};

const response = await this.apiClient.sendRequest<
StreamResponse<MessageResponse>
StreamResponse<MessageActionResponse>
>(
'POST',
'/api/v2/chat/messages/{id}/translate',
Expand All @@ -1599,7 +1603,7 @@ export class ChatApi {
'application/json',
);

decoders.MessageResponse?.(response.body);
decoders.MessageActionResponse?.(response.body);

return { ...response.body, metadata: response.metadata };
}
Expand Down
36 changes: 36 additions & 0 deletions src/gen/feeds/FeedsApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ import {
UnfollowBatchResponse,
UnfollowResponse,
UnpinActivityResponse,
UpdateActivitiesPartialBatchRequest,
UpdateActivitiesPartialBatchResponse,
UpdateActivityPartialRequest,
UpdateActivityPartialResponse,
UpdateActivityRequest,
Expand Down Expand Up @@ -150,6 +152,7 @@ export class FeedsApi {
const body = {
type: request?.type,
feeds: request?.feeds,
copy_custom_to_notification: request?.copy_custom_to_notification,
create_notification_activity: request?.create_notification_activity,
expires_at: request?.expires_at,
id: request?.id,
Expand Down Expand Up @@ -211,6 +214,29 @@ export class FeedsApi {
return { ...response.body, metadata: response.metadata };
}

async updateActivitiesPartialBatch(
request: UpdateActivitiesPartialBatchRequest,
): Promise<StreamResponse<UpdateActivitiesPartialBatchResponse>> {
const body = {
changes: request?.changes,
};

const response = await this.apiClient.sendRequest<
StreamResponse<UpdateActivitiesPartialBatchResponse>
>(
'PATCH',
'/api/v2/feeds/activities/batch/partial',
undefined,
undefined,
body,
'application/json',
);

decoders.UpdateActivitiesPartialBatchResponse?.(response.body);

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

async deleteActivities(
request: DeleteActivitiesRequest,
): Promise<StreamResponse<DeleteActivitiesResponse>> {
Expand Down Expand Up @@ -452,6 +478,7 @@ export class FeedsApi {
};
const body = {
type: request?.type,
copy_custom_to_notification: request?.copy_custom_to_notification,
create_notification_activity: request?.create_notification_activity,
enforce_unique: request?.enforce_unique,
skip_push: request?.skip_push,
Expand Down Expand Up @@ -580,6 +607,7 @@ export class FeedsApi {
id: request?.id,
};
const body = {
copy_custom_to_notification: request?.copy_custom_to_notification,
handle_mention_notifications: request?.handle_mention_notifications,
run_activity_processors: request?.run_activity_processors,
user_id: request?.user_id,
Expand Down Expand Up @@ -611,6 +639,7 @@ export class FeedsApi {
id: request?.id,
};
const body = {
copy_custom_to_notification: request?.copy_custom_to_notification,
expires_at: request?.expires_at,
handle_mention_notifications: request?.handle_mention_notifications,
poll_id: request?.poll_id,
Expand All @@ -629,6 +658,7 @@ export class FeedsApi {
mentioned_user_ids: request?.mentioned_user_ids,
custom: request?.custom,
location: request?.location,
search_data: request?.search_data,
user: request?.user,
};

Expand Down Expand Up @@ -923,6 +953,7 @@ export class FeedsApi {
): Promise<StreamResponse<AddCommentResponse>> {
const body = {
comment: request?.comment,
copy_custom_to_notification: request?.copy_custom_to_notification,
create_notification_activity: request?.create_notification_activity,
id: request?.id,
object_id: request?.object_id,
Expand Down Expand Up @@ -1049,6 +1080,7 @@ export class FeedsApi {
};
const body = {
comment: request?.comment,
copy_custom_to_notification: request?.copy_custom_to_notification,
handle_mention_notifications: request?.handle_mention_notifications,
skip_enrich_url: request?.skip_enrich_url,
skip_push: request?.skip_push,
Expand Down Expand Up @@ -1083,6 +1115,7 @@ export class FeedsApi {
};
const body = {
type: request?.type,
copy_custom_to_notification: request?.copy_custom_to_notification,
create_notification_activity: request?.create_notification_activity,
enforce_unique: request?.enforce_unique,
skip_push: request?.skip_push,
Expand Down Expand Up @@ -1297,6 +1330,7 @@ export class FeedsApi {
filter: request?.filter,
followers_pagination: request?.followers_pagination,
following_pagination: request?.following_pagination,
friend_reactions_options: request?.friend_reactions_options,
interest_weights: request?.interest_weights,
member_pagination: request?.member_pagination,
user: request?.user,
Expand Down Expand Up @@ -2016,6 +2050,7 @@ export class FeedsApi {
const body = {
source: request?.source,
target: request?.target,
copy_custom_to_notification: request?.copy_custom_to_notification,
create_notification_activity: request?.create_notification_activity,
follower_role: request?.follower_role,
push_preference: request?.push_preference,
Expand Down Expand Up @@ -2046,6 +2081,7 @@ export class FeedsApi {
const body = {
source: request?.source,
target: request?.target,
copy_custom_to_notification: request?.copy_custom_to_notification,
create_notification_activity: request?.create_notification_activity,
push_preference: request?.push_preference,
skip_push: request?.skip_push,
Expand Down
Loading
Loading