Skip to content

Commit

Permalink
Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jm42 committed Apr 13, 2024
1 parent 9d9bbcf commit 3a8e735
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 5 deletions.
3 changes: 3 additions & 0 deletions packages/utils/src/types/filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ export interface ConditionFilter {

export type Filter = FieldFilter | ConditionFilter | { [key: string]: Filter };

/**
* Filter query variables.
*/
export interface FilterVariables {
where: Filter;
}
1 change: 0 additions & 1 deletion packages/utils/src/types/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
export * from './pagination';
export * from './filter';
export * from './order';
export * from './input';
export * from './chain';
export * from './TransactionRequestStatus';
4 changes: 0 additions & 4 deletions packages/utils/src/types/input.ts

This file was deleted.

6 changes: 6 additions & 0 deletions packages/utils/src/types/order.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* Sorting order.
*/
export enum Order {
ASC = 'asc',
DESC = 'desc',
Expand All @@ -7,6 +10,9 @@ export interface OrderBy {
[key: string]: Order;
}

/**
* Order by query variables.
*/
export interface OrderByVariables {
orderBy: OrderBy | Array<OrderBy>;
}
15 changes: 15 additions & 0 deletions packages/utils/src/types/pagination.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/**
* Accepted values to paginate.
*/
export interface PaginationInput {
/**
* How many items to retrieve.
*/
limit: number;

/**
* Where to start fetching.
*/
offset: number;
}

/**
* Represents a paginated result.
*
Expand Down

0 comments on commit 3a8e735

Please sign in to comment.