blob: a31c31f4cc154f36a0979748c4076fba6133280a [file] [log] [blame]
Michael Landodd603392017-07-12 00:54:52 +03001/*-
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
Idan Amit2c285722017-12-29 09:40:43 +020010 *
Michael Landodd603392017-07-12 00:54:52 +030011 * http://www.apache.org/licenses/LICENSE-2.0
Idan Amit2c285722017-12-29 09:40:43 +020012 *
Michael Landodd603392017-07-12 00:54:52 +030013 * 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
Michael Landoed64b5e2017-06-09 03:19:04 +030021'use strict';
ys969316a9fce2020-01-19 13:50:02 +020022// tslint:disable-next-line:interface-name
Michael Landoed64b5e2017-06-09 03:19:04 +030023export interface IApi {
ys969316a9fce2020-01-19 13:50:02 +020024 baseUrl: string;
Michael Landoed64b5e2017-06-09 03:19:04 +030025
ys969316a9fce2020-01-19 13:50:02 +020026 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;
Michael Landoed64b5e2017-06-09 03:19:04 +030035 POST_create_user;
36 DELETE_delete_user;
37 POST_edit_user_role;
ys969316a9fce2020-01-19 13:50:02 +020038 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;
Michael Landoed64b5e2017-06-09 03:19:04 +030091}
92
ys969316a9fce2020-01-19 13:50:02 +020093// tslint:disable-next-line:interface-name
Michael Landoed64b5e2017-06-09 03:19:04 +030094export interface ILogConfig {
ys969316a9fce2020-01-19 13:50:02 +020095 minLogLevel: string;
96 prefix: string;
Michael Landoed64b5e2017-06-09 03:19:04 +030097}
98
ys969316a9fce2020-01-19 13:50:02 +020099// tslint:disable-next-line:interface-name
Michael Landoed64b5e2017-06-09 03:19:04 +0300100export interface ICookie {
ys969316a9fce2020-01-19 13:50:02 +0200101 junctionName: string;
102 prefix: string;
103 userIdSuffix: string;
104 userFirstName: string;
105 userLastName: string;
106 userEmail: string;
Michael Landoed64b5e2017-06-09 03:19:04 +0300107}
108
ys969316a9fce2020-01-19 13:50:02 +0200109// tslint:disable-next-line:interface-name
Michael Landoed64b5e2017-06-09 03:19:04 +0300110export interface IConfigStatuses {
ys969316a9fce2020-01-19 13:50:02 +0200111 inDesign: IConfigStatus;
112 certified: IConfigStatus;
113 distributed: IConfigStatus;
Michael Landoed64b5e2017-06-09 03:19:04 +0300114}
115
ys969316a9fce2020-01-19 13:50:02 +0200116// tslint:disable-next-line:interface-name
Michael Landoed64b5e2017-06-09 03:19:04 +0300117export interface IConfigStatus {
ys969316a9fce2020-01-19 13:50:02 +0200118 name: string;
119 values: string[];
Michael Landoed64b5e2017-06-09 03:19:04 +0300120}
121
ys969316a9fce2020-01-19 13:50:02 +0200122// tslint:disable-next-line:interface-name
Michael Landoed64b5e2017-06-09 03:19:04 +0300123export interface IConfigRoles {
ys969316a9fce2020-01-19 13:50:02 +0200124 ADMIN: IConfigRole;
125 DESIGNER: IConfigRole;
Michael Landoed64b5e2017-06-09 03:19:04 +0300126}
127
ys969316a9fce2020-01-19 13:50:02 +0200128// tslint:disable-next-line:interface-name
Michael Landoed64b5e2017-06-09 03:19:04 +0300129export interface IConfigRole {
ys969316a9fce2020-01-19 13:50:02 +0200130 changeLifecycleStateButtons: any;
Michael Landoed64b5e2017-06-09 03:19:04 +0300131}
132
ys969316a9fce2020-01-19 13:50:02 +0200133// tslint:disable-next-line:interface-name
Michael Landoed64b5e2017-06-09 03:19:04 +0300134export interface IConfirmationMessage {
ys969316a9fce2020-01-19 13:50:02 +0200135 showComment: boolean;
136 title: string;
137 message: string;
Michael Landoed64b5e2017-06-09 03:19:04 +0300138}
139
ys969316a9fce2020-01-19 13:50:02 +0200140// tslint:disable-next-line:interface-name
Michael Landoed64b5e2017-06-09 03:19:04 +0300141export interface IConfirmationMessages {
ys969316a9fce2020-01-19 13:50:02 +0200142 checkin: IConfirmationMessage;
143 checkout: IConfirmationMessage;
144 certify: IConfirmationMessage;
145 failCertification: IConfirmationMessage;
146 certificationRequest: IConfirmationMessage;
147 approve: IConfirmationMessage;
148 reject: IConfirmationMessage;
Michael Landoed64b5e2017-06-09 03:19:04 +0300149}
150
ys969316a9fce2020-01-19 13:50:02 +0200151// tslint:disable-next-line:interface-name
Michael Landoed64b5e2017-06-09 03:19:04 +0300152export interface IAlertMessage {
ys969316a9fce2020-01-19 13:50:02 +0200153 title: string;
154 message: string;
Michael Landoed64b5e2017-06-09 03:19:04 +0300155}
156
ys969316a9fce2020-01-19 13:50:02 +0200157// tslint:disable-next-line:interface-name
Michael Landoed64b5e2017-06-09 03:19:04 +0300158export interface IAlertMessages {
ys969316a9fce2020-01-19 13:50:02 +0200159 deleteInstance: IAlertMessage;
160 exitWithoutSaving: IConfirmationMessage;
161 okButton: string;
Michael Landoed64b5e2017-06-09 03:19:04 +0300162}
163
164class ConfigMenuItem {
ys969316a9fce2020-01-19 13:50:02 +0200165 text: string;
166 action: string;
167 url: string;
168 disable = false;
Michael Landoed64b5e2017-06-09 03:19:04 +0300169}
170
ys969316a9fce2020-01-19 13:50:02 +0200171// tslint:disable-next-line:interface-name
Michael Landoed64b5e2017-06-09 03:19:04 +0300172export interface IAppConfigurtaion {
ys969316a9fce2020-01-19 13:50:02 +0200173 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;
Michael Landoed64b5e2017-06-09 03:19:04 +0300189}
190
ys969316a9fce2020-01-19 13:50:02 +0200191// tslint:disable-next-line:interface-name
Michael Landoed64b5e2017-06-09 03:19:04 +0300192export interface IResourceTypesFilter {
ys969316a9fce2020-01-19 13:50:02 +0200193 resource: string[];
Michael Landoed64b5e2017-06-09 03:19:04 +0300194}
195
ys969316a9fce2020-01-19 13:50:02 +0200196// tslint:disable-next-line:interface-name
Michael Landoed64b5e2017-06-09 03:19:04 +0300197export interface IHostedApplication {
ys969316a9fce2020-01-19 13:50:02 +0200198 moduleName: string;
199 navTitle: string;
200 defaultState: string;
201 exists?: boolean;
202 state: IHostedApplicationState;
Michael Landoed64b5e2017-06-09 03:19:04 +0300203}
204
ys969316a9fce2020-01-19 13:50:02 +0200205// tslint:disable-next-line:interface-name
Michael Landoed64b5e2017-06-09 03:19:04 +0300206export interface IHostedApplicationState {
ys969316a9fce2020-01-19 13:50:02 +0200207 name: string;
208 url: string;
209 relativeHtmlPath: string;
210 controllerName: string;
Michael Landoed64b5e2017-06-09 03:19:04 +0300211}
212
ys969316a9fce2020-01-19 13:50:02 +0200213// tslint:disable-next-line:interface-name
Michael Landoed64b5e2017-06-09 03:19:04 +0300214export interface ITester {
ys969316a9fce2020-01-19 13:50:02 +0200215 email: string;
Michael Landoed64b5e2017-06-09 03:19:04 +0300216}
217
ys969316a9fce2020-01-19 13:50:02 +0200218// tslint:disable-next-line:interface-name
Michael Landoed64b5e2017-06-09 03:19:04 +0300219export interface IAppMenu {
ys969316a9fce2020-01-19 13:50:02 +0200220 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;
Michael Landoed64b5e2017-06-09 03:19:04 +0300232}