UNPKG

1.86 kBTypeScriptView Raw
1import { AnalyticsProvider, PromiseHandlers, EventParams } from '../types';
2export declare class AWSPinpointProvider implements AnalyticsProvider {
3 static category: string;
4 static providerName: string;
5 private _config;
6 private _sessionId;
7 private _sessionStartTimestamp;
8 private _buffer;
9 private _endpointBuffer;
10 private _clientInfo;
11 private _endpointGenerating;
12 private _endpointUpdateInProgress;
13 constructor(config?: any);
14 /**
15 * get the category of the plugin
16 */
17 getCategory(): string;
18 /**
19 * get provider name of the plugin
20 */
21 getProviderName(): string;
22 /**
23 * configure the plugin
24 * @param {Object} config - configuration
25 */
26 configure(config: any): object;
27 /**
28 * record an event
29 * @param {Object} params - the params of an event
30 */
31 record(params: EventParams, handlers: PromiseHandlers): Promise<any>;
32 private _sendEndpointUpdate;
33 /**
34 * @private
35 * @param params - params for event recording
36 * Put events into buffer
37 */
38 private _putToBuffer;
39 private _generateSession;
40 private _send;
41 private _generateBatchItemContext;
42 private _pinpointPutEvents;
43 private _pinpointSendStopSession;
44 private _retry;
45 private _updateEndpoint;
46 private _handleEndpointUpdateFailure;
47 private _handleEndpointUpdateForbidden;
48 private _retryEndpointUpdate;
49 /**
50 * @private
51 * @param config
52 * Configure credentials and init buffer
53 */
54 private _init;
55 private _bufferExists;
56 private _initBuffer;
57 private _flushBuffer;
58 private _resumeBuffer;
59 private _getEndpointId;
60 /**
61 * EndPoint request
62 * @return {Object} - The request of updating endpoint
63 */
64 private _endpointRequest;
65 private _eventError;
66 private _getCredentials;
67}