UNPKG

788 BTypeScriptView Raw
1import { RecordInput } from '../types';
2/**
3 * Records an Analytic event to Pinpoint. Events will be buffered and periodically sent to Pinpoint.
4 *
5 * @param params The input object used to construct the request.
6 *
7 * @throws validation: {@link AnalyticsValidationErrorCode} - Thrown when the provided parameters or library
8 * configuration is incorrect.
9 *
10 * @example
11 * ```ts
12 * // Send an event to Pinpoint
13 * record({ name: eventName })
14 * ```
15 *
16 * @example
17 * ```ts
18 * // Send an event to Pinpoint with metrics & custom attributes
19 * record({
20 * name: eventName,
21 * attributes: {
22 * 'my-attribute': attributeValue
23 * },
24 * metrics: {
25 * 'my-metric': metricValue
26 * }
27 * })
28 * ```
29 */
30export declare const record: (input: RecordInput) => void;