-
Notifications
You must be signed in to change notification settings - Fork 422
/
integrationCatalog.server.ts
51 lines (46 loc) · 1.31 KB
/
integrationCatalog.server.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import { airtable } from "./integrations/airtable";
import { github } from "./integrations/github";
import { linear } from "./integrations/linear";
import { openai } from "./integrations/openai";
import { plain } from "./integrations/plain";
import { replicate } from "./integrations/replicate";
import { resend } from "./integrations/resend";
import { sendgrid } from "./integrations/sendgrid";
import { shopify } from "./integrations/shopify";
import { slack } from "./integrations/slack";
import { stripe } from "./integrations/stripe";
import { supabase, supabaseManagement } from "./integrations/supabase";
import { typeform } from "./integrations/typeform";
import type { Integration } from "./types";
export class IntegrationCatalog {
#integrations: Record<string, Integration>;
constructor(integrations: Record<string, Integration>) {
this.#integrations = integrations;
}
public getIntegrations() {
return this.#integrations;
}
public getIntegration(identifier: string) {
const api = this.#integrations[identifier];
if (!api) {
return undefined;
}
return api;
}
}
export const integrationCatalog = new IntegrationCatalog({
airtable,
github,
linear,
openai,
plain,
replicate,
resend,
shopify,
slack,
stripe,
supabaseManagement,
supabase,
sendgrid,
typeform,
});