Skip to content

Commit

Permalink
chore: update interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
tnramalho committed Sep 24, 2024
1 parent 4fc962a commit 7fcd134
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { ReportInterface } from '@concepta/ts-common';
import { ReportCreatableInterface } from '@concepta/ts-common';
import { ReportGeneratorResultInterface } from './report-generator-result.interface';

export interface ReportStrategyServiceInterface {
generate(report: ReportInterface): Promise<ReportGeneratorResultInterface>;
getDownloadUrl(report: ReportInterface): Promise<string>;
generate(
report: ReportCreatableInterface,
): Promise<ReportGeneratorResultInterface>;
getDownloadUrl(report: ReportCreatableInterface): Promise<string>;
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { ReportCreatableInterface } from '@concepta/ts-common';
import { mapNonErrorToException } from '@concepta/ts-core';
import { ReportGeneratorServiceNotFoundException } from '../exceptions/report-generator-service-not-found.exception';
import { ReportTimeoutException } from '../exceptions/report-timeout.exception';
import { ReportEntityInterface } from '../interfaces/report-entity.interface';
import { ReportGeneratorResultInterface } from '../interfaces/report-generator-result.interface';
import { ReportGeneratorServiceInterface } from '../interfaces/report-generator-service.interface';
import { ReportSettingsInterface } from '../interfaces/report-settings.interface';
Expand All @@ -25,7 +24,7 @@ export class ReportStrategyService implements ReportStrategyServiceInterface {
}

async generate(
report: ReportEntityInterface,
report: ReportCreatableInterface,
): Promise<ReportGeneratorResultInterface> {
try {
const generatorService = this.resolveGeneratorService(report);
Expand Down
4 changes: 2 additions & 2 deletions packages/nestjs-report/src/services/report.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export class ReportService implements ReportServiceInterface {
}

protected async generateAndProcessReport(
reportDb: ReportEntityInterface,
reportDb: ReportInterface,
): Promise<void> {
try {
const result = await this.reportStrategyService.generate(reportDb);
Expand Down Expand Up @@ -109,7 +109,7 @@ export class ReportService implements ReportServiceInterface {
}

protected async addDownloadUrl(
report: ReportEntityInterface,
report: ReportInterface,
): Promise<ReportEntityInterface> {
if (report.file?.id) {
try {
Expand Down

0 comments on commit 7fcd134

Please sign in to comment.