Skip to content

Commit 01698ae

Browse files
Release/v7.2.3 (#159)
* Update header types and export types from request file (#158) * Changelog * 7.2.3
1 parent 856c83d commit 01698ae

File tree

5 files changed

+24
-8
lines changed

5 files changed

+24
-8
lines changed

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
## [7.2.3](https://github.com/polygon-io/client-js/compare/v7.2.2...v7.2.3) (2023-05-15)
2+
### Bug Fixes
3+
* Fix typing issue with optional headers Launchpad Typescript definitions
4+
* Export types from requests file
5+
* Make Launchpad Headers optional to support metered product
6+
7+
## [7.2.2](https://github.com/polygon-io/client-js/compare/v7.2.1...v7.2.2) (2023-04-19)
8+
### Bug Fixes
9+
* Remove examples and unneccesary files from npm package
10+
11+
## [7.2.1](https://github.com/polygon-io/client-js/compare/v7.2.0...v7.2.1) (2023-04-12)
12+
### Bug Fixes
13+
* Update snapshot response type to reflect recent additions
14+
115
## [7.2.0](https://github.com/polygon-io/client-js/compare/v7.1.1...v7.2.0) (2023-04-07)
216
### New Feature
317
* Support Dual Module Formats so that this package can be used with CommonJS

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
{
22
"name": "@polygon.io/client-js",
3-
"version": "7.2.2",
3+
"version": "7.2.3",
44
"description": "Isomorphic Javascript client for Polygon.io Stocks, Forex, and Crypto APIs",
55
"main": "dist/main.js",
66
"types": "dist/main.d.ts",
77
"type": "module",
88
"exports": {
9+
"types": "./dist/main.d.ts",
910
"import": "./dist/main.js",
1011
"require": "./dist/main.cjs"
1112
},

src/rest/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export * from "./reference/index.js";
1111
export * from "./options/index.js";
1212
export * from "./stocks/index.js";
1313
export * from "./indices/index.js";
14+
export * from "./transport/request.js"; // ensure types are exported
1415

1516
export interface IRestClient {
1617
crypto: ICryptoClient;

src/rest/transport/request.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ export interface IPolygonQuery {
55
[key: string]: string | number | boolean | undefined;
66
}
77

8-
export interface IPolygonEdgeHeaders extends Record<string, string> {
9-
'X-Polygon-Edge-ID': string;
10-
'X-Polygon-Edge-IP-Address': string;
8+
export interface IPolygonEdgeHeaders extends Partial<Record<string, string>> {
9+
'X-Polygon-Edge-ID'?: string;
10+
'X-Polygon-Edge-IP-Address'?: string;
1111
'X-Polygon-Edge-User-Agent'?: string;
1212
}
1313

14-
export type IHeaders = IPolygonEdgeHeaders | Record<string, string>
14+
export type IHeaders = IPolygonEdgeHeaders | HeadersInit
1515

16-
export interface IRequestInit extends RequestInit {
16+
export interface IRequestInit extends Omit<RequestInit, 'headers'> {
1717
headers?: IHeaders
1818
}
1919

0 commit comments

Comments
 (0)