@fdy/faraday-js
Advanced tools
Comparing version 0.1.190 to 0.1.191
@@ -13,2 +13,13 @@ # Changelog | ||
## [0.10.29] - 2024-08-30 | ||
### Added | ||
- `GET /streams/{stream_id_or_name}/analysis` to return event stream analysis (starting with a `time_series`) | ||
- `stream.properties[property].distribution` which is present for numeric properties and contains the distribution of values | ||
- `stream.properties[property].values` which is present for categorical and multicategorical properties and contains the unique values and their counts | ||
- `stream.event_contribution_by_dataset` to show which datasets contributed to the stream and their event count | ||
- `stream.event_count` which is the total number of events in the stream | ||
- `stream.oldest_date` and `stream.newest_date` which are the oldest and newest dates of events found in the stream | ||
## [0.10.28] - 2024-08-26 | ||
@@ -18,3 +29,3 @@ | ||
- Add yyyy_mm_dash and yyyy_mm_slash to data map date formats | ||
- Add yyyy_mm_dash and yyyy_mm_slash to data map date formats | ||
@@ -21,0 +32,0 @@ ## [0.10.27] - 2024-08-05 |
@@ -13,3 +13,3 @@ /** | ||
import * as runtime from '../runtime'; | ||
import { ArchiveConfig, Stream } from '../models'; | ||
import { ArchiveConfig, Stream, StreamAnalysis } from '../models'; | ||
export interface ArchiveStreamRequest { | ||
@@ -28,2 +28,5 @@ streamIdOrName: string; | ||
} | ||
export interface GetStreamAnalysisRequest { | ||
streamIdOrName: string; | ||
} | ||
export interface UnarchiveStreamRequest { | ||
@@ -76,2 +79,10 @@ streamIdOrName: string; | ||
/** | ||
* Get the count of stream events emitted over a time period. | ||
*/ | ||
private getStreamAnalysisRaw; | ||
/** | ||
* Get the count of stream events emitted over a time period. | ||
*/ | ||
getStreamAnalysis(streamIdOrName: string): Promise<StreamAnalysis>; | ||
/** | ||
* List all streams present on the account | ||
@@ -78,0 +89,0 @@ * List streams |
@@ -181,2 +181,37 @@ "use strict"; | ||
/** | ||
* Get the count of stream events emitted over a time period. | ||
*/ | ||
getStreamAnalysisRaw(requestParameters) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
if (requestParameters.streamIdOrName === null || requestParameters.streamIdOrName === undefined) { | ||
throw new runtime.RequiredError('streamIdOrName', 'Required parameter requestParameters.streamIdOrName was null or undefined when calling getStreamAnalysis.'); | ||
} | ||
const queryParameters = {}; | ||
const headerParameters = {}; | ||
if (this.configuration && this.configuration.accessToken) { | ||
const token = this.configuration.accessToken; | ||
const tokenString = yield token("bearer", []); | ||
if (tokenString) { | ||
headerParameters["Authorization"] = `Bearer ${tokenString}`; | ||
} | ||
} | ||
const response = yield this.request({ | ||
path: `/streams/{stream_id_or_name}/analysis`.replace(`{${"stream_id_or_name"}}`, encodeURIComponent(String(requestParameters.streamIdOrName))), | ||
method: 'GET', | ||
headers: headerParameters, | ||
query: queryParameters, | ||
}); | ||
return new runtime.JSONApiResponse(response); | ||
}); | ||
} | ||
/** | ||
* Get the count of stream events emitted over a time period. | ||
*/ | ||
getStreamAnalysis(streamIdOrName) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const response = yield this.getStreamAnalysisRaw({ streamIdOrName: streamIdOrName }); | ||
return yield response.value(); | ||
}); | ||
} | ||
/** | ||
* List all streams present on the account | ||
@@ -183,0 +218,0 @@ * List streams |
{ | ||
"name": "@fdy/faraday-js", | ||
"version": "0.1.190", | ||
"version": "0.1.191", | ||
"description": "OpenAPI client for @fdy/faraday-js", | ||
@@ -5,0 +5,0 @@ "author": "@hana.kslr", |
@@ -20,2 +20,3 @@ /* tslint:disable */ | ||
Stream, | ||
StreamAnalysis, | ||
} from '../models'; | ||
@@ -40,2 +41,6 @@ | ||
export interface GetStreamAnalysisRequest { | ||
streamIdOrName: string; | ||
} | ||
export interface UnarchiveStreamRequest { | ||
@@ -215,2 +220,40 @@ streamIdOrName: string; | ||
/** | ||
* Get the count of stream events emitted over a time period. | ||
*/ | ||
private async getStreamAnalysisRaw(requestParameters: GetStreamAnalysisRequest, ): Promise<runtime.ApiResponse<StreamAnalysis>> { | ||
if (requestParameters.streamIdOrName === null || requestParameters.streamIdOrName === undefined) { | ||
throw new runtime.RequiredError('streamIdOrName','Required parameter requestParameters.streamIdOrName was null or undefined when calling getStreamAnalysis.'); | ||
} | ||
const queryParameters: any = {}; | ||
const headerParameters: runtime.HTTPHeaders = {}; | ||
if (this.configuration && this.configuration.accessToken) { | ||
const token = this.configuration.accessToken; | ||
const tokenString = await token("bearer", []); | ||
if (tokenString) { | ||
headerParameters["Authorization"] = `Bearer ${tokenString}`; | ||
} | ||
} | ||
const response = await this.request({ | ||
path: `/streams/{stream_id_or_name}/analysis`.replace(`{${"stream_id_or_name"}}`, encodeURIComponent(String(requestParameters.streamIdOrName))), | ||
method: 'GET', | ||
headers: headerParameters, | ||
query: queryParameters, | ||
}); | ||
return new runtime.JSONApiResponse(response); | ||
} | ||
/** | ||
* Get the count of stream events emitted over a time period. | ||
*/ | ||
async getStreamAnalysis(streamIdOrName: string, ): Promise<StreamAnalysis> { | ||
const response = await this.getStreamAnalysisRaw({ streamIdOrName: streamIdOrName }, ); | ||
return await response.value(); | ||
} | ||
/** | ||
* List all streams present on the account | ||
@@ -217,0 +260,0 @@ * List streams |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1853534
56833