@autofleet/sadot 0.5.1 → 0.5.2
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/api/v1/definition/validations.d.ts +2 -2
- package/dist/api/v1/definition/validations.js +1 -1
- package/dist/api/v1/errors.js +1 -1
- package/dist/utils/validations/custom-fields.d.ts +2 -1
- package/dist/utils/validations/custom-fields.js +1 -1
- package/dist/utils/validations/type.js +1 -1
- package/package.json +2 -2
- package/src/api/v1/definition/validations.ts +1 -1
- package/src/api/v1/errors.ts +1 -1
- package/src/utils/validations/custom-fields.ts +1 -1
- package/src/utils/validations/type.ts +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const validateCustomFieldDefinitionCreation: (payload: any) => any
|
|
2
|
-
export declare const validateCustomFieldDefinitionUpdate: (payload: any) => any
|
|
1
|
+
export declare const validateCustomFieldDefinitionCreation: (payload: any) => Promise<any>;
|
|
2
|
+
export declare const validateCustomFieldDefinitionUpdate: (payload: any) => Promise<any>;
|
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.validateCustomFieldDefinitionUpdate = exports.validateCustomFieldDefinitionCreation = void 0;
|
|
7
|
-
const joi_1 = __importDefault(require("
|
|
7
|
+
const joi_1 = __importDefault(require("joi"));
|
|
8
8
|
const type_1 = require("../../../utils/validations/type");
|
|
9
9
|
const ValidationSchema = joi_1.default.when('fieldType', {
|
|
10
10
|
is: type_1.CustomFieldDefinitionType.SELECT,
|
package/dist/api/v1/errors.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const errors_1 = require("@autofleet/errors");
|
|
4
|
-
const joi_1 = require("
|
|
4
|
+
const joi_1 = require("joi");
|
|
5
5
|
const sequelize_1 = require("sequelize");
|
|
6
6
|
exports.default = (err, res, additionalData = undefined) => {
|
|
7
7
|
let error = err;
|
|
@@ -5,6 +5,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.CustomFieldsSchema = void 0;
|
|
7
7
|
/* eslint-disable import/prefer-default-export */
|
|
8
|
-
const joi_1 = __importDefault(require("
|
|
8
|
+
const joi_1 = __importDefault(require("joi"));
|
|
9
9
|
const CustomFieldsSchema = joi_1.default.object().pattern(joi_1.default.string(), joi_1.default.any());
|
|
10
10
|
exports.CustomFieldsSchema = CustomFieldsSchema;
|
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.CustomFieldDefinitionType = void 0;
|
|
7
|
-
const joi_1 = __importDefault(require("
|
|
7
|
+
const joi_1 = __importDefault(require("joi"));
|
|
8
8
|
/**
|
|
9
9
|
* Supported custom field types
|
|
10
10
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@autofleet/sadot",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"@autofleet/errors": "^1.0.10",
|
|
16
16
|
"@autofleet/events": "^2.0.0",
|
|
17
17
|
"@autofleet/logger": "^2.0.5",
|
|
18
|
-
"@hapi/joi": "^17.1.1",
|
|
19
18
|
"express": "^4.18.2",
|
|
19
|
+
"joi": "^17.7.0",
|
|
20
20
|
"pg": "^8.10.0",
|
|
21
21
|
"reflect-metadata": "^0.1.13",
|
|
22
22
|
"sequelize": "^6.31.1",
|
package/src/api/v1/errors.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { handleError, BadRequest } from '@autofleet/errors';
|
|
2
|
-
import { ValidationError as InputValidationError } from '
|
|
2
|
+
import { ValidationError as InputValidationError } from 'joi';
|
|
3
3
|
import { ValidationError as DatabaseValidationError } from 'sequelize';
|
|
4
4
|
|
|
5
5
|
export default (err, res, additionalData = undefined) => {
|