Skip to content

Commit

Permalink
Release/v7.2.3 (#159)
Browse files Browse the repository at this point in the history
* Update header types and export types from request file (#158)

* Changelog

* 7.2.3
  • Loading branch information
timetraveler328 authored May 15, 2023
1 parent 856c83d commit 01698ae
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 8 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
## [7.2.3](https://github.com/polygon-io/client-js/compare/v7.2.2...v7.2.3) (2023-05-15)
### Bug Fixes
* Fix typing issue with optional headers Launchpad Typescript definitions
* Export types from requests file
* Make Launchpad Headers optional to support metered product

## [7.2.2](https://github.com/polygon-io/client-js/compare/v7.2.1...v7.2.2) (2023-04-19)
### Bug Fixes
* Remove examples and unneccesary files from npm package

## [7.2.1](https://github.com/polygon-io/client-js/compare/v7.2.0...v7.2.1) (2023-04-12)
### Bug Fixes
* Update snapshot response type to reflect recent additions

## [7.2.0](https://github.com/polygon-io/client-js/compare/v7.1.1...v7.2.0) (2023-04-07)
### New Feature
* Support Dual Module Formats so that this package can be used with CommonJS
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"name": "@polygon.io/client-js",
"version": "7.2.2",
"version": "7.2.3",
"description": "Isomorphic Javascript client for Polygon.io Stocks, Forex, and Crypto APIs",
"main": "dist/main.js",
"types": "dist/main.d.ts",
"type": "module",
"exports": {
"types": "./dist/main.d.ts",
"import": "./dist/main.js",
"require": "./dist/main.cjs"
},
Expand Down
1 change: 1 addition & 0 deletions src/rest/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export * from "./reference/index.js";
export * from "./options/index.js";
export * from "./stocks/index.js";
export * from "./indices/index.js";
export * from "./transport/request.js"; // ensure types are exported

export interface IRestClient {
crypto: ICryptoClient;
Expand Down
10 changes: 5 additions & 5 deletions src/rest/transport/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ export interface IPolygonQuery {
[key: string]: string | number | boolean | undefined;
}

export interface IPolygonEdgeHeaders extends Record<string, string> {
'X-Polygon-Edge-ID': string;
'X-Polygon-Edge-IP-Address': string;
export interface IPolygonEdgeHeaders extends Partial<Record<string, string>> {
'X-Polygon-Edge-ID'?: string;
'X-Polygon-Edge-IP-Address'?: string;
'X-Polygon-Edge-User-Agent'?: string;
}

export type IHeaders = IPolygonEdgeHeaders | Record<string, string>
export type IHeaders = IPolygonEdgeHeaders | HeadersInit

export interface IRequestInit extends RequestInit {
export interface IRequestInit extends Omit<RequestInit, 'headers'> {
headers?: IHeaders
}

Expand Down

0 comments on commit 01698ae

Please sign in to comment.