Do not edit this file. It is a report generated by API Extractor.
import { BucketAccelerateStatus } from '@aws-sdk/client-s3';
import { BucketVersioningStatus } from '@aws-sdk/client-s3';
import { EnvironmentResponse } from '@aws-sdk/client-lambda';
import { PasswordPolicyType } from '@aws-sdk/client-cognito-identity-provider';
import { Runtime } from '@aws-sdk/client-lambda';
import { ServerSideEncryptionByDefault } from '@aws-sdk/client-s3';
import { UserPoolClientType } from '@aws-sdk/client-cognito-identity-provider';
// @public (undocumented)
export type AccessPatterns = {
auth?: Permission[];
guest?: Permission[];
groups?: Record<string, Permission[]>;
};
// @public (undocumented)
export type Attribute = 'address' | 'birthdate' | 'email' | 'familyName' | 'gender' | 'givenName' | 'locale' | 'middleName' | 'fullname' | 'nickname' | 'phoneNumber' | 'profilePicture' | 'preferredUsername' | 'profilePage' | 'timezone' | 'lastUpdateTime' | 'website';
// @public (undocumented)
export type AttributeMappingRule = Record<Attribute, string>;
// @public (undocumented)
export interface AuthDefinition {
// (undocumented)
customUserAttributes?: CustomAttributes;
// (undocumented)
groups?: Group[];
// (undocumented)
guestLogin?: boolean;
// (undocumented)
identityPoolName?: string;
// (undocumented)
lambdaTriggers?: Partial<AuthLambdaTriggers>;
// (undocumented)
loginOptions?: LoginOptions;
// (undocumented)
mfa?: MultifactorOptions;
// (undocumented)
oAuthFlows?: string[];
// (undocumented)
readAttributes?: string[];
// (undocumented)
referenceAuth?: ReferenceAuth;
// (undocumented)
standardUserAttributes?: StandardAttributes;
// (undocumented)
userPoolClient?: UserPoolClientType;
// (undocumented)
userPoolOverrides?: PolicyOverrides;
// (undocumented)
writeAttributes?: string[];
}
// @public (undocumented)
export type AuthLambdaTriggers = Record<AuthTriggerEvents, Lambda>;
// @public (undocumented)
export type AuthTriggerEvents = 'createAuthChallenge' | 'customMessage' | 'defineAuthChallenge' | 'postAuthentication' | 'postConfirmation' | 'preAuthentication' | 'preSignUp' | 'preTokenGeneration' | 'userMigration' | 'verifyAuthChallengeResponse';
// @public (undocumented)
export const createGen2Renderer: ({ outputDir, backendEnvironmentName, auth, storage, data, functions, unsupportedCategories, fileWriter, }: Readonly<Gen2RenderingOptions>) => Renderer;
// @public (undocumented)
export type CustomAttribute = {
readonly dataType: string | undefined;
readonly mutable?: boolean;
minLen?: number;
maxLen?: number;
min?: number;
max?: number;
};
// @public (undocumented)
export type CustomAttributes = Partial<Record<`custom:${string}`, CustomAttribute>>;
// @public (undocumented)
export type DataDefinition = {
tableMappings: Record<string, DataTableMapping | undefined>;
schema: string;
};
// @public (undocumented)
export type DataTableMapping = Record<string, string>;
// @public (undocumented)
export type EmailOptions = {
emailVerificationBody: string;
emailVerificationSubject: string;
};
// @public (undocumented)
export interface FunctionDefinition {
// (undocumented)
category?: string;
// (undocumented)
entry?: string;
// (undocumented)
environment?: EnvironmentResponse;
// (undocumented)
memoryMB?: number;
// (undocumented)
name?: string;
// (undocumented)
resourceName?: string;
// (undocumented)
runtime?: Runtime | string;
// (undocumented)
timeoutSeconds?: number;
}
// @public (undocumented)
export interface Gen2RenderingOptions {
// (undocumented)
appId?: string;
// (undocumented)
auth?: AuthDefinition;
// (undocumented)
backendEnvironmentName?: string | undefined;
// (undocumented)
data?: DataDefinition;
// (undocumented)
fileWriter?: (content: string, path: string) => Promise<void>;
// (undocumented)
functions?: FunctionDefinition[];
// (undocumented)
outputDir: string;
// (undocumented)
storage?: StorageRenderParameters;
// (undocumented)
unsupportedCategories?: Map<string, string>;
}
// @public (undocumented)
export type Group = string;
// @public (undocumented)
export type Lambda = {
source: string;
};
// @public (undocumented)
export type LoginOptions = {
email?: boolean;
phone?: boolean;
emailOptions?: Partial<EmailOptions>;
googleLogin?: boolean;
amazonLogin?: boolean;
appleLogin?: boolean;
facebookLogin?: boolean;
oidcLogin?: OidcOptions[];
samlLogin?: SamlOptions;
googleAttributes?: AttributeMappingRule;
amazonAttributes?: AttributeMappingRule;
appleAttributes?: AttributeMappingRule;
facebookAttributes?: AttributeMappingRule;
callbackURLs?: string[];
logoutURLs?: string[];
scopes?: Scope[];
[key: string]: boolean | Partial<EmailOptions> | string[] | Scope[] | OidcOptions[] | SamlOptions | AttributeMappingRule | undefined;
};
// @public (undocumented)
export type MetadataOptions = {
metadataContent: string;
metadataType: 'URL' | 'FILE';
};
// @public (undocumented)
export type MultifactorOptions = {
mode: UserPoolMfaConfig;
totp?: boolean;
sms?: boolean;
};
// @public (undocumented)
export type OidcEndPoints = {
authorization?: string;
token?: string;
userInfo?: string;
jwksUri?: string;
};
// @public (undocumented)
export type OidcOptions = {
issuerUrl: string;
name?: string;
endpoints?: OidcEndPoints;
attributeMapping?: AttributeMappingRule;
};
// @public (undocumented)
export type PasswordPolicyPath = `Policies.PasswordPolicy.${keyof PasswordPolicyType}`;
// @public (undocumented)
export type Permission = 'read' | 'write' | 'create' | 'delete';
// @public (undocumented)
export type PolicyOverrides = Partial<Record<PasswordPolicyPath | string, string | boolean | number | string[]>>;
// @public (undocumented)
export type ReferenceAuth = {
userPoolId?: string;
identityPoolId?: string;
authRoleArn?: string;
unauthRoleArn?: string;
userPoolClientId?: string;
groups?: Record<string, string>;
};
// @public (undocumented)
export interface Renderer {
// (undocumented)
render(): Promise<void>;
}
// @public (undocumented)
export type S3TriggerDefinition = Record<string, never>;
// @public (undocumented)
export type SamlOptions = {
name?: string;
metadata: MetadataOptions;
attributeMapping?: AttributeMappingRule;
};
// @public (undocumented)
export type Scope = 'PHONE' | 'EMAIL' | 'OPENID' | 'PROFILE' | 'COGNITO_ADMIN';
// @public (undocumented)
export type SendingAccount = 'COGNITO_DEFAULT' | 'DEVELOPER';
// @public (undocumented)
export type ServerSideEncryptionConfiguration = {
serverSideEncryptionByDefault: ServerSideEncryptionByDefault;
bucketKeyEnabled: boolean;
};
// @public (undocumented)
export type StandardAttribute = {
readonly mutable?: boolean;
readonly required?: boolean;
};
// @public (undocumented)
export type StandardAttributes = Partial<Record<Attribute, StandardAttribute>>;
// @public (undocumented)
export interface StorageRenderParameters {
// (undocumented)
accelerateConfiguration?: BucketAccelerateStatus;
// (undocumented)
accessPatterns?: AccessPatterns;
// (undocumented)
bucketEncryptionAlgorithm?: ServerSideEncryptionConfiguration;
// (undocumented)
bucketName?: string;
// (undocumented)
dynamoDB?: string;
// (undocumented)
lambdas?: S3TriggerDefinition[];
// (undocumented)
storageIdentifier?: string;
// (undocumented)
triggers?: Partial<Record<StorageTriggerEvent, Lambda>>;
// (undocumented)
versioningConfiguration?: BucketVersioningStatus;
}
// @public (undocumented)
export type StorageTriggerEvent = 'onDelete' | 'onUpload';
// @public (undocumented)
export type UserPoolMfaConfig = 'OFF' | 'REQUIRED' | 'OPTIONAL';
// (No @packageDocumentation comment for this package)