Skip to content

Commit

Permalink
fix: bump model lib
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesse Zhang committed Aug 17, 2018
1 parent 65cc586 commit 0e0699b
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@lchemy/api",
"description": "",
"version": "1.0.0-beta.24",
"version": "1.0.0-beta.25",
"contributors": [
"Jesse Zhang"
],
Expand All @@ -22,7 +22,7 @@
},
"dependencies": {
"@lchemy/api-filter-parser": "^1.0.0-beta.5",
"@lchemy/model": "^1.0.0-beta.0",
"@lchemy/model": "^1.0.0-beta.3",
"@lchemy/orm": "^1.0.0-beta.7",
"@types/boom": "^7.2.0",
"@types/knex": "^0.14.18",
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/model-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ModelService } from "../services";

import { Controller } from "./controller";

export abstract class ModelController<M, O extends Orm, A = any> extends Controller<A> {
export abstract class ModelController<M extends object, O extends Orm, A = any> extends Controller<A> {
constructor(protected service: ModelService<M, O>) {
super();
}
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/readable-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export interface ReadableControllerConfiguration<O extends Orm, A = any> {
findOneParamsFilter?: ParamsFilter<O, A>;
}

export abstract class ReadableController<M, O extends Orm, A = any> extends ModelController<M, O, A> {
export abstract class ReadableController<M extends object, O extends Orm, A = any> extends ModelController<M, O, A> {
protected config: ReadableControllerConfiguration<O, A> = {};

private get queryKeys(): QueryKeysConfiguration {
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/writable-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { WritableService } from "../services";

import { ReadableController } from "./readable-controller";

export abstract class WritableController<M, O extends Orm, A = any> extends ReadableController<M, O, A> {
export abstract class WritableController<M extends object, O extends Orm, A = any> extends ReadableController<M, O, A> {
constructor(protected service: WritableService<M, O, A>) {
super(service);
}
Expand Down
2 changes: 1 addition & 1 deletion src/services/model-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Transaction } from "knex";

import { ApiField, Dao } from "../daos";

export abstract class ModelService<M, O extends Orm> {
export abstract class ModelService<M extends object, O extends Orm> {
constructor(protected dao: Dao<M, O>) {

}
Expand Down
2 changes: 1 addition & 1 deletion src/services/readable-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { FindAllRequestBuilder, FindAllWithCountRequestBuilder, FindCountRequest

import { ModelService } from "./model-service";

export abstract class ReadableService<M, O extends Orm, A = any> extends ModelService<M, O> {
export abstract class ReadableService<M extends object, O extends Orm, A = any> extends ModelService<M, O> {
constructor(protected dao: ReadableDao<M, O, A>) {
super(dao);
}
Expand Down
2 changes: 1 addition & 1 deletion src/services/writable-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { ReadableService } from "./readable-service";
export type ValidationFunctionResult<M> = ValidationResult<M> | undefined;
export type ValidationFunction<M, A> = (model: M, auth: A | undefined, trx: Transaction) => ValidationFunctionResult<M> | Promise<ValidationFunctionResult<M>>;

export abstract class WritableService<M, O extends Orm, A = any> extends ReadableService<M, O, A> {
export abstract class WritableService<M extends object, O extends Orm, A = any> extends ReadableService<M, O, A> {
protected validator?: Validator<M>;
protected insertValidator?: Validator<M>;
protected updateValidator?: Validator<M>;
Expand Down

0 comments on commit 0e0699b

Please sign in to comment.