@elsikora/nestjs-crud-automator 1.1.2 → 1.2.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/class/api/base-service.class.d.ts +9 -10
- package/dist/class/api/base-service.class.js +19 -10
- package/dist/class/api/base-service.class.js.map +1 -1
- package/dist/class/index.d.ts +1 -0
- package/dist/class/index.js +1 -0
- package/dist/class/index.js.map +1 -1
- package/dist/class/metadata-storage.class.d.ts +8 -0
- package/dist/class/metadata-storage.class.js +45 -0
- package/dist/class/metadata-storage.class.js.map +1 -0
- package/dist/constant/decorator/api/controller.constant.d.ts +3 -0
- package/dist/constant/decorator/api/controller.constant.js +8 -0
- package/dist/constant/decorator/api/controller.constant.js.map +1 -0
- package/dist/constant/decorator/api/function.constant.d.ts +1 -1
- package/dist/constant/decorator/api/function.constant.js +2 -2
- package/dist/constant/decorator/api/function.constant.js.map +1 -1
- package/dist/constant/decorator/api/index.d.ts +2 -0
- package/dist/constant/decorator/api/index.js +2 -0
- package/dist/constant/decorator/api/index.js.map +1 -1
- package/dist/constant/decorator/api/property-describe.constant.d.ts +3 -0
- package/dist/constant/decorator/api/property-describe.constant.js +8 -0
- package/dist/constant/decorator/api/property-describe.constant.js.map +1 -0
- package/dist/constant/factory/dto/get-list-query.constant.d.ts +6 -0
- package/dist/constant/factory/dto/get-list-query.constant.js +14 -0
- package/dist/constant/factory/dto/get-list-query.constant.js.map +1 -0
- package/dist/constant/factory/dto/index.d.ts +1 -0
- package/dist/constant/factory/dto/index.js +18 -0
- package/dist/constant/factory/dto/index.js.map +1 -0
- package/dist/constant/factory/index.d.ts +1 -0
- package/dist/constant/factory/index.js +18 -0
- package/dist/constant/factory/index.js.map +1 -0
- package/dist/constant/index.d.ts +1 -0
- package/dist/constant/index.js +1 -0
- package/dist/constant/index.js.map +1 -1
- package/dist/constant/interface/api/filter.constant.d.ts +2 -2
- package/dist/constant/interface/api/filter.constant.js +3 -7
- package/dist/constant/interface/api/filter.constant.js.map +1 -1
- package/dist/constant/interface/api/index.d.ts +1 -0
- package/dist/constant/interface/api/index.js +1 -0
- package/dist/constant/interface/api/index.js.map +1 -1
- package/dist/constant/interface/api/property/string.constant.d.ts +1 -1
- package/dist/constant/interface/api/property/string.constant.js +2 -2
- package/dist/constant/interface/api/property/string.constant.js.map +1 -1
- package/dist/constant/interface/api/property/wallet.constant.d.ts +1 -1
- package/dist/constant/interface/api/property/wallet.constant.js +2 -2
- package/dist/constant/interface/api/property/wallet.constant.js.map +1 -1
- package/dist/decorator/api/controller.decorator.d.ts +7 -9
- package/dist/decorator/api/controller.decorator.js +13 -26
- package/dist/decorator/api/controller.decorator.js.map +1 -1
- package/dist/decorator/api/function/create/executor-properties.type.d.ts +8 -0
- package/dist/decorator/api/function/create/executor-properties.type.js +3 -0
- package/dist/decorator/api/function/create/executor-properties.type.js.map +1 -0
- package/dist/decorator/api/function/create/index.d.ts +1 -0
- package/dist/decorator/api/function/create/index.js +18 -0
- package/dist/decorator/api/function/create/index.js.map +1 -0
- package/dist/decorator/api/function/create.decorator.d.ts +2 -4
- package/dist/decorator/api/function/create.decorator.js +17 -16
- package/dist/decorator/api/function/create.decorator.js.map +1 -1
- package/dist/decorator/api/function/decorator.d.ts +5 -4
- package/dist/decorator/api/function/decorator.js +21 -18
- package/dist/decorator/api/function/decorator.js.map +1 -1
- package/dist/decorator/api/function/delete.decorator.d.ts +3 -3
- package/dist/decorator/api/function/delete.decorator.js +7 -5
- package/dist/decorator/api/function/delete.decorator.js.map +1 -1
- package/dist/decorator/api/function/get-list.decorator.d.ts +3 -3
- package/dist/decorator/api/function/get-list.decorator.js +9 -9
- package/dist/decorator/api/function/get-list.decorator.js.map +1 -1
- package/dist/decorator/api/function/get.decorator.d.ts +3 -3
- package/dist/decorator/api/function/get.decorator.js +6 -7
- package/dist/decorator/api/function/get.decorator.js.map +1 -1
- package/dist/decorator/api/function/index.d.ts +1 -0
- package/dist/decorator/api/function/index.js +1 -0
- package/dist/decorator/api/function/index.js.map +1 -1
- package/dist/decorator/api/function/update.decorator.d.ts +3 -3
- package/dist/decorator/api/function/update.decorator.js +11 -15
- package/dist/decorator/api/function/update.decorator.js.map +1 -1
- package/dist/decorator/api/method.decorator.js.map +1 -1
- package/dist/decorator/api/property/boolean.decorator.js.map +1 -1
- package/dist/decorator/api/property/date.decorator.js +1 -1
- package/dist/decorator/api/property/date.decorator.js.map +1 -1
- package/dist/decorator/api/property/describe.decorator.d.ts +2 -0
- package/dist/decorator/api/property/describe.decorator.js +12 -0
- package/dist/decorator/api/property/describe.decorator.js.map +1 -0
- package/dist/decorator/api/property/index.d.ts +1 -0
- package/dist/decorator/api/property/index.js +1 -0
- package/dist/decorator/api/property/index.js.map +1 -1
- package/dist/decorator/api/property/number.decorator.js +1 -1
- package/dist/decorator/api/property/number.decorator.js.map +1 -1
- package/dist/decorator/api/property/object.decorator.js.map +1 -1
- package/dist/decorator/api/property/string.decorator.js +4 -4
- package/dist/decorator/api/property/string.decorator.js.map +1 -1
- package/dist/decorator/api/property/uuid.decorator.js.map +1 -1
- package/dist/decorator/api/property/wallet.decorator.js +3 -3
- package/dist/decorator/api/property/wallet.decorator.js.map +1 -1
- package/dist/decorator/api/route/decorator.d.ts +5 -5
- package/dist/decorator/api/route/decorator.js +3 -4
- package/dist/decorator/api/route/decorator.js.map +1 -1
- package/dist/decorator/api/route/get.decorator.d.ts +5 -5
- package/dist/decorator/api/route/get.decorator.js +9 -8
- package/dist/decorator/api/route/get.decorator.js.map +1 -1
- package/dist/decorator/api/service.decorator.d.ts +5 -7
- package/dist/decorator/api/service.decorator.js +31 -56
- package/dist/decorator/api/service.decorator.js.map +1 -1
- package/dist/dto/exception/bad-request.dto.js +1 -1
- package/dist/dto/exception/bad-request.dto.js.map +1 -1
- package/dist/dto/exception/conflict.dto.js +1 -1
- package/dist/dto/exception/conflict.dto.js.map +1 -1
- package/dist/dto/exception/forbidden.dto.js +1 -1
- package/dist/dto/exception/forbidden.dto.js.map +1 -1
- package/dist/dto/exception/internal-server-error.dto.js +1 -1
- package/dist/dto/exception/internal-server-error.dto.js.map +1 -1
- package/dist/dto/exception/not-found.dto.js +1 -1
- package/dist/dto/exception/not-found.dto.js.map +1 -1
- package/dist/dto/exception/too-many-requests.dto.js +1 -1
- package/dist/dto/exception/too-many-requests.dto.js.map +1 -1
- package/dist/dto/exception/unauthorized.dto.js +1 -1
- package/dist/dto/exception/unauthorized.dto.js.map +1 -1
- package/dist/enum/decorator/api/dto-type.enum.d.ts +6 -0
- package/dist/enum/decorator/api/dto-type.enum.js +11 -0
- package/dist/enum/decorator/api/dto-type.enum.js.map +1 -0
- package/dist/enum/decorator/api/function/type.enum.d.ts +5 -5
- package/dist/enum/decorator/api/function/type.enum.js +4 -4
- package/dist/enum/decorator/api/function/type.enum.js.map +1 -1
- package/dist/enum/decorator/api/index.d.ts +2 -0
- package/dist/enum/decorator/api/index.js +2 -0
- package/dist/enum/decorator/api/index.js.map +1 -1
- package/dist/enum/decorator/api/property/desribe-type.enum.d.ts +8 -0
- package/dist/enum/decorator/api/property/desribe-type.enum.js +13 -0
- package/dist/enum/decorator/api/property/desribe-type.enum.js.map +1 -0
- package/dist/enum/decorator/api/property/index.d.ts +1 -0
- package/dist/enum/decorator/api/property/index.js +1 -0
- package/dist/enum/decorator/api/property/index.js.map +1 -1
- package/dist/enum/decorator/api/{controller/type.enum.d.ts → route-type.enum.d.ts} +4 -6
- package/dist/enum/decorator/api/{controller/type.enum.js → route-type.enum.js} +5 -7
- package/dist/enum/decorator/api/route-type.enum.js.map +1 -0
- package/dist/factory/api/controller.factory.d.ts +28 -1
- package/dist/factory/api/controller.factory.js +200 -0
- package/dist/factory/api/controller.factory.js.map +1 -1
- package/dist/helper/index.d.ts +1 -1
- package/dist/helper/index.js +0 -15
- package/dist/helper/index.js.map +1 -1
- package/dist/interceptor/correlation-id-response-body.interceptor.js.map +1 -1
- package/dist/interface/api-base-entity.interface.d.ts +2 -1
- package/dist/interface/api-base-entity.interface.js.map +1 -1
- package/dist/interface/decorator/api/base-controller.interface.d.ts +2 -5
- package/dist/interface/decorator/api/base-controller.interface.js.map +1 -1
- package/dist/interface/decorator/api/controller-properties.interface.d.ts +16 -20
- package/dist/interface/decorator/api/controller-properties.interface.js +0 -1
- package/dist/interface/decorator/api/controller-properties.interface.js.map +1 -1
- package/dist/interface/decorator/api/function/create-properties.interface.d.ts +4 -0
- package/dist/interface/decorator/api/function/create-properties.interface.js +3 -0
- package/dist/interface/decorator/api/function/create-properties.interface.js.map +1 -0
- package/dist/interface/decorator/api/method/properties.interface.d.ts +3 -3
- package/dist/interface/decorator/api/method/properties.interface.js.map +1 -1
- package/dist/interface/decorator/api/property/base-properties.interface.d.ts +1 -1
- package/dist/interface/decorator/api/property/base-properties.interface.js.map +1 -1
- package/dist/interface/decorator/api/property/date-properties.interface.d.ts +1 -1
- package/dist/interface/decorator/api/property/date-properties.interface.js.map +1 -1
- package/dist/interface/decorator/api/property/object-properties.interface.d.ts +1 -1
- package/dist/interface/decorator/api/property/object-properties.interface.js.map +1 -1
- package/dist/interface/decorator/api/property/string-properties.interface.d.ts +1 -1
- package/dist/interface/decorator/api/property/string-properties.interface.js.map +1 -1
- package/dist/interface/entity/column.interface.d.ts +7 -0
- package/dist/interface/entity/column.interface.js +3 -0
- package/dist/interface/entity/column.interface.js.map +1 -0
- package/dist/interface/entity/index.d.ts +2 -0
- package/dist/interface/entity/index.js +19 -0
- package/dist/interface/entity/index.js.map +1 -0
- package/dist/interface/entity/interface.d.ts +7 -0
- package/dist/interface/entity/interface.js +3 -0
- package/dist/interface/entity/interface.js.map +1 -0
- package/dist/interface/index.d.ts +1 -0
- package/dist/interface/index.js +1 -0
- package/dist/interface/index.js.map +1 -1
- package/dist/interface/utility/get-entity-columns-properties.interface.d.ts +5 -0
- package/dist/interface/utility/get-entity-columns-properties.interface.js +3 -0
- package/dist/interface/utility/get-entity-columns-properties.interface.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/type/decorator/api/filter/allowed-types.type.d.ts +1 -0
- package/dist/type/decorator/api/filter/allowed-types.type.js.map +1 -0
- package/dist/type/{api → decorator/api}/filter/extracted-allowed-types.type.d.ts +1 -1
- package/dist/type/decorator/api/filter/extracted-allowed-types.type.js.map +1 -0
- package/dist/type/decorator/api/filter/field-selector.type.js.map +1 -0
- package/dist/type/decorator/api/filter/index.js.map +1 -0
- package/dist/type/decorator/api/filter/order-by.type.d.ts +4 -0
- package/dist/type/decorator/api/filter/order-by.type.js.map +1 -0
- package/dist/type/decorator/api/function/create-properties.type.d.ts +1 -0
- package/dist/type/decorator/api/function/create-properties.type.js.map +1 -0
- package/dist/type/decorator/api/function/get-list-properties.type.d.ts +23 -0
- package/dist/type/decorator/api/function/get-list-properties.type.js.map +1 -0
- package/dist/type/decorator/api/function/get-properties.type.d.ts +6 -0
- package/dist/type/decorator/api/function/get-properties.type.js.map +1 -0
- package/dist/type/decorator/api/function/index.js.map +1 -0
- package/dist/type/decorator/api/function/update-properties.type.d.ts +1 -0
- package/dist/type/decorator/api/function/update-properties.type.js.map +1 -0
- package/dist/type/{api → decorator/api}/index.d.ts +1 -0
- package/dist/type/{api → decorator/api}/index.js +1 -0
- package/dist/type/decorator/api/index.js.map +1 -0
- package/dist/type/decorator/api/property/describe/array/index.d.ts +2 -0
- package/dist/type/decorator/api/property/describe/array/index.js +19 -0
- package/dist/type/decorator/api/property/describe/array/index.js.map +1 -0
- package/dist/type/decorator/api/property/describe/array/optional-properties.type.d.ts +3 -0
- package/dist/type/decorator/api/property/describe/array/optional-properties.type.js +3 -0
- package/dist/type/decorator/api/property/describe/array/optional-properties.type.js.map +1 -0
- package/dist/type/decorator/api/property/describe/array/required-properties.type.d.ts +6 -0
- package/dist/type/decorator/api/property/describe/array/required-properties.type.js +3 -0
- package/dist/type/decorator/api/property/describe/array/required-properties.type.js.map +1 -0
- package/dist/type/decorator/api/property/describe/base-properties.type.d.ts +7 -0
- package/dist/type/decorator/api/property/describe/base-properties.type.js +3 -0
- package/dist/type/decorator/api/property/describe/base-properties.type.js.map +1 -0
- package/dist/type/decorator/api/property/describe/boolean-properties.type.d.ts +7 -0
- package/dist/type/decorator/api/property/describe/boolean-properties.type.js +3 -0
- package/dist/type/decorator/api/property/describe/boolean-properties.type.js.map +1 -0
- package/dist/type/decorator/api/property/describe/date-properties.type.d.ts +7 -0
- package/dist/type/decorator/api/property/describe/date-properties.type.js +3 -0
- package/dist/type/decorator/api/property/describe/date-properties.type.js.map +1 -0
- package/dist/type/decorator/api/property/describe/dto/body-properties.type.d.ts +5 -0
- package/dist/type/decorator/api/property/describe/dto/body-properties.type.js +3 -0
- package/dist/type/decorator/api/property/describe/dto/body-properties.type.js.map +1 -0
- package/dist/type/decorator/api/property/describe/dto/index.d.ts +5 -0
- package/dist/type/decorator/api/property/describe/dto/index.js +22 -0
- package/dist/type/decorator/api/property/describe/dto/index.js.map +1 -0
- package/dist/type/decorator/api/property/describe/dto/properties.type.d.ts +6 -0
- package/dist/type/decorator/api/property/describe/dto/properties.type.js +3 -0
- package/dist/type/decorator/api/property/describe/dto/properties.type.js.map +1 -0
- package/dist/type/decorator/api/property/describe/dto/query/get-list-properties.type.d.ts +3 -0
- package/dist/type/decorator/api/property/describe/dto/query/get-list-properties.type.js +3 -0
- package/dist/type/decorator/api/property/describe/dto/query/get-list-properties.type.js.map +1 -0
- package/dist/type/decorator/api/property/describe/dto/query/index.d.ts +2 -0
- package/dist/type/decorator/api/property/describe/dto/query/index.js +19 -0
- package/dist/type/decorator/api/property/describe/dto/query/index.js.map +1 -0
- package/dist/type/decorator/api/property/describe/dto/query/properties.type.d.ts +6 -0
- package/dist/type/decorator/api/property/describe/dto/query/properties.type.js +3 -0
- package/dist/type/decorator/api/property/describe/dto/query/properties.type.js.map +1 -0
- package/dist/type/decorator/api/property/describe/dto/request-properties.type.d.ts +5 -0
- package/dist/type/decorator/api/property/describe/dto/request-properties.type.js +3 -0
- package/dist/type/decorator/api/property/describe/dto/request-properties.type.js.map +1 -0
- package/dist/type/decorator/api/property/describe/dto/response-properties.type.d.ts +5 -0
- package/dist/type/decorator/api/property/describe/dto/response-properties.type.js +3 -0
- package/dist/type/decorator/api/property/describe/dto/response-properties.type.js.map +1 -0
- package/dist/type/decorator/api/property/describe/example-properties.type.d.ts +7 -0
- package/dist/type/decorator/api/property/describe/example-properties.type.js +3 -0
- package/dist/type/decorator/api/property/describe/example-properties.type.js.map +1 -0
- package/dist/type/decorator/api/property/describe/index.d.ts +12 -0
- package/dist/type/decorator/api/property/describe/index.js +29 -0
- package/dist/type/decorator/api/property/describe/index.js.map +1 -0
- package/dist/type/decorator/api/property/describe/number-properties.type.d.ts +13 -0
- package/dist/type/decorator/api/property/describe/number-properties.type.js +3 -0
- package/dist/type/decorator/api/property/describe/number-properties.type.js.map +1 -0
- package/dist/type/decorator/api/property/describe/object-properties.type.d.ts +8 -0
- package/dist/type/decorator/api/property/describe/object-properties.type.js +3 -0
- package/dist/type/decorator/api/property/describe/object-properties.type.js.map +1 -0
- package/dist/type/decorator/api/property/describe/properties/base-dto-properties.type.d.ts +2 -0
- package/dist/type/decorator/api/property/describe/properties/base-dto-properties.type.js +3 -0
- package/dist/type/decorator/api/property/describe/properties/base-dto-properties.type.js.map +1 -0
- package/dist/type/decorator/api/property/describe/properties/base-properties.type.d.ts +10 -0
- package/dist/type/decorator/api/property/describe/properties/base-properties.type.js +3 -0
- package/dist/type/decorator/api/property/describe/properties/base-properties.type.js.map +1 -0
- package/dist/type/decorator/api/property/describe/properties/index.d.ts +2 -0
- package/dist/type/decorator/api/property/describe/properties/index.js +19 -0
- package/dist/type/decorator/api/property/describe/properties/index.js.map +1 -0
- package/dist/type/decorator/api/property/describe/properties.type.d.ts +7 -0
- package/dist/type/decorator/api/property/describe/properties.type.js +3 -0
- package/dist/type/decorator/api/property/describe/properties.type.js.map +1 -0
- package/dist/type/decorator/api/property/describe/string-properties.type.d.ts +13 -0
- package/dist/type/decorator/api/property/describe/string-properties.type.js +3 -0
- package/dist/type/decorator/api/property/describe/string-properties.type.js.map +1 -0
- package/dist/type/decorator/api/property/describe/uuid-properties.type.d.ts +7 -0
- package/dist/type/decorator/api/property/describe/uuid-properties.type.js +3 -0
- package/dist/type/decorator/api/property/describe/uuid-properties.type.js.map +1 -0
- package/dist/type/decorator/api/property/index.d.ts +1 -0
- package/dist/type/decorator/api/property/index.js +18 -0
- package/dist/type/decorator/api/property/index.js.map +1 -0
- package/dist/type/decorator/index.d.ts +1 -0
- package/dist/type/decorator/index.js +18 -0
- package/dist/type/decorator/index.js.map +1 -0
- package/dist/type/factory/api/controller/index.d.ts +1 -0
- package/dist/type/factory/api/controller/index.js +18 -0
- package/dist/type/factory/api/controller/index.js.map +1 -0
- package/dist/type/factory/api/controller/target-methods.type.d.ts +1 -0
- package/dist/type/factory/api/controller/target-methods.type.js +3 -0
- package/dist/type/factory/api/controller/target-methods.type.js.map +1 -0
- package/dist/type/factory/api/index.d.ts +1 -0
- package/dist/type/factory/api/index.js +18 -0
- package/dist/type/factory/api/index.js.map +1 -0
- package/dist/type/factory/index.d.ts +1 -0
- package/dist/type/factory/index.js +18 -0
- package/dist/type/factory/index.js.map +1 -0
- package/dist/type/index.d.ts +2 -1
- package/dist/type/index.js +2 -1
- package/dist/type/index.js.map +1 -1
- package/dist/utility/api/controller/get-method-name.utility.d.ts +2 -0
- package/dist/utility/api/controller/get-method-name.utility.js +9 -0
- package/dist/utility/api/controller/get-method-name.utility.js.map +1 -0
- package/dist/utility/api/controller/index.d.ts +2 -0
- package/dist/utility/api/controller/index.js +19 -0
- package/dist/utility/api/controller/index.js.map +1 -0
- package/dist/utility/api/controller/write-method.utility.d.ts +3 -0
- package/dist/utility/api/controller/write-method.utility.js +13 -0
- package/dist/utility/api/controller/write-method.utility.js.map +1 -0
- package/dist/utility/api/filter-order-by-from-entity.utility.d.ts +5 -3
- package/dist/utility/api/filter-order-by-from-entity.utility.js +22 -15
- package/dist/utility/api/filter-order-by-from-entity.utility.js.map +1 -1
- package/dist/utility/api/index.d.ts +1 -0
- package/dist/utility/api/index.js +1 -0
- package/dist/utility/api/index.js.map +1 -1
- package/dist/utility/capitalize-string.utility.d.ts +1 -0
- package/dist/utility/capitalize-string.utility.js +7 -0
- package/dist/utility/capitalize-string.utility.js.map +1 -0
- package/dist/utility/dto/analize.utility.d.ts +1 -0
- package/dist/utility/dto/analize.utility.js +10 -0
- package/dist/utility/dto/analize.utility.js.map +1 -0
- package/dist/utility/dto/generate.utility.d.ts +5 -0
- package/dist/utility/dto/generate.utility.js +371 -0
- package/dist/utility/dto/generate.utility.js.map +1 -0
- package/dist/utility/dto/index.d.ts +1 -0
- package/dist/utility/dto/index.js +18 -0
- package/dist/utility/dto/index.js.map +1 -0
- package/dist/utility/error-exception.utility.d.ts +1 -0
- package/dist/utility/error-exception.utility.js +7 -0
- package/dist/utility/error-exception.utility.js.map +1 -0
- package/dist/utility/generate-entity-information.utility.d.ts +2 -0
- package/dist/utility/generate-entity-information.utility.js +51 -0
- package/dist/utility/generate-entity-information.utility.js.map +1 -0
- package/dist/utility/get-entity-columns.utility.d.ts +3 -2
- package/dist/utility/get-entity-columns.utility.js +4 -5
- package/dist/utility/get-entity-columns.utility.js.map +1 -1
- package/dist/utility/index.d.ts +4 -0
- package/dist/utility/index.js +4 -0
- package/dist/utility/index.js.map +1 -1
- package/dist/validator/all-or-none-of-listed-properties.validator.d.ts +5 -0
- package/dist/validator/all-or-none-of-listed-properties.validator.js +29 -0
- package/dist/validator/all-or-none-of-listed-properties.validator.js.map +1 -0
- package/dist/validator/has-at-least-one-and-only-one-of-listed-properties.validator.d.ts +5 -0
- package/dist/validator/has-at-least-one-and-only-one-of-listed-properties.validator.js +39 -0
- package/dist/validator/has-at-least-one-and-only-one-of-listed-properties.validator.js.map +1 -0
- package/dist/validator/has-at-least-one-of-listed-properties.validator.d.ts +5 -0
- package/dist/validator/has-at-least-one-of-listed-properties.validator.js +35 -0
- package/dist/validator/has-at-least-one-of-listed-properties.validator.js.map +1 -0
- package/dist/validator/has-at-least-one-property.validator.d.ts +5 -0
- package/dist/validator/has-at-least-one-property.validator.js +23 -0
- package/dist/validator/has-at-least-one-property.validator.js.map +1 -0
- package/dist/validator/index.d.ts +5 -0
- package/dist/validator/index.js +5 -0
- package/dist/validator/index.js.map +1 -1
- package/dist/validator/only-one-of-listed-properties.validator.d.ts +5 -0
- package/dist/validator/only-one-of-listed-properties.validator.js +37 -0
- package/dist/validator/only-one-of-listed-properties.validator.js.map +1 -0
- package/package.json +5 -3
- package/dist/enum/decorator/api/controller/type.enum.js.map +0 -1
- package/dist/helper/reflector.helper.d.ts +0 -20
- package/dist/helper/reflector.helper.js +0 -77
- package/dist/helper/reflector.helper.js.map +0 -1
- package/dist/type/api/filter/allowed-types.type.d.ts +0 -1
- package/dist/type/api/filter/allowed-types.type.js.map +0 -1
- package/dist/type/api/filter/extracted-allowed-types.type.js.map +0 -1
- package/dist/type/api/filter/field-selector.type.js.map +0 -1
- package/dist/type/api/filter/index.js.map +0 -1
- package/dist/type/api/filter/order-by.type.d.ts +0 -5
- package/dist/type/api/filter/order-by.type.js.map +0 -1
- package/dist/type/api/function/create-properties.type.d.ts +0 -2
- package/dist/type/api/function/create-properties.type.js.map +0 -1
- package/dist/type/api/function/get-list-properties.type.d.ts +0 -23
- package/dist/type/api/function/get-list-properties.type.js.map +0 -1
- package/dist/type/api/function/get-properties.type.d.ts +0 -6
- package/dist/type/api/function/get-properties.type.js.map +0 -1
- package/dist/type/api/function/index.js.map +0 -1
- package/dist/type/api/function/update-properties.type.d.ts +0 -2
- package/dist/type/api/function/update-properties.type.js.map +0 -1
- package/dist/type/api/index.js.map +0 -1
- /package/dist/type/{api → decorator/api}/filter/allowed-types.type.js +0 -0
- /package/dist/type/{api → decorator/api}/filter/extracted-allowed-types.type.js +0 -0
- /package/dist/type/{api → decorator/api}/filter/field-selector.type.d.ts +0 -0
- /package/dist/type/{api → decorator/api}/filter/field-selector.type.js +0 -0
- /package/dist/type/{api → decorator/api}/filter/index.d.ts +0 -0
- /package/dist/type/{api → decorator/api}/filter/index.js +0 -0
- /package/dist/type/{api → decorator/api}/filter/order-by.type.js +0 -0
- /package/dist/type/{api → decorator/api}/function/create-properties.type.js +0 -0
- /package/dist/type/{api → decorator/api}/function/get-list-properties.type.js +0 -0
- /package/dist/type/{api → decorator/api}/function/get-properties.type.js +0 -0
- /package/dist/type/{api → decorator/api}/function/index.d.ts +0 -0
- /package/dist/type/{api → decorator/api}/function/index.js +0 -0
- /package/dist/type/{api → decorator/api}/function/update-properties.type.js +0 -0
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { IApiGetListResponseResult } from "../../interface";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
get(
|
|
8
|
-
|
|
9
|
-
update(
|
|
10
|
-
delete(_id: string): Promise<void>;
|
|
1
|
+
import type { IApiGetListResponseResult } from "../../interface";
|
|
2
|
+
import type { TApiFunctionCreateProperties, TApiFunctionGetListProperties, TApiFunctionGetProperties, TApiFunctionUpdateProperties } from "../../type";
|
|
3
|
+
import type { FindOptionsRelations } from "typeorm";
|
|
4
|
+
export declare class BaseApiService<E> {
|
|
5
|
+
create(properties: TApiFunctionCreateProperties<E>): Promise<E>;
|
|
6
|
+
delete(id: string): Promise<void>;
|
|
7
|
+
get(id: string, properties?: TApiFunctionGetProperties<E>, relations?: FindOptionsRelations<E>): Promise<E>;
|
|
8
|
+
getList(properties: TApiFunctionGetListProperties<E>, relations?: FindOptionsRelations<E>): Promise<IApiGetListResponseResult<E>>;
|
|
9
|
+
update(id: string, properties: TApiFunctionUpdateProperties<E>): Promise<E>;
|
|
11
10
|
}
|
|
@@ -2,20 +2,29 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BaseApiService = void 0;
|
|
4
4
|
class BaseApiService {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
create(properties) {
|
|
6
|
+
void properties;
|
|
7
|
+
return Promise.resolve({});
|
|
7
8
|
}
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
delete(id) {
|
|
10
|
+
void id;
|
|
11
|
+
return Promise.resolve();
|
|
10
12
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
+
get(id, properties, relations) {
|
|
14
|
+
void id;
|
|
15
|
+
void properties;
|
|
16
|
+
void relations;
|
|
17
|
+
return Promise.resolve({});
|
|
13
18
|
}
|
|
14
|
-
|
|
15
|
-
|
|
19
|
+
getList(properties, relations) {
|
|
20
|
+
void properties;
|
|
21
|
+
void relations;
|
|
22
|
+
return Promise.resolve({ items: [], total: 0 });
|
|
16
23
|
}
|
|
17
|
-
|
|
18
|
-
|
|
24
|
+
update(id, properties) {
|
|
25
|
+
void id;
|
|
26
|
+
void properties;
|
|
27
|
+
return Promise.resolve({});
|
|
19
28
|
}
|
|
20
29
|
}
|
|
21
30
|
exports.BaseApiService = BaseApiService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-service.class.js","sourceRoot":"/","sources":["class/api/base-service.class.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"base-service.class.js","sourceRoot":"/","sources":["class/api/base-service.class.ts"],"names":[],"mappings":";;;AAIA,MAAa,cAAc;IAC1B,MAAM,CAAC,UAA2C;QACjD,KAAK,UAAU,CAAC;QAEhB,OAAO,OAAO,CAAC,OAAO,CAAC,EAAO,CAAC,CAAC;IACjC,CAAC;IAED,MAAM,CAAC,EAAU;QAChB,KAAK,EAAE,CAAC;QAER,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC1B,CAAC;IAED,GAAG,CAAC,EAAU,EAAE,UAAyC,EAAE,SAAmC;QAC7F,KAAK,EAAE,CAAC;QACR,KAAK,UAAU,CAAC;QAChB,KAAK,SAAS,CAAC;QAEf,OAAO,OAAO,CAAC,OAAO,CAAC,EAAO,CAAC,CAAC;IACjC,CAAC;IAED,OAAO,CAAC,UAA4C,EAAE,SAAmC;QACxF,KAAK,UAAU,CAAC;QAChB,KAAK,SAAS,CAAC;QAEf,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,EAA6C,CAAC,CAAC;IAC5F,CAAC;IAED,MAAM,CAAC,EAAU,EAAE,UAA2C;QAC7D,KAAK,EAAE,CAAC;QACR,KAAK,UAAU,CAAC;QAEhB,OAAO,OAAO,CAAC,OAAO,CAAC,EAAO,CAAC,CAAC;IACjC,CAAC;CACD;AAlCD,wCAkCC","sourcesContent":["import type { IApiGetListResponseResult } from \"../../interface\";\nimport type { TApiFunctionCreateProperties, TApiFunctionGetListProperties, TApiFunctionGetProperties, TApiFunctionUpdateProperties } from \"../../type\";\nimport type { FindOptionsRelations } from \"typeorm\";\n\nexport class BaseApiService<E> {\n\tcreate(properties: TApiFunctionCreateProperties<E>): Promise<E> {\n\t\tvoid properties;\n\n\t\treturn Promise.resolve({} as E);\n\t}\n\n\tdelete(id: string): Promise<void> {\n\t\tvoid id;\n\n\t\treturn Promise.resolve();\n\t}\n\n\tget(id: string, properties?: TApiFunctionGetProperties<E>, relations?: FindOptionsRelations<E>): Promise<E> {\n\t\tvoid id;\n\t\tvoid properties;\n\t\tvoid relations;\n\n\t\treturn Promise.resolve({} as E);\n\t}\n\n\tgetList(properties: TApiFunctionGetListProperties<E>, relations?: FindOptionsRelations<E>): Promise<IApiGetListResponseResult<E>> {\n\t\tvoid properties;\n\t\tvoid relations;\n\n\t\treturn Promise.resolve({ items: [], total: 0 } as unknown as IApiGetListResponseResult<E>);\n\t}\n\n\tupdate(id: string, properties: TApiFunctionUpdateProperties<E>): Promise<E> {\n\t\tvoid id;\n\t\tvoid properties;\n\n\t\treturn Promise.resolve({} as E);\n\t}\n}\n"]}
|
package/dist/class/index.d.ts
CHANGED
package/dist/class/index.js
CHANGED
|
@@ -15,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./api"), exports);
|
|
18
|
+
__exportStar(require("./metadata-storage.class"), exports);
|
|
18
19
|
//# sourceMappingURL=index.js.map
|
package/dist/class/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"/","sources":["class/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAsB","sourcesContent":["export * from \"./api\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["class/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAsB;AACtB,2DAAyC","sourcesContent":["export * from \"./api\";\nexport * from \"./metadata-storage.class\";\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare class MetadataStorage {
|
|
2
|
+
private static instance;
|
|
3
|
+
private readonly STORAGE;
|
|
4
|
+
static getInstance(): MetadataStorage;
|
|
5
|
+
getAllEntitiesMetadata(): Record<string, Record<string, any>>;
|
|
6
|
+
getMetadata(entityName: string, propertyName?: string, key?: string): any;
|
|
7
|
+
setMetadata(entityName: string, propertyName: string, key: string, value: unknown): void;
|
|
8
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MetadataStorage = void 0;
|
|
4
|
+
class MetadataStorage {
|
|
5
|
+
static instance;
|
|
6
|
+
STORAGE = new Map();
|
|
7
|
+
static getInstance() {
|
|
8
|
+
if (!MetadataStorage.instance) {
|
|
9
|
+
MetadataStorage.instance = new MetadataStorage();
|
|
10
|
+
}
|
|
11
|
+
return MetadataStorage.instance;
|
|
12
|
+
}
|
|
13
|
+
getAllEntitiesMetadata() {
|
|
14
|
+
const result = {};
|
|
15
|
+
for (const [entityName, entityMetadata] of this.STORAGE.entries()) {
|
|
16
|
+
result[entityName] = Object.fromEntries(entityMetadata);
|
|
17
|
+
}
|
|
18
|
+
return result;
|
|
19
|
+
}
|
|
20
|
+
getMetadata(entityName, propertyName, key) {
|
|
21
|
+
const entityMetadata = this.STORAGE.get(entityName);
|
|
22
|
+
if (!entityMetadata)
|
|
23
|
+
return undefined;
|
|
24
|
+
if (!propertyName)
|
|
25
|
+
return Object.fromEntries(entityMetadata);
|
|
26
|
+
const propertyMetadata = entityMetadata.get(propertyName);
|
|
27
|
+
if (!propertyMetadata)
|
|
28
|
+
return undefined;
|
|
29
|
+
if (!key)
|
|
30
|
+
return propertyMetadata;
|
|
31
|
+
return propertyMetadata[key];
|
|
32
|
+
}
|
|
33
|
+
setMetadata(entityName, propertyName, key, value) {
|
|
34
|
+
if (!this.STORAGE.has(entityName)) {
|
|
35
|
+
this.STORAGE.set(entityName, new Map());
|
|
36
|
+
}
|
|
37
|
+
const entityMetadata = this.STORAGE.get(entityName);
|
|
38
|
+
if (!entityMetadata.has(propertyName)) {
|
|
39
|
+
entityMetadata.set(propertyName, {});
|
|
40
|
+
}
|
|
41
|
+
entityMetadata.get(propertyName)[key] = value;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.MetadataStorage = MetadataStorage;
|
|
45
|
+
//# sourceMappingURL=metadata-storage.class.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metadata-storage.class.js","sourceRoot":"/","sources":["class/metadata-storage.class.ts"],"names":[],"mappings":";;;AAAA,MAAa,eAAe;IACnB,MAAM,CAAC,QAAQ,CAAkB;IAExB,OAAO,GAAkC,IAAI,GAAG,EAA4B,CAAC;IAEvF,MAAM,CAAC,WAAW;QACxB,IAAI,CAAC,eAAe,CAAC,QAAQ,EAAE,CAAC;YAC/B,eAAe,CAAC,QAAQ,GAAG,IAAI,eAAe,EAAE,CAAC;QAClD,CAAC;QAED,OAAO,eAAe,CAAC,QAAQ,CAAC;IACjC,CAAC;IAEM,sBAAsB;QAC5B,MAAM,MAAM,GAAwC,EAAE,CAAC;QAEvD,KAAK,MAAM,CAAC,UAAU,EAAE,cAAc,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC;YACnE,MAAM,CAAC,UAAU,CAAC,GAAG,MAAM,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;QACzD,CAAC;QAED,OAAO,MAAM,CAAC;IACf,CAAC;IAEM,WAAW,CAAC,UAAkB,EAAE,YAAqB,EAAE,GAAY;QACzE,MAAM,cAAc,GAAiC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QAElF,IAAI,CAAC,cAAc;YAAE,OAAO,SAAS,CAAC;QAEtC,IAAI,CAAC,YAAY;YAAE,OAAO,MAAM,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;QAC7D,MAAM,gBAAgB,GAAY,cAAc,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QAEnE,IAAI,CAAC,gBAAgB;YAAE,OAAO,SAAS,CAAC;QAExC,IAAI,CAAC,GAAG;YAAE,OAAO,gBAAgB,CAAC;QAIlC,OAAO,gBAAgB,CAAC,GAAG,CAAC,CAAC;IAC9B,CAAC;IAEM,WAAW,CAAC,UAAkB,EAAE,YAAoB,EAAE,GAAW,EAAE,KAAc;QACvF,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC;YACnC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,IAAI,GAAG,EAAE,CAAC,CAAC;QACzC,CAAC;QACD,MAAM,cAAc,GAAqB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAE,CAAC;QAEvE,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,CAAC;YACvC,cAAc,CAAC,GAAG,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;QACtC,CAAC;QAED,cAAc,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IAC/C,CAAC;CACD;AApDD,0CAoDC","sourcesContent":["export class MetadataStorage {\n\tprivate static instance: MetadataStorage;\n\n\tprivate readonly STORAGE: Map<string, Map<string, any>> = new Map<string, Map<string, any>>();\n\n\tpublic static getInstance(): MetadataStorage {\n\t\tif (!MetadataStorage.instance) {\n\t\t\tMetadataStorage.instance = new MetadataStorage();\n\t\t}\n\n\t\treturn MetadataStorage.instance;\n\t}\n\n\tpublic getAllEntitiesMetadata(): Record<string, Record<string, any>> {\n\t\tconst result: Record<string, Record<string, any>> = {};\n\n\t\tfor (const [entityName, entityMetadata] of this.STORAGE.entries()) {\n\t\t\tresult[entityName] = Object.fromEntries(entityMetadata);\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tpublic getMetadata(entityName: string, propertyName?: string, key?: string): any {\n\t\tconst entityMetadata: Map<string, any> | undefined = this.STORAGE.get(entityName);\n\n\t\tif (!entityMetadata) return undefined;\n\n\t\tif (!propertyName) return Object.fromEntries(entityMetadata);\n\t\tconst propertyMetadata: unknown = entityMetadata.get(propertyName);\n\n\t\tif (!propertyMetadata) return undefined;\n\n\t\tif (!key) return propertyMetadata;\n\n\t\t// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n\t\t// @ts-expect-error\n\t\treturn propertyMetadata[key];\n\t}\n\n\tpublic setMetadata(entityName: string, propertyName: string, key: string, value: unknown): void {\n\t\tif (!this.STORAGE.has(entityName)) {\n\t\t\tthis.STORAGE.set(entityName, new Map());\n\t\t}\n\t\tconst entityMetadata: Map<string, any> = this.STORAGE.get(entityName)!;\n\n\t\tif (!entityMetadata.has(propertyName)) {\n\t\t\tentityMetadata.set(propertyName, {});\n\t\t}\n\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n\t\tentityMetadata.get(propertyName)[key] = value;\n\t}\n}\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CONTROLLER_API_DECORATOR_CONSTANT = void 0;
|
|
4
|
+
const RESERVED_METHOD_PREFIX = "apiController";
|
|
5
|
+
exports.CONTROLLER_API_DECORATOR_CONSTANT = {
|
|
6
|
+
RESERVED_METHOD_PREFIX,
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=controller.constant.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"controller.constant.js","sourceRoot":"/","sources":["constant/decorator/api/controller.constant.ts"],"names":[],"mappings":";;;AAAA,MAAM,sBAAsB,GAAW,eAAe,CAAC;AAE1C,QAAA,iCAAiC,GAE1C;IACH,sBAAsB;CACb,CAAC","sourcesContent":["const RESERVED_METHOD_PREFIX: string = \"apiController\";\n\nexport const CONTROLLER_API_DECORATOR_CONSTANT: {\n\treadonly RESERVED_METHOD_PREFIX: string;\n} = {\n\tRESERVED_METHOD_PREFIX,\n} as const;\n"]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.FUNCTION_API_DECORATOR_CONSTANT = void 0;
|
|
4
4
|
const enum_1 = require("../../../enum");
|
|
5
5
|
const DEFAULT_FILTER_ORDER_BY_DIRECTION = enum_1.EFilterOrderDirection.ASC;
|
|
6
|
-
exports.
|
|
6
|
+
exports.FUNCTION_API_DECORATOR_CONSTANT = {
|
|
7
7
|
DEFAULT_FILTER_ORDER_BY_DIRECTION,
|
|
8
8
|
};
|
|
9
9
|
//# sourceMappingURL=function.constant.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"function.constant.js","sourceRoot":"/","sources":["constant/decorator/api/function.constant.ts"],"names":[],"mappings":";;;AAAA,wCAAsD;AAEtD,MAAM,iCAAiC,GAA0B,4BAAqB,CAAC,GAAG,CAAC;AAE9E,QAAA,+BAA+B,GAExC;IACH,iCAAiC;CACxB,CAAC","sourcesContent":["import { EFilterOrderDirection } from \"../../../enum\";\n\nconst DEFAULT_FILTER_ORDER_BY_DIRECTION: EFilterOrderDirection = EFilterOrderDirection.ASC;\n\nexport const
|
|
1
|
+
{"version":3,"file":"function.constant.js","sourceRoot":"/","sources":["constant/decorator/api/function.constant.ts"],"names":[],"mappings":";;;AAAA,wCAAsD;AAEtD,MAAM,iCAAiC,GAA0B,4BAAqB,CAAC,GAAG,CAAC;AAE9E,QAAA,+BAA+B,GAExC;IACH,iCAAiC;CACxB,CAAC","sourcesContent":["import { EFilterOrderDirection } from \"../../../enum\";\n\nconst DEFAULT_FILTER_ORDER_BY_DIRECTION: EFilterOrderDirection = EFilterOrderDirection.ASC;\n\nexport const FUNCTION_API_DECORATOR_CONSTANT: {\n\treadonly DEFAULT_FILTER_ORDER_BY_DIRECTION: EFilterOrderDirection;\n} = {\n\tDEFAULT_FILTER_ORDER_BY_DIRECTION,\n} as const;\n"]}
|
|
@@ -15,4 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./function.constant"), exports);
|
|
18
|
+
__exportStar(require("./controller.constant"), exports);
|
|
19
|
+
__exportStar(require("./property-describe.constant"), exports);
|
|
18
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"/","sources":["constant/decorator/api/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC","sourcesContent":["export * from \"./function.constant\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["constant/decorator/api/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,wDAAsC;AACtC,+DAA6C","sourcesContent":["export * from \"./function.constant\";\nexport * from \"./controller.constant\";\nexport * from \"./property-describe.constant\";\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PROPERTY_DESCRIBE_DECORATOR_API_CONSTANT = void 0;
|
|
4
|
+
const METADATA_PROPERTY_NAME = "API_PROPERTY_DESCRIBE";
|
|
5
|
+
exports.PROPERTY_DESCRIBE_DECORATOR_API_CONSTANT = {
|
|
6
|
+
METADATA_PROPERTY_NAME,
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=property-describe.constant.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"property-describe.constant.js","sourceRoot":"/","sources":["constant/decorator/api/property-describe.constant.ts"],"names":[],"mappings":";;;AAAA,MAAM,sBAAsB,GAAW,uBAAuB,CAAC;AAElD,QAAA,wCAAwC,GAEjD;IACH,sBAAsB;CACb,CAAC","sourcesContent":["const METADATA_PROPERTY_NAME: string = \"API_PROPERTY_DESCRIBE\";\n\nexport const PROPERTY_DESCRIBE_DECORATOR_API_CONSTANT: {\n\treadonly METADATA_PROPERTY_NAME: string;\n} = {\n\tMETADATA_PROPERTY_NAME,\n} as const;\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GET_LIST_QUERY_DTO_FACTORY_CONSTANT = void 0;
|
|
4
|
+
const MINIMUM_LIST_LENGTH = 1;
|
|
5
|
+
const MAXIMUM_LIST_LENGTH = 100;
|
|
6
|
+
const MINIMUM_LIST_PAGES_COUNT = 1;
|
|
7
|
+
const MAXIMUM_LIST_PAGES_COUNT = 100;
|
|
8
|
+
exports.GET_LIST_QUERY_DTO_FACTORY_CONSTANT = {
|
|
9
|
+
MAXIMUM_LIST_LENGTH,
|
|
10
|
+
MAXIMUM_LIST_PAGES_COUNT,
|
|
11
|
+
MINIMUM_LIST_LENGTH,
|
|
12
|
+
MINIMUM_LIST_PAGES_COUNT,
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=get-list-query.constant.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-list-query.constant.js","sourceRoot":"/","sources":["constant/factory/dto/get-list-query.constant.ts"],"names":[],"mappings":";;;AAAA,MAAM,mBAAmB,GAAW,CAAC,CAAC;AACtC,MAAM,mBAAmB,GAAW,GAAG,CAAC;AACxC,MAAM,wBAAwB,GAAW,CAAC,CAAC;AAC3C,MAAM,wBAAwB,GAAW,GAAG,CAAC;AAEhC,QAAA,mCAAmC,GAK5C;IACH,mBAAmB;IACnB,wBAAwB;IACxB,mBAAmB;IACnB,wBAAwB;CACf,CAAC","sourcesContent":["const MINIMUM_LIST_LENGTH: number = 1;\nconst MAXIMUM_LIST_LENGTH: number = 100;\nconst MINIMUM_LIST_PAGES_COUNT: number = 1;\nconst MAXIMUM_LIST_PAGES_COUNT: number = 100;\n\nexport const GET_LIST_QUERY_DTO_FACTORY_CONSTANT: {\n\treadonly MAXIMUM_LIST_LENGTH: number;\n\treadonly MAXIMUM_LIST_PAGES_COUNT: number;\n\treadonly MINIMUM_LIST_LENGTH: number;\n\treadonly MINIMUM_LIST_PAGES_COUNT: number;\n} = {\n\tMAXIMUM_LIST_LENGTH,\n\tMAXIMUM_LIST_PAGES_COUNT,\n\tMINIMUM_LIST_LENGTH,\n\tMINIMUM_LIST_PAGES_COUNT,\n} as const;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./get-list-query.constant";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./get-list-query.constant"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["constant/factory/dto/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4DAA0C","sourcesContent":["export * from \"./get-list-query.constant\";\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./dto";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./dto"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["constant/factory/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAsB","sourcesContent":["export * from \"./dto\";\n"]}
|
package/dist/constant/index.d.ts
CHANGED
package/dist/constant/index.js
CHANGED
|
@@ -19,4 +19,5 @@ __exportStar(require("./dto"), exports);
|
|
|
19
19
|
__exportStar(require("./interface"), exports);
|
|
20
20
|
__exportStar(require("./date.constant"), exports);
|
|
21
21
|
__exportStar(require("./number.constant"), exports);
|
|
22
|
+
__exportStar(require("./factory"), exports);
|
|
22
23
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"/","sources":["constant/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,wCAAsB;AACtB,8CAA4B;AAC5B,kDAAgC;AAChC,oDAAkC","sourcesContent":["export * from \"./decorator\";\nexport * from \"./dto\";\nexport * from \"./interface\";\nexport * from \"./date.constant\";\nexport * from \"./number.constant\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["constant/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,wCAAsB;AACtB,8CAA4B;AAC5B,kDAAgC;AAChC,oDAAkC;AAClC,4CAA0B","sourcesContent":["export * from \"./decorator\";\nexport * from \"./dto\";\nexport * from \"./interface\";\nexport * from \"./date.constant\";\nexport * from \"./number.constant\";\nexport * from \"./factory\";\n"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
readonly ALLOWED_ENTITY_TO_FILTER_COLUMNS: string
|
|
1
|
+
export declare const FILTER_API_INTERFACE_CONSTANT: {
|
|
2
|
+
readonly ALLOWED_ENTITY_TO_FILTER_COLUMNS: Array<string>;
|
|
3
3
|
};
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
const ALLOWED_ENTITY_TO_FILTER_COLUMNS = [
|
|
5
|
-
|
|
6
|
-
'number', 'int', 'integer', 'tinyint', 'smallint', 'mediumint', 'bigint', 'float', 'double', 'decimal',
|
|
7
|
-
'date', 'datetime', 'timestamp'
|
|
8
|
-
];
|
|
9
|
-
exports.API_FILTER_INTERFACE_CONSTANT = {
|
|
3
|
+
exports.FILTER_API_INTERFACE_CONSTANT = void 0;
|
|
4
|
+
const ALLOWED_ENTITY_TO_FILTER_COLUMNS = ["string", "text", "varchar", "char", "number", "int", "integer", "tinyint", "smallint", "mediumint", "bigint", "float", "double", "decimal", "date", "datetime", "timestamp"];
|
|
5
|
+
exports.FILTER_API_INTERFACE_CONSTANT = {
|
|
10
6
|
ALLOWED_ENTITY_TO_FILTER_COLUMNS,
|
|
11
7
|
};
|
|
12
8
|
//# sourceMappingURL=filter.constant.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter.constant.js","sourceRoot":"/","sources":["constant/interface/api/filter.constant.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"filter.constant.js","sourceRoot":"/","sources":["constant/interface/api/filter.constant.ts"],"names":[],"mappings":";;;AAAA,MAAM,gCAAgC,GAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC;AAE1N,QAAA,6BAA6B,GAEtC;IACH,gCAAgC;CACvB,CAAC","sourcesContent":["const ALLOWED_ENTITY_TO_FILTER_COLUMNS: Array<string> = [\"string\", \"text\", \"varchar\", \"char\", \"number\", \"int\", \"integer\", \"tinyint\", \"smallint\", \"mediumint\", \"bigint\", \"float\", \"double\", \"decimal\", \"date\", \"datetime\", \"timestamp\"];\n\nexport const FILTER_API_INTERFACE_CONSTANT: {\n\treadonly ALLOWED_ENTITY_TO_FILTER_COLUMNS: Array<string>;\n} = {\n\tALLOWED_ENTITY_TO_FILTER_COLUMNS,\n} as const;\n"]}
|
|
@@ -15,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./property"), exports);
|
|
18
|
+
__exportStar(require("./filter.constant"), exports);
|
|
18
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"/","sources":["constant/interface/api/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B","sourcesContent":["export * from \"./property\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["constant/interface/api/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,oDAAkC","sourcesContent":["export * from \"./property\";\nexport * from \"./filter.constant\";\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IsIpVersion } from "class-validator/types/decorator/string/IsIP";
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const STRING_PROPERTY_API_INTERFACE_CONSTANT: {
|
|
3
3
|
readonly IP_VERSION: IsIpVersion;
|
|
4
4
|
readonly REGEX_FLAGS_INDEX: number;
|
|
5
5
|
readonly REGEX_PATTERN_INDEX: number;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.STRING_PROPERTY_API_INTERFACE_CONSTANT = void 0;
|
|
4
4
|
const REGEX_PATTERN_INDEX = 1;
|
|
5
5
|
const REGEX_FLAGS_INDEX = 2;
|
|
6
6
|
const IP_VERSION = 4;
|
|
7
|
-
exports.
|
|
7
|
+
exports.STRING_PROPERTY_API_INTERFACE_CONSTANT = {
|
|
8
8
|
IP_VERSION,
|
|
9
9
|
REGEX_FLAGS_INDEX,
|
|
10
10
|
REGEX_PATTERN_INDEX,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"string.constant.js","sourceRoot":"/","sources":["constant/interface/api/property/string.constant.ts"],"names":[],"mappings":";;;AAEA,MAAM,mBAAmB,GAAW,CAAC,CAAC;AACtC,MAAM,iBAAiB,GAAW,CAAC,CAAC;AACpC,MAAM,UAAU,GAAgB,CAAC,CAAC;AAErB,QAAA,sCAAsC,GAI/C;IACH,UAAU;IACV,iBAAiB;IACjB,mBAAmB;CACV,CAAC","sourcesContent":["import type { IsIpVersion } from \"class-validator/types/decorator/string/IsIP\";\n\nconst REGEX_PATTERN_INDEX: number = 1;\nconst REGEX_FLAGS_INDEX: number = 2;\nconst IP_VERSION: IsIpVersion = 4;\n\nexport const
|
|
1
|
+
{"version":3,"file":"string.constant.js","sourceRoot":"/","sources":["constant/interface/api/property/string.constant.ts"],"names":[],"mappings":";;;AAEA,MAAM,mBAAmB,GAAW,CAAC,CAAC;AACtC,MAAM,iBAAiB,GAAW,CAAC,CAAC;AACpC,MAAM,UAAU,GAAgB,CAAC,CAAC;AAErB,QAAA,sCAAsC,GAI/C;IACH,UAAU;IACV,iBAAiB;IACjB,mBAAmB;CACV,CAAC","sourcesContent":["import type { IsIpVersion } from \"class-validator/types/decorator/string/IsIP\";\n\nconst REGEX_PATTERN_INDEX: number = 1;\nconst REGEX_FLAGS_INDEX: number = 2;\nconst IP_VERSION: IsIpVersion = 4;\n\nexport const STRING_PROPERTY_API_INTERFACE_CONSTANT: {\n\treadonly IP_VERSION: IsIpVersion;\n\treadonly REGEX_FLAGS_INDEX: number;\n\treadonly REGEX_PATTERN_INDEX: number;\n} = {\n\tIP_VERSION,\n\tREGEX_FLAGS_INDEX,\n\tREGEX_PATTERN_INDEX,\n} as const;\n"]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.WALLET_PROPERTY_API_INTERFACE_CONSTANT = void 0;
|
|
4
4
|
const MINIMUM = 10_000_000_000;
|
|
5
5
|
const MAXIMUM = 999_999_999_999;
|
|
6
6
|
const EXAMPLE = 18_143_008_867;
|
|
7
|
-
exports.
|
|
7
|
+
exports.WALLET_PROPERTY_API_INTERFACE_CONSTANT = {
|
|
8
8
|
EXAMPLE,
|
|
9
9
|
MAXIMUM,
|
|
10
10
|
MINIMUM,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wallet.constant.js","sourceRoot":"/","sources":["constant/interface/api/property/wallet.constant.ts"],"names":[],"mappings":";;;AAAA,MAAM,OAAO,GAAW,cAAc,CAAC;AACvC,MAAM,OAAO,GAAW,eAAe,CAAC;AACxC,MAAM,OAAO,GAAW,cAAc,CAAC;AAE1B,QAAA,sCAAsC,GAI/C;IACH,OAAO;IACP,OAAO;IACP,OAAO;CACE,CAAC","sourcesContent":["const MINIMUM: number = 10_000_000_000;\nconst MAXIMUM: number = 999_999_999_999;\nconst EXAMPLE: number = 18_143_008_867;\n\nexport const
|
|
1
|
+
{"version":3,"file":"wallet.constant.js","sourceRoot":"/","sources":["constant/interface/api/property/wallet.constant.ts"],"names":[],"mappings":";;;AAAA,MAAM,OAAO,GAAW,cAAc,CAAC;AACvC,MAAM,OAAO,GAAW,eAAe,CAAC;AACxC,MAAM,OAAO,GAAW,cAAc,CAAC;AAE1B,QAAA,sCAAsC,GAI/C;IACH,OAAO;IACP,OAAO;IACP,OAAO;CACE,CAAC","sourcesContent":["const MINIMUM: number = 10_000_000_000;\nconst MAXIMUM: number = 999_999_999_999;\nconst EXAMPLE: number = 18_143_008_867;\n\nexport const WALLET_PROPERTY_API_INTERFACE_CONSTANT: {\n\treadonly EXAMPLE: number;\n\treadonly MAXIMUM: number;\n\treadonly MINIMUM: number;\n} = {\n\tEXAMPLE,\n\tMAXIMUM,\n\tMINIMUM,\n} as const;\n"]}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
export declare function ApiController<E extends BaseEntity>(options: ApiControllerOptions<E>): (target: any) => void;
|
|
1
|
+
import type { BaseApiService } from "../../class";
|
|
2
|
+
import type { IApiControllerProperties } from "../../interface/decorator/api/controller-properties.interface";
|
|
3
|
+
import type { BaseEntity } from "typeorm";
|
|
4
|
+
type TConstructor = new (...arguments_: Array<any>) => {
|
|
5
|
+
service: BaseApiService<any>;
|
|
6
|
+
};
|
|
7
|
+
export declare const ApiController: <E extends BaseEntity>(options: IApiControllerProperties<E>) => <T extends TConstructor>(target: T) => T;
|
|
10
8
|
export {};
|
|
@@ -1,30 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ApiController =
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
(0, common_1.applyDecorators)((0, swagger_1.ApiTags)(entity.name), (0, common_1.Controller)(entity.name.toLowerCase()))(target);
|
|
13
|
-
target.prototype.get = function (parameters, body) {
|
|
14
|
-
return this.service.get(parameters[entity.name.toLowerCase()], body);
|
|
15
|
-
};
|
|
16
|
-
(0, common_1.applyDecorators)((0, method_decorator_1.ApiMethod)({
|
|
17
|
-
action: enum_1.EApiAction.FETCH,
|
|
18
|
-
entity: options.entity,
|
|
19
|
-
httpCode: common_1.HttpStatus.OK,
|
|
20
|
-
method: common_1.RequestMethod.GET,
|
|
21
|
-
path: `:bank`,
|
|
22
|
-
responses: { internalServerError: true, notFound: true, unauthorized: true },
|
|
23
|
-
responseType: options.dto.response
|
|
24
|
-
}))(target.prototype, 'get', Object.getOwnPropertyDescriptor(target.prototype, 'get'));
|
|
25
|
-
(0, common_1.Param)()(target.prototype, 'get', 0);
|
|
26
|
-
Reflect.defineMetadata(constants_1.PARAMTYPES_METADATA, [options.dto.request], target.prototype, 'get');
|
|
27
|
-
Reflect.defineMetadata(constants_1.PATH_METADATA, ":bank", target.prototype, 'get');
|
|
3
|
+
exports.ApiController = void 0;
|
|
4
|
+
const factory_1 = require("../../factory");
|
|
5
|
+
const ApiController = (options) => (target) => {
|
|
6
|
+
const factory = new factory_1.ApiControllerFactory(target, options);
|
|
7
|
+
factory.init();
|
|
8
|
+
const ValidatedController = class extends target {
|
|
9
|
+
constructor(...properties) {
|
|
10
|
+
super(...properties);
|
|
11
|
+
}
|
|
28
12
|
};
|
|
29
|
-
}
|
|
13
|
+
Object.defineProperty(ValidatedController, "name", { value: target.name });
|
|
14
|
+
return ValidatedController;
|
|
15
|
+
};
|
|
16
|
+
exports.ApiController = ApiController;
|
|
30
17
|
//# sourceMappingURL=controller.decorator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controller.decorator.js","sourceRoot":"/","sources":["decorator/api/controller.decorator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"controller.decorator.js","sourceRoot":"/","sources":["decorator/api/controller.decorator.ts"],"names":[],"mappings":";;;AAAA,2CAAqD;AAS9C,MAAM,aAAa,GACzB,CAAuB,OAAoC,EAAE,EAAE,CAC/D,CAAyB,MAAS,EAAK,EAAE;IACxC,MAAM,OAAO,GAA4B,IAAI,8BAAoB,CAAI,MAAM,EAAE,OAAO,CAAC,CAAC;IACtF,OAAO,CAAC,IAAI,EAAE,CAAC;IAEf,MAAM,mBAAmB,GAA2D,KAAM,SAAQ,MAAM;QACvG,YAAY,GAAG,UAAe;YAE7B,KAAK,CAAC,GAAG,UAAU,CAAC,CAAC;QACtB,CAAC;KACD,CAAC;IACF,MAAM,CAAC,cAAc,CAAC,mBAAmB,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;IAE3E,OAAO,mBAAwB,CAAC;AACjC,CAAC,CAAC;AAfU,QAAA,aAAa,iBAevB","sourcesContent":["import { ApiControllerFactory } from \"../../factory\";\n\nimport type { BaseApiService } from \"../../class\";\nimport type { IApiControllerProperties } from \"../../interface/decorator/api/controller-properties.interface\";\n\nimport type { BaseEntity } from \"typeorm\";\n\ntype TConstructor = new (...arguments_: Array<any>) => { service: BaseApiService<any> };\n\nexport const ApiController =\n\t<E extends BaseEntity>(options: IApiControllerProperties<E>) =>\n\t<T extends TConstructor>(target: T): T => {\n\t\tconst factory: ApiControllerFactory<E> = new ApiControllerFactory<E>(target, options);\n\t\tfactory.init();\n\n\t\tconst ValidatedController: { new (...arguments_: Array<any>): {}; prototype: {} } = class extends target {\n\t\t\tconstructor(...properties: any) {\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n\t\t\t\tsuper(...properties);\n\t\t\t}\n\t\t};\n\t\tObject.defineProperty(ValidatedController, \"name\", { value: target.name });\n\n\t\treturn ValidatedController as T;\n\t};\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { IApiBaseEntity } from "../../../../interface";
|
|
2
|
+
import type { TApiFunctionCreateProperties } from "../../../../type";
|
|
3
|
+
import type { Repository } from "typeorm";
|
|
4
|
+
export interface IApiFunctionCreateExecutorProperties<E extends IApiBaseEntity> {
|
|
5
|
+
entity: IApiBaseEntity;
|
|
6
|
+
properties: TApiFunctionCreateProperties<E>;
|
|
7
|
+
repository: Repository<E>;
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"executor-properties.type.js","sourceRoot":"/","sources":["decorator/api/function/create/executor-properties.type.ts"],"names":[],"mappings":"","sourcesContent":["import type { IApiBaseEntity } from \"../../../../interface\";\n\nimport type { TApiFunctionCreateProperties } from \"../../../../type\";\nimport type { Repository } from \"typeorm\";\n\nexport interface IApiFunctionCreateExecutorProperties<E extends IApiBaseEntity> {\n\tentity: IApiBaseEntity;\n\tproperties: TApiFunctionCreateProperties<E>;\n\trepository: Repository<E>;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./executor-properties.type";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./executor-properties.type"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["decorator/api/function/create/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6DAA2C","sourcesContent":["export * from \"./executor-properties.type\";\n"]}
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function ApiFunctionCreate
|
|
3
|
-
model: new () => E;
|
|
4
|
-
}): (_target: any, _propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
|
1
|
+
import type { IApiFunctionCreateProperties } from "../../../interface/decorator/api/function/create-properties.interface";
|
|
2
|
+
export declare function ApiFunctionCreate(properties: IApiFunctionCreateProperties): (target: unknown, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|