'use strict';

/*
 * *******************************************************************************
 *  * Copyright (c) 2018 Edgeworx, Inc.
 *  *
 *  * This program and the accompanying materials are made available under the
 *  * terms of the Eclipse Public License v. 2.0 which is available at
 *  * http://www.eclipse.org/legal/epl-2.0
 *  *
 *  * SPDX-License-Identifier: EPL-2.0
 *  *******************************************************************************
 *
 */

window.ioAuthoring = window.ioAuthoring || {};

ioAuthoring.urls = {};

ioAuthoring.urls.login = '/api/v1/user/login';
ioAuthoring.urls.logout = '/api/v1/user/logout';

/******************************** build page URLs *********************************/
/************************************ IOAuth **************************************/
ioAuthoring.urls.loginPage = '/login';
ioAuthoring.urls.build = '/authoring/build';
ioAuthoring.urls.passwordChange = '/password/change';

ioAuthoring.urls.getElementInstancesLayouts = '/api/v2/get/element/instances/layouts';
ioAuthoring.urls.updateElementInstancesLayouts = '/api/v2/authoring/element/instance/layout/update';
ioAuthoring.urls.elementInstanceLayoutCreate = '/api/v2/authoring/build/element/instance/create';
ioAuthoring.urls.deleteElementInstanceLayouts = '/api/v2/authoring/user/track/delete';

/************************************ FC **************************************/

ioAuthoring.urls.getTrackListForUser = '/api/v2/authoring/user/track/list/'; //:userId
ioAuthoring.urls.getElementCatalog = '/api/v2/authoring/element/catalog/get';
ioAuthoring.urls.getFogInstancesForUser = '/api/v2/authoring/integrator/instances/list/'; //:userId
ioAuthoring.urls.getElementInstances = '/api/v2/authoring/element/instance/details/trackid/'; //:trackId
ioAuthoring.urls.createNewTrack = '/api/v2/authoring/user/track/create';
ioAuthoring.urls.updateTrack = '/api/v2/authoring/user/track/update';
ioAuthoring.urls.deleteUserTrack = '/api/v2/authoring/user/track/delete';
ioAuthoring.urls.elementInstanceCreate = '/api/v2/authoring/build/element/instance/create';
ioAuthoring.urls.elementInstanceUpdate = '/api/v2/authoring/element/instance/update';
ioAuthoring.urls.elementInstanceDelete = '/api/v2/authoring/element/instance/delete';
ioAuthoring.urls.getElementInstanceProperties = '/api/v2/authoring/build/properties/panel/get';
ioAuthoring.urls.createElementInstanceRoute = '/api/v2/authoring/element/instance/route/create';
ioAuthoring.urls.deleteElementInstanceRoute = '/api/v2/authoring/element/instance/route/delete';
ioAuthoring.urls.createElementInstanceConnection = '/api/v2/authoring/element/connection/create';
ioAuthoring.urls.deleteElementInstanceConnection = '/api/v2/authoring/element/connection/delete';
ioAuthoring.urls.createElementInstancePort = '/api/v2/authoring/element/instance/port/create';
ioAuthoring.urls.deleteElementInstancePort = '/api/v2/authoring/element/instance/port/delete';
ioAuthoring.urls.elementInstanceRebuildStatus = '/api/v2/authoring/element/instance/rebuild/status/elementid/'; //:elementId
ioAuthoring.urls.elementInstanceRebuildUpdate = '/api/v2/authoring/element/instance/rebuild';
ioAuthoring.urls.elementInstanceImageSnapshotStatus = '/api/v2/authoring/element/imageSnapshot/status';
ioAuthoring.urls.elementInstanceImageSnapshot = '/api/v2/authoring/element/imageSnapshot';
ioAuthoring.urls.elementInstanceDownloadStraceFile = '/api/v2/authoring/element/diagnostics/strace/pop/file';
ioAuthoring.urls.elementInstanceSwitchStrace = '/api/v2/authoring/element/diagnostics/strace/switch';

ioAuthoring.urls.listElementInstanceWithStatus = '/api/v2/authoring/list/element/instance/';

/******************************** publish page URLs *********************************/
/************************************ IOAuth ***************************************/

ioAuthoring.urls.getElementLayouts = '/api/v2/authoring/get/element/module/layout';
ioAuthoring.urls.deleteElementLayouts = '/api/v2/authoring/element/module/delete/moduleid/'; //:moduleId

ioAuthoring.urls.createElementLayouts = '/api/v2/authoring/element/module/create';
ioAuthoring.urls.updateElementLayouts = '/api/v2/authoring/element/module/layout/update';
ioAuthoring.urls.uploadElementIcon = '/api/v2/authoring/element/icon/upload/moduleid/'; //:moduleId
ioAuthoring.urls.importMicroservice = '/api/v2/import/microservice';

/************************************ FC **************************************/
ioAuthoring.urls.getElementsForPublish = '/api/v2/authoring/element/get';

ioAuthoring.urls.getFogTypesList = '/api/v2/authoring/fog/types/list';
ioAuthoring.urls.getProxyStatus = '/api/v2/authoring/fog/proxy/status';
ioAuthoring.urls.createElement = '/api/v2/authoring/element/module/create';
ioAuthoring.urls.importElement = '/api/v2/authoring/element/module/import';
ioAuthoring.urls.updateElement = '/api/v2/authoring/element/module/update';
ioAuthoring.urls.deleteElement = '/api/v2/authoring/element/module/delete/moduleid/'; //:moduleId
ioAuthoring.urls.getElementDetails = '/api/v2/authoring/element/module/details/moduleid/'; //:moduleId

/********************************** fog page URLs ******************************************/
/************************************ IOAuth **********************************************/
ioAuthoring.urls.getFogLayout = '/api/v2/authoring/fog/instances/list';
ioAuthoring.urls.updateFogInstanceLayout = '/api/v2/authoring/fog/instances/layout/update';
ioAuthoring.urls.deleteFogInstanceLayout = '/api/v2/authoring/fog/instance/delete';

/************************************** FC **************************************/
ioAuthoring.urls.fogInstancesList = '/api/v2/authoring/fog/instances/list';
ioAuthoring.urls.createFogInstance = '/api/v2/authoring/fog/instance/create';
ioAuthoring.urls.getFogDetails = '/api/v2/authoring/fog/details';
ioAuthoring.urls.deleteFogInstance = '/api/v2/authoring/fog/instance/delete';
ioAuthoring.urls.fogProvisioning = '/api/v2/authoring/fog/provisioningkey/instanceid/'; //:instanceId
ioAuthoring.urls.fogSettingsUpdate = '/api/v2/authoring/fog/instances/settings/update';
ioAuthoring.urls.openSshTunnel = '/api/v2/authoring/fog/instance/proxy/createOrUpdate';
ioAuthoring.urls.closeSshTunnel = '/api/v2/authoring/fog/instance/proxy/close';
ioAuthoring.urls.changeVersion = '/api/v2/authoring/fog/version/change';
// ioAuthoring.urls.addBluebox = ioAuthoring.urls.baseFogController + "api/v2/authoring/fog/instance/bluebox/add";

ioAuthoring.urls.getFogHWInfo = '/api/v2/authoring/fog/info/hw';
ioAuthoring.urls.getFogUSBInfo = '/api/v2/authoring/fog/info/usb';

/************************************* account page URLs *************************************/
/******************************************* FC *********************************************/
ioAuthoring.urls.getUserDetails = '/api/v2/get/user/data/'; //:t
ioAuthoring.urls.updateUserDetails = '/api/v1/user/profile/update';
ioAuthoring.urls.updateUserPassword = '/api/v1/user/password/change';
ioAuthoring.urls.deleteUserAccount = '/api/v1/user/account/delete';
ioAuthoring.urls.userSignup = '/api/v1/user/signup';
ioAuthoring.urls.resetUserPassword = '/api/v1/user/password/reset';
ioAuthoring.urls.resendEmailActivationCode = '/api/v1/user/account/activate/resend';
ioAuthoring.urls.activateUserAccount = '/account/activate/code/'; //:code

/************************************* registries URLs *************************************/
ioAuthoring.urls.getRegistryList = '/api/v2/authoring/registry/list';
ioAuthoring.urls.addRegistry = '/api/v2/authoring/registry/add';
ioAuthoring.urls.deleteRegistry = '/api/v2/authoring/registry/delete';