fix: resolve file conflicts

This commit is contained in:
yassinedorbozgithub
2025-03-24 14:15:52 +01:00
28 changed files with 1241 additions and 370 deletions

View File

@@ -381,6 +381,7 @@ describe('NlpSampleController', () => {
expressions: [],
builtin: false,
entity: priceValueEntity!.id,
doc: '',
};
const textSample = {
text: 'How much does a BMW cost?',

View File

@@ -181,7 +181,11 @@ export class NlpSampleController extends BaseController<
*/
@Get('count')
async filterCount(
@Query(new SearchFilterPipe<NlpSample>({ allowedFields: ['text', 'type'] }))
@Query(
new SearchFilterPipe<NlpSample>({
allowedFields: ['text', 'type', 'language'],
}),
)
filters?: TFilterQuery<NlpSample>,
) {
return await this.count(filters);

View File

@@ -154,6 +154,7 @@ describe('NlpValueController', () => {
expressions: ['synonym1', 'synonym2'],
metadata: { firstkey: 'firstvalue', secondKey: 1995 },
builtin: false,
doc: '',
};
const result = await nlpValueController.create(value);
expect(result).toEqualPayload(value);
@@ -220,6 +221,7 @@ describe('NlpValueController', () => {
value: 'updated',
expressions: [],
builtin: true,
doc: '',
};
const result = await nlpValueController.updateOne(
positiveValue!.id,
@@ -238,6 +240,7 @@ describe('NlpValueController', () => {
value: 'updated',
expressions: [],
builtin: true,
doc: '',
}),
).rejects.toThrow(getUpdateOneError(NlpValue.name, jhonNlpValue!.id));
});

View File

@@ -93,7 +93,9 @@ export class NlpValueController extends BaseController<
@Get('count')
async filterCount(
@Query(
new SearchFilterPipe<NlpValue>({ allowedFields: ['entity', 'value'] }),
new SearchFilterPipe<NlpValue>({
allowedFields: ['entity', 'value', 'doc'],
}),
)
filters?: TFilterQuery<NlpValue>,
) {
@@ -142,7 +144,7 @@ export class NlpValueController extends BaseController<
@Query(PopulatePipe) populate: string[],
@Query(
new SearchFilterPipe<NlpValue>({
allowedFields: ['entity', 'value'],
allowedFields: ['entity', 'value', 'doc'],
}),
)
filters: TFilterQuery<NlpValue>,