@altostra/core
Version:
Core library for shared types and logic
18 lines (17 loc) • 952 B
TypeScript
import type { NonEmptyString } from "../CustomTypes/NonEmptyString";
import type { CrossAccountInfo } from "./IntegrationAccounts";
export interface AwsAccount {
altostraAccountId: NonEmptyString;
integrationAccountId: NonEmptyString;
roleStatus: RoleStatus;
}
export declare type AwsAccountLike = {
[K in keyof AwsAccount]: string;
};
export declare function awsAccount(value: AwsAccountLike): AwsAccount;
export declare const roleStatusesSet: Set<string>;
export declare const isRoleStatus: import("@altostra/type-validations").TypeValidation<never>;
export declare const isAwsAccount: import("@altostra/type-validations").ObjectOfTypeValidation<AwsAccount>;
export declare type RoleStatus = 'Create' | 'Delete' | 'Pending' | 'Update';
export declare function roleStatus(value: unknown): RoleStatus;
export declare function fromCrossAccountInfo({ altostraAccountId, integrationAccountId, roleStatus, }: CrossAccountInfo): AwsAccount;