UNPKG

1.91 kBTypeScriptView Raw
1import { APIConfig, GraphQLProviderConfig, LibraryAPIOptions } from './API/types';
2import { AnalyticsConfig } from './Analytics/types';
3import { AuthConfig, AuthIdentityPoolConfig, AuthUserPoolAndIdentityPoolConfig, AuthUserPoolConfig, CognitoIdentityPoolConfig, GetCredentialsOptions, LibraryAuthOptions } from './Auth/types';
4import { GeoConfig } from './Geo/types';
5import { PredictionsConfig } from './Predictions/types';
6import { LibraryStorageOptions, StorageAccessLevel, StorageConfig } from './Storage/types';
7import { NotificationsConfig } from './Notifications/types';
8import { InteractionsConfig } from './Interactions/types';
9/**
10 * Compatibility type representing the Amplify Gen 1 configuration file schema. This type should not be used directly.
11 */
12export interface LegacyConfig {
13 /**
14 * @deprecated The field should not be used.
15 */
16 aws_project_region?: string;
17}
18export type AtLeastOne<T, U = {
19 [K in keyof T]: Pick<T, K>;
20}> = Partial<T> & U[keyof U];
21/**
22 * Amplify library configuration type. Used to specify back-end resource configuration across the library.
23 */
24export interface ResourcesConfig {
25 API?: APIConfig;
26 Analytics?: AnalyticsConfig;
27 Auth?: AuthConfig;
28 Interactions?: InteractionsConfig;
29 Notifications?: NotificationsConfig;
30 Predictions?: PredictionsConfig;
31 Storage?: StorageConfig;
32 Geo?: GeoConfig;
33}
34/**
35 * Amplify library options type. Used to customize library behavior.
36 */
37export interface LibraryOptions {
38 API?: LibraryAPIOptions;
39 Auth?: LibraryAuthOptions;
40 Storage?: LibraryStorageOptions;
41 ssr?: boolean;
42}
43export { APIConfig, AuthConfig, AuthUserPoolConfig, AuthIdentityPoolConfig, AuthUserPoolAndIdentityPoolConfig, GetCredentialsOptions, GraphQLProviderConfig, InteractionsConfig, PredictionsConfig, StorageAccessLevel, StorageConfig, AnalyticsConfig, CognitoIdentityPoolConfig, GeoConfig, };