The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
feat: calendly wrapper (#30733)
Alaister Young07a221947812
diff --git a/apps/studio/components/interfaces/Integrations/Wrappers/WrapperTable.tsx b/apps/studio/components/interfaces/Integrations/Wrappers/WrapperTable.tsxindex ffb88fc25f8..34338795c25 100644--- a/apps/studio/components/interfaces/Integrations/Wrappers/WrapperTable.tsx+++ b/apps/studio/components/interfaces/Integrations/Wrappers/WrapperTable.tsx@@ -1,3 +1,5 @@+import { useMemo } from 'react'+import { useParams } from 'common'import { useProjectContext } from 'components/layouts/ProjectLayout/ProjectContext'import { useFDWsQuery } from 'data/fdw/fdws-query'@@ -13,6 +15,7 @@ import {} from 'ui'import { INTEGRATIONS } from '../Landing/Integrations.constants'import WrapperRow from './WrapperRow'+import { wrapperMetaComparator } from './Wrappers.utils'interface WrapperTableProps {isLatest?: boolean@@ -28,6 +31,14 @@ export const WrapperTable = ({ isLatest = false }: WrapperTableProps) => {connectionString: project?.connectionString,})+ const wrappers = useMemo(+ () =>+ integration && integration.type === 'wrapper' && data+ ? data.filter((wrapper) => wrapperMetaComparator(integration.meta, wrapper))+ : [],+ [data, integration]+ )+if (!integration || integration.type !== 'wrapper') {return (<p className="text-foreground-light text-sm">@@ -36,8 +47,6 @@ export const WrapperTable = ({ isLatest = false }: WrapperTableProps) => {)}- const wrappers = (data ?? []).filter((x) => x.handler === integration.meta.handlerName) || []-return (<Card className="max-w-5xl"><CardContent className="p-0 pb-3">diff --git a/apps/studio/components/interfaces/Integrations/Wrappers/Wrappers.constants.ts b/apps/studio/components/interfaces/Integrations/Wrappers/Wrappers.constants.tsindex 2a3674c7f93..150e7332875 100644--- a/apps/studio/components/interfaces/Integrations/Wrappers/Wrappers.constants.ts+++ b/apps/studio/components/interfaces/Integrations/Wrappers/Wrappers.constants.ts@@ -16,6 +16,7 @@ export const WRAPPER_HANDLERS = {PADDLE: 'wasm_fdw_handler',SNOWFLAKE: 'wasm_fdw_handler',CAL: 'wasm_fdw_handler',+ CALENDLY: 'wasm_fdw_handler',}export const WRAPPERS: WrapperMeta[] = [@@ -2292,4 +2293,241 @@ export const WRAPPERS: WrapperMeta[] = [},],},+ {+ name: 'calendly_wrapper',+ description: 'Calendly is a scheduling platform',+ handlerName: WRAPPER_HANDLERS.CALENDLY,+ validatorName: 'wasm_fdw_validator',+ icon: `${BASE_PATH}/img/icons/calendly-icon.svg`,+ extensionName: 'calendlyFdw',+ label: 'Calendly',+ docsUrl: 'https://supabase.com/docs/guides/database/extensions/wrappers/calendly',+ minimumExtensionVersion: '0.4.0',+ server: {+ options: [+ {+ name: 'fdw_package_url',+ label: 'FDW Package URL',+ required: true,+ encrypted: false,+ secureEntry: false,+ defaultValue:+ 'https://github.com/supabase/wrappers/releases/download/wasm_calendly_fdw_v0.1.0/calendly_fdw.wasm',+ hidden: true,+ },+ {+ name: 'fdw_package_name',+ label: 'FDW Package Name',+ required: true,+ encrypted: false,+ secureEntry: false,+ defaultValue: 'supabase:calendly-fdw',+ hidden: true,+ },+ {+ name: 'fdw_package_version',+ label: 'FDW Package Version',+ required: true,+ encrypted: false,+ secureEntry: false,+ defaultValue: '0.1.0',+ hidden: true,+ },+ {+ name: 'fdw_package_checksum',+ label: 'FDW Package Checksum',+ required: true,+ encrypted: false,+ secureEntry: false,+ defaultValue: 'aa17f1ce2b48b5d8d6cee4f61df4d6b23e9a333c3e5c7a10cec9aae619c156b9',+ hidden: true,+ },+ {+ name: 'organization',+ label: 'Organization URL',+ required: true,+ encrypted: false,+ secureEntry: false,+ defaultValue:+ 'https://api.calendly.com/organizations/00000000-0000-0000-0000-000000000000',+ },+ {+ name: 'api_url',+ label: 'API URL',+ required: false,+ encrypted: false,+ secureEntry: false,+ defaultValue: 'https://api.calendly.com',+ },+ {+ name: 'api_key_id',+ label: 'API Key ID',+ required: true,+ encrypted: true,+ secureEntry: true,+ },+ ],+ },+ tables: [+ {+ label: 'Current User',+ description: 'Get the current user used for the API request',+ availableColumns: [+ {+ name: 'uri',+ type: 'text',+ },+ {+ name: 'slug',+ type: 'text',+ },+ {+ name: 'created_at',+ type: 'timestamp',+ },+ {+ name: 'updated_at',+ type: 'timestamp',+ },+ {+ name: 'attrs',+ type: 'jsonb',+ },+ ],+ options: [+ {+ name: 'object',+ defaultValue: 'current_user',+ editable: false,+ required: true,+ type: 'text',+ },+ ],+ },+ {+ label: 'Event Types',+ description: 'Shows your Event Types',+ availableColumns: [+ {+ name: 'uri',+ type: 'text',+ },+ {+ name: 'created_at',+ type: 'timestamp',+ },+ {+ name: 'updated_at',+ type: 'timestamp',+ },+ {+ name: 'attrs',+ type: 'jsonb',+ },+ ],+ options: [+ {+ name: 'object',+ defaultValue: 'event_types',+ editable: false,+ required: true,+ type: 'text',+ },+ ],+ },+ {+ label: 'Groups',+ description: 'Shows your groups',+ availableColumns: [+ {+ name: 'uri',+ type: 'text',+ },+ {+ name: 'created_at',+ type: 'timestamp',+ },+ {+ name: 'updated_at',+ type: 'timestamp',+ },+ {+ name: 'attrs',+ type: 'jsonb',+ },+ ],+ options: [+ {+ name: 'object',+ defaultValue: 'groups',+ editable: false,+ required: true,+ type: 'text',+ },+ ],+ },+ {+ label: 'Organization Memberships',+ description: 'Shows your Organization Memberships',+ availableColumns: [+ {+ name: 'uri',+ type: 'text',+ },+ {+ name: 'created_at',+ type: 'timestamp',+ },+ {+ name: 'updated_at',+ type: 'timestamp',+ },+ {+ name: 'attrs',+ type: 'jsonb',+ },+ ],+ options: [+ {+ name: 'object',+ defaultValue: 'organization_memberships',+ editable: false,+ required: true,+ type: 'text',+ },+ ],+ },+ {+ label: 'Scheduled Events',+ description: 'Shows your scheduled events',+ availableColumns: [+ {+ name: 'uri',+ type: 'text',+ },+ {+ name: 'created_at',+ type: 'timestamp',+ },+ {+ name: 'updated_at',+ type: 'timestamp',+ },+ {+ name: 'attrs',+ type: 'jsonb',+ },+ ],+ options: [+ {+ name: 'object',+ defaultValue: 'scheduled_events',+ editable: false,+ required: true,+ type: 'text',+ },+ ],+ },+ ],+ },]diff --git a/apps/studio/public/img/icons/calendly-icon.svg b/apps/studio/public/img/icons/calendly-icon.svgnew file mode 100644index 00000000000..29233525193--- /dev/null+++ b/apps/studio/public/img/icons/calendly-icon.svg@@ -0,0 +1 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 525.8 535.73"><defs><style>.cls-2{fill:#006bff}.cls-3{fill:#0ae9ef}</style></defs><g id="Layer_2" data-name="Layer 2"><g id="Logo_assets" data-name="Logo assets"><g id="Brand_mark" data-name="Brand mark"><path d="m443.74 337.62-27.16 47.05a139.52 139.52 0 0 1-120.82 69.75h-54.33a139.52 139.52 0 0 1-120.82-69.75l-27.16-47.05a139.52 139.52 0 0 1 0-139.51l27.16-47.05A139.53 139.53 0 0 1 241.43 81.3h54.33a139.53 139.53 0 0 1 120.82 69.76l27.16 47.05a139.23 139.23 0 0 1 8.55 17.55c0 .12.09.23.13.35a102.15 102.15 0 0 0 44.33-18.24c0-.14-.08-.28-.13-.43a237.8 237.8 0 0 0-33.29-67.58 240.67 240.67 0 0 0-52-53.48 239.3 239.3 0 0 0-312.68 360.8 239.43 239.43 0 0 0 398-98.69c.05-.15.09-.29.13-.43a102.15 102.15 0 0 0-44.33-18.24c0 .12-.09.23-.13.35a139.23 139.23 0 0 1-8.58 17.55Z" style="fill:none"/><path class="cls-2" d="M360.4 347.4c-17 15.09-38.21 33.87-76.78 33.87h-23c-27.88 0-53.23-10.12-71.37-28.49-17.72-17.94-27.48-42.5-27.48-69.16v-31.51c0-26.66 9.76-51.22 27.48-69.16 18.14-18.37 43.49-28.49 71.37-28.49h23c38.57 0 59.76 18.78 76.78 33.87 17.65 15.65 32.9 29.16 73.52 29.16a116.05 116.05 0 0 0 18.5-1.48c0-.12-.08-.23-.13-.35a139.23 139.23 0 0 0-8.55-17.55l-27.16-47.05A139.53 139.53 0 0 0 295.76 81.3h-54.33a139.53 139.53 0 0 0-120.82 69.76l-27.16 47.05a139.52 139.52 0 0 0 0 139.51l27.16 47.05a139.52 139.52 0 0 0 120.82 69.75h54.33a139.52 139.52 0 0 0 120.82-69.75l27.16-47.05a139.23 139.23 0 0 0 8.55-17.55c0-.12.09-.23.13-.35a116.05 116.05 0 0 0-18.5-1.48c-40.62 0-55.87 13.51-73.52 29.16Z"/><path class="cls-2" d="M283.62 183h-23c-42.42 0-70.3 30.3-70.3 69.09v31.51c0 38.79 27.88 69.09 70.3 69.09h23c61.82 0 57-63 150.3-63a144.19 144.19 0 0 1 26.37 2.41 139.36 139.36 0 0 0 0-48.46 143.32 143.32 0 0 1-26.37 2.42c-93.33-.01-88.48-63.06-150.3-63.06Z"/><path class="cls-2" d="M513.91 315.13a130.21 130.21 0 0 0-53.62-23c0 .16-.05.32-.08.47a138.46 138.46 0 0 1-7.79 27.16A102.15 102.15 0 0 1 496.75 338c0 .14-.08.28-.13.43A237.8 237.8 0 0 1 463.33 406a240.67 240.67 0 0 1-52 53.48A239.3 239.3 0 0 1 98.65 98.65a239.43 239.43 0 0 1 398 98.69c.05.15.09.29.13.43A102.15 102.15 0 0 1 452.42 216a139.36 139.36 0 0 1 7.8 27.18c0 .15 0 .3.07.44a129.94 129.94 0 0 0 53.62-23c15.29-11.31 12.33-24.09 10-31.65C490.22 79.52 388.33 0 267.86 0 119.93 0 0 119.93 0 267.86s119.93 267.87 267.86 267.87c120.47 0 222.36-79.52 256-188.94 2.38-7.56 5.34-20.34-9.95-31.66Z"/><path class="cls-3" d="M452.42 216a116.05 116.05 0 0 1-18.5 1.48c-40.62 0-55.87-13.51-73.52-29.16-17-15.09-38.21-33.87-76.78-33.87h-23c-27.88 0-53.23 10.12-71.37 28.49-17.72 17.94-27.48 42.5-27.48 69.16v31.51c0 26.66 9.76 51.22 27.48 69.16 18.14 18.37 43.49 28.49 71.37 28.49h23c38.57 0 59.76-18.78 76.78-33.87 17.65-15.65 32.9-29.16 73.52-29.16a116.05 116.05 0 0 1 18.5 1.48 138.46 138.46 0 0 0 7.79-27.16c0-.15.06-.31.08-.47a144.19 144.19 0 0 0-26.37-2.41c-93.33 0-88.48 63-150.3 63h-23c-42.42 0-70.3-30.3-70.3-69.09v-31.47c0-38.79 27.88-69.09 70.3-69.09h23c61.82 0 57 63 150.3 63a143.32 143.32 0 0 0 26.37-2.42c0-.14 0-.29-.07-.44a139.36 139.36 0 0 0-7.8-27.16Z"/><path class="cls-3" d="M452.42 216a116.05 116.05 0 0 1-18.5 1.48c-40.62 0-55.87-13.51-73.52-29.16-17-15.09-38.21-33.87-76.78-33.87h-23c-27.88 0-53.23 10.12-71.37 28.49-17.72 17.94-27.48 42.5-27.48 69.16v31.51c0 26.66 9.76 51.22 27.48 69.16 18.14 18.37 43.49 28.49 71.37 28.49h23c38.57 0 59.76-18.78 76.78-33.87 17.65-15.65 32.9-29.16 73.52-29.16a116.05 116.05 0 0 1 18.5 1.48 138.46 138.46 0 0 0 7.79-27.16c0-.15.06-.31.08-.47a144.19 144.19 0 0 0-26.37-2.41c-93.33 0-88.48 63-150.3 63h-23c-42.42 0-70.3-30.3-70.3-69.09v-31.47c0-38.79 27.88-69.09 70.3-69.09h23c61.82 0 57 63 150.3 63a143.32 143.32 0 0 0 26.37-2.42c0-.14 0-.29-.07-.44a139.36 139.36 0 0 0-7.8-27.16Z"/></g></g></g></svg>\ No newline at end of filediff --git a/apps/studio/static-data/integrations/calendly_wrapper/overview.md b/apps/studio/static-data/integrations/calendly_wrapper/overview.mdnew file mode 100644index 00000000000..b04fd1909cb--- /dev/null+++ b/apps/studio/static-data/integrations/calendly_wrapper/overview.md@@ -0,0 +1,3 @@+Calendly is a scheduling platform used for teams to schedule, prepare and follow up on external meetings.++The Calendly Wrapper is a WebAssembly(Wasm) foreign data wrapper which allows you to read data from your Calendly for use within your Postgres database.