@asapjs/sequelize 0.10.6 → 0.10.13
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/package.json +3 -4
- package/dist/console/index.d.ts +0 -23
- package/dist/console/index.d.ts.map +0 -1
- package/dist/console/index.js +0 -65
- package/dist/console/index.js.map +0 -1
- package/dist/dbml/index.d.ts +0 -5
- package/dist/dbml/index.d.ts.map +0 -1
- package/dist/dbml/index.js +0 -127
- package/dist/dbml/index.js.map +0 -1
- package/dist/dto/ExtendableDto.d.ts +0 -27
- package/dist/dto/ExtendableDto.d.ts.map +0 -1
- package/dist/dto/ExtendableDto.js +0 -145
- package/dist/dto/ExtendableDto.js.map +0 -1
- package/dist/dto/PaginationQueryDto.d.ts +0 -6
- package/dist/dto/PaginationQueryDto.d.ts.map +0 -1
- package/dist/dto/PaginationQueryDto.js +0 -25
- package/dist/dto/PaginationQueryDto.js.map +0 -1
- package/dist/dto/index.d.ts +0 -10
- package/dist/dto/index.d.ts.map +0 -1
- package/dist/dto/index.js +0 -23
- package/dist/dto/index.js.map +0 -1
- package/dist/index.d.ts +0 -9
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -29
- package/dist/index.js.map +0 -1
- package/dist/repository/index.d.ts +0 -24
- package/dist/repository/index.d.ts.map +0 -1
- package/dist/repository/index.js +0 -74
- package/dist/repository/index.js.map +0 -1
- package/dist/sequelize/index.d.ts +0 -11
- package/dist/sequelize/index.d.ts.map +0 -1
- package/dist/sequelize/index.js +0 -120
- package/dist/sequelize/index.js.map +0 -1
- package/dist/table/index.d.ts +0 -4
- package/dist/table/index.d.ts.map +0 -1
- package/dist/table/index.js +0 -44
- package/dist/table/index.js.map +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/belongsto.d.ts +0 -6
- package/dist/types/belongsto.d.ts.map +0 -1
- package/dist/types/belongsto.js +0 -27
- package/dist/types/belongsto.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/foreignkey.d.ts +0 -6
- package/dist/types/foreignkey.d.ts.map +0 -1
- package/dist/types/foreignkey.js +0 -33
- package/dist/types/foreignkey.js.map +0 -1
- package/dist/types/generators/toSequelizeGenerator.d.ts +0 -3
- package/dist/types/generators/toSequelizeGenerator.d.ts.map +0 -1
- package/dist/types/generators/toSequelizeGenerator.js +0 -6
- package/dist/types/generators/toSequelizeGenerator.js.map +0 -1
- package/dist/types/generators/toSwaggerGenerator.d.ts +0 -10
- package/dist/types/generators/toSwaggerGenerator.d.ts.map +0 -1
- package/dist/types/generators/toSwaggerGenerator.js +0 -6
- package/dist/types/generators/toSwaggerGenerator.js.map +0 -1
- package/dist/types/generators/typeGenerator.d.ts +0 -18
- package/dist/types/generators/typeGenerator.d.ts.map +0 -1
- package/dist/types/generators/typeGenerator.js +0 -42
- package/dist/types/generators/typeGenerator.js.map +0 -1
- package/dist/types/index.d.ts +0 -26
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -54
- package/dist/types/index.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/paging.d.ts +0 -6
- package/dist/types/paging.d.ts.map +0 -1
- package/dist/types/paging.js +0 -81
- package/dist/types/paging.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/query.d.ts +0 -20
- package/dist/types/query.d.ts.map +0 -1
- package/dist/types/query.js +0 -32
- package/dist/types/query.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/dist/types/type.d.ts +0 -7
- package/dist/types/type.d.ts.map +0 -1
- package/dist/types/type.js +0 -3
- package/dist/types/type.js.map +0 -1
- package/dist/utils/getUserIdInQuery.d.ts +0 -2
- package/dist/utils/getUserIdInQuery.d.ts.map +0 -1
- package/dist/utils/getUserIdInQuery.js +0 -6
- package/dist/utils/getUserIdInQuery.js.map +0 -1
- package/dist/utils/isClass.d.ts +0 -3
- package/dist/utils/isClass.d.ts.map +0 -1
- package/dist/utils/isClass.js +0 -4
- package/dist/utils/isClass.js.map +0 -1
package/dist/types/json.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export interface TypeIsJsonOption {
|
|
2
|
-
comment?: string;
|
|
3
|
-
}
|
|
4
|
-
export declare const TypeIsJsonToSwagger: (options?: (TypeIsJsonOption & import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>) | undefined) => import("./generators/toSwaggerGenerator").ISwaggerData;
|
|
5
|
-
export declare const TypeIsJsonToSequelize: (options?: (TypeIsJsonOption & import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>) | undefined) => import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>;
|
|
6
|
-
export declare const TypeIsJsonFixValue: (o: any) => any;
|
|
7
|
-
declare const TypeIsJson: (...options: (import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>> | TypeIsJsonOption)[]) => (target?: any, propertyName?: string | undefined, propertyDescriptor?: PropertyDescriptor | undefined) => void & import("./generators/typeGenerator").TypeIsData;
|
|
8
|
-
export default TypeIsJson;
|
|
9
|
-
//# sourceMappingURL=json.d.ts.map
|
package/dist/types/json.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../src/types/json.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,mBAAmB,6LAG7B,CAAC;AAEJ,eAAO,MAAM,qBAAqB,2NAI/B,CAAC;AAEJ,eAAO,MAAM,kBAAkB,MAAO,GAAG,QAOxC,CAAC;AAEF,QAAA,MAAM,UAAU,+RAKb,CAAC;AAEJ,eAAe,UAAU,CAAC"}
|
package/dist/types/json.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TypeIsJsonFixValue = exports.TypeIsJsonToSequelize = exports.TypeIsJsonToSwagger = 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.TypeIsJsonToSwagger = (0, toSwaggerGenerator_1.toSwaggerGenerator)((options) => ({
|
|
9
|
-
type: 'object',
|
|
10
|
-
description: options === null || options === void 0 ? void 0 : options.comment,
|
|
11
|
-
}));
|
|
12
|
-
exports.TypeIsJsonToSequelize = (0, toSequelizeGenerator_1.toSequelizeGenerator)((options) => (Object.assign(Object.assign({}, options), { type: sequelize_1.DataTypes.JSON, comment: options === null || options === void 0 ? void 0 : options.comment })));
|
|
13
|
-
const TypeIsJsonFixValue = (o) => {
|
|
14
|
-
try {
|
|
15
|
-
if (typeof o === 'string')
|
|
16
|
-
return JSON.parse(String(o));
|
|
17
|
-
return o;
|
|
18
|
-
}
|
|
19
|
-
catch (_a) {
|
|
20
|
-
return o;
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
exports.TypeIsJsonFixValue = TypeIsJsonFixValue;
|
|
24
|
-
const TypeIsJson = (0, typeGenerator_1.typeGenerator)((options) => ({
|
|
25
|
-
__name: 'json',
|
|
26
|
-
toSwagger: () => (0, exports.TypeIsJsonToSwagger)(options),
|
|
27
|
-
toSequelize: () => (0, exports.TypeIsJsonToSequelize)(options),
|
|
28
|
-
fixValue: exports.TypeIsJsonFixValue,
|
|
29
|
-
}));
|
|
30
|
-
exports.default = TypeIsJson;
|
|
31
|
-
//# sourceMappingURL=json.js.map
|
package/dist/types/json.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"json.js","sourceRoot":"","sources":["../../src/types/json.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AACtC,4EAAyE;AACzE,wEAAqE;AACrE,8DAA2D;AAM9C,QAAA,mBAAmB,GAAG,IAAA,uCAAkB,EAAmB,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IACpF,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO;CAC9B,CAAC,CAAC,CAAC;AAES,QAAA,qBAAqB,GAAG,IAAA,2CAAoB,EAAmB,CAAC,OAAO,EAAE,EAAE,CAAC,iCACpF,OAAO,KACV,IAAI,EAAE,qBAAS,CAAC,IAAI,EACpB,OAAO,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,IACzB,CAAC,CAAC;AAEG,MAAM,kBAAkB,GAAG,CAAC,CAAM,EAAE,EAAE;IAC3C,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,kBAAkB,sBAO7B;AAEF,MAAM,UAAU,GAAG,IAAA,6BAAa,EAAmB,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IAC/D,MAAM,EAAE,MAAM;IACd,SAAS,EAAE,GAAG,EAAE,CAAC,IAAA,2BAAmB,EAAC,OAAO,CAAC;IAC7C,WAAW,EAAE,GAAG,EAAE,CAAC,IAAA,6BAAqB,EAAC,OAAO,CAAC;IACjD,QAAQ,EAAE,0BAAkB;CAC7B,CAAC,CAAC,CAAC;AAEJ,kBAAe,UAAU,CAAC"}
|
package/dist/types/long.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export interface TypeIsLongOption {
|
|
2
|
-
decimals?: number;
|
|
3
|
-
precision?: number;
|
|
4
|
-
scale?: number;
|
|
5
|
-
comment?: string;
|
|
6
|
-
}
|
|
7
|
-
export declare const TypeIsLongToSwagger: (options?: (TypeIsLongOption & import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>) | undefined) => import("./generators/toSwaggerGenerator").ISwaggerData;
|
|
8
|
-
export declare const TypeIsLongToSequelize: (options?: (TypeIsLongOption & import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>) | undefined) => import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>;
|
|
9
|
-
export declare const TypeIsLongFixValue: (o: any) => any;
|
|
10
|
-
declare const TypeIsLong: (...options: (import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>> | TypeIsLongOption)[]) => (target?: any, propertyName?: string | undefined, propertyDescriptor?: PropertyDescriptor | undefined) => void & import("./generators/typeGenerator").TypeIsData;
|
|
11
|
-
export default TypeIsLong;
|
|
12
|
-
//# sourceMappingURL=long.d.ts.map
|
package/dist/types/long.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"long.d.ts","sourceRoot":"","sources":["../../src/types/long.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,gBAAgB;IAC/B,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,mBAAmB,6LAI7B,CAAC;AAEJ,eAAO,MAAM,qBAAqB,2NAI/B,CAAC;AAEJ,eAAO,MAAM,kBAAkB,MAAO,GAAG,QAGxC,CAAC;AAEF,QAAA,MAAM,UAAU,+RAKb,CAAC;AAEJ,eAAe,UAAU,CAAC"}
|
package/dist/types/long.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TypeIsLongFixValue = exports.TypeIsLongToSequelize = exports.TypeIsLongToSwagger = 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.TypeIsLongToSwagger = (0, toSwaggerGenerator_1.toSwaggerGenerator)((options) => ({
|
|
9
|
-
type: 'integer',
|
|
10
|
-
format: 'int64',
|
|
11
|
-
description: options === null || options === void 0 ? void 0 : options.comment,
|
|
12
|
-
}));
|
|
13
|
-
exports.TypeIsLongToSequelize = (0, toSequelizeGenerator_1.toSequelizeGenerator)((options) => (Object.assign(Object.assign({}, options), { type: sequelize_1.DataTypes.INTEGER(options), comment: options === null || options === void 0 ? void 0 : options.comment })));
|
|
14
|
-
const TypeIsLongFixValue = (o) => {
|
|
15
|
-
if (o === undefined || o === null)
|
|
16
|
-
return o;
|
|
17
|
-
return parseInt(String(o), 10);
|
|
18
|
-
};
|
|
19
|
-
exports.TypeIsLongFixValue = TypeIsLongFixValue;
|
|
20
|
-
const TypeIsLong = (0, typeGenerator_1.typeGenerator)((options) => ({
|
|
21
|
-
__name: 'long',
|
|
22
|
-
toSwagger: () => (0, exports.TypeIsLongToSwagger)(options),
|
|
23
|
-
toSequelize: () => (0, exports.TypeIsLongToSequelize)(options),
|
|
24
|
-
fixValue: exports.TypeIsLongFixValue,
|
|
25
|
-
}));
|
|
26
|
-
exports.default = TypeIsLong;
|
|
27
|
-
//# sourceMappingURL=long.js.map
|
package/dist/types/long.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"long.js","sourceRoot":"","sources":["../../src/types/long.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AACtC,4EAAyE;AACzE,wEAAqE;AACrE,8DAA2D;AAS9C,QAAA,mBAAmB,GAAG,IAAA,uCAAkB,EAAmB,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IACpF,IAAI,EAAE,SAAS;IACf,MAAM,EAAE,OAAO;IACf,WAAW,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO;CAC9B,CAAC,CAAC,CAAC;AAES,QAAA,qBAAqB,GAAG,IAAA,2CAAoB,EAAmB,CAAC,OAAO,EAAE,EAAE,CAAC,iCACpF,OAAO,KACV,IAAI,EAAE,qBAAS,CAAC,OAAO,CAAC,OAAO,CAAC,EAChC,OAAO,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,IACzB,CAAC,CAAC;AAEG,MAAM,kBAAkB,GAAG,CAAC,CAAM,EAAE,EAAE;IAC3C,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,kBAAkB,sBAG7B;AAEF,MAAM,UAAU,GAAG,IAAA,6BAAa,EAAmB,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IAC/D,MAAM,EAAE,MAAM;IACd,SAAS,EAAE,GAAG,EAAE,CAAC,IAAA,2BAAmB,EAAC,OAAO,CAAC;IAC7C,WAAW,EAAE,GAAG,EAAE,CAAC,IAAA,6BAAqB,EAAC,OAAO,CAAC;IACjD,QAAQ,EAAE,0BAAkB;CAC7B,CAAC,CAAC,CAAC;AAEJ,kBAAe,UAAU,CAAC"}
|
package/dist/types/paging.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { DtoOrTypeIs } from './index';
|
|
2
|
-
import { TypeIsData } from './generators/typeGenerator';
|
|
3
|
-
export declare const TypeIsPagingToSwagger: (options?: (DtoOrTypeIs & import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>) | undefined) => import("./generators/toSwaggerGenerator").ISwaggerData;
|
|
4
|
-
declare const TypeIsPaging: (...options: (import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>> | DtoOrTypeIs)[]) => (target?: any, propertyName?: string | undefined, propertyDescriptor?: PropertyDescriptor | undefined) => void & TypeIsData;
|
|
5
|
-
export default TypeIsPaging;
|
|
6
|
-
//# sourceMappingURL=paging.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"paging.d.ts","sourceRoot":"","sources":["../../src/types/paging.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAiB,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAMvE,eAAO,MAAM,qBAAqB,wLAkEhC,CAAC;AAEH,QAAA,MAAM,YAAY,qPAGf,CAAC;AAEJ,eAAe,YAAY,CAAC"}
|
package/dist/types/paging.js
DELETED
|
@@ -1,81 +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.TypeIsPagingToSwagger = 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.TypeIsPagingToSwagger = (0, toSwaggerGenerator_1.toSwaggerGenerator)((options) => {
|
|
12
|
-
var _a;
|
|
13
|
-
const isDto = (0, isClass_1.default)(options);
|
|
14
|
-
const generateScheme = (items) => ({
|
|
15
|
-
type: 'object',
|
|
16
|
-
properties: {
|
|
17
|
-
data: {
|
|
18
|
-
type: 'array',
|
|
19
|
-
items,
|
|
20
|
-
},
|
|
21
|
-
page: {
|
|
22
|
-
type: 'integer',
|
|
23
|
-
format: 'int32',
|
|
24
|
-
description: '현재 페이지',
|
|
25
|
-
},
|
|
26
|
-
page_size: {
|
|
27
|
-
type: 'integer',
|
|
28
|
-
format: 'int32',
|
|
29
|
-
description: '페이지당 표시 개수',
|
|
30
|
-
},
|
|
31
|
-
max_page: {
|
|
32
|
-
type: 'integer',
|
|
33
|
-
format: 'int32',
|
|
34
|
-
description: '최대 페이지',
|
|
35
|
-
},
|
|
36
|
-
has_prev: {
|
|
37
|
-
type: 'boolean',
|
|
38
|
-
format: 'boolean',
|
|
39
|
-
description: '이전 이동가능 여부',
|
|
40
|
-
},
|
|
41
|
-
has_Next: {
|
|
42
|
-
type: 'boolean',
|
|
43
|
-
format: 'boolean',
|
|
44
|
-
description: '다음 이동가능 여부',
|
|
45
|
-
},
|
|
46
|
-
total_elements: {
|
|
47
|
-
type: 'integer',
|
|
48
|
-
format: 'int32',
|
|
49
|
-
description: '전체 레코드 개수',
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
});
|
|
53
|
-
if (isDto) {
|
|
54
|
-
const dto = new options();
|
|
55
|
-
const name = `${dto.constructor.name}_PAGING`;
|
|
56
|
-
(0, router_1.addScheme)({
|
|
57
|
-
name,
|
|
58
|
-
data: generateScheme(dto.swagger()),
|
|
59
|
-
});
|
|
60
|
-
return {
|
|
61
|
-
$ref: `#/components/schemas/${name}`,
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
else {
|
|
65
|
-
const type = options();
|
|
66
|
-
const name = `TYPE_${type.__name.toUpperCase()}_PAGING`;
|
|
67
|
-
(0, router_1.addScheme)({
|
|
68
|
-
name,
|
|
69
|
-
data: generateScheme((_a = type.toSwagger) === null || _a === void 0 ? void 0 : _a.call(type)),
|
|
70
|
-
});
|
|
71
|
-
return {
|
|
72
|
-
$ref: `#/components/schemas/${name}`,
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
const TypeIsPaging = (0, typeGenerator_1.typeGenerator)((options) => ({
|
|
77
|
-
__name: 'array',
|
|
78
|
-
toSwagger: () => (0, exports.TypeIsPagingToSwagger)(options),
|
|
79
|
-
}));
|
|
80
|
-
exports.default = TypeIsPaging;
|
|
81
|
-
//# sourceMappingURL=paging.js.map
|
package/dist/types/paging.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"paging.js","sourceRoot":"","sources":["../../src/types/paging.ts"],"names":[],"mappings":";;;;;;AACA,8DAAuE;AACvE,+DAAuC;AAEvC,wEAAqE;AACrE,2CAA2C;AAE9B,QAAA,qBAAqB,GAAG,IAAA,uCAAkB,EAAc,CAAC,OAAO,EAAE,EAAE;;IAC/E,MAAM,KAAK,GAAG,IAAA,iBAAO,EAAC,OAAO,CAAC,CAAC;IAE/B,MAAM,cAAc,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,CAAC;QACtC,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,IAAI,EAAE;gBACJ,IAAI,EAAE,OAAO;gBACb,KAAK;aACN;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,SAAS;gBACf,MAAM,EAAE,OAAO;gBACf,WAAW,EAAE,QAAQ;aACtB;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,SAAS;gBACf,MAAM,EAAE,OAAO;gBACf,WAAW,EAAE,YAAY;aAC1B;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,SAAS;gBACf,MAAM,EAAE,OAAO;gBACf,WAAW,EAAE,QAAQ;aACtB;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,SAAS;gBACf,MAAM,EAAE,SAAS;gBACjB,WAAW,EAAE,YAAY;aAC1B;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,SAAS;gBACf,MAAM,EAAE,SAAS;gBACjB,WAAW,EAAE,YAAY;aAC1B;YACD,cAAc,EAAE;gBACd,IAAI,EAAE,SAAS;gBACf,MAAM,EAAE,OAAO;gBACf,WAAW,EAAE,WAAW;aACzB;SACF;KACF,CAAC,CAAC;IAEH,IAAI,KAAK,EAAE;QACT,MAAM,GAAG,GAAG,IAAK,OAAgC,EAAE,CAAC;QACpD,MAAM,IAAI,GAAG,GAAG,GAAG,CAAC,WAAW,CAAC,IAAI,SAAS,CAAC;QAC9C,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,SAAS,CAAC;QACxD,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;AAEH,MAAM,YAAY,GAAG,IAAA,6BAAa,EAAc,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IAC5D,MAAM,EAAE,OAAO;IACf,SAAS,EAAE,GAAG,EAAE,CAAC,IAAA,6BAAqB,EAAC,OAAO,CAAC;CAChD,CAAC,CAAC,CAAC;AAEJ,kBAAe,YAAY,CAAC"}
|
package/dist/types/password.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { TypeIsStringOption } from './string';
|
|
2
|
-
export declare const TypeIsPasswordToSwagger: (options?: (TypeIsStringOption & import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>) | undefined) => import("./generators/toSwaggerGenerator").ISwaggerData;
|
|
3
|
-
export declare const TypeIsPasswordToSequelize: (options?: (TypeIsStringOption & import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>) | undefined) => import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>;
|
|
4
|
-
declare const TypeIsPassword: (...options: (import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>> | TypeIsStringOption)[]) => (target?: any, propertyName?: string | undefined, propertyDescriptor?: PropertyDescriptor | undefined) => void & import("./generators/typeGenerator").TypeIsData;
|
|
5
|
-
export default TypeIsPassword;
|
|
6
|
-
//# sourceMappingURL=password.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"password.d.ts","sourceRoot":"","sources":["../../src/types/password.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAEnD,eAAO,MAAM,uBAAuB,+LAIjC,CAAC;AAEJ,eAAO,MAAM,yBAAyB,6NAInC,CAAC;AAEJ,QAAA,MAAM,cAAc,iSAIjB,CAAC;AAEJ,eAAe,cAAc,CAAC"}
|
package/dist/types/password.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TypeIsPasswordToSequelize = exports.TypeIsPasswordToSwagger = 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.TypeIsPasswordToSwagger = (0, toSwaggerGenerator_1.toSwaggerGenerator)((options) => ({
|
|
9
|
-
type: 'string',
|
|
10
|
-
format: 'password',
|
|
11
|
-
description: options === null || options === void 0 ? void 0 : options.comment,
|
|
12
|
-
}));
|
|
13
|
-
exports.TypeIsPasswordToSequelize = (0, toSequelizeGenerator_1.toSequelizeGenerator)((options) => (Object.assign(Object.assign({}, options), { type: sequelize_1.DataTypes.STRING(512), comment: options === null || options === void 0 ? void 0 : options.comment })));
|
|
14
|
-
const TypeIsPassword = (0, typeGenerator_1.typeGenerator)((options) => ({
|
|
15
|
-
__name: 'password',
|
|
16
|
-
toSwagger: () => (0, exports.TypeIsPasswordToSwagger)(options),
|
|
17
|
-
toSequelize: () => (0, exports.TypeIsPasswordToSequelize)(options),
|
|
18
|
-
}));
|
|
19
|
-
exports.default = TypeIsPassword;
|
|
20
|
-
//# sourceMappingURL=password.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"password.js","sourceRoot":"","sources":["../../src/types/password.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AACtC,4EAAyE;AACzE,wEAAqE;AACrE,8DAA2D;AAI9C,QAAA,uBAAuB,GAAG,IAAA,uCAAkB,EAAqB,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IAC1F,IAAI,EAAE,QAAQ;IACd,MAAM,EAAE,UAAU;IAClB,WAAW,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO;CAC9B,CAAC,CAAC,CAAC;AAES,QAAA,yBAAyB,GAAG,IAAA,2CAAoB,EAAqB,CAAC,OAAO,EAAE,EAAE,CAAC,iCAC1F,OAAO,KACV,IAAI,EAAE,qBAAS,CAAC,MAAM,CAAC,GAAG,CAAC,EAC3B,OAAO,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,IACzB,CAAC,CAAC;AAEJ,MAAM,cAAc,GAAG,IAAA,6BAAa,EAAqB,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IACrE,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/query.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { TypeIsData } from './generators/typeGenerator';
|
|
2
|
-
export interface TypeIsQueryOption {
|
|
3
|
-
query: (props: {
|
|
4
|
-
user?: any;
|
|
5
|
-
association?: string;
|
|
6
|
-
}) => string;
|
|
7
|
-
type: () => TypeIsData;
|
|
8
|
-
}
|
|
9
|
-
export declare const TypeIsQueryToSwagger: (options?: (TypeIsQueryOption & import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>) | undefined) => import("./generators/toSwaggerGenerator").ISwaggerData;
|
|
10
|
-
export declare const TypeIsQueryToSequelize: (options?: TypeIsQueryOption) => {
|
|
11
|
-
query: (props: {
|
|
12
|
-
user?: any;
|
|
13
|
-
association?: string;
|
|
14
|
-
}) => string | undefined;
|
|
15
|
-
type: (() => TypeIsData) | undefined;
|
|
16
|
-
};
|
|
17
|
-
export declare const TypeIsQueryFixValue: (options: TypeIsQueryOption) => (o: any) => any;
|
|
18
|
-
declare const TypeIsQuery: (...options: (import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>> | TypeIsQueryOption)[]) => (target?: any, propertyName?: string | undefined, propertyDescriptor?: PropertyDescriptor | undefined) => void & TypeIsData;
|
|
19
|
-
export default TypeIsQuery;
|
|
20
|
-
//# sourceMappingURL=query.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../src/types/query.ts"],"names":[],"mappings":"AAEA,OAAO,EAAiB,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAEvE,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,CAAC,KAAK,EAAE;QAAE,IAAI,CAAC,EAAE,GAAG,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,MAAM,CAAC;IAC/D,IAAI,EAAE,MAAM,UAAU,CAAC;CACxB;AAED,eAAO,MAAM,oBAAoB,8LAM/B,CAAC;AAEH,eAAO,MAAM,sBAAsB,aAAc,iBAAiB;mBACjD;QAAE,IAAI,CAAC,EAAE,GAAG,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE;iBAZvC,UAAU;CActB,CAAC;AAEH,eAAO,MAAM,mBAAmB,YAAa,iBAAiB,SAAS,GAAG,QAEzE,CAAC;AAEF,QAAA,MAAM,WAAW,2PAKd,CAAC;AAEJ,eAAe,WAAW,CAAC"}
|
package/dist/types/query.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TypeIsQueryFixValue = exports.TypeIsQueryToSequelize = exports.TypeIsQueryToSwagger = void 0;
|
|
4
|
-
const core_1 = require("@asapjs/core");
|
|
5
|
-
const toSwaggerGenerator_1 = require("./generators/toSwaggerGenerator");
|
|
6
|
-
const typeGenerator_1 = require("./generators/typeGenerator");
|
|
7
|
-
exports.TypeIsQueryToSwagger = (0, toSwaggerGenerator_1.toSwaggerGenerator)((options) => {
|
|
8
|
-
var _a, _b;
|
|
9
|
-
if (!options) {
|
|
10
|
-
core_1.logger.error(`@asapjs/sequelize :: @TypeIs.QUERY - options가 전달되지 않았습니다..`);
|
|
11
|
-
process.exit(1);
|
|
12
|
-
}
|
|
13
|
-
return (_b = (_a = options.type()).toSwagger) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
14
|
-
});
|
|
15
|
-
const TypeIsQueryToSequelize = (options) => ({
|
|
16
|
-
query: (props) => options === null || options === void 0 ? void 0 : options.query(props),
|
|
17
|
-
type: options === null || options === void 0 ? void 0 : options.type,
|
|
18
|
-
});
|
|
19
|
-
exports.TypeIsQueryToSequelize = TypeIsQueryToSequelize;
|
|
20
|
-
const TypeIsQueryFixValue = (options) => (o) => {
|
|
21
|
-
var _a, _b;
|
|
22
|
-
return (_b = (_a = options.type()).fixValue) === null || _b === void 0 ? void 0 : _b.call(_a, o);
|
|
23
|
-
};
|
|
24
|
-
exports.TypeIsQueryFixValue = TypeIsQueryFixValue;
|
|
25
|
-
const TypeIsQuery = (0, typeGenerator_1.typeGenerator)((options) => ({
|
|
26
|
-
__name: 'query',
|
|
27
|
-
toSequelize: () => (0, exports.TypeIsQueryToSequelize)(options),
|
|
28
|
-
toSwagger: () => (0, exports.TypeIsQueryToSwagger)(options),
|
|
29
|
-
fixValue: (0, exports.TypeIsQueryFixValue)(options),
|
|
30
|
-
}));
|
|
31
|
-
exports.default = TypeIsQuery;
|
|
32
|
-
//# sourceMappingURL=query.js.map
|
package/dist/types/query.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"query.js","sourceRoot":"","sources":["../../src/types/query.ts"],"names":[],"mappings":";;;AAAA,uCAAsC;AACtC,wEAAqE;AACrE,8DAAuE;AAO1D,QAAA,oBAAoB,GAAG,IAAA,uCAAkB,EAAoB,CAAC,OAAO,EAAE,EAAE;;IACpF,IAAI,CAAC,OAAO,EAAE;QACZ,aAAM,CAAC,KAAK,CAAC,4DAA4D,CAAC,CAAC;QAC3E,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;IACD,OAAO,MAAA,MAAA,OAAO,CAAC,IAAI,EAAE,EAAC,SAAS,kDAAI,CAAC;AACtC,CAAC,CAAC,CAAC;AAEI,MAAM,sBAAsB,GAAG,CAAC,OAA2B,EAAE,EAAE,CAAC,CAAC;IACtE,KAAK,EAAE,CAAC,KAA2C,EAAE,EAAE,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,CAAC,KAAK,CAAC;IAC7E,IAAI,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI;CACpB,CAAC,CAAC;AAHU,QAAA,sBAAsB,0BAGhC;AAEI,MAAM,mBAAmB,GAAG,CAAC,OAA0B,EAAE,EAAE,CAAC,CAAC,CAAM,EAAE,EAAE;;IAC5E,OAAO,MAAA,MAAA,OAAO,CAAC,IAAI,EAAE,EAAC,QAAQ,mDAAG,CAAC,CAAC,CAAC;AACtC,CAAC,CAAC;AAFW,QAAA,mBAAmB,uBAE9B;AAEF,MAAM,WAAW,GAAG,IAAA,6BAAa,EAAoB,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IACjE,MAAM,EAAE,OAAO;IACf,WAAW,EAAE,GAAG,EAAE,CAAC,IAAA,8BAAsB,EAAC,OAAO,CAAC;IAClD,SAAS,EAAE,GAAG,EAAE,CAAC,IAAA,4BAAoB,EAAC,OAAO,CAAC;IAC9C,QAAQ,EAAE,IAAA,2BAAmB,EAAC,OAAO,CAAC;CACvC,CAAC,CAAC,CAAC;AAEJ,kBAAe,WAAW,CAAC"}
|
package/dist/types/string.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export interface TypeIsStringOption {
|
|
2
|
-
length?: number;
|
|
3
|
-
binary?: boolean;
|
|
4
|
-
comment?: string;
|
|
5
|
-
}
|
|
6
|
-
export declare const TypeIsStringToSwagger: (options?: (TypeIsStringOption & import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>) | undefined) => import("./generators/toSwaggerGenerator").ISwaggerData;
|
|
7
|
-
export declare const TypeIsStringToSequelize: (options?: (TypeIsStringOption & import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>) | undefined) => import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>;
|
|
8
|
-
export declare const TypeIsStringFixValue: (o: any) => any;
|
|
9
|
-
declare const TypeIsString: (...options: (import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>> | TypeIsStringOption)[]) => (target?: any, propertyName?: string | undefined, propertyDescriptor?: PropertyDescriptor | undefined) => void & import("./generators/typeGenerator").TypeIsData;
|
|
10
|
-
export default TypeIsString;
|
|
11
|
-
//# sourceMappingURL=string.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../src/types/string.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,qBAAqB,+LAG/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/string.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TypeIsStringFixValue = exports.TypeIsStringToSequelize = exports.TypeIsStringToSwagger = 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.TypeIsStringToSwagger = (0, toSwaggerGenerator_1.toSwaggerGenerator)((options) => ({
|
|
9
|
-
type: 'string',
|
|
10
|
-
description: options === null || options === void 0 ? void 0 : options.comment,
|
|
11
|
-
}));
|
|
12
|
-
exports.TypeIsStringToSequelize = (0, toSequelizeGenerator_1.toSequelizeGenerator)((options) => (Object.assign(Object.assign({}, options), { type: sequelize_1.DataTypes.STRING(options === null || options === void 0 ? void 0 : options.length, options === null || options === void 0 ? void 0 : options.binary), comment: options === null || options === void 0 ? void 0 : options.comment })));
|
|
13
|
-
const TypeIsStringFixValue = (o) => {
|
|
14
|
-
if (o === undefined || o === null)
|
|
15
|
-
return o;
|
|
16
|
-
return String(o);
|
|
17
|
-
};
|
|
18
|
-
exports.TypeIsStringFixValue = TypeIsStringFixValue;
|
|
19
|
-
const TypeIsString = (0, typeGenerator_1.typeGenerator)((options) => ({
|
|
20
|
-
__name: 'string',
|
|
21
|
-
toSwagger: () => (0, exports.TypeIsStringToSwagger)(options),
|
|
22
|
-
toSequelize: () => (0, exports.TypeIsStringToSequelize)(options),
|
|
23
|
-
fixValue: exports.TypeIsStringFixValue,
|
|
24
|
-
}));
|
|
25
|
-
exports.default = TypeIsString;
|
|
26
|
-
//# sourceMappingURL=string.js.map
|
package/dist/types/string.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"string.js","sourceRoot":"","sources":["../../src/types/string.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AACtC,4EAAyE;AACzE,wEAAqE;AACrE,8DAA2D;AAQ9C,QAAA,qBAAqB,GAAG,IAAA,uCAAkB,EAAqB,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IACxF,IAAI,EAAE,QAAQ;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,MAAM,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,CAAC,EACxD,OAAO,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,IACzB,CAAC,CAAC;AAEG,MAAM,oBAAoB,GAAG,CAAC,CAAM,EAAE,EAAE;IAC7C,IAAI,CAAC,KAAK,SAAS,IAAI,CAAC,KAAK,IAAI;QAAE,OAAO,CAAC,CAAC;IAC5C,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC;AACnB,CAAC,CAAC;AAHW,QAAA,oBAAoB,wBAG/B;AAEF,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;IACnD,QAAQ,EAAE,4BAAoB;CAC/B,CAAC,CAAC,CAAC;AAEJ,kBAAe,YAAY,CAAC"}
|
package/dist/types/text.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { TextLength } from 'sequelize';
|
|
2
|
-
export interface TypeIsTextOption {
|
|
3
|
-
length?: TextLength;
|
|
4
|
-
comment?: string;
|
|
5
|
-
}
|
|
6
|
-
export declare const TypeIsTextToSequelize: (options?: (TypeIsTextOption & import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>) | undefined) => import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>;
|
|
7
|
-
declare const TypeIsText: (...options: (import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>> | TypeIsTextOption)[]) => (target?: any, propertyName?: string | undefined, propertyDescriptor?: PropertyDescriptor | undefined) => void & import("./generators/typeGenerator").TypeIsData;
|
|
8
|
-
export default TypeIsText;
|
|
9
|
-
//# sourceMappingURL=text.d.ts.map
|
package/dist/types/text.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../src/types/text.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,MAAM,WAAW,CAAC;AAKlD,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,qBAAqB,2NAI/B,CAAC;AAEJ,QAAA,MAAM,UAAU,+RAKb,CAAC;AAEJ,eAAe,UAAU,CAAC"}
|
package/dist/types/text.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TypeIsTextToSequelize = void 0;
|
|
4
|
-
const sequelize_1 = require("sequelize");
|
|
5
|
-
const string_1 = require("./string");
|
|
6
|
-
const typeGenerator_1 = require("./generators/typeGenerator");
|
|
7
|
-
const toSequelizeGenerator_1 = require("./generators/toSequelizeGenerator");
|
|
8
|
-
exports.TypeIsTextToSequelize = (0, toSequelizeGenerator_1.toSequelizeGenerator)((options) => (Object.assign(Object.assign({}, options), { type: sequelize_1.DataTypes.TEXT({ length: options === null || options === void 0 ? void 0 : options.length }), comment: options === null || options === void 0 ? void 0 : options.comment })));
|
|
9
|
-
const TypeIsText = (0, typeGenerator_1.typeGenerator)((options) => ({
|
|
10
|
-
__name: 'text',
|
|
11
|
-
toSwagger: () => (0, string_1.TypeIsStringToSwagger)(options),
|
|
12
|
-
toSequelize: () => (0, exports.TypeIsTextToSequelize)(options),
|
|
13
|
-
fixValue: string_1.TypeIsStringFixValue,
|
|
14
|
-
}));
|
|
15
|
-
exports.default = TypeIsText;
|
|
16
|
-
//# sourceMappingURL=text.js.map
|
package/dist/types/text.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"text.js","sourceRoot":"","sources":["../../src/types/text.ts"],"names":[],"mappings":";;;AAAA,yCAAkD;AAClD,qCAAuE;AACvE,8DAA2D;AAC3D,4EAAyE;AAO5D,QAAA,qBAAqB,GAAG,IAAA,2CAAoB,EAAmB,CAAC,OAAO,EAAE,EAAE,CAAC,iCACpF,OAAO,KACV,IAAI,EAAE,qBAAS,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,EAAE,CAAC,EACjD,OAAO,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,IACzB,CAAC,CAAC;AAEJ,MAAM,UAAU,GAAG,IAAA,6BAAa,EAAmB,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IAC/D,MAAM,EAAE,MAAM;IACd,SAAS,EAAE,GAAG,EAAE,CAAC,IAAA,8BAAqB,EAAC,OAAc,CAAC;IACtD,WAAW,EAAE,GAAG,EAAE,CAAC,IAAA,6BAAqB,EAAC,OAAO,CAAC;IACjD,QAAQ,EAAE,6BAAoB;CAC/B,CAAC,CAAC,CAAC;AAEJ,kBAAe,UAAU,CAAC"}
|
package/dist/types/type.d.ts
DELETED
package/dist/types/type.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../src/types/type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAExD,MAAM,MAAM,WAAW,GAAG,OAAO,aAAa,GAAG,CAAC,MAAM,UAAU,CAAC,CAAC;AAEpE,MAAM,MAAM,SAAS,GAAG;IAAE,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAA;CAAE,CAAC"}
|
package/dist/types/type.js
DELETED
package/dist/types/type.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"type.js","sourceRoot":"","sources":["../../src/types/type.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getUserIdInQuery.d.ts","sourceRoot":"","sources":["../../src/utils/getUserIdInQuery.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,UAAW,GAAG,WAAuC,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getUserIdInQuery = void 0;
|
|
4
|
-
const getUserIdInQuery = (user) => `"${(user === null || user === void 0 ? void 0 : user.id) || (user === null || user === void 0 ? void 0 : user._id) || ''}"`;
|
|
5
|
-
exports.getUserIdInQuery = getUserIdInQuery;
|
|
6
|
-
//# sourceMappingURL=getUserIdInQuery.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getUserIdInQuery.js","sourceRoot":"","sources":["../../src/utils/getUserIdInQuery.ts"],"names":[],"mappings":";;;AAAO,MAAM,gBAAgB,GAAG,CAAC,IAAU,EAAE,EAAE,CAAC,IAAI,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,EAAE,MAAI,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,GAAG,CAAA,IAAI,EAAE,GAAG,CAAC;AAAtE,QAAA,gBAAgB,oBAAsD"}
|
package/dist/utils/isClass.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isClass.d.ts","sourceRoot":"","sources":["../../src/utils/isClass.ts"],"names":[],"mappings":"4BAAmB,GAAG;AAAtB,wBAAmE"}
|
package/dist/utils/isClass.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = (v) => { var _a; return ((_a = v === null || v === void 0 ? void 0 : v.prototype) === null || _a === void 0 ? void 0 : _a.constructor) !== undefined; };
|
|
4
|
-
//# sourceMappingURL=isClass.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isClass.js","sourceRoot":"","sources":["../../src/utils/isClass.ts"],"names":[],"mappings":";;AAAA,kBAAe,CAAC,CAAM,EAAE,EAAE,WAAC,OAAA,CAAA,MAAA,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,SAAS,0CAAE,WAAW,MAAK,SAAS,CAAA,EAAA,CAAC"}
|