@mondart/nestjs-common-module 2.1.0 → 2.1.2

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.
@@ -4,6 +4,7 @@ export declare class BaseKafkaEventDto<type> {
4
4
  model?: string;
5
5
  event_key?: string;
6
6
  data?: type;
7
+ metadata?: object;
7
8
  partition?: number;
8
9
  status?: number;
9
10
  }
@@ -37,6 +37,10 @@ __decorate([
37
37
  (0, class_validator_1.IsOptional)(),
38
38
  __metadata("design:type", Object)
39
39
  ], BaseKafkaEventDto.prototype, "data", void 0);
40
+ __decorate([
41
+ (0, class_validator_1.IsOptional)(),
42
+ __metadata("design:type", Object)
43
+ ], BaseKafkaEventDto.prototype, "metadata", void 0);
40
44
  __decorate([
41
45
  (0, class_validator_1.IsNumber)(),
42
46
  (0, class_validator_1.IsOptional)(),
@@ -1,5 +1,5 @@
1
1
  import { BaseKafkaEventDto } from '../base';
2
2
  export declare class KafkaRequestDto<type> extends BaseKafkaEventDto<type> {
3
3
  constructor({ data, event_source, topic, model, event_key, partition, status, }: BaseKafkaEventDto<type>);
4
- stringify(): string;
4
+ stringify?(): string;
5
5
  }
@@ -1,6 +1,6 @@
1
- import { KafkaSuccessResponseInterface } from '../../interfaces/kafka-success-response.interface';
1
+ import { KafkaSuccessResponseInterface } from '../../interfaces';
2
2
  import { BaseKafkaEventDto } from '../base';
3
3
  export declare class KafkaSuccessResponse<type> extends BaseKafkaEventDto<type> {
4
- constructor({ data, event_source, topic, model, event_key, partition, status, }: KafkaSuccessResponseInterface<type>);
4
+ constructor({ data, metadata, event_source, topic, model, event_key, partition, status, }: KafkaSuccessResponseInterface<type>);
5
5
  stringify(): string;
6
6
  }
@@ -3,9 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.KafkaSuccessResponse = void 0;
4
4
  const base_1 = require("../base");
5
5
  class KafkaSuccessResponse extends base_1.BaseKafkaEventDto {
6
- constructor({ data, event_source, topic, model, event_key, partition, status = 200, }) {
6
+ constructor({ data, metadata, event_source, topic, model, event_key, partition, status = 200, }) {
7
7
  super();
8
8
  this.data = data;
9
+ this.metadata = metadata;
9
10
  this.topic = topic;
10
11
  this.event_source = event_source;
11
12
  this.model = model;
@@ -1,5 +1,6 @@
1
1
  export interface KafkaSuccessResponseInterface<type> {
2
2
  data?: type;
3
+ metadata?: object;
3
4
  event_source: string;
4
5
  topic?: string;
5
6
  model?: string;
@@ -6,7 +6,7 @@ export interface CoreFindOneServiceOption extends CoreBaseServiceOption {
6
6
  }
7
7
  export interface CoreFindOneByIdServiceOption<T> extends CoreBaseServiceOption {
8
8
  enableFirstLevelRelation?: boolean;
9
- relations?: FindOptionsRelations<T>;
9
+ relations?: FindOptionsRelations<T> | string[];
10
10
  existsCheck?: boolean;
11
11
  }
12
12
  export interface CoreFindAllServiceOption extends CoreBaseServiceOption {
@@ -15,11 +15,11 @@ export interface CoreFindAllServiceOption extends CoreBaseServiceOption {
15
15
  }
16
16
  export interface CoreFindAllWithPaginationServiceOption<T> {
17
17
  selectQueryBuilder?: SelectQueryBuilder<T>;
18
- relations?: FindOptionsRelations<T>;
18
+ relations?: FindOptionsRelations<T> | string[];
19
19
  enableFirstLevelRelation?: boolean;
20
20
  }
21
21
  export interface CoreUpdateServiceOption<T> extends CoreBaseServiceOption {
22
- relations?: FindOptionsRelations<T>;
22
+ relations?: FindOptionsRelations<T> | string[];
23
23
  enableFirstLevelRelation?: boolean;
24
24
  }
25
25
  export interface CoreBaseServiceOption {