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

Commit a7919fc

Browse files
committed
Added pagination query parameters
1 parent ddad085 commit a7919fc

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# 0.3.0
22

33
- Contact client is now able to retrieve multiple contact messages
4+
- Includes pagination and other query parameters
45
- Contact client is now able to retrieve a specific contact message
56
- Portfolio client can now be configured with an authentication token
67
- Restructured request interface to be more fine grained

src/apis/contact/client.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import axios, { AxiosInstance, AxiosResponse } from "axios";
22
import { BaseClient, ClientConfig } from "../../common/client";
33
import {
4+
PaginationQueryParameter,
45
PortfolioRequest,
56
RequestWithBody,
67
RequestWithParameters,
@@ -27,7 +28,8 @@ export interface GetContactMessageRequest extends PortfolioRequest {
2728
id: string;
2829
}
2930

30-
export interface GetContactMessageQueryParameters {
31+
export interface GetContactMessageQueryParameters
32+
extends PaginationQueryParameter {
3133
reason?: Reason;
3234
archived?: boolean;
3335
responded?: boolean;

src/common/request.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,8 @@ export interface RequestWithBody<T> extends PortfolioRequest {
1919
export interface CompletePortfolioRequest<B, Q>
2020
extends RequestWithBody<B>,
2121
RequestWithParameters<Q> {}
22+
23+
export interface PaginationQueryParameter {
24+
page?: number;
25+
limit?: number;
26+
}

0 commit comments

Comments
 (0)