@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.
@@ -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("@hapi/joi"));
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,
@@ -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("@hapi/joi");
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;
@@ -1,2 +1,3 @@
1
- declare const CustomFieldsSchema: any;
1
+ import Joi from 'joi';
2
+ declare const CustomFieldsSchema: Joi.ObjectSchema<any>;
2
3
  export { CustomFieldsSchema };
@@ -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("@hapi/joi"));
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("@hapi/joi"));
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.1",
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",
@@ -1,4 +1,4 @@
1
- import Joi from '@hapi/joi';
1
+ import Joi from 'joi';
2
2
  import { CustomFieldDefinitionType } from '../../../utils/validations/type';
3
3
 
4
4
  const ValidationSchema = Joi.when('fieldType', {
@@ -1,5 +1,5 @@
1
1
  import { handleError, BadRequest } from '@autofleet/errors';
2
- import { ValidationError as InputValidationError } from '@hapi/joi';
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) => {
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable import/prefer-default-export */
2
- import Joi from '@hapi/joi';
2
+ import Joi from 'joi';
3
3
 
4
4
  const CustomFieldsSchema = Joi.object().pattern(
5
5
  Joi.string(),
@@ -1,4 +1,4 @@
1
- import Joi from '@hapi/joi';
1
+ import Joi from 'joi';
2
2
  /**
3
3
  * Supported custom field types
4
4
  */