blob: 4754cbaa01e7041a7edcaddd4ffe653e5e0f08a8 [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.
Piotr Darosz2c25cba2019-03-27 15:25:50 +01006 * Modifications Copyright (C) 2019 Nokia. All rights reserved.
Michael Landodd603392017-07-12 00:54:52 +03007 * ================================================================================
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
Idan Amit2c285722017-12-29 09:40:43 +020011 *
Michael Landodd603392017-07-12 00:54:52 +030012 * http://www.apache.org/licenses/LICENSE-2.0
Idan Amit2c285722017-12-29 09:40:43 +020013 *
Michael Landodd603392017-07-12 00:54:52 +030014 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 * ============LICENSE_END=========================================================
20 */
21
Michael Landoed64b5e2017-06-09 03:19:04 +030022'use strict';
23export interface IApi {
24 baseUrl:string;
25
26 //***** NEW API *******//
27 GET_component:string;
28 PUT_component:string;
29 GET_component_validate_name:string;
30 POST_changeLifecycleState:string;
31 component_api_root:string;
32 //*********//
33
34 GET_user:string;
35 GET_user_authorize:string;
36 GET_all_users:string;
37 POST_create_user;
38 DELETE_delete_user;
39 POST_edit_user_role;
40 GET_resource:string;
41 GET_resources_latestversion_notabstract:string;
42 GET_resources_certified_not_abstract:string;
43 GET_resources_certified_abstract:string;
44 PUT_resource:string;
45 GET_resource_property:string;
46 GET_resource_artifact:string;
47 GET_download_instance_artifact:string;
48 POST_instance_artifact:string;
49 GET_resource_additional_information:string;
50 GET_service_artifact:string;
51 GET_resource_interface_artifact:string;
52 GET_resource_api_artifact:string;
53 GET_resource_validate_name:string;
54 GET_resource_artifact_types:string;
55 GET_activity_log:string;
56 GET_configuration_ui:string;
Idan Amiteedaaf92018-01-31 13:27:33 +020057 GET_plugins_configuration:string;
Idan Amit3504f842018-10-09 18:45:52 +030058 GET_plugin_online_state:string;
Michael Landoed64b5e2017-06-09 03:19:04 +030059 GET_service:string;
Michael Landoed64b5e2017-06-09 03:19:04 +030060 GET_ecomp_menu_items:string;
Michael Landoed64b5e2017-06-09 03:19:04 +030061 GET_service_validate_name:string;
62 GET_service_distributions:string;
63 GET_service_distributions_components:string;
64 POST_service_distribution_deploy:string;
65 GET_element:string;
66 GET_catalog:string;
67 GET_resource_category:string;
68 GET_service_category:string;
69 resource_instance:string;
70 GET_resource_instance_property:string;
71 GET_relationship:string;
72 GET_lifecycle_state_resource:string;
73 GET_lifecycle_state_CHECKIN:string;
74 GET_lifecycle_state_CERTIFICATIONREQUEST:string;
75 GET_lifecycle_state_UNDOCHECKOUT:string;
76 root:string;
Idan Amit2c285722017-12-29 09:40:43 +020077 no_proxy_root:string;
Michael Landoed64b5e2017-06-09 03:19:04 +030078 PUT_service:string;
79 GET_download_artifact:string;
80 GET_SDC_Version:string;
81 GET_categories:string;
82 POST_category:string;
83 POST_subcategory:string;
84 POST_change_instance_version:string;
85 GET_requirements_capabilities:string;
86 GET_onboarding:string;
87 GET_component_from_csar_uuid:string;
Piotr Darosz2c25cba2019-03-27 15:25:50 +010088 POST_GAB_Search:string;
Michael Landoed64b5e2017-06-09 03:19:04 +030089 kibana:string;
Michael Landoa5445102018-03-04 14:53:33 +020090 services_api_root:string;
Michael Landoed64b5e2017-06-09 03:19:04 +030091}
92
93export interface ILogConfig {
94 minLogLevel:string;
95 prefix:string;
96}
97
98export interface ICookie {
99 junctionName:string;
100 prefix:string;
101 userIdSuffix:string;
102 userFirstName:string;
103 userLastName:string;
104 userEmail:string;
105}
106export interface IUserTypes {
107 admin:any;
108 designer:any;
109 tester:any;
110}
111
112export interface IConfigStatuses {
113 inDesign:IConfigStatus;
114 readyForCertification:IConfigStatus;
115 inCertification:IConfigStatus;
116 certified:IConfigStatus;
117 distributed:IConfigStatus;
118}
119
120export interface IConfigStatus {
121 name:string;
122 values:Array<string>;
123}
124
125export interface IConfigRoles {
126 ADMIN:IConfigRole;
127 DESIGNER:IConfigRole;
128 TESTER:IConfigRole;
129 OPS:IConfigRole;
130 GOVERNOR:IConfigRole;
Michael Landoed64b5e2017-06-09 03:19:04 +0300131}
132
133export interface IConfigRole {
Michael Lando5b593492018-07-29 16:13:45 +0300134 changeLifecycleStateButtons:any;
Michael Landoed64b5e2017-06-09 03:19:04 +0300135}
136
137export interface IConfigState {
138 NOT_CERTIFIED_CHECKOUT:Array<IConfigDistribution>;
139 NOT_CERTIFIED_CHECKIN:Array<IConfigDistribution>;
140 READY_FOR_CERTIFICATION:Array<IConfigDistribution>;
141 CERTIFICATION_IN_PROGRESS:Array<IConfigDistribution>;
142 CERTIFIED:Array<IConfigDistribution>;
143}
144
145export interface IConfigDistribution {
146 DISTRIBUTION_NOT_APPROVED:Array<ConfigMenuItem>;
147 DISTRIBUTION_APPROVED:Array<ConfigMenuItem>;
148 DISTRIBUTED:Array<ConfigMenuItem>;
149 DISTRIBUTION_REJECTED:Array<ConfigMenuItem>;
150}
151
152export interface IConfirmationMessage {
153 showComment:boolean;
154 title:string;
155 message:string;
156}
157
158export interface IConfirmationMessages {
159 checkin:IConfirmationMessage;
160 checkout:IConfirmationMessage;
161 certify:IConfirmationMessage;
162 failCertification:IConfirmationMessage;
163 certificationRequest:IConfirmationMessage;
164 approve:IConfirmationMessage;
165 reject:IConfirmationMessage;
166}
167
168export interface IAlertMessage {
169 title:string;
170 message:string;
171}
172
173export interface IAlertMessages {
174 deleteInstance:IAlertMessage;
175 exitWithoutSaving:IConfirmationMessage;
176}
177
178class ConfigMenuItem {
179 text:string;
180 action:string;
181 url:string;
182 disable:boolean = false;
183}
184
185export interface IAppConfigurtaion {
186 environment:string;
187 api:IApi;
188 hostedApplications:Array<IHostedApplication>;
189 resourceTypesFilter:IResourceTypesFilter;
190 logConfig:ILogConfig;
191 cookie:ICookie;
192 imagesPath:string;
193 toscaFileExtension:string;
194 csarFileExtension:string;
195 testers:Array<ITester>
196 tutorial:any;
197 roles:Array<string>;
198 cpEndPointInstances:Array<string>;
199 openSource:boolean;
200 showOutlook:boolean;
201 validationConfigPath:string;
202}
203
204export interface IResourceTypesFilter {
205 resource:Array<string>;
206}
207
208export interface IHostedApplication {
209 moduleName:string;
210 navTitle:string;
211 defaultState:string;
212 exists?:boolean;
213 state:IHostedApplicationState;
214}
215
216export interface IHostedApplicationState {
217 name:string;
218 url:string;
219 relativeHtmlPath:string;
220 controllerName:string;
221}
222
223export interface ITester {
224 email:string;
225}
226
Michael Lando5b593492018-07-29 16:13:45 +0300227export interface IComponentType {
228 RESOURCE:any;
229 SERVICE:any;
230}
231
Michael Landoed64b5e2017-06-09 03:19:04 +0300232export interface IAppMenu {
233 roles:IConfigRoles;
234 confirmationMessages:IConfirmationMessages;
235 alertMessages:IAlertMessages;
236 statuses:IConfigStatuses;
237 catalogMenuItem:any;
238 categoriesDictionary:any;
239 canvas_buttons:Object;
240 component_workspace_menu_option:any;
241 LifeCycleStatuses:any;
242 DistributionStatuses:any;
243 ChangeLifecycleStateButton:any;
244}