mirror of
https://github.com/Unleash/unleash.git
synced 2024-11-01 19:07:38 +01:00
383e522127
https://linear.app/unleash/issue/2-1232/implement-first-iteration-of-the-new-slack-app-addon This PR implements the first iteration of the new Slack App addon. Unlike the old Slack addon, this one uses a Slack App (bot) that is installed to Slack workspaces in order to post messages. This uses `@slack/web-api`, which internally uses the latest Slack API endpoints like `postMessage`. This is currently behind a flag: `slackAppAddon`. The current flow is that the Unleash Slack App is installed from whatever source: - Unleash addons page; - Direct link; - https://unleash-slack-app.vercel.app/ (temporary URL); - Slack App Directory (in the future); - Etc; After installed, we resolve the authorization to an `access_token` that the user can paste into the Unleash Slack App addon configuration form. https://github.com/Unleash/unleash/assets/14320932/6a6621b9-5b8a-4921-a279-30668be6d46c Co-authored by: @daveleek --------- Co-authored-by: David Leek <david@getunleash.io>
59 lines
1.2 KiB
TypeScript
59 lines
1.2 KiB
TypeScript
import { ITagType } from './tags';
|
|
|
|
export interface IAddon {
|
|
provider: string;
|
|
parameters: Record<string, any>;
|
|
id: number;
|
|
events: string[];
|
|
projects?: string[];
|
|
environments?: string[];
|
|
enabled: boolean;
|
|
description: string;
|
|
}
|
|
|
|
export interface IAddonProvider {
|
|
description: string;
|
|
displayName: string;
|
|
documentationUrl: string;
|
|
events: string[];
|
|
name: string;
|
|
parameters: IAddonProviderParams[];
|
|
tagTypes: ITagType[];
|
|
installation?: IAddonInstallation;
|
|
alerts?: IAddonAlert[];
|
|
deprecated?: string;
|
|
}
|
|
|
|
export interface IAddonInstallation {
|
|
url: string;
|
|
warning?: string;
|
|
title?: string;
|
|
helpText?: string;
|
|
}
|
|
|
|
export interface IAddonAlert {
|
|
type: 'success' | 'info' | 'warning' | 'error';
|
|
text: string;
|
|
}
|
|
|
|
export interface IAddonProviderParams {
|
|
name: string;
|
|
displayName: string;
|
|
type: string;
|
|
required: boolean;
|
|
sensitive: boolean;
|
|
placeholder?: string;
|
|
description?: string;
|
|
}
|
|
|
|
export interface IAddonConfig {
|
|
provider: string;
|
|
parameters: Record<string, any>;
|
|
id: number;
|
|
events: string[];
|
|
projects?: string[];
|
|
environments?: string[];
|
|
enabled: boolean;
|
|
description: string;
|
|
}
|