hunk.code_window:       _environmentId: envId,
         _organizationId: orgId,
         providerId: 'sendgrid',
         channel: ChannelTypeEnum.EMAIL,
         credentials: {
           apiKey: '',
         },
         active: true,
       });
  
hunk.labels: keep keep keep keep keep replace keep keep keep
hunk.after_edit:         apiKey: 'SG.123',
  
hunk.file_path: apps/webhook/src/webhooks/e2e/email-webhook.e2e.ts
hunk.type: replace
file: import { ClassSerializerInterceptor, Controller, Get, Query, UseGuards, UseInterceptors } from '@nestjs/common';
  import { ApiTags, ApiOperation, ApiOkResponse } from '@nestjs/swagger';
  import { IJwtPayload } from '@novu/shared';
  import { UserSession } from '../shared/framework/user.decorator';
  import { JwtAuthGuard } from '../auth/framework/auth.guard';
  import { ExternalApiAccessible } from '../auth/framework/external-api.decorator';
  import { GetExecutionDetails } from './usecases/get-execution-details/get-execution-details.usecase';
  import { GetExecutionDetailsCommand } from './usecases/get-execution-details/get-execution-details.command';
  import { ExecutionDetailsResponseDto } from './dtos/execution-details-response.dto';
  
  @Controller('/execution-details')
  @UseInterceptors(ClassSerializerInterceptor)
  @UseGuards(JwtAuthGuard)
  @ApiTags('Execution Details')
  export class ExecutionDetailsController {
    constructor(private getExecutionDetails: GetExecutionDetails) {}
  
    @Get('/')
    @ApiOperation({
      summary: 'Get execution details',
    })
    @ApiOkResponse({
      type: [ExecutionDetailsResponseDto],
    })
    @ExternalApiAccessible()
    async getExecutionDetailsForNotification(
      @UserSession() user: IJwtPayload,
      @Query('notificationId') notificationId: string,
      @Query('subscriberId') subscriberId: string
    ): Promise<ExecutionDetailsResponseDto[]> {
      return this.getExecutionDetails.execute(
        GetExecutionDetailsCommand.create({
          organizationId: user.organizationId,
          environmentId: user.environmentId,
          userId: user._id,
          notificationId,
          subscriberId,
        })
      );
    }
  }
  