From b48b6e1cd85552249920c65761ebc7687420206a Mon Sep 17 00:00:00 2001 From: "Daniel J. Lauk" Date: Fri, 27 Mar 2020 15:25:26 +0100 Subject: [PATCH] refactor: rename DataPoint to Event BREAKING CHANGE: Rename `DataPoint` to `Event` so it is more in line with the overall terminology used with the databuffer's backend. If you specifically used the type name in your code, then you will need to change it accordingly. If you only used type inference, you don't need to change your code. --- CHANGELOG.md | 1 + src/query-data/response.ts | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ee25389..68255e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- **BREAKING CHANGE**: rename type `DataPoint` to `Event` - rename enums to singular - improve doc comments diff --git a/src/query-data/response.ts b/src/query-data/response.ts index 78ed2d8..f9fac30 100644 --- a/src/query-data/response.ts +++ b/src/query-data/response.ts @@ -18,18 +18,18 @@ export interface QueryResponseItem { /** * data contains the data retrieved from the API. */ - data: DataPoint[] + data: Event[] } /** - * DataPoint defines a single point of data returned for a [[Channel]] + * Event defines a single point of data returned for a [[Channel]] * within a [[QueryResponseItem]]. * * @remarks * Which fields are present depends on which fields were requested in * the original data query. */ -export interface DataPoint { +export interface Event { [EventField.GLOBAL_DATE]?: string [EventField.GLOBAL_MILLIS]?: number [EventField.GLOBAL_SECONDS]?: number