Skip to content

Commit

Permalink
fix: types for resources
Browse files Browse the repository at this point in the history
  • Loading branch information
pateketrueke committed Aug 20, 2021
1 parent 69f4e20 commit a6daf06
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,17 @@ export interface ResourceModel<T> {
export interface ModelDefinition {
$class?: ModelCtor<Model>;
$schema: JSONSchema4;
$uiSchema?: JsonObject;
$attributes?: ModelAttributes;
}

export interface ModelAttributes {
findAll?: ModelAttribute[];
findOne?: ModelAttribute[];
destroy?: ModelAttribute[];
create?: ModelAttribute[];
update?: ModelAttribute[];
count?: ModelAttribute[];
}

export type ModelAttribute = string | { prop: string };

0 comments on commit a6daf06

Please sign in to comment.