@elsikora/nestjs-crud-automator 3.0.0-dev.1 → 3.0.1-dev.1
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/cjs/type/decorator/api/function/get/list/properties/type.d.ts +1 -1
- package/dist/cjs/type/decorator/api/function/get/list/properties/where.type.d.ts +1 -2
- package/dist/cjs/type/utility/api/controller/transform-data/object-to-transform.type.d.ts +1 -1
- package/dist/cjs/type/utility/date/keys.type.d.ts +3 -2
- package/dist/cjs/type/utility/non-date-keys.type.d.ts +2 -2
- package/dist/cjs/utility/api/controller/get-list/transform/filter.utility.d.ts +1 -1
- package/dist/cjs/utility/api/controller/get-list/transform/operation.utility.d.ts +1 -1
- package/dist/cjs/utility/dto/get/get-list-query-base-class.utility.d.ts +1 -1
- package/dist/esm/type/decorator/api/function/get/list/properties/type.d.ts +1 -1
- package/dist/esm/type/decorator/api/function/get/list/properties/where.type.d.ts +1 -2
- package/dist/esm/type/utility/api/controller/transform-data/object-to-transform.type.d.ts +1 -1
- package/dist/esm/type/utility/date/keys.type.d.ts +3 -2
- package/dist/esm/type/utility/non-date-keys.type.d.ts +2 -2
- package/dist/esm/utility/api/controller/get-list/transform/filter.utility.d.ts +1 -1
- package/dist/esm/utility/api/controller/get-list/transform/operation.utility.d.ts +1 -1
- package/dist/esm/utility/dto/get/get-list-query-base-class.utility.d.ts +1 -1
- package/package.json +2 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { FindManyOptions } from '
|
|
1
|
+
import { FindManyOptions } from 'typeorm';
|
|
2
2
|
export type TApiFunctionGetListProperties<E> = FindManyOptions<E>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { FindOperator } from '
|
|
2
|
-
import { FindOptionsWhere } from '../../../../../../../../node_modules/typeorm/index';
|
|
1
|
+
import { FindOperator, FindOptionsWhere } from 'typeorm';
|
|
3
2
|
export type TApiFunctionGetListPropertiesWhere<E> = {
|
|
4
3
|
createdAt?: FindOperator<Date>;
|
|
5
4
|
receivedAt?: FindOperator<Date>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IApiGetListResponseResult } from '../../../../../interface/decorator/api';
|
|
2
2
|
import { TApiControllerGetListQuery } from '../../../../decorator/api/controller';
|
|
3
|
-
import { DeepPartial } from '
|
|
3
|
+
import { DeepPartial } from 'typeorm';
|
|
4
4
|
export type TApiControllerTransformDataObjectToTransform<E> = {
|
|
5
5
|
body?: DeepPartial<E>;
|
|
6
6
|
parameters?: Partial<E>;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export type TDateKeys<E> = keyof {
|
|
2
|
+
[P in keyof E as E[P] extends Date ? P : never]: E[P];
|
|
3
|
+
} & string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export type TNonDateKeys<E> = Omit<E, keyof
|
|
1
|
+
import { TDateKeys } from './date';
|
|
2
|
+
export type TNonDateKeys<E> = Omit<E, keyof TDateKeys<E>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IApiEntity } from '../../../../../interface/entity';
|
|
2
2
|
import { Type } from '@nestjs/common';
|
|
3
3
|
import { IAuthGuard } from '@nestjs/passport';
|
|
4
|
-
import { FindOptionsWhere } from '
|
|
4
|
+
import { FindOptionsWhere } from 'typeorm';
|
|
5
5
|
/**
|
|
6
6
|
* Transforms query parameters into TypeORM FindOptionsWhere filter objects.
|
|
7
7
|
* Parses query parameters with filter operations and converts them to appropriate database filters.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FindOperator } from '
|
|
1
|
+
import { FindOperator } from 'typeorm';
|
|
2
2
|
import { EFilterOperation } from '../../../../../enum/filter';
|
|
3
3
|
/**
|
|
4
4
|
* Converts filter operation enum values to TypeORM query operators.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IApiControllerGetListQueryPlan } from '../../../interface/class/api/controller/get-list/query';
|
|
2
2
|
import { Type } from '@nestjs/common';
|
|
3
|
-
import { ObjectLiteral } from '
|
|
3
|
+
import { ObjectLiteral } from 'typeorm';
|
|
4
4
|
import { EApiDtoType, EApiRouteType } from '../../../enum/decorator/api';
|
|
5
5
|
import { IApiEntity } from '../../../interface/entity';
|
|
6
6
|
/**
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { FindManyOptions } from '
|
|
1
|
+
import { FindManyOptions } from 'typeorm';
|
|
2
2
|
export type TApiFunctionGetListProperties<E> = FindManyOptions<E>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { FindOperator } from '
|
|
2
|
-
import { FindOptionsWhere } from '../../../../../../../../node_modules/typeorm/index';
|
|
1
|
+
import { FindOperator, FindOptionsWhere } from 'typeorm';
|
|
3
2
|
export type TApiFunctionGetListPropertiesWhere<E> = {
|
|
4
3
|
createdAt?: FindOperator<Date>;
|
|
5
4
|
receivedAt?: FindOperator<Date>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IApiGetListResponseResult } from '../../../../../interface/decorator/api';
|
|
2
2
|
import { TApiControllerGetListQuery } from '../../../../decorator/api/controller';
|
|
3
|
-
import { DeepPartial } from '
|
|
3
|
+
import { DeepPartial } from 'typeorm';
|
|
4
4
|
export type TApiControllerTransformDataObjectToTransform<E> = {
|
|
5
5
|
body?: DeepPartial<E>;
|
|
6
6
|
parameters?: Partial<E>;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export type TDateKeys<E> = keyof {
|
|
2
|
+
[P in keyof E as E[P] extends Date ? P : never]: E[P];
|
|
3
|
+
} & string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export type TNonDateKeys<E> = Omit<E, keyof
|
|
1
|
+
import { TDateKeys } from './date';
|
|
2
|
+
export type TNonDateKeys<E> = Omit<E, keyof TDateKeys<E>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IApiEntity } from '../../../../../interface/entity';
|
|
2
2
|
import { Type } from '@nestjs/common';
|
|
3
3
|
import { IAuthGuard } from '@nestjs/passport';
|
|
4
|
-
import { FindOptionsWhere } from '
|
|
4
|
+
import { FindOptionsWhere } from 'typeorm';
|
|
5
5
|
/**
|
|
6
6
|
* Transforms query parameters into TypeORM FindOptionsWhere filter objects.
|
|
7
7
|
* Parses query parameters with filter operations and converts them to appropriate database filters.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FindOperator } from '
|
|
1
|
+
import { FindOperator } from 'typeorm';
|
|
2
2
|
import { EFilterOperation } from '../../../../../enum/filter';
|
|
3
3
|
/**
|
|
4
4
|
* Converts filter operation enum values to TypeORM query operators.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IApiControllerGetListQueryPlan } from '../../../interface/class/api/controller/get-list/query';
|
|
2
2
|
import { Type } from '@nestjs/common';
|
|
3
|
-
import { ObjectLiteral } from '
|
|
3
|
+
import { ObjectLiteral } from 'typeorm';
|
|
4
4
|
import { EApiDtoType, EApiRouteType } from '../../../enum/decorator/api';
|
|
5
5
|
import { IApiEntity } from '../../../interface/entity';
|
|
6
6
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elsikora/nestjs-crud-automator",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.1-dev.1",
|
|
4
4
|
"description": "A library for automating the creation of CRUD operations in NestJS.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"NestJS",
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
"branch": "npx @elsikora/git-branch-lint -b",
|
|
36
36
|
"prebuild": "rimraf dist",
|
|
37
37
|
"build": "npm run prebuild && rollup -c",
|
|
38
|
+
"postbuild": "node scripts/check-declaration-imports.cjs",
|
|
38
39
|
"commit": "cz",
|
|
39
40
|
"format": "prettier --check .",
|
|
40
41
|
"format:fix": "prettier --write .",
|