mirror of
https://github.com/outline/outline.git
synced 2026-06-13 11:25:03 +03:00
5584089441
* OAuth * store logo * unfurl support * refresh token * support for list * embed list * mention menu for all embeds in a list * multi-level list * logo * account level connection * tsc * Update Icon.tsx * coderabbit feedback * RFC 6749 suggestion --------- Co-authored-by: Tom Moor <tom@getoutline.com>
33 lines
819 B
TypeScript
33 lines
819 B
TypeScript
import { Minute } from "@shared/utils/time";
|
|
import { Hook, PluginManager } from "@server/utils/PluginManager";
|
|
import config from "../plugin.json";
|
|
import router from "./api/linear";
|
|
import env from "./env";
|
|
import { Linear } from "./linear";
|
|
import UploadIntegrationLogoTask from "@server/queues/tasks/UploadIntegrationLogoTask";
|
|
import { uninstall } from "./uninstall";
|
|
|
|
const enabled = !!env.LINEAR_CLIENT_ID && !!env.LINEAR_CLIENT_SECRET;
|
|
|
|
if (enabled) {
|
|
PluginManager.add([
|
|
{
|
|
...config,
|
|
type: Hook.API,
|
|
value: router,
|
|
},
|
|
{
|
|
type: Hook.Task,
|
|
value: UploadIntegrationLogoTask,
|
|
},
|
|
{
|
|
type: Hook.UnfurlProvider,
|
|
value: { unfurl: Linear.unfurl, cacheExpiry: Minute.seconds },
|
|
},
|
|
{
|
|
type: Hook.Uninstall,
|
|
value: uninstall,
|
|
},
|
|
]);
|
|
}
|