1 | import { AnalyticsProvider } from '../types';
|
2 | export declare class AmazonPersonalizeProvider implements AnalyticsProvider {
|
3 | private _config;
|
4 | private _personalize;
|
5 | private _buffer;
|
6 | private _timer;
|
7 | private _sessionInfo;
|
8 | private _sessionManager;
|
9 | private _isBrowser;
|
10 | constructor(config?: any);
|
11 | private _setupTimer;
|
12 | /**
|
13 | * Record event
|
14 | * @param eventType - type of the event action. e.g. "Click"
|
15 | * @param properties - properties of the event
|
16 | * @return Promise
|
17 | */
|
18 | record(params: any): Promise<boolean>;
|
19 | private loadElement;
|
20 | private isElementFullyLoaded;
|
21 | /**
|
22 | * get the category of the plugin
|
23 | */
|
24 | getCategory(): string;
|
25 | /**
|
26 | * get provider name of the plugin
|
27 | */
|
28 | getProviderName(): string;
|
29 | /**
|
30 | * configure the plugin
|
31 | * @param {Object} config - configuration
|
32 | */
|
33 | configure(config: any): object;
|
34 | /**
|
35 | * Generate the requestParams from customer input params and sessionInfo
|
36 | * @private
|
37 | * @param eventData - customer input for event data
|
38 | * @param api - api name
|
39 | * @return RequestParams - wrapper object with all information required for make request
|
40 | */
|
41 | private generateRequestParams;
|
42 | /**
|
43 | * record an event
|
44 | * @param {Object} params - the params of an event
|
45 | */
|
46 | private _sendEvents;
|
47 | /**
|
48 | * Put event into buffer
|
49 | * @private
|
50 | * @param params - params for the event recording
|
51 | */
|
52 | private putToBuffer;
|
53 | /**
|
54 | * flush the buffer and batch sending the request
|
55 | * @private
|
56 | * @param eventsParams - the buffer for cache the payload
|
57 | */
|
58 | private _sendFromBuffer;
|
59 | /**
|
60 | * Generate the record payload for single event
|
61 | * @private
|
62 | * @param params - RequestParams
|
63 | */
|
64 | private _generateSingleRecordPayload;
|
65 | /**
|
66 | * Initialize the personalize client
|
67 | * @private
|
68 | * @param params - RequestParams
|
69 | */
|
70 | private _init;
|
71 | /**
|
72 | * check if current credentials exists
|
73 | * @private
|
74 | */
|
75 | private _getCredentials;
|
76 | }
|
77 | /**
|
78 | * @deprecated use named import
|
79 | */
|
80 | export default AmazonPersonalizeProvider;
|