8000 feat: slack fdw (#35053) · CodersSampling/supabase@ef4b8be · GitHub
[go: up one dir, main page]

Skip to content

Commit ef4b8be

Browse files 8000
authored
feat: slack fdw (supabase#35053)
* feat: slack fdw * fix slack options * add overview * up minimum version
1 parent 326c753 commit ef4b8be

File tree

2 files changed

+255
-0
lines changed

2 files changed

+255
-0
lines changed

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

Lines changed: 252 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export const WRAPPER_HANDLERS = {
1919
CALENDLY: 'wasm_fdw_handler',
2020
CLERK: 'wasm_fdw_handler',
2121
NOTION: 'wasm_fdw_handler',
22+
SLACK: 'wasm_fdw_handler',
2223
}
2324

2425
export const WRAPPERS: WrapperMeta[] = [
@@ -3064,4 +3065,255 @@ export const WRAPPERS: WrapperMeta[] = [
30643065
},
30653066
],
30663067
},
3068+
{
3069+
name: 'slack_wrapper',
3070+
description:
3071+
'Query Slack workspaces, channels, messages, users, files, and more via the Slack API.',
3072+
handlerName: WRAPPER_HANDLERS.SLACK,
3073+
validatorName: 'wasm_fdw_validator',
3074+
icon: `${BASE_PATH}/img/icons/slack-icon.svg`,
3075+
extensionName: 'SlackFdw',
3076+
label: 'Slack',
3077+
docsUrl: 'https://fdw.dev/catalog/slack/',
3078+
minimumExtensionVersion: '0.4.0',
3079+
server: {
3080+
options: [
3081+
{
3082+
name: 'fdw_package_url',
3083+
label: 'FDW Package URL',
3084+
required: true,
3085+
encrypted: false,
3086+
secureEntry: false,
3087+
defaultValue:
3088+
'https://github.com/supabase/wrappers/releases/download/wasm_slack_fdw_v0.1.0/slack_fdw.wasm',
3089+
hidden: true,
3090+
},
3091+
{
3092+
name: 'fdw_package_name',
3093+
label: 'FDW Package Name',
3094+
required: true,
3095+
encrypted: false,
3096+
secureEntry: false,
3097+
defaultValue: 'supabase:slack-fdw',
3098+
hidden: true,
3099+
},
3100+
{
3101+
name: 'fdw_package_version',
3102+
label: 'FDW Package Version',
3103+
required: true,
3104+
encrypted: false,
3105+
secureEntry: false,
3106+
defaultValue: '0.1.0',
3107+
hidden: true,
3108+
},
3109+
{
3110+
name: 'fdw_package_checksum',
3111+
label: 'FDW Package Checksum',
3112+
required: true,
3113+
encrypted: false,
3114+
secureEntry: false,
3115+
defaultValue: '5b022b441c0007e31d792ecb1341bfffed1c29cb865eb0c7969989dff0e8fdc3',
3116+
hidden: true,
3117+
},
3118+
{
3119+
name: 'api_token_id',
3120+
label: 'Slack Bot User OAuth Token',
3121+
required: true,
3122+
encrypted: true,
3123+
secureEntry: true,
3124+
urlHelper: 'https://api.slack.com/apps',
3125+
},
3126+
{
3127+
name: 'workspace',
3128+
label: 'Workspace',
3129+
required: false,
3130+
encrypted: false,
3131+
secureEntry: false,
3132+
},
3133+
],
3134+
},
3135+
tables: [
3136+
{
3137+
label: 'Channels',
3138+
description: 'All channels in the workspace',
3139+
availableColumns: [
3140+
{ name: 'id', type: 'text' },
3141+
{ name: 'name', type: 'text' },
3142+
{ name: 'is_private', type: 'boolean' },
3143+
{ name: 'created', type: 'timestamp' },
3144+
{ name: 'creator', type: 'text' },
3145+
],
3146+
options: [
3147+
{
3148+
name: 'resource',
3149+
defaultValue: 'channels',
3150+
editable: false,
3151+
required: true,
3152+
type: 'text',
3153+
},
3154+
],
3155+
},
3156+
{
3157+
label: 'Messages',
3158+
description: 'Messages from channels, DMs, and group messages',
3159+
availableColumns: [
3160+
{ name: 'ts', type: 'text' },
3161+
{ name: 'user_id', type: 'text' },
3162+
{ name: 'channel_id', type: 'text' },
3163+
{ name: 'text', type: 'text' },
3164+
{ name: 'thread_ts', type: 'text' },
3165+
{ name: 'reply_count', type: 'integer' },
3166+
],
3167+
options: [
3168+
{
3169+
name: 'resource',
3170+
defaultValue: 'messages',
3171+
editable: false,
3172+
required: true,
3173+
type: 'text',
3174+
},
3175+
],
3176+
},
3177+
{
3178+
label: 'Users',
3179+
description: 'All users in the workspace',
3180+
availableColumns: [
3181+
{ name: 'id', type: 'text' },
3182+
{ name: 'name', type: 'text' },
3183+
{ name: 'real_name', type: 'text' },
3184+
{ name: 'display_name', type: 'text' },
3185+
{ name: 'display_name_normalized', type: 'text' },
3186+
{ name: 'real_name_normalized', type: 'text' },
3187+
{ name: 'email', type: 'text' },
3188+
{ name: 'phone', type: 'text' },
3189+
{ name: 'skype', type: 'text' },
3190+
{ name: 'is_admin', type: 'boolean' },
3191+
{ name: 'is_owner', type: 'boolean' },
3192+
{ name: 'is_primary_owner', type: 'boolean' },
3193+
{ name: 'is_bot', type: 'boolean' },
3194+
{ name: 'is_app_user', type: 'boolean' },
3195+
{ name: 'is_restricted', type: 'boolean' },
3196+
{ name: 'is_ultra_restricted', type: 'boolean' },
3197+
{ name: 'deleted', type: 'boolean' },
3198+
{ name: 'status_text', type: 'text' },
3199+
{ name: 'status_emoji', type: 'text' },
3200+
{ name: 'status_expiration', type: 'bigint' },
3201+
{ name: 'title', type: 'text' },
3202+
{ name: 'team_id', type: 'text' },
3203+
{ name: 'team', type: 'text' },
3204+
{ name: 'tz', type: 'text' },
3205+
{ name: 'tz_label', type: 'text' },
3206+
{ name: 'tz_offset', type: 'integer' },
3207+
{ name: 'locale', type: 'text' },
3208+
{ name: 'image_24', type: 'text' },
3209+
{ name: 'image_48', type: 'text' },
3210+
{ name: 'image_72', type: 'text' },
3211+
{ name: 'image_192', type: 'text' },
3212+
{ name: 'image_512', type: 'text' },
3213+
{ name: 'color', type: 'text' },
3214+
{ name: 'updated', type: 'bigint' },
3215+
],
3216+
options: [
3217+
{
3218+
name: 'resource',
3219+
defaultValue: 'users',
3220+
editable: false,
3221+
required: true,
3222+
type: 'text',
3223+
},
3224+
],
3225+
},
3226+
{
3227+
label: 'User Groups',
3228+
description: 'User groups in the workspace',
3229+
availableColumns: [
3230+
{ name: 'id', type: 'text' },
3231+
{ name: 'team_id', type: 'text' },
3232+
{ name: 'name', type: 'text' },
3233+
{ name: 'handle', type: 'text' },
3234+
{ name: 'description', type: 'text' },
3235+
{ name: 'is_external', type: 'boolean' },
3236+
{ name: 'date_create', type: 'bigint' },
3237+
{ name: 'date_update', type: 'bigint' },
3238+
{ name: 'date_delete', type: 'bigint' },
3239+
{ name: 'auto_type', type: 'text' },
3240+
{ name: 'created_by', type: 'text' },
3241+
{ name: 'updated_by', type: 'text' },
3242+
{ name: 'deleted_by', type: 'text' },
3243+
{ name: 'user_count', type: 'integer' },
3244+
{ name: 'channel_count', type: 'integer' },
3245+
],
3246+
options: [
3247+
{
3248+
name: 'resource',
3249+
defaultValue: 'usergroups',
3250+
editable: false,
3251+
required: true,
3252+
type: 'text',
3253+
},
3254+
],
3255+
},
3256+
{
3257+
label: 'User Group Members',
3258+
description: 'Membership relation between users and user groups',
3259+
availableColumns: [
3260+
{ name: 'usergroup_id', type: 'text' },
3261+
{ name: 'usergroup_name', type: 'text' },
3262+
{ name: 'usergroup_handle', type: 'text' },
3263+
{ name: 'user_id', type: 'text' },
3264+
],
3265+
options: [
3266+
{
3267+
name: 'resource',
3268+
defaultValue: 'usergroup_members',
3269+
editable: false,
3270+
required: true,
3271+
type: 'text',
3272+
},
3273+
],
3274+
},
3275+
{
3276+
label: 'Files',
3277+
description: 'Files shared in the workspace',
3278+
availableColumns: [
3279+
{ name: 'id', type: 'text' },
3280+
{ name: 'name', type: 'text' },
3281+
{ name: 'title', type: 'text' },
3282+
{ name: 'mimetype', type: 'text' },
3283+
{ name: 'size', type: 'bigint' },
3284+
{ name: 'url_private', type: 'text' },
3285+
{ name: 'user_id', type: 'text' },
3286+
{ name: 'created', type: 'timestamp' },
3287+
],
3288+
options: [
3289+
{
3290+
name: 'resource',
3291+
defaultValue: 'files',
3292+
editable: false,
3293+
required: true,
3294+
type: 'text',
3295+
},
3296+
],
3297+
},
3298+
{
3299+
label: 'Team Info',
3300+
description: 'Information about the Slack team/workspace',
3301+
availableColumns: [
3302+
{ name: 'id', type: 'text' },
3303+
{ name: 'name', type: 'text' },
3304+
{ name: 'domain', type: 'text' },
3305+
{ name: 'email_domain', type: 'text' },
3306+
],
3307+
options: [
3308+
{
3309+
name: 'resource',
3310+
defaultValue: 'team-info',
3311+
editable: false,
3312+
required: true,
3313+
type: 'text',
3314+
},
3315+
],
3316+
},
3317+
],
3318+
},
30673319
]
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Slack is a messaging app for business that connects people to the information they need. By bringing people together to work as one unified team, Slack transforms the way organizations communicate.
2+
3+
The Slack Wrapper is a WebAssembly (Wasm) foreign data wrapper which allows you to query Slack workspaces, channels, messages, and users directly from your Postgres database.

0 commit comments

Comments
 (0)
0