diff --git a/src/interfaces/EnvelopedResponse.ts b/src/interfaces/EnvelopedResponse.ts index edbd8a0..b10cda5 100644 --- a/src/interfaces/EnvelopedResponse.ts +++ b/src/interfaces/EnvelopedResponse.ts @@ -1,7 +1,9 @@ -import { OutgoingHttpHeaders } from "http"; +export interface OutgoingHttpHeaders { + [header: string]: number | string | string[] | undefined; +} -export interface EnvelopedResponse { +export default interface EnvelopedResponse { readonly status: number; readonly body: T; readonly headers: OutgoingHttpHeaders; -} \ No newline at end of file +} diff --git a/src/interfaces/PaginatedResults.ts b/src/interfaces/PaginatedResponse.ts similarity index 82% rename from src/interfaces/PaginatedResults.ts rename to src/interfaces/PaginatedResponse.ts index b000c86..9c7946c 100644 --- a/src/interfaces/PaginatedResults.ts +++ b/src/interfaces/PaginatedResponse.ts @@ -7,7 +7,7 @@ export interface PaginationMetadata { readonly before: string | null; readonly totalCount: number; } -export interface PaginatedResponse { +export default interface PaginatedResponse { readonly data: I[]; readonly pagination: PaginationMetadata; } diff --git a/src/interfaces/index.ts b/src/interfaces/index.ts index d9a03f1..cf304b8 100644 --- a/src/interfaces/index.ts +++ b/src/interfaces/index.ts @@ -1,19 +1,32 @@ -import Cursor from "./Cursor"; -import CursorResult from "./CursorResult"; -import Filter from "./Filter"; -import Item from "./Item"; -import Options from "./Options"; -import Pagination from "./Pagination"; -import Sort from "./Sort"; -import SortOrder from "./SortOrder"; +import Cursor from './Cursor'; +import CursorResult from './CursorResult'; +import { + default as EnvelopedResponse, + OutgoingHttpHeaders, +} from './EnvelopedResponse'; + +import Filter from './Filter'; +import Item from './Item'; +import Options from './Options'; +import { + default as PaginatedResponse, + PaginationMetadata, +} from './PaginatedResponse'; +import Pagination from './Pagination'; +import Sort from './Sort'; +import SortOrder from './SortOrder'; export { Cursor, CursorResult, + EnvelopedResponse, Filter, Item, Options, + OutgoingHttpHeaders, Pagination, + PaginationMetadata, + PaginatedResponse, Sort, - SortOrder + SortOrder, };