Skip to content

Commit

Permalink
fix: remove unused unread count api endpoint (#1143)
Browse files Browse the repository at this point in the history
  • Loading branch information
vishalnarkhede committed Jul 6, 2023
1 parent 3b588fd commit 5700abd
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
5 changes: 0 additions & 5 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ import {
GetImportResponse,
GetMessageAPIResponse,
GetRateLimitsResponse,
GetUnreadCountAPIResponse,
ListChannelResponse,
ListCommandsResponse,
ListImportsPaginationOptions,
Expand Down Expand Up @@ -1663,10 +1662,6 @@ export class StreamChat<StreamChatGenerics extends ExtendableGenerics = DefaultG
);
}

async getUnreadCount(userID?: string) {
return await this.get<GetUnreadCountAPIResponse>(this.baseURL + '/unread', userID ? { user_id: userID } : {});
}

/**
* removeDevice - Removes the device with the given id. Clientside users can only delete their own devices
*
Expand Down
14 changes: 0 additions & 14 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -477,20 +477,6 @@ export type GetRepliesAPIResponse<StreamChatGenerics extends ExtendableGenerics
messages: MessageResponse<StreamChatGenerics>[];
};

export type GetUnreadCountAPIResponse = APIResponse & {
channel_type: {
channel_count: number;
channel_type: string;
unread_count: number;
}[];
channels: {
channel_id: string;
last_read: string;
unread_count: number;
}[];
total_unread_count: number;
};

export type ListChannelResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = APIResponse & {
channel_types: Record<
string,
Expand Down

0 comments on commit 5700abd

Please sign in to comment.