@asapjs/sequelize 0.10.44 → 1.0.0-20
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/console/index.js +4 -4
- package/dist/console/index.js.map +1 -1
- package/dist/dbml/index.d.ts.map +1 -1
- package/dist/dbml/index.js +2 -2
- package/dist/dbml/index.js.map +1 -1
- package/dist/dto/ExtendableDto.d.ts +42 -3
- package/dist/dto/ExtendableDto.d.ts.map +1 -1
- package/dist/dto/ExtendableDto.js +62 -49
- package/dist/dto/ExtendableDto.js.map +1 -1
- package/dist/dto/PaginationQueryDto.d.ts +2 -0
- package/dist/dto/PaginationQueryDto.d.ts.map +1 -1
- package/dist/dto/PaginationQueryDto.js +5 -4
- package/dist/dto/PaginationQueryDto.js.map +1 -1
- package/dist/dto/index.d.ts +2 -2
- package/dist/dto/index.d.ts.map +1 -1
- package/dist/dto/index.js +2 -2
- package/dist/dto/index.js.map +1 -1
- package/dist/index.d.ts +8 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +25 -4
- package/dist/index.js.map +1 -1
- package/dist/plugin.d.ts +8 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/plugin.js +68 -0
- package/dist/plugin.js.map +1 -0
- package/dist/repository/index.d.ts +18 -9
- package/dist/repository/index.d.ts.map +1 -1
- package/dist/repository/index.js +27 -24
- package/dist/repository/index.js.map +1 -1
- package/dist/sequelize/index.d.ts.map +1 -1
- package/dist/sequelize/index.js +47 -21
- package/dist/sequelize/index.js.map +1 -1
- package/dist/table/index.d.ts.map +1 -1
- package/dist/table/index.js +17 -3
- package/dist/table/index.js.map +1 -1
- package/dist/types/belongsto.d.ts +1 -1
- package/dist/types/belongsto.d.ts.map +1 -1
- package/dist/types/belongsto.js +6 -2
- package/dist/types/belongsto.js.map +1 -1
- package/dist/types/decorators.d.ts +4 -0
- package/dist/types/decorators.d.ts.map +1 -0
- package/dist/types/decorators.js +56 -0
- package/dist/types/decorators.js.map +1 -0
- package/dist/types/foreignkey.d.ts +1 -1
- package/dist/types/foreignkey.d.ts.map +1 -1
- package/dist/types/foreignkey.js +12 -7
- package/dist/types/foreignkey.js.map +1 -1
- package/dist/types/generators/toSequelizeGenerator.d.ts +1 -1
- package/dist/types/generators/toSequelizeGenerator.d.ts.map +1 -1
- package/dist/types/generators/toSwaggerGenerator.d.ts +1 -1
- package/dist/types/generators/toSwaggerGenerator.d.ts.map +1 -1
- package/dist/types/generators/typeGenerator.d.ts +1 -1
- package/dist/types/generators/typeGenerator.d.ts.map +1 -1
- package/dist/types/generators/typeGenerator.js +27 -4
- package/dist/types/generators/typeGenerator.js.map +1 -1
- package/dist/types/index.d.ts +5 -23
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +4 -38
- package/dist/types/index.js.map +1 -1
- package/dist/types/paging.d.ts +1 -1
- package/dist/types/paging.d.ts.map +1 -1
- package/dist/types/paging.js +3 -3
- package/dist/types/paging.js.map +1 -1
- package/dist/types/query.d.ts +1 -1
- package/dist/types/query.d.ts.map +1 -1
- package/dist/types/query.js +2 -2
- package/dist/types/query.js.map +1 -1
- package/dist/types/register.d.ts +2 -0
- package/dist/types/register.d.ts.map +1 -0
- package/dist/types/register.js +53 -0
- package/dist/types/register.js.map +1 -0
- package/dist/types/schema-extensions.d.ts +116 -0
- package/dist/types/schema-extensions.d.ts.map +1 -0
- package/dist/types/schema-extensions.js +150 -0
- package/dist/types/schema-extensions.js.map +1 -0
- package/dist/utils/getUserIdInQuery.d.ts.map +1 -1
- package/dist/utils/isClass.d.ts.map +1 -1
- package/dist/utils/promiseTimeout.d.ts.map +1 -1
- package/dist/utils/swagger.d.ts +4 -0
- package/dist/utils/swagger.d.ts.map +1 -0
- package/dist/utils/swagger.js +26 -0
- package/dist/utils/swagger.js.map +1 -0
- package/package.json +44 -33
- package/.yarnrc.yml +0 -1
- package/dist/types/array.d.ts +0 -7
- package/dist/types/array.d.ts.map +0 -1
- package/dist/types/array.js +0 -58
- package/dist/types/array.js.map +0 -1
- package/dist/types/base64.d.ts +0 -10
- package/dist/types/base64.d.ts.map +0 -1
- package/dist/types/base64.js +0 -20
- package/dist/types/base64.js.map +0 -1
- package/dist/types/bigint.d.ts +0 -12
- package/dist/types/bigint.d.ts.map +0 -1
- package/dist/types/bigint.js +0 -27
- package/dist/types/bigint.js.map +0 -1
- package/dist/types/binary.d.ts +0 -10
- package/dist/types/binary.d.ts.map +0 -1
- package/dist/types/binary.js +0 -20
- package/dist/types/binary.js.map +0 -1
- package/dist/types/boolean.d.ts +0 -9
- package/dist/types/boolean.d.ts.map +0 -1
- package/dist/types/boolean.js +0 -27
- package/dist/types/boolean.js.map +0 -1
- package/dist/types/dateonly.d.ts +0 -8
- package/dist/types/dateonly.d.ts.map +0 -1
- package/dist/types/dateonly.js +0 -20
- package/dist/types/dateonly.js.map +0 -1
- package/dist/types/datetime.d.ts +0 -8
- package/dist/types/datetime.d.ts.map +0 -1
- package/dist/types/datetime.js +0 -20
- package/dist/types/datetime.js.map +0 -1
- package/dist/types/decemal.d.ts +0 -11
- package/dist/types/decemal.d.ts.map +0 -1
- package/dist/types/decemal.js +0 -30
- package/dist/types/decemal.js.map +0 -1
- package/dist/types/double.d.ts +0 -11
- package/dist/types/double.d.ts.map +0 -1
- package/dist/types/double.js +0 -27
- package/dist/types/double.js.map +0 -1
- package/dist/types/dto.d.ts +0 -10
- package/dist/types/dto.d.ts.map +0 -1
- package/dist/types/dto.js +0 -23
- package/dist/types/dto.js.map +0 -1
- package/dist/types/enum.d.ts +0 -9
- package/dist/types/enum.d.ts.map +0 -1
- package/dist/types/enum.js +0 -26
- package/dist/types/enum.js.map +0 -1
- package/dist/types/float.d.ts +0 -11
- package/dist/types/float.d.ts.map +0 -1
- package/dist/types/float.js +0 -27
- package/dist/types/float.js.map +0 -1
- package/dist/types/int.d.ts +0 -12
- package/dist/types/int.d.ts.map +0 -1
- package/dist/types/int.js +0 -27
- package/dist/types/int.js.map +0 -1
- package/dist/types/json.d.ts +0 -9
- package/dist/types/json.d.ts.map +0 -1
- package/dist/types/json.js +0 -31
- package/dist/types/json.js.map +0 -1
- package/dist/types/long.d.ts +0 -12
- package/dist/types/long.d.ts.map +0 -1
- package/dist/types/long.js +0 -27
- package/dist/types/long.js.map +0 -1
- package/dist/types/password.d.ts +0 -6
- package/dist/types/password.d.ts.map +0 -1
- package/dist/types/password.js +0 -20
- package/dist/types/password.js.map +0 -1
- package/dist/types/string.d.ts +0 -11
- package/dist/types/string.d.ts.map +0 -1
- package/dist/types/string.js +0 -26
- package/dist/types/string.js.map +0 -1
- package/dist/types/text.d.ts +0 -9
- package/dist/types/text.d.ts.map +0 -1
- package/dist/types/text.js +0 -16
- package/dist/types/text.js.map +0 -1
- package/tsconfig.json +0 -21
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-extensions.js","sourceRoot":"","sources":["../../src/types/schema-extensions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,2CAA6G;AAuD7G,cAAc;AACd,MAAa,SAAU,SAAQ,uBAAmB;IAKjD,YAAY,OAAqB;QAChC,KAAK,CAAC,OAAO,CAAC,CAAC;QALhB,WAAM,GAAG,OAAO,CAAC;QAMhB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC;QAC7B,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAChC,CAAC;IAED,QAAQ,CAAC,KAAU;QAClB,mBAAmB;QACnB,OAAO,IAAI,CAAC;IACb,CAAC;IAED,KAAK,CAAC,KAAU;QACf,OAAO,KAAK,CAAC;IACd,CAAC;IAED,8CAA8C;IAC9C,OAAO;QACN,IAAI,IAAI,CAAC,UAAU,IAAI,IAAI;YAAE,OAAO,SAAS,CAAC;QAC9C,OAAO,OAAO,IAAI,CAAC,UAAU,KAAK,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC;IACpF,CAAC;I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;QAChE,CAAC;aAAM,CAAC;YACP,MAAM,kBAAkB,GAAyC,EAAE,CAAC;YACpE,IAAI,OAAO,CAAC,UAAU,IAAI,IAAI;gBAAE,kBAAkB,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;YACnF,IAAI,OAAO,CAAC,EAAE,IAAI,IAAI;gBAAE,kBAAkB,CAAC,EAAE,GAAG,OAAO,CAAC,EAAE,CAAC;YAC3D,IAAI,CAAC,2BAA2B;gBAC/B,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,SAAS,CAAC;QAC9E,CAAC;IACF,CAAC;IAED,QAAQ,CAAC,KAAU;QAClB,OAAO,IAAI,CAAC;IACb,CAAC;IAED,KAAK,CAAC,KAAU;QACf,OAAO,KAAK,CAAC;IACd,CAAC;IAED;;;;OAIG;IACH,WAAW;QAIV,MAAM,qBAAqB,GAC1B,IAAI,CAAC,qBAAqB,IAAI,CAAC,OAAO,IAAI,CAAC,MAAM,KAAK,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACrG,OAAO;YACN,qBAAqB;YACrB,mBAAmB,EAAE,IAAI,CAAC,2BAA2B;SACrD,CAAC;IACH,CAAC;CACD;AApDD,sCAoDC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getUserIdInQuery.d.ts","sourceRoot":"","sources":["../../src/utils/getUserIdInQuery.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"getUserIdInQuery.d.ts","sourceRoot":"","sources":["../../src/utils/getUserIdInQuery.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,GAAI,OAAO,GAAG,WAAuC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isClass.d.ts","sourceRoot":"","sources":["../../src/utils/isClass.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"isClass.d.ts","sourceRoot":"","sources":["../../src/utils/isClass.ts"],"names":[],"mappings":"yBAAgB,GAAG,GAAG;AAAtB,wBAAmE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"promiseTimeout.d.ts","sourceRoot":"","sources":["../../src/utils/promiseTimeout.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"promiseTimeout.d.ts","sourceRoot":"","sources":["../../src/utils/promiseTimeout.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,GAAa,IAAI,MAAM,EAAE,SAAS,OAAO,CAAC,GAAG,CAAC,KAAG,OAAO,CAAC,GAAG,CAMtF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"swagger.d.ts","sourceRoot":"","sources":["../../src/utils/swagger.ts"],"names":[],"mappings":"AAMA,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,GAAG,EAAE,yBAAyB,EAAE,GAAG,QAGjF;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,GAAG,OAKlC;AAED,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,OAKrD"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Temporary functions to avoid circular dependency
|
|
3
|
+
// These will be injected by the router plugin at runtime
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.setSwaggerFunctions = setSwaggerFunctions;
|
|
6
|
+
exports.addScheme = addScheme;
|
|
7
|
+
exports.generateSchemeRefWithName = generateSchemeRefWithName;
|
|
8
|
+
let addSchemeFunc;
|
|
9
|
+
let generateSchemeRefWithNameFunc;
|
|
10
|
+
function setSwaggerFunctions(addScheme, generateSchemeRefWithName) {
|
|
11
|
+
addSchemeFunc = addScheme;
|
|
12
|
+
generateSchemeRefWithNameFunc = generateSchemeRefWithName;
|
|
13
|
+
}
|
|
14
|
+
function addScheme(data) {
|
|
15
|
+
if (addSchemeFunc) {
|
|
16
|
+
return addSchemeFunc(data);
|
|
17
|
+
}
|
|
18
|
+
// No-op if not initialized
|
|
19
|
+
}
|
|
20
|
+
function generateSchemeRefWithName(name) {
|
|
21
|
+
if (generateSchemeRefWithNameFunc) {
|
|
22
|
+
return generateSchemeRefWithNameFunc(name);
|
|
23
|
+
}
|
|
24
|
+
return `#/components/schemas/${name}`;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=swagger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"swagger.js","sourceRoot":"","sources":["../../src/utils/swagger.ts"],"names":[],"mappings":";AAAA,mDAAmD;AACnD,yDAAyD;;AAKzD,kDAGC;AAED,8BAKC;AAED,8DAKC;AApBD,IAAI,aAAkB,CAAC;AACvB,IAAI,6BAAkC,CAAC;AAEvC,SAAgB,mBAAmB,CAAC,SAAc,EAAE,yBAA8B;IAChF,aAAa,GAAG,SAAS,CAAC;IAC1B,6BAA6B,GAAG,yBAAyB,CAAC;AAC5D,CAAC;AAED,SAAgB,SAAS,CAAC,IAAS;IACjC,IAAI,aAAa,EAAE,CAAC;QAClB,OAAO,aAAa,CAAC,IAAI,CAAC,CAAC;IAC7B,CAAC;IACD,2BAA2B;AAC7B,CAAC;AAED,SAAgB,yBAAyB,CAAC,IAAY;IACpD,IAAI,6BAA6B,EAAE,CAAC;QAClC,OAAO,6BAA6B,CAAC,IAAI,CAAC,CAAC;IAC7C,CAAC;IACD,OAAO,wBAAwB,IAAI,EAAE,CAAC;AACxC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,35 +1,46 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
2
|
+
"name": "@asapjs/sequelize",
|
|
3
|
+
"version": "1.0.0-20",
|
|
4
|
+
"description": "Sequelize integration for AsapJS",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist"
|
|
9
|
+
],
|
|
10
|
+
"scripts": {
|
|
11
|
+
"prebuild": "rm -rf dist",
|
|
12
|
+
"build": "tsc"
|
|
13
|
+
},
|
|
14
|
+
"author": "",
|
|
15
|
+
"license": "ISC",
|
|
16
|
+
"homepage": "https://www.asapjs.com",
|
|
17
|
+
"publishConfig": {
|
|
18
|
+
"access": "public"
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"@asapjs/common": "^1.0.0-20",
|
|
22
|
+
"@asapjs/schema": "^1.0.0-alpha.18",
|
|
23
|
+
"@asapjs/types": "^1.0.0-20",
|
|
24
|
+
"body-parser": "^1.20.3",
|
|
25
|
+
"cors": "^2.8.5",
|
|
26
|
+
"express": "^4.20.0",
|
|
27
|
+
"fs": "^0.0.1-security",
|
|
28
|
+
"reflect-metadata": "^0.1.13",
|
|
29
|
+
"winston": "^3.6.0"
|
|
30
|
+
},
|
|
31
|
+
"peerDependencies": {
|
|
32
|
+
"sequelize": "^6.29.0",
|
|
33
|
+
"sequelize-typescript": "^2.1.6"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@types/body-parser": "^1.19.2",
|
|
37
|
+
"@types/cors": "^2.8.12",
|
|
38
|
+
"@types/express": "^4.17.13",
|
|
39
|
+
"@types/node": "^17.0.21",
|
|
40
|
+
"@types/sequelize": "^4.28.11",
|
|
41
|
+
"sequelize": "^6.29.0",
|
|
42
|
+
"sequelize-typescript": "^2.1.6",
|
|
43
|
+
"typescript": "^5.8.3"
|
|
44
|
+
},
|
|
45
|
+
"gitHead": "495b01b36c21ece3bf8f96bbf6f9d851d2c19464"
|
|
35
46
|
}
|
package/.yarnrc.yml
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
nodeLinker: node-modules
|
package/dist/types/array.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { DtoOrTypeIs } from './index';
|
|
2
|
-
import { TypeIsData } from './generators/typeGenerator';
|
|
3
|
-
export declare const TypeIsArrayToSwagger: (options?: (DtoOrTypeIs & import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>) | undefined) => import("./generators/toSwaggerGenerator").ISwaggerData;
|
|
4
|
-
export declare const TypeIsArrayFixValue: (o: any) => any;
|
|
5
|
-
declare const TypeIsArray: (...options: (import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>> | DtoOrTypeIs)[]) => (target?: any, propertyName?: string | undefined, propertyDescriptor?: PropertyDescriptor | undefined) => void & TypeIsData;
|
|
6
|
-
export default TypeIsArray;
|
|
7
|
-
//# sourceMappingURL=array.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../src/types/array.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAiB,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAMvE,eAAO,MAAM,oBAAoB,wLA+B/B,CAAC;AAEH,eAAO,MAAM,mBAAmB,MAAO,GAAG,QAOzC,CAAC;AAEF,QAAA,MAAM,WAAW,qPAId,CAAC;AAEJ,eAAe,WAAW,CAAC"}
|
package/dist/types/array.js
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.TypeIsArrayFixValue = exports.TypeIsArrayToSwagger = void 0;
|
|
7
|
-
const typeGenerator_1 = require("./generators/typeGenerator");
|
|
8
|
-
const isClass_1 = __importDefault(require("../utils/isClass"));
|
|
9
|
-
const toSwaggerGenerator_1 = require("./generators/toSwaggerGenerator");
|
|
10
|
-
const router_1 = require("@asapjs/router");
|
|
11
|
-
exports.TypeIsArrayToSwagger = (0, toSwaggerGenerator_1.toSwaggerGenerator)((options) => {
|
|
12
|
-
var _a;
|
|
13
|
-
const isDto = (0, isClass_1.default)(options);
|
|
14
|
-
const generateScheme = (items) => ({
|
|
15
|
-
type: 'array',
|
|
16
|
-
items,
|
|
17
|
-
});
|
|
18
|
-
if (isDto) {
|
|
19
|
-
const dto = new options();
|
|
20
|
-
const name = `${dto.constructor.name}_ARRAY`;
|
|
21
|
-
(0, router_1.addScheme)({
|
|
22
|
-
name,
|
|
23
|
-
data: generateScheme(dto.swagger()),
|
|
24
|
-
});
|
|
25
|
-
return {
|
|
26
|
-
$ref: `#/components/schemas/${name}`,
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
else {
|
|
30
|
-
const type = options();
|
|
31
|
-
const name = `TYPE_${type.__name.toUpperCase()}_ARRAY`;
|
|
32
|
-
(0, router_1.addScheme)({
|
|
33
|
-
name,
|
|
34
|
-
data: generateScheme((_a = type.toSwagger) === null || _a === void 0 ? void 0 : _a.call(type)),
|
|
35
|
-
});
|
|
36
|
-
return {
|
|
37
|
-
$ref: `#/components/schemas/${name}`,
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
const TypeIsArrayFixValue = (o) => {
|
|
42
|
-
try {
|
|
43
|
-
if (typeof o === 'string')
|
|
44
|
-
return JSON.parse(String(o));
|
|
45
|
-
return o;
|
|
46
|
-
}
|
|
47
|
-
catch (_a) {
|
|
48
|
-
return o;
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
exports.TypeIsArrayFixValue = TypeIsArrayFixValue;
|
|
52
|
-
const TypeIsArray = (0, typeGenerator_1.typeGenerator)((options) => ({
|
|
53
|
-
__name: 'array',
|
|
54
|
-
toSwagger: () => (0, exports.TypeIsArrayToSwagger)(options),
|
|
55
|
-
fixValue: exports.TypeIsArrayFixValue,
|
|
56
|
-
}));
|
|
57
|
-
exports.default = TypeIsArray;
|
|
58
|
-
//# sourceMappingURL=array.js.map
|
package/dist/types/array.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"array.js","sourceRoot":"","sources":["../../src/types/array.ts"],"names":[],"mappings":";;;;;;AACA,8DAAuE;AACvE,+DAAuC;AAEvC,wEAAqE;AACrE,2CAA2C;AAE9B,QAAA,oBAAoB,GAAG,IAAA,uCAAkB,EAAc,CAAC,OAAO,EAAE,EAAE;;IAC9E,MAAM,KAAK,GAAG,IAAA,iBAAO,EAAC,OAAO,CAAC,CAAC;IAE/B,MAAM,cAAc,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,CAAC;QACtC,IAAI,EAAE,OAAO;QACb,KAAK;KACN,CAAC,CAAC;IAEH,IAAI,KAAK,EAAE;QACT,MAAM,GAAG,GAAG,IAAK,OAAgC,EAAE,CAAC;QACpD,MAAM,IAAI,GAAG,GAAG,GAAG,CAAC,WAAW,CAAC,IAAI,QAAQ,CAAC;QAC7C,IAAA,kBAAS,EAAC;YACR,IAAI;YACJ,IAAI,EAAE,cAAc,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;SACpC,CAAC,CAAC;QAEH,OAAO;YACL,IAAI,EAAE,wBAAwB,IAAI,EAAE;SACrC,CAAC;KACH;SAAM;QACL,MAAM,IAAI,GAAI,OAA4B,EAAE,CAAC;QAC7C,MAAM,IAAI,GAAG,QAAQ,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,QAAQ,CAAC;QACvD,IAAA,kBAAS,EAAC;YACR,IAAI;YACJ,IAAI,EAAE,cAAc,CAAC,MAAA,IAAI,CAAC,SAAS,oDAAI,CAAC;SACzC,CAAC,CAAC;QAEH,OAAO;YACL,IAAI,EAAE,wBAAwB,IAAI,EAAE;SACrC,CAAC;KACH;AACH,CAAC,CAAC,CAAC;AAEI,MAAM,mBAAmB,GAAG,CAAC,CAAM,EAAE,EAAE;IAC5C,IAAI;QACF,IAAI,OAAO,CAAC,KAAK,QAAQ;YAAE,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QACxD,OAAO,CAAC,CAAC;KACV;IAAC,WAAM;QACN,OAAO,CAAC,CAAC;KACV;AACH,CAAC,CAAC;AAPW,QAAA,mBAAmB,uBAO9B;AAEF,MAAM,WAAW,GAAG,IAAA,6BAAa,EAAc,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IAC3D,MAAM,EAAE,OAAO;IACf,SAAS,EAAE,GAAG,EAAE,CAAC,IAAA,4BAAoB,EAAC,OAAO,CAAC;IAC9C,QAAQ,EAAE,2BAAmB;CAC9B,CAAC,CAAC,CAAC;AAEJ,kBAAe,WAAW,CAAC"}
|
package/dist/types/base64.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { BlobSize } from 'sequelize';
|
|
2
|
-
export interface TypeIsBase64Option {
|
|
3
|
-
length?: BlobSize;
|
|
4
|
-
comment?: string;
|
|
5
|
-
}
|
|
6
|
-
export declare const TypeIsBase64ToSwagger: (options?: (TypeIsBase64Option & import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>) | undefined) => import("./generators/toSwaggerGenerator").ISwaggerData;
|
|
7
|
-
export declare const TypeIsBase64ToSequelize: (options?: (TypeIsBase64Option & import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>) | undefined) => import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>;
|
|
8
|
-
declare const TypeIsBase64: (...options: (import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>> | TypeIsBase64Option)[]) => (target?: any, propertyName?: string | undefined, propertyDescriptor?: PropertyDescriptor | undefined) => void & import("./generators/typeGenerator").TypeIsData;
|
|
9
|
-
export default TypeIsBase64;
|
|
10
|
-
//# sourceMappingURL=base64.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base64.d.ts","sourceRoot":"","sources":["../../src/types/base64.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAa,MAAM,WAAW,CAAC;AAKhD,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,QAAQ,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,qBAAqB,+LAI/B,CAAC;AAEJ,eAAO,MAAM,uBAAuB,6NAIjC,CAAC;AAEJ,QAAA,MAAM,YAAY,iSAIf,CAAC;AAEJ,eAAe,YAAY,CAAC"}
|
package/dist/types/base64.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TypeIsBase64ToSequelize = exports.TypeIsBase64ToSwagger = void 0;
|
|
4
|
-
const sequelize_1 = require("sequelize");
|
|
5
|
-
const toSequelizeGenerator_1 = require("./generators/toSequelizeGenerator");
|
|
6
|
-
const toSwaggerGenerator_1 = require("./generators/toSwaggerGenerator");
|
|
7
|
-
const typeGenerator_1 = require("./generators/typeGenerator");
|
|
8
|
-
exports.TypeIsBase64ToSwagger = (0, toSwaggerGenerator_1.toSwaggerGenerator)((options) => ({
|
|
9
|
-
type: 'string',
|
|
10
|
-
format: 'byte',
|
|
11
|
-
description: options === null || options === void 0 ? void 0 : options.comment,
|
|
12
|
-
}));
|
|
13
|
-
exports.TypeIsBase64ToSequelize = (0, toSequelizeGenerator_1.toSequelizeGenerator)((options) => (Object.assign(Object.assign({}, options), { type: sequelize_1.DataTypes.BLOB(options === null || options === void 0 ? void 0 : options.length), comment: options === null || options === void 0 ? void 0 : options.comment })));
|
|
14
|
-
const TypeIsBase64 = (0, typeGenerator_1.typeGenerator)((options) => ({
|
|
15
|
-
__name: 'base64',
|
|
16
|
-
toSwagger: () => (0, exports.TypeIsBase64ToSwagger)(options),
|
|
17
|
-
toSequelize: () => (0, exports.TypeIsBase64ToSequelize)(options),
|
|
18
|
-
}));
|
|
19
|
-
exports.default = TypeIsBase64;
|
|
20
|
-
//# sourceMappingURL=base64.js.map
|
package/dist/types/base64.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base64.js","sourceRoot":"","sources":["../../src/types/base64.ts"],"names":[],"mappings":";;;AAAA,yCAAgD;AAChD,4EAAyE;AACzE,wEAAqE;AACrE,8DAA2D;AAO9C,QAAA,qBAAqB,GAAG,IAAA,uCAAkB,EAAqB,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IACxF,IAAI,EAAE,QAAQ;IACd,MAAM,EAAE,MAAM;IACd,WAAW,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO;CAC9B,CAAC,CAAC,CAAC;AAES,QAAA,uBAAuB,GAAG,IAAA,2CAAoB,EAAqB,CAAC,OAAO,EAAE,EAAE,CAAC,iCACxF,OAAO,KACV,IAAI,EAAE,qBAAS,CAAC,IAAI,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,CAAC,EACrC,OAAO,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,IACzB,CAAC,CAAC;AAEJ,MAAM,YAAY,GAAG,IAAA,6BAAa,EAAqB,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IACnE,MAAM,EAAE,QAAQ;IAChB,SAAS,EAAE,GAAG,EAAE,CAAC,IAAA,6BAAqB,EAAC,OAAO,CAAC;IAC/C,WAAW,EAAE,GAAG,EAAE,CAAC,IAAA,+BAAuB,EAAC,OAAO,CAAC;CACpD,CAAC,CAAC,CAAC;AAEJ,kBAAe,YAAY,CAAC"}
|
package/dist/types/bigint.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export interface TypeIsBigIntOption {
|
|
2
|
-
decimals?: number;
|
|
3
|
-
precision?: number;
|
|
4
|
-
scale?: number;
|
|
5
|
-
comment?: string;
|
|
6
|
-
}
|
|
7
|
-
export declare const TypeIsIntToSwagger: (options?: (TypeIsBigIntOption & import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>) | undefined) => import("./generators/toSwaggerGenerator").ISwaggerData;
|
|
8
|
-
export declare const TypeIsIntToSequelize: (options?: (TypeIsBigIntOption & import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>) | undefined) => import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>;
|
|
9
|
-
export declare const TypeIsIntFixValue: (o: any) => any;
|
|
10
|
-
declare const TypeIsInt: (...options: (import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>> | TypeIsBigIntOption)[]) => (target?: any, propertyName?: string | undefined, propertyDescriptor?: PropertyDescriptor | undefined) => void & import("./generators/typeGenerator").TypeIsData;
|
|
11
|
-
export default TypeIsInt;
|
|
12
|
-
//# sourceMappingURL=bigint.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bigint.d.ts","sourceRoot":"","sources":["../../src/types/bigint.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,kBAAkB,+LAI5B,CAAC;AAEJ,eAAO,MAAM,oBAAoB,6NAI9B,CAAC;AAEJ,eAAO,MAAM,iBAAiB,MAAO,GAAG,QAGvC,CAAC;AAEF,QAAA,MAAM,SAAS,iSAKZ,CAAC;AAEJ,eAAe,SAAS,CAAC"}
|
package/dist/types/bigint.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TypeIsIntFixValue = exports.TypeIsIntToSequelize = exports.TypeIsIntToSwagger = void 0;
|
|
4
|
-
const sequelize_1 = require("sequelize");
|
|
5
|
-
const toSequelizeGenerator_1 = require("./generators/toSequelizeGenerator");
|
|
6
|
-
const toSwaggerGenerator_1 = require("./generators/toSwaggerGenerator");
|
|
7
|
-
const typeGenerator_1 = require("./generators/typeGenerator");
|
|
8
|
-
exports.TypeIsIntToSwagger = (0, toSwaggerGenerator_1.toSwaggerGenerator)((options) => ({
|
|
9
|
-
type: 'integer',
|
|
10
|
-
format: 'int32',
|
|
11
|
-
description: options === null || options === void 0 ? void 0 : options.comment,
|
|
12
|
-
}));
|
|
13
|
-
exports.TypeIsIntToSequelize = (0, toSequelizeGenerator_1.toSequelizeGenerator)((options) => (Object.assign(Object.assign({}, options), { type: sequelize_1.DataTypes.BIGINT(options), comment: options === null || options === void 0 ? void 0 : options.comment })));
|
|
14
|
-
const TypeIsIntFixValue = (o) => {
|
|
15
|
-
if (o === undefined || o === null)
|
|
16
|
-
return o;
|
|
17
|
-
return parseInt(String(o), 10);
|
|
18
|
-
};
|
|
19
|
-
exports.TypeIsIntFixValue = TypeIsIntFixValue;
|
|
20
|
-
const TypeIsInt = (0, typeGenerator_1.typeGenerator)((options) => ({
|
|
21
|
-
__name: 'bigint',
|
|
22
|
-
toSwagger: () => (0, exports.TypeIsIntToSwagger)(options),
|
|
23
|
-
toSequelize: () => (0, exports.TypeIsIntToSequelize)(options),
|
|
24
|
-
fixValue: exports.TypeIsIntFixValue,
|
|
25
|
-
}));
|
|
26
|
-
exports.default = TypeIsInt;
|
|
27
|
-
//# sourceMappingURL=bigint.js.map
|
package/dist/types/bigint.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bigint.js","sourceRoot":"","sources":["../../src/types/bigint.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AACtC,4EAAyE;AACzE,wEAAqE;AACrE,8DAA2D;AAS9C,QAAA,kBAAkB,GAAG,IAAA,uCAAkB,EAAqB,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IACrF,IAAI,EAAE,SAAS;IACf,MAAM,EAAE,OAAO;IACf,WAAW,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO;CAC9B,CAAC,CAAC,CAAC;AAES,QAAA,oBAAoB,GAAG,IAAA,2CAAoB,EAAqB,CAAC,OAAO,EAAE,EAAE,CAAC,iCACrF,OAAO,KACV,IAAI,EAAE,qBAAS,CAAC,MAAM,CAAC,OAAO,CAAC,EAC/B,OAAO,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,IACzB,CAAC,CAAC;AAEG,MAAM,iBAAiB,GAAG,CAAC,CAAM,EAAE,EAAE;IAC1C,IAAI,CAAC,KAAK,SAAS,IAAI,CAAC,KAAK,IAAI;QAAE,OAAO,CAAC,CAAC;IAC5C,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AACjC,CAAC,CAAC;AAHW,QAAA,iBAAiB,qBAG5B;AAEF,MAAM,SAAS,GAAG,IAAA,6BAAa,EAAqB,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IAChE,MAAM,EAAE,QAAQ;IAChB,SAAS,EAAE,GAAG,EAAE,CAAC,IAAA,0BAAkB,EAAC,OAAO,CAAC;IAC5C,WAAW,EAAE,GAAG,EAAE,CAAC,IAAA,4BAAoB,EAAC,OAAO,CAAC;IAChD,QAAQ,EAAE,yBAAiB;CAC5B,CAAC,CAAC,CAAC;AAEJ,kBAAe,SAAS,CAAC"}
|
package/dist/types/binary.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { BlobSize } from 'sequelize';
|
|
2
|
-
export interface TypeIsBinaryOption {
|
|
3
|
-
length?: BlobSize;
|
|
4
|
-
comment?: string;
|
|
5
|
-
}
|
|
6
|
-
export declare const TypeIsBinaryToSwagger: (options?: (TypeIsBinaryOption & import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>) | undefined) => import("./generators/toSwaggerGenerator").ISwaggerData;
|
|
7
|
-
export declare const TypeIsBinaryToSequelize: (options?: (TypeIsBinaryOption & import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>) | undefined) => import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>;
|
|
8
|
-
declare const TypeIsBinary: (...options: (import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>> | TypeIsBinaryOption)[]) => (target?: any, propertyName?: string | undefined, propertyDescriptor?: PropertyDescriptor | undefined) => void & import("./generators/typeGenerator").TypeIsData;
|
|
9
|
-
export default TypeIsBinary;
|
|
10
|
-
//# sourceMappingURL=binary.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"binary.d.ts","sourceRoot":"","sources":["../../src/types/binary.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAa,MAAM,WAAW,CAAC;AAKhD,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,QAAQ,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,qBAAqB,+LAI/B,CAAC;AAEJ,eAAO,MAAM,uBAAuB,6NAIjC,CAAC;AAEJ,QAAA,MAAM,YAAY,iSAIf,CAAC;AAEJ,eAAe,YAAY,CAAC"}
|
package/dist/types/binary.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TypeIsBinaryToSequelize = exports.TypeIsBinaryToSwagger = void 0;
|
|
4
|
-
const sequelize_1 = require("sequelize");
|
|
5
|
-
const toSequelizeGenerator_1 = require("./generators/toSequelizeGenerator");
|
|
6
|
-
const toSwaggerGenerator_1 = require("./generators/toSwaggerGenerator");
|
|
7
|
-
const typeGenerator_1 = require("./generators/typeGenerator");
|
|
8
|
-
exports.TypeIsBinaryToSwagger = (0, toSwaggerGenerator_1.toSwaggerGenerator)((options) => ({
|
|
9
|
-
type: 'string',
|
|
10
|
-
format: 'binary',
|
|
11
|
-
description: options === null || options === void 0 ? void 0 : options.comment,
|
|
12
|
-
}));
|
|
13
|
-
exports.TypeIsBinaryToSequelize = (0, toSequelizeGenerator_1.toSequelizeGenerator)((options) => (Object.assign(Object.assign({}, options), { type: sequelize_1.DataTypes.BLOB(options === null || options === void 0 ? void 0 : options.length), comment: options === null || options === void 0 ? void 0 : options.comment })));
|
|
14
|
-
const TypeIsBinary = (0, typeGenerator_1.typeGenerator)((options) => ({
|
|
15
|
-
__name: 'binary',
|
|
16
|
-
toSwagger: () => (0, exports.TypeIsBinaryToSwagger)(options),
|
|
17
|
-
toSequelize: () => (0, exports.TypeIsBinaryToSequelize)(options),
|
|
18
|
-
}));
|
|
19
|
-
exports.default = TypeIsBinary;
|
|
20
|
-
//# sourceMappingURL=binary.js.map
|
package/dist/types/binary.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"binary.js","sourceRoot":"","sources":["../../src/types/binary.ts"],"names":[],"mappings":";;;AAAA,yCAAgD;AAChD,4EAAyE;AACzE,wEAAqE;AACrE,8DAA2D;AAO9C,QAAA,qBAAqB,GAAG,IAAA,uCAAkB,EAAqB,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IACxF,IAAI,EAAE,QAAQ;IACd,MAAM,EAAE,QAAQ;IAChB,WAAW,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO;CAC9B,CAAC,CAAC,CAAC;AAES,QAAA,uBAAuB,GAAG,IAAA,2CAAoB,EAAqB,CAAC,OAAO,EAAE,EAAE,CAAC,iCACxF,OAAO,KACV,IAAI,EAAE,qBAAS,CAAC,IAAI,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,CAAC,EACrC,OAAO,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,IACzB,CAAC,CAAC;AAEJ,MAAM,YAAY,GAAG,IAAA,6BAAa,EAAqB,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IACnE,MAAM,EAAE,QAAQ;IAChB,SAAS,EAAE,GAAG,EAAE,CAAC,IAAA,6BAAqB,EAAC,OAAO,CAAC;IAC/C,WAAW,EAAE,GAAG,EAAE,CAAC,IAAA,+BAAuB,EAAC,OAAO,CAAC;CACpD,CAAC,CAAC,CAAC;AAEJ,kBAAe,YAAY,CAAC"}
|
package/dist/types/boolean.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export interface TypeIsBooleanOption {
|
|
2
|
-
comment?: string;
|
|
3
|
-
}
|
|
4
|
-
export declare const TypeIsBooleanToSwagger: (options?: (TypeIsBooleanOption & import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>) | undefined) => import("./generators/toSwaggerGenerator").ISwaggerData;
|
|
5
|
-
export declare const TypeIsBooleanToSequelize: (options?: (TypeIsBooleanOption & import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>) | undefined) => import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>;
|
|
6
|
-
export declare const TypeIsBooleanFixValue: (o: any) => any;
|
|
7
|
-
declare const TypeIsBoolean: (...options: (import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>> | TypeIsBooleanOption)[]) => (target?: any, propertyName?: string | undefined, propertyDescriptor?: PropertyDescriptor | undefined) => void & import("./generators/typeGenerator").TypeIsData;
|
|
8
|
-
export default TypeIsBoolean;
|
|
9
|
-
//# sourceMappingURL=boolean.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"boolean.d.ts","sourceRoot":"","sources":["../../src/types/boolean.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,mBAAmB;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,sBAAsB,gMAGhC,CAAC;AAEJ,eAAO,MAAM,wBAAwB,8NAIlC,CAAC;AAEJ,eAAO,MAAM,qBAAqB,MAAO,GAAG,QAI3C,CAAC;AAEF,QAAA,MAAM,aAAa,kSAKhB,CAAC;AAEJ,eAAe,aAAa,CAAC"}
|
package/dist/types/boolean.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TypeIsBooleanFixValue = exports.TypeIsBooleanToSequelize = exports.TypeIsBooleanToSwagger = void 0;
|
|
4
|
-
const sequelize_1 = require("sequelize");
|
|
5
|
-
const toSequelizeGenerator_1 = require("./generators/toSequelizeGenerator");
|
|
6
|
-
const toSwaggerGenerator_1 = require("./generators/toSwaggerGenerator");
|
|
7
|
-
const typeGenerator_1 = require("./generators/typeGenerator");
|
|
8
|
-
exports.TypeIsBooleanToSwagger = (0, toSwaggerGenerator_1.toSwaggerGenerator)((options) => ({
|
|
9
|
-
type: 'boolean',
|
|
10
|
-
description: options === null || options === void 0 ? void 0 : options.comment,
|
|
11
|
-
}));
|
|
12
|
-
exports.TypeIsBooleanToSequelize = (0, toSequelizeGenerator_1.toSequelizeGenerator)((options) => (Object.assign(Object.assign({}, options), { type: sequelize_1.DataTypes.BOOLEAN, comment: options === null || options === void 0 ? void 0 : options.comment })));
|
|
13
|
-
const TypeIsBooleanFixValue = (o) => {
|
|
14
|
-
if (o === undefined || o === null)
|
|
15
|
-
return o;
|
|
16
|
-
const v = String(o) === 'true' ? true : String(o) === 'false' ? false : !!o;
|
|
17
|
-
return Boolean(v);
|
|
18
|
-
};
|
|
19
|
-
exports.TypeIsBooleanFixValue = TypeIsBooleanFixValue;
|
|
20
|
-
const TypeIsBoolean = (0, typeGenerator_1.typeGenerator)((options) => ({
|
|
21
|
-
__name: 'boolean',
|
|
22
|
-
toSwagger: () => (0, exports.TypeIsBooleanToSwagger)(options),
|
|
23
|
-
toSequelize: () => (0, exports.TypeIsBooleanToSequelize)(options),
|
|
24
|
-
fixValue: exports.TypeIsBooleanFixValue,
|
|
25
|
-
}));
|
|
26
|
-
exports.default = TypeIsBoolean;
|
|
27
|
-
//# sourceMappingURL=boolean.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"boolean.js","sourceRoot":"","sources":["../../src/types/boolean.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AACtC,4EAAyE;AACzE,wEAAqE;AACrE,8DAA2D;AAM9C,QAAA,sBAAsB,GAAG,IAAA,uCAAkB,EAAsB,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IAC1F,IAAI,EAAE,SAAS;IACf,WAAW,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO;CAC9B,CAAC,CAAC,CAAC;AAES,QAAA,wBAAwB,GAAG,IAAA,2CAAoB,EAAsB,CAAC,OAAO,EAAE,EAAE,CAAC,iCAC1F,OAAO,KACV,IAAI,EAAE,qBAAS,CAAC,OAAO,EACvB,OAAO,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,IACzB,CAAC,CAAC;AAEG,MAAM,qBAAqB,GAAG,CAAC,CAAM,EAAE,EAAE;IAC9C,IAAI,CAAC,KAAK,SAAS,IAAI,CAAC,KAAK,IAAI;QAAE,OAAO,CAAC,CAAC;IAC5C,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5E,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC,CAAC;AAJW,QAAA,qBAAqB,yBAIhC;AAEF,MAAM,aAAa,GAAG,IAAA,6BAAa,EAAsB,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IACrE,MAAM,EAAE,SAAS;IACjB,SAAS,EAAE,GAAG,EAAE,CAAC,IAAA,8BAAsB,EAAC,OAAO,CAAC;IAChD,WAAW,EAAE,GAAG,EAAE,CAAC,IAAA,gCAAwB,EAAC,OAAO,CAAC;IACpD,QAAQ,EAAE,6BAAqB;CAChC,CAAC,CAAC,CAAC;AAEJ,kBAAe,aAAa,CAAC"}
|
package/dist/types/dateonly.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export interface TypeIsDateOnlyOption {
|
|
2
|
-
comment?: string;
|
|
3
|
-
}
|
|
4
|
-
export declare const TypeIsDateOnlyToSwagger: (options?: (TypeIsDateOnlyOption & import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>) | undefined) => import("./generators/toSwaggerGenerator").ISwaggerData;
|
|
5
|
-
export declare const TypeIsDateOnlyToSequelize: (options?: (TypeIsDateOnlyOption & import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>) | undefined) => import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>;
|
|
6
|
-
declare const TypeIsDateOnly: (...options: (import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>> | TypeIsDateOnlyOption)[]) => (target?: any, propertyName?: string | undefined, propertyDescriptor?: PropertyDescriptor | undefined) => void & import("./generators/typeGenerator").TypeIsData;
|
|
7
|
-
export default TypeIsDateOnly;
|
|
8
|
-
//# sourceMappingURL=dateonly.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dateonly.d.ts","sourceRoot":"","sources":["../../src/types/dateonly.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,oBAAoB;IACnC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,uBAAuB,iMAIjC,CAAC;AAEJ,eAAO,MAAM,yBAAyB,+NAInC,CAAC;AAEJ,QAAA,MAAM,cAAc,mSAIjB,CAAC;AAEJ,eAAe,cAAc,CAAC"}
|
package/dist/types/dateonly.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TypeIsDateOnlyToSequelize = exports.TypeIsDateOnlyToSwagger = void 0;
|
|
4
|
-
const sequelize_1 = require("sequelize");
|
|
5
|
-
const toSequelizeGenerator_1 = require("./generators/toSequelizeGenerator");
|
|
6
|
-
const toSwaggerGenerator_1 = require("./generators/toSwaggerGenerator");
|
|
7
|
-
const typeGenerator_1 = require("./generators/typeGenerator");
|
|
8
|
-
exports.TypeIsDateOnlyToSwagger = (0, toSwaggerGenerator_1.toSwaggerGenerator)((options) => ({
|
|
9
|
-
type: 'string',
|
|
10
|
-
format: 'date',
|
|
11
|
-
description: options === null || options === void 0 ? void 0 : options.comment,
|
|
12
|
-
}));
|
|
13
|
-
exports.TypeIsDateOnlyToSequelize = (0, toSequelizeGenerator_1.toSequelizeGenerator)((options) => (Object.assign(Object.assign({}, options), { type: sequelize_1.DataTypes.DATEONLY(), comment: options === null || options === void 0 ? void 0 : options.comment })));
|
|
14
|
-
const TypeIsDateOnly = (0, typeGenerator_1.typeGenerator)((options) => ({
|
|
15
|
-
__name: 'date',
|
|
16
|
-
toSwagger: () => (0, exports.TypeIsDateOnlyToSwagger)(options),
|
|
17
|
-
toSequelize: () => (0, exports.TypeIsDateOnlyToSequelize)(options),
|
|
18
|
-
}));
|
|
19
|
-
exports.default = TypeIsDateOnly;
|
|
20
|
-
//# sourceMappingURL=dateonly.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dateonly.js","sourceRoot":"","sources":["../../src/types/dateonly.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AACtC,4EAAyE;AACzE,wEAAqE;AACrE,8DAA2D;AAM9C,QAAA,uBAAuB,GAAG,IAAA,uCAAkB,EAAuB,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IAC5F,IAAI,EAAE,QAAQ;IACd,MAAM,EAAE,MAAM;IACd,WAAW,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO;CAC9B,CAAC,CAAC,CAAC;AAES,QAAA,yBAAyB,GAAG,IAAA,2CAAoB,EAAuB,CAAC,OAAO,EAAE,EAAE,CAAC,iCAC5F,OAAO,KACV,IAAI,EAAE,qBAAS,CAAC,QAAQ,EAAE,EAC1B,OAAO,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,IACzB,CAAC,CAAC;AAEJ,MAAM,cAAc,GAAG,IAAA,6BAAa,EAAuB,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IACvE,MAAM,EAAE,MAAM;IACd,SAAS,EAAE,GAAG,EAAE,CAAC,IAAA,+BAAuB,EAAC,OAAO,CAAC;IACjD,WAAW,EAAE,GAAG,EAAE,CAAC,IAAA,iCAAyB,EAAC,OAAO,CAAC;CACtD,CAAC,CAAC,CAAC;AAEJ,kBAAe,cAAc,CAAC"}
|
package/dist/types/datetime.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export interface TypeIsDateTimeOption {
|
|
2
|
-
comment?: string;
|
|
3
|
-
}
|
|
4
|
-
export declare const TypeIsDateTimeToSwagger: (options?: (TypeIsDateTimeOption & import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>) | undefined) => import("./generators/toSwaggerGenerator").ISwaggerData;
|
|
5
|
-
export declare const TypeIsDateTimeToSequelize: (options?: (TypeIsDateTimeOption & import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>) | undefined) => import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>;
|
|
6
|
-
declare const TypeIsDateTime: (...options: (import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>> | TypeIsDateTimeOption)[]) => (target?: any, propertyName?: string | undefined, propertyDescriptor?: PropertyDescriptor | undefined) => void & import("./generators/typeGenerator").TypeIsData;
|
|
7
|
-
export default TypeIsDateTime;
|
|
8
|
-
//# sourceMappingURL=datetime.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"datetime.d.ts","sourceRoot":"","sources":["../../src/types/datetime.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,oBAAoB;IACnC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,uBAAuB,iMAIjC,CAAC;AAEJ,eAAO,MAAM,yBAAyB,+NAInC,CAAC;AAEJ,QAAA,MAAM,cAAc,mSAIjB,CAAC;AAEJ,eAAe,cAAc,CAAC"}
|
package/dist/types/datetime.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TypeIsDateTimeToSequelize = exports.TypeIsDateTimeToSwagger = void 0;
|
|
4
|
-
const sequelize_1 = require("sequelize");
|
|
5
|
-
const toSequelizeGenerator_1 = require("./generators/toSequelizeGenerator");
|
|
6
|
-
const toSwaggerGenerator_1 = require("./generators/toSwaggerGenerator");
|
|
7
|
-
const typeGenerator_1 = require("./generators/typeGenerator");
|
|
8
|
-
exports.TypeIsDateTimeToSwagger = (0, toSwaggerGenerator_1.toSwaggerGenerator)((options) => ({
|
|
9
|
-
type: 'string',
|
|
10
|
-
format: 'date-time',
|
|
11
|
-
description: options === null || options === void 0 ? void 0 : options.comment,
|
|
12
|
-
}));
|
|
13
|
-
exports.TypeIsDateTimeToSequelize = (0, toSequelizeGenerator_1.toSequelizeGenerator)((options) => (Object.assign(Object.assign({}, options), { type: sequelize_1.DataTypes.DATE(), comment: options === null || options === void 0 ? void 0 : options.comment })));
|
|
14
|
-
const TypeIsDateTime = (0, typeGenerator_1.typeGenerator)((options) => ({
|
|
15
|
-
__name: 'datetime',
|
|
16
|
-
toSwagger: () => (0, exports.TypeIsDateTimeToSwagger)(options),
|
|
17
|
-
toSequelize: () => (0, exports.TypeIsDateTimeToSequelize)(options),
|
|
18
|
-
}));
|
|
19
|
-
exports.default = TypeIsDateTime;
|
|
20
|
-
//# sourceMappingURL=datetime.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"datetime.js","sourceRoot":"","sources":["../../src/types/datetime.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AACtC,4EAAyE;AACzE,wEAAqE;AACrE,8DAA2D;AAM9C,QAAA,uBAAuB,GAAG,IAAA,uCAAkB,EAAuB,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IAC5F,IAAI,EAAE,QAAQ;IACd,MAAM,EAAE,WAAW;IACnB,WAAW,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO;CAC9B,CAAC,CAAC,CAAC;AAES,QAAA,yBAAyB,GAAG,IAAA,2CAAoB,EAAuB,CAAC,OAAO,EAAE,EAAE,CAAC,iCAC5F,OAAO,KACV,IAAI,EAAE,qBAAS,CAAC,IAAI,EAAE,EACtB,OAAO,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,IACzB,CAAC,CAAC;AAEJ,MAAM,cAAc,GAAG,IAAA,6BAAa,EAAuB,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IACvE,MAAM,EAAE,UAAU;IAClB,SAAS,EAAE,GAAG,EAAE,CAAC,IAAA,+BAAuB,EAAC,OAAO,CAAC;IACjD,WAAW,EAAE,GAAG,EAAE,CAAC,IAAA,iCAAyB,EAAC,OAAO,CAAC;CACtD,CAAC,CAAC,CAAC;AAEJ,kBAAe,cAAc,CAAC"}
|
package/dist/types/decemal.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export interface TypeIsDecemalOption {
|
|
2
|
-
precision: number;
|
|
3
|
-
scale: number;
|
|
4
|
-
comment?: string;
|
|
5
|
-
}
|
|
6
|
-
export declare const TypeIsDecemalToSwagger: (options?: (TypeIsDecemalOption & import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>) | undefined) => import("./generators/toSwaggerGenerator").ISwaggerData;
|
|
7
|
-
export declare const TypeIsDecemalToSequelize: (options?: (TypeIsDecemalOption & import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>) | undefined) => import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>;
|
|
8
|
-
export declare const TypeIsDecemalFixValue: (o: any) => any;
|
|
9
|
-
declare const TypeIsDecemal: (...options: (import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>> | TypeIsDecemalOption)[]) => (target?: any, propertyName?: string | undefined, propertyDescriptor?: PropertyDescriptor | undefined) => void & import("./generators/typeGenerator").TypeIsData;
|
|
10
|
-
export default TypeIsDecemal;
|
|
11
|
-
//# sourceMappingURL=decemal.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"decemal.d.ts","sourceRoot":"","sources":["../../src/types/decemal.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,sBAAsB,gMAIhC,CAAC;AAEJ,eAAO,MAAM,wBAAwB,8NAOlC,CAAC;AAEJ,eAAO,MAAM,qBAAqB,MAAO,GAAG,QAG3C,CAAC;AAEF,QAAA,MAAM,aAAa,kSAKhB,CAAC;AAEJ,eAAe,aAAa,CAAC"}
|
package/dist/types/decemal.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TypeIsDecemalFixValue = exports.TypeIsDecemalToSequelize = exports.TypeIsDecemalToSwagger = void 0;
|
|
4
|
-
const sequelize_1 = require("sequelize");
|
|
5
|
-
const toSequelizeGenerator_1 = require("./generators/toSequelizeGenerator");
|
|
6
|
-
const toSwaggerGenerator_1 = require("./generators/toSwaggerGenerator");
|
|
7
|
-
const typeGenerator_1 = require("./generators/typeGenerator");
|
|
8
|
-
exports.TypeIsDecemalToSwagger = (0, toSwaggerGenerator_1.toSwaggerGenerator)((options) => ({
|
|
9
|
-
type: 'integer',
|
|
10
|
-
format: 'float',
|
|
11
|
-
description: options === null || options === void 0 ? void 0 : options.comment,
|
|
12
|
-
}));
|
|
13
|
-
exports.TypeIsDecemalToSequelize = (0, toSequelizeGenerator_1.toSequelizeGenerator)((options) => (Object.assign(Object.assign({}, options), { type: sequelize_1.DataTypes.DECIMAL({
|
|
14
|
-
precision: options === null || options === void 0 ? void 0 : options.precision,
|
|
15
|
-
scale: options === null || options === void 0 ? void 0 : options.scale,
|
|
16
|
-
}), comment: options === null || options === void 0 ? void 0 : options.comment })));
|
|
17
|
-
const TypeIsDecemalFixValue = (o) => {
|
|
18
|
-
if (o === undefined || o === null)
|
|
19
|
-
return o;
|
|
20
|
-
return parseFloat(String(o));
|
|
21
|
-
};
|
|
22
|
-
exports.TypeIsDecemalFixValue = TypeIsDecemalFixValue;
|
|
23
|
-
const TypeIsDecemal = (0, typeGenerator_1.typeGenerator)((options) => ({
|
|
24
|
-
__name: 'decimal',
|
|
25
|
-
toSwagger: () => (0, exports.TypeIsDecemalToSwagger)(options),
|
|
26
|
-
toSequelize: () => (0, exports.TypeIsDecemalToSequelize)(options),
|
|
27
|
-
fixValue: exports.TypeIsDecemalFixValue,
|
|
28
|
-
}));
|
|
29
|
-
exports.default = TypeIsDecemal;
|
|
30
|
-
//# sourceMappingURL=decemal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AE,6BAAqB;CAChC,CAAC,CAAC,CAAC;AAEJ,kBAAe,aAAa,CAAC"}
|
package/dist/types/double.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export interface TypeIsDoubleOption {
|
|
2
|
-
length?: number;
|
|
3
|
-
decimals?: number;
|
|
4
|
-
comment?: string;
|
|
5
|
-
}
|
|
6
|
-
export declare const TypeIsDoubleToSwagger: (options?: (TypeIsDoubleOption & import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>) | undefined) => import("./generators/toSwaggerGenerator").ISwaggerData;
|
|
7
|
-
export declare const TypeIsDoubleToSequelize: (options?: (TypeIsDoubleOption & import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>) | undefined) => import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>;
|
|
8
|
-
export declare const TypeIsDoubleFixValue: (o: any) => any;
|
|
9
|
-
declare const TypeIsDouble: (...options: (import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>> | TypeIsDoubleOption)[]) => (target?: any, propertyName?: string | undefined, propertyDescriptor?: PropertyDescriptor | undefined) => void & import("./generators/typeGenerator").TypeIsData;
|
|
10
|
-
export default TypeIsDouble;
|
|
11
|
-
//# sourceMappingURL=double.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"double.d.ts","sourceRoot":"","sources":["../../src/types/double.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,qBAAqB,+LAI/B,CAAC;AAEJ,eAAO,MAAM,uBAAuB,6NAIjC,CAAC;AAEJ,eAAO,MAAM,oBAAoB,MAAO,GAAG,QAG1C,CAAC;AAEF,QAAA,MAAM,YAAY,iSAKf,CAAC;AAEJ,eAAe,YAAY,CAAC"}
|
package/dist/types/double.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TypeIsDoubleFixValue = exports.TypeIsDoubleToSequelize = exports.TypeIsDoubleToSwagger = void 0;
|
|
4
|
-
const sequelize_1 = require("sequelize");
|
|
5
|
-
const toSequelizeGenerator_1 = require("./generators/toSequelizeGenerator");
|
|
6
|
-
const toSwaggerGenerator_1 = require("./generators/toSwaggerGenerator");
|
|
7
|
-
const typeGenerator_1 = require("./generators/typeGenerator");
|
|
8
|
-
exports.TypeIsDoubleToSwagger = (0, toSwaggerGenerator_1.toSwaggerGenerator)((options) => ({
|
|
9
|
-
type: 'number',
|
|
10
|
-
format: 'double',
|
|
11
|
-
description: options === null || options === void 0 ? void 0 : options.comment,
|
|
12
|
-
}));
|
|
13
|
-
exports.TypeIsDoubleToSequelize = (0, toSequelizeGenerator_1.toSequelizeGenerator)((options) => (Object.assign(Object.assign({}, options), { type: sequelize_1.DataTypes.DOUBLE(options === null || options === void 0 ? void 0 : options.length, options === null || options === void 0 ? void 0 : options.decimals), comment: options === null || options === void 0 ? void 0 : options.comment })));
|
|
14
|
-
const TypeIsDoubleFixValue = (o) => {
|
|
15
|
-
if (o === undefined || o === null)
|
|
16
|
-
return o;
|
|
17
|
-
return parseFloat(String(o));
|
|
18
|
-
};
|
|
19
|
-
exports.TypeIsDoubleFixValue = TypeIsDoubleFixValue;
|
|
20
|
-
const TypeIsDouble = (0, typeGenerator_1.typeGenerator)((options) => ({
|
|
21
|
-
__name: 'double',
|
|
22
|
-
toSwagger: () => (0, exports.TypeIsDoubleToSwagger)(options),
|
|
23
|
-
toSequelize: () => (0, exports.TypeIsDoubleToSequelize)(options),
|
|
24
|
-
fixValue: exports.TypeIsDoubleFixValue,
|
|
25
|
-
}));
|
|
26
|
-
exports.default = TypeIsDouble;
|
|
27
|
-
//# sourceMappingURL=double.js.map
|
package/dist/types/double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