import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; // auth stuff export interface IdP { id: number; name: string; } export interface AuthInfo { idps: IdP[]; default: number; } export interface AllAuthInfo { idps: IdP[]; selected: IdP; } // user stuff export interface EntitlementNameSpace { name: string; } export interface VO { id: number; name: string; pretty_name: string; description: string; resourceType: string; name_space?: EntitlementNameSpace; } export interface Site { id: number; name: string; } export interface NewSSHKey { name: string; key: string; } export interface SSHKey { id: number; name: string; key: string; } export interface SSHKeyRef { id: number; name: string; } export interface Service { id: number; name: string; site: Site[]; description: string; vos: VO[]; } interface JSONObject { [key: string]: string; } export interface CredentialState { state: string; state_target: string; credential: SSHKeyRef; } // corresponds to NewDeploymentStateItem in the backend export interface DeploymentStateItem { id: number; service: Service | undefined; vo: VO | undefined; services: Service[]; site: Site; state: string; questionnaire: JSONObject; credentials: JSONObject; credential_states: CredentialState[]; message: string; } // corresponds to NewDeployment in the backend export interface Deployment { id: number; service: Service | undefined; vo: number | undefined; // the vo id services: Service[]; sites: Site[]; state_items: DeploymentStateItem[]; state: string state_target: string } export interface UserInfo { vos: string[]; } export interface User { id: number; profile_name: string; userinfo: UserInfo; ssh_keys: SSHKey[]; vos: VO[]; // these are additions here services: Service[]; deployments: Deployment[]; error?: string; } export interface UserState { deployments: Deployment[]; //deployment_state_items: DeploymentStateItem[]; } export interface State { user: User; error?: string; } export interface Update { deployment?: Deployment; error?: string; } @NgModule({ imports: [ CommonModule ], declarations: [ ] }) export class TypesModule { }