Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
gitpod-io
GitHub Repository: gitpod-io/gitpod
Path: blob/main/components/gitpod-db/src/webhook-event-db.ts
2498 views
1
/**
2
* Copyright (c) 2022 Gitpod GmbH. All rights reserved.
3
* Licensed under the GNU Affero General Public License (AGPL).
4
* See License.AGPL.txt in the project root for license information.
5
*/
6
7
import { WebhookEvent } from "@gitpod/gitpod-protocol";
8
9
export const WebhookEventDB = Symbol("WebhookEventDB");
10
export interface WebhookEventDB {
11
createEvent(parts: Omit<WebhookEvent, "id" | "creationTime">): Promise<WebhookEvent>;
12
updateEvent(id: string, update: Partial<WebhookEvent>): Promise<void>;
13
findByCloneUrl(cloneUrl: string, limit?: number): Promise<WebhookEvent[]>;
14
deleteOldEvents(ageInDays: number, limit?: number): Promise<void>;
15
}
16
17