@sisques-labs/nestjs-kit 0.2.0 → 0.3.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/index.d.ts CHANGED
@@ -4,6 +4,8 @@ export * from './shared/application/commands/update/base-update/base-update.comm
4
4
  export * from './shared/application/dtos/commands/delete/delete-command.dto';
5
5
  export * from './shared/application/dtos/commands/field-changed/base-field-changed-command.dto';
6
6
  export * from './shared/application/dtos/commands/update/update-command.dto';
7
+ export * from './shared/application/dtos/queries/find-by-criteria/find-by-criteria-query.dto';
8
+ export * from './shared/application/dtos/queries/find-by-id/find-by-id-query.dto';
7
9
  export * from './shared/application/services/base-service/base-service.interface';
8
10
  export * from './shared/domain/aggregates/base-aggregate/base.aggregate';
9
11
  export * from './shared/domain/entities/criteria';
package/dist/index.js CHANGED
@@ -20,6 +20,8 @@ __exportStar(require("./shared/application/commands/update/base-update/base-upda
20
20
  __exportStar(require("./shared/application/dtos/commands/delete/delete-command.dto"), exports);
21
21
  __exportStar(require("./shared/application/dtos/commands/field-changed/base-field-changed-command.dto"), exports);
22
22
  __exportStar(require("./shared/application/dtos/commands/update/update-command.dto"), exports);
23
+ __exportStar(require("./shared/application/dtos/queries/find-by-criteria/find-by-criteria-query.dto"), exports);
24
+ __exportStar(require("./shared/application/dtos/queries/find-by-id/find-by-id-query.dto"), exports);
23
25
  __exportStar(require("./shared/application/services/base-service/base-service.interface"), exports);
24
26
  __exportStar(require("./shared/domain/aggregates/base-aggregate/base.aggregate"), exports);
25
27
  __exportStar(require("./shared/domain/entities/criteria"), exports);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAEA,0FAAwE;AACxE,0GAAwF;AACxF,+GAA6F;AAC7F,+FAA6E;AAC7E,kHAAgG;AAChG,+FAA6E;AAC7E,oGAAkF;AAKlF,2FAAyE;AAGzE,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1E,iHAA+F;AAC/F,iGAA+E;AAC/E,6HAA2G;AAG3G,qHAAmG;AACnG,qIAAmH;AACnH,+FAA6E;AAC7E,0FAAwE;AACxE,sHAAoG;AAGpG,2IAAyH;AACzH,iGAA+E;AAC/E,wGAAsF;AACtF,0HAAwG;AACxG,0GAAwF;AACxF,0FAAwE;AAKxE,2FAAyE;AAGzE,yGAAuF;AACvF,6HAA2G;AAC3G,iHAA+F;AAC/F,qGAAmF;AACnF,6GAA2F;AAG3F,4HAA0G;AAC1G,4GAA0F;AAC1F,kHAAgG;AAChG,6FAA2E;AAG3E,gHAA8F;AAG9F,uFAAqE"}
@@ -0,0 +1,4 @@
1
+ import { Criteria } from '@/shared/domain/entities/criteria';
2
+ export interface IFindByCriteriaQueryDto {
3
+ criteria: Criteria;
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=find-by-criteria-query.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-by-criteria-query.dto.js","sourceRoot":"","sources":["../../../../../../src/shared/application/dtos/queries/find-by-criteria/find-by-criteria-query.dto.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ export interface IFindByIdQueryDto {
2
+ id: string;
3
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=find-by-id-query.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-by-id-query.dto.js","sourceRoot":"","sources":["../../../../../../src/shared/application/dtos/queries/find-by-id/find-by-id-query.dto.ts"],"names":[],"mappings":""}
@@ -1,5 +1,8 @@
1
+ import { Criteria } from '@/shared/domain/entities/criteria';
2
+ import { PaginatedResult } from '@/shared/domain/entities/paginated-result.entity';
1
3
  export interface IBaseWriteRepository<TEntity> {
2
4
  findById(id: string): Promise<TEntity | null>;
5
+ findByCriteria(criteria: Criteria): Promise<PaginatedResult<TEntity>>;
3
6
  save(entity: TEntity): Promise<TEntity>;
4
7
  delete(id: string): Promise<void>;
5
8
  }