@spotto/contract 1.0.6 → 1.0.8-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,2 +1,4 @@
|
|
|
1
|
+
export declare type EventCountBreakdown = 'year' | 'week' | 'month' | 'day' | 'hour';
|
|
2
|
+
export declare const EVENT_COUNT_BREAKDOWN: EventCountBreakdown[];
|
|
1
3
|
export declare type EventType = 'ReaderArrived' | 'ReaderExited' | 'Arrived' | 'Moved' | 'ExplicitArrived' | 'Exited' | 'ReaderOnline' | 'ReaderOffline' | 'AssetCreated' | 'AssetUpdated' | 'AssetDeleted' | 'LocationCreated' | 'LocationUpdated' | 'LocationDeleted' | 'ReaderCreated' | 'ReaderUpdated' | 'ReaderDeleted' | 'UserSearch';
|
|
2
4
|
export declare const EVENT_TYPES: EventType[];
|
package/dist/events/constants.js
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EVENT_TYPES = void 0;
|
|
3
|
+
exports.EVENT_TYPES = exports.EVENT_COUNT_BREAKDOWN = void 0;
|
|
4
|
+
exports.EVENT_COUNT_BREAKDOWN = [
|
|
5
|
+
'year',
|
|
6
|
+
'week',
|
|
7
|
+
'month',
|
|
8
|
+
'day',
|
|
9
|
+
'hour',
|
|
10
|
+
];
|
|
4
11
|
exports.EVENT_TYPES = [
|
|
5
12
|
'ReaderArrived',
|
|
6
13
|
'ReaderExited',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/events/constants.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/events/constants.ts"],"names":[],"mappings":";;;AACa,QAAA,qBAAqB,GAA0B;IAC1D,MAAM;IACN,MAAM;IACN,OAAO;IACP,KAAK;IACL,MAAM;CACP,CAAC;AAsBW,QAAA,WAAW,GAAgB;IACtC,eAAe;IACf,cAAc;IACd,SAAS;IACT,OAAO;IACP,iBAAiB;IACjB,QAAQ;IACR,cAAc;IACd,eAAe;IACf,cAAc;IACd,cAAc;IACd,cAAc;IACd,iBAAiB;IACjB,iBAAiB;IACjB,iBAAiB;IACjB,eAAe;IACf,eAAe;IACf,eAAe;IACf,YAAY;CACb,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { EventCountBreakdown } from '../constants';
|
|
1
2
|
import { EventFilters } from '../get';
|
|
2
|
-
export declare type EventCountBreakdown = 'all-time' | 'year' | 'month' | 'day' | 'hour';
|
|
3
3
|
export interface CountEventsQuery extends EventFilters {
|
|
4
4
|
breakdown?: EventCountBreakdown;
|
|
5
5
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { EventType } from '../constants';
|
|
2
2
|
export interface ITimePeriod {
|
|
3
3
|
year: number;
|
|
4
|
+
week?: number;
|
|
4
5
|
month?: number;
|
|
5
6
|
day?: number;
|
|
6
7
|
hour?: number;
|
|
@@ -10,8 +11,8 @@ export interface IEventCount {
|
|
|
10
11
|
count: number;
|
|
11
12
|
}
|
|
12
13
|
export interface EventCountForPeriod {
|
|
13
|
-
period
|
|
14
|
-
|
|
14
|
+
period?: ITimePeriod;
|
|
15
|
+
types: IEventCount[];
|
|
15
16
|
total: number;
|
|
16
17
|
}
|
|
17
18
|
export declare type CountEventsResponse = EventCountForPeriod[];
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spotto/contract",
|
|
3
3
|
"license": "ISC",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.8-alpha.0",
|
|
5
5
|
"description": "Spotto's API Contract type definitions",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"files": [
|
|
@@ -14,5 +14,5 @@
|
|
|
14
14
|
"devDependencies": {
|
|
15
15
|
"@types/geojson": "^7946.0.8"
|
|
16
16
|
},
|
|
17
|
-
"gitHead": "
|
|
17
|
+
"gitHead": "32fbf7c4b4ab9f013e4357a8402df59c9f2cf3bf"
|
|
18
18
|
}
|