* add webhook version schema * version the code * update version from numeric to date val * migration * update schema and build factory * update string * move version picker * tooltip instead of infobadge * -- * fix type * -- * fix type * fix type * -- * fix messed up merge * improvements to payloadfactory * extract version off of DB and instead keep it in IWebhookRepository * fix webhookform * fix type safety and routing ambiguity * scalable with easier factory extensions and base definition * fix types * -- * -- * clean up prisma/client type imports * fix * type fix * type fix * cleanup * add tests and registry changes * unintended file inclusion * type-fix * select in repo * -- * explicit return type * -- * fix type * fixes * feedback 1 * feedback 2 * use enum instead of string * fixes
42 lines
1.7 KiB
TypeScript
42 lines
1.7 KiB
TypeScript
import { createContainer } from "@evyweb/ioctopus";
|
|
|
|
import { moduleLoader as loggerModuleLoader } from "../../shared/services/logger.service";
|
|
import { taskerServiceModule } from "../../shared/services/tasker.service";
|
|
import { SHARED_TOKENS } from "../../shared/shared.tokens";
|
|
import { WEBHOOK_TOKENS } from "../Webhooks.tokens";
|
|
import { webhookModule } from "../modules/Webhook.module";
|
|
|
|
export const webhookContainer = createContainer();
|
|
|
|
// Load shared infrastructure
|
|
loggerModuleLoader.loadModule(webhookContainer);
|
|
webhookContainer.load(SHARED_TOKENS.TASKER, taskerServiceModule);
|
|
|
|
// Load webhook module
|
|
webhookContainer.load(WEBHOOK_TOKENS.WEBHOOK_REPOSITORY, webhookModule);
|
|
webhookContainer.load(WEBHOOK_TOKENS.WEBHOOK_SERVICE, webhookModule);
|
|
webhookContainer.load(WEBHOOK_TOKENS.BOOKING_WEBHOOK_SERVICE, webhookModule);
|
|
webhookContainer.load(WEBHOOK_TOKENS.FORM_WEBHOOK_SERVICE, webhookModule);
|
|
webhookContainer.load(WEBHOOK_TOKENS.RECORDING_WEBHOOK_SERVICE, webhookModule);
|
|
webhookContainer.load(WEBHOOK_TOKENS.OOO_WEBHOOK_SERVICE, webhookModule);
|
|
webhookContainer.load(WEBHOOK_TOKENS.PAYLOAD_BUILDER_FACTORY, webhookModule);
|
|
webhookContainer.load(WEBHOOK_TOKENS.WEBHOOK_NOTIFICATION_HANDLER, webhookModule);
|
|
webhookContainer.load(WEBHOOK_TOKENS.WEBHOOK_NOTIFIER, webhookModule);
|
|
|
|
// Service getters
|
|
export function getBookingWebhookService() {
|
|
return webhookContainer.get(WEBHOOK_TOKENS.BOOKING_WEBHOOK_SERVICE);
|
|
}
|
|
|
|
export function getFormWebhookService() {
|
|
return webhookContainer.get(WEBHOOK_TOKENS.FORM_WEBHOOK_SERVICE);
|
|
}
|
|
|
|
export function getRecordingWebhookService() {
|
|
return webhookContainer.get(WEBHOOK_TOKENS.RECORDING_WEBHOOK_SERVICE);
|
|
}
|
|
|
|
export function getWebhookNotifier() {
|
|
return webhookContainer.get(WEBHOOK_TOKENS.WEBHOOK_NOTIFIER);
|
|
}
|