UNPKG

1.22 kBTypeScriptView Raw
1import { InputLogEvent, LogGroup } from '@aws-sdk/client-cloudwatch-logs';
2import { Credentials } from '@aws-sdk/types';
3export interface AmplifyConfig {
4 Analytics?: object;
5 Auth?: object;
6 API?: object;
7 Logging?: object;
8 Storage?: object;
9 Cache?: object;
10 Geo?: object;
11 Notifications?: {
12 InAppMessaging?: object;
13 };
14 ssr?: boolean;
15}
16export interface ICredentials {
17 accessKeyId: string;
18 sessionToken: string;
19 secretAccessKey: string;
20 identityId: string;
21 authenticated: boolean;
22 expiration?: Date;
23}
24/**
25 * @private
26 * Internal use of Amplify only
27 */
28export type DelayFunction = (attempt: number, args?: any[], error?: Error) => number | false;
29export interface LoggingProvider {
30 getProviderName(): string;
31 getCategoryName(): string;
32 configure(config?: object): object;
33 pushLogs(logs: InputLogEvent[]): void;
34}
35export interface AWSCloudWatchProviderOptions {
36 logGroupName?: string;
37 logStreamName?: string;
38 region?: string;
39 credentials?: Credentials;
40 endpoint?: string;
41}
42export interface CloudWatchDataTracker {
43 eventUploadInProgress: boolean;
44 logEvents: InputLogEvent[];
45 verifiedLogGroup?: LogGroup;
46}