hunk.code_window: import { SubscribersService } from '@novu/testing/src';
   import axios from 'axios';
   import * as sinon from 'sinon';
   const USER_MAIL_DOMAIN = 'mail.domain.com';
  
hunk.labels: keep keep add keep keep
hunk.after_edit: import { CompileTemplate } from '@novu/application-generic';
  
hunk.file_path: apps/api/src/app/inbound-parse/e2e/inbound-email-parse.e2e.ts
hunk.type: add
file: import { BaseRepository } from '../base-repository';
  import { MessageTemplate } from './message-template.schema';
  import { MessageTemplateEntity, MessageTemplateDBModel } from './message-template.entity';
  import type { EnforceEnvOrOrgIds } from '../../types/enforce';
  
  export class MessageTemplateRepository extends BaseRepository<
    MessageTemplateDBModel,
    MessageTemplateEntity,
    EnforceEnvOrOrgIds
  > {
    constructor() {
      super(MessageTemplate, MessageTemplateEntity);
    }
  
    async getMessageTemplatesByFeed(environmentId: string, feedId: string) {
      return await this.find({
        _environmentId: environmentId,
        _feedId: feedId,
      });
    }
  
    async getMessageTemplatesByLayout(_environmentId: string, _layoutId: string, pagination?: { limit?: number }) {
      return await this.find(
        {
          _environmentId,
          _layoutId,
        },
        {},
        pagination
      );
    }
  }
  