diff --git a/CHANGELOG.md b/CHANGELOG.md index 4492148..75e109b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/apis/contact/client.ts b/src/apis/contact/client.ts index 83cfaee..6455745 100644 --- a/src/apis/contact/client.ts +++ b/src/apis/contact/client.ts @@ -1,6 +1,7 @@ import axios, { AxiosInstance, AxiosResponse } from "axios"; import { BaseClient, ClientConfig } from "../../common/client"; import { + PaginationQueryParameter, PortfolioRequest, RequestWithBody, RequestWithParameters, @@ -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; diff --git a/src/common/request.ts b/src/common/request.ts index 9371ba1..6012469 100644 --- a/src/common/request.ts +++ b/src/common/request.ts @@ -19,3 +19,8 @@ export interface RequestWithBody extends PortfolioRequest { export interface CompletePortfolioRequest extends RequestWithBody, RequestWithParameters {} + +export interface PaginationQueryParameter { + page?: number; + limit?: number; +}