UNPKG

992 BPlain TextView Raw
1import { PromiseHandlers } from '../Provider';
2
3export type Event = {
4 eventId: string;
5 name: string;
6 attributes: string;
7 metrics: string;
8 session: object;
9 immediate: boolean;
10};
11
12export type EventConfig = {
13 appId: string;
14 endpointId: string;
15 region: string;
16 resendLimit: number;
17};
18
19export type EventParams = {
20 event: Event;
21 timestamp: string;
22 config: EventConfig;
23 credentials: object;
24 resendLimit: number;
25};
26
27export type EventObject = {
28 params: EventParams;
29 handlers: PromiseHandlers;
30};
31
32export type EventMap = {
33 [key: string]: EventObject;
34};
35
36export type EventBuffer = Array<EventMap>;
37export type EndpointBuffer = Array<EventObject>;
38
39export 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
54export type EndpointFailureData = {
55 err: any;
56 update_params: any;
57 endpointObject: EventObject;
58};