Skip to content
Closed
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
6 changes: 2 additions & 4 deletions src/renderer/utils/forges/github/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import type {
GetReleaseResponse,
IgnoreNotificationThreadSubscriptionResponse,
ListNotificationsForAuthenticatedUserResponse,
MarkNotificationThreadAsDoneResponse,
MarkNotificationThreadAsReadResponse,
} from './types';

import { reportServerPollInterval } from '../../notifications/pollInterval';
Expand Down Expand Up @@ -105,7 +103,7 @@ export async function listNotificationsForAuthenticatedUser(
export async function markNotificationThreadAsRead(
account: Account,
threadId: string,
): Promise<MarkNotificationThreadAsReadResponse> {
): Promise<void> {
const octokit = await createOctokitClient(account, 'rest');

const response = await octokit.rest.activity.markThreadAsRead({
Expand All @@ -126,7 +124,7 @@ export async function markNotificationThreadAsRead(
export async function markNotificationThreadAsDone(
account: Account,
threadId: string,
): Promise<MarkNotificationThreadAsDoneResponse> {
): Promise<void> {
const octokit = await createOctokitClient(account, 'rest');

const response = await octokit.rest.activity.markThreadAsDone({
Expand Down
11 changes: 0 additions & 11 deletions src/renderer/utils/forges/github/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,3 @@ export type GetReleaseResponse =
export type RawGitHubNotification = Endpoints['GET /notifications']['response']['data'][number];

export type RawUser = components['schemas']['simple-user'];

/**
* These API endpoints don't return a response body:
* - Endpoints['PATCH /notifications/threads/{thread_id}']['response']['data']
* - Endpoints['DELETE /notifications/threads/{thread_id}']['response']['data']
*/
// oxlint-disable-next-line typescript/no-invalid-void-type -- This endpoint has no response body
export type MarkNotificationThreadAsReadResponse = void;

// oxlint-disable-next-line typescript/no-invalid-void-type -- This endpoint has no response body
export type MarkNotificationThreadAsDoneResponse = void;
Loading