types.module.ts 1.6 KB
Newer Older
1
2
3
4
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';


Lukas Burgey's avatar
Lukas Burgey committed
5
// auth stuff
6
7
export interface IdP {
  id: number;
8
9
10
11
12
13
14
15
  name: string;
}

export interface AuthInfo {
  idps: IdP[];
  default: number;
}

16
17
18
19
20
export interface AllAuthInfo {
  idps: IdP[];
  selected: IdP;
}

Lukas Burgey's avatar
Lukas Burgey committed
21
22
23
24
25
26
27
// user stuff
export interface Group {
  name: string;
}

export interface Site {
  id: number;
28
29
30
  name: string;
}

31
32
33
34
35
36
37
export interface NewSSHKey {
  name: string;
  key: string;
}

export interface SSHKey {
  id: number;
38
39
40
41
  name: string;
  key: string;
}

Lukas Burgey's avatar
Lukas Burgey committed
42
43
44
45
46
export interface SSHKeyRef {
  id: number;
  name: string;
}

47
export interface Service {
48
  id: number;
49
  name: string;
Lukas Burgey's avatar
Lukas Burgey committed
50
51
  sites: Site[];
  group: Group[];
52
53
}

Lukas Burgey's avatar
Lukas Burgey committed
54
55
56
57
58
59
60
export interface DeploymentStateItem {
  id: number;
  site: Site;
  state: string;
  questionnaire: any;
  credentials: any;
  key: SSHKeyRef;
61
  service: Service;
Lukas Burgey's avatar
Lukas Burgey committed
62
63
64
65
}
export interface DeploymentState {
  id: number;
  service: Service;
Lukas Burgey's avatar
Lukas Burgey committed
66
  key: SSHKeyRef;
Lukas Burgey's avatar
Lukas Burgey committed
67
68
69
  state_items: DeploymentStateItem[];
}
export interface Deployment {
Lukas Burgey's avatar
Lukas Burgey committed
70
  id: number;
Lukas Burgey's avatar
Lukas Burgey committed
71
72
73
74
  service: Service;
  ssh_keys: SSHKeyRef[];
  ssh_keys_to_withdraw: SSHKeyRef[];
  states: DeploymentState[];
75
76
77
78
79
80
}

export interface User {
  email: string;
  userinfo: any;
  ssh_keys: SSHKey[];
Lukas Burgey's avatar
Lukas Burgey committed
81
  services: Service[];
82
  id: number;
83
84
}

Lukas Burgey's avatar
Lukas Burgey committed
85
86
87
88
export interface UserState {
  deployments: Deployment[];
  deployment_states: DeploymentState[];
  deployment_state_items: DeploymentStateItem[];
89
90
}

Lukas Burgey's avatar
Lukas Burgey committed
91
export interface StateAPIResult {
92
  user: User;
Lukas Burgey's avatar
Lukas Burgey committed
93
94
95
  user_state: UserState;
  services: Service[];
  error: string;
96
97
98
99
100
101
102
103
104
105
106
}


@NgModule({
  imports: [
    CommonModule
  ],
  declarations: [
  ]
})
export class TypesModule { }