@stack-spot/portal-network 0.199.0 → 0.200.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +170 -0
- package/dist/api/account.d.ts +331 -89
- package/dist/api/account.d.ts.map +1 -1
- package/dist/api/account.js +203 -46
- package/dist/api/account.js.map +1 -1
- package/dist/api/accountAssetManager.d.ts +279 -0
- package/dist/api/accountAssetManager.d.ts.map +1 -0
- package/dist/api/accountAssetManager.js +167 -0
- package/dist/api/accountAssetManager.js.map +1 -0
- package/dist/api/agent-tools.d.ts +152 -148
- package/dist/api/agent-tools.d.ts.map +1 -1
- package/dist/api/agent-tools.js +41 -4
- package/dist/api/agent-tools.js.map +1 -1
- package/dist/api/ai.d.ts +287 -19
- package/dist/api/ai.d.ts.map +1 -1
- package/dist/api/ai.js +196 -11
- package/dist/api/ai.js.map +1 -1
- package/dist/api/cloudPlatformHorizon.d.ts +178 -9
- package/dist/api/cloudPlatformHorizon.d.ts.map +1 -1
- package/dist/api/cloudPlatformHorizon.js +69 -1
- package/dist/api/cloudPlatformHorizon.js.map +1 -1
- package/dist/api/codeShift.d.ts +107 -6
- package/dist/api/codeShift.d.ts.map +1 -1
- package/dist/api/codeShift.js +70 -6
- package/dist/api/codeShift.js.map +1 -1
- package/dist/api/dataIntegration.d.ts +291 -1
- package/dist/api/dataIntegration.d.ts.map +1 -1
- package/dist/api/dataIntegration.js +254 -0
- package/dist/api/dataIntegration.js.map +1 -1
- package/dist/api/discover.d.ts +79 -4
- package/dist/api/discover.d.ts.map +1 -1
- package/dist/api/discover.js +73 -7
- package/dist/api/discover.js.map +1 -1
- package/dist/api/edpBfa.d.ts +215 -0
- package/dist/api/edpBfa.d.ts.map +1 -0
- package/dist/api/edpBfa.js +87 -0
- package/dist/api/edpBfa.js.map +1 -0
- package/dist/api-addresses.d.ts +11 -20
- package/dist/api-addresses.d.ts.map +1 -1
- package/dist/api-addresses.js +31 -17
- package/dist/api-addresses.js.map +1 -1
- package/dist/apis-itau.json +16 -0
- package/dist/apis.json +16 -0
- package/dist/client/account-asset-manager.d.ts +110 -0
- package/dist/client/account-asset-manager.d.ts.map +1 -0
- package/dist/client/account-asset-manager.js +160 -0
- package/dist/client/account-asset-manager.js.map +1 -0
- package/dist/client/account.d.ts +11 -9
- package/dist/client/account.d.ts.map +1 -1
- package/dist/client/account.js +11 -8
- package/dist/client/account.js.map +1 -1
- package/dist/client/agent-tools.d.ts +35 -2
- package/dist/client/agent-tools.d.ts.map +1 -1
- package/dist/client/agent-tools.js +26 -3
- package/dist/client/agent-tools.js.map +1 -1
- package/dist/client/ai.d.ts +160 -2
- package/dist/client/ai.d.ts.map +1 -1
- package/dist/client/ai.js +120 -2
- package/dist/client/ai.js.map +1 -1
- package/dist/client/cloud-platform-horizon.d.ts +19 -0
- package/dist/client/cloud-platform-horizon.d.ts.map +1 -1
- package/dist/client/cloud-platform-horizon.js +19 -1
- package/dist/client/cloud-platform-horizon.js.map +1 -1
- package/dist/client/code-shift.d.ts +51 -2
- package/dist/client/code-shift.d.ts.map +1 -1
- package/dist/client/code-shift.js +46 -1
- package/dist/client/code-shift.js.map +1 -1
- package/dist/client/data-integration.d.ts +30 -0
- package/dist/client/data-integration.d.ts.map +1 -1
- package/dist/client/data-integration.js +29 -2
- package/dist/client/data-integration.js.map +1 -1
- package/dist/client/discover.d.ts +16 -2
- package/dist/client/discover.d.ts.map +1 -1
- package/dist/client/discover.js +28 -1
- package/dist/client/discover.js.map +1 -1
- package/dist/client/edp-bfa.d.ts +16 -0
- package/dist/client/edp-bfa.d.ts.map +1 -0
- package/dist/client/edp-bfa.js +24 -0
- package/dist/client/edp-bfa.js.map +1 -0
- package/dist/client/notification.d.ts +7 -0
- package/dist/client/notification.d.ts.map +1 -1
- package/dist/client/notification.js +10 -1
- package/dist/client/notification.js.map +1 -1
- package/dist/client/secrets.d.ts.map +1 -1
- package/dist/client/secrets.js +1 -1
- package/dist/client/secrets.js.map +1 -1
- package/dist/client/workspace-ai.d.ts +5 -5
- package/dist/client/workspace-manager.d.ts +15 -0
- package/dist/client/workspace-manager.d.ts.map +1 -1
- package/dist/client/workspace-manager.js +19 -1
- package/dist/client/workspace-manager.js.map +1 -1
- package/dist/error/dictionary/accountAssetManager.d.ts +11 -0
- package/dist/error/dictionary/accountAssetManager.d.ts.map +1 -0
- package/dist/error/dictionary/accountAssetManager.js +11 -0
- package/dist/error/dictionary/accountAssetManager.js.map +1 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/network/NetworkClient.js.map +1 -1
- package/package.json +2 -2
- package/src/api/account.ts +579 -163
- package/src/api/accountAssetManager.ts +655 -0
- package/src/api/agent-tools.ts +201 -152
- package/src/api/ai.ts +520 -24
- package/src/api/cloudPlatformHorizon.ts +412 -9
- package/src/api/codeShift.ts +210 -9
- package/src/api/dataIntegration.ts +635 -1
- package/src/api/discover.ts +153 -10
- package/src/api/edpBfa.ts +472 -0
- package/src/api-addresses.ts +56 -37
- package/src/apis-itau.json +16 -0
- package/src/apis.json +16 -0
- package/src/client/account-asset-manager.ts +100 -0
- package/src/client/account.ts +11 -7
- package/src/client/agent-tools.ts +17 -3
- package/src/client/ai.ts +91 -10
- package/src/client/cloud-platform-horizon.ts +12 -4
- package/src/client/code-shift.ts +29 -0
- package/src/client/data-integration.ts +23 -2
- package/src/client/discover.ts +15 -2
- package/src/client/edp-bfa.ts +24 -0
- package/src/client/notification.ts +6 -1
- package/src/client/secrets.ts +1 -1
- package/src/client/workspace-manager.ts +13 -0
- package/src/error/dictionary/accountAssetManager.ts +12 -0
- package/src/index.ts +4 -1
- package/src/network/NetworkClient.ts +1 -1
package/src/api-addresses.ts
CHANGED
|
@@ -5,26 +5,26 @@ import { Env, Tenant } from './network/types'
|
|
|
5
5
|
|
|
6
6
|
type ApisKeys = keyof typeof apisJson;
|
|
7
7
|
|
|
8
|
+
declare global {
|
|
9
|
+
interface ImportMeta {
|
|
10
|
+
readonly env: {
|
|
11
|
+
VITE_NETWORK_OVERRIDES: string,
|
|
12
|
+
DEV: boolean,
|
|
13
|
+
PROD: boolean,
|
|
14
|
+
},
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
8
18
|
type ApiConfig = {
|
|
9
19
|
url: Record<Env, string>,
|
|
10
20
|
docs?: string,
|
|
11
21
|
}
|
|
12
22
|
|
|
13
|
-
type PartialApiConfig = {
|
|
14
|
-
url: Partial<Record<Env, string>>,
|
|
15
|
-
docs?: string
|
|
16
|
-
}
|
|
17
|
-
|
|
18
23
|
type Apis = Record<ApisKeys, ApiConfig>;
|
|
19
24
|
|
|
20
|
-
type
|
|
25
|
+
type ApiAddress = Record<ApisKeys, string>
|
|
21
26
|
|
|
22
|
-
|
|
23
|
-
[api: string]: string,
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
let defaultApis: Apis = apisJson;
|
|
27
|
-
let overrideApis: PartialApis = {};
|
|
27
|
+
const defaultApis: Apis = apisJson
|
|
28
28
|
|
|
29
29
|
const apis: Record<Tenant, Apis> = {
|
|
30
30
|
'stackspot': apisJson,
|
|
@@ -37,12 +37,12 @@ const apis: Record<Tenant, Apis> = {
|
|
|
37
37
|
* @param tenant The current tenant (e.g., 'stackspot', 'itau').
|
|
38
38
|
* @returns API catalog containing the URLs per environment.
|
|
39
39
|
*/
|
|
40
|
-
|
|
40
|
+
function getApisByTenant(tenant: Tenant) {
|
|
41
41
|
return apis[tenant]
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
function transformApisToApiAddress(apis: Apis, env: Env): ApiAddress {
|
|
45
|
-
const apiAddress
|
|
45
|
+
const apiAddress = {} as ApiAddress
|
|
46
46
|
|
|
47
47
|
for (const api in apis) {
|
|
48
48
|
const key = api as ApisKeys
|
|
@@ -59,14 +59,28 @@ function transformApisToApiAddress(apis: Apis, env: Env): ApiAddress {
|
|
|
59
59
|
* @returns {boolean} true if the URL is found, otherwise false.
|
|
60
60
|
*/
|
|
61
61
|
function matchesBaseUrl(baseUrl: Record<Env, string>, candidate: Record<Env, string>): boolean {
|
|
62
|
-
const envs: Env[] = ['dev', 'stg', 'prd']
|
|
62
|
+
const envs: Env[] = ['dev', 'stg', 'prd']
|
|
63
63
|
|
|
64
64
|
return envs.every(e => {
|
|
65
65
|
if (candidate[e]) {
|
|
66
|
-
return baseUrl[e] === candidate[e]
|
|
66
|
+
return baseUrl[e] === candidate[e]
|
|
67
67
|
}
|
|
68
|
-
return true
|
|
69
|
-
})
|
|
68
|
+
return true
|
|
69
|
+
})
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const getApiOverride = () => {
|
|
73
|
+
const envs = import.meta.env
|
|
74
|
+
|
|
75
|
+
let overrideAPIsURL = {} as ApiAddress
|
|
76
|
+
if (envs.PROD) return overrideAPIsURL
|
|
77
|
+
|
|
78
|
+
try {
|
|
79
|
+
overrideAPIsURL= JSON.parse(envs.VITE_NETWORK_OVERRIDES)
|
|
80
|
+
return overrideAPIsURL
|
|
81
|
+
} catch {
|
|
82
|
+
return overrideAPIsURL
|
|
83
|
+
}
|
|
70
84
|
}
|
|
71
85
|
|
|
72
86
|
/**
|
|
@@ -77,42 +91,47 @@ function matchesBaseUrl(baseUrl: Record<Env, string>, candidate: Record<Env, str
|
|
|
77
91
|
* @param tenant the current tenant.
|
|
78
92
|
* @returns {string} the base URL for the given environment and tenant, applying any overrides if available.
|
|
79
93
|
*/
|
|
80
|
-
export const getBaseUrlByTenantWithOverride = (baseUrl: Record<Env, string>, targetEnv: Env = 'prd',
|
|
81
|
-
|
|
94
|
+
export const getBaseUrlByTenantWithOverride = (baseUrl: Record<Env, string>, targetEnv: Env = 'prd',
|
|
95
|
+
tenant: Tenant = 'stackspot'): string => {
|
|
96
|
+
let matchesApiName: ApisKeys | null = null
|
|
82
97
|
|
|
83
98
|
for (const [apiName, config] of Object.entries(defaultApis) as [ApisKeys, ApiConfig][]) {
|
|
84
99
|
if (matchesBaseUrl(baseUrl, config.url)) {
|
|
85
|
-
matchesApiName = apiName
|
|
86
|
-
break
|
|
100
|
+
matchesApiName = apiName
|
|
101
|
+
break
|
|
87
102
|
}
|
|
88
103
|
}
|
|
89
104
|
|
|
90
105
|
if (!matchesApiName) return ''
|
|
91
106
|
|
|
92
|
-
const
|
|
93
|
-
if (overrideUrl) {
|
|
94
|
-
return overrideUrl;
|
|
95
|
-
}
|
|
96
|
-
|
|
107
|
+
const overrides = getApiOverride()
|
|
97
108
|
const apis = getApisByTenant(tenant)
|
|
98
|
-
|
|
109
|
+
const api = apis[matchesApiName]
|
|
110
|
+
return overrides?.[matchesApiName] ?? api?.url?.[targetEnv]
|
|
99
111
|
}
|
|
100
112
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
113
|
+
export const getApisBaseUrlConfig = (env: Env = 'prd', tenant: Tenant = 'stackspot'): ApiAddress => {
|
|
114
|
+
const overrides = getApiOverride()
|
|
115
|
+
const apis = getApisByTenant(tenant)
|
|
116
|
+
const apiMap = {} as ApiAddress
|
|
117
|
+
|
|
118
|
+
for (const [key, value] of Object.entries(apis)) {
|
|
119
|
+
if (value?.url && value.url?.[env]) {
|
|
120
|
+
const url = value.url[env]
|
|
121
|
+
const api = key as ApisKeys
|
|
122
|
+
apiMap[api] = url
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
return { ...overrides, ...apiMap }
|
|
107
127
|
}
|
|
108
128
|
|
|
129
|
+
|
|
109
130
|
/**
|
|
110
131
|
* Sets the default APIs addresses for each environments.
|
|
111
132
|
* @returns {Apis} an object containing APIs URLs grouped by api name and enviroments.
|
|
112
133
|
*/
|
|
113
|
-
export const getApiAddresses = (): Apis =>
|
|
114
|
-
return defaultApis;
|
|
115
|
-
}
|
|
134
|
+
export const getApiAddresses = (): Apis => defaultApis
|
|
116
135
|
|
|
117
136
|
export const apiAddresses = () => {
|
|
118
137
|
const env = NetworkClient.getEnv()
|
package/src/apis-itau.json
CHANGED
|
@@ -221,5 +221,21 @@
|
|
|
221
221
|
"prd": "https://discover-core.stackspot.com"
|
|
222
222
|
},
|
|
223
223
|
"docs": "/v3/api-docs"
|
|
224
|
+
},
|
|
225
|
+
"accountAssetManager" : {
|
|
226
|
+
"url": {
|
|
227
|
+
"dev": "https://account-asset-manager.dev.stackspot.com",
|
|
228
|
+
"stg": "https://account-asset-manager.stg.stackspot.com",
|
|
229
|
+
"prd": "https://account-asset-manager.stackspot.com"
|
|
230
|
+
},
|
|
231
|
+
"docs": "/v3/api-docs"
|
|
232
|
+
},
|
|
233
|
+
"edpBfa": {
|
|
234
|
+
"url": {
|
|
235
|
+
"dev": "https://adp-development-edp-bfa.dev.stackspot.com",
|
|
236
|
+
"stg": "https://adp-development-edp-bfa.stg.stackspot.com",
|
|
237
|
+
"prd": "https://edp-bfa.stackspot.com"
|
|
238
|
+
},
|
|
239
|
+
"docs": "/openapi.json"
|
|
224
240
|
}
|
|
225
241
|
}
|
package/src/apis.json
CHANGED
|
@@ -221,5 +221,21 @@
|
|
|
221
221
|
"prd": "https://discover-core.stackspot.com"
|
|
222
222
|
},
|
|
223
223
|
"docs": "/v3/api-docs"
|
|
224
|
+
},
|
|
225
|
+
"accountAssetManager" : {
|
|
226
|
+
"url": {
|
|
227
|
+
"dev": "https://account-asset-manager.dev.stackspot.com",
|
|
228
|
+
"stg": "https://account-asset-manager.stg.stackspot.com",
|
|
229
|
+
"prd": "https://account-asset-manager.stackspot.com"
|
|
230
|
+
},
|
|
231
|
+
"docs": "/v3/api-docs"
|
|
232
|
+
},
|
|
233
|
+
"edpBfa": {
|
|
234
|
+
"url": {
|
|
235
|
+
"dev": "https://adp-development-edp-bfa.dev.stackspot.com",
|
|
236
|
+
"stg": "https://adp-development-edp-bfa.stg.stackspot.com",
|
|
237
|
+
"prd": "https://edp-bfa.stackspot.com"
|
|
238
|
+
},
|
|
239
|
+
"docs": "/openapi.json"
|
|
224
240
|
}
|
|
225
241
|
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { HttpError } from '@oazapfts/runtime'
|
|
2
|
+
import { getApiAddresses } from '../api-addresses'
|
|
3
|
+
import { defaults, deleteAssetType, deleteFolder, deleteProject, disassociateProjectAsset, getFolderDetails, getProjectDetails, listAssetTypes, listFolders, saveAssetType, saveFolder, saveProject, updateAsset, updateAssetType, updateFolders, updateProject } from '../api/accountAssetManager'
|
|
4
|
+
import { DefaultAPIError } from '../error/DefaultAPIError'
|
|
5
|
+
import { accountAssetManagerDictionary } from '../error/dictionary/accountAssetManager'
|
|
6
|
+
import { StackspotAPIError } from '../error/StackspotAPIError'
|
|
7
|
+
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
|
|
8
|
+
import { removeAuthorizationParam } from '../utils/remove-authorization-param'
|
|
9
|
+
|
|
10
|
+
class AccountAssetManagerClient extends ReactQueryNetworkClient {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(getApiAddresses().accountAssetManager.url, defaults)
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
protected buildStackSpotError(error: HttpError): StackspotAPIError {
|
|
16
|
+
return new DefaultAPIError(error.data, error.status, accountAssetManagerDictionary, error.headers)
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Save project
|
|
21
|
+
*/
|
|
22
|
+
saveProject = this.mutation(removeAuthorizationParam(saveProject))
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Get project details
|
|
26
|
+
*/
|
|
27
|
+
getProjectDetails = this.query(removeAuthorizationParam(getProjectDetails))
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Delete project
|
|
31
|
+
*/
|
|
32
|
+
deleteProject = this.mutation(removeAuthorizationParam(deleteProject))
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Update project
|
|
36
|
+
*/
|
|
37
|
+
updateProject = this.mutation(removeAuthorizationParam(updateProject))
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Disassociate project asset
|
|
41
|
+
*/
|
|
42
|
+
disassociateProjectAsset = this.mutation(removeAuthorizationParam(disassociateProjectAsset))
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* List account folders
|
|
46
|
+
*/
|
|
47
|
+
folders = this.query(removeAuthorizationParam(listFolders))
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Create new folder in account
|
|
51
|
+
*/
|
|
52
|
+
createFolder = this.mutation(removeAuthorizationParam(saveFolder))
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Get folder details
|
|
56
|
+
*/
|
|
57
|
+
folderDetails = this.query(removeAuthorizationParam(getFolderDetails))
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Delete folder
|
|
61
|
+
*/
|
|
62
|
+
deleteFolder = this.mutation(removeAuthorizationParam(deleteFolder))
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Update folder
|
|
66
|
+
*/
|
|
67
|
+
updateFolder = this.mutation(removeAuthorizationParam(updateFolders))
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Create asset
|
|
71
|
+
*/
|
|
72
|
+
createAsset = this.mutation(removeAuthorizationParam(saveAssetType))
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Update asset
|
|
76
|
+
*/
|
|
77
|
+
updateAsset = this.mutation(removeAuthorizationParam(updateAsset))
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* List all asset types
|
|
81
|
+
*/
|
|
82
|
+
assetTypes = this.query(removeAuthorizationParam(listAssetTypes))
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Save asset type
|
|
86
|
+
*/
|
|
87
|
+
saveAssetType = this.mutation(removeAuthorizationParam(saveAssetType))
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Delete asset type
|
|
91
|
+
*/
|
|
92
|
+
deleteAssetType = this.mutation(removeAuthorizationParam(deleteAssetType))
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Update asset type
|
|
96
|
+
*/
|
|
97
|
+
updateAssetType = this.mutation(removeAuthorizationParam(updateAssetType))
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export const accountAssetManagerClient = new AccountAssetManagerClient()
|
package/src/client/account.ts
CHANGED
|
@@ -102,8 +102,8 @@ import {
|
|
|
102
102
|
isCreatedScmCredentials1,
|
|
103
103
|
listAccountMemberFavorites,
|
|
104
104
|
listExtensionLinks,
|
|
105
|
-
listExtensions,
|
|
106
105
|
listExtensionVersions,
|
|
106
|
+
listManageableExtensions,
|
|
107
107
|
listMemberFavoritesByResource,
|
|
108
108
|
listScmCredentials1,
|
|
109
109
|
listScmCredentials2, partialUpdateSso, personalAccessTokenAuthorization,
|
|
@@ -145,8 +145,12 @@ import { DefaultAPIError } from '../error/DefaultAPIError'
|
|
|
145
145
|
import { accountDictionary } from '../error/dictionary/account'
|
|
146
146
|
import { StackspotAPIError } from '../error/StackspotAPIError'
|
|
147
147
|
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
|
|
148
|
+
import { removeAuthorizationParam } from '../utils/remove-authorization-param'
|
|
148
149
|
import { CreateSCMRequest, SCMStatus, UpdateSCMRequest } from './types'
|
|
149
150
|
|
|
151
|
+
const listAllResourcesOfGroup = removeAuthorizationParam(getGroupResources)
|
|
152
|
+
const getsListAllResourcesOfGroup = removeAuthorizationParam(getResources)
|
|
153
|
+
|
|
150
154
|
class AccountClient extends ReactQueryNetworkClient {
|
|
151
155
|
constructor() {
|
|
152
156
|
super(getApiAddresses().account.url, defaults)
|
|
@@ -324,9 +328,9 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
324
328
|
*/
|
|
325
329
|
removeRoleFromGroup = this.mutation(deleteRole)
|
|
326
330
|
/**
|
|
327
|
-
*
|
|
331
|
+
* Get all resources by groups with pagination.
|
|
328
332
|
*/
|
|
329
|
-
|
|
333
|
+
allResourcesByGroupWithPagination = this.infiniteQuery(listAllResourcesOfGroup, { accumulator: 'items' })
|
|
330
334
|
/**
|
|
331
335
|
* Adds several resources to a group.
|
|
332
336
|
*/
|
|
@@ -393,7 +397,7 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
393
397
|
/**
|
|
394
398
|
* Gets all resources (paginated)
|
|
395
399
|
*/
|
|
396
|
-
allResources = this.infiniteQuery(
|
|
400
|
+
allResources = this.infiniteQuery(getsListAllResourcesOfGroup, { accumulator: 'items' })
|
|
397
401
|
/**
|
|
398
402
|
* Gets all resource types (paginated)
|
|
399
403
|
*/
|
|
@@ -649,9 +653,9 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
649
653
|
*/
|
|
650
654
|
allRolesByGroupWithPagination = this.query(getRoles5)
|
|
651
655
|
/**
|
|
652
|
-
*
|
|
656
|
+
* Gets all resources of a group (paginated)
|
|
653
657
|
*/
|
|
654
|
-
|
|
658
|
+
groupResources = this.query(getGroupResources1)
|
|
655
659
|
/**
|
|
656
660
|
* Get all roles account with pagination
|
|
657
661
|
*/
|
|
@@ -687,7 +691,7 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
687
691
|
/**
|
|
688
692
|
* Lists all extensions.
|
|
689
693
|
*/
|
|
690
|
-
extensions = this.query(
|
|
694
|
+
extensions = this.query(listManageableExtensions)
|
|
691
695
|
|
|
692
696
|
/**
|
|
693
697
|
* Lists all versions of an extension.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpError } from '@oazapfts/runtime'
|
|
2
2
|
import { getApiAddresses } from '../api-addresses'
|
|
3
|
-
import { addFavoriteV1AgentsAgentIdFavoritePost, AgentVisibilityLevelEnum, createAgentV1AgentsPost, createToolkitToolsV1ToolkitsToolkitIdToolsPost, createToolkitV1ToolkitsPost, defaults, deleteAgentV1AgentsAgentIdDelete, deleteFavoriteV1AgentsAgentIdFavoriteDelete, deleteToolkitToolsV1ToolkitsToolkitIdToolsDelete, deleteToolkitV1ToolkitsToolkitIdDelete, editToolkitToolV1ToolkitsToolkitIdToolsToolIdPut, forkAgentV1AgentsAgentIdForkPost, forkToolkitV1ToolkitsToolkitIdForkPost, getAgentV1AgentsAgentIdGet, getPublicToolKitsV1BuiltinToolkitGet, getToolkitToolV1ToolkitsToolkitIdToolsToolIdGet, getToolkitV1ToolkitsToolkitIdGet, listAgentsUsingToolsV1ToolkitsToolkitIdToolsAgentsPost, listAgentsV1AgentsGet, listAgentsV3AgentsGet, listMultiAgentsV1AgentsMultiAgentsGet, listToolkitsV1ToolkitsGet, publishAgentV1AgentsAgentIdPublishPost, searchAgentsV1AgentsSearchPost, shareV1AgentsAgentIdSharePost, updateAgentV1AgentsAgentIdPatch, updateToolkitV1ToolkitsToolkitIdPatch, VisibilityLevelEnum } from '../api/agent-tools'
|
|
3
|
+
import { addFavoriteV1AgentsAgentIdFavoritePost, AgentVisibilityLevelEnum, createAgentV1AgentsPost, createToolkitToolsV1ToolkitsToolkitIdToolsPost, createToolkitV1ToolkitsPost, defaults, deleteAgentV1AgentsAgentIdDelete, deleteFavoriteV1AgentsAgentIdFavoriteDelete, deleteToolkitToolsV1ToolkitsToolkitIdToolsDelete, deleteToolkitV1ToolkitsToolkitIdDelete, editToolkitToolV1ToolkitsToolkitIdToolsToolIdPut, forkAgentV1AgentsAgentIdForkPost, forkToolkitV1ToolkitsToolkitIdForkPost, getAgentV1AgentsAgentIdGet, getPublicToolKitsV1BuiltinToolkitGet, getToolkitToolV1ToolkitsToolkitIdToolsToolIdGet, getToolkitV1ToolkitsToolkitIdGet, listAgentsUsingToolsV1ToolkitsToolkitIdToolsAgentsPost, listAgentsV1AgentsGet, listAgentsV3AgentsGet, listMcpToolsV1McpToolsToolkitIdGet, listMultiAgentsV1AgentsMultiAgentsGet, listToolkitsV1ToolkitsGet, listToolkitsV2ToolkitsGet, publishAgentV1AgentsAgentIdPublishPost, searchAgentsV1AgentsSearchPost, shareV1AgentsAgentIdSharePost, updateAgentV1AgentsAgentIdPatch, updateToolkitV1ToolkitsToolkitIdPatch, VisibilityLevelEnum } from '../api/agent-tools'
|
|
4
4
|
import { DefaultAPIError } from '../error/DefaultAPIError'
|
|
5
5
|
import { agentToolsDictionary } from '../error/dictionary/agent-tools'
|
|
6
6
|
import { StackspotAPIError } from '../error/StackspotAPIError'
|
|
@@ -13,6 +13,7 @@ import { workspaceAiClient } from './workspace-ai'
|
|
|
13
13
|
|
|
14
14
|
const AGENT_DEFAULT_SLUG = 'stk_flex'
|
|
15
15
|
const listAgentsV3AgentsWithoutAuthorization = removeAuthorizationParam(listAgentsV3AgentsGet)
|
|
16
|
+
const listToolkitsAuthorization = removeAuthorizationParam(listToolkitsV2ToolkitsGet)
|
|
16
17
|
|
|
17
18
|
class AgentToolsClient extends ReactQueryNetworkClient {
|
|
18
19
|
constructor() {
|
|
@@ -23,6 +24,9 @@ class AgentToolsClient extends ReactQueryNetworkClient {
|
|
|
23
24
|
return new DefaultAPIError(error.data, error.status, agentToolsDictionary, error.headers)
|
|
24
25
|
}
|
|
25
26
|
|
|
27
|
+
/**
|
|
28
|
+
* Lists all public toolkits.
|
|
29
|
+
*/
|
|
26
30
|
tools = this.query(removeAuthorizationParam(getPublicToolKitsV1BuiltinToolkitGet))
|
|
27
31
|
|
|
28
32
|
/**
|
|
@@ -140,9 +144,18 @@ class AgentToolsClient extends ReactQueryNetworkClient {
|
|
|
140
144
|
},
|
|
141
145
|
})
|
|
142
146
|
|
|
143
|
-
|
|
144
|
-
|
|
147
|
+
/**
|
|
148
|
+
* Lists all custom toolkits.
|
|
149
|
+
*/
|
|
145
150
|
toolkits = this.query(removeAuthorizationParam(listToolkitsV1ToolkitsGet))
|
|
151
|
+
/**
|
|
152
|
+
* Get list of Toolkits V2
|
|
153
|
+
*/
|
|
154
|
+
toolkitsV2 = this.infiniteQuery(listToolkitsAuthorization, { accumulator: 'items' })
|
|
155
|
+
/**
|
|
156
|
+
* Lists all tools of an MCP toolkit.
|
|
157
|
+
*/
|
|
158
|
+
mcpTools = this.query(removeAuthorizationParam(listMcpToolsV1McpToolsToolkitIdGet))
|
|
146
159
|
/**
|
|
147
160
|
* Get a toolkit by Id
|
|
148
161
|
*/
|
|
@@ -175,6 +188,7 @@ class AgentToolsClient extends ReactQueryNetworkClient {
|
|
|
175
188
|
* Delete tool from Toolkit
|
|
176
189
|
*/
|
|
177
190
|
deleteToolFromToolkit = this.mutation(removeAuthorizationParam(deleteToolkitToolsV1ToolkitsToolkitIdToolsDelete))
|
|
191
|
+
|
|
178
192
|
/**
|
|
179
193
|
* Previews an uploaded open api file as a stream where each array item is an OpenAPI operation.
|
|
180
194
|
*/
|
package/src/client/ai.ts
CHANGED
|
@@ -7,26 +7,33 @@ import {
|
|
|
7
7
|
calculateNextStepV1QuickCommandsSlugStepsStepSlugCalculateNextStepPost,
|
|
8
8
|
callbackV1QuickCommandsCallbackExecutionIdGet,
|
|
9
9
|
conversationHistoryV1ConversationsConversationIdGet,
|
|
10
|
+
createAnswerForReviewV1ResourcesResourceTypeSlugResourceSlugReviewsReviewIdAnswersPost,
|
|
10
11
|
createExecutionV1QuickCommandsCreateExecutionSlugPost,
|
|
12
|
+
createResourceReviewV1ResourcesResourceTypeSlugResourceSlugReviewsPost,
|
|
11
13
|
currentV1TokensUsageCurrentGet,
|
|
12
|
-
currentV1TokensUsageTotalGet,
|
|
13
14
|
defaults,
|
|
14
15
|
deleteConversationV1ConversationsConversationIdDelete,
|
|
15
16
|
deleteFavoriteV1AiStacksStackIdFavoriteDelete,
|
|
16
17
|
deleteFavoriteV1QuickCommandsSlugFavoriteDelete,
|
|
17
18
|
deleteKnowledgeObjectByCustomIdV1KnowledgeSourcesSlugObjectsCustomIdDelete,
|
|
19
|
+
deleteResourceReviewV1ResourcesResourceTypeSlugResourceSlugReviewsReviewIdDelete,
|
|
20
|
+
deleteReviewCommentV1ResourcesResourceTypeSlugResourceSlugReviewsReviewIdAnswersAnswerIdDelete,
|
|
18
21
|
downloadConversationV1ConversationsConversationIdDownloadGet,
|
|
19
22
|
findKnowledgeObjectByCustomIdV1KnowledgeSourcesSlugObjectsCustomIdGet,
|
|
20
23
|
findKnowledgeSourceV1KnowledgeSourcesSlugGet,
|
|
21
24
|
formatFetchStepV1QuickCommandsSlugStepsStepSlugFetchFormatPost,
|
|
22
25
|
formatResultV1QuickCommandsSlugResultFormatPost,
|
|
23
26
|
getContentDependenciesV1ContentContentTypeContentIdDependenciesGet,
|
|
27
|
+
getFlagsV1FlagsGet,
|
|
24
28
|
getQuickCommandV1QuickCommandsSlugGet,
|
|
29
|
+
getReviewsByResourceV1ResourcesResourceTypeSlugResourceSlugReviewsGet,
|
|
30
|
+
getScriptExecutionStatusV1QuickCommandsScriptExecutionsScriptExecutionIdGet,
|
|
25
31
|
getUploadFormV1FileUploadFormPost,
|
|
26
32
|
HttpValidationError,
|
|
27
33
|
listAiStacksV1AiStacksGet,
|
|
28
34
|
listAllV1QuickCommandsAllGet,
|
|
29
35
|
listAllV2QuickCommandsAllGet,
|
|
36
|
+
listAllV3QuickCommandsGet,
|
|
30
37
|
listAssociationV1WorkspaceWorkspaceIdGet,
|
|
31
38
|
listConversationsV1ConversationsGet,
|
|
32
39
|
listKnowledgeSourcesV1KnowledgeSourcesGet,
|
|
@@ -38,10 +45,18 @@ import {
|
|
|
38
45
|
resetKnowledgeObjectsV1KnowledgeSourcesSlugObjectsDelete,
|
|
39
46
|
runFetchStepV1QuickCommandsSlugStepsStepSlugFetchRunPost,
|
|
40
47
|
searchKnowledgeSourcesV1KnowledgeSourcesSearchPost,
|
|
48
|
+
tokensByUserV1AnalyticsTokensByUserGet,
|
|
49
|
+
tokensDailyUsageV1AnalyticsTokensDailyUsageGet,
|
|
50
|
+
startScriptStepV1QuickCommandsSlugStepsStepSlugStartScriptPost,
|
|
51
|
+
totalV1TokensUsageTotalGet,
|
|
41
52
|
updateQuickCommandV1QuickCommandsSlugPatch,
|
|
53
|
+
updateResourceReviewV1ResourcesResourceTypeSlugResourceSlugReviewsReviewIdPatch,
|
|
54
|
+
updateReviewCommentV1ResourcesResourceTypeSlugResourceSlugReviewsReviewIdAnswersAnswerIdPatch,
|
|
42
55
|
updateTitleV1ConversationsConversationIdPatch,
|
|
43
56
|
vectorizeCustomKnowledgeSourceV1KnowledgeSourcesSlugCustomPost,
|
|
44
57
|
} from '../api/ai'
|
|
58
|
+
|
|
59
|
+
|
|
45
60
|
import { StackspotAPIError } from '../error/StackspotAPIError'
|
|
46
61
|
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
|
|
47
62
|
import { removeAuthorizationParam } from '../utils/remove-authorization-param'
|
|
@@ -59,6 +74,8 @@ import {
|
|
|
59
74
|
StepChatStep,
|
|
60
75
|
} from './types'
|
|
61
76
|
|
|
77
|
+
const listQAV3WithoutAuthorization = removeAuthorizationParam(listAllV3QuickCommandsGet)
|
|
78
|
+
|
|
62
79
|
class AIClient extends ReactQueryNetworkClient {
|
|
63
80
|
constructor() {
|
|
64
81
|
super(getApiAddresses().ai.url, defaults)
|
|
@@ -106,7 +123,7 @@ class AIClient extends ReactQueryNetworkClient {
|
|
|
106
123
|
/**
|
|
107
124
|
* Gets total tokens usage
|
|
108
125
|
*/
|
|
109
|
-
totalTokensUsage = this.query(removeAuthorizationParam(
|
|
126
|
+
totalTokensUsage = this.query(removeAuthorizationParam(totalV1TokensUsageTotalGet))
|
|
110
127
|
/**
|
|
111
128
|
* Gets current tokens usage
|
|
112
129
|
*/
|
|
@@ -124,6 +141,10 @@ class AIClient extends ReactQueryNetworkClient {
|
|
|
124
141
|
* Lists all the quick commands according to filters passed as parameter (including QC with secrets).
|
|
125
142
|
*/
|
|
126
143
|
allQuickCommands = this.query(removeAuthorizationParam(listAllV2QuickCommandsAllGet))
|
|
144
|
+
/**
|
|
145
|
+
* Lists all the quick commands according to filters passed as parameter (including QC with secrets) with pagination.
|
|
146
|
+
*/
|
|
147
|
+
allQuickCommandsV3 = this.infiniteQuery(listQAV3WithoutAuthorization, { accumulator: 'items' })
|
|
127
148
|
/**
|
|
128
149
|
* Gets a quick command by its slug.
|
|
129
150
|
*/
|
|
@@ -257,6 +278,66 @@ class AIClient extends ReactQueryNetworkClient {
|
|
|
257
278
|
* Removes the resource of type Quick Command from the list of favorites.
|
|
258
279
|
*/
|
|
259
280
|
removeFavoriteQuickCommand = this.mutation(removeAuthorizationParam(deleteFavoriteV1QuickCommandsSlugFavoriteDelete))
|
|
281
|
+
/**
|
|
282
|
+
* Get Tokens Daily usage
|
|
283
|
+
*/
|
|
284
|
+
analyticsTokensDailyUsage = this.query(removeAuthorizationParam(tokensDailyUsageV1AnalyticsTokensDailyUsageGet))
|
|
285
|
+
/**
|
|
286
|
+
* Get Tokens By User
|
|
287
|
+
*/
|
|
288
|
+
analyticsTokensByUser = this.query(removeAuthorizationParam(tokensByUserV1AnalyticsTokensByUserGet))
|
|
289
|
+
/*
|
|
290
|
+
* Lists all the feature flags for this user.
|
|
291
|
+
*/
|
|
292
|
+
flags = this.query(getFlagsV1FlagsGet)
|
|
293
|
+
/**
|
|
294
|
+
* Starts the execution of a script step
|
|
295
|
+
*/
|
|
296
|
+
startScriptStep = this.mutation(removeAuthorizationParam(startScriptStepV1QuickCommandsSlugStepsStepSlugStartScriptPost))
|
|
297
|
+
/**
|
|
298
|
+
* Gets the status of the execution of a script step
|
|
299
|
+
*/
|
|
300
|
+
getStatusScriptStep = this.query(removeAuthorizationParam(getScriptExecutionStatusV1QuickCommandsScriptExecutionsScriptExecutionIdGet))
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* Get reviews by resource
|
|
304
|
+
*/
|
|
305
|
+
getReviewsByResource = this.query(removeAuthorizationParam(getReviewsByResourceV1ResourcesResourceTypeSlugResourceSlugReviewsGet))
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* Create a resource review
|
|
309
|
+
*/
|
|
310
|
+
createResourceReview = this.mutation(removeAuthorizationParam(createResourceReviewV1ResourcesResourceTypeSlugResourceSlugReviewsPost))
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* Create an answer for a review
|
|
314
|
+
*/
|
|
315
|
+
createAnswerForReview = this.mutation(
|
|
316
|
+
removeAuthorizationParam(createAnswerForReviewV1ResourcesResourceTypeSlugResourceSlugReviewsReviewIdAnswersPost))
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* Update a resource review
|
|
320
|
+
*/
|
|
321
|
+
updateResourceReview = this.mutation(
|
|
322
|
+
removeAuthorizationParam(updateResourceReviewV1ResourcesResourceTypeSlugResourceSlugReviewsReviewIdPatch))
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* Delete a resource review
|
|
326
|
+
*/
|
|
327
|
+
deleteResourceReview = this.mutation(
|
|
328
|
+
removeAuthorizationParam(deleteResourceReviewV1ResourcesResourceTypeSlugResourceSlugReviewsReviewIdDelete))
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* Update a review comment (answer)
|
|
332
|
+
*/
|
|
333
|
+
updateReviewComment = this.mutation(
|
|
334
|
+
removeAuthorizationParam(updateReviewCommentV1ResourcesResourceTypeSlugResourceSlugReviewsReviewIdAnswersAnswerIdPatch))
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* Delete a review comment (answer)
|
|
338
|
+
*/
|
|
339
|
+
deleteReviewComment = this.mutation(
|
|
340
|
+
removeAuthorizationParam(deleteReviewCommentV1ResourcesResourceTypeSlugResourceSlugReviewsReviewIdAnswersAnswerIdDelete))
|
|
260
341
|
|
|
261
342
|
private static async toolsOfAgent(agentId?: string) {
|
|
262
343
|
try {
|
|
@@ -308,7 +389,7 @@ class AIClient extends ReactQueryNetworkClient {
|
|
|
308
389
|
steps: info.data?.steps?.map(s => s.goal) ?? [],
|
|
309
390
|
goal: info.data?.plan_goal ?? '',
|
|
310
391
|
})
|
|
311
|
-
|
|
392
|
+
|
|
312
393
|
info.data?.steps.forEach(s => data.steps?.push({
|
|
313
394
|
id: s.id,
|
|
314
395
|
type: 'step',
|
|
@@ -368,7 +449,7 @@ class AIClient extends ReactQueryNetworkClient {
|
|
|
368
449
|
}
|
|
369
450
|
|
|
370
451
|
if (info.type === 'tool' && info.action === 'awaiting_approval') {
|
|
371
|
-
const tool = tools.find(({ id }) => id === info.data?.tool_id)
|
|
452
|
+
const tool = tools.find(({ id }) => id === info.data?.tool_id)
|
|
372
453
|
data.steps.push({
|
|
373
454
|
id: info.id,
|
|
374
455
|
type: 'tool',
|
|
@@ -392,7 +473,7 @@ class AIClient extends ReactQueryNetworkClient {
|
|
|
392
473
|
if (info.type === 'tool' && info.action === 'start') {
|
|
393
474
|
const currentStep = data.steps.find(s => s.status === 'running') as StepChatStep
|
|
394
475
|
if (!info.data) return
|
|
395
|
-
|
|
476
|
+
|
|
396
477
|
//There might be a tool with status awaiting_approval, so we want to inform tool has already started
|
|
397
478
|
if (!currentStep || !currentStep.attempts[0].tools) {
|
|
398
479
|
const input = formatJson(info.data.input)
|
|
@@ -405,7 +486,7 @@ class AIClient extends ReactQueryNetworkClient {
|
|
|
405
486
|
input: info.data?.input,
|
|
406
487
|
user_question: info.data?.user_question,
|
|
407
488
|
attempts: [{
|
|
408
|
-
tools:[{ ...tool, executionId: info.id, input }],
|
|
489
|
+
tools: [{ ...tool, executionId: info.id, input }],
|
|
409
490
|
}],
|
|
410
491
|
})
|
|
411
492
|
} else {
|
|
@@ -415,7 +496,7 @@ class AIClient extends ReactQueryNetworkClient {
|
|
|
415
496
|
if (!toolInFirstAttempt) {
|
|
416
497
|
const input = formatJson(info.data.input)
|
|
417
498
|
const tool = tools?.find(({ id }) => id === info.data?.tool_id) ?? { id: info.data?.tool_id, name: info.data?.tool_id }
|
|
418
|
-
currentStep.attempts[info.data.attempt-1].tools?.push({
|
|
499
|
+
currentStep.attempts[info.data.attempt - 1].tools?.push({
|
|
419
500
|
...tool,
|
|
420
501
|
executionId: info.id,
|
|
421
502
|
input,
|
|
@@ -426,8 +507,8 @@ class AIClient extends ReactQueryNetworkClient {
|
|
|
426
507
|
toolInFirstAttempt.input = input
|
|
427
508
|
} else {
|
|
428
509
|
const tool = tools.find(({ id }) => id === info.data?.tool_id) ?? { id: info.data?.tool_id, name: info.data?.tool_id }
|
|
429
|
-
currentStep.attempts[info.data.attempt-1] ??= { tools: [] }
|
|
430
|
-
currentStep.attempts[info.data.attempt-1].tools?.push({
|
|
510
|
+
currentStep.attempts[info.data.attempt - 1] ??= { tools: [] }
|
|
511
|
+
currentStep.attempts[info.data.attempt - 1].tools?.push({
|
|
431
512
|
...tool,
|
|
432
513
|
executionId: info.id,
|
|
433
514
|
input,
|
|
@@ -440,7 +521,7 @@ class AIClient extends ReactQueryNetworkClient {
|
|
|
440
521
|
if (info.type === 'tool' && info.action === 'end') {
|
|
441
522
|
const currentStep = data.steps.find(s => s.status === 'running') as StepChatStep
|
|
442
523
|
if (!currentStep || !info.data) return
|
|
443
|
-
const tool = currentStep.attempts[info.data.attempt-1]?.tools?.find(t => t.executionId === info.id)
|
|
524
|
+
const tool = currentStep.attempts[info.data.attempt - 1]?.tools?.find(t => t.executionId === info.id)
|
|
444
525
|
if (tool) {
|
|
445
526
|
tool.output = formatJson(info.data.output)
|
|
446
527
|
tool.duration = info.duration
|
|
@@ -4,7 +4,7 @@ import { DefaultAPIError } from '../error/DefaultAPIError'
|
|
|
4
4
|
import { StackspotAPIError } from '../error/StackspotAPIError'
|
|
5
5
|
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
|
|
6
6
|
import { removeAuthorizationParam } from '../utils/remove-authorization-param'
|
|
7
|
-
import { associateWithWorkspaceEnvironment, createAddon, createDeployTemplate, createOrganization, createRuntime1, createTenant1, defaults, deploy, findApplicationDeploymentById, getApplicationDeploymentHealth, getApplicationDeploymentLogs, getAssociationWorkspaceEnvironmentByRuntimeId, getOrganizationById, getOrganizations, getRuntime1, getTenant1, listAddon, listApplicationDeployments, listAssociations, listDeployTemplate, listRuntimes, listRuntimes1, listTenants, listTenants1 } from '../api/cloudPlatformHorizon'
|
|
7
|
+
import { associateWithWorkspaceEnvironment, createAddon, createDeployTemplate, createOrganization, createRuntime1, createTenant1, defaults, deploy, findApplicationDeploymentById, getApplicationDeploymentHealth, getApplicationDeploymentLogs, getAssociationWorkspaceEnvironmentByRuntimeId, getOrganizationById, getOrganizations, getRuntime1, getTenant1, listAddon, listApplicationDeploymentRollouts, listApplicationDeployments, listAssociations, listDeployTemplate, listRuntimes, listRuntimes1, listTenants, listTenants1, postApplicationDeploymentRolloutAction } from '../api/cloudPlatformHorizon'
|
|
8
8
|
import { baseDictionary } from '../error/dictionary/base'
|
|
9
9
|
import { getApiAddresses } from '../api-addresses'
|
|
10
10
|
|
|
@@ -19,7 +19,7 @@ class CloudPlatformHorizonClient extends ReactQueryNetworkClient {
|
|
|
19
19
|
/**
|
|
20
20
|
* Get a list of organizations
|
|
21
21
|
*/
|
|
22
|
-
listOrganizations= this.query(removeAuthorizationParam(getOrganizations))
|
|
22
|
+
listOrganizations = this.query(removeAuthorizationParam(getOrganizations))
|
|
23
23
|
/**
|
|
24
24
|
* Get organization by id
|
|
25
25
|
*/
|
|
@@ -27,11 +27,11 @@ class CloudPlatformHorizonClient extends ReactQueryNetworkClient {
|
|
|
27
27
|
/**
|
|
28
28
|
* Get details of an tenant
|
|
29
29
|
*/
|
|
30
|
-
getTenantById= this.query(removeAuthorizationParam(getTenant1))
|
|
30
|
+
getTenantById = this.query(removeAuthorizationParam(getTenant1))
|
|
31
31
|
/**
|
|
32
32
|
* Get details of an runtime
|
|
33
33
|
*/
|
|
34
|
-
getRuntimeById= this.query(removeAuthorizationParam(getRuntime1))
|
|
34
|
+
getRuntimeById = this.query(removeAuthorizationParam(getRuntime1))
|
|
35
35
|
/**
|
|
36
36
|
* Create an tenant
|
|
37
37
|
*/
|
|
@@ -108,6 +108,14 @@ class CloudPlatformHorizonClient extends ReactQueryNetworkClient {
|
|
|
108
108
|
* List runtime associations to workspace's environment
|
|
109
109
|
*/
|
|
110
110
|
listRuntimeAssociationsToEnv = this.query(removeAuthorizationParam(listAssociations))
|
|
111
|
+
/**
|
|
112
|
+
* List of application deployments rollout
|
|
113
|
+
*/
|
|
114
|
+
listApplicationDeploymentRollouts = this.query(removeAuthorizationParam(listApplicationDeploymentRollouts))
|
|
115
|
+
/**
|
|
116
|
+
* Set an action to application deployment rollout
|
|
117
|
+
*/
|
|
118
|
+
deployApplicationRolloutAction = this.mutation(removeAuthorizationParam(postApplicationDeploymentRolloutAction))
|
|
111
119
|
}
|
|
112
120
|
|
|
113
121
|
export const cloudPlatformHorizonClient = new CloudPlatformHorizonClient()
|