1 | import { PromiseHandlers } from '../Provider';
|
2 |
|
3 | export type Event = {
|
4 | eventId: string;
|
5 | name: string;
|
6 | attributes: string;
|
7 | metrics: string;
|
8 | session: object;
|
9 | immediate: boolean;
|
10 | };
|
11 |
|
12 | export type EventConfig = {
|
13 | appId: string;
|
14 | endpointId: string;
|
15 | region: string;
|
16 | resendLimit: number;
|
17 | };
|
18 |
|
19 | export type EventParams = {
|
20 | event: Event;
|
21 | timestamp: string;
|
22 | config: EventConfig;
|
23 | credentials: object;
|
24 | resendLimit: number;
|
25 | };
|
26 |
|
27 | export type EventObject = {
|
28 | params: EventParams;
|
29 | handlers: PromiseHandlers;
|
30 | };
|
31 |
|
32 | export type EventMap = {
|
33 | [key: string]: EventObject;
|
34 | };
|
35 |
|
36 | export type EventBuffer = Array<EventMap>;
|
37 | export type EndpointBuffer = Array<EventObject>;
|
38 |
|
39 | export type PutEventsResponse = {
|
40 | EventsResponse: {
|
41 | Results?: {
|
42 | [endpointId: string]: {
|
43 | EventsItemResponse?: {
|
44 | [eventId: string]: {
|
45 | StatusCode?: number;
|
46 | Message?: string;
|
47 | };
|
48 | };
|
49 | };
|
50 | };
|
51 | };
|
52 | };
|
53 |
|
54 | export type EndpointFailureData = {
|
55 | err: any;
|
56 | update_params: any;
|
57 | endpointObject: EventObject;
|
58 | };
|