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. |
Piotr Darosz | 2c25cba | 2019-03-27 15:25:50 +0100 | [diff] [blame] | 6 | * Modifications Copyright (C) 2019 Nokia. All rights reserved. |
Michael Lando | dd60339 | 2017-07-12 00:54:52 +0300 | [diff] [blame] | 7 | * ================================================================================ |
| 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 Amit | 2c28572 | 2017-12-29 09:40:43 +0200 | [diff] [blame] | 11 | * |
Michael Lando | dd60339 | 2017-07-12 00:54:52 +0300 | [diff] [blame] | 12 | * http://www.apache.org/licenses/LICENSE-2.0 |
Idan Amit | 2c28572 | 2017-12-29 09:40:43 +0200 | [diff] [blame] | 13 | * |
Michael Lando | dd60339 | 2017-07-12 00:54:52 +0300 | [diff] [blame] | 14 | * 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 Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 22 | 'use strict'; |
| 23 | export 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 Amit | eedaaf9 | 2018-01-31 13:27:33 +0200 | [diff] [blame] | 57 | GET_plugins_configuration:string; |
Idan Amit | 3504f84 | 2018-10-09 18:45:52 +0300 | [diff] [blame] | 58 | GET_plugin_online_state:string; |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 59 | GET_service:string; |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 60 | GET_ecomp_menu_items:string; |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 61 | 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 Amit | 2c28572 | 2017-12-29 09:40:43 +0200 | [diff] [blame] | 77 | no_proxy_root:string; |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 78 | 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 Darosz | 2c25cba | 2019-03-27 15:25:50 +0100 | [diff] [blame] | 88 | POST_GAB_Search:string; |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 89 | kibana:string; |
Michael Lando | a544510 | 2018-03-04 14:53:33 +0200 | [diff] [blame] | 90 | services_api_root:string; |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 91 | } |
| 92 | |
| 93 | export interface ILogConfig { |
| 94 | minLogLevel:string; |
| 95 | prefix:string; |
| 96 | } |
| 97 | |
| 98 | export interface ICookie { |
| 99 | junctionName:string; |
| 100 | prefix:string; |
| 101 | userIdSuffix:string; |
| 102 | userFirstName:string; |
| 103 | userLastName:string; |
| 104 | userEmail:string; |
| 105 | } |
| 106 | export interface IUserTypes { |
| 107 | admin:any; |
| 108 | designer:any; |
| 109 | tester:any; |
| 110 | } |
| 111 | |
| 112 | export interface IConfigStatuses { |
| 113 | inDesign:IConfigStatus; |
| 114 | readyForCertification:IConfigStatus; |
| 115 | inCertification:IConfigStatus; |
| 116 | certified:IConfigStatus; |
| 117 | distributed:IConfigStatus; |
| 118 | } |
| 119 | |
| 120 | export interface IConfigStatus { |
| 121 | name:string; |
| 122 | values:Array<string>; |
| 123 | } |
| 124 | |
| 125 | export interface IConfigRoles { |
| 126 | ADMIN:IConfigRole; |
| 127 | DESIGNER:IConfigRole; |
| 128 | TESTER:IConfigRole; |
| 129 | OPS:IConfigRole; |
| 130 | GOVERNOR:IConfigRole; |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 131 | } |
| 132 | |
| 133 | export interface IConfigRole { |
Michael Lando | 5b59349 | 2018-07-29 16:13:45 +0300 | [diff] [blame] | 134 | changeLifecycleStateButtons:any; |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 135 | } |
| 136 | |
| 137 | export 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 | |
| 145 | export interface IConfigDistribution { |
| 146 | DISTRIBUTION_NOT_APPROVED:Array<ConfigMenuItem>; |
| 147 | DISTRIBUTION_APPROVED:Array<ConfigMenuItem>; |
| 148 | DISTRIBUTED:Array<ConfigMenuItem>; |
| 149 | DISTRIBUTION_REJECTED:Array<ConfigMenuItem>; |
| 150 | } |
| 151 | |
| 152 | export interface IConfirmationMessage { |
| 153 | showComment:boolean; |
| 154 | title:string; |
| 155 | message:string; |
| 156 | } |
| 157 | |
| 158 | export 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 | |
| 168 | export interface IAlertMessage { |
| 169 | title:string; |
| 170 | message:string; |
| 171 | } |
| 172 | |
| 173 | export interface IAlertMessages { |
| 174 | deleteInstance:IAlertMessage; |
| 175 | exitWithoutSaving:IConfirmationMessage; |
| 176 | } |
| 177 | |
| 178 | class ConfigMenuItem { |
| 179 | text:string; |
| 180 | action:string; |
| 181 | url:string; |
| 182 | disable:boolean = false; |
| 183 | } |
| 184 | |
| 185 | export 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 | |
| 204 | export interface IResourceTypesFilter { |
| 205 | resource:Array<string>; |
| 206 | } |
| 207 | |
| 208 | export interface IHostedApplication { |
| 209 | moduleName:string; |
| 210 | navTitle:string; |
| 211 | defaultState:string; |
| 212 | exists?:boolean; |
| 213 | state:IHostedApplicationState; |
| 214 | } |
| 215 | |
| 216 | export interface IHostedApplicationState { |
| 217 | name:string; |
| 218 | url:string; |
| 219 | relativeHtmlPath:string; |
| 220 | controllerName:string; |
| 221 | } |
| 222 | |
| 223 | export interface ITester { |
| 224 | email:string; |
| 225 | } |
| 226 | |
Michael Lando | 5b59349 | 2018-07-29 16:13:45 +0300 | [diff] [blame] | 227 | export interface IComponentType { |
| 228 | RESOURCE:any; |
| 229 | SERVICE:any; |
| 230 | } |
| 231 | |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 232 | export 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 | } |