nicot 1.1.32 → 1.1.33
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/README.md +3 -4
- package/dist/index.cjs +103 -82
- package/dist/index.cjs.map +4 -4
- package/dist/index.mjs +44 -21
- package/dist/index.mjs.map +4 -4
- package/dist/src/restful.d.ts +1 -0
- package/dist/src/utility/index.d.ts +0 -1
- package/dist/src/utility/metadata.d.ts +1 -0
- package/dist/src/utility/patch-column-in-get.d.ts +2 -0
- package/package.json +2 -2
- package/dist/src/utility/rename-class.d.ts +0 -1
package/README.md
CHANGED
|
@@ -192,7 +192,7 @@ RestfulFactory 处理 Entity 类的时候,会以这些装饰器为依据,裁
|
|
|
192
192
|
nickname: string;
|
|
193
193
|
|
|
194
194
|
@BoolColumn()
|
|
195
|
-
@
|
|
195
|
+
@QueryEqual()
|
|
196
196
|
isActive: boolean;
|
|
197
197
|
```
|
|
198
198
|
|
|
@@ -209,7 +209,6 @@ NICOT 提供了一套查询装饰器,用于在 Entity 字段上声明支持的
|
|
|
209
209
|
| `@QueryEqual()` | 精确匹配:`WHERE field = :value` |
|
|
210
210
|
| `@QueryLike()` | 前缀模糊匹配:`WHERE field LIKE :value%` |
|
|
211
211
|
| `@QuerySearch()` | 宽泛模糊搜索:`WHERE field LIKE %:value%` |
|
|
212
|
-
| `@QueryMatchBoolean()` | `true/false/1/0` 转换为布尔类型查询 |
|
|
213
212
|
| `@QueryEqualZeroNullable()` | `0 → IS NULL`,否则 `= :value`(适合 nullable) |
|
|
214
213
|
| `@QueryGreater(field)` | 大于查询:`WHERE field > :value` |
|
|
215
214
|
| `@QueryLess(field)` | 小于查询:`WHERE field < :value` |
|
|
@@ -287,7 +286,7 @@ views: number;
|
|
|
287
286
|
title: string;
|
|
288
287
|
|
|
289
288
|
@BoolColumn()
|
|
290
|
-
@
|
|
289
|
+
@QueryEqual()
|
|
291
290
|
isPublished: boolean;
|
|
292
291
|
|
|
293
292
|
@NotWritable()
|
|
@@ -474,7 +473,7 @@ NICOT 提供了 `RestfulFactory(Entity)` 工厂函数,自动为实体生成标
|
|
|
474
473
|
name: string;
|
|
475
474
|
|
|
476
475
|
@BoolColumn()
|
|
477
|
-
@
|
|
476
|
+
@QueryEqual()
|
|
478
477
|
isActive: boolean;
|
|
479
478
|
```
|
|
480
479
|
|
package/dist/index.cjs
CHANGED
|
@@ -80,7 +80,6 @@ __export(index_exports, {
|
|
|
80
80
|
QuerySearch: () => QuerySearch,
|
|
81
81
|
Relation: () => Relation,
|
|
82
82
|
RelationComputed: () => RelationComputed,
|
|
83
|
-
RenameClass: () => RenameClass,
|
|
84
83
|
RestfulFactory: () => RestfulFactory,
|
|
85
84
|
StringColumn: () => StringColumn,
|
|
86
85
|
StringIdBase: () => StringIdBase,
|
|
@@ -417,7 +416,8 @@ var BoolColumn = (options = {}) => (0, import_nesties3.MergePropertyDecorators)(
|
|
|
417
416
|
}),
|
|
418
417
|
(0, import_typeorm.Column)("boolean", columnDecoratorOptions(options)),
|
|
419
418
|
validatorDecorator(options),
|
|
420
|
-
swaggerDecorator(options, { type: Boolean })
|
|
419
|
+
swaggerDecorator(options, { type: Boolean }),
|
|
420
|
+
Metadata.set("boolColumn", true, "boolColumnFields")
|
|
421
421
|
]);
|
|
422
422
|
var JsonColumn = (definition, options = {}) => {
|
|
423
423
|
const cl = (0, import_nesties4.getClassFromClassOrArray)(definition);
|
|
@@ -537,12 +537,6 @@ var applyQueryMatchBoolean = createQueryCondition(
|
|
|
537
537
|
}
|
|
538
538
|
);
|
|
539
539
|
|
|
540
|
-
// src/utility/rename-class.ts
|
|
541
|
-
function RenameClass(cls, name) {
|
|
542
|
-
Object.defineProperty(cls, "name", { value: name });
|
|
543
|
-
return cls;
|
|
544
|
-
}
|
|
545
|
-
|
|
546
540
|
// src/decorators/query.ts
|
|
547
541
|
var import_nesties5 = require("nesties");
|
|
548
542
|
|
|
@@ -1739,10 +1733,10 @@ function CrudService(entityClass, crudOptions = {}) {
|
|
|
1739
1733
|
|
|
1740
1734
|
// src/restful.ts
|
|
1741
1735
|
var import_common3 = require("@nestjs/common");
|
|
1742
|
-
var
|
|
1743
|
-
var
|
|
1736
|
+
var import_nesties10 = require("nesties");
|
|
1737
|
+
var import_swagger7 = require("@nestjs/swagger");
|
|
1744
1738
|
var import_lodash4 = __toESM(require("lodash"));
|
|
1745
|
-
var
|
|
1739
|
+
var import_nesties11 = require("nesties");
|
|
1746
1740
|
|
|
1747
1741
|
// src/bases/base-restful-controller.ts
|
|
1748
1742
|
var RestfulMethods = [
|
|
@@ -1803,6 +1797,27 @@ var OmitTypeExclude = (cl, keys) => {
|
|
|
1803
1797
|
return omitted;
|
|
1804
1798
|
};
|
|
1805
1799
|
|
|
1800
|
+
// src/utility/patch-column-in-get.ts
|
|
1801
|
+
var import_swagger6 = require("@nestjs/swagger");
|
|
1802
|
+
var import_nesties9 = require("nesties");
|
|
1803
|
+
var PatchColumnsInGet = (cl, originalCl = cl, fieldsToOmit = []) => {
|
|
1804
|
+
const omit2 = new Set(fieldsToOmit);
|
|
1805
|
+
const boolFields = getSpecificFields(originalCl || cl, "boolColumn").filter(
|
|
1806
|
+
(f) => !omit2.has(f)
|
|
1807
|
+
);
|
|
1808
|
+
for (const field of boolFields) {
|
|
1809
|
+
const originalApiProp = (0, import_nesties9.getApiProperty)(originalCl, field);
|
|
1810
|
+
(0, import_swagger6.ApiProperty)({
|
|
1811
|
+
...originalApiProp,
|
|
1812
|
+
type: String,
|
|
1813
|
+
required: false,
|
|
1814
|
+
enum: ["", "1"],
|
|
1815
|
+
default: originalApiProp?.default === true ? "1" : originalApiProp?.default === false ? "" : void 0
|
|
1816
|
+
})(cl.prototype, field);
|
|
1817
|
+
}
|
|
1818
|
+
return cl;
|
|
1819
|
+
};
|
|
1820
|
+
|
|
1806
1821
|
// src/restful.ts
|
|
1807
1822
|
var getCurrentLevelRelations = (relations) => relations.filter((r) => !r.includes("."));
|
|
1808
1823
|
var getNextLevelRelations = (relations, enteringField) => relations.filter((r) => r.includes(".") && r.startsWith(`${enteringField}.`)).map((r) => r.split(".").slice(1).join("."));
|
|
@@ -1822,7 +1837,7 @@ var RestfulFactory = class _RestfulFactory {
|
|
|
1822
1837
|
this.entityClass,
|
|
1823
1838
|
this.fieldsToOmit
|
|
1824
1839
|
);
|
|
1825
|
-
this.createDto = RenameClass(
|
|
1840
|
+
this.createDto = (0, import_nesties11.RenameClass)(
|
|
1826
1841
|
OmitTypeExclude(
|
|
1827
1842
|
this.basicInputDto,
|
|
1828
1843
|
getSpecificFields(this.entityClass, "notWritable")
|
|
@@ -1830,27 +1845,35 @@ var RestfulFactory = class _RestfulFactory {
|
|
|
1830
1845
|
`Create${this.entityClass.name}Dto`
|
|
1831
1846
|
);
|
|
1832
1847
|
this.importDto = ImportDataDto(this.createDto);
|
|
1833
|
-
this.
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1848
|
+
this.fieldsInGetToOmit = import_lodash4.default.uniq([
|
|
1849
|
+
...this.fieldsToOmit,
|
|
1850
|
+
...getSpecificFields(this.entityClass, "notQueryable")
|
|
1851
|
+
]);
|
|
1852
|
+
this.findAllDto = (0, import_nesties11.RenameClass)(
|
|
1853
|
+
(0, import_swagger7.PartialType)(
|
|
1854
|
+
PatchColumnsInGet(
|
|
1855
|
+
OmitTypeExclude(
|
|
1856
|
+
this.entityClass instanceof PageSettingsDto ? this.entityClass : (0, import_swagger7.IntersectionType)(
|
|
1857
|
+
this.entityClass,
|
|
1858
|
+
PageSettingsDto
|
|
1859
|
+
),
|
|
1860
|
+
this.fieldsInGetToOmit
|
|
1839
1861
|
),
|
|
1840
|
-
|
|
1862
|
+
this.entityClass,
|
|
1863
|
+
this.fieldsInGetToOmit
|
|
1841
1864
|
)
|
|
1842
1865
|
),
|
|
1843
1866
|
`Find${this.entityClass.name}Dto`
|
|
1844
1867
|
);
|
|
1845
|
-
this.findAllCursorPaginatedDto = RenameClass(
|
|
1846
|
-
(0,
|
|
1868
|
+
this.findAllCursorPaginatedDto = (0, import_nesties11.RenameClass)(
|
|
1869
|
+
(0, import_swagger7.IntersectionType)(
|
|
1847
1870
|
OmitTypeExclude(this.findAllDto, ["pageCount"]),
|
|
1848
1871
|
CursorPaginationDto
|
|
1849
1872
|
),
|
|
1850
1873
|
`Find${this.entityClass.name}CursorPaginatedDto`
|
|
1851
1874
|
);
|
|
1852
|
-
this.updateDto = RenameClass(
|
|
1853
|
-
(0,
|
|
1875
|
+
this.updateDto = (0, import_nesties11.RenameClass)(
|
|
1876
|
+
(0, import_swagger7.PartialType)(
|
|
1854
1877
|
OmitTypeExclude(
|
|
1855
1878
|
this.createDto,
|
|
1856
1879
|
getSpecificFields(this.entityClass, "notChangeable")
|
|
@@ -1859,8 +1882,8 @@ var RestfulFactory = class _RestfulFactory {
|
|
|
1859
1882
|
`Update${this.entityClass.name}Dto`
|
|
1860
1883
|
);
|
|
1861
1884
|
this.entityResultDto = this.resolveEntityResultDto();
|
|
1862
|
-
this.entityCreateResultDto = RenameClass(
|
|
1863
|
-
(0,
|
|
1885
|
+
this.entityCreateResultDto = (0, import_nesties11.RenameClass)(
|
|
1886
|
+
(0, import_swagger7.OmitType)(this.entityResultDto, [
|
|
1864
1887
|
...getTypeormRelations(this.entityClass).map(
|
|
1865
1888
|
(r) => r.propertyName
|
|
1866
1889
|
),
|
|
@@ -1872,15 +1895,15 @@ var RestfulFactory = class _RestfulFactory {
|
|
|
1872
1895
|
]),
|
|
1873
1896
|
`${this.getEntityClassName()}CreateResultDto`
|
|
1874
1897
|
);
|
|
1875
|
-
this.entityReturnMessageDto = (0,
|
|
1876
|
-
this.entityCreateReturnMessageDto = (0,
|
|
1898
|
+
this.entityReturnMessageDto = (0, import_nesties10.ReturnMessageDto)(this.entityResultDto);
|
|
1899
|
+
this.entityCreateReturnMessageDto = (0, import_nesties10.ReturnMessageDto)(
|
|
1877
1900
|
this.entityCreateResultDto
|
|
1878
1901
|
);
|
|
1879
|
-
this.entityArrayReturnMessageDto = (0,
|
|
1902
|
+
this.entityArrayReturnMessageDto = (0, import_nesties10.PaginatedReturnMessageDto)(
|
|
1880
1903
|
this.entityResultDto
|
|
1881
1904
|
);
|
|
1882
1905
|
this.entityCursorPaginationReturnMessageDto = CursorPaginationReturnMessageDto(this.entityResultDto);
|
|
1883
|
-
this.importReturnMessageDto = (0,
|
|
1906
|
+
this.importReturnMessageDto = (0, import_nesties10.ReturnMessageDto)([
|
|
1884
1907
|
ImportEntryDto(this.entityCreateResultDto)
|
|
1885
1908
|
]);
|
|
1886
1909
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
@@ -1911,17 +1934,16 @@ var RestfulFactory = class _RestfulFactory {
|
|
|
1911
1934
|
...this.options.outputFieldsToOmit || [],
|
|
1912
1935
|
...this.options.relations ? relations.map((r) => r.propertyName).filter((r) => !currentLevelRelations.has(r)) : []
|
|
1913
1936
|
]);
|
|
1914
|
-
const resultDto = (0,
|
|
1937
|
+
const resultDto = (0, import_swagger7.OmitType)(this.entityClass, [...outputFieldsToOmit]);
|
|
1915
1938
|
for (const relation of relations) {
|
|
1916
1939
|
if (outputFieldsToOmit.has(relation.propertyName)) continue;
|
|
1917
1940
|
if (nonTransformableTypes.has(relation.propertyClass)) continue;
|
|
1918
1941
|
const replace = (useClass) => {
|
|
1919
|
-
const oldApiProperty =
|
|
1920
|
-
|
|
1921
|
-
this.entityClass.prototype,
|
|
1942
|
+
const oldApiProperty = (0, import_nesties10.getApiProperty)(
|
|
1943
|
+
this.entityClass,
|
|
1922
1944
|
relation.propertyName
|
|
1923
|
-
)
|
|
1924
|
-
(0,
|
|
1945
|
+
);
|
|
1946
|
+
(0, import_swagger7.ApiProperty)({
|
|
1925
1947
|
...oldApiProperty,
|
|
1926
1948
|
required: false,
|
|
1927
1949
|
type: () => relation.isArray ? [useClass[0]] : useClass[0]
|
|
@@ -1955,7 +1977,7 @@ var RestfulFactory = class _RestfulFactory {
|
|
|
1955
1977
|
}
|
|
1956
1978
|
}
|
|
1957
1979
|
}
|
|
1958
|
-
const res = RenameClass(
|
|
1980
|
+
const res = (0, import_nesties11.RenameClass)(
|
|
1959
1981
|
resultDto,
|
|
1960
1982
|
`${this.getEntityClassName()}ResultDto`
|
|
1961
1983
|
);
|
|
@@ -1981,17 +2003,17 @@ var RestfulFactory = class _RestfulFactory {
|
|
|
1981
2003
|
}
|
|
1982
2004
|
}
|
|
1983
2005
|
create(extras = {}) {
|
|
1984
|
-
return (0,
|
|
2006
|
+
return (0, import_nesties10.MergeMethodDecorators)([
|
|
1985
2007
|
this.usePrefix(import_common3.Post),
|
|
1986
2008
|
(0, import_common3.HttpCode)(200),
|
|
1987
|
-
(0,
|
|
2009
|
+
(0, import_swagger7.ApiOperation)({
|
|
1988
2010
|
summary: `Create a new ${this.getEntityClassName()}`,
|
|
1989
2011
|
...extras
|
|
1990
2012
|
}),
|
|
1991
|
-
(0,
|
|
1992
|
-
(0,
|
|
1993
|
-
(0,
|
|
1994
|
-
type:
|
|
2013
|
+
(0, import_swagger7.ApiBody)({ type: this.createDto }),
|
|
2014
|
+
(0, import_swagger7.ApiOkResponse)({ type: this.entityCreateReturnMessageDto }),
|
|
2015
|
+
(0, import_swagger7.ApiBadRequestResponse)({
|
|
2016
|
+
type: import_nesties10.BlankReturnMessageDto,
|
|
1995
2017
|
description: `The ${this.getEntityClassName()} is not valid`
|
|
1996
2018
|
})
|
|
1997
2019
|
]);
|
|
@@ -2000,16 +2022,16 @@ var RestfulFactory = class _RestfulFactory {
|
|
|
2000
2022
|
return (0, import_common3.Body)(CreatePipe());
|
|
2001
2023
|
}
|
|
2002
2024
|
findOne(extras = {}) {
|
|
2003
|
-
return (0,
|
|
2025
|
+
return (0, import_nesties10.MergeMethodDecorators)([
|
|
2004
2026
|
this.usePrefix(import_common3.Get, ":id"),
|
|
2005
|
-
(0,
|
|
2027
|
+
(0, import_swagger7.ApiOperation)({
|
|
2006
2028
|
summary: `Find a ${this.getEntityClassName()} by id`,
|
|
2007
2029
|
...extras
|
|
2008
2030
|
}),
|
|
2009
|
-
(0,
|
|
2010
|
-
(0,
|
|
2011
|
-
(0,
|
|
2012
|
-
type:
|
|
2031
|
+
(0, import_swagger7.ApiParam)({ name: "id", type: this.idType, required: true }),
|
|
2032
|
+
(0, import_swagger7.ApiOkResponse)({ type: this.entityReturnMessageDto }),
|
|
2033
|
+
(0, import_swagger7.ApiNotFoundResponse)({
|
|
2034
|
+
type: import_nesties10.BlankReturnMessageDto,
|
|
2013
2035
|
description: `The ${this.getEntityClassName()} with the given id was not found`
|
|
2014
2036
|
})
|
|
2015
2037
|
]);
|
|
@@ -2022,49 +2044,49 @@ var RestfulFactory = class _RestfulFactory {
|
|
|
2022
2044
|
}
|
|
2023
2045
|
}
|
|
2024
2046
|
findAll(extras = {}) {
|
|
2025
|
-
return (0,
|
|
2047
|
+
return (0, import_nesties10.MergeMethodDecorators)([
|
|
2026
2048
|
this.usePrefix(import_common3.Get),
|
|
2027
|
-
(0,
|
|
2049
|
+
(0, import_swagger7.ApiOperation)({
|
|
2028
2050
|
summary: `Find all ${this.getEntityClassName()}`,
|
|
2029
2051
|
...extras
|
|
2030
2052
|
}),
|
|
2031
|
-
(0,
|
|
2053
|
+
(0, import_swagger7.ApiOkResponse)({ type: this.entityArrayReturnMessageDto })
|
|
2032
2054
|
]);
|
|
2033
2055
|
}
|
|
2034
2056
|
findAllCursorPaginated(extras = {}) {
|
|
2035
|
-
return (0,
|
|
2057
|
+
return (0, import_nesties10.MergeMethodDecorators)([
|
|
2036
2058
|
this.usePrefix(import_common3.Get),
|
|
2037
|
-
(0,
|
|
2059
|
+
(0, import_swagger7.ApiOperation)({
|
|
2038
2060
|
summary: `Find all ${this.getEntityClassName()}`,
|
|
2039
2061
|
...extras
|
|
2040
2062
|
}),
|
|
2041
|
-
(0,
|
|
2063
|
+
(0, import_swagger7.ApiOkResponse)({ type: this.entityCursorPaginationReturnMessageDto })
|
|
2042
2064
|
]);
|
|
2043
2065
|
}
|
|
2044
2066
|
findAllParam() {
|
|
2045
2067
|
return (0, import_common3.Query)(GetPipe());
|
|
2046
2068
|
}
|
|
2047
2069
|
update(extras = {}) {
|
|
2048
|
-
return (0,
|
|
2070
|
+
return (0, import_nesties10.MergeMethodDecorators)([
|
|
2049
2071
|
this.usePrefix(import_common3.Patch, ":id"),
|
|
2050
2072
|
(0, import_common3.HttpCode)(200),
|
|
2051
|
-
(0,
|
|
2073
|
+
(0, import_swagger7.ApiOperation)({
|
|
2052
2074
|
summary: `Update a ${this.getEntityClassName()} by id`,
|
|
2053
2075
|
...extras
|
|
2054
2076
|
}),
|
|
2055
|
-
(0,
|
|
2056
|
-
(0,
|
|
2057
|
-
(0,
|
|
2058
|
-
(0,
|
|
2059
|
-
type:
|
|
2077
|
+
(0, import_swagger7.ApiParam)({ name: "id", type: this.idType, required: true }),
|
|
2078
|
+
(0, import_swagger7.ApiBody)({ type: this.updateDto }),
|
|
2079
|
+
(0, import_swagger7.ApiOkResponse)({ type: import_nesties10.BlankReturnMessageDto }),
|
|
2080
|
+
(0, import_swagger7.ApiNotFoundResponse)({
|
|
2081
|
+
type: import_nesties10.BlankReturnMessageDto,
|
|
2060
2082
|
description: `The ${this.getEntityClassName()} with the given id was not found`
|
|
2061
2083
|
}),
|
|
2062
|
-
(0,
|
|
2063
|
-
type:
|
|
2084
|
+
(0, import_swagger7.ApiBadRequestResponse)({
|
|
2085
|
+
type: import_nesties10.BlankReturnMessageDto,
|
|
2064
2086
|
description: `The ${this.getEntityClassName()} is not valid`
|
|
2065
2087
|
}),
|
|
2066
|
-
(0,
|
|
2067
|
-
type:
|
|
2088
|
+
(0, import_swagger7.ApiInternalServerErrorResponse)({
|
|
2089
|
+
type: import_nesties10.BlankReturnMessageDto,
|
|
2068
2090
|
description: "Internal error"
|
|
2069
2091
|
})
|
|
2070
2092
|
]);
|
|
@@ -2073,37 +2095,37 @@ var RestfulFactory = class _RestfulFactory {
|
|
|
2073
2095
|
return (0, import_common3.Body)(UpdatePipe());
|
|
2074
2096
|
}
|
|
2075
2097
|
delete(extras = {}) {
|
|
2076
|
-
return (0,
|
|
2098
|
+
return (0, import_nesties10.MergeMethodDecorators)([
|
|
2077
2099
|
this.usePrefix(import_common3.Delete, ":id"),
|
|
2078
2100
|
(0, import_common3.HttpCode)(200),
|
|
2079
|
-
(0,
|
|
2101
|
+
(0, import_swagger7.ApiOperation)({
|
|
2080
2102
|
summary: `Delete a ${this.getEntityClassName()} by id`,
|
|
2081
2103
|
...extras
|
|
2082
2104
|
}),
|
|
2083
|
-
(0,
|
|
2084
|
-
(0,
|
|
2085
|
-
(0,
|
|
2086
|
-
type:
|
|
2105
|
+
(0, import_swagger7.ApiParam)({ name: "id", type: this.idType, required: true }),
|
|
2106
|
+
(0, import_swagger7.ApiOkResponse)({ type: import_nesties10.BlankReturnMessageDto }),
|
|
2107
|
+
(0, import_swagger7.ApiNotFoundResponse)({
|
|
2108
|
+
type: import_nesties10.BlankReturnMessageDto,
|
|
2087
2109
|
description: `The ${this.getEntityClassName()} with the given id was not found`
|
|
2088
2110
|
}),
|
|
2089
|
-
(0,
|
|
2090
|
-
type:
|
|
2111
|
+
(0, import_swagger7.ApiInternalServerErrorResponse)({
|
|
2112
|
+
type: import_nesties10.BlankReturnMessageDto,
|
|
2091
2113
|
description: "Internal error"
|
|
2092
2114
|
})
|
|
2093
2115
|
]);
|
|
2094
2116
|
}
|
|
2095
2117
|
import(extras = {}) {
|
|
2096
|
-
return (0,
|
|
2118
|
+
return (0, import_nesties10.MergeMethodDecorators)([
|
|
2097
2119
|
(0, import_common3.Post)("import"),
|
|
2098
2120
|
(0, import_common3.HttpCode)(200),
|
|
2099
|
-
(0,
|
|
2121
|
+
(0, import_swagger7.ApiOperation)({
|
|
2100
2122
|
summary: `Import ${this.getEntityClassName()}`,
|
|
2101
2123
|
...extras
|
|
2102
2124
|
}),
|
|
2103
|
-
(0,
|
|
2104
|
-
(0,
|
|
2105
|
-
(0,
|
|
2106
|
-
type:
|
|
2125
|
+
(0, import_swagger7.ApiBody)({ type: this.importDto }),
|
|
2126
|
+
(0, import_swagger7.ApiOkResponse)({ type: this.importReturnMessageDto }),
|
|
2127
|
+
(0, import_swagger7.ApiInternalServerErrorResponse)({
|
|
2128
|
+
type: import_nesties10.BlankReturnMessageDto,
|
|
2107
2129
|
description: "Internal error"
|
|
2108
2130
|
})
|
|
2109
2131
|
]);
|
|
@@ -2136,7 +2158,7 @@ var RestfulFactory = class _RestfulFactory {
|
|
|
2136
2158
|
},
|
|
2137
2159
|
findAll: {
|
|
2138
2160
|
paramTypes: [
|
|
2139
|
-
routeOptions.paginateType === "cursor" ? this.findAllCursorPaginatedDto : routeOptions.paginateType === "none" ? (0,
|
|
2161
|
+
routeOptions.paginateType === "cursor" ? this.findAllCursorPaginatedDto : routeOptions.paginateType === "none" ? (0, import_swagger7.OmitType)(this.findAllDto, [
|
|
2140
2162
|
"pageCount",
|
|
2141
2163
|
"recordsPerPage"
|
|
2142
2164
|
]) : this.findAllDto
|
|
@@ -2219,7 +2241,7 @@ var RestfulFactory = class _RestfulFactory {
|
|
|
2219
2241
|
Object.defineProperty(cl.prototype, method, descriptor);
|
|
2220
2242
|
});
|
|
2221
2243
|
}
|
|
2222
|
-
return RenameClass(cl, `${this.getEntityClassName()}Controller`);
|
|
2244
|
+
return (0, import_nesties11.RenameClass)(cl, `${this.getEntityClassName()}Controller`);
|
|
2223
2245
|
}
|
|
2224
2246
|
crudService(options = {}) {
|
|
2225
2247
|
return CrudService(this.entityClass, {
|
|
@@ -2272,7 +2294,6 @@ var RestfulFactory = class _RestfulFactory {
|
|
|
2272
2294
|
QuerySearch,
|
|
2273
2295
|
Relation,
|
|
2274
2296
|
RelationComputed,
|
|
2275
|
-
RenameClass,
|
|
2276
2297
|
RestfulFactory,
|
|
2277
2298
|
StringColumn,
|
|
2278
2299
|
StringIdBase,
|