UNPKG

2.03 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 pinpointClient;
7 private _sessionId;
8 private _sessionStartTimestamp;
9 private _buffer;
10 private _endpointBuffer;
11 private _clientInfo;
12 private _endpointGenerating;
13 private _endpointUpdateInProgress;
14 constructor(config?: any);
15 /**
16 * get the category of the plugin
17 */
18 getCategory(): string;
19 /**
20 * get provider name of the plugin
21 */
22 getProviderName(): string;
23 /**
24 * configure the plugin
25 * @param {Object} config - configuration
26 */
27 configure(config: any): object;
28 /**
29 * record an event
30 * @param {Object} params - the params of an event
31 */
32 record(params: EventParams, handlers: PromiseHandlers): Promise<any>;
33 private _sendEndpointUpdate;
34 /**
35 * @private
36 * @param params - params for event recording
37 * Put events into buffer
38 */
39 private _putToBuffer;
40 private _generateSession;
41 private _send;
42 private _generateBatchItemContext;
43 private _pinpointPutEvents;
44 private _pinpointSendStopSession;
45 private _retry;
46 private _updateEndpoint;
47 private _handleEndpointUpdateFailure;
48 private _handleEndpointUpdateForbidden;
49 private _retryEndpointUpdate;
50 /**
51 * @private
52 * @param config
53 * Init the clients
54 */
55 private _initClients;
56 private _bufferExists;
57 private _initBuffer;
58 private _updateBufferClient;
59 private _flushBuffer;
60 private _resumeBuffer;
61 private _customizePinpointClientReq;
62 private _getEndpointId;
63 /**
64 * EndPoint request
65 * @return {Object} - The request of updating endpoint
66 */
67 private _endpointRequest;
68 private _eventError;
69 private _getCredentials;
70}
71/**
72 * @deprecated use named import
73 */
74export default AWSPinpointProvider;