UNPKG

@altostra/core

Version:

Core library for shared types and logic

26 lines (25 loc) 1.72 kB
import type { NonEmptyString } from "../../../common/CustomTypes/NonEmptyString"; import type { ObjectValidations } from '@altostra/type-validations'; import type { CognitoUserPoolType } from "../CognitoUserPool"; import type { ResourceBase } from "../Common"; import type { EventBusType } from "../EventBridge"; import type { FileStoreType } from "../FileStore"; import type { ManagedKeyType } from "../ManagedKey"; import type { QueueType } from "../MessageQueue"; import type { NotificationTopicType } from "../NotificationTopic"; import type { OpenSearchResourceType } from "../OpenSearch"; import type { TableType } from "../Table"; import type { ExternalRelationalDatabaseType, ExternalRelationalDbResourceType } from "./ExternalDataBase"; import type { ExternalDynamoDBTableType } from "./ExternalDynamoTable"; import type { ExternalSimpleType } from "./SimpleExternalResource"; export declare type ExternalResourceType = 'resource.external'; export declare type ExternalType = ExternalDynamoDBTableType | ExternalRelationalDatabaseType | ExternalSimpleType; export declare type ExternalResourceInnerType = ExternalRelationalDbResourceType | ExternalResourceResourceType | TableType; export interface ExternalResourceBase extends ResourceBase { type: ExternalResourceType; externalResourceType: string; identifier: NonEmptyString; } export declare const externalResourceBaseValidations: ObjectValidations<ExternalResourceBase>; export declare type ExternalResourceResourceType = CognitoUserPoolType | EventBusType | FileStoreType | ManagedKeyType | NotificationTopicType | OpenSearchResourceType | QueueType; export declare const externalTypeByResource: Record<ExternalResourceInnerType, ExternalType>;