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'; |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 22 | // tslint:disable-next-line:interface-name |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 23 | export interface IApi { |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 24 | baseUrl: string; |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 25 | |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 26 | GET_SDC_Setup_Data: string; |
| 27 | GET_component: string; |
| 28 | PUT_component: string; |
| 29 | GET_component_validate_name: string; |
| 30 | POST_changeLifecycleState: string; |
| 31 | component_api_root: string; |
| 32 | GET_user: string; |
| 33 | GET_user_authorize: string; |
| 34 | GET_all_users: string; |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 35 | POST_create_user; |
| 36 | DELETE_delete_user; |
| 37 | POST_edit_user_role; |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 38 | GET_resource: string; |
| 39 | GET_resources_latestversion_notabstract: string; |
| 40 | GET_resources_certified_not_abstract: string; |
| 41 | GET_resources_certified_abstract: string; |
| 42 | PUT_resource: string; |
| 43 | GET_resource_property: string; |
| 44 | GET_resource_artifact: string; |
| 45 | GET_download_instance_artifact: string; |
| 46 | POST_instance_artifact: string; |
| 47 | GET_resource_additional_information: string; |
| 48 | GET_service_artifact: string; |
| 49 | GET_resource_interface_artifact: string; |
| 50 | GET_resource_api_artifact: string; |
| 51 | GET_resource_validate_name: string; |
| 52 | GET_resource_artifact_types: string; |
| 53 | GET_activity_log: string; |
| 54 | GET_configuration_ui: string; |
| 55 | GET_plugins_configuration: string; |
| 56 | GET_plugin_online_state: string; |
| 57 | GET_service: string; |
| 58 | GET_ecomp_menu_items: string; |
| 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_UNDOCHECKOUT: string; |
| 73 | root: string; |
| 74 | no_proxy_root: string; |
| 75 | PUT_service: string; |
| 76 | GET_download_artifact: string; |
| 77 | GET_SDC_Version: string; |
| 78 | GET_categories: string; |
| 79 | POST_category: string; |
| 80 | POST_subcategory: string; |
| 81 | POST_change_instance_version: string; |
| 82 | GET_requirements_capabilities: string; |
| 83 | GET_onboarding: string; |
| 84 | GET_component_from_csar_uuid: string; |
| 85 | POST_GAB_Search: string; |
| 86 | kibana: string; |
| 87 | services_api_root: string; |
| 88 | uicache_root: string; |
| 89 | GET_uicache_catalog: string; |
| 90 | GET_uicache_left_palette: string; |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 91 | } |
| 92 | |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 93 | // tslint:disable-next-line:interface-name |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 94 | export interface ILogConfig { |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 95 | minLogLevel: string; |
| 96 | prefix: string; |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 97 | } |
| 98 | |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 99 | // tslint:disable-next-line:interface-name |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 100 | export interface ICookie { |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 101 | junctionName: string; |
| 102 | prefix: string; |
| 103 | userIdSuffix: string; |
| 104 | userFirstName: string; |
| 105 | userLastName: string; |
| 106 | userEmail: string; |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 107 | } |
| 108 | |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 109 | // tslint:disable-next-line:interface-name |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 110 | export interface IConfigStatuses { |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 111 | inDesign: IConfigStatus; |
| 112 | certified: IConfigStatus; |
| 113 | distributed: IConfigStatus; |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 114 | } |
| 115 | |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 116 | // tslint:disable-next-line:interface-name |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 117 | export interface IConfigStatus { |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 118 | name: string; |
| 119 | values: string[]; |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 120 | } |
| 121 | |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 122 | // tslint:disable-next-line:interface-name |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 123 | export interface IConfigRoles { |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 124 | ADMIN: IConfigRole; |
| 125 | DESIGNER: IConfigRole; |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 126 | } |
| 127 | |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 128 | // tslint:disable-next-line:interface-name |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 129 | export interface IConfigRole { |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 130 | changeLifecycleStateButtons: any; |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 131 | } |
| 132 | |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 133 | // tslint:disable-next-line:interface-name |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 134 | export interface IConfirmationMessage { |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 135 | showComment: boolean; |
| 136 | title: string; |
| 137 | message: string; |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 138 | } |
| 139 | |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 140 | // tslint:disable-next-line:interface-name |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 141 | export interface IConfirmationMessages { |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 142 | checkin: IConfirmationMessage; |
| 143 | checkout: IConfirmationMessage; |
| 144 | certify: IConfirmationMessage; |
| 145 | failCertification: IConfirmationMessage; |
| 146 | certificationRequest: IConfirmationMessage; |
| 147 | approve: IConfirmationMessage; |
| 148 | reject: IConfirmationMessage; |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 149 | } |
| 150 | |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 151 | // tslint:disable-next-line:interface-name |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 152 | export interface IAlertMessage { |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 153 | title: string; |
| 154 | message: string; |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 155 | } |
| 156 | |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 157 | // tslint:disable-next-line:interface-name |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 158 | export interface IAlertMessages { |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 159 | deleteInstance: IAlertMessage; |
| 160 | exitWithoutSaving: IConfirmationMessage; |
| 161 | okButton: string; |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 162 | } |
| 163 | |
| 164 | class ConfigMenuItem { |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 165 | text: string; |
| 166 | action: string; |
| 167 | url: string; |
| 168 | disable = false; |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 169 | } |
| 170 | |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 171 | // tslint:disable-next-line:interface-name |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 172 | export interface IAppConfigurtaion { |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 173 | environment: string; |
| 174 | api: IApi; |
| 175 | hostedApplications: IHostedApplication[]; |
| 176 | resourceTypesFilter: IResourceTypesFilter; |
| 177 | logConfig: ILogConfig; |
| 178 | cookie: ICookie; |
| 179 | imagesPath: string; |
| 180 | toscaFileExtension: string; |
| 181 | csarFileExtension: string; |
| 182 | testers: ITester[]; |
| 183 | tutorial: any; |
| 184 | roles: string[]; |
| 185 | cpEndPointInstances: string[]; |
| 186 | openSource: boolean; |
| 187 | showOutlook: boolean; |
| 188 | validationConfigPath: string; |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 189 | } |
| 190 | |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 191 | // tslint:disable-next-line:interface-name |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 192 | export interface IResourceTypesFilter { |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 193 | resource: string[]; |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 194 | } |
| 195 | |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 196 | // tslint:disable-next-line:interface-name |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 197 | export interface IHostedApplication { |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 198 | moduleName: string; |
| 199 | navTitle: string; |
| 200 | defaultState: string; |
| 201 | exists?: boolean; |
| 202 | state: IHostedApplicationState; |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 203 | } |
| 204 | |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 205 | // tslint:disable-next-line:interface-name |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 206 | export interface IHostedApplicationState { |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 207 | name: string; |
| 208 | url: string; |
| 209 | relativeHtmlPath: string; |
| 210 | controllerName: string; |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 211 | } |
| 212 | |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 213 | // tslint:disable-next-line:interface-name |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 214 | export interface ITester { |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 215 | email: string; |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 216 | } |
| 217 | |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 218 | // tslint:disable-next-line:interface-name |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 219 | export interface IAppMenu { |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 220 | roles: IConfigRoles; |
| 221 | confirmationMessages: IConfirmationMessages; |
| 222 | alertMessages: IAlertMessages; |
| 223 | statuses: IConfigStatuses; |
| 224 | catalogMenuItem: any; |
| 225 | categoriesDictionary: any; |
| 226 | // tslint:disable-next-line:ban-types |
| 227 | canvas_buttons: Object; |
| 228 | component_workspace_menu_option: any; |
| 229 | LifeCycleStatuses: any; |
| 230 | DistributionStatuses: any; |
| 231 | ChangeLifecycleStateButton: any; |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 232 | } |