Skip to content

Commit bb51173

Browse files
alaisterjoshenlim
andauthored
feat: cal.com wrapper (supabase#30563)
* feat: cal.com wrapper * add description for cal wrapper * Fix logo --------- Co-authored-by: Joshen Lim <[email protected]>
1 parent 6d2a81c commit bb51173

File tree

6 files changed

+216
-3
lines changed

6 files changed

+216
-3
lines changed

apps/studio/components/interfaces/Integrations/Wrappers/WrapperDynamicColumns.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ const WrapperDynamicColumns = ({
117117
<div className="flex flex-col gap-4">
118118
{columns.map((column, idx) => (
119119
<div key={column.id} className="flex flex-col">
120-
<div className="flex items-center gap-2">
120+
<div className="flex items-center gap-x-2">
121121
<Input
122122
className="flex-1 [&_label]:!p-0"
123123
layout="vertical"

apps/studio/components/interfaces/Integrations/Wrappers/WrapperRow.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ const WrapperRow = ({ wrapper }: WrapperRowProps) => {
133133
</TableCell>
134134
</TableRow>
135135
<Sheet open={editWrapperShown} onOpenChange={() => setisClosingEditWrapper(true)}>
136-
<SheetContent size="default" tabIndex={undefined}>
136+
<SheetContent size="lg" tabIndex={undefined}>
137137
<EditWrapperSheet
138138
wrapper={wrapper}
139139
wrapperMeta={integration.meta}

apps/studio/components/interfaces/Integrations/Wrappers/Wrappers.constants.ts

Lines changed: 208 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export const WRAPPER_HANDLERS = {
1515
REDIS: 'redis_fdw_handler',
1616
PADDLE: 'wasm_fdw_handler',
1717
SNOWFLAKE: 'wasm_fdw_handler',
18+
CAL: 'wasm_fdw_handler',
1819
}
1920

2021
export const WRAPPERS: WrapperMeta[] = [
@@ -2084,4 +2085,211 @@ export const WRAPPERS: WrapperMeta[] = [
20842085
},
20852086
],
20862087
},
2088+
{
2089+
name: 'cal_wrapper',
2090+
description: 'Cal.com is a scheduling platform',
2091+
handlerName: WRAPPER_HANDLERS.CAL,
2092+
validatorName: 'wasm_fdw_validator',
2093+
icon: `${BASE_PATH}/img/icons/cal-com-icon.svg`,
2094+
extensionName: 'calFdw',
2095+
label: 'Cal.com',
2096+
docsUrl: 'https://supabase.com/docs/guides/database/extensions/wrappers/cal',
2097+
minimumExtensionVersion: '0.4.0',
2098+
server: {
2099+
options: [
2100+
{
2101+
name: 'fdw_package_url',
2102+
label: 'FDW Package URL',
2103+
required: true,
2104+
encrypted: false,
2105+
secureEntry: false,
2106+
defaultValue:
2107+
'https://github.com/supabase/wrappers/releases/download/wasm_cal_fdw_v0.1.0/cal_fdw.wasm',
2108+
hidden: true,
2109+
},
2110+
{
2111+
name: 'fdw_package_name',
2112+
label: 'FDW Package Name',
2113+
required: true,
2114+
encrypted: false,
2115+
secureEntry: false,
2116+
defaultValue: 'supabase:cal-fdw',
2117+
hidden: true,
2118+
},
2119+
{
2120+
name: 'fdw_package_version',
2121+
label: 'FDW Package Version',
2122+
required: true,
2123+
encrypted: false,
2124+
secureEntry: false,
2125+
defaultValue: '0.1.0',
2126+
hidden: true,
2127+
},
2128+
{
2129+
name: 'fdw_package_checksum',
2130+
label: 'FDW Package Checksum',
2131+
required: true,
2132+
encrypted: false,
2133+
secureEntry: false,
2134+
defaultValue: 'bca8a82d6c5f8da0aa58011940c4ddb40bb2c909c02dd89b488289c4fff890c1',
2135+
hidden: true,
2136+
},
2137+
{
2138+
name: 'api_url',
2139+
label: 'API URL',
2140+
required: false,
2141+
encrypted: false,
2142+
secureEntry: false,
2143+
defaultValue: 'https://api.cal.com/v2',
2144+
},
2145+
{
2146+
name: 'api_key_id',
2147+
label: 'API Key ID',
2148+
required: true,
2149+
encrypted: true,
2150+
secureEntry: true,
2151+
},
2152+
],
2153+
},
2154+
tables: [
2155+
{
2156+
label: 'My Profile',
2157+
description: 'Shows your Cal profile',
2158+
availableColumns: [
2159+
{
2160+
name: 'id',
2161+
type: 'bigint',
2162+
},
2163+
{
2164+
name: 'username',
2165+
type: 'text',
2166+
},
2167+
{
2168+
name: 'email',
2169+
type: 'text',
2170+
},
2171+
{
2172+
name: 'attrs',
2173+
type: 'jsonb',
2174+
},
2175+
],
2176+
options: [
2177+
{
2178+
name: 'object',
2179+
defaultValue: 'my_profile',
2180+
editable: false,
2181+
required: true,
2182+
type: 'text',
2183+
},
2184+
],
2185+
},
2186+
{
2187+
label: 'Event Types',
2188+
description: 'Shows your Event Types',
2189+
availableColumns: [
2190+
{
2191+
name: 'attrs',
2192+
type: 'jsonb',
2193+
},
2194+
],
2195+
options: [
2196+
{
2197+
name: 'object',
2198+
defaultValue: 'event-types',
2199+
editable: false,
2200+
required: true,
2201+
type: 'text',
2202+
},
2203+
],
2204+
},
2205+
{
2206+
label: 'Bookings',
2207+
description: 'Shows your Bookings',
2208+
availableColumns: [
2209+
{
2210+
name: 'attrs',
2211+
type: 'jsonb',
2212+
},
2213+
],
2214+
options: [
2215+
{
2216+
name: 'object',
2217+
defaultValue: 'bookings',
2218+
editable: false,
2219+
required: true,
2220+
type: 'text',
2221+
},
2222+
],
2223+
},
2224+
{
2225+
label: 'Calendars',
2226+
description: 'Shows your Calendars',
2227+
availableColumns: [
2228+
{
2229+
name: 'attrs',
2230+
type: 'jsonb',
2231+
},
2232+
],
2233+
options: [
2234+
{
2235+
name: 'object',
2236+
defaultValue: 'calendars',
2237+
editable: false,
2238+
required: true,
2239+
type: 'text',
2240+
},
2241+
],
2242+
},
2243+
{
2244+
label: 'Schedules',
2245+
description: 'Shows your Schedules',
2246+
availableColumns: [
2247+
{
2248+
name: 'id',
2249+
type: 'bigint',
2250+
},
2251+
{
2252+
name: 'name',
2253+
type: 'text',
2254+
},
2255+
{
2256+
name: 'attrs',
2257+
type: 'jsonb',
2258+
},
2259+
],
2260+
options: [
2261+
{
2262+
name: 'object',
2263+
defaultValue: 'schedules',
2264+
editable: false,
2265+
required: true,
2266+
type: 'text',
2267+
},
2268+
],
2269+
},
2270+
{
2271+
label: 'Conferencing',
2272+
description: 'Shows conferencing',
2273+
availableColumns: [
2274+
{
2275+
name: 'id',
2276+
type: 'bigint',
2277+
},
2278+
{
2279+
name: 'attrs',
2280+
type: 'jsonb',
2281+
},
2282+
],
2283+
options: [
2284+
{
2285+
name: 'object',
2286+
defaultValue: 'conferencing',
2287+
editable: false,
2288+
required: true,
2289+
type: 'text',
2290+
},
2291+
],
2292+
},
2293+
],
2294+
},
20872295
]

apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnType.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ interface ColumnTypeProps {
5757

5858
const ColumnType = ({
5959
value,
60+
className,
6061
enumTypes = [],
6162
disabled = false,
6263
showLabel = true,
@@ -184,7 +185,7 @@ const ColumnType = ({
184185
}
185186

186187
return (
187-
<div className="flex flex-col gap-y-2">
188+
<div className={cn('flex flex-col gap-y-2', className)}>
188189
{showLabel && <Label_Shadcn_ className="text-foreground-light">Type</Label_Shadcn_>}
189190
<Popover_Shadcn_ open={open} onOpenChange={setOpen}>
190191
<PopoverTrigger_Shadcn_ asChild>
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Cal.com is a calendar and scheduling service that allows you to create and share events with others.
2+
3+
The Cal.com Wrapper allows you to read data from Cal.com within your Postgres database.

0 commit comments

Comments
 (0)