@stack-spot/portal-network 0.183.0 → 0.184.0
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 +2412 -2405
- 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.js +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.d.ts +16 -10
- package/dist/api/workspaceManager.d.ts.map +1 -1
- package/dist/api/workspaceManager.js +11 -1
- package/dist/api/workspaceManager.js.map +1 -1
- package/dist/api/workspaceSearchEngine.js +1 -1
- package/dist/client/workspace-manager.d.ts +6 -0
- package/dist/client/workspace-manager.d.ts.map +1 -1
- package/dist/client/workspace-manager.js +10 -1
- package/dist/client/workspace-manager.js.map +1 -1
- package/package.json +6 -6
- package/scripts/generate-apis.ts +134 -134
- package/src/api/account.ts +8367 -8367
- package/src/api/agent-tools.ts +2169 -2169
- package/src/api/agent.ts +1083 -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 +3481 -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 +334 -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 -2936
- 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 +395 -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 +349 -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 +377 -377
- package/src/client/workflow.ts +83 -83
- package/src/client/workspace-ai.ts +191 -191
- package/src/client/workspace-manager.ts +564 -560
- 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,163 +1,163 @@
|
|
|
1
|
-
import { HttpError } from '@oazapfts/runtime'
|
|
2
|
-
import
|
|
3
|
-
{
|
|
4
|
-
acceptNetworkConnection,
|
|
5
|
-
createCertificate,
|
|
6
|
-
createCidr,
|
|
7
|
-
createDnsRecord,
|
|
8
|
-
createDnsZone,
|
|
9
|
-
createFolder,
|
|
10
|
-
createFoundation,
|
|
11
|
-
createInbound,
|
|
12
|
-
createNetwork,
|
|
13
|
-
createNetworkConnection,
|
|
14
|
-
createProject,
|
|
15
|
-
createVpn,
|
|
16
|
-
defaults,
|
|
17
|
-
getCertificate,
|
|
18
|
-
getFolder,
|
|
19
|
-
getFoundation,
|
|
20
|
-
getNetwork,
|
|
21
|
-
getProject,
|
|
22
|
-
getVpnConfiguration,
|
|
23
|
-
listCertificates,
|
|
24
|
-
listCidr,
|
|
25
|
-
listDnsRecord,
|
|
26
|
-
listDnsZone,
|
|
27
|
-
listFoundations,
|
|
28
|
-
listInbound,
|
|
29
|
-
listNetwork,
|
|
30
|
-
listNetworkConnection,
|
|
31
|
-
listVpns,
|
|
32
|
-
providers,
|
|
33
|
-
} from '../api/cloudPlatform'
|
|
34
|
-
import { DefaultAPIError } from '../error/DefaultAPIError'
|
|
35
|
-
import { StackspotAPIError } from '../error/StackspotAPIError'
|
|
36
|
-
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
|
|
37
|
-
import { removeAuthorizationParam } from '../utils/remove-authorization-param'
|
|
38
|
-
import { scfDictionary } from '../error/dictionary/cloud-platform'
|
|
39
|
-
import { getApiAddresses } from '../api-addresses'
|
|
40
|
-
|
|
41
|
-
class CloudPlatformClient extends ReactQueryNetworkClient {
|
|
42
|
-
constructor() {
|
|
43
|
-
super(getApiAddresses().cloudPlatform.url, defaults)
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
protected buildStackSpotError(error: HttpError): StackspotAPIError {
|
|
47
|
-
return new DefaultAPIError(error.data, error.status, scfDictionary, error.headers)
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* List foundations
|
|
51
|
-
*/
|
|
52
|
-
listFoundations = this.query(removeAuthorizationParam(listFoundations))
|
|
53
|
-
/**
|
|
54
|
-
* Get a foundation by id
|
|
55
|
-
*/
|
|
56
|
-
foundation = this.query(removeAuthorizationParam(getFoundation))
|
|
57
|
-
/**
|
|
58
|
-
* Get list of foundations folders or folder by id
|
|
59
|
-
*/
|
|
60
|
-
getFolder = this.query(removeAuthorizationParam(getFolder))
|
|
61
|
-
/**
|
|
62
|
-
* Get list of providers for a foundation
|
|
63
|
-
*/
|
|
64
|
-
listProviders = this.query(removeAuthorizationParam(providers))
|
|
65
|
-
/**
|
|
66
|
-
* Create a foundation
|
|
67
|
-
*/
|
|
68
|
-
createFoundation = this.mutation(removeAuthorizationParam(createFoundation))
|
|
69
|
-
/**
|
|
70
|
-
* Create a foundation folder
|
|
71
|
-
*/
|
|
72
|
-
createFolder = this.mutation(removeAuthorizationParam(createFolder))
|
|
73
|
-
/**
|
|
74
|
-
* Get a list of dns zones
|
|
75
|
-
*/
|
|
76
|
-
listDnsZones = this.query(removeAuthorizationParam(listDnsZone))
|
|
77
|
-
/**
|
|
78
|
-
* Create a dns zone
|
|
79
|
-
*/
|
|
80
|
-
createDnsZone = this.mutation(removeAuthorizationParam(createDnsZone))
|
|
81
|
-
/**
|
|
82
|
-
* Get a list of cidrs
|
|
83
|
-
*/
|
|
84
|
-
listCidrs = this.query(removeAuthorizationParam(listCidr))
|
|
85
|
-
/**
|
|
86
|
-
* Create a cidr
|
|
87
|
-
*/
|
|
88
|
-
createCidr = this.mutation(removeAuthorizationParam(createCidr))
|
|
89
|
-
/**
|
|
90
|
-
* Get a list of certificates
|
|
91
|
-
*/
|
|
92
|
-
listCertificates = this.query(removeAuthorizationParam(listCertificates))
|
|
93
|
-
/**
|
|
94
|
-
* Get a certificate by id
|
|
95
|
-
*/
|
|
96
|
-
getCertificate = this.query(removeAuthorizationParam(getCertificate))
|
|
97
|
-
/**
|
|
98
|
-
* Create a certificate
|
|
99
|
-
*/
|
|
100
|
-
createCertificate = this.mutation(removeAuthorizationParam(createCertificate))
|
|
101
|
-
/**
|
|
102
|
-
* Create a project
|
|
103
|
-
*/
|
|
104
|
-
createProject = this.mutation(removeAuthorizationParam(createProject))
|
|
105
|
-
/**
|
|
106
|
-
* Get a project by id
|
|
107
|
-
*/
|
|
108
|
-
getProjectById = this.query(removeAuthorizationParam(getProject))
|
|
109
|
-
/**
|
|
110
|
-
* Get a list of dns records
|
|
111
|
-
*/
|
|
112
|
-
listDnsRecords = this.query(removeAuthorizationParam(listDnsRecord))
|
|
113
|
-
/**
|
|
114
|
-
* Create a dns record
|
|
115
|
-
*/
|
|
116
|
-
createDnsRecord = this.mutation(removeAuthorizationParam(createDnsRecord))
|
|
117
|
-
/**
|
|
118
|
-
* Get a list of networks
|
|
119
|
-
*/
|
|
120
|
-
listNetworks = this.query(removeAuthorizationParam(listNetwork))
|
|
121
|
-
/**
|
|
122
|
-
* Create a network
|
|
123
|
-
*/
|
|
124
|
-
createNetwork = this.mutation(removeAuthorizationParam(createNetwork))
|
|
125
|
-
/**
|
|
126
|
-
* Get a list of inbounds
|
|
127
|
-
*/
|
|
128
|
-
listInbounds = this.query(removeAuthorizationParam(listInbound))
|
|
129
|
-
/**
|
|
130
|
-
* Create a inbound
|
|
131
|
-
*/
|
|
132
|
-
createInbound = this.mutation(removeAuthorizationParam(createInbound))
|
|
133
|
-
/**
|
|
134
|
-
* Add a network connection
|
|
135
|
-
*/
|
|
136
|
-
addNetworkConnection = this.mutation(removeAuthorizationParam(createNetworkConnection))
|
|
137
|
-
/**
|
|
138
|
-
* Get a network connection request
|
|
139
|
-
*/
|
|
140
|
-
getNetworkConnections = this.query(removeAuthorizationParam(listNetworkConnection))
|
|
141
|
-
/**
|
|
142
|
-
* Accept a network connection
|
|
143
|
-
*/
|
|
144
|
-
acceptNetworkConnection = this.mutation(removeAuthorizationParam(acceptNetworkConnection))
|
|
145
|
-
/**
|
|
146
|
-
* Get a list of vpn's
|
|
147
|
-
*/
|
|
148
|
-
listVpns = this.query(removeAuthorizationParam(listVpns))
|
|
149
|
-
/**
|
|
150
|
-
* Get vpn configuration
|
|
151
|
-
*/
|
|
152
|
-
getVpnConfiguration = this.query(removeAuthorizationParam(getVpnConfiguration))
|
|
153
|
-
/**
|
|
154
|
-
* Create a vpn
|
|
155
|
-
*/
|
|
156
|
-
createVpn = this.mutation(removeAuthorizationParam(createVpn))
|
|
157
|
-
/**
|
|
158
|
-
* Get a network details
|
|
159
|
-
*/
|
|
160
|
-
getNetworkById = this.query(removeAuthorizationParam(getNetwork))
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
export const cloudPlatformClient = new CloudPlatformClient()
|
|
1
|
+
import { HttpError } from '@oazapfts/runtime'
|
|
2
|
+
import
|
|
3
|
+
{
|
|
4
|
+
acceptNetworkConnection,
|
|
5
|
+
createCertificate,
|
|
6
|
+
createCidr,
|
|
7
|
+
createDnsRecord,
|
|
8
|
+
createDnsZone,
|
|
9
|
+
createFolder,
|
|
10
|
+
createFoundation,
|
|
11
|
+
createInbound,
|
|
12
|
+
createNetwork,
|
|
13
|
+
createNetworkConnection,
|
|
14
|
+
createProject,
|
|
15
|
+
createVpn,
|
|
16
|
+
defaults,
|
|
17
|
+
getCertificate,
|
|
18
|
+
getFolder,
|
|
19
|
+
getFoundation,
|
|
20
|
+
getNetwork,
|
|
21
|
+
getProject,
|
|
22
|
+
getVpnConfiguration,
|
|
23
|
+
listCertificates,
|
|
24
|
+
listCidr,
|
|
25
|
+
listDnsRecord,
|
|
26
|
+
listDnsZone,
|
|
27
|
+
listFoundations,
|
|
28
|
+
listInbound,
|
|
29
|
+
listNetwork,
|
|
30
|
+
listNetworkConnection,
|
|
31
|
+
listVpns,
|
|
32
|
+
providers,
|
|
33
|
+
} from '../api/cloudPlatform'
|
|
34
|
+
import { DefaultAPIError } from '../error/DefaultAPIError'
|
|
35
|
+
import { StackspotAPIError } from '../error/StackspotAPIError'
|
|
36
|
+
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
|
|
37
|
+
import { removeAuthorizationParam } from '../utils/remove-authorization-param'
|
|
38
|
+
import { scfDictionary } from '../error/dictionary/cloud-platform'
|
|
39
|
+
import { getApiAddresses } from '../api-addresses'
|
|
40
|
+
|
|
41
|
+
class CloudPlatformClient extends ReactQueryNetworkClient {
|
|
42
|
+
constructor() {
|
|
43
|
+
super(getApiAddresses().cloudPlatform.url, defaults)
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
protected buildStackSpotError(error: HttpError): StackspotAPIError {
|
|
47
|
+
return new DefaultAPIError(error.data, error.status, scfDictionary, error.headers)
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* List foundations
|
|
51
|
+
*/
|
|
52
|
+
listFoundations = this.query(removeAuthorizationParam(listFoundations))
|
|
53
|
+
/**
|
|
54
|
+
* Get a foundation by id
|
|
55
|
+
*/
|
|
56
|
+
foundation = this.query(removeAuthorizationParam(getFoundation))
|
|
57
|
+
/**
|
|
58
|
+
* Get list of foundations folders or folder by id
|
|
59
|
+
*/
|
|
60
|
+
getFolder = this.query(removeAuthorizationParam(getFolder))
|
|
61
|
+
/**
|
|
62
|
+
* Get list of providers for a foundation
|
|
63
|
+
*/
|
|
64
|
+
listProviders = this.query(removeAuthorizationParam(providers))
|
|
65
|
+
/**
|
|
66
|
+
* Create a foundation
|
|
67
|
+
*/
|
|
68
|
+
createFoundation = this.mutation(removeAuthorizationParam(createFoundation))
|
|
69
|
+
/**
|
|
70
|
+
* Create a foundation folder
|
|
71
|
+
*/
|
|
72
|
+
createFolder = this.mutation(removeAuthorizationParam(createFolder))
|
|
73
|
+
/**
|
|
74
|
+
* Get a list of dns zones
|
|
75
|
+
*/
|
|
76
|
+
listDnsZones = this.query(removeAuthorizationParam(listDnsZone))
|
|
77
|
+
/**
|
|
78
|
+
* Create a dns zone
|
|
79
|
+
*/
|
|
80
|
+
createDnsZone = this.mutation(removeAuthorizationParam(createDnsZone))
|
|
81
|
+
/**
|
|
82
|
+
* Get a list of cidrs
|
|
83
|
+
*/
|
|
84
|
+
listCidrs = this.query(removeAuthorizationParam(listCidr))
|
|
85
|
+
/**
|
|
86
|
+
* Create a cidr
|
|
87
|
+
*/
|
|
88
|
+
createCidr = this.mutation(removeAuthorizationParam(createCidr))
|
|
89
|
+
/**
|
|
90
|
+
* Get a list of certificates
|
|
91
|
+
*/
|
|
92
|
+
listCertificates = this.query(removeAuthorizationParam(listCertificates))
|
|
93
|
+
/**
|
|
94
|
+
* Get a certificate by id
|
|
95
|
+
*/
|
|
96
|
+
getCertificate = this.query(removeAuthorizationParam(getCertificate))
|
|
97
|
+
/**
|
|
98
|
+
* Create a certificate
|
|
99
|
+
*/
|
|
100
|
+
createCertificate = this.mutation(removeAuthorizationParam(createCertificate))
|
|
101
|
+
/**
|
|
102
|
+
* Create a project
|
|
103
|
+
*/
|
|
104
|
+
createProject = this.mutation(removeAuthorizationParam(createProject))
|
|
105
|
+
/**
|
|
106
|
+
* Get a project by id
|
|
107
|
+
*/
|
|
108
|
+
getProjectById = this.query(removeAuthorizationParam(getProject))
|
|
109
|
+
/**
|
|
110
|
+
* Get a list of dns records
|
|
111
|
+
*/
|
|
112
|
+
listDnsRecords = this.query(removeAuthorizationParam(listDnsRecord))
|
|
113
|
+
/**
|
|
114
|
+
* Create a dns record
|
|
115
|
+
*/
|
|
116
|
+
createDnsRecord = this.mutation(removeAuthorizationParam(createDnsRecord))
|
|
117
|
+
/**
|
|
118
|
+
* Get a list of networks
|
|
119
|
+
*/
|
|
120
|
+
listNetworks = this.query(removeAuthorizationParam(listNetwork))
|
|
121
|
+
/**
|
|
122
|
+
* Create a network
|
|
123
|
+
*/
|
|
124
|
+
createNetwork = this.mutation(removeAuthorizationParam(createNetwork))
|
|
125
|
+
/**
|
|
126
|
+
* Get a list of inbounds
|
|
127
|
+
*/
|
|
128
|
+
listInbounds = this.query(removeAuthorizationParam(listInbound))
|
|
129
|
+
/**
|
|
130
|
+
* Create a inbound
|
|
131
|
+
*/
|
|
132
|
+
createInbound = this.mutation(removeAuthorizationParam(createInbound))
|
|
133
|
+
/**
|
|
134
|
+
* Add a network connection
|
|
135
|
+
*/
|
|
136
|
+
addNetworkConnection = this.mutation(removeAuthorizationParam(createNetworkConnection))
|
|
137
|
+
/**
|
|
138
|
+
* Get a network connection request
|
|
139
|
+
*/
|
|
140
|
+
getNetworkConnections = this.query(removeAuthorizationParam(listNetworkConnection))
|
|
141
|
+
/**
|
|
142
|
+
* Accept a network connection
|
|
143
|
+
*/
|
|
144
|
+
acceptNetworkConnection = this.mutation(removeAuthorizationParam(acceptNetworkConnection))
|
|
145
|
+
/**
|
|
146
|
+
* Get a list of vpn's
|
|
147
|
+
*/
|
|
148
|
+
listVpns = this.query(removeAuthorizationParam(listVpns))
|
|
149
|
+
/**
|
|
150
|
+
* Get vpn configuration
|
|
151
|
+
*/
|
|
152
|
+
getVpnConfiguration = this.query(removeAuthorizationParam(getVpnConfiguration))
|
|
153
|
+
/**
|
|
154
|
+
* Create a vpn
|
|
155
|
+
*/
|
|
156
|
+
createVpn = this.mutation(removeAuthorizationParam(createVpn))
|
|
157
|
+
/**
|
|
158
|
+
* Get a network details
|
|
159
|
+
*/
|
|
160
|
+
getNetworkById = this.query(removeAuthorizationParam(getNetwork))
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export const cloudPlatformClient = new CloudPlatformClient()
|
|
@@ -1,129 +1,129 @@
|
|
|
1
|
-
import { HttpError } from '@oazapfts/runtime'
|
|
2
|
-
import
|
|
3
|
-
{
|
|
4
|
-
createApplication,
|
|
5
|
-
createDeployment,
|
|
6
|
-
createSchedule,
|
|
7
|
-
defaults,
|
|
8
|
-
getApplication,
|
|
9
|
-
getApplicationHistory,
|
|
10
|
-
getDeployment,
|
|
11
|
-
getDeploymentHealth,
|
|
12
|
-
getDeploymentLogs,
|
|
13
|
-
getDeploymentStatus,
|
|
14
|
-
getInstances,
|
|
15
|
-
getLastDeploymentByRuntime,
|
|
16
|
-
getRepositoryImages,
|
|
17
|
-
getScheduling,
|
|
18
|
-
getSecrets,
|
|
19
|
-
listApplications,
|
|
20
|
-
listDeployments,
|
|
21
|
-
listRepositories,
|
|
22
|
-
listRuntimes,
|
|
23
|
-
setAutoscaling,
|
|
24
|
-
startApplication,
|
|
25
|
-
stopApplication,
|
|
26
|
-
} from '../api/cloudRuntimes'
|
|
27
|
-
import { DefaultAPIError } from '../error/DefaultAPIError'
|
|
28
|
-
import { StackspotAPIError } from '../error/StackspotAPIError'
|
|
29
|
-
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
|
|
30
|
-
import { removeAuthorizationParam } from '../utils/remove-authorization-param'
|
|
31
|
-
import { baseDictionary } from '../error/dictionary/base'
|
|
32
|
-
import { getApiAddresses } from '../api-addresses'
|
|
33
|
-
|
|
34
|
-
class CloudRuntimesClient extends ReactQueryNetworkClient {
|
|
35
|
-
constructor() {
|
|
36
|
-
super(getApiAddresses().cloudRuntimes.url, defaults)
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
protected buildStackSpotError(error: HttpError): StackspotAPIError {
|
|
40
|
-
return new DefaultAPIError(error.data, error.status, baseDictionary, error.headers)
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Get list of applications
|
|
44
|
-
*/
|
|
45
|
-
listApplications = this.query(removeAuthorizationParam(listApplications))
|
|
46
|
-
/**
|
|
47
|
-
* Get an application by id
|
|
48
|
-
*/
|
|
49
|
-
application = this.query(removeAuthorizationParam(getApplication))
|
|
50
|
-
/**
|
|
51
|
-
* Get an application history
|
|
52
|
-
*/
|
|
53
|
-
applicationHistory = this.query(removeAuthorizationParam(getApplicationHistory))
|
|
54
|
-
/**
|
|
55
|
-
* Get list of application deployments
|
|
56
|
-
*/
|
|
57
|
-
listApplicationDeployments = this.query(removeAuthorizationParam(listDeployments))
|
|
58
|
-
/**
|
|
59
|
-
* Get list of last deployments by runtime
|
|
60
|
-
*/
|
|
61
|
-
listLastApplicationDeploymentsByRuntime = this.query(removeAuthorizationParam(getLastDeploymentByRuntime))
|
|
62
|
-
/**
|
|
63
|
-
* Get an application deployment by id
|
|
64
|
-
*/
|
|
65
|
-
applicationDeployment = this.query(removeAuthorizationParam(getDeployment))
|
|
66
|
-
/**
|
|
67
|
-
* Get an application deployment status
|
|
68
|
-
*/
|
|
69
|
-
applicationDeploymentStatus = this.query(removeAuthorizationParam(getDeploymentStatus))
|
|
70
|
-
/**
|
|
71
|
-
* Get an application deployment health
|
|
72
|
-
*/
|
|
73
|
-
applicationDeploymentHealth = this.query(removeAuthorizationParam(getDeploymentHealth))
|
|
74
|
-
/**
|
|
75
|
-
* Get an application deployment logs
|
|
76
|
-
*/
|
|
77
|
-
applicationDeploymentLogs = this.query(removeAuthorizationParam(getDeploymentLogs))
|
|
78
|
-
/**
|
|
79
|
-
* Get an application runtimes
|
|
80
|
-
*/
|
|
81
|
-
listApplicationRuntimes = this.query(removeAuthorizationParam(listRuntimes))
|
|
82
|
-
/**
|
|
83
|
-
* Get list of repositories
|
|
84
|
-
*/
|
|
85
|
-
listRepositories = this.query(removeAuthorizationParam(listRepositories))
|
|
86
|
-
/**
|
|
87
|
-
* Get list of images from a repository
|
|
88
|
-
*/
|
|
89
|
-
listRepositoryImages = this.query(removeAuthorizationParam(getRepositoryImages))
|
|
90
|
-
/**
|
|
91
|
-
* Create a deploy of the application
|
|
92
|
-
*/
|
|
93
|
-
createDeployment = this.mutation(removeAuthorizationParam(createDeployment))
|
|
94
|
-
/**
|
|
95
|
-
* Create an application
|
|
96
|
-
*/
|
|
97
|
-
createApplication = this.mutation(removeAuthorizationParam(createApplication))
|
|
98
|
-
/**
|
|
99
|
-
* Start an application
|
|
100
|
-
*/
|
|
101
|
-
startApplication = this.mutation(removeAuthorizationParam(startApplication))
|
|
102
|
-
/**
|
|
103
|
-
* Stop an application
|
|
104
|
-
*/
|
|
105
|
-
stopApplication = this.mutation(removeAuthorizationParam(stopApplication))
|
|
106
|
-
/**
|
|
107
|
-
* Get secret keys of an application by runtime
|
|
108
|
-
*/
|
|
109
|
-
applicationSecretKeys = this.query(removeAuthorizationParam(getSecrets))
|
|
110
|
-
/**
|
|
111
|
-
* Get application instances in use
|
|
112
|
-
*/
|
|
113
|
-
applicationInstancesNow = this.query(removeAuthorizationParam(getInstances))
|
|
114
|
-
/**
|
|
115
|
-
* Edit application instances
|
|
116
|
-
*/
|
|
117
|
-
editApplicationInstances = this.mutation(removeAuthorizationParam(setAutoscaling))
|
|
118
|
-
/**
|
|
119
|
-
* Configure a schedule for application
|
|
120
|
-
*/
|
|
121
|
-
createSchedule = this.mutation(removeAuthorizationParam(createSchedule))
|
|
122
|
-
/**
|
|
123
|
-
* Get application scheduling
|
|
124
|
-
*/
|
|
125
|
-
getScheduling = this.query(removeAuthorizationParam(getScheduling))
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
export const cloudRuntimesClient = new CloudRuntimesClient()
|
|
1
|
+
import { HttpError } from '@oazapfts/runtime'
|
|
2
|
+
import
|
|
3
|
+
{
|
|
4
|
+
createApplication,
|
|
5
|
+
createDeployment,
|
|
6
|
+
createSchedule,
|
|
7
|
+
defaults,
|
|
8
|
+
getApplication,
|
|
9
|
+
getApplicationHistory,
|
|
10
|
+
getDeployment,
|
|
11
|
+
getDeploymentHealth,
|
|
12
|
+
getDeploymentLogs,
|
|
13
|
+
getDeploymentStatus,
|
|
14
|
+
getInstances,
|
|
15
|
+
getLastDeploymentByRuntime,
|
|
16
|
+
getRepositoryImages,
|
|
17
|
+
getScheduling,
|
|
18
|
+
getSecrets,
|
|
19
|
+
listApplications,
|
|
20
|
+
listDeployments,
|
|
21
|
+
listRepositories,
|
|
22
|
+
listRuntimes,
|
|
23
|
+
setAutoscaling,
|
|
24
|
+
startApplication,
|
|
25
|
+
stopApplication,
|
|
26
|
+
} from '../api/cloudRuntimes'
|
|
27
|
+
import { DefaultAPIError } from '../error/DefaultAPIError'
|
|
28
|
+
import { StackspotAPIError } from '../error/StackspotAPIError'
|
|
29
|
+
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
|
|
30
|
+
import { removeAuthorizationParam } from '../utils/remove-authorization-param'
|
|
31
|
+
import { baseDictionary } from '../error/dictionary/base'
|
|
32
|
+
import { getApiAddresses } from '../api-addresses'
|
|
33
|
+
|
|
34
|
+
class CloudRuntimesClient extends ReactQueryNetworkClient {
|
|
35
|
+
constructor() {
|
|
36
|
+
super(getApiAddresses().cloudRuntimes.url, defaults)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
protected buildStackSpotError(error: HttpError): StackspotAPIError {
|
|
40
|
+
return new DefaultAPIError(error.data, error.status, baseDictionary, error.headers)
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Get list of applications
|
|
44
|
+
*/
|
|
45
|
+
listApplications = this.query(removeAuthorizationParam(listApplications))
|
|
46
|
+
/**
|
|
47
|
+
* Get an application by id
|
|
48
|
+
*/
|
|
49
|
+
application = this.query(removeAuthorizationParam(getApplication))
|
|
50
|
+
/**
|
|
51
|
+
* Get an application history
|
|
52
|
+
*/
|
|
53
|
+
applicationHistory = this.query(removeAuthorizationParam(getApplicationHistory))
|
|
54
|
+
/**
|
|
55
|
+
* Get list of application deployments
|
|
56
|
+
*/
|
|
57
|
+
listApplicationDeployments = this.query(removeAuthorizationParam(listDeployments))
|
|
58
|
+
/**
|
|
59
|
+
* Get list of last deployments by runtime
|
|
60
|
+
*/
|
|
61
|
+
listLastApplicationDeploymentsByRuntime = this.query(removeAuthorizationParam(getLastDeploymentByRuntime))
|
|
62
|
+
/**
|
|
63
|
+
* Get an application deployment by id
|
|
64
|
+
*/
|
|
65
|
+
applicationDeployment = this.query(removeAuthorizationParam(getDeployment))
|
|
66
|
+
/**
|
|
67
|
+
* Get an application deployment status
|
|
68
|
+
*/
|
|
69
|
+
applicationDeploymentStatus = this.query(removeAuthorizationParam(getDeploymentStatus))
|
|
70
|
+
/**
|
|
71
|
+
* Get an application deployment health
|
|
72
|
+
*/
|
|
73
|
+
applicationDeploymentHealth = this.query(removeAuthorizationParam(getDeploymentHealth))
|
|
74
|
+
/**
|
|
75
|
+
* Get an application deployment logs
|
|
76
|
+
*/
|
|
77
|
+
applicationDeploymentLogs = this.query(removeAuthorizationParam(getDeploymentLogs))
|
|
78
|
+
/**
|
|
79
|
+
* Get an application runtimes
|
|
80
|
+
*/
|
|
81
|
+
listApplicationRuntimes = this.query(removeAuthorizationParam(listRuntimes))
|
|
82
|
+
/**
|
|
83
|
+
* Get list of repositories
|
|
84
|
+
*/
|
|
85
|
+
listRepositories = this.query(removeAuthorizationParam(listRepositories))
|
|
86
|
+
/**
|
|
87
|
+
* Get list of images from a repository
|
|
88
|
+
*/
|
|
89
|
+
listRepositoryImages = this.query(removeAuthorizationParam(getRepositoryImages))
|
|
90
|
+
/**
|
|
91
|
+
* Create a deploy of the application
|
|
92
|
+
*/
|
|
93
|
+
createDeployment = this.mutation(removeAuthorizationParam(createDeployment))
|
|
94
|
+
/**
|
|
95
|
+
* Create an application
|
|
96
|
+
*/
|
|
97
|
+
createApplication = this.mutation(removeAuthorizationParam(createApplication))
|
|
98
|
+
/**
|
|
99
|
+
* Start an application
|
|
100
|
+
*/
|
|
101
|
+
startApplication = this.mutation(removeAuthorizationParam(startApplication))
|
|
102
|
+
/**
|
|
103
|
+
* Stop an application
|
|
104
|
+
*/
|
|
105
|
+
stopApplication = this.mutation(removeAuthorizationParam(stopApplication))
|
|
106
|
+
/**
|
|
107
|
+
* Get secret keys of an application by runtime
|
|
108
|
+
*/
|
|
109
|
+
applicationSecretKeys = this.query(removeAuthorizationParam(getSecrets))
|
|
110
|
+
/**
|
|
111
|
+
* Get application instances in use
|
|
112
|
+
*/
|
|
113
|
+
applicationInstancesNow = this.query(removeAuthorizationParam(getInstances))
|
|
114
|
+
/**
|
|
115
|
+
* Edit application instances
|
|
116
|
+
*/
|
|
117
|
+
editApplicationInstances = this.mutation(removeAuthorizationParam(setAutoscaling))
|
|
118
|
+
/**
|
|
119
|
+
* Configure a schedule for application
|
|
120
|
+
*/
|
|
121
|
+
createSchedule = this.mutation(removeAuthorizationParam(createSchedule))
|
|
122
|
+
/**
|
|
123
|
+
* Get application scheduling
|
|
124
|
+
*/
|
|
125
|
+
getScheduling = this.query(removeAuthorizationParam(getScheduling))
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
export const cloudRuntimesClient = new CloudRuntimesClient()
|