Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
gitpod-io
GitHub Repository: gitpod-io/gitpod
Path: blob/main/components/gitpod-db/src/app-installation-db.ts
2497 views
1
/**
2
* Copyright (c) 2020 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 { AppInstallation, AppInstallationPlatform } from "@gitpod/gitpod-protocol";
8
9
export const AppInstallationDB = Symbol("AppInstallationDB");
10
11
export interface AppInstallationDB {
12
recordNewInstallation(
13
platform: AppInstallationPlatform,
14
source: "user" | "platform",
15
installationID: string,
16
ownerUserID?: string,
17
platformUserID?: string,
18
): Promise<void>;
19
recordUninstallation(
20
platform: AppInstallationPlatform,
21
source: "user" | "platform",
22
installationID: string,
23
): Promise<void>;
24
25
findInstallation(platform: AppInstallationPlatform, installationID: string): Promise<AppInstallation | undefined>;
26
}
27
28