UNPKG

@aws-amplify/analytics

Version:

Analytics category of aws-amplify

26 lines (25 loc) • 806 B
import { AmplifyContext } from '@aws-amplify/core'; import { RecordInput } from '../types'; export declare function record(ctx: AmplifyContext, input: RecordInput): void; /** * Record one analytic event and send it to Kinesis. Events will be buffered and periodically sent to * Kinesis. * * @param params The input object used to construct the request. * * @throws validation: {@link AnalyticsValidationErrorCode} - Thrown when the provided parameters or library * configuration is incorrect. * * @example * ```ts * record({ * streamName: 'myKinesisStream', * partitionKey: 'myPartitionKey', * data: { } // The data blob to put into the record * }); * ``` * @param input - The event to record. * * @returns void */ export declare function record(input: RecordInput): void;