fix: remove unsued utils

This commit is contained in:
MohamedAliBouhaouala 2025-05-06 15:34:21 +01:00 committed by Mohamed Marrouchi
parent bab2e3082f
commit 04a008b6fd
2 changed files with 0 additions and 20 deletions

View File

@ -8,8 +8,6 @@
import { z } from 'zod'; import { z } from 'zod';
import { BlockFull } from '../block.schema';
import { PayloadType } from './button'; import { PayloadType } from './button';
export const payloadPatternSchema = z.object({ export const payloadPatternSchema = z.object({
@ -59,19 +57,3 @@ export const patternSchema = z.union([
]); ]);
export type Pattern = z.infer<typeof patternSchema>; export type Pattern = z.infer<typeof patternSchema>;
export type NlpPatternMatchResult = {
block: BlockFull;
matchedPattern: NlpPattern[];
};
export function isNlpPattern(pattern: NlpPattern) {
return (
(typeof pattern === 'object' &&
pattern !== null &&
'entity' in pattern &&
'match' in pattern &&
pattern.match === 'entity') ||
pattern.match === 'value'
);
}

View File

@ -13,7 +13,6 @@ import {
IsIn, IsIn,
IsInt, IsInt,
IsNotEmpty, IsNotEmpty,
IsNumber,
IsOptional, IsOptional,
IsString, IsString,
Matches, Matches,
@ -56,7 +55,6 @@ export class NlpEntityCreateDto {
type: Number, type: Number,
minimum: 1, minimum: 1,
}) })
@IsNumber()
@IsOptional() @IsOptional()
@Min(1, { message: 'Weight must be a positive integer' }) @Min(1, { message: 'Weight must be a positive integer' })
@IsInt({ message: 'Weight must be an integer' }) @IsInt({ message: 'Weight must be an integer' })