@stack-spot/portal-network 0.184.0 → 0.185.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 +2444 -2412
- package/dist/api/account.js +1 -1
- package/dist/api/agent-tools.js +1 -1
- package/dist/api/agent.js +1 -1
- package/dist/api/ai.js +1 -1
- package/dist/api/apiManagement.js +1 -1
- package/dist/api/apiRuntime.js +1 -1
- package/dist/api/cloudAccount.js +1 -1
- package/dist/api/cloudPlatform.js +1 -1
- package/dist/api/cloudPlatformHorizon.js +1 -1
- package/dist/api/cloudRuntimes.js +1 -1
- package/dist/api/cloudServices.js +1 -1
- package/dist/api/codeShift.d.ts +63 -4
- package/dist/api/codeShift.d.ts.map +1 -1
- package/dist/api/codeShift.js +14 -1
- package/dist/api/codeShift.js.map +1 -1
- package/dist/api/content.js +1 -1
- package/dist/api/dataIntegration.js +1 -1
- package/dist/api/discover.js +1 -1
- package/dist/api/genAiInference.js +1 -1
- package/dist/api/insights.js +1 -1
- package/dist/api/notification.js +1 -1
- package/dist/api/secrets.js +1 -1
- package/dist/api/serviceCatalog.js +1 -1
- package/dist/api/workspace-ai.js +1 -1
- package/dist/api/workspace.js +1 -1
- package/dist/api/workspaceManager.js +1 -1
- package/dist/api/workspaceSearchEngine.js +1 -1
- package/dist/client/ai.d.ts.map +1 -1
- package/dist/client/ai.js +84 -14
- package/dist/client/ai.js.map +1 -1
- package/dist/client/code-shift.d.ts +30 -0
- package/dist/client/code-shift.d.ts.map +1 -1
- package/dist/client/code-shift.js +37 -1
- package/dist/client/code-shift.js.map +1 -1
- package/dist/client/types.d.ts +26 -6
- package/dist/client/types.d.ts.map +1 -1
- package/package.json +7 -7
- package/readme.md +1 -1
- package/scripts/generate-apis.ts +134 -134
- package/src/api/account.ts +8368 -8367
- package/src/api/agent-tools.ts +2172 -2169
- package/src/api/agent.ts +1085 -1083
- package/src/api/ai.ts +3388 -3388
- package/src/api/apiManagement.ts +570 -570
- package/src/api/apiRuntime.ts +2103 -2103
- package/src/api/cloudAccount.ts +1239 -1239
- package/src/api/cloudPlatform.ts +927 -927
- package/src/api/cloudPlatformHorizon.ts +2655 -2655
- package/src/api/cloudRuntimes.ts +2043 -2043
- package/src/api/cloudServices.ts +1445 -1445
- package/src/api/codeShift.ts +3567 -3481
- package/src/api/content.ts +9785 -9785
- package/src/api/dataIntegration.ts +1657 -1657
- package/src/api/discover.ts +435 -435
- package/src/api/eventBus.ts +171 -171
- package/src/api/genAiInference.ts +603 -603
- package/src/api/insights.ts +310 -310
- package/src/api/notification.ts +336 -334
- package/src/api/secrets.ts +342 -342
- package/src/api/serviceCatalog.ts +2908 -2908
- package/src/api/workflows.ts +1669 -1669
- package/src/api/workspace-ai.ts +677 -677
- package/src/api/workspace.ts +5889 -5889
- package/src/api/workspaceManager.ts +2951 -2951
- package/src/api/workspaceSearchEngine.ts +153 -153
- package/src/api-addresses.ts +120 -120
- package/src/apis-itau.json +225 -225
- package/src/apis.json +225 -225
- package/src/client/account.ts +902 -902
- package/src/client/agent-tools.ts +210 -210
- package/src/client/agent.ts +81 -81
- package/src/client/ai.ts +469 -395
- package/src/client/api-management.ts +40 -40
- package/src/client/cloud-account.ts +70 -70
- package/src/client/cloud-platform-horizon.ts +113 -113
- package/src/client/cloud-platform.ts +163 -163
- package/src/client/cloud-runtimes.ts +129 -129
- package/src/client/cloud-services.ts +94 -94
- package/src/client/code-shift.ts +371 -349
- package/src/client/content.ts +538 -538
- package/src/client/data-integration.ts +191 -191
- package/src/client/discover.ts +89 -89
- package/src/client/event-bus.ts +84 -84
- package/src/client/gen-ai-inference.ts +65 -65
- package/src/client/insights.ts +28 -28
- package/src/client/notification.ts +32 -32
- package/src/client/runtime-manager.ts +76 -76
- package/src/client/secrets.ts +60 -60
- package/src/client/types.ts +398 -377
- package/src/client/workflow.ts +83 -83
- package/src/client/workspace-ai.ts +191 -191
- package/src/client/workspace-manager.ts +564 -564
- package/src/client/workspace-search.ts +39 -39
- package/src/client/workspace.ts +480 -480
- package/src/error/DefaultAPIError.ts +151 -151
- package/src/error/FileUploadError.ts +18 -18
- package/src/error/IgnoredErrorCodes.ts +3 -3
- package/src/error/StackspotAPIError.ts +101 -101
- package/src/error/StreamCanceledError.ts +10 -10
- package/src/error/StreamError.ts +7 -7
- package/src/error/StreamJsonError.ts +10 -10
- package/src/error/dictionary/account.ts +58 -58
- package/src/error/dictionary/action-details.ts +20 -20
- package/src/error/dictionary/action.ts +211 -211
- package/src/error/dictionary/agent-tools.ts +75 -75
- package/src/error/dictionary/ai-inference.ts +28 -28
- package/src/error/dictionary/base.ts +22 -22
- package/src/error/dictionary/cloud-platform.ts +82 -82
- package/src/error/dictionary/cnt-fields.ts +14 -14
- package/src/error/dictionary/cnt.ts +103 -103
- package/src/error/dictionary/code-shift.ts +12 -12
- package/src/error/dictionary/rte.ts +24 -24
- package/src/error/dictionary/rtm.ts +10 -10
- package/src/error/dictionary/secrets.ts +14 -14
- package/src/error/dictionary/workspace-ai.ts +10 -10
- package/src/error/dictionary/workspace-details.ts +15 -15
- package/src/error/dictionary/workspace-fields.ts +10 -10
- package/src/error/dictionary/workspace.ts +209 -209
- package/src/error/types.ts +21 -21
- package/src/index.ts +43 -43
- package/src/network/AutoInfiniteQuery.ts +115 -115
- package/src/network/AutoMutation.ts +27 -27
- package/src/network/AutoOperation.ts +73 -73
- package/src/network/AutoQuery.ts +75 -75
- package/src/network/ManualInfiniteQuery.ts +95 -95
- package/src/network/ManualMutation.ts +40 -40
- package/src/network/ManualOperation.ts +52 -52
- package/src/network/ManualQuery.ts +82 -82
- package/src/network/NetworkClient.ts +167 -167
- package/src/network/ReactQueryNetworkClient.ts +312 -312
- package/src/network/react-query-client.ts +14 -14
- package/src/network/types.ts +294 -294
- package/src/types.ts +1 -1
- package/src/utils/StreamedArray.tsx +146 -146
- package/src/utils/StreamedJson.tsx +166 -166
- package/src/utils/remove-authorization-param.ts +6 -6
- package/src/utils/string.ts +19 -19
- package/src/utils/use-extended-list.ts +80 -80
- package/src/utils/use-streamed-array.ts +17 -17
- package/tsconfig.build.json +4 -4
- package/tsconfig.json +10 -10
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { HttpError } from '@oazapfts/runtime'
|
|
2
|
-
import { getApiAddresses } from '../api-addresses'
|
|
3
|
-
import { defaults, downloadObjectArtifacts, getEntries, getEntryById, getSubEntries } from '../api/apiManagement'
|
|
4
|
-
import { DefaultAPIError } from '../error/DefaultAPIError'
|
|
5
|
-
import { actionDictionary } from '../error/dictionary/action'
|
|
6
|
-
import { StackspotAPIError } from '../error/StackspotAPIError'
|
|
7
|
-
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
|
|
8
|
-
|
|
9
|
-
class ApiManagementClient extends ReactQueryNetworkClient {
|
|
10
|
-
constructor() {
|
|
11
|
-
super(getApiAddresses().apiManagement.url, defaults)
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
protected buildStackSpotError(error: HttpError): StackspotAPIError {
|
|
15
|
-
return new DefaultAPIError(error.data, error.status, actionDictionary, error.headers)
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Get list
|
|
20
|
-
*/
|
|
21
|
-
getList = this.query(getEntries)
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Get api by id
|
|
25
|
-
*/
|
|
26
|
-
getApiById = this.query(getEntryById)
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Gets the version of one api
|
|
30
|
-
*/
|
|
31
|
-
getApiVersions = this.query(getSubEntries)
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Gets the openAPI of one version
|
|
35
|
-
*/
|
|
36
|
-
getApiVersionDocs = this.query(downloadObjectArtifacts)
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export const apiManagementClient = new ApiManagementClient()
|
|
1
|
+
import { HttpError } from '@oazapfts/runtime'
|
|
2
|
+
import { getApiAddresses } from '../api-addresses'
|
|
3
|
+
import { defaults, downloadObjectArtifacts, getEntries, getEntryById, getSubEntries } from '../api/apiManagement'
|
|
4
|
+
import { DefaultAPIError } from '../error/DefaultAPIError'
|
|
5
|
+
import { actionDictionary } from '../error/dictionary/action'
|
|
6
|
+
import { StackspotAPIError } from '../error/StackspotAPIError'
|
|
7
|
+
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
|
|
8
|
+
|
|
9
|
+
class ApiManagementClient extends ReactQueryNetworkClient {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(getApiAddresses().apiManagement.url, defaults)
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
protected buildStackSpotError(error: HttpError): StackspotAPIError {
|
|
15
|
+
return new DefaultAPIError(error.data, error.status, actionDictionary, error.headers)
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Get list
|
|
20
|
+
*/
|
|
21
|
+
getList = this.query(getEntries)
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Get api by id
|
|
25
|
+
*/
|
|
26
|
+
getApiById = this.query(getEntryById)
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Gets the version of one api
|
|
30
|
+
*/
|
|
31
|
+
getApiVersions = this.query(getSubEntries)
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Gets the openAPI of one version
|
|
35
|
+
*/
|
|
36
|
+
getApiVersionDocs = this.query(downloadObjectArtifacts)
|
|
37
|
+
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export const apiManagementClient = new ApiManagementClient()
|
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
import { HttpError } from '@oazapfts/runtime'
|
|
2
|
-
import { createCloudAccount, defaults, deleteCloudAccountFromEnvironment, deleteManagedAccountsFromWorkspace, getCloudAccountByWorkspace, getManagedCloudRegion, getManagedCloudTemplate, getProvisionWorkflowInWorkspace, listCloudAccounts, provisionManagedAccountsForWorkspace } from '../api/cloudAccount'
|
|
3
|
-
import { DefaultAPIError } from '../error/DefaultAPIError'
|
|
4
|
-
import { StackspotAPIError } from '../error/StackspotAPIError'
|
|
5
|
-
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
|
|
6
|
-
import { removeAuthorizationParam } from '../utils/remove-authorization-param'
|
|
7
|
-
import { FixedConnectAccountRequestV2, FixedManagedAccountProvisionRequest, FixVariables } from './types'
|
|
8
|
-
import { getApiAddresses } from '../api-addresses'
|
|
9
|
-
|
|
10
|
-
const listAccounts = removeAuthorizationParam(listCloudAccounts)
|
|
11
|
-
|
|
12
|
-
class CloudAccountClient extends ReactQueryNetworkClient {
|
|
13
|
-
constructor() {
|
|
14
|
-
super(getApiAddresses().cloudAccount.url, defaults)
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
protected buildStackSpotError(error: HttpError): StackspotAPIError {
|
|
18
|
-
return new DefaultAPIError(error.data, error.status, { en: {}, pt: {} }, error.headers)
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Lists all cloud accounts according to the parameters (paginated).
|
|
23
|
-
*/
|
|
24
|
-
cloudAccounts = this.infiniteQuery(listAccounts, {
|
|
25
|
-
accumulator: 'data',
|
|
26
|
-
getNextPageParam: ({ lastPage }) => lastPage.nextPage,
|
|
27
|
-
})
|
|
28
|
-
/**
|
|
29
|
-
* Gets a list of cloud accounts connected to a workspace
|
|
30
|
-
*/
|
|
31
|
-
cloudAccountByWorkspace = this.query(removeAuthorizationParam(getCloudAccountByWorkspace))
|
|
32
|
-
/**
|
|
33
|
-
* Gets the cloud account workflow of a workspace environment
|
|
34
|
-
*/
|
|
35
|
-
workflowByWorkspace = this.query(removeAuthorizationParam(getProvisionWorkflowInWorkspace))
|
|
36
|
-
/**
|
|
37
|
-
* Creates a cloud account.
|
|
38
|
-
*/
|
|
39
|
-
createCloudAccount = this.mutation(
|
|
40
|
-
createCloudAccount as FixVariables<
|
|
41
|
-
typeof createCloudAccount,
|
|
42
|
-
{ jwtToken: never, connectAccountRequestV2: FixedConnectAccountRequestV2 }
|
|
43
|
-
>,
|
|
44
|
-
)
|
|
45
|
-
/**
|
|
46
|
-
* Deletes a cloud account.
|
|
47
|
-
*/
|
|
48
|
-
deleteCloudAccount = this.mutation(removeAuthorizationParam(deleteCloudAccountFromEnvironment))
|
|
49
|
-
/**
|
|
50
|
-
* Deletes all accounts in a workspace.
|
|
51
|
-
*/
|
|
52
|
-
deleteAllCloudAccounts = this.mutation(removeAuthorizationParam(deleteManagedAccountsFromWorkspace))
|
|
53
|
-
/**
|
|
54
|
-
* Provisions managed accounts in a workspace.
|
|
55
|
-
*/
|
|
56
|
-
createCloudServicesAccount = this.mutation(provisionManagedAccountsForWorkspace as unknown as FixVariables<
|
|
57
|
-
typeof provisionManagedAccountsForWorkspace,
|
|
58
|
-
{ jwtToken: never, managedAccountProvisionRequest: FixedManagedAccountProvisionRequest }
|
|
59
|
-
>)
|
|
60
|
-
/**
|
|
61
|
-
* Gets all available templates for the managed Cloud Account.
|
|
62
|
-
*/
|
|
63
|
-
managedAccountTemplates = this.query(getManagedCloudTemplate)
|
|
64
|
-
/**
|
|
65
|
-
* Gets all the available regions for the managed Cloud Account.
|
|
66
|
-
*/
|
|
67
|
-
managesAccountRegions = this.query(getManagedCloudRegion)
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
export const cloudAccountClient = new CloudAccountClient()
|
|
1
|
+
import { HttpError } from '@oazapfts/runtime'
|
|
2
|
+
import { createCloudAccount, defaults, deleteCloudAccountFromEnvironment, deleteManagedAccountsFromWorkspace, getCloudAccountByWorkspace, getManagedCloudRegion, getManagedCloudTemplate, getProvisionWorkflowInWorkspace, listCloudAccounts, provisionManagedAccountsForWorkspace } from '../api/cloudAccount'
|
|
3
|
+
import { DefaultAPIError } from '../error/DefaultAPIError'
|
|
4
|
+
import { StackspotAPIError } from '../error/StackspotAPIError'
|
|
5
|
+
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
|
|
6
|
+
import { removeAuthorizationParam } from '../utils/remove-authorization-param'
|
|
7
|
+
import { FixedConnectAccountRequestV2, FixedManagedAccountProvisionRequest, FixVariables } from './types'
|
|
8
|
+
import { getApiAddresses } from '../api-addresses'
|
|
9
|
+
|
|
10
|
+
const listAccounts = removeAuthorizationParam(listCloudAccounts)
|
|
11
|
+
|
|
12
|
+
class CloudAccountClient extends ReactQueryNetworkClient {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(getApiAddresses().cloudAccount.url, defaults)
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
protected buildStackSpotError(error: HttpError): StackspotAPIError {
|
|
18
|
+
return new DefaultAPIError(error.data, error.status, { en: {}, pt: {} }, error.headers)
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Lists all cloud accounts according to the parameters (paginated).
|
|
23
|
+
*/
|
|
24
|
+
cloudAccounts = this.infiniteQuery(listAccounts, {
|
|
25
|
+
accumulator: 'data',
|
|
26
|
+
getNextPageParam: ({ lastPage }) => lastPage.nextPage,
|
|
27
|
+
})
|
|
28
|
+
/**
|
|
29
|
+
* Gets a list of cloud accounts connected to a workspace
|
|
30
|
+
*/
|
|
31
|
+
cloudAccountByWorkspace = this.query(removeAuthorizationParam(getCloudAccountByWorkspace))
|
|
32
|
+
/**
|
|
33
|
+
* Gets the cloud account workflow of a workspace environment
|
|
34
|
+
*/
|
|
35
|
+
workflowByWorkspace = this.query(removeAuthorizationParam(getProvisionWorkflowInWorkspace))
|
|
36
|
+
/**
|
|
37
|
+
* Creates a cloud account.
|
|
38
|
+
*/
|
|
39
|
+
createCloudAccount = this.mutation(
|
|
40
|
+
createCloudAccount as FixVariables<
|
|
41
|
+
typeof createCloudAccount,
|
|
42
|
+
{ jwtToken: never, connectAccountRequestV2: FixedConnectAccountRequestV2 }
|
|
43
|
+
>,
|
|
44
|
+
)
|
|
45
|
+
/**
|
|
46
|
+
* Deletes a cloud account.
|
|
47
|
+
*/
|
|
48
|
+
deleteCloudAccount = this.mutation(removeAuthorizationParam(deleteCloudAccountFromEnvironment))
|
|
49
|
+
/**
|
|
50
|
+
* Deletes all accounts in a workspace.
|
|
51
|
+
*/
|
|
52
|
+
deleteAllCloudAccounts = this.mutation(removeAuthorizationParam(deleteManagedAccountsFromWorkspace))
|
|
53
|
+
/**
|
|
54
|
+
* Provisions managed accounts in a workspace.
|
|
55
|
+
*/
|
|
56
|
+
createCloudServicesAccount = this.mutation(provisionManagedAccountsForWorkspace as unknown as FixVariables<
|
|
57
|
+
typeof provisionManagedAccountsForWorkspace,
|
|
58
|
+
{ jwtToken: never, managedAccountProvisionRequest: FixedManagedAccountProvisionRequest }
|
|
59
|
+
>)
|
|
60
|
+
/**
|
|
61
|
+
* Gets all available templates for the managed Cloud Account.
|
|
62
|
+
*/
|
|
63
|
+
managedAccountTemplates = this.query(getManagedCloudTemplate)
|
|
64
|
+
/**
|
|
65
|
+
* Gets all the available regions for the managed Cloud Account.
|
|
66
|
+
*/
|
|
67
|
+
managesAccountRegions = this.query(getManagedCloudRegion)
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export const cloudAccountClient = new CloudAccountClient()
|
|
@@ -1,113 +1,113 @@
|
|
|
1
|
-
import { HttpError } from '@oazapfts/runtime'
|
|
2
|
-
|
|
3
|
-
import { DefaultAPIError } from '../error/DefaultAPIError'
|
|
4
|
-
import { StackspotAPIError } from '../error/StackspotAPIError'
|
|
5
|
-
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
|
|
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'
|
|
8
|
-
import { baseDictionary } from '../error/dictionary/base'
|
|
9
|
-
import { getApiAddresses } from '../api-addresses'
|
|
10
|
-
|
|
11
|
-
class CloudPlatformHorizonClient extends ReactQueryNetworkClient {
|
|
12
|
-
constructor() {
|
|
13
|
-
super(getApiAddresses().cloudPlatformHorizon.url, defaults)
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
protected buildStackSpotError(error: HttpError): StackspotAPIError {
|
|
17
|
-
return new DefaultAPIError(error.data, error.status, baseDictionary, error.headers)
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Get a list of organizations
|
|
21
|
-
*/
|
|
22
|
-
listOrganizations= this.query(removeAuthorizationParam(getOrganizations))
|
|
23
|
-
/**
|
|
24
|
-
* Get organization by id
|
|
25
|
-
*/
|
|
26
|
-
getOrganizationById = this.query(removeAuthorizationParam(getOrganizationById))
|
|
27
|
-
/**
|
|
28
|
-
* Get details of an tenant
|
|
29
|
-
*/
|
|
30
|
-
getTenantById= this.query(removeAuthorizationParam(getTenant1))
|
|
31
|
-
/**
|
|
32
|
-
* Get details of an runtime
|
|
33
|
-
*/
|
|
34
|
-
getRuntimeById= this.query(removeAuthorizationParam(getRuntime1))
|
|
35
|
-
/**
|
|
36
|
-
* Create an tenant
|
|
37
|
-
*/
|
|
38
|
-
createTenant = this.mutation(removeAuthorizationParam(createTenant1))
|
|
39
|
-
/**
|
|
40
|
-
* Create an runtime
|
|
41
|
-
*/
|
|
42
|
-
createRuntime = this.mutation(removeAuthorizationParam(createRuntime1))
|
|
43
|
-
/**
|
|
44
|
-
* Create an organization
|
|
45
|
-
*/
|
|
46
|
-
createOrganization = this.mutation(removeAuthorizationParam(createOrganization))
|
|
47
|
-
/**
|
|
48
|
-
* List all runtimes
|
|
49
|
-
*/
|
|
50
|
-
listRuntimes = this.query(removeAuthorizationParam(listRuntimes))
|
|
51
|
-
/**
|
|
52
|
-
* List all tenants
|
|
53
|
-
*/
|
|
54
|
-
listTenants = this.query(removeAuthorizationParam(listTenants))
|
|
55
|
-
/**
|
|
56
|
-
* List tenants from organization
|
|
57
|
-
*/
|
|
58
|
-
listTenantsByOrganization = this.query(removeAuthorizationParam(listTenants1))
|
|
59
|
-
/**
|
|
60
|
-
* List runtimes from tenant
|
|
61
|
-
*/
|
|
62
|
-
listRuntimesByTenant = this.query(removeAuthorizationParam(listRuntimes1))
|
|
63
|
-
/**
|
|
64
|
-
* List applications deployments from runtime
|
|
65
|
-
*/
|
|
66
|
-
listApplicationsDeployments = this.query(removeAuthorizationParam(listApplicationDeployments))
|
|
67
|
-
/**
|
|
68
|
-
* Deploy an application
|
|
69
|
-
*/
|
|
70
|
-
deployApplication = this.mutation(removeAuthorizationParam(deploy))
|
|
71
|
-
/**
|
|
72
|
-
* Get details of an application deployment
|
|
73
|
-
*/
|
|
74
|
-
getApplicationDeploymentById = this.query(removeAuthorizationParam(findApplicationDeploymentById))
|
|
75
|
-
/**
|
|
76
|
-
* Get logs from a application deployment
|
|
77
|
-
*/
|
|
78
|
-
getApplicationDeploymentLogs = this.query(removeAuthorizationParam(getApplicationDeploymentLogs))
|
|
79
|
-
/**
|
|
80
|
-
* Get health from a application deployment
|
|
81
|
-
*/
|
|
82
|
-
getApplicationDeploymentHealth = this.query(removeAuthorizationParam(getApplicationDeploymentHealth))
|
|
83
|
-
/**
|
|
84
|
-
* Get a list of organization addons
|
|
85
|
-
*/
|
|
86
|
-
listAddons = this.query(removeAuthorizationParam(listAddon))
|
|
87
|
-
/**
|
|
88
|
-
* Get a list of organization deploy templates
|
|
89
|
-
*/
|
|
90
|
-
listDeployTemplates = this.query(removeAuthorizationParam(listDeployTemplate))
|
|
91
|
-
/**
|
|
92
|
-
* Create an addon
|
|
93
|
-
*/
|
|
94
|
-
createAddon = this.mutation(removeAuthorizationParam(createAddon))
|
|
95
|
-
/**
|
|
96
|
-
* Create an deploy template
|
|
97
|
-
*/
|
|
98
|
-
createDeployTemplate = this.mutation(removeAuthorizationParam(createDeployTemplate))
|
|
99
|
-
/**
|
|
100
|
-
* Associate an runtime with an workspace environment
|
|
101
|
-
*/
|
|
102
|
-
associateRuntimeWithWorkspaceEnv = this.mutation(removeAuthorizationParam(associateWithWorkspaceEnvironment))
|
|
103
|
-
/**
|
|
104
|
-
* Retrieves associate runtime with a workspace's environment
|
|
105
|
-
*/
|
|
106
|
-
getRuntimeAssociations = this.query(removeAuthorizationParam(getAssociationWorkspaceEnvironmentByRuntimeId))
|
|
107
|
-
/**
|
|
108
|
-
* List runtime associations to workspace's environment
|
|
109
|
-
*/
|
|
110
|
-
listRuntimeAssociationsToEnv = this.query(removeAuthorizationParam(listAssociations))
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
export const cloudPlatformHorizonClient = new CloudPlatformHorizonClient()
|
|
1
|
+
import { HttpError } from '@oazapfts/runtime'
|
|
2
|
+
|
|
3
|
+
import { DefaultAPIError } from '../error/DefaultAPIError'
|
|
4
|
+
import { StackspotAPIError } from '../error/StackspotAPIError'
|
|
5
|
+
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
|
|
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'
|
|
8
|
+
import { baseDictionary } from '../error/dictionary/base'
|
|
9
|
+
import { getApiAddresses } from '../api-addresses'
|
|
10
|
+
|
|
11
|
+
class CloudPlatformHorizonClient extends ReactQueryNetworkClient {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(getApiAddresses().cloudPlatformHorizon.url, defaults)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
protected buildStackSpotError(error: HttpError): StackspotAPIError {
|
|
17
|
+
return new DefaultAPIError(error.data, error.status, baseDictionary, error.headers)
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Get a list of organizations
|
|
21
|
+
*/
|
|
22
|
+
listOrganizations= this.query(removeAuthorizationParam(getOrganizations))
|
|
23
|
+
/**
|
|
24
|
+
* Get organization by id
|
|
25
|
+
*/
|
|
26
|
+
getOrganizationById = this.query(removeAuthorizationParam(getOrganizationById))
|
|
27
|
+
/**
|
|
28
|
+
* Get details of an tenant
|
|
29
|
+
*/
|
|
30
|
+
getTenantById= this.query(removeAuthorizationParam(getTenant1))
|
|
31
|
+
/**
|
|
32
|
+
* Get details of an runtime
|
|
33
|
+
*/
|
|
34
|
+
getRuntimeById= this.query(removeAuthorizationParam(getRuntime1))
|
|
35
|
+
/**
|
|
36
|
+
* Create an tenant
|
|
37
|
+
*/
|
|
38
|
+
createTenant = this.mutation(removeAuthorizationParam(createTenant1))
|
|
39
|
+
/**
|
|
40
|
+
* Create an runtime
|
|
41
|
+
*/
|
|
42
|
+
createRuntime = this.mutation(removeAuthorizationParam(createRuntime1))
|
|
43
|
+
/**
|
|
44
|
+
* Create an organization
|
|
45
|
+
*/
|
|
46
|
+
createOrganization = this.mutation(removeAuthorizationParam(createOrganization))
|
|
47
|
+
/**
|
|
48
|
+
* List all runtimes
|
|
49
|
+
*/
|
|
50
|
+
listRuntimes = this.query(removeAuthorizationParam(listRuntimes))
|
|
51
|
+
/**
|
|
52
|
+
* List all tenants
|
|
53
|
+
*/
|
|
54
|
+
listTenants = this.query(removeAuthorizationParam(listTenants))
|
|
55
|
+
/**
|
|
56
|
+
* List tenants from organization
|
|
57
|
+
*/
|
|
58
|
+
listTenantsByOrganization = this.query(removeAuthorizationParam(listTenants1))
|
|
59
|
+
/**
|
|
60
|
+
* List runtimes from tenant
|
|
61
|
+
*/
|
|
62
|
+
listRuntimesByTenant = this.query(removeAuthorizationParam(listRuntimes1))
|
|
63
|
+
/**
|
|
64
|
+
* List applications deployments from runtime
|
|
65
|
+
*/
|
|
66
|
+
listApplicationsDeployments = this.query(removeAuthorizationParam(listApplicationDeployments))
|
|
67
|
+
/**
|
|
68
|
+
* Deploy an application
|
|
69
|
+
*/
|
|
70
|
+
deployApplication = this.mutation(removeAuthorizationParam(deploy))
|
|
71
|
+
/**
|
|
72
|
+
* Get details of an application deployment
|
|
73
|
+
*/
|
|
74
|
+
getApplicationDeploymentById = this.query(removeAuthorizationParam(findApplicationDeploymentById))
|
|
75
|
+
/**
|
|
76
|
+
* Get logs from a application deployment
|
|
77
|
+
*/
|
|
78
|
+
getApplicationDeploymentLogs = this.query(removeAuthorizationParam(getApplicationDeploymentLogs))
|
|
79
|
+
/**
|
|
80
|
+
* Get health from a application deployment
|
|
81
|
+
*/
|
|
82
|
+
getApplicationDeploymentHealth = this.query(removeAuthorizationParam(getApplicationDeploymentHealth))
|
|
83
|
+
/**
|
|
84
|
+
* Get a list of organization addons
|
|
85
|
+
*/
|
|
86
|
+
listAddons = this.query(removeAuthorizationParam(listAddon))
|
|
87
|
+
/**
|
|
88
|
+
* Get a list of organization deploy templates
|
|
89
|
+
*/
|
|
90
|
+
listDeployTemplates = this.query(removeAuthorizationParam(listDeployTemplate))
|
|
91
|
+
/**
|
|
92
|
+
* Create an addon
|
|
93
|
+
*/
|
|
94
|
+
createAddon = this.mutation(removeAuthorizationParam(createAddon))
|
|
95
|
+
/**
|
|
96
|
+
* Create an deploy template
|
|
97
|
+
*/
|
|
98
|
+
createDeployTemplate = this.mutation(removeAuthorizationParam(createDeployTemplate))
|
|
99
|
+
/**
|
|
100
|
+
* Associate an runtime with an workspace environment
|
|
101
|
+
*/
|
|
102
|
+
associateRuntimeWithWorkspaceEnv = this.mutation(removeAuthorizationParam(associateWithWorkspaceEnvironment))
|
|
103
|
+
/**
|
|
104
|
+
* Retrieves associate runtime with a workspace's environment
|
|
105
|
+
*/
|
|
106
|
+
getRuntimeAssociations = this.query(removeAuthorizationParam(getAssociationWorkspaceEnvironmentByRuntimeId))
|
|
107
|
+
/**
|
|
108
|
+
* List runtime associations to workspace's environment
|
|
109
|
+
*/
|
|
110
|
+
listRuntimeAssociationsToEnv = this.query(removeAuthorizationParam(listAssociations))
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export const cloudPlatformHorizonClient = new CloudPlatformHorizonClient()
|