[DO_NOT_MERGE] Refactor/templating rev2 #49
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes several changes to rename
HookProcessorFactorytoHookFactoryand to introduce templating functionality for hook processing. The most important changes include renaming the factory, adding templating classes, and updating related tests and modules.Renaming and Refactoring:
apps/api/src/hook/hook.factory.ts: RenamedHookProcessorFactorytoHookFactoryand added ahookTemplatingMapfor managing templating classes. [1] [2]apps/api/src/hook/hook.factory.spec.ts: Updated references fromHookProcessorFactorytoHookFactoryin the test file. [1] [2] [3] [4]apps/api/src/manifest/manifest.service.ts: Updated references fromHookProcessorFactorytoHookFactoryand removed thetransformTemplateValuesmethod in favor of using the new templating classes. [1] [2] [3] [4] [5]Adding Templating Functionality:
apps/api/src/hook/templater/hook.templating.ts: Introduced theHookTemplatingabstract class andHookTemplatingInterfacefor templating hooks.apps/api/src/hook/templater/datacord.hook.templating.ts: AddedDataCordTemplatingclass extendingHookTemplating.apps/api/src/hook/templater/email.hook.templating.ts: AddedEmailTemplatingclass extendingHookTemplating.apps/api/src/hook/templater/webhook.hook.templating.ts: AddedWebhookTemplatingclass extendingHookTemplating.Updating Related Tests and Modules:
apps/api/src/hook/hook.module.ts: Updated providers and exports to useHookFactoryand added templating classes.apps/api/src/manifest/manifest.controller.spec.ts: Updated references fromHookProcessorFactorytoHookFactoryin the test file. [1] [2]apps/api/src/manifest/manifest.service.spec.ts: Updated references fromHookProcessorFactorytoHookFactoryin the test file. [1] [2] [3] [4]apps/api/src/queue/hook.queue.spec.ts: Updated references fromHookProcessorFactorytoHookFactoryin the test file. [1] [2]Simplifying Webhook Processor:
apps/api/src/hook/processors/webhook.processor.ts: Simplified thesendWebhookAsyncmethod to use the new headers structure.apps/api/src/hook/processors/webhook.processor.spec.ts: Updated tests to use the new headers structure. [1] [2] [3]