Added Airtable provider, updated Pizzly so it has latest providers (inc. Airtable)

This commit is contained in:
Matt Aitken
2023-01-21 16:59:52 -08:00
parent f350fcadbc
commit 0db83e1b28
5 changed files with 34 additions and 7 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ services:
networks:
- app_network
pizzly-server:
image: nangohq/pizzly-server:0.4.3
image: nangohq/pizzly-server:0.5.2
container_name: trigger-pizzly-server
restart: always
env_file:
+6 -1
View File
@@ -85,7 +85,12 @@ program
}
const provider = providers.find((p) => p.slug === service);
if (provider?.authentication.type !== "oauth") {
if (!provider) {
console.log(`No provider found for ${service}`);
console.log("Skipping…");
return Promise.resolve();
}
if (provider.authentication.type !== "oauth") {
console.log(
`The provider ${service} is the wrong type ${provider?.authentication.type}. Must be oauth`
);
+5 -5
View File
@@ -1,16 +1,18 @@
import { airtable } from "./providers/airtable";
import { github } from "./providers/github";
import { slack } from "./providers/slack";
import { shopify } from "./providers/shopify";
import { slack } from "./providers/slack";
import { Provider } from "./types";
export type {
Provider,
APIKeyAuthentication,
OAuthAuthentication,
Provider,
} from "./types";
export { airtable, github, slack, shopify };
const providerCatalog = {
providers: { github, slack, shopify },
providers: { airtable, github, slack, shopify },
};
export function getProviders(isAdmin: boolean): Provider[] {
@@ -28,5 +30,3 @@ export function getProviders(isAdmin: boolean): Provider[] {
}
}) as Provider[];
}
export { github, slack, shopify };
@@ -0,0 +1,19 @@
export const airtable = {
name: "Airtable",
slug: "airtable",
icon: "/integrations/airtable.png",
enabledFor: "admins",
authentication: {
type: "oauth",
scopes: [
"data.records:read",
"data.records:write",
"data.recordComments:read",
"data.recordComments:write",
"schema.bases:read",
"schema.bases:write",
"webhook:manage",
],
},
schemas: {},
};
+3
View File
@@ -1,4 +1,7 @@
{
"airtable": {
"client_id": "09bd8b46-6b80-4343-9ffd-5750a8c3e2f1"
},
"github": {
"client_id": "cd763219ce4005e58c00"
},