Skip to content
This repository has been archived by the owner on Feb 18, 2021. It is now read-only.

Commit

Permalink
Added pagination query parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
jusexton committed Jul 16, 2020
1 parent ddad085 commit a7919fc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# 0.3.0

- Contact client is now able to retrieve multiple contact messages
- Includes pagination and other query parameters
- Contact client is now able to retrieve a specific contact message
- Portfolio client can now be configured with an authentication token
- Restructured request interface to be more fine grained
Expand Down
4 changes: 3 additions & 1 deletion src/apis/contact/client.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import axios, { AxiosInstance, AxiosResponse } from "axios";
import { BaseClient, ClientConfig } from "../../common/client";
import {
PaginationQueryParameter,
PortfolioRequest,
RequestWithBody,
RequestWithParameters,
Expand All @@ -27,7 +28,8 @@ export interface GetContactMessageRequest extends PortfolioRequest {
id: string;
}

export interface GetContactMessageQueryParameters {
export interface GetContactMessageQueryParameters
extends PaginationQueryParameter {
reason?: Reason;
archived?: boolean;
responded?: boolean;
Expand Down
5 changes: 5 additions & 0 deletions src/common/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,8 @@ export interface RequestWithBody<T> extends PortfolioRequest {
export interface CompletePortfolioRequest<B, Q>
extends RequestWithBody<B>,
RequestWithParameters<Q> {}

export interface PaginationQueryParameter {
page?: number;
limit?: number;
}

0 comments on commit a7919fc

Please sign in to comment.