@armco/analytics 0.1.3 → 0.1.4

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,13 +1,5 @@
1
1
  import { startSession, getSessionId } from "./session";
2
- import { User, Event, SubmissionStrategy } from "./index.d";
3
- interface ConfigType {
4
- apiKey?: string;
5
- analyticsEndpoint?: string;
6
- hostProjectName?: string;
7
- trackEvents?: Array<string>;
8
- submissionStrategy?: SubmissionStrategy;
9
- showPopUp?: boolean;
10
- }
2
+ import { User, Event, ConfigType } from "./index.d";
11
3
  declare let enabled: boolean | null;
12
4
  declare function loadConfiguration(): Promise<any>;
13
5
  declare function getEnvironment(): string;
package/index.d.ts CHANGED
@@ -1,24 +1,34 @@
1
1
  import main from "./dist";
2
2
 
3
3
  export interface User {
4
- email: string;
5
- // Other user properties...
4
+ email: string;
5
+ // Other user properties...
6
6
  }
7
7
 
8
8
  export interface Event {
9
- eventType: string;
10
- timestamp?: Date;
9
+ eventType: string;
10
+ timestamp?: Date;
11
11
  region?: string,
12
12
  address?: string,
13
13
  coordinates?: {
14
14
  latitude: number
15
15
  longitude: number
16
16
  }
17
- [key: string]: any; // Index signature to accept any other properties with their associated types
17
+ [key: string]: any; // Index signature to accept any other properties with their associated types
18
18
  }
19
19
 
20
- export type SubmissionStrategy = "ONEVENT" | "DEFER"
21
20
 
21
+ export interface ConfigType {
22
+ apiKey?: string;
23
+ analyticsEndpoint?: string;
24
+ hostProjectName?: string;
25
+ trackEvents?: Array<string>;
26
+ submissionStrategy?: SubmissionStrategy
27
+ showPopUp?: boolean
28
+ }
29
+
30
+ export type SubmissionStrategy = "ONEVENT" | "DEFER"
31
+ export type objType = { [key: string]: any }
22
32
  export type EVENT_TYPES = "CLICK" | "SUBMIT" | "SCROLL" | string
23
33
 
24
34
  export default main;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@armco/analytics",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Browser Based Analytics interceptor for configured events",
5
5
  "main": "index.js",
6
6
  "type": "module",