blob: 0e6284c669613b4eeae56abb0ca80b0f1d8d68d8 [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';
22export interface IApi {
23 baseUrl:string;
24
25 //***** NEW API *******//
26 GET_component:string;
27 PUT_component:string;
28 GET_component_validate_name:string;
29 POST_changeLifecycleState:string;
30 component_api_root:string;
31 //*********//
32
33 GET_user:string;
34 GET_user_authorize:string;
35 GET_all_users:string;
36 POST_create_user;
37 DELETE_delete_user;
38 POST_edit_user_role;
39 GET_resource:string;
40 GET_resources_latestversion_notabstract:string;
41 GET_resources_certified_not_abstract:string;
42 GET_resources_certified_abstract:string;
43 PUT_resource:string;
44 GET_resource_property:string;
45 GET_resource_artifact:string;
46 GET_download_instance_artifact:string;
47 POST_instance_artifact:string;
48 GET_resource_additional_information:string;
49 GET_service_artifact:string;
50 GET_resource_interface_artifact:string;
51 GET_resource_api_artifact:string;
52 GET_resource_validate_name:string;
53 GET_resource_artifact_types:string;
54 GET_activity_log:string;
55 GET_configuration_ui:string;
Idan Amiteedaaf92018-01-31 13:27:33 +020056 GET_plugins_configuration:string;
Idan Amit3504f842018-10-09 18:45:52 +030057 GET_plugin_online_state:string;
Michael Landoed64b5e2017-06-09 03:19:04 +030058 GET_service:string;
Michael Landoed64b5e2017-06-09 03:19:04 +030059 GET_ecomp_menu_items:string;
Michael Landoed64b5e2017-06-09 03:19:04 +030060 GET_service_validate_name:string;
61 GET_service_distributions:string;
62 GET_service_distributions_components:string;
63 POST_service_distribution_deploy:string;
64 GET_element:string;
65 GET_catalog:string;
66 GET_resource_category:string;
67 GET_service_category:string;
68 resource_instance:string;
69 GET_resource_instance_property:string;
70 GET_relationship:string;
71 GET_lifecycle_state_resource:string;
72 GET_lifecycle_state_CHECKIN:string;
73 GET_lifecycle_state_CERTIFICATIONREQUEST:string;
74 GET_lifecycle_state_UNDOCHECKOUT:string;
75 root:string;
Idan Amit2c285722017-12-29 09:40:43 +020076 no_proxy_root:string;
Michael Landoed64b5e2017-06-09 03:19:04 +030077 PUT_service:string;
78 GET_download_artifact:string;
79 GET_SDC_Version:string;
80 GET_categories:string;
81 POST_category:string;
82 POST_subcategory:string;
83 POST_change_instance_version:string;
84 GET_requirements_capabilities:string;
85 GET_onboarding:string;
86 GET_component_from_csar_uuid:string;
87 kibana:string;
Michael Landoa5445102018-03-04 14:53:33 +020088 services_api_root:string;
Michael Landoed64b5e2017-06-09 03:19:04 +030089}
90
91export interface ILogConfig {
92 minLogLevel:string;
93 prefix:string;
94}
95
96export interface ICookie {
97 junctionName:string;
98 prefix:string;
99 userIdSuffix:string;
100 userFirstName:string;
101 userLastName:string;
102 userEmail:string;
103}
104export interface IUserTypes {
105 admin:any;
106 designer:any;
107 tester:any;
108}
109
110export interface IConfigStatuses {
111 inDesign:IConfigStatus;
112 readyForCertification:IConfigStatus;
113 inCertification:IConfigStatus;
114 certified:IConfigStatus;
115 distributed:IConfigStatus;
116}
117
118export interface IConfigStatus {
119 name:string;
120 values:Array<string>;
121}
122
123export interface IConfigRoles {
124 ADMIN:IConfigRole;
125 DESIGNER:IConfigRole;
126 TESTER:IConfigRole;
127 OPS:IConfigRole;
128 GOVERNOR:IConfigRole;
Michael Landoed64b5e2017-06-09 03:19:04 +0300129}
130
131export interface IConfigRole {
Michael Lando5b593492018-07-29 16:13:45 +0300132 changeLifecycleStateButtons:any;
Michael Landoed64b5e2017-06-09 03:19:04 +0300133}
134
135export interface IConfigState {
136 NOT_CERTIFIED_CHECKOUT:Array<IConfigDistribution>;
137 NOT_CERTIFIED_CHECKIN:Array<IConfigDistribution>;
138 READY_FOR_CERTIFICATION:Array<IConfigDistribution>;
139 CERTIFICATION_IN_PROGRESS:Array<IConfigDistribution>;
140 CERTIFIED:Array<IConfigDistribution>;
141}
142
143export interface IConfigDistribution {
144 DISTRIBUTION_NOT_APPROVED:Array<ConfigMenuItem>;
145 DISTRIBUTION_APPROVED:Array<ConfigMenuItem>;
146 DISTRIBUTED:Array<ConfigMenuItem>;
147 DISTRIBUTION_REJECTED:Array<ConfigMenuItem>;
148}
149
150export interface IConfirmationMessage {
151 showComment:boolean;
152 title:string;
153 message:string;
154}
155
156export interface IConfirmationMessages {
157 checkin:IConfirmationMessage;
158 checkout:IConfirmationMessage;
159 certify:IConfirmationMessage;
160 failCertification:IConfirmationMessage;
161 certificationRequest:IConfirmationMessage;
162 approve:IConfirmationMessage;
163 reject:IConfirmationMessage;
164}
165
166export interface IAlertMessage {
167 title:string;
168 message:string;
169}
170
171export interface IAlertMessages {
172 deleteInstance:IAlertMessage;
173 exitWithoutSaving:IConfirmationMessage;
174}
175
176class ConfigMenuItem {
177 text:string;
178 action:string;
179 url:string;
180 disable:boolean = false;
181}
182
183export interface IAppConfigurtaion {
184 environment:string;
185 api:IApi;
186 hostedApplications:Array<IHostedApplication>;
187 resourceTypesFilter:IResourceTypesFilter;
188 logConfig:ILogConfig;
189 cookie:ICookie;
190 imagesPath:string;
191 toscaFileExtension:string;
192 csarFileExtension:string;
193 testers:Array<ITester>
194 tutorial:any;
195 roles:Array<string>;
196 cpEndPointInstances:Array<string>;
197 openSource:boolean;
198 showOutlook:boolean;
199 validationConfigPath:string;
200}
201
202export interface IResourceTypesFilter {
203 resource:Array<string>;
204}
205
206export interface IHostedApplication {
207 moduleName:string;
208 navTitle:string;
209 defaultState:string;
210 exists?:boolean;
211 state:IHostedApplicationState;
212}
213
214export interface IHostedApplicationState {
215 name:string;
216 url:string;
217 relativeHtmlPath:string;
218 controllerName:string;
219}
220
221export interface ITester {
222 email:string;
223}
224
Michael Lando5b593492018-07-29 16:13:45 +0300225export interface IComponentType {
226 RESOURCE:any;
227 SERVICE:any;
228}
229
Michael Landoed64b5e2017-06-09 03:19:04 +0300230export interface IAppMenu {
231 roles:IConfigRoles;
232 confirmationMessages:IConfirmationMessages;
233 alertMessages:IAlertMessages;
234 statuses:IConfigStatuses;
235 catalogMenuItem:any;
236 categoriesDictionary:any;
237 canvas_buttons:Object;
238 component_workspace_menu_option:any;
239 LifeCycleStatuses:any;
240 DistributionStatuses:any;
241 ChangeLifecycleStateButton:any;
242}