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 Group { id: number; name: string; } 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; sites: Site[]; groups: Group[]; } interface JSONObject { [key: string]: string; } export interface DeploymentStateItem { id: number; site: Site; state: string; questionnaire: JSONObject; credentials: JSONObject; key: SSHKeyRef; service: Service; } export interface DeploymentState { id: number; service: Service; key: SSHKeyRef; state_items: DeploymentStateItem[]; } export interface Deployment { id: number; service: Service; services: Service[]; group: number; // the group id ssh_keys: SSHKeyRef[]; states: DeploymentState[]; } export interface User { profile_name: string; userinfo: any; ssh_keys: SSHKey[]; services: Service[]; id: number; groups: Group[]; } export interface UserState { deployments: Deployment[]; deployment_states: DeploymentState[]; deployment_state_items: DeploymentStateItem[]; } export interface StateAPIResult { user: User; user_state: UserState; services: Service[]; error?: string; } @NgModule({ imports: [ CommonModule ], declarations: [ ] }) export class TypesModule { }