diff --git a/package-lock.json b/package-lock.json index 200e9043d..e2d3b0495 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,8 +10,8 @@ "dependencies": { "@ant-design/icons": "^5.3.7", "@axa-fr/react-oidc": "^7.22.6", - "@tanstack/react-query": "^5.37.1", - "antd": "^5.17.3", + "@tanstack/react-query": "^5.40.0", + "antd": "^5.17.4", "echarts": "5.5.0", "echarts-for-react": "^3.0.2", "rc-field-form": "^2.2.0", @@ -35,8 +35,8 @@ "@types/react": "^18.3.3", "@types/react-dom": "^18.3.0", "@types/uuid": "^9.0.8", - "@typescript-eslint/eslint-plugin": "^7.10.0", - "@typescript-eslint/parser": "^7.10.0", + "@typescript-eslint/eslint-plugin": "^7.11.0", + "@typescript-eslint/parser": "^7.11.0", "@vitejs/plugin-react": "^4.3.0", "env-cmd": "^10.1.0", "eslint": "^8.57.0", @@ -50,7 +50,7 @@ "identity-obj-proxy": "^3.0.0", "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", - "knip": "^5.16.0", + "knip": "^5.17.2", "openapi-typescript-codegen": "^0.29.0", "prettier": "3.2.5", "prettier-plugin-organize-imports": "^3.2.4", @@ -4554,20 +4554,20 @@ "dev": true }, "node_modules/@tanstack/query-core": { - "version": "5.36.1", - "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.36.1.tgz", - "integrity": "sha512-BteWYEPUcucEu3NBcDAgKuI4U25R9aPrHSP6YSf2NvaD2pSlIQTdqOfLRsxH9WdRYg7k0Uom35Uacb6nvbIMJg==", + "version": "5.40.0", + "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.40.0.tgz", + "integrity": "sha512-eD8K8jsOIq0Z5u/QbvOmfvKKE/XC39jA7yv4hgpl/1SRiU+J8QCIwgM/mEHuunQsL87dcvnHqSVLmf9pD4CiaA==", "funding": { "type": "github", "url": "https://github.com/sponsors/tannerlinsley" } }, "node_modules/@tanstack/react-query": { - "version": "5.37.1", - "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.37.1.tgz", - "integrity": "sha512-EhtBNA8GL3XFeSx6VYUjXQ96n44xe3JGKZCzBINrCYlxbZP6UwBafv7ti4eSRWc2Fy+fybQre0w17gR6lMzULA==", + "version": "5.40.0", + "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.40.0.tgz", + "integrity": "sha512-iv/W0Axc4aXhFzkrByToE1JQqayxTPNotCoSCnarR/A1vDIHaoKpg7FTIfP3Ev2mbKn1yrxq0ZKYUdLEJxs6Tg==", "dependencies": { - "@tanstack/query-core": "5.36.1" + "@tanstack/query-core": "5.40.0" }, "funding": { "type": "github", @@ -5072,16 +5072,16 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "7.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.10.0.tgz", - "integrity": "sha512-PzCr+a/KAef5ZawX7nbyNwBDtM1HdLIT53aSA2DDlxmxMngZ43O8SIePOeX8H5S+FHXeI6t97mTt/dDdzY4Fyw==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.11.0.tgz", + "integrity": "sha512-P+qEahbgeHW4JQ/87FuItjBj8O3MYv5gELDzr8QaQ7fsll1gSMTYb6j87MYyxwf3DtD7uGFB9ShwgmCJB5KmaQ==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "7.10.0", - "@typescript-eslint/type-utils": "7.10.0", - "@typescript-eslint/utils": "7.10.0", - "@typescript-eslint/visitor-keys": "7.10.0", + "@typescript-eslint/scope-manager": "7.11.0", + "@typescript-eslint/type-utils": "7.11.0", + "@typescript-eslint/utils": "7.11.0", + "@typescript-eslint/visitor-keys": "7.11.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -5105,15 +5105,15 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/utils": { - "version": "7.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.10.0.tgz", - "integrity": "sha512-olzif1Fuo8R8m/qKkzJqT7qwy16CzPRWBvERS0uvyc+DHd8AKbO4Jb7kpAvVzMmZm8TrHnI7hvjN4I05zow+tg==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.11.0.tgz", + "integrity": "sha512-xlAWwPleNRHwF37AhrZurOxA1wyXowW4PqVXZVUNCLjB48CqdPJoJWkrpH2nij9Q3Lb7rtWindtoXwxjxlKKCA==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "7.10.0", - "@typescript-eslint/types": "7.10.0", - "@typescript-eslint/typescript-estree": "7.10.0" + "@typescript-eslint/scope-manager": "7.11.0", + "@typescript-eslint/types": "7.11.0", + "@typescript-eslint/typescript-estree": "7.11.0" }, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -5146,15 +5146,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "7.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.10.0.tgz", - "integrity": "sha512-2EjZMA0LUW5V5tGQiaa2Gys+nKdfrn2xiTIBLR4fxmPmVSvgPcKNW+AE/ln9k0A4zDUti0J/GZXMDupQoI+e1w==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.11.0.tgz", + "integrity": "sha512-yimw99teuaXVWsBcPO1Ais02kwJ1jmNA1KxE7ng0aT7ndr1pT1wqj0OJnsYVGKKlc4QJai86l/025L6z8CljOg==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "7.10.0", - "@typescript-eslint/types": "7.10.0", - "@typescript-eslint/typescript-estree": "7.10.0", - "@typescript-eslint/visitor-keys": "7.10.0", + "@typescript-eslint/scope-manager": "7.11.0", + "@typescript-eslint/types": "7.11.0", + "@typescript-eslint/typescript-estree": "7.11.0", + "@typescript-eslint/visitor-keys": "7.11.0", "debug": "^4.3.4" }, "engines": { @@ -5174,13 +5174,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "7.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.10.0.tgz", - "integrity": "sha512-7L01/K8W/VGl7noe2mgH0K7BE29Sq6KAbVmxurj8GGaPDZXPr8EEQ2seOeAS+mEV9DnzxBQB6ax6qQQ5C6P4xg==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.11.0.tgz", + "integrity": "sha512-27tGdVEiutD4POirLZX4YzT180vevUURJl4wJGmm6TrQoiYwuxTIY98PBp6L2oN+JQxzE0URvYlzJaBHIekXAw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.10.0", - "@typescript-eslint/visitor-keys": "7.10.0" + "@typescript-eslint/types": "7.11.0", + "@typescript-eslint/visitor-keys": "7.11.0" }, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -5191,13 +5191,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "7.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.10.0.tgz", - "integrity": "sha512-D7tS4WDkJWrVkuzgm90qYw9RdgBcrWmbbRkrLA4d7Pg3w0ttVGDsvYGV19SH8gPR5L7OtcN5J1hTtyenO9xE9g==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.11.0.tgz", + "integrity": "sha512-WmppUEgYy+y1NTseNMJ6mCFxt03/7jTOy08bcg7bxJJdsM4nuhnchyBbE8vryveaJUf62noH7LodPSo5Z0WUCg==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "7.10.0", - "@typescript-eslint/utils": "7.10.0", + "@typescript-eslint/typescript-estree": "7.11.0", + "@typescript-eslint/utils": "7.11.0", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" }, @@ -5218,15 +5218,15 @@ } }, "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/utils": { - "version": "7.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.10.0.tgz", - "integrity": "sha512-olzif1Fuo8R8m/qKkzJqT7qwy16CzPRWBvERS0uvyc+DHd8AKbO4Jb7kpAvVzMmZm8TrHnI7hvjN4I05zow+tg==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.11.0.tgz", + "integrity": "sha512-xlAWwPleNRHwF37AhrZurOxA1wyXowW4PqVXZVUNCLjB48CqdPJoJWkrpH2nij9Q3Lb7rtWindtoXwxjxlKKCA==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "7.10.0", - "@typescript-eslint/types": "7.10.0", - "@typescript-eslint/typescript-estree": "7.10.0" + "@typescript-eslint/scope-manager": "7.11.0", + "@typescript-eslint/types": "7.11.0", + "@typescript-eslint/typescript-estree": "7.11.0" }, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -5240,9 +5240,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "7.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.10.0.tgz", - "integrity": "sha512-7fNj+Ya35aNyhuqrA1E/VayQX9Elwr8NKZ4WueClR3KwJ7Xx9jcCdOrLW04h51de/+gNbyFMs+IDxh5xIwfbNg==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.11.0.tgz", + "integrity": "sha512-MPEsDRZTyCiXkD4vd3zywDCifi7tatc4K37KqTprCvaXptP7Xlpdw0NR2hRJTetG5TxbWDB79Ys4kLmHliEo/w==", "dev": true, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -5253,13 +5253,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "7.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.10.0.tgz", - "integrity": "sha512-LXFnQJjL9XIcxeVfqmNj60YhatpRLt6UhdlFwAkjNc6jSUlK8zQOl1oktAP8PlWFzPQC1jny/8Bai3/HPuvN5g==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.11.0.tgz", + "integrity": "sha512-cxkhZ2C/iyi3/6U9EPc5y+a6csqHItndvN/CzbNXTNrsC3/ASoYQZEt9uMaEp+xFNjasqQyszp5TumAVKKvJeQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.10.0", - "@typescript-eslint/visitor-keys": "7.10.0", + "@typescript-eslint/types": "7.11.0", + "@typescript-eslint/visitor-keys": "7.11.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -5450,12 +5450,12 @@ "dev": true }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "7.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.10.0.tgz", - "integrity": "sha512-9ntIVgsi6gg6FIq9xjEO4VQJvwOqA3jaBFQJ/6TK5AvEup2+cECI6Fh7QiBxmfMHXU0V0J4RyPeOU1VDNzl9cg==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.11.0.tgz", + "integrity": "sha512-7syYk4MzjxTEk0g/w3iqtgxnFQspDJfn6QKD36xMuuhTzjcxY7F8EmBLnALjVyaOF1/bVocu3bS/2/F7rXrveQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.10.0", + "@typescript-eslint/types": "7.11.0", "eslint-visitor-keys": "^3.4.3" }, "engines": { @@ -5634,9 +5634,9 @@ } }, "node_modules/antd": { - "version": "5.17.3", - "resolved": "https://registry.npmjs.org/antd/-/antd-5.17.3.tgz", - "integrity": "sha512-U99hyy7t8dOQtNHzHifmwAXJLgmPMadavFBsd2mnfICD6m8l7u/NvCefRhd2jOf/SBNE2579YhwCEwTUiX2GnQ==", + "version": "5.17.4", + "resolved": "https://registry.npmjs.org/antd/-/antd-5.17.4.tgz", + "integrity": "sha512-oDWrcibe1s72223vpvA3/dNBEotGkggyWQVX1+GVrhuVXt/QYE3oU3Tsg3PeMurohvO8kjxambqG/zbmsMG34g==", "dependencies": { "@ant-design/colors": "^7.0.2", "@ant-design/cssinjs": "^1.19.1", @@ -5660,7 +5660,7 @@ "rc-dropdown": "~4.2.0", "rc-field-form": "~2.0.1", "rc-image": "~7.6.0", - "rc-input": "~1.5.0", + "rc-input": "~1.5.1", "rc-input-number": "~9.1.0", "rc-mentions": "~2.13.1", "rc-menu": "~9.14.0", @@ -5683,7 +5683,7 @@ "rc-tree": "~5.8.7", "rc-tree-select": "~5.21.0", "rc-upload": "~4.5.2", - "rc-util": "^5.40.1", + "rc-util": "^5.41.0", "scroll-into-view-if-needed": "^3.1.0", "throttle-debounce": "^5.0.0" }, @@ -13091,9 +13091,9 @@ } }, "node_modules/knip": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/knip/-/knip-5.16.0.tgz", - "integrity": "sha512-kdHfTRZuOqsMnvYYNT+pwefyBUNUYTqgyeGM8k4hfw++GZ3TMRGSPZoSl8IxQTy56AkxEDWyj1/P/mYv1vu/Gw==", + "version": "5.17.2", + "resolved": "https://registry.npmjs.org/knip/-/knip-5.17.2.tgz", + "integrity": "sha512-1DFsVQJpWeR2+RblRbf1TAmEfQkgUvYyhWpZdBIj8taR2GpTN2GpAf+iBuMlFpLkVYCsR++cp/G3bR68M5u68g==", "dev": true, "funding": [ { @@ -15045,9 +15045,9 @@ } }, "node_modules/rc-input": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/rc-input/-/rc-input-1.5.0.tgz", - "integrity": "sha512-Jq0+rV+0cZquDXnVArOjyimOPw+tib+EXPutyf9X6JyNGRmDsBoShdJ3OyUQnCrmaOGMVkpbvOkWqM+iAIsfzA==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/rc-input/-/rc-input-1.5.1.tgz", + "integrity": "sha512-+nOzQJDeIfIpNP/SgY45LXSKbuMlp4Yap2y8c+ZpU7XbLmNzUd6+d5/S75sA/52jsVE6S/AkhkkDEAOjIu7i6g==", "dependencies": { "@babel/runtime": "^7.11.1", "classnames": "^2.2.1", diff --git a/package.json b/package.json index 6c24c3cea..cf81d5f9b 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,8 @@ "dependencies": { "@ant-design/icons": "^5.3.7", "@axa-fr/react-oidc": "^7.22.6", - "@tanstack/react-query": "^5.37.1", - "antd": "^5.17.3", + "@tanstack/react-query": "^5.40.0", + "antd": "^5.17.4", "echarts": "5.5.0", "echarts-for-react": "^3.0.2", "rc-field-form": "^2.2.0", @@ -109,8 +109,8 @@ "@types/react": "^18.3.3", "@types/react-dom": "^18.3.0", "@types/uuid": "^9.0.8", - "@typescript-eslint/eslint-plugin": "^7.10.0", - "@typescript-eslint/parser": "^7.10.0", + "@typescript-eslint/eslint-plugin": "^7.11.0", + "@typescript-eslint/parser": "^7.11.0", "@vitejs/plugin-react": "^4.3.0", "env-cmd": "^10.1.0", "eslint": "^8.57.0", @@ -124,7 +124,7 @@ "identity-obj-proxy": "^3.0.0", "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", - "knip": "^5.16.0", + "knip": "^5.17.2", "openapi-typescript-codegen": "^0.29.0", "prettier": "3.2.5", "prettier-plugin-organize-imports": "^3.2.4", diff --git a/src/components/content/deployedServices/common/DeployedServicesRunningStatus.tsx b/src/components/content/deployedServices/common/DeployedServicesRunningStatus.tsx index 92efea257..8b02d909b 100644 --- a/src/components/content/deployedServices/common/DeployedServicesRunningStatus.tsx +++ b/src/components/content/deployedServices/common/DeployedServicesRunningStatus.tsx @@ -44,7 +44,12 @@ export function DeployedServicesRunningStatus(record: DeployedService): React.JS record.serviceState === DeployedService.serviceState.RESTARTING ) { return ( - } color='processing'> + } + color='processing' + className={myServicesStyle.myServiceStatusSize} + > {record.serviceState} ); diff --git a/src/components/content/deployedServices/myServices/MyServices.tsx b/src/components/content/deployedServices/myServices/MyServices.tsx index 68d228f0d..4ef96dcdd 100644 --- a/src/components/content/deployedServices/myServices/MyServices.tsx +++ b/src/components/content/deployedServices/myServices/MyServices.tsx @@ -20,7 +20,7 @@ import { import { Button, Dropdown, Image, MenuProps, Modal, Popconfirm, Row, Space, Table, Tooltip } from 'antd'; import type { ColumnsType } from 'antd/es/table'; import { ColumnFilterItem } from 'antd/es/table/interface'; -import React, { useState } from 'react'; +import React, { useEffect, useState } from 'react'; import { useNavigate, useSearchParams } from 'react-router-dom'; import appStyles from '../../../../styles/app.module.css'; import myServicesStyles from '../../../../styles/my-services.module.css'; @@ -49,6 +49,13 @@ import { PurgeServiceStatusAlert } from '../../order/purge/PurgeServiceStatusAle import { usePurgeRequestStatusQuery } from '../../order/purge/usePurgeRequestStatusQuery'; import { usePurgeRequestSubmitQuery } from '../../order/purge/usePurgeRequestSubmitQuery'; import { Scale } from '../../order/scale/Scale'; +import RestartServiceStatusAlert from '../../order/serviceState/restart/RestartServiceStatusAlert'; +import { useServiceStateRestartQuery } from '../../order/serviceState/restart/useServiceStateRestartQuery'; +import StartServiceStatusAlert from '../../order/serviceState/start/StartServiceStatusAlert'; +import { useServiceStateStartQuery } from '../../order/serviceState/start/useServiceStateStartQuery'; +import StopServiceStatusAlert from '../../order/serviceState/stop/StopServiceStatusAlert'; +import { useServiceStateStopQuery } from '../../order/serviceState/stop/useServiceStateStopQuery'; +import { useServiceDetailsByServiceStatePollingQuery } from '../../order/serviceState/useServiceDetailsByServiceStatePollingQuery'; import { useOrderFormStore } from '../../order/store/OrderFormStore'; import DeployedServicesError from '../common/DeployedServicesError'; import { DeployedServicesHostingType } from '../common/DeployedServicesHostingType'; @@ -57,14 +64,12 @@ import { DeployedServicesStatus } from '../common/DeployedServicesStatus'; import { MyServiceDetails } from './MyServiceDetails'; import useGetOrderableServiceDetailsQuery from './query/useGetOrderableServiceDetailsQuery'; import useListDeployedServicesDetailsQuery from './query/useListDeployedServicesDetailsQuery'; -import { useServiceStateRestartQuery } from './query/useServiceStateRestartQuery'; -import { useServiceStateStartQuery } from './query/useServiceStateStartQuery'; -import { useServiceStateStopQuery } from './query/useServiceStateStopQuery'; function MyServices(): React.JSX.Element { const [urlParams] = useSearchParams(); const serviceIdInQuery = getServiceIdFormQuery(); const serviceDeploymentStateInQuery = getServiceDeploymentStateFromQuery(); + const serviceStateInQuery = getServiceStateFromQuery(); let serviceVoList: DeployedService[] = []; let versionFilters: ColumnFilterItem[] = []; let serviceHostingTypeFilters: ColumnFilterItem[] = []; @@ -79,6 +84,9 @@ function MyServices(): React.JSX.Element { DeployedServiceDetails | VendorHostedDeployedServiceDetails | undefined >(undefined); const [cacheFormVariable] = useOrderFormStore((state) => [state.addDeployVariable]); + const [isStartRequestSubmitted, setIsStartRequestSubmitted] = useState(false); + const [isStopRequestSubmitted, setIsStopRequestSubmitted] = useState(false); + const [isRestartRequestSubmitted, setIsRestartRequestSubmitted] = useState(false); const [isDestroyRequestSubmitted, setIsDestroyRequestSubmitted] = useState(false); const [isPurgeRequestSubmitted, setIsPurgeRequestSubmitted] = useState(false); const [isMyServiceDetailsModalOpen, setIsMyServiceDetailsModalOpen] = useState(false); @@ -104,6 +112,37 @@ function MyServices(): React.JSX.Element { DeployedServiceDetails.serviceDeploymentState.DESTROY_SUCCESSFUL, ] ); + + const getStartServiceDetailsQuery = useServiceDetailsByServiceStatePollingQuery( + activeRecord?.id, + serviceStateStartQuery.isSuccess, + activeRecord?.serviceHostingType ?? DeployedService.serviceHostingType.SELF, + [DeployedServiceDetails.serviceState.RUNNING, DeployedServiceDetails.serviceState.STOPPED] + ); + + const getStopServiceDetailsQuery = useServiceDetailsByServiceStatePollingQuery( + activeRecord?.id, + serviceStateStopQuery.isSuccess, + activeRecord?.serviceHostingType ?? DeployedService.serviceHostingType.SELF, + [DeployedServiceDetails.serviceState.STOPPED, DeployedServiceDetails.serviceState.RUNNING] + ); + + const getRestartServiceDetailsQuery = useServiceDetailsByServiceStatePollingQuery( + activeRecord?.id, + serviceStateRestartQuery.isSuccess, + activeRecord?.serviceHostingType ?? DeployedService.serviceHostingType.SELF, + [DeployedServiceDetails.serviceState.RUNNING] + ); + + useEffect(() => { + void listDeployedServicesQuery.refetch(); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [ + getStartServiceDetailsQuery.data?.serviceState, + getStopServiceDetailsQuery.data?.serviceState, + getRestartServiceDetailsQuery.data?.serviceState, + ]); + const getPurgeServiceDetailsQuery = usePurgeRequestStatusQuery( activeRecord?.id, activeRecord?.serviceHostingType ?? DeployedService.serviceHostingType.SELF, @@ -115,6 +154,10 @@ function MyServices(): React.JSX.Element { serviceVoList = listDeployedServicesQuery.data.filter((serviceVo) => serviceDeploymentStateInQuery.includes(serviceVo.serviceDeploymentState) ); + } else if (serviceStateInQuery) { + serviceVoList = listDeployedServicesQuery.data.filter((serviceVo) => + serviceStateInQuery.includes(serviceVo.serviceState) + ); } else if (serviceIdInQuery) { serviceVoList = listDeployedServicesQuery.data.filter((serviceVo) => serviceVo.id === serviceIdInQuery); } else { @@ -588,6 +631,14 @@ function MyServices(): React.JSX.Element { return true; } + if ( + record.serviceState === DeployedService.serviceState.STARTING || + record.serviceState === DeployedService.serviceState.STOPPING || + record.serviceState === DeployedService.serviceState.RESTARTING + ) { + return true; + } + return record.serviceState === DeployedService.serviceState.RUNNING; }; @@ -608,6 +659,14 @@ function MyServices(): React.JSX.Element { return true; } + if ( + record.serviceState === DeployedService.serviceState.STARTING || + record.serviceState === DeployedService.serviceState.STOPPING || + record.serviceState === DeployedService.serviceState.RESTARTING + ) { + return true; + } + return record.serviceState === DeployedService.serviceState.STOPPED; }; @@ -619,6 +678,27 @@ function MyServices(): React.JSX.Element { } }; + const closeStartResultAlert = (isClose: boolean) => { + if (isClose) { + setActiveRecord(undefined); + setIsStartRequestSubmitted(false); + } + }; + + const closeStopResultAlert = (isClose: boolean) => { + if (isClose) { + setActiveRecord(undefined); + setIsStopRequestSubmitted(false); + } + }; + + const closeRestartResultAlert = (isClose: boolean) => { + if (isClose) { + setActiveRecord(undefined); + setIsRestartRequestSubmitted(false); + } + }; + const closePurgeResultAlert = (isClose: boolean) => { if (isClose) { setActiveRecord(undefined); @@ -744,7 +824,8 @@ function MyServices(): React.JSX.Element { title: 'ServiceState', dataIndex: 'serviceState', align: 'center', - filters: serviceStateFilters, + filters: serviceStateInQuery ? undefined : serviceStateFilters, + filtered: !!serviceStateInQuery, filterMode: 'tree', filterSearch: true, onFilter: (value: React.Key | boolean, record) => record.serviceState.startsWith(value.toString()), @@ -840,33 +921,36 @@ function MyServices(): React.JSX.Element { } function start(record: DeployedService): void { + setIsStartRequestSubmitted(true); setActiveRecord( record.serviceHostingType === DeployedService.serviceHostingType.SELF ? (record as DeployedServiceDetails) : (record as VendorHostedDeployedServiceDetails) ); - record.serviceState = DeployedService.serviceState.STARTING; serviceStateStartQuery.mutate(record); + record.serviceState = DeployedService.serviceState.STARTING; } function stop(record: DeployedService): void { + setIsStopRequestSubmitted(true); setActiveRecord( record.serviceHostingType === DeployedService.serviceHostingType.SELF ? (record as DeployedServiceDetails) : (record as VendorHostedDeployedServiceDetails) ); - record.serviceState = DeployedService.serviceState.STOPPING; serviceStateStopQuery.mutate(record); + record.serviceState = DeployedService.serviceState.STOPPING; } function restart(record: DeployedService): void { + setIsRestartRequestSubmitted(true); setActiveRecord( record.serviceHostingType === DeployedService.serviceHostingType.SELF ? (record as DeployedServiceDetails) : (record as VendorHostedDeployedServiceDetails) ); - record.serviceState = DeployedService.serviceState.STOPPING; serviceStateRestartQuery.mutate(record); + record.serviceState = DeployedService.serviceState.RESTARTING; } function migrate(record: DeployedService): void { @@ -1115,6 +1199,22 @@ function MyServices(): React.JSX.Element { return undefined; } + function getServiceStateFromQuery(): DeployedService.serviceState[] | undefined { + const serviceStateList: DeployedService.serviceState[] = []; + if (urlParams.size > 0) { + urlParams.forEach((value, key) => { + if ( + key === serviceStateQuery && + Object.values(DeployedService.serviceState).includes(value as DeployedService.serviceState) + ) { + serviceStateList.push(value as DeployedService.serviceState); + } + }); + return serviceStateList; + } + return undefined; + } + function getServiceIdFormQuery(): string | undefined { const queryInUri = decodeURI(urlParams.get(serviceIdQuery) ?? ''); if (queryInUri.length > 0) { @@ -1135,6 +1235,33 @@ function MyServices(): React.JSX.Element { closeDestroyResultAlert={closeDestroyResultAlert} /> ) : null} + {isStartRequestSubmitted && activeRecord ? ( + + ) : null} + {isStopRequestSubmitted && activeRecord ? ( + + ) : null} + {isRestartRequestSubmitted && activeRecord ? ( + + ) : null} {isPurgeRequestSubmitted && activeRecord ? ( ; + closeRestartResultAlert: (arg: boolean) => void; + getRestartServiceDetailsQuery: UseQueryResult; +}): React.JSX.Element { + const getOrderableServiceDetails = useGetOrderableServiceDetailsQuery(deployedService.serviceTemplateId); + + const onClose = () => { + closeRestartResultAlert(true); + }; + + if (serviceStateRestartQuery.isError) { + let errorMessage; + if ( + serviceStateRestartQuery.error instanceof ApiError && + serviceStateRestartQuery.error.body && + 'details' in serviceStateRestartQuery.error.body + ) { + const response: Response = serviceStateRestartQuery.error.body as Response; + errorMessage = response.details; + } else { + errorMessage = serviceStateRestartQuery.error.message; + } + return ( +
+ {' '} + } + showIcon + closable={true} + onClose={onClose} + type={'error'} + action={ + <> + {getOrderableServiceDetails.isSuccess ? ( + + ) : ( + <> + )} + + } + />{' '} +
+ ); + } + + if (getRestartServiceDetailsQuery.isError) { + if ( + getRestartServiceDetailsQuery.error instanceof ApiError && + 'details' in getRestartServiceDetailsQuery.error.body + ) { + const response: Response = getRestartServiceDetailsQuery.error.body as Response; + return ( +
+ {' '} + + } + showIcon + closable={true} + onClose={onClose} + type={'error'} + action={ + <> + {getOrderableServiceDetails.isSuccess ? ( + + ) : ( + <> + )} + + } + />{' '} +
+ ); + } + } + + if ( + getRestartServiceDetailsQuery.isSuccess && + getRestartServiceDetailsQuery.data.latestRunningManagementTask && + getRestartServiceDetailsQuery.data.latestRunningManagementTask.taskId === serviceStateRestartQuery.data + ) { + if ( + getRestartServiceDetailsQuery.data.latestRunningManagementTask.taskStatus.toString() === + ServiceStateManagementTaskDetails.taskStatus.SUCCESSFUL.toString() + ) { + return ( +
+ {' '} + + } + showIcon + closable={true} + onClose={onClose} + type={'success'} + />{' '} +
+ ); + } else if ( + getRestartServiceDetailsQuery.data.latestRunningManagementTask.taskStatus.toString() === + ServiceStateManagementTaskDetails.taskStatus.FAILED.toString() + ) { + return ( +
+ {' '} + + } + showIcon + closable={true} + onClose={onClose} + type={'error'} + action={ + <> + {getOrderableServiceDetails.isSuccess ? ( + + ) : ( + <> + )} + + } + />{' '} +
+ ); + } else if ( + getRestartServiceDetailsQuery.data.latestRunningManagementTask.taskStatus.toString() === + ServiceStateManagementTaskDetails.taskStatus.IN_PROGRESS.toString() + ) { + deployedService.serviceState = DeployedService.serviceState.RESTARTING; + } + } + return <>; +} + +export default RestartServiceStatusAlert; diff --git a/src/components/content/deployedServices/myServices/query/useServiceStateRestartQuery.ts b/src/components/content/order/serviceState/restart/useServiceStateRestartQuery.ts similarity index 100% rename from src/components/content/deployedServices/myServices/query/useServiceStateRestartQuery.ts rename to src/components/content/order/serviceState/restart/useServiceStateRestartQuery.ts diff --git a/src/components/content/order/serviceState/start/StartServiceStatusAlert.tsx b/src/components/content/order/serviceState/start/StartServiceStatusAlert.tsx new file mode 100644 index 000000000..94cc643cb --- /dev/null +++ b/src/components/content/order/serviceState/start/StartServiceStatusAlert.tsx @@ -0,0 +1,204 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * SPDX-FileCopyrightText: Huawei Inc. + */ + +import { UseMutationResult, UseQueryResult } from '@tanstack/react-query'; +import { Alert } from 'antd'; +import React from 'react'; +import submitAlertStyles from '../../../../../styles/submit-alert.module.css'; +import { + ApiError, + DeployedService, + Response, + ServiceStateManagementTaskDetails, + VendorHostedDeployedServiceDetails, +} from '../../../../../xpanse-api/generated'; +import { ContactDetailsShowType } from '../../../common/ocl/ContactDetailsShowType'; +import { ContactDetailsText } from '../../../common/ocl/ContactDetailsText'; +import useGetOrderableServiceDetailsQuery from '../../../deployedServices/myServices/query/useGetOrderableServiceDetailsQuery'; +import OrderSubmitResultDetails from '../../orderStatus/OrderSubmitResultDetails'; + +function StartServiceStatusAlert({ + deployedService, + serviceStateStartQuery, + + closeStartResultAlert, + getStartServiceDetailsQuery, +}: { + deployedService: DeployedService; + serviceStateStartQuery: UseMutationResult; + closeStartResultAlert: (arg: boolean) => void; + getStartServiceDetailsQuery: UseQueryResult; +}): React.JSX.Element { + const getOrderableServiceDetails = useGetOrderableServiceDetailsQuery(deployedService.serviceTemplateId); + + const onClose = () => { + closeStartResultAlert(true); + }; + + if (serviceStateStartQuery.isError) { + let errorMessage; + if ( + serviceStateStartQuery.error instanceof ApiError && + serviceStateStartQuery.error.body && + 'details' in serviceStateStartQuery.error.body + ) { + const response: Response = serviceStateStartQuery.error.body as Response; + errorMessage = response.details; + } else { + errorMessage = serviceStateStartQuery.error.message; + } + return ( +
+ {' '} + } + showIcon + closable={true} + onClose={onClose} + type={'error'} + action={ + <> + {getOrderableServiceDetails.isSuccess ? ( + + ) : ( + <> + )} + + } + />{' '} +
+ ); + } + + if (getStartServiceDetailsQuery.isError) { + if ( + getStartServiceDetailsQuery.error instanceof ApiError && + 'details' in getStartServiceDetailsQuery.error.body + ) { + const response: Response = getStartServiceDetailsQuery.error.body as Response; + return ( +
+ {' '} + + } + showIcon + closable={true} + onClose={onClose} + type={'error'} + action={ + <> + {getOrderableServiceDetails.isSuccess ? ( + + ) : ( + <> + )} + + } + />{' '} +
+ ); + } + } + + if ( + getStartServiceDetailsQuery.isSuccess && + getStartServiceDetailsQuery.data.latestRunningManagementTask && + getStartServiceDetailsQuery.data.latestRunningManagementTask.taskId === serviceStateStartQuery.data + ) { + if ( + getStartServiceDetailsQuery.data.latestRunningManagementTask.taskStatus.toString() === + ServiceStateManagementTaskDetails.taskStatus.SUCCESSFUL.toString() + ) { + return ( +
+ {' '} + + } + showIcon + closable={true} + onClose={onClose} + type={'success'} + />{' '} +
+ ); + } else if ( + getStartServiceDetailsQuery.data.latestRunningManagementTask.taskStatus.toString() === + ServiceStateManagementTaskDetails.taskStatus.FAILED.toString() + ) { + return ( +
+ {' '} + + } + showIcon + closable={true} + onClose={onClose} + type={'error'} + action={ + <> + {getOrderableServiceDetails.isSuccess ? ( + + ) : ( + <> + )} + + } + />{' '} +
+ ); + } else if ( + getStartServiceDetailsQuery.data.latestRunningManagementTask.taskStatus.toString() === + ServiceStateManagementTaskDetails.taskStatus.IN_PROGRESS.toString() + ) { + deployedService.serviceState = DeployedService.serviceState.STARTING; + } + } + return <>; +} + +export default StartServiceStatusAlert; diff --git a/src/components/content/deployedServices/myServices/query/useServiceStateStartQuery.ts b/src/components/content/order/serviceState/start/useServiceStateStartQuery.ts similarity index 100% rename from src/components/content/deployedServices/myServices/query/useServiceStateStartQuery.ts rename to src/components/content/order/serviceState/start/useServiceStateStartQuery.ts diff --git a/src/components/content/order/serviceState/stop/StopServiceStatusAlert.tsx b/src/components/content/order/serviceState/stop/StopServiceStatusAlert.tsx new file mode 100644 index 000000000..8730eb37a --- /dev/null +++ b/src/components/content/order/serviceState/stop/StopServiceStatusAlert.tsx @@ -0,0 +1,206 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * SPDX-FileCopyrightText: Huawei Inc. + */ + +import { UseMutationResult, UseQueryResult } from '@tanstack/react-query'; +import { Alert } from 'antd'; +import React from 'react'; +import submitAlertStyles from '../../../../../styles/submit-alert.module.css'; +import { + ApiError, + DeployedService, + Response, + ServiceStateManagementTaskDetails, + VendorHostedDeployedServiceDetails, +} from '../../../../../xpanse-api/generated'; +import { ContactDetailsShowType } from '../../../common/ocl/ContactDetailsShowType'; +import { ContactDetailsText } from '../../../common/ocl/ContactDetailsText'; +import useGetOrderableServiceDetailsQuery from '../../../deployedServices/myServices/query/useGetOrderableServiceDetailsQuery'; +import OrderSubmitResultDetails from '../../orderStatus/OrderSubmitResultDetails'; + +function StopServiceStatusAlert({ + deployedService, + serviceStateStopQuery, + closeStopResultAlert, + getStopServiceDetailsQuery, +}: { + deployedService: DeployedService; + serviceStateStopQuery: UseMutationResult; + closeStopResultAlert: (arg: boolean) => void; + getStopServiceDetailsQuery: UseQueryResult; +}): React.JSX.Element { + const getOrderableServiceDetails = useGetOrderableServiceDetailsQuery(deployedService.serviceTemplateId); + + const onClose = () => { + closeStopResultAlert(true); + }; + + if (serviceStateStopQuery.isError) { + let errorMessage; + if ( + serviceStateStopQuery.error instanceof ApiError && + serviceStateStopQuery.error.body && + 'details' in serviceStateStopQuery.error.body + ) { + const response: Response = serviceStateStopQuery.error.body as Response; + errorMessage = response.details; + } else { + errorMessage = serviceStateStopQuery.error.message; + } + + return ( +
+ {' '} + + } + showIcon + closable={true} + onClose={onClose} + type={'error'} + action={ + <> + {getOrderableServiceDetails.isSuccess ? ( + + ) : ( + <> + )} + + } + />{' '} +
+ ); + } + + if (getStopServiceDetailsQuery.isError) { + if ( + getStopServiceDetailsQuery.error instanceof ApiError && + 'details' in getStopServiceDetailsQuery.error.body + ) { + const response: Response = getStopServiceDetailsQuery.error.body as Response; + return ( +
+ {' '} + + } + showIcon + closable={true} + onClose={onClose} + type={'error'} + action={ + <> + {getOrderableServiceDetails.isSuccess ? ( + + ) : ( + <> + )} + + } + />{' '} +
+ ); + } + } + + if ( + getStopServiceDetailsQuery.isSuccess && + getStopServiceDetailsQuery.data.latestRunningManagementTask && + getStopServiceDetailsQuery.data.latestRunningManagementTask.taskId === serviceStateStopQuery.data + ) { + if ( + getStopServiceDetailsQuery.data.latestRunningManagementTask.taskStatus.toString() === + ServiceStateManagementTaskDetails.taskStatus.SUCCESSFUL.toString() + ) { + return ( +
+ {' '} + + } + showIcon + closable={true} + onClose={onClose} + type={'success'} + />{' '} +
+ ); + } else if ( + getStopServiceDetailsQuery.data.latestRunningManagementTask.taskStatus.toString() === + ServiceStateManagementTaskDetails.taskStatus.FAILED.toString() + ) { + return ( +
+ {' '} + + } + showIcon + closable={true} + onClose={onClose} + type={'error'} + action={ + <> + {getOrderableServiceDetails.isSuccess ? ( + + ) : ( + <> + )} + + } + />{' '} +
+ ); + } else if ( + getStopServiceDetailsQuery.data.latestRunningManagementTask.taskStatus.toString() === + ServiceStateManagementTaskDetails.taskStatus.IN_PROGRESS.toString() + ) { + deployedService.serviceState = DeployedService.serviceState.STOPPING; + } + } + return <>; +} + +export default StopServiceStatusAlert; diff --git a/src/components/content/deployedServices/myServices/query/useServiceStateStopQuery.ts b/src/components/content/order/serviceState/stop/useServiceStateStopQuery.ts similarity index 100% rename from src/components/content/deployedServices/myServices/query/useServiceStateStopQuery.ts rename to src/components/content/order/serviceState/stop/useServiceStateStopQuery.ts diff --git a/src/components/content/order/serviceState/useServiceDetailsByServiceStatePollingQuery.ts b/src/components/content/order/serviceState/useServiceDetailsByServiceStatePollingQuery.ts new file mode 100644 index 000000000..0ddb2dd7c --- /dev/null +++ b/src/components/content/order/serviceState/useServiceDetailsByServiceStatePollingQuery.ts @@ -0,0 +1,36 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * SPDX-FileCopyrightText: Huawei Inc. + */ + +import { useQuery } from '@tanstack/react-query'; +import { DeployedService, DeployedServiceDetails, ServiceService } from '../../../../xpanse-api/generated'; +import { deploymentStatusPollingInterval } from '../../../utils/constants'; + +export function useServiceDetailsByServiceStatePollingQuery( + uuid: string | undefined, + isStartPolling: boolean, + serviceHostingType: DeployedService.serviceHostingType, + refetchUntilStates: DeployedServiceDetails.serviceState[] +) { + return useQuery({ + queryKey: ['getServiceDetailsById', uuid, serviceHostingType], + queryFn: () => { + if (serviceHostingType === DeployedService.serviceHostingType.SELF) { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + return ServiceService.getSelfHostedServiceDetailsById(uuid!); + } else { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + return ServiceService.getVendorHostedServiceDetailsById(uuid!); + } + }, + refetchInterval: (query) => + query.state.data && refetchUntilStates.includes(query.state.data.serviceState) + ? false + : deploymentStatusPollingInterval, + refetchIntervalInBackground: true, + refetchOnWindowFocus: false, + enabled: uuid !== undefined && isStartPolling, + gcTime: 0, + }); +} diff --git a/src/xpanse-api/api.json b/src/xpanse-api/api.json index 9a34672d0..928c95c6b 100644 --- a/src/xpanse-api/api.json +++ b/src/xpanse-api/api.json @@ -26,6 +26,7 @@ { "name": "Admin", "description": "APIs for administrating Xpanse" }, { "name": "Workflow", "description": "APIs to manage the Workflow" }, { "name": "ServiceStatusManagement", "description": "APIs to manage status of the service instances" }, + { "name": "ServicePrices", "description": "API to manage prices of the flavors of the service." }, { "name": "ISVCloudCredentialsManagement", "description": "APIs for managing isv's cloud provider credentials" @@ -66,10 +67,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -82,6 +79,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -117,10 +118,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -133,6 +130,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -182,10 +183,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -198,6 +195,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -230,10 +231,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -246,6 +243,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -268,10 +269,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -284,6 +281,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -338,10 +339,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -354,6 +351,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -373,10 +374,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -389,6 +386,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -411,10 +412,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -427,6 +424,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -449,10 +450,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -465,6 +462,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -499,10 +500,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -515,6 +512,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -551,10 +552,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -567,6 +564,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -594,10 +595,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -610,6 +607,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -644,10 +645,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -660,6 +657,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -690,10 +691,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -706,6 +703,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -742,10 +743,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -758,6 +755,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -792,22 +793,22 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "400": { - "description": "Bad Request", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -832,10 +833,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -848,6 +845,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -884,10 +885,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -900,6 +897,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -922,10 +923,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -938,6 +935,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -957,10 +958,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -973,6 +970,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1007,10 +1008,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1023,6 +1020,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1043,10 +1044,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1059,6 +1056,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1108,10 +1109,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1124,6 +1121,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1156,10 +1157,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1172,6 +1169,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1194,10 +1195,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1210,6 +1207,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1264,10 +1265,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1280,6 +1277,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1376,10 +1377,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1392,6 +1389,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1422,10 +1423,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1438,6 +1435,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1463,10 +1464,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1479,6 +1476,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1574,10 +1575,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1590,6 +1587,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1620,10 +1621,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1636,6 +1633,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1668,22 +1669,22 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "400": { - "description": "Bad Request", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1716,10 +1717,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1732,6 +1729,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1761,10 +1762,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1777,6 +1774,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1828,10 +1829,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1844,6 +1841,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1873,10 +1874,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1889,6 +1886,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1919,10 +1920,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1935,6 +1932,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1983,10 +1984,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -1999,6 +1996,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2034,10 +2035,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2050,6 +2047,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2084,10 +2085,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2100,6 +2097,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2135,10 +2136,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2151,6 +2148,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2178,10 +2179,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2194,6 +2191,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2226,10 +2227,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2242,6 +2239,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2269,10 +2270,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2285,6 +2282,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2317,10 +2318,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2333,6 +2330,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2400,10 +2401,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2416,6 +2413,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2453,10 +2454,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2469,6 +2466,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2570,10 +2571,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2586,6 +2583,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2623,10 +2624,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2639,6 +2636,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2740,10 +2741,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2756,6 +2753,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2793,10 +2794,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2809,6 +2806,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2843,10 +2844,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2859,6 +2856,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2872,10 +2873,10 @@ } } }, - "/xpanse/pricing/{templateId}/{region}/{flavorName}/{billingMode}": { + "/xpanse/pricing/{templateId}/{region}/{billingMode}/{flavorName}": { "get": { - "tags": ["CloudResources"], - "description": "List existing cloud resource names with kind
Required role: admin or user", + "tags": ["ServicePrices"], + "description": "Get the price of one specific flavor of the service.
Required role: admin or user", "operationId": "getServicePriceByFlavor", "parameters": [ { @@ -2892,12 +2893,74 @@ "required": true, "schema": { "type": "string" } }, + { + "name": "billingMode", + "in": "path", + "description": "mode of billing", + "required": true, + "schema": { "type": "string", "enum": ["Fixed", "Pay per Use"] } + }, { "name": "flavorName", "in": "path", "description": "flavor name of the service", "required": true, "schema": { "type": "string" } + } + ], + "responses": { + "500": { + "description": "Internal Server Error", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "400": { + "description": "Bad Request", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "422": { + "description": "Unprocessable Entity", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "403": { + "description": "Forbidden", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "502": { + "description": "Bad Gateway", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, + "200": { + "description": "OK", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/FlavorPriceResult" } } + } + } + } + } + }, + "/xpanse/pricing/service/{templateId}/{region}/{billingMode}": { + "get": { + "tags": ["ServicePrices"], + "description": "Get the prices of all flavors of the service
Required role: admin or user", + "operationId": "getPricesByService", + "parameters": [ + { + "name": "templateId", + "in": "path", + "description": "id of the service template", + "required": true, + "schema": { "type": "string" } + }, + { + "name": "region", + "in": "path", + "description": "region name of the service", + "required": true, + "schema": { "type": "string" } }, { "name": "billingMode", @@ -2912,10 +2975,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -2928,13 +2987,24 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, "200": { "description": "OK", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServicePrice" } } } + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { "$ref": "#/components/schemas/FlavorPriceResult" } + } + } + } } } } @@ -3003,10 +3073,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3019,6 +3085,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3044,10 +3114,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3060,6 +3126,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3081,10 +3151,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3097,6 +3163,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3192,10 +3262,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3208,6 +3274,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3245,10 +3315,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3261,6 +3327,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3333,10 +3403,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3349,6 +3415,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3400,10 +3470,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3416,6 +3482,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3470,10 +3540,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3486,6 +3552,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3545,10 +3615,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3561,6 +3627,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3610,10 +3680,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3626,6 +3692,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3724,10 +3794,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3740,6 +3806,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3783,10 +3853,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3799,6 +3865,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3823,10 +3893,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3839,6 +3905,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3876,10 +3946,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3892,6 +3958,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3915,10 +3985,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3931,6 +3997,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3950,10 +4020,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3966,6 +4032,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -3988,10 +4058,6 @@ "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, - "401": { - "description": "Unauthorized", - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } - }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -4004,6 +4070,10 @@ "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } + }, "502": { "description": "Bad Gateway", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Response" } } } @@ -5557,11 +5627,20 @@ } } }, - "ServicePrice": { + "FlavorPriceResult": { + "required": ["billingMode", "flavorName"], "type": "object", "properties": { + "flavorName": { "type": "string", "description": "The name of the flavor." }, + "billingMode": { + "type": "string", + "description": "The billing mode of the price.", + "enum": ["Fixed", "Pay per Use"] + }, "recurringPrice": { "$ref": "#/components/schemas/Price" }, - "oneTimePaymentPrice": { "$ref": "#/components/schemas/Price" } + "oneTimePaymentPrice": { "$ref": "#/components/schemas/Price" }, + "errorMessage": { "type": "string", "description": "Error reason when price calculation fails." }, + "successful": { "type": "boolean" } } }, "Metric": { diff --git a/src/xpanse-api/generated/index.ts b/src/xpanse-api/generated/index.ts index ebc1cc0f4..ff629fa27 100644 --- a/src/xpanse-api/generated/index.ts +++ b/src/xpanse-api/generated/index.ts @@ -28,6 +28,7 @@ export { DeployVariableKind } from './models/DeployVariableKind'; export { DeployedService } from './models/DeployedService'; export { DeployedServiceDetails } from './models/DeployedServiceDetails'; export { Deployment } from './models/Deployment'; +export { FlavorPriceResult } from './models/FlavorPriceResult'; export type { FlavorsWithPrice } from './models/FlavorsWithPrice'; export type { Link } from './models/Link'; export { Metric } from './models/Metric'; @@ -52,7 +53,6 @@ export { ServiceModificationAuditDetails } from './models/ServiceModificationAud export type { ServicePolicy } from './models/ServicePolicy'; export type { ServicePolicyCreateRequest } from './models/ServicePolicyCreateRequest'; export type { ServicePolicyUpdateRequest } from './models/ServicePolicyUpdateRequest'; -export type { ServicePrice } from './models/ServicePrice'; export type { ServiceProviderContactDetails } from './models/ServiceProviderContactDetails'; export { ServiceStateManagementTaskDetails } from './models/ServiceStateManagementTaskDetails'; export { ServiceTemplateDetailVo } from './models/ServiceTemplateDetailVo'; @@ -76,6 +76,7 @@ export { MonitorService } from './services/MonitorService'; export { ServiceCatalogService } from './services/ServiceCatalogService'; export { ServiceModificationService } from './services/ServiceModificationService'; export { ServicePoliciesManagementService } from './services/ServicePoliciesManagementService'; +export { ServicePricesService } from './services/ServicePricesService'; export { ServiceService } from './services/ServiceService'; export { ServiceStatusManagementService } from './services/ServiceStatusManagementService'; export { ServiceVendorService } from './services/ServiceVendorService'; diff --git a/src/xpanse-api/generated/models/FlavorPriceResult.ts b/src/xpanse-api/generated/models/FlavorPriceResult.ts new file mode 100644 index 000000000..1cd0e554f --- /dev/null +++ b/src/xpanse-api/generated/models/FlavorPriceResult.ts @@ -0,0 +1,36 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * SPDX-FileCopyrightText: Huawei Inc. + */ + +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { Price } from './Price'; +export type FlavorPriceResult = { + /** + * The name of the flavor. + */ + flavorName: string; + /** + * The billing mode of the price. + */ + billingMode: FlavorPriceResult.billingMode; + recurringPrice?: Price; + oneTimePaymentPrice?: Price; + /** + * Error reason when price calculation fails. + */ + errorMessage?: string; + successful?: boolean; +}; +export namespace FlavorPriceResult { + /** + * The billing mode of the price. + */ + export enum billingMode { + FIXED = 'Fixed', + PAY_PER_USE = 'Pay per Use', + } +} diff --git a/src/xpanse-api/generated/models/ServicePrice.ts b/src/xpanse-api/generated/models/ServicePrice.ts deleted file mode 100644 index ca9474cd6..000000000 --- a/src/xpanse-api/generated/models/ServicePrice.ts +++ /dev/null @@ -1,14 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * SPDX-FileCopyrightText: Huawei Inc. - */ - -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Price } from './Price'; -export type ServicePrice = { - recurringPrice?: Price; - oneTimePaymentPrice?: Price; -}; diff --git a/src/xpanse-api/generated/services/CloudResourcesService.ts b/src/xpanse-api/generated/services/CloudResourcesService.ts index 72dc43bb4..a2c10e129 100644 --- a/src/xpanse-api/generated/services/CloudResourcesService.ts +++ b/src/xpanse-api/generated/services/CloudResourcesService.ts @@ -10,42 +10,7 @@ import type { CancelablePromise } from '../core/CancelablePromise'; import { OpenAPI } from '../core/OpenAPI'; import { request as __request } from '../core/request'; -import type { ServicePrice } from '../models/ServicePrice'; export class CloudResourcesService { - /** - * List existing cloud resource names with kind
Required role: admin or user - * @param templateId id of the service template - * @param region region name of the service - * @param flavorName flavor name of the service - * @param billingMode mode of billing - * @returns ServicePrice OK - * @throws ApiError - */ - public static getServicePriceByFlavor( - templateId: string, - region: string, - flavorName: string, - billingMode: 'Fixed' | 'Pay per Use' - ): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/xpanse/pricing/{templateId}/{region}/{flavorName}/{billingMode}', - path: { - templateId: templateId, - region: region, - flavorName: flavorName, - billingMode: billingMode, - }, - errors: { - 400: `Bad Request`, - 401: `Unauthorized`, - 403: `Forbidden`, - 422: `Unprocessable Entity`, - 500: `Internal Server Error`, - 502: `Bad Gateway`, - }, - }); - } /** * List existing cloud resource names with kind
Required role: admin or user * @param csp name of the cloud service provider diff --git a/src/xpanse-api/generated/services/ServicePricesService.ts b/src/xpanse-api/generated/services/ServicePricesService.ts new file mode 100644 index 000000000..25561e6dc --- /dev/null +++ b/src/xpanse-api/generated/services/ServicePricesService.ts @@ -0,0 +1,80 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * SPDX-FileCopyrightText: Huawei Inc. + */ + +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { CancelablePromise } from '../core/CancelablePromise'; +import { OpenAPI } from '../core/OpenAPI'; +import { request as __request } from '../core/request'; +import type { FlavorPriceResult } from '../models/FlavorPriceResult'; +export class ServicePricesService { + /** + * Get the price of one specific flavor of the service.
Required role: admin or user + * @param templateId id of the service template + * @param region region name of the service + * @param billingMode mode of billing + * @param flavorName flavor name of the service + * @returns FlavorPriceResult OK + * @throws ApiError + */ + public static getServicePriceByFlavor( + templateId: string, + region: string, + billingMode: 'Fixed' | 'Pay per Use', + flavorName: string + ): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/xpanse/pricing/{templateId}/{region}/{billingMode}/{flavorName}', + path: { + templateId: templateId, + region: region, + billingMode: billingMode, + flavorName: flavorName, + }, + errors: { + 400: `Bad Request`, + 401: `Unauthorized`, + 403: `Forbidden`, + 422: `Unprocessable Entity`, + 500: `Internal Server Error`, + 502: `Bad Gateway`, + }, + }); + } + /** + * Get the prices of all flavors of the service
Required role: admin or user + * @param templateId id of the service template + * @param region region name of the service + * @param billingMode mode of billing + * @returns FlavorPriceResult OK + * @throws ApiError + */ + public static getPricesByService( + templateId: string, + region: string, + billingMode: 'Fixed' | 'Pay per Use' + ): CancelablePromise> { + return __request(OpenAPI, { + method: 'GET', + url: '/xpanse/pricing/service/{templateId}/{region}/{billingMode}', + path: { + templateId: templateId, + region: region, + billingMode: billingMode, + }, + errors: { + 400: `Bad Request`, + 401: `Unauthorized`, + 403: `Forbidden`, + 422: `Unprocessable Entity`, + 500: `Internal Server Error`, + 502: `Bad Gateway`, + }, + }); + } +}