Skip to content

Commit

Permalink
Extend interface to paginated for inputs (#52)
Browse files Browse the repository at this point in the history
* Created new interface to extend for inputs

* Extend interface to paginated for inputs

* Updated library version

* Fixed miss naming
  • Loading branch information
rlajous authored Aug 16, 2023
1 parent d7dac0f commit c8e40b3
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 19 deletions.
4 changes: 2 additions & 2 deletions packages/drops/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@poap-xyz/drops",
"version": "0.0.31",
"version": "0.0.32",
"description": "Drops module for the poap.js library",
"main": "dist/cjs/index.cjs",
"module": "dist/esm/index.mjs",
Expand Down Expand Up @@ -30,6 +30,6 @@
},
"peerDependencies": {
"@poap-xyz/providers": "0.0.31",
"@poap-xyz/utils": "0.0.31"
"@poap-xyz/utils": "0.0.32"
}
}
6 changes: 2 additions & 4 deletions packages/drops/src/types/input.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import { Order } from '@poap-xyz/utils';
import { Order, PaginationInput } from '@poap-xyz/utils';

export enum DropsSortFields {
Name = 'name',
Id = 'id',
StartDate = 'start_date',
}

export interface FetchDropsInput {
limit: number;
offset: number;
export interface FetchDropsInput extends PaginationInput {
name?: string;
sort_field?: DropsSortFields;
sort_dir?: Order;
Expand Down
5 changes: 3 additions & 2 deletions packages/moments/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@poap-xyz/moments",
"version": "0.0.31",
"version": "0.0.32",
"description": "Moments module for the poap.js library",
"main": "dist/cjs/index.cjs",
"module": "dist/esm/index.mjs",
Expand Down Expand Up @@ -29,6 +29,7 @@
"rollup": "^3.20.2"
},
"peerDependencies": {
"@poap-xyz/providers": "0.0.31"
"@poap-xyz/providers": "0.0.31",
"@poap-xyz/utils": "0.0.32"
}
}
5 changes: 2 additions & 3 deletions packages/moments/src/client/dtos/fetch/FetchMomentsInput.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { PaginationInput } from '@poap-xyz/utils';
/**
* Interface representing the input needed to fetch moments.
* @interface
Expand All @@ -14,9 +15,7 @@
* @property {number} [token_id] - The token ID to filter moments by (optional).
* @property {number} [drop_id] - The drop ID to filter moments by (optional).
*/
export interface FetchMomentsInput {
limit: number;
offset: number;
export interface FetchMomentsInput extends PaginationInput {
createdOrder?: string;
tokenIdOrder?: string;
dropIdOrder?: string;
Expand Down
4 changes: 2 additions & 2 deletions packages/poaps/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@poap-xyz/poaps",
"version": "0.0.31",
"version": "0.0.32",
"description": "Poaps module for the poap.js library",
"main": "dist/cjs/index.cjs",
"module": "dist/esm/index.mjs",
Expand Down Expand Up @@ -30,6 +30,6 @@
},
"peerDependencies": {
"@poap-xyz/providers": "0.0.31",
"@poap-xyz/utils": "0.0.31"
"@poap-xyz/utils": "0.0.32"
}
}
6 changes: 2 additions & 4 deletions packages/poaps/src/types/input.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import { Order, Chain } from '@poap-xyz/utils';
import { Order, Chain, PaginationInput } from '@poap-xyz/utils';

export enum PoapsSortFields {
MintedOn = 'minted_on',
Id = 'id',
}

export interface FetchPoapsInput {
limit: number;
offset: number;
export interface FetchPoapsInput extends PaginationInput {
name?: string;
chain?: Chain;
minted_date_from?: string;
Expand Down
5 changes: 3 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,7 @@ __metadata:
rollup: ^3.20.2
peerDependencies:
"@poap-xyz/providers": 0.0.31
"@poap-xyz/utils": 0.0.31
"@poap-xyz/utils": 0.0.32
languageName: unknown
linkType: soft

Expand All @@ -884,6 +884,7 @@ __metadata:
rollup: ^3.20.2
peerDependencies:
"@poap-xyz/providers": 0.0.31
"@poap-xyz/utils": 0.0.32
languageName: unknown
linkType: soft

Expand All @@ -894,7 +895,7 @@ __metadata:
rollup: ^3.20.2
peerDependencies:
"@poap-xyz/providers": 0.0.31
"@poap-xyz/utils": 0.0.31
"@poap-xyz/utils": 0.0.32
languageName: unknown
linkType: soft

Expand Down

0 comments on commit c8e40b3

Please sign in to comment.