Skip to content

Commit

Permalink
feat(lint): lint
Browse files Browse the repository at this point in the history
  • Loading branch information
tomer-shvadron committed May 1, 2024
1 parent 8e18b93 commit c755543
Show file tree
Hide file tree
Showing 11 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import {
ALERT_DEFINITIONS,
getAlertDefinitionCreateData,
} from '../../scripts/alerts/generate-alerts';
import { TExecutionDetails } from './types';

describe('AlertService', () => {
let prismaService: PrismaService;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsNotEmpty, IsString, IsOptional, IsBoolean, IsEnum } from 'class-validator';
import { IsNotEmpty, IsString, IsOptional, IsBoolean } from 'class-validator';

export class CreateAlertDefinitionDto {
@ApiProperty({ example: '[Payments] - High Cumulative Amount - Inbound' })
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ArgumentsHost, Catch, HttpException, HttpStatus } from '@nestjs/common';
import { ArgumentsHost, Catch, HttpStatus } from '@nestjs/common';
import { BaseExceptionFilter, HttpAdapterHost } from '@nestjs/core';
import { Prisma } from '@prisma/client';
import { PRISMA_UNIQUE_CONSTRAINT_ERROR } from '@/prisma/prisma.util';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Injectable } from '@nestjs/common';
import { CustomerRepository } from '@/customer/customer.repository';
import { Prisma, Project } from '@prisma/client';
import { Prisma } from '@prisma/client';
import { TCustomerWithDefinitionsFeatures } from '@/customer/types';
import { ApiKeyService } from '@/customer/api-key/api-key.service';
import { generateHashedKey } from '@/customer/api-key/utils';
Expand Down
1 change: 1 addition & 0 deletions services/workflows-service/src/data-analytics/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { TransactionDirection, PaymentMethod, TransactionRecordType } from '@prisma/client';
import { AggregateType, TIME_UNITS } from './consts';

export type InlineRule = {
id: string;
subjects: string[] | readonly string[];
Expand Down
1 change: 1 addition & 0 deletions services/workflows-service/src/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ export class ValidationError extends common.BadRequestException {

static fromClassValidator(error: ClassValidatorValidationError[]) {
const childrens = error[0]?.children ? error[0].children : [];

return new ValidationError(
[...error, ...childrens].map(({ property, constraints = {} }) => ({
message: `${Object.values(constraints).join(', ')}.`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { AppLoggerModule } from '@/common/app-logger/app-logger.module';
import { ClsMiddleware, ClsModule, ClsService } from 'nestjs-cls';
import { AuthKeyMiddleware } from '@/common/middlewares/auth-key.middleware';
import { CustomerModule } from '@/customer/customer.module';
import { CustomerService } from '@/customer/customer.service';
import { HttpModule } from '@nestjs/axios';
import { ApiKeyService } from '@/customer/api-key/api-key.service';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
} from '@prisma/client';
import {
IsBoolean,
IsDate,
IsDateString,
IsEnum,
IsNotEmpty,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ import {
PaymentProcessor,
PaymentType,
Project,
ReviewStatus,
TransactionDirection,
TransactionRecordStatus,
TransactionRecordType,
} from '@prisma/client';
import { createProject } from '@/test/helpers/create-project';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ export class TransactionEntityMapper {
};

let brandName;

if (altDto.tx_product.toLowerCase() in PaymentBrandName) {
brandName = altDto.tx_product.toLowerCase() as PaymentBrandName;
} else {
Expand Down Expand Up @@ -261,6 +262,7 @@ export class TransactionEntityMapper {
}

const errors = validateSync(Object.assign(new TransactionCreateDto(), originalDto));

if (errors.length > 0) {
throw new ValidationError(errors as any);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export class WebhooksService {

if (!config?.ongoingWorkflowDefinitionId) {
this.logger.error('No ongoing workflow definition found for project', { projectId });

return;
}

Expand Down

0 comments on commit c755543

Please sign in to comment.