summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/models/app-config.ts
blob: ef6c19573149f0fa59a756ee3e4ced5774431f94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
/*-
 * ============LICENSE_START=======================================================
 * SDC
 * ================================================================================
 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
 * ================================================================================
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * ============LICENSE_END=========================================================
 */

'use strict';
export interface IApi {
    baseUrl:string;

    //***** NEW API *******//
    GET_component:string;
    PUT_component:string;
    GET_component_validate_name:string;
    POST_changeLifecycleState:string;
    component_api_root:string;
    //*********//

    GET_user:string;
    GET_user_authorize:string;
    GET_all_users:string;
    POST_create_user;
    DELETE_delete_user;
    POST_edit_user_role;
    GET_resource:string;
    GET_resources_latestversion_notabstract:string;
    GET_resources_certified_not_abstract:string;
    GET_resources_certified_abstract:string;
    PUT_resource:string;
    GET_resource_property:string;
    GET_resource_artifact:string;
    GET_download_instance_artifact:string;
    POST_instance_artifact:string;
    GET_resource_additional_information:string;
    GET_service_artifact:string;
    GET_resource_interface_artifact:string;
    GET_resource_api_artifact:string;
    GET_resource_validate_name:string;
    GET_resource_artifact_types:string;
    GET_activity_log:string;
    GET_configuration_ui:string;
    GET_service:string;
    PUT_product:string;
    GET_product:string;
    GET_ecomp_menu_items:string;
    GET_product_validate_name:string;
    GET_service_validate_name:string;
    GET_service_distributions:string;
    GET_service_distributions_components:string;
    POST_service_distribution_deploy:string;
    GET_element:string;
    GET_catalog:string;
    GET_resource_category:string;
    GET_service_category:string;
    resource_instance:string;
    GET_resource_instance_property:string;
    GET_relationship:string;
    GET_lifecycle_state_resource:string;
    GET_lifecycle_state_CHECKIN:string;
    GET_lifecycle_state_CERTIFICATIONREQUEST:string;
    GET_lifecycle_state_UNDOCHECKOUT:string;
    root:string;
    PUT_service:string;
    GET_download_artifact:string;
    GET_SDC_Version:string;
    GET_categories:string;
    POST_category:string;
    POST_subcategory:string;
    POST_change_instance_version:string;
    GET_requirements_capabilities:string;
    GET_onboarding:string;
    GET_component_from_csar_uuid:string;
    kibana:string;

    //Added by Ikram -- starts
    GET_product_category:string;
    GET_product_category_temp:string;
    GET_product_sub_category:string;
    //Added by Ikram -- ends

}

export interface ILogConfig {
    minLogLevel:string;
    prefix:string;
}

export interface ICookie {
    junctionName:string;
    prefix:string;
    userIdSuffix:string;
    userFirstName:string;
    userLastName:string;
    userEmail:string;
}
export interface IUserTypes {
    admin:any;
    designer:any;
    tester:any;
}

export interface IConfigStatuses {
    inDesign:IConfigStatus;
    readyForCertification:IConfigStatus;
    inCertification:IConfigStatus;
    certified:IConfigStatus;
    distributed:IConfigStatus;
}

export interface IConfigStatus {
    name:string;
    values:Array<string>;
}

export interface IConfigRoles {
    ADMIN:IConfigRole;
    DESIGNER:IConfigRole;
    TESTER:IConfigRole;
    OPS:IConfigRole;
    GOVERNOR:IConfigRole;
    PRODUCT_MANAGER:IConfigRole;
    PRODUCT_STRATEGIST:IConfigRole;
}

export interface IConfigRole {
    pages:Array<string>;
    states:IConfigState;
}

export interface IConfigState {
    NOT_CERTIFIED_CHECKOUT:Array<IConfigDistribution>;
    NOT_CERTIFIED_CHECKIN:Array<IConfigDistribution>;
    READY_FOR_CERTIFICATION:Array<IConfigDistribution>;
    CERTIFICATION_IN_PROGRESS:Array<IConfigDistribution>;
    CERTIFIED:Array<IConfigDistribution>;
}

export interface IConfigDistribution {
    DISTRIBUTION_NOT_APPROVED:Array<ConfigMenuItem>;
    DISTRIBUTION_APPROVED:Array<ConfigMenuItem>;
    DISTRIBUTED:Array<ConfigMenuItem>;
    DISTRIBUTION_REJECTED:Array<ConfigMenuItem>;
}

export interface IConfirmationMessage {
    showComment:boolean;
    title:string;
    message:string;
}

export interface IConfirmationMessages {
    checkin:IConfirmationMessage;
    checkout:IConfirmationMessage;
    certify:IConfirmationMessage;
    failCertification:IConfirmationMessage;
    certificationRequest:IConfirmationMessage;
    approve:IConfirmationMessage;
    reject:IConfirmationMessage;
}

export interface IAlertMessage {
    title:string;
    message:string;
}

export interface IAlertMessages {
    deleteInstance:IAlertMessage;
    exitWithoutSaving:IConfirmationMessage;
}

class ConfigMenuItem {
    text:string;
    action:string;
    url:string;
    disable:boolean = false;
}

export interface IAppConfigurtaion {
    environment:string;
    api:IApi;
    hostedApplications:Array<IHostedApplication>;
    resourceTypesFilter:IResourceTypesFilter;
    logConfig:ILogConfig;
    cookie:ICookie;
    imagesPath:string;
    toscaFileExtension:string;
    csarFileExtension:string;
    testers:Array<ITester>
    tutorial:any;
    roles:Array<string>;
    cpEndPointInstances:Array<string>;
    openSource:boolean;
    showOutlook:boolean;
    validationConfigPath:string;
}

export interface IResourceTypesFilter {
    resource:Array<string>;
}

export interface IHostedApplication {
    moduleName:string;
    navTitle:string;
    defaultState:string;
    exists?:boolean;
    state:IHostedApplicationState;
}

export interface IHostedApplicationState {
    name:string;
    url:string;
    relativeHtmlPath:string;
    controllerName:string;
}

export interface ITester {
    email:string;
}

export interface IAppMenu {
    roles:IConfigRoles;
    confirmationMessages:IConfirmationMessages;
    alertMessages:IAlertMessages;
    statuses:IConfigStatuses;
    catalogMenuItem:any;
    categoriesDictionary:any;
    canvas_buttons:Object;
    component_workspace_menu_option:any;
    LifeCycleStatuses:any;
    DistributionStatuses:any;
    ChangeLifecycleStateButton:any;
}