mirror of
https://github.com/outline/outline.git
synced 2026-11-20 21:23:06 +03:00
* chore: Move plugin-specific integration code into plugins Core no longer imports from or names the settings of individual plugins. Plugins now register mention providers, issue status icons, instance URLs, settings keys, settings and import schemas, and OAuth clients through hooks. * fix: Recompute embed instance URLs after plugins load and match legacy issue icons by URL * fix: Skip logo upload jobs queued without a settings path * chore: Choose issue status icons from the unfurl state
27 lines
710 B
TypeScript
27 lines
710 B
TypeScript
import type { IssueSource } from "@shared/schema";
|
|
import type { IntegrationService, IntegrationType } from "@shared/types";
|
|
import type { Integration } from "@server/models";
|
|
|
|
export abstract class BaseIssueProvider {
|
|
service: IntegrationService;
|
|
|
|
constructor(service: IntegrationService) {
|
|
this.service = service;
|
|
}
|
|
|
|
abstract fetchSources(
|
|
integration: Integration<IntegrationType.Embed>
|
|
): Promise<IssueSource[]>;
|
|
|
|
abstract handleWebhook({
|
|
payload,
|
|
headers,
|
|
teamId,
|
|
}: {
|
|
payload: Record<string, unknown>;
|
|
headers: Record<string, unknown>;
|
|
/** The authorized team, or null for a provider-wide webhook secret. */
|
|
teamId: string | null;
|
|
}): Promise<void>;
|
|
}
|