Michael Lando | dd60339 | 2017-07-12 00:54:52 +0300 | [diff] [blame] | 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 |
Idan Amit | 2c28572 | 2017-12-29 09:40:43 +0200 | [diff] [blame] | 10 | * |
Michael Lando | dd60339 | 2017-07-12 00:54:52 +0300 | [diff] [blame] | 11 | * http://www.apache.org/licenses/LICENSE-2.0 |
Idan Amit | 2c28572 | 2017-12-29 09:40:43 +0200 | [diff] [blame] | 12 | * |
Michael Lando | dd60339 | 2017-07-12 00:54:52 +0300 | [diff] [blame] | 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 Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 21 | 'use strict'; |
| 22 | export 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 Amit | eedaaf9 | 2018-01-31 13:27:33 +0200 | [diff] [blame] | 56 | GET_plugins_configuration:string; |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 57 | GET_service:string; |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 58 | GET_ecomp_menu_items:string; |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 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_CERTIFICATIONREQUEST:string; |
| 73 | GET_lifecycle_state_UNDOCHECKOUT:string; |
| 74 | root:string; |
Idan Amit | 2c28572 | 2017-12-29 09:40:43 +0200 | [diff] [blame] | 75 | no_proxy_root:string; |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 76 | PUT_service:string; |
| 77 | GET_download_artifact:string; |
| 78 | GET_SDC_Version:string; |
| 79 | GET_categories:string; |
| 80 | POST_category:string; |
| 81 | POST_subcategory:string; |
| 82 | POST_change_instance_version:string; |
| 83 | GET_requirements_capabilities:string; |
| 84 | GET_onboarding:string; |
| 85 | GET_component_from_csar_uuid:string; |
| 86 | kibana:string; |
Michael Lando | a544510 | 2018-03-04 14:53:33 +0200 | [diff] [blame] | 87 | services_api_root:string; |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 88 | } |
| 89 | |
| 90 | export interface ILogConfig { |
| 91 | minLogLevel:string; |
| 92 | prefix:string; |
| 93 | } |
| 94 | |
| 95 | export interface ICookie { |
| 96 | junctionName:string; |
| 97 | prefix:string; |
| 98 | userIdSuffix:string; |
| 99 | userFirstName:string; |
| 100 | userLastName:string; |
| 101 | userEmail:string; |
| 102 | } |
| 103 | export interface IUserTypes { |
| 104 | admin:any; |
| 105 | designer:any; |
| 106 | tester:any; |
| 107 | } |
| 108 | |
| 109 | export interface IConfigStatuses { |
| 110 | inDesign:IConfigStatus; |
| 111 | readyForCertification:IConfigStatus; |
| 112 | inCertification:IConfigStatus; |
| 113 | certified:IConfigStatus; |
| 114 | distributed:IConfigStatus; |
| 115 | } |
| 116 | |
| 117 | export interface IConfigStatus { |
| 118 | name:string; |
| 119 | values:Array<string>; |
| 120 | } |
| 121 | |
| 122 | export interface IConfigRoles { |
| 123 | ADMIN:IConfigRole; |
| 124 | DESIGNER:IConfigRole; |
| 125 | TESTER:IConfigRole; |
| 126 | OPS:IConfigRole; |
| 127 | GOVERNOR:IConfigRole; |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 128 | } |
| 129 | |
| 130 | export interface IConfigRole { |
Michael Lando | 5b59349 | 2018-07-29 16:13:45 +0300 | [diff] [blame^] | 131 | changeLifecycleStateButtons:any; |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 132 | } |
| 133 | |
| 134 | export interface IConfigState { |
| 135 | NOT_CERTIFIED_CHECKOUT:Array<IConfigDistribution>; |
| 136 | NOT_CERTIFIED_CHECKIN:Array<IConfigDistribution>; |
| 137 | READY_FOR_CERTIFICATION:Array<IConfigDistribution>; |
| 138 | CERTIFICATION_IN_PROGRESS:Array<IConfigDistribution>; |
| 139 | CERTIFIED:Array<IConfigDistribution>; |
| 140 | } |
| 141 | |
| 142 | export interface IConfigDistribution { |
| 143 | DISTRIBUTION_NOT_APPROVED:Array<ConfigMenuItem>; |
| 144 | DISTRIBUTION_APPROVED:Array<ConfigMenuItem>; |
| 145 | DISTRIBUTED:Array<ConfigMenuItem>; |
| 146 | DISTRIBUTION_REJECTED:Array<ConfigMenuItem>; |
| 147 | } |
| 148 | |
| 149 | export interface IConfirmationMessage { |
| 150 | showComment:boolean; |
| 151 | title:string; |
| 152 | message:string; |
| 153 | } |
| 154 | |
| 155 | export interface IConfirmationMessages { |
| 156 | checkin:IConfirmationMessage; |
| 157 | checkout:IConfirmationMessage; |
| 158 | certify:IConfirmationMessage; |
| 159 | failCertification:IConfirmationMessage; |
| 160 | certificationRequest:IConfirmationMessage; |
| 161 | approve:IConfirmationMessage; |
| 162 | reject:IConfirmationMessage; |
| 163 | } |
| 164 | |
| 165 | export interface IAlertMessage { |
| 166 | title:string; |
| 167 | message:string; |
| 168 | } |
| 169 | |
| 170 | export interface IAlertMessages { |
| 171 | deleteInstance:IAlertMessage; |
| 172 | exitWithoutSaving:IConfirmationMessage; |
| 173 | } |
| 174 | |
| 175 | class ConfigMenuItem { |
| 176 | text:string; |
| 177 | action:string; |
| 178 | url:string; |
| 179 | disable:boolean = false; |
| 180 | } |
| 181 | |
| 182 | export interface IAppConfigurtaion { |
| 183 | environment:string; |
| 184 | api:IApi; |
| 185 | hostedApplications:Array<IHostedApplication>; |
| 186 | resourceTypesFilter:IResourceTypesFilter; |
| 187 | logConfig:ILogConfig; |
| 188 | cookie:ICookie; |
| 189 | imagesPath:string; |
| 190 | toscaFileExtension:string; |
| 191 | csarFileExtension:string; |
| 192 | testers:Array<ITester> |
| 193 | tutorial:any; |
| 194 | roles:Array<string>; |
| 195 | cpEndPointInstances:Array<string>; |
| 196 | openSource:boolean; |
| 197 | showOutlook:boolean; |
| 198 | validationConfigPath:string; |
| 199 | } |
| 200 | |
| 201 | export interface IResourceTypesFilter { |
| 202 | resource:Array<string>; |
| 203 | } |
| 204 | |
| 205 | export interface IHostedApplication { |
| 206 | moduleName:string; |
| 207 | navTitle:string; |
| 208 | defaultState:string; |
| 209 | exists?:boolean; |
| 210 | state:IHostedApplicationState; |
| 211 | } |
| 212 | |
| 213 | export interface IHostedApplicationState { |
| 214 | name:string; |
| 215 | url:string; |
| 216 | relativeHtmlPath:string; |
| 217 | controllerName:string; |
| 218 | } |
| 219 | |
| 220 | export interface ITester { |
| 221 | email:string; |
| 222 | } |
| 223 | |
Michael Lando | 5b59349 | 2018-07-29 16:13:45 +0300 | [diff] [blame^] | 224 | export interface IComponentType { |
| 225 | RESOURCE:any; |
| 226 | SERVICE:any; |
| 227 | } |
| 228 | |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 229 | export interface IAppMenu { |
| 230 | roles:IConfigRoles; |
| 231 | confirmationMessages:IConfirmationMessages; |
| 232 | alertMessages:IAlertMessages; |
| 233 | statuses:IConfigStatuses; |
| 234 | catalogMenuItem:any; |
| 235 | categoriesDictionary:any; |
| 236 | canvas_buttons:Object; |
| 237 | component_workspace_menu_option:any; |
| 238 | LifeCycleStatuses:any; |
| 239 | DistributionStatuses:any; |
| 240 | ChangeLifecycleStateButton:any; |
| 241 | } |