@rafikidota/iroh 0.45.0 → 0.47.0
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/common/database/typeorm-unit-of-work/interfaces/IUnitOfWork.d.ts +2 -2
- package/dist/common/database/typeorm-unit-of-work/typeorm-unit-of-work.provider.d.ts +2 -2
- package/dist/common/database/typeorm-unit-of-work/typeorm-unit-of-work.provider.js.map +1 -1
- package/dist/common/decorators/api-response.decorator.d.ts +2 -0
- package/dist/common/decorators/api-response.decorator.js +23 -0
- package/dist/common/decorators/api-response.decorator.js.map +1 -0
- package/dist/common/decorators/entity-response.decorator.d.ts +2 -0
- package/dist/common/decorators/entity-response.decorator.js +23 -0
- package/dist/common/decorators/entity-response.decorator.js.map +1 -0
- package/dist/common/decorators/generic-delete.decorator.d.ts +1 -1
- package/dist/common/decorators/generic-delete.decorator.js +4 -4
- package/dist/common/decorators/generic-delete.decorator.js.map +1 -1
- package/dist/common/decorators/generic-get-by-id.decorator.d.ts +1 -1
- package/dist/common/decorators/generic-get-by-id.decorator.js +6 -5
- package/dist/common/decorators/generic-get-by-id.decorator.js.map +1 -1
- package/dist/common/decorators/generic-get.decorator.d.ts +1 -1
- package/dist/common/decorators/generic-get.decorator.js +5 -6
- package/dist/common/decorators/generic-get.decorator.js.map +1 -1
- package/dist/common/decorators/generic-patch.decorator.d.ts +1 -1
- package/dist/common/decorators/generic-patch.decorator.js +6 -9
- package/dist/common/decorators/generic-patch.decorator.js.map +1 -1
- package/dist/common/decorators/generic-post.decorator.d.ts +1 -1
- package/dist/common/decorators/generic-post.decorator.js +6 -9
- package/dist/common/decorators/generic-post.decorator.js.map +1 -1
- package/dist/common/decorators/handle-response.decorator.d.ts +7 -0
- package/dist/common/decorators/handle-response.decorator.js +36 -0
- package/dist/common/decorators/handle-response.decorator.js.map +1 -0
- package/dist/common/decorators/index.d.ts +3 -1
- package/dist/common/decorators/index.js +3 -1
- package/dist/common/decorators/index.js.map +1 -1
- package/dist/common/decorators/pagination.decorator.js +12 -8
- package/dist/common/decorators/pagination.decorator.js.map +1 -1
- package/dist/common/dto/index.d.ts +1 -0
- package/dist/common/dto/index.js +1 -0
- package/dist/common/dto/index.js.map +1 -1
- package/dist/common/dto/pagination.view.d.ts +9 -4
- package/dist/common/dto/pagination.view.js +28 -13
- package/dist/common/dto/pagination.view.js.map +1 -1
- package/dist/common/dto/response.view.d.ts +9 -0
- package/dist/common/dto/response.view.js +46 -0
- package/dist/common/dto/response.view.js.map +1 -0
- package/dist/common/index.d.ts +1 -0
- package/dist/common/index.js +1 -0
- package/dist/common/index.js.map +1 -1
- package/dist/common/interfaces/crud.repository.d.ts +3 -3
- package/dist/common/interfaces/crud.service.d.ts +5 -5
- package/dist/common/interfaces/exception-mapper.d.ts +5 -0
- package/dist/common/interfaces/exception-mapper.js +3 -0
- package/dist/common/interfaces/exception-mapper.js.map +1 -0
- package/dist/common/interfaces/generic.mapper.d.ts +1 -1
- package/dist/common/interfaces/generic.props.d.ts +1 -1
- package/dist/common/interfaces/index.d.ts +1 -0
- package/dist/common/interfaces/index.js +1 -0
- package/dist/common/interfaces/index.js.map +1 -1
- package/dist/common/interfaces/nomenclator.props.d.ts +2 -2
- package/dist/common/types/pagination.d.ts +9 -4
- package/dist/core/app/dto/generic.create.dto.d.ts +3 -3
- package/dist/core/app/dto/generic.create.dto.js +3 -3
- package/dist/core/app/dto/generic.create.dto.js.map +1 -1
- package/dist/core/app/response-handler.d.ts +3 -2
- package/dist/core/app/response-handler.js +8 -2
- package/dist/core/app/response-handler.js.map +1 -1
- package/dist/core/domain/generic.domain.d.ts +1 -1
- package/dist/core/infra/iroh.mapper.d.ts +2 -2
- package/dist/core/infra/iroh.mapper.js +3 -3
- package/dist/core/infra/iroh.mapper.js.map +1 -1
- package/dist/core/infra/iroh.repository.d.ts +8 -8
- package/dist/core/infra/iroh.repository.js +17 -12
- package/dist/core/infra/iroh.repository.js.map +1 -1
- package/dist/core/iroh.controller.d.ts +5 -5
- package/dist/core/iroh.controller.js.map +1 -1
- package/dist/core/iroh.service.d.ts +8 -8
- package/dist/core/iroh.service.js +3 -3
- package/dist/core/iroh.service.js.map +1 -1
- package/package.json +9 -9
- package/dist/common/decorators/use-dto.decorator.d.ts +0 -6
- package/dist/common/decorators/use-dto.decorator.js +0 -34
- package/dist/common/decorators/use-dto.decorator.js.map +0 -1
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ResponseView = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const uuid_1 = require("uuid");
|
|
15
|
+
class ResponseView {
|
|
16
|
+
}
|
|
17
|
+
exports.ResponseView = ResponseView;
|
|
18
|
+
ResponseView.random = Math.floor(Math.random() * 1000);
|
|
19
|
+
ResponseView.start = Date.now();
|
|
20
|
+
ResponseView.end = ResponseView.start + ResponseView.random;
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, swagger_1.ApiProperty)(),
|
|
23
|
+
__metadata("design:type", Object)
|
|
24
|
+
], ResponseView.prototype, "payload", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, swagger_1.ApiProperty)({
|
|
27
|
+
description: 'Unique request identifier',
|
|
28
|
+
example: (0, uuid_1.v4)(),
|
|
29
|
+
}),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], ResponseView.prototype, "request", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, swagger_1.ApiProperty)({
|
|
34
|
+
description: 'Request start timestamp in milliseconds',
|
|
35
|
+
example: ResponseView.start,
|
|
36
|
+
}),
|
|
37
|
+
__metadata("design:type", Number)
|
|
38
|
+
], ResponseView.prototype, "startTime", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, swagger_1.ApiProperty)({
|
|
41
|
+
description: 'Request end timestamp in milliseconds',
|
|
42
|
+
example: ResponseView.end,
|
|
43
|
+
}),
|
|
44
|
+
__metadata("design:type", Number)
|
|
45
|
+
], ResponseView.prototype, "endTime", void 0);
|
|
46
|
+
//# sourceMappingURL=response.view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response.view.js","sourceRoot":"","sources":["../../../src/common/dto/response.view.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAC9C,+BAAkC;AAElC,MAAa,YAAY;;AAAzB,oCAwBC;AAvByB,mBAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC;AAC1C,kBAAK,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;AACnB,gBAAG,GAAG,YAAY,CAAC,KAAK,GAAG,YAAY,CAAC,MAAM,CAAC;AAEvE;IADC,IAAA,qBAAW,GAAE;;6CACH;AAMX;IAJC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,2BAA2B;QACxC,OAAO,EAAE,IAAA,SAAI,GAAE;KAChB,CAAC;;6CACc;AAMhB;IAJC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,yCAAyC;QACtD,OAAO,EAAE,YAAY,CAAC,KAAK;KAC5B,CAAC;;+CACgB;AAMlB;IAJC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,uCAAuC;QACpD,OAAO,EAAE,YAAY,CAAC,GAAG;KAC1B,CAAC;;6CACc"}
|
package/dist/common/index.d.ts
CHANGED
package/dist/common/index.js
CHANGED
|
@@ -24,4 +24,5 @@ __exportStar(require("./loggers"), exports);
|
|
|
24
24
|
__exportStar(require("./middlewares"), exports);
|
|
25
25
|
__exportStar(require("./parsers"), exports);
|
|
26
26
|
__exportStar(require("./pipes"), exports);
|
|
27
|
+
__exportStar(require("./types"), exports);
|
|
27
28
|
//# sourceMappingURL=index.js.map
|
package/dist/common/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,+CAA6B;AAC7B,wCAAsB;AACtB,4CAA0B;AAC1B,iDAA+B;AAC/B,+CAA6B;AAC7B,4CAA0B;AAC1B,gDAA8B;AAC9B,4CAA0B;AAC1B,0CAAwB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,+CAA6B;AAC7B,wCAAsB;AACtB,4CAA0B;AAC1B,iDAA+B;AAC/B,+CAA6B;AAC7B,4CAA0B;AAC1B,gDAA8B;AAC9B,4CAA0B;AAC1B,0CAAwB;AACxB,0CAAwB"}
|
|
@@ -6,16 +6,16 @@ import { FindOneOptions } from 'typeorm';
|
|
|
6
6
|
import { ParsedSearchDto } from '../dto';
|
|
7
7
|
import { TimestampLogger } from '../loggers';
|
|
8
8
|
import { LoggerOptions } from '../loggers';
|
|
9
|
-
import {
|
|
9
|
+
import { IMapper } from './generic.mapper';
|
|
10
10
|
import { Persistence } from '../../core';
|
|
11
11
|
import { Domain } from '../../core/domain/generic.domain';
|
|
12
12
|
import { View } from '../../core/app/dto/generic.view';
|
|
13
13
|
import { FindByIdParam } from '../types';
|
|
14
14
|
import { Pagination as Page } from '../types/pagination';
|
|
15
|
-
export type
|
|
15
|
+
export type IRepository<T extends Persistence, D extends Domain, V extends View> = {
|
|
16
16
|
Entity: Type<T>;
|
|
17
17
|
logger: TimestampLogger;
|
|
18
|
-
mapper:
|
|
18
|
+
mapper: IMapper<T, D, V>;
|
|
19
19
|
save(domain: D): Promise<D>;
|
|
20
20
|
saveList(domains: D[]): Promise<D[]>;
|
|
21
21
|
create(domain: D): Promise<D>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DeepPartial } from 'typeorm';
|
|
2
2
|
import { FindOneOptions } from 'typeorm';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { IRepository } from './crud.repository';
|
|
4
|
+
import { IMapper } from './generic.mapper';
|
|
5
5
|
import { Persistence } from '../../core/infra/generic.persistence';
|
|
6
6
|
import { Domain } from '../../core/domain/generic.domain';
|
|
7
7
|
import { View } from '../../core/app/dto/generic.view';
|
|
@@ -11,8 +11,8 @@ import { ParsedSearchDto as SearchDto } from '../../common/dto';
|
|
|
11
11
|
import { LoggerOptions } from '../../common/loggers';
|
|
12
12
|
import { FindByIdParam } from '../types';
|
|
13
13
|
import { Pagination as Page } from '../types/pagination';
|
|
14
|
-
export type
|
|
15
|
-
mapper:
|
|
14
|
+
export type IService<T extends Persistence, D extends Domain, V extends View, DTO extends DtoMapper<D, DTO>> = {
|
|
15
|
+
mapper: IMapper<T, D, V>;
|
|
16
16
|
create(dto: DeepPartial<DTO>): Promise<Result<D>>;
|
|
17
17
|
paginate(query: SearchDto<T>): Promise<Result<Page<D>>>;
|
|
18
18
|
findAll(): Promise<Result<D[]>>;
|
|
@@ -20,5 +20,5 @@ export type IGenericService<T extends Persistence, D extends Domain, V extends V
|
|
|
20
20
|
findOne(query: FindOneOptions<T>, options?: LoggerOptions): Promise<Result<D>>;
|
|
21
21
|
update(id: string, updateDto: Partial<DTO>): Promise<Result<D>>;
|
|
22
22
|
remove(id: string): Promise<Result<D>>;
|
|
23
|
-
getRepository():
|
|
23
|
+
getRepository(): IRepository<T, D, V>;
|
|
24
24
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exception-mapper.js","sourceRoot":"","sources":["../../../src/common/interfaces/exception-mapper.ts"],"names":[],"mappings":""}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Persistence } from '../../core/infra/generic.persistence';
|
|
2
2
|
import { Domain } from '../../core/domain/generic.domain';
|
|
3
3
|
import { View } from '../../core/app/dto/generic.view';
|
|
4
|
-
export interface
|
|
4
|
+
export interface IMapper<P extends Persistence, D extends Domain, V extends View> {
|
|
5
5
|
PersistenceToDomain(persistence: P): D;
|
|
6
6
|
DomainToPersistence(domain: D): P;
|
|
7
7
|
DomainToView(domain: D): V;
|
|
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./crud.controller"), exports);
|
|
18
18
|
__exportStar(require("./crud.repository"), exports);
|
|
19
19
|
__exportStar(require("./crud.service"), exports);
|
|
20
|
+
__exportStar(require("./exception-mapper"), exports);
|
|
20
21
|
__exportStar(require("./generic.mapper"), exports);
|
|
21
22
|
__exportStar(require("./generic.props"), exports);
|
|
22
23
|
__exportStar(require("./nomenclator.props"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,oDAAkC;AAClC,iDAA+B;AAC/B,mDAAiC;AACjC,kDAAgC;AAChC,sDAAoC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,oDAAkC;AAClC,iDAA+B;AAC/B,qDAAmC;AACnC,mDAAiC;AACjC,kDAAgC;AAChC,sDAAoC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface INomenclatorProps extends
|
|
1
|
+
import { IEntityProps } from './generic.props';
|
|
2
|
+
export interface INomenclatorProps extends IEntityProps {
|
|
3
3
|
name: string;
|
|
4
4
|
description: string;
|
|
5
5
|
}
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
export type
|
|
1
|
+
export type PageInfo = {
|
|
2
|
+
current?: number;
|
|
2
3
|
total?: number;
|
|
3
|
-
|
|
4
|
+
next?: number;
|
|
5
|
+
previous?: number;
|
|
6
|
+
};
|
|
7
|
+
export type PaginationInfo = {
|
|
4
8
|
limit?: number;
|
|
5
9
|
offset?: number;
|
|
6
|
-
|
|
10
|
+
count?: number;
|
|
11
|
+
page?: PageInfo;
|
|
7
12
|
};
|
|
8
13
|
export type Pagination<T> = {
|
|
9
14
|
items: T[];
|
|
10
|
-
|
|
15
|
+
pagination: PaginationInfo;
|
|
11
16
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Domain } from '../../domain/generic.domain';
|
|
2
|
-
export declare abstract class DtoMapper<D extends Domain, DTO extends
|
|
2
|
+
export declare abstract class DtoMapper<D extends Domain, DTO extends CreateDto = CreateDto> {
|
|
3
3
|
abstract ToDomain(dto: DTO): D;
|
|
4
4
|
}
|
|
5
|
-
type
|
|
6
|
-
export declare class
|
|
5
|
+
type ICreateDto = DtoMapper<Domain, CreateDto>;
|
|
6
|
+
export declare class CreateDto implements ICreateDto {
|
|
7
7
|
ToDomain(dto: any): Domain;
|
|
8
8
|
}
|
|
9
9
|
export {};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.CreateDto = exports.DtoMapper = void 0;
|
|
4
4
|
class DtoMapper {
|
|
5
5
|
}
|
|
6
6
|
exports.DtoMapper = DtoMapper;
|
|
7
|
-
class
|
|
7
|
+
class CreateDto {
|
|
8
8
|
ToDomain(dto) {
|
|
9
9
|
throw new Error(`Method not implemented for ${dto.constructor.name}`);
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
exports.
|
|
12
|
+
exports.CreateDto = CreateDto;
|
|
13
13
|
//# sourceMappingURL=generic.create.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generic.create.dto.js","sourceRoot":"","sources":["../../../../src/core/app/dto/generic.create.dto.ts"],"names":[],"mappings":";;;AAEA,MAAsB,SAAS;CAK9B;AALD,8BAKC;AAID,MAAa,
|
|
1
|
+
{"version":3,"file":"generic.create.dto.js","sourceRoot":"","sources":["../../../../src/core/app/dto/generic.create.dto.ts"],"names":[],"mappings":";;;AAEA,MAAsB,SAAS;CAK9B;AALD,8BAKC;AAID,MAAa,SAAS;IACpB,QAAQ,CAAC,GAAQ;QACf,MAAM,IAAI,KAAK,CAAC,8BAA8B,GAAG,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC;IACxE,CAAC;CACF;AAJD,8BAIC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Result } from './result';
|
|
2
|
+
import { Domain } from '../domain/generic.domain';
|
|
2
3
|
export interface ResponseHandlerSyncParams<T> {
|
|
3
4
|
data: Result<T>;
|
|
4
5
|
mapper?: (res: any) => any;
|
|
@@ -10,7 +11,7 @@ export interface ResponseHandlerAsyncParams<T> {
|
|
|
10
11
|
handler?: (res: any) => void;
|
|
11
12
|
}
|
|
12
13
|
export declare class ResponseHandler {
|
|
13
|
-
static sync<T
|
|
14
|
-
static async<T>(
|
|
14
|
+
static sync<T, D extends Domain = Domain>(params: ResponseHandlerSyncParams<T>): any;
|
|
15
|
+
static async<T>(params: ResponseHandlerAsyncParams<T>): Promise<any>;
|
|
15
16
|
private static handle;
|
|
16
17
|
}
|
|
@@ -3,15 +3,21 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ResponseHandler = void 0;
|
|
4
4
|
const defaultMapper = (a) => a;
|
|
5
5
|
class ResponseHandler {
|
|
6
|
-
static sync(
|
|
6
|
+
static sync(params) {
|
|
7
|
+
const { data, mapper, handler } = params;
|
|
7
8
|
const finalMapper = mapper || defaultMapper;
|
|
8
9
|
if (!data.successful) {
|
|
9
10
|
ResponseHandler.handle(data, handler);
|
|
10
11
|
}
|
|
11
12
|
const payload = data.unwrap();
|
|
13
|
+
const { pagination, items } = payload;
|
|
14
|
+
if (pagination && items) {
|
|
15
|
+
return { pagination, items: items.map((x) => finalMapper(x)) };
|
|
16
|
+
}
|
|
12
17
|
return finalMapper(payload);
|
|
13
18
|
}
|
|
14
|
-
static async async(
|
|
19
|
+
static async async(params) {
|
|
20
|
+
const { promise, mapper, handler } = params;
|
|
15
21
|
const data = await promise;
|
|
16
22
|
if (!data.successful) {
|
|
17
23
|
ResponseHandler.handle(data, handler);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"response-handler.js","sourceRoot":"","sources":["../../../src/core/app/response-handler.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"response-handler.js","sourceRoot":"","sources":["../../../src/core/app/response-handler.ts"],"names":[],"mappings":";;;AAIA,MAAM,aAAa,GAAG,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC;AAapC,MAAa,eAAe;IACnB,MAAM,CAAC,IAAI,CAChB,MAAoC;QAEpC,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;QACzC,MAAM,WAAW,GAAG,MAAM,IAAI,aAAa,CAAC;QAE5C,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;YACrB,eAAe,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACxC,CAAC;QAED,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;QAC9B,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,OAAwB,CAAC;QACvD,IAAI,UAAU,IAAI,KAAK,EAAE,CAAC;YACxB,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACjE,CAAC;QACD,OAAO,WAAW,CAAC,OAAO,CAAC,CAAC;IAC9B,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,KAAK,CAAI,MAAqC;QAChE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;QAC5C,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC;QAE3B,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;YACrB,eAAe,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACxC,CAAC;QAED,OAAO,IAAI,CAAC,IAAI,CAAI,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;IACjD,CAAC;IAEO,MAAM,CAAC,MAAM,CAAI,IAAe,EAAE,OAAY;QACpD,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;QACjC,IAAI,OAAO,EAAE,CAAC;YACZ,OAAO,CAAC,KAAK,CAAC,CAAC;QACjB,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;CACF;AArCD,0CAqCC"}
|
|
@@ -12,4 +12,4 @@ export type DomainProps<D extends Domain> = Omit<D, 'update'>;
|
|
|
12
12
|
export interface IUpdatableDomain<D extends Domain> {
|
|
13
13
|
update(props: Partial<DomainProps<D>>): Result<D>;
|
|
14
14
|
}
|
|
15
|
-
export type
|
|
15
|
+
export type UpdatableDomain<D extends Domain> = D & IUpdatableDomain<D>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Domain } from '../domain/generic.domain';
|
|
2
2
|
import { Persistence } from './generic.persistence';
|
|
3
3
|
import { View } from '../app/dto/generic.view';
|
|
4
|
-
import type {
|
|
5
|
-
export declare abstract class
|
|
4
|
+
import type { IMapper } from '../../common/interfaces';
|
|
5
|
+
export declare abstract class Mapper<T extends Persistence, D extends Domain, V extends View> implements IMapper<T, D, V> {
|
|
6
6
|
PersistenceToDomain(persistence: T): D;
|
|
7
7
|
DomainToPersistence(domain: D): T;
|
|
8
8
|
DomainToView(domain: D): V;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
class
|
|
3
|
+
exports.Mapper = void 0;
|
|
4
|
+
class Mapper {
|
|
5
5
|
PersistenceToDomain(persistence) {
|
|
6
6
|
return { ...persistence };
|
|
7
7
|
}
|
|
@@ -12,5 +12,5 @@ class IrohMapper {
|
|
|
12
12
|
return { ...domain };
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
exports.
|
|
15
|
+
exports.Mapper = Mapper;
|
|
16
16
|
//# sourceMappingURL=iroh.mapper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iroh.mapper.js","sourceRoot":"","sources":["../../../src/core/infra/iroh.mapper.ts"],"names":[],"mappings":";;;AAKA,MAAsB,
|
|
1
|
+
{"version":3,"file":"iroh.mapper.js","sourceRoot":"","sources":["../../../src/core/infra/iroh.mapper.ts"],"names":[],"mappings":";;;AAKA,MAAsB,MAAM;IAM1B,mBAAmB,CAAC,WAAc;QAChC,OAAO,EAAE,GAAG,WAAW,EAAkB,CAAC;IAC5C,CAAC;IAED,mBAAmB,CAAC,MAAS;QAC3B,OAAO,EAAE,GAAG,MAAM,EAAkB,CAAC;IACvC,CAAC;IAED,YAAY,CAAC,MAAS;QACpB,OAAO,EAAE,GAAG,MAAM,EAAkB,CAAC;IACvC,CAAC;CACF;AAjBD,wBAiBC"}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { Type } from '@nestjs/common';
|
|
2
2
|
import { EntityManager } from 'typeorm';
|
|
3
3
|
import { FindOneOptions } from 'typeorm';
|
|
4
|
-
import { Repository } from 'typeorm';
|
|
4
|
+
import { Repository as TypeOrmRepository } from 'typeorm';
|
|
5
5
|
import { EntityMetadata } from 'typeorm';
|
|
6
6
|
import { TimestampLogger } from '../../common';
|
|
7
7
|
import { LoggerOptions } from '../../common';
|
|
8
8
|
import { Persistence } from '../infra/generic.persistence';
|
|
9
9
|
import { Domain } from '../domain/generic.domain';
|
|
10
10
|
import { View } from '../app/dto/generic.view';
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
11
|
+
import { IMapper } from '../../common';
|
|
12
|
+
import { IRepository } from '../../common';
|
|
13
13
|
import { ParsedSearchDto as SearchDto } from '../../common';
|
|
14
14
|
import { QueryBuilder } from '../../common/database/';
|
|
15
15
|
import { FindByIdParam } from '../../common/types/find-by-id-params';
|
|
16
16
|
import { Pagination as Page } from '../../common/types/pagination';
|
|
17
|
-
export declare abstract class
|
|
18
|
-
repository:
|
|
17
|
+
export declare abstract class Repository<M extends IMapper<T, D, V>, T extends Persistence = ReturnType<M['DomainToPersistence']>, D extends Domain = ReturnType<M['PersistenceToDomain']>, V extends View = ReturnType<M['DomainToView']>> implements IRepository<T, D, V> {
|
|
18
|
+
repository: TypeOrmRepository<T>;
|
|
19
19
|
readonly logger: TimestampLogger;
|
|
20
20
|
Entity: Type<T>;
|
|
21
|
-
mapper:
|
|
21
|
+
mapper: IMapper<T, D, V>;
|
|
22
22
|
builder: QueryBuilder<T>;
|
|
23
23
|
private alias;
|
|
24
|
-
constructor(repository:
|
|
24
|
+
constructor(repository: TypeOrmRepository<T>);
|
|
25
25
|
save(domain: D): Promise<D>;
|
|
26
26
|
saveList(domains: D[]): Promise<D[]>;
|
|
27
27
|
create(domain: D): Promise<D>;
|
|
@@ -34,7 +34,7 @@ export declare abstract class IrohRepository<M extends IEntityMapper<T, D, V>, T
|
|
|
34
34
|
update(id: string, updateDto: Partial<D>): Promise<D>;
|
|
35
35
|
remove(id: string): Promise<D>;
|
|
36
36
|
destroy(id: string): Promise<D>;
|
|
37
|
-
getRepository():
|
|
37
|
+
getRepository(): TypeOrmRepository<T>;
|
|
38
38
|
getMetadata(): EntityMetadata;
|
|
39
39
|
private prepare;
|
|
40
40
|
setTransactionalRepository(entityManager: EntityManager): void;
|
|
@@ -12,7 +12,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
12
12
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.
|
|
15
|
+
exports.Repository = void 0;
|
|
16
16
|
const typeorm_1 = require("@nestjs/typeorm");
|
|
17
17
|
const typeorm_2 = require("typeorm");
|
|
18
18
|
const common_1 = require("../../common");
|
|
@@ -20,7 +20,7 @@ const database_1 = require("../../common/database/");
|
|
|
20
20
|
const query_builder_1 = require("../../common/database/query-builder");
|
|
21
21
|
const notification_1 = require("../../common/loggers/notification");
|
|
22
22
|
const notification_2 = require("../../common/loggers/notification");
|
|
23
|
-
let
|
|
23
|
+
let Repository = class Repository {
|
|
24
24
|
constructor(repository) {
|
|
25
25
|
this.repository = repository;
|
|
26
26
|
this.alias = 'alias';
|
|
@@ -59,17 +59,22 @@ let IrohRepository = class IrohRepository {
|
|
|
59
59
|
this.logger.start();
|
|
60
60
|
const type = notification_2.NotificationTypeEnum.PAGINATION;
|
|
61
61
|
const notification = { type };
|
|
62
|
-
const { limit, page, offset } = query;
|
|
63
|
-
const result = { items: [],
|
|
64
|
-
const [persistences,
|
|
62
|
+
const { limit, page: current, offset } = query;
|
|
63
|
+
const result = { items: [], pagination: { limit, offset } };
|
|
64
|
+
const [persistences, count] = await this.getMany(query);
|
|
65
65
|
const domains = persistences.map((p) => this.mapper.PersistenceToDomain(p));
|
|
66
66
|
result.items = domains;
|
|
67
|
-
result.
|
|
67
|
+
result.pagination.count = count;
|
|
68
68
|
if (limit) {
|
|
69
|
-
|
|
69
|
+
const total = Math.ceil(count / limit);
|
|
70
|
+
const page = { current, total };
|
|
71
|
+
if (current && total) {
|
|
72
|
+
page.next = current < total ? current + 1 : null;
|
|
73
|
+
page.previous = current > 1 ? current - 1 : null;
|
|
74
|
+
}
|
|
75
|
+
result.pagination.page = page;
|
|
70
76
|
}
|
|
71
|
-
|
|
72
|
-
notification.count = count;
|
|
77
|
+
notification.count = domains.length;
|
|
73
78
|
this.notify(notification);
|
|
74
79
|
this.clean();
|
|
75
80
|
return result;
|
|
@@ -215,11 +220,11 @@ let IrohRepository = class IrohRepository {
|
|
|
215
220
|
this.builder = null;
|
|
216
221
|
}
|
|
217
222
|
};
|
|
218
|
-
exports.
|
|
219
|
-
exports.
|
|
223
|
+
exports.Repository = Repository;
|
|
224
|
+
exports.Repository = Repository = __decorate([
|
|
220
225
|
__param(0, (0, typeorm_1.InjectRepository)(() => {
|
|
221
226
|
return {};
|
|
222
227
|
})),
|
|
223
228
|
__metadata("design:paramtypes", [typeorm_2.Repository])
|
|
224
|
-
],
|
|
229
|
+
], Repository);
|
|
225
230
|
//# sourceMappingURL=iroh.repository.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iroh.repository.js","sourceRoot":"","sources":["../../../src/core/infra/iroh.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"iroh.repository.js","sourceRoot":"","sources":["../../../src/core/infra/iroh.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAEA,6CAAmD;AAInD,qCAA0D;AAG1D,yCAA+C;AAS/C,qDAAsD;AAGtD,uEAA4D;AAE5D,oEAAmE;AAEnE,oEAAyE;AAIzE,IAAsB,UAAU,GAAhC,MAAsB,UAAU;IAa9B,YAIE,UAAuC;QAAhC,eAAU,GAAV,UAAU,CAAsB;QANjC,UAAK,GAAW,OAAO,CAAC;QAQ9B,IAAI,CAAC,MAAM,GAAG,IAAI,w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,CAAC;IACzB,CAAC;IAEM,WAAW;QAChB,OAAO,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC;IAClC,CAAC;IAEO,OAAO;QACb,IAAI,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YACnC,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,UAAU,CAAC;YACtD,MAAM,EAAE,GAAG,UAAU,CAAC,kBAAkB,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;YACzE,IAAI,CAAC,OAAO,GAAG,IAAI,uBAAY,CAAC,EAAE,CAAC,CAAC;QACtC,CAAC;IACH,CAAC;IAEM,0BAA0B,CAAC,aAA4B;QAC5D,IAAI,CAAC,UAAU,GAAG,aAAa,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC3D,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAChD,CAAC;IAEO,MAAM,CAAC,YAA0B;QACvC,MAAM,QAAQ,GAAG,IAAI,6BAAc,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACjD,QAAQ,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;IAChC,CAAC;IAEO,KAAK;QACX,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;IACtB,CAAC;CACF,CAAA;AAjPqB,gCAAU;qBAAV,UAAU;IAc3B,WAAA,IAAA,0BAAgB,EAAC,GAAY,EAAE;QAC9B,OAAO,EAAa,CAAC;IACvB,CAAC,CAAC,CAAA;qCACiB,oBAAiB;GAjBlB,UAAU,CAiP/B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IMapper } from '../common/interfaces';
|
|
2
2
|
import type { IGenericController } from '../common/interfaces';
|
|
3
|
-
import type {
|
|
3
|
+
import type { IService } from '../common/interfaces';
|
|
4
4
|
import { SearchDto } from '../common/dto';
|
|
5
5
|
import { QueryOptionDto } from '../common/dto';
|
|
6
6
|
import { Persistence } from './infra/generic.persistence';
|
|
@@ -9,9 +9,9 @@ import { IUpdatableDomain } from './domain';
|
|
|
9
9
|
import { DtoMapper } from './app';
|
|
10
10
|
import { View } from './app/dto/generic.view';
|
|
11
11
|
import { Pagination as Page } from '../common/types/pagination';
|
|
12
|
-
export declare abstract class IrohController<M extends
|
|
13
|
-
readonly service:
|
|
14
|
-
constructor(service:
|
|
12
|
+
export declare abstract class IrohController<M extends IMapper<T, D, V>, T extends Persistence = ReturnType<M['DomainToPersistence']>, D extends Domain = ReturnType<M['PersistenceToDomain']> & IUpdatableDomain<ReturnType<M['PersistenceToDomain']>>, V extends View = ReturnType<M['DomainToView']>, DTO extends DtoMapper<D, DTO> = DtoMapper<D>> implements IGenericController<D, V, DTO> {
|
|
13
|
+
readonly service: IService<T, D, V, DTO>;
|
|
14
|
+
constructor(service: IService<T, D, V, DTO>);
|
|
15
15
|
create(body: DTO): Promise<V>;
|
|
16
16
|
paginate(query: SearchDto): Promise<Page<V>>;
|
|
17
17
|
findById(id: string, query: QueryOptionDto): Promise<V>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iroh.controller.js","sourceRoot":"","sources":["../../src/core/iroh.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAsC;AACtC,2CAAuC;AACvC,2CAAuC;AACvC,2CAA+C;AAC/C,2CAAiD;AACjD,2CAA4C;AAC5C,yDAA4D;AAC5D,+CAAwD;AACxD,6DAAyD;AAIzD,uCAA0C;AAC1C,uCAA+C;AAM/C,uEAAkE;AAM3D,IAAe,cAAc,GAA7B,MAAe,cAAc;IASlC,YAAqB,
|
|
1
|
+
{"version":3,"file":"iroh.controller.js","sourceRoot":"","sources":["../../src/core/iroh.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAsC;AACtC,2CAAuC;AACvC,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C,6BAAmB,CAAC;IAC/B,IAAA,wBAAe,EAAC,iCAAkB,CAAC;;GACd,cAAc,CA6DnC"}
|
|
@@ -6,18 +6,18 @@ import { Domain } from './domain/generic.domain';
|
|
|
6
6
|
import { IUpdatableDomain } from './domain';
|
|
7
7
|
import { DtoMapper } from './app';
|
|
8
8
|
import { View } from './app/dto/generic.view';
|
|
9
|
-
import type {
|
|
10
|
-
import type {
|
|
11
|
-
import type {
|
|
9
|
+
import type { IService } from '../common';
|
|
10
|
+
import type { IRepository } from '../common';
|
|
11
|
+
import type { IMapper } from '../common';
|
|
12
12
|
import { ParsedSearchDto as SearchDto } from '../common';
|
|
13
13
|
import { Result } from './app/result';
|
|
14
14
|
import { FindByIdParam } from '../common/types/find-by-id-params';
|
|
15
15
|
import { Pagination as Page } from '../common/types/pagination';
|
|
16
|
-
export declare abstract class
|
|
17
|
-
readonly repository:
|
|
16
|
+
export declare abstract class Service<M extends IMapper<T, D, V>, T extends Persistence = ReturnType<M['DomainToPersistence']>, D extends Domain = ReturnType<M['PersistenceToDomain']> & IUpdatableDomain<ReturnType<M['PersistenceToDomain']>>, V extends View = ReturnType<M['DomainToView']>, DTO extends DtoMapper<D, DTO> = DtoMapper<D>> implements IService<T, D, V, DTO> {
|
|
17
|
+
readonly repository: IRepository<T, D, V>;
|
|
18
18
|
readonly logger: TimestampLogger;
|
|
19
|
-
readonly mapper:
|
|
20
|
-
constructor(repository:
|
|
19
|
+
readonly mapper: IMapper<T, D, V>;
|
|
20
|
+
constructor(repository: IRepository<T, D, V>);
|
|
21
21
|
create(dto: DTO): Promise<Result<D>>;
|
|
22
22
|
paginate(query: SearchDto<T>): Promise<Result<Page<D>>>;
|
|
23
23
|
findAll(): Promise<Result<D[]>>;
|
|
@@ -25,6 +25,6 @@ export declare abstract class IrohService<M extends IEntityMapper<T, D, V>, T ex
|
|
|
25
25
|
findOne(query: FindOneOptions<T>, options?: LoggerOptions): Promise<Result<D>>;
|
|
26
26
|
update(id: string, updateDto: Partial<DTO>): Promise<Result<D>>;
|
|
27
27
|
remove(id: string): Promise<Result<D>>;
|
|
28
|
-
getRepository():
|
|
28
|
+
getRepository(): IRepository<T, D, V>;
|
|
29
29
|
private notify;
|
|
30
30
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.Service = void 0;
|
|
4
4
|
const common_1 = require("@nestjs/common");
|
|
5
5
|
const common_2 = require("../common");
|
|
6
6
|
const result_1 = require("./app/result");
|
|
7
7
|
const notifier_1 = require("../common/loggers/notification/notifier");
|
|
8
8
|
const notification_type_enum_1 = require("../common/loggers/notification/notification.type.enum");
|
|
9
|
-
class
|
|
9
|
+
class Service {
|
|
10
10
|
constructor(repository) {
|
|
11
11
|
this.repository = repository;
|
|
12
12
|
this.logger = new common_2.TimestampLogger(this.constructor.name);
|
|
@@ -104,5 +104,5 @@ class IrohService {
|
|
|
104
104
|
notifier.notify(notification);
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
-
exports.
|
|
107
|
+
exports.Service = Service;
|
|
108
108
|
//# sourceMappingURL=iroh.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iroh.service.js","sourceRoot":"","sources":["../../src/core/iroh.service.ts"],"names":[],"mappings":";;;AAAA,2CAAmD;AAEnD,sCAA4C;AAY5C,yCAAsC;AAEtC,sEAAyE;AAEzE,kGAA6F;AAG7F,MAAsB,
|
|
1
|
+
{"version":3,"file":"iroh.service.js","sourceRoot":"","sources":["../../src/core/iroh.service.ts"],"names":[],"mappings":";;;AAAA,2CAAmD;AAEnD,sCAA4C;AAY5C,yCAAsC;AAEtC,sEAAyE;AAEzE,kGAA6F;AAG7F,MAAsB,OAAO;IAW3B,YAAqB,UAAgC;QAAhC,eAAU,GAAV,UAAU,CAAsB;QACnD,IAAI,CAAC,MAAM,GAAG,IAAI,wBAAe,CAAC,IAA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