@adaptive-recognition/carmen-cloud-client
Advanced tools
Comparing version 1.1.0 to 1.2.0
@@ -1,2 +0,2 @@ | ||
import { StorageAndHookAPIOptions } from "./options"; | ||
import { EventFilters, StorageAndHookAPIOptions } from "./options"; | ||
import { StorageStatusResponse } from "./storagestatusresponse"; | ||
@@ -30,3 +30,3 @@ import { Hooks } from "./hooks"; | ||
*/ | ||
getEvents(api: 'vehicle' | 'transport'): Promise<EventsResponse>; | ||
getEvents(api: 'vehicle' | 'transport', filters?: EventFilters): Promise<EventsResponse>; | ||
/** | ||
@@ -33,0 +33,0 @@ * Gets the current storage status and topic ARN (if it exists). |
@@ -46,6 +46,8 @@ "use strict"; | ||
*/ | ||
getEvents(api) { | ||
getEvents(api, filters) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const headers = this.createRequestHeaders(); | ||
const url = (0, urlcat_1.default)(this.apiUrl, '/events/:api', { api }); | ||
const url = (0, urlcat_1.default)(this.apiUrl, '/events/:api', Object.assign({ api }, filters)); | ||
console.log(url); | ||
console.log(headers); | ||
const httpResponse = yield axios_1.default.get(url, { headers }); | ||
@@ -52,0 +54,0 @@ return httpResponse.data; |
@@ -27,2 +27,34 @@ /** | ||
} | ||
/** | ||
* Contains options for filtering events. | ||
*/ | ||
export interface EventFilters { | ||
/** | ||
* The maximum number of events to return. Default: 200. | ||
*/ | ||
limit?: number; | ||
/** | ||
* The order in which to return events. Default: `"asc"`. | ||
*/ | ||
order?: 'asc' | 'desc'; | ||
/** | ||
* The token to continue a previous request. If provided, the request will return | ||
* events after the last event of the previous request. | ||
*/ | ||
'continuation-token'?: string; | ||
/** | ||
* The timestamp of the event to start at. If provided, the request will return | ||
* events after or at the provided timestamp. | ||
* | ||
* **NOTE:** `before` and `after`˙are mutually exclusive. | ||
*/ | ||
before?: number; | ||
/** | ||
* The timestamp of the event to end at. If provided, the request will return | ||
* events before or at the provided timestamp. | ||
* | ||
* **NOTE:** `before` and `after`˙are mutually exclusive. | ||
*/ | ||
after?: number; | ||
} | ||
//# sourceMappingURL=options.d.ts.map |
{ | ||
"name": "@adaptive-recognition/carmen-cloud-client", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "Node.js client for Carmen Cloud by Adaptive Recognition. Efficiently read license plates, recognize vehicle details, and process container, railway wagon, and US DOT codes.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
217430
94
3455