blob: 40eb18b8b461790360d8c76b38fcef80b14cfa42 [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
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
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;
56 GET_service:string;
Michael Landoed64b5e2017-06-09 03:19:04 +030057 GET_ecomp_menu_items:string;
Michael Landoed64b5e2017-06-09 03:19:04 +030058 GET_service_validate_name:string;
59 GET_service_distributions:string;
60 GET_service_distributions_components:string;
61 POST_service_distribution_deploy:string;
62 GET_element:string;
63 GET_catalog:string;
64 GET_resource_category:string;
65 GET_service_category:string;
66 resource_instance:string;
67 GET_resource_instance_property:string;
68 GET_relationship:string;
69 GET_lifecycle_state_resource:string;
70 GET_lifecycle_state_CHECKIN:string;
71 GET_lifecycle_state_CERTIFICATIONREQUEST:string;
72 GET_lifecycle_state_UNDOCHECKOUT:string;
73 root:string;
74 PUT_service:string;
75 GET_download_artifact:string;
76 GET_SDC_Version:string;
77 GET_categories:string;
78 POST_category:string;
79 POST_subcategory:string;
80 POST_change_instance_version:string;
81 GET_requirements_capabilities:string;
82 GET_onboarding:string;
83 GET_component_from_csar_uuid:string;
84 kibana:string;
Michael Landoed64b5e2017-06-09 03:19:04 +030085}
86
87export interface ILogConfig {
88 minLogLevel:string;
89 prefix:string;
90}
91
92export interface ICookie {
93 junctionName:string;
94 prefix:string;
95 userIdSuffix:string;
96 userFirstName:string;
97 userLastName:string;
98 userEmail:string;
99}
100export interface IUserTypes {
101 admin:any;
102 designer:any;
103 tester:any;
104}
105
106export interface IConfigStatuses {
107 inDesign:IConfigStatus;
108 readyForCertification:IConfigStatus;
109 inCertification:IConfigStatus;
110 certified:IConfigStatus;
111 distributed:IConfigStatus;
112}
113
114export interface IConfigStatus {
115 name:string;
116 values:Array<string>;
117}
118
119export interface IConfigRoles {
120 ADMIN:IConfigRole;
121 DESIGNER:IConfigRole;
122 TESTER:IConfigRole;
123 OPS:IConfigRole;
124 GOVERNOR:IConfigRole;
Michael Landoed64b5e2017-06-09 03:19:04 +0300125}
126
127export interface IConfigRole {
128 pages:Array<string>;
129 states:IConfigState;
130}
131
132export interface IConfigState {
133 NOT_CERTIFIED_CHECKOUT:Array<IConfigDistribution>;
134 NOT_CERTIFIED_CHECKIN:Array<IConfigDistribution>;
135 READY_FOR_CERTIFICATION:Array<IConfigDistribution>;
136 CERTIFICATION_IN_PROGRESS:Array<IConfigDistribution>;
137 CERTIFIED:Array<IConfigDistribution>;
138}
139
140export interface IConfigDistribution {
141 DISTRIBUTION_NOT_APPROVED:Array<ConfigMenuItem>;
142 DISTRIBUTION_APPROVED:Array<ConfigMenuItem>;
143 DISTRIBUTED:Array<ConfigMenuItem>;
144 DISTRIBUTION_REJECTED:Array<ConfigMenuItem>;
145}
146
147export interface IConfirmationMessage {
148 showComment:boolean;
149 title:string;
150 message:string;
151}
152
153export interface IConfirmationMessages {
154 checkin:IConfirmationMessage;
155 checkout:IConfirmationMessage;
156 certify:IConfirmationMessage;
157 failCertification:IConfirmationMessage;
158 certificationRequest:IConfirmationMessage;
159 approve:IConfirmationMessage;
160 reject:IConfirmationMessage;
161}
162
163export interface IAlertMessage {
164 title:string;
165 message:string;
166}
167
168export interface IAlertMessages {
169 deleteInstance:IAlertMessage;
170 exitWithoutSaving:IConfirmationMessage;
171}
172
173class ConfigMenuItem {
174 text:string;
175 action:string;
176 url:string;
177 disable:boolean = false;
178}
179
180export interface IAppConfigurtaion {
181 environment:string;
182 api:IApi;
183 hostedApplications:Array<IHostedApplication>;
184 resourceTypesFilter:IResourceTypesFilter;
185 logConfig:ILogConfig;
186 cookie:ICookie;
187 imagesPath:string;
188 toscaFileExtension:string;
189 csarFileExtension:string;
190 testers:Array<ITester>
191 tutorial:any;
192 roles:Array<string>;
193 cpEndPointInstances:Array<string>;
194 openSource:boolean;
195 showOutlook:boolean;
196 validationConfigPath:string;
197}
198
199export interface IResourceTypesFilter {
200 resource:Array<string>;
201}
202
203export interface IHostedApplication {
204 moduleName:string;
205 navTitle:string;
206 defaultState:string;
207 exists?:boolean;
208 state:IHostedApplicationState;
209}
210
211export interface IHostedApplicationState {
212 name:string;
213 url:string;
214 relativeHtmlPath:string;
215 controllerName:string;
216}
217
218export interface ITester {
219 email:string;
220}
221
222export interface IAppMenu {
223 roles:IConfigRoles;
224 confirmationMessages:IConfirmationMessages;
225 alertMessages:IAlertMessages;
226 statuses:IConfigStatuses;
227 catalogMenuItem:any;
228 categoriesDictionary:any;
229 canvas_buttons:Object;
230 component_workspace_menu_option:any;
231 LifeCycleStatuses:any;
232 DistributionStatuses:any;
233 ChangeLifecycleStateButton:any;
234}