@esri/telemetry-amazon 6.0.0-beta.1 → 6.0.0-beta.3

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,4 +1,5 @@
1
1
  import type { ArcGISIdentityManager } from '@esri/arcgis-rest-request';
2
+ import type { AnalyticsInstance } from 'analytics';
2
3
  export declare type GenericObject = {
3
4
  [key: string]: any;
4
5
  };
@@ -17,10 +18,11 @@ export interface IAccessChangeset {
17
18
  ids?: string[];
18
19
  }
19
20
  export interface AmazonTracker {
20
- track(eventName: string, payload: Record<string, any>): boolean;
21
+ track(eventName: string, payload: Record<string, any>): boolean | void | Promise<any>;
21
22
  }
23
+ export declare type AmazonAnalytics = AmazonTracker | AnalyticsInstance;
22
24
  export interface IAmazon<D, M> {
23
- analytics: AmazonTracker;
25
+ analytics: AmazonAnalytics;
24
26
  name: string;
25
27
  previousPage: {
26
28
  pageUrl?: string;
@@ -49,18 +51,20 @@ export declare type AmazonApp = {
49
51
  id?: string;
50
52
  version?: string;
51
53
  };
52
- export declare type AmazonTelemetryOptions = {
54
+ export declare type AmazonTelemetryPinpointOptions = {
53
55
  userPoolID: string;
54
56
  app?: AmazonApp;
55
57
  fips?: boolean;
56
- mode?: AmazonTelemetryEndpointMode;
57
- endpoint?: AmazonTelemetryEndpointOptions;
58
+ mode?: 'pinpoint';
58
59
  };
59
- export declare type AmazonTelemetryEndpointMode = 'pinpoint' | 'esri';
60
- export declare type AmazonTelemetryEndpointOptions = {
61
- url?: string;
62
- headers?: Record<string, string>;
60
+ export declare type AmazonTelemetryEsriOptions = {
61
+ userPoolID: string;
62
+ app?: AmazonApp;
63
+ fips?: boolean;
64
+ mode: 'esri';
63
65
  };
66
+ export declare type AmazonTelemetryOptions = AmazonTelemetryPinpointOptions | AmazonTelemetryEsriOptions;
67
+ export declare type AmazonTelemetryEndpointMode = 'pinpoint' | 'esri';
64
68
  export declare type LogPageViewPayload = {
65
69
  name: string;
66
70
  referrer: string;