export type FileConfigPath = FileConfig & FileConfigWithPaths ; export interface FileConfigWithPaths { /** absolute path to all files referenced */ files : string [ ] ; } export function isFileConfigPath ( r ) { return Array . isArray ( r [ 'files' ] ) ; } export type FileConfig = FileConfigLocal | FileConfigS3 | FileConfigS3Role ; export interface FileConfigLocal { /** Absolute folder or file path */ path : string ; type : 'local' ; } export interface FileConfigS3 { example path : string ; type : 's3' ; } export interface FileConfigS3Role extends FileConfigS3 { /** AWS Role ARN to use to access the related S3 Bucket */ roleArn : string ; /** Optional AWS externalId if needed */ externalId ? : string ; } export function isConfigS3Role ( r ? ) { if ( r == null ) return false ; if ( typeof r === 'string' ) return false ; return 'roleArn' in r && typeof r . roleArn === 'string' ; }