@punks/backend-entity-manager 0.0.352 → 0.0.353
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/abstractions/serializer.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/abstractions/serializer.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -11,7 +11,7 @@ export type EntitySerializerColumnParseAction<TSheetItem> = (value: any, item: T
|
|
|
11
11
|
export type EntitySerializerColumnConverter<TSheetItem> = (value: any, item: TSheetItem) => any;
|
|
12
12
|
export type EntitySerializerColumnValidator<TSheetItem> = {
|
|
13
13
|
key: string;
|
|
14
|
-
fn: (
|
|
14
|
+
fn: (item: TSheetItem) => ImportEntryValidationResult;
|
|
15
15
|
};
|
|
16
16
|
export type EntitySerializerColumnDefinition<TSheetItem> = {
|
|
17
17
|
name: string;
|
package/dist/esm/index.js
CHANGED
|
@@ -234,7 +234,7 @@ class EntitySerializer {
|
|
|
234
234
|
const validationErrors = [];
|
|
235
235
|
for (const column of definition.columns) {
|
|
236
236
|
for (const validator of column.validators ?? []) {
|
|
237
|
-
const result = validator.fn(
|
|
237
|
+
const result = validator.fn(entity);
|
|
238
238
|
if (!result.isValid) {
|
|
239
239
|
validationErrors.push({
|
|
240
240
|
errorCode: validator.key,
|