Catalog alignment
[sdc.git] / catalog-ui / src / app / models / app-config.ts
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 'use strict';
22 // tslint:disable-next-line:interface-name
23 export interface IApi {
24     baseUrl: string;
25
26     GET_SDC_Setup_Data: string;
27     GET_component: string;
28     PUT_component: string;
29     GET_component_validate_name: string;
30     POST_changeLifecycleState: string;
31     component_api_root: string;
32     GET_user: string;
33     GET_user_authorize: string;
34     GET_all_users: string;
35     POST_create_user;
36     DELETE_delete_user;
37     POST_edit_user_role;
38     GET_resource: string;
39     GET_resources_latestversion_notabstract: string;
40     GET_resources_certified_not_abstract: string;
41     GET_resources_certified_abstract: string;
42     PUT_resource: string;
43     GET_resource_property: string;
44     GET_resource_artifact: string;
45     GET_download_instance_artifact: string;
46     POST_instance_artifact: string;
47     GET_resource_additional_information: string;
48     GET_service_artifact: string;
49     GET_resource_interface_artifact: string;
50     GET_resource_api_artifact: string;
51     GET_resource_validate_name: string;
52     GET_resource_artifact_types: string;
53     GET_activity_log: string;
54     GET_configuration_ui: string;
55     GET_plugins_configuration: string;
56     GET_plugin_online_state: string;
57     GET_service: string;
58     GET_ecomp_menu_items: string;
59     GET_service_validate_name: string;
60     GET_service_distributions: string;
61     GET_service_distributions_components: string;
62     POST_service_distribution_deploy: string;
63     GET_element: string;
64     GET_catalog: string;
65     GET_resource_category: string;
66     GET_service_category: string;
67     resource_instance: string;
68     GET_resource_instance_property: string;
69     GET_relationship: string;
70     GET_lifecycle_state_resource: string;
71     GET_lifecycle_state_CHECKIN: string;
72     GET_lifecycle_state_UNDOCHECKOUT: string;
73     root: string;
74     no_proxy_root: string;
75     PUT_service: string;
76     GET_download_artifact: string;
77     GET_SDC_Version: string;
78     GET_categories: string;
79     POST_category: string;
80     POST_subcategory: string;
81     POST_change_instance_version: string;
82     GET_requirements_capabilities: string;
83     GET_onboarding: string;
84     GET_component_from_csar_uuid: string;
85     POST_GAB_Search: string;
86     kibana: string;
87     services_api_root: string;
88     uicache_root: string;
89     GET_uicache_catalog: string;
90     GET_uicache_left_palette: string;
91 }
92
93 // tslint:disable-next-line:interface-name
94 export interface ILogConfig {
95     minLogLevel: string;
96     prefix: string;
97 }
98
99 // tslint:disable-next-line:interface-name
100 export interface ICookie {
101     junctionName: string;
102     prefix: string;
103     userIdSuffix: string;
104     userFirstName: string;
105     userLastName: string;
106     userEmail: string;
107 }
108
109 // tslint:disable-next-line:interface-name
110 export interface IConfigStatuses {
111     inDesign: IConfigStatus;
112     certified: IConfigStatus;
113     distributed: IConfigStatus;
114 }
115
116 // tslint:disable-next-line:interface-name
117 export interface IConfigStatus {
118     name: string;
119     values: string[];
120 }
121
122 // tslint:disable-next-line:interface-name
123 export interface IConfigRoles {
124     ADMIN: IConfigRole;
125     DESIGNER: IConfigRole;
126 }
127
128 // tslint:disable-next-line:interface-name
129 export interface IConfigRole {
130     changeLifecycleStateButtons: any;
131 }
132
133 // tslint:disable-next-line:interface-name
134 export interface IConfirmationMessage {
135     showComment: boolean;
136     title: string;
137     message: string;
138 }
139
140 // tslint:disable-next-line:interface-name
141 export interface IConfirmationMessages {
142     checkin: IConfirmationMessage;
143     checkout: IConfirmationMessage;
144     certify: IConfirmationMessage;
145     failCertification: IConfirmationMessage;
146     certificationRequest: IConfirmationMessage;
147     approve: IConfirmationMessage;
148     reject: IConfirmationMessage;
149 }
150
151 // tslint:disable-next-line:interface-name
152 export interface IAlertMessage {
153     title: string;
154     message: string;
155 }
156
157 // tslint:disable-next-line:interface-name
158 export interface IAlertMessages {
159     deleteInstance: IAlertMessage;
160     exitWithoutSaving: IConfirmationMessage;
161     okButton: string;
162 }
163
164 class ConfigMenuItem {
165     text: string;
166     action: string;
167     url: string;
168     disable = false;
169 }
170
171 // tslint:disable-next-line:interface-name
172 export interface IAppConfigurtaion {
173     environment: string;
174     api: IApi;
175     hostedApplications: IHostedApplication[];
176     resourceTypesFilter: IResourceTypesFilter;
177     logConfig: ILogConfig;
178     cookie: ICookie;
179     imagesPath: string;
180     toscaFileExtension: string;
181     csarFileExtension: string;
182     testers: ITester[];
183     tutorial: any;
184     roles: string[];
185     cpEndPointInstances: string[];
186     openSource: boolean;
187     showOutlook: boolean;
188     validationConfigPath: string;
189 }
190
191 // tslint:disable-next-line:interface-name
192 export interface IResourceTypesFilter {
193     resource: string[];
194 }
195
196 // tslint:disable-next-line:interface-name
197 export interface IHostedApplication {
198     moduleName: string;
199     navTitle: string;
200     defaultState: string;
201     exists?: boolean;
202     state: IHostedApplicationState;
203 }
204
205 // tslint:disable-next-line:interface-name
206 export interface IHostedApplicationState {
207     name: string;
208     url: string;
209     relativeHtmlPath: string;
210     controllerName: string;
211 }
212
213 // tslint:disable-next-line:interface-name
214 export interface ITester {
215     email: string;
216 }
217
218 // tslint:disable-next-line:interface-name
219 export interface IAppMenu {
220     roles: IConfigRoles;
221     confirmationMessages: IConfirmationMessages;
222     alertMessages: IAlertMessages;
223     statuses: IConfigStatuses;
224     catalogMenuItem: any;
225     categoriesDictionary: any;
226     // tslint:disable-next-line:ban-types
227     canvas_buttons: Object;
228     component_workspace_menu_option: any;
229     LifeCycleStatuses: any;
230     DistributionStatuses: any;
231     ChangeLifecycleStateButton: any;
232 }