@stack-spot/portal-network 0.91.0 → 0.93.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 +14 -0
- package/dist/api/cloudPlatform.d.ts +56 -87
- package/dist/api/cloudPlatform.d.ts.map +1 -1
- package/dist/api/cloudPlatform.js +32 -50
- package/dist/api/cloudPlatform.js.map +1 -1
- package/dist/api/codeShift.d.ts +127 -0
- package/dist/api/codeShift.d.ts.map +1 -0
- package/dist/api/codeShift.js +81 -0
- package/dist/api/codeShift.js.map +1 -0
- package/dist/apis.json +8 -0
- package/dist/client/cloud-platform.d.ts +27 -0
- package/dist/client/cloud-platform.d.ts.map +1 -1
- package/dist/client/cloud-platform.js +28 -1
- package/dist/client/cloud-platform.js.map +1 -1
- package/dist/client/code-shift.d.ts +29 -0
- package/dist/client/code-shift.d.ts.map +1 -0
- package/dist/client/code-shift.js +45 -0
- package/dist/client/code-shift.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/api/cloudPlatform.ts +88 -141
- package/src/api/codeShift.ts +277 -0
- package/src/apis.json +8 -0
- package/src/client/cloud-platform.ts +15 -0
- package/src/client/code-shift.ts +33 -0
- package/src/index.ts +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { HttpError } from '@oazapfts/runtime'
|
|
2
2
|
import
|
|
3
3
|
{
|
|
4
|
+
acceptNetworkConnection,
|
|
4
5
|
createCertificate,
|
|
5
6
|
createCidr,
|
|
6
7
|
createDnsRecord,
|
|
@@ -9,6 +10,7 @@ import
|
|
|
9
10
|
createFoundation,
|
|
10
11
|
createInbound,
|
|
11
12
|
createNetwork,
|
|
13
|
+
createNetworkConnection,
|
|
12
14
|
createProject,
|
|
13
15
|
defaults,
|
|
14
16
|
getCertificate,
|
|
@@ -22,6 +24,7 @@ import
|
|
|
22
24
|
listFoundations,
|
|
23
25
|
listInbound,
|
|
24
26
|
listNetwork,
|
|
27
|
+
listNetworkConnection,
|
|
25
28
|
providers,
|
|
26
29
|
} from '../api/cloudPlatform'
|
|
27
30
|
import apis from '../apis.json'
|
|
@@ -123,6 +126,18 @@ class CloudPlatformClient extends ReactQueryNetworkClient {
|
|
|
123
126
|
* Create a inbound
|
|
124
127
|
*/
|
|
125
128
|
createInbound = this.mutation(removeAuthorizationParam(createInbound))
|
|
129
|
+
/**
|
|
130
|
+
* Add a network connection
|
|
131
|
+
*/
|
|
132
|
+
addNetworkConnection = this.mutation(removeAuthorizationParam(createNetworkConnection))
|
|
133
|
+
/**
|
|
134
|
+
* Get a network connection request
|
|
135
|
+
*/
|
|
136
|
+
getNetworkConnections = this.query(removeAuthorizationParam(listNetworkConnection))
|
|
137
|
+
/**
|
|
138
|
+
* Accept a network connection
|
|
139
|
+
*/
|
|
140
|
+
acceptNetworkConnection = this.mutation(removeAuthorizationParam(acceptNetworkConnection))
|
|
126
141
|
}
|
|
127
142
|
|
|
128
143
|
export const cloudPlatformClient = new CloudPlatformClient()
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
|
|
2
|
+
import { HttpError } from '@oazapfts/runtime'
|
|
3
|
+
import {
|
|
4
|
+
defaults,
|
|
5
|
+
HttpValidationError,
|
|
6
|
+
} from '../api/ai'
|
|
7
|
+
import apis from '../apis.json'
|
|
8
|
+
import { StackspotAPIError } from '../error/StackspotAPIError'
|
|
9
|
+
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
|
|
10
|
+
import { removeAuthorizationParam } from '../utils/remove-authorization-param'
|
|
11
|
+
import { createApplicationsBatchServiceV1ApplicationsBatchPost, createApplicationServiceV1ApplicationsPost, listApplicationServiceV1ApplicationsGet, listModulesServiceV1ModulesGet } from '../api/codeShift'
|
|
12
|
+
|
|
13
|
+
class CodeShift extends ReactQueryNetworkClient {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(apis.codeShift.url, defaults)
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
protected buildStackSpotError(error: HttpError): StackspotAPIError {
|
|
19
|
+
return new StackspotAPIError({
|
|
20
|
+
status: error.status,
|
|
21
|
+
headers: error.headers,
|
|
22
|
+
stack: error.stack,
|
|
23
|
+
message: (error.data as HttpValidationError | undefined)?.detail?.map(d => d.msg)?.join('\n'),
|
|
24
|
+
})
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
createApplication = this.mutation(removeAuthorizationParam(createApplicationServiceV1ApplicationsPost))
|
|
28
|
+
createApplicationBatch = this.mutation(removeAuthorizationParam(createApplicationsBatchServiceV1ApplicationsBatchPost))
|
|
29
|
+
applications = this.query(removeAuthorizationParam(listApplicationServiceV1ApplicationsGet))
|
|
30
|
+
modules = this.query(removeAuthorizationParam(listModulesServiceV1ModulesGet))
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export const codeShiftClient = new CodeShift()
|
package/src/index.ts
CHANGED
|
@@ -8,6 +8,7 @@ export { cloudPlatformClient } from './client/cloud-platform'
|
|
|
8
8
|
export { cloudPlatformHorizonClient } from './client/cloud-platform-horizon'
|
|
9
9
|
export { cloudRuntimesClient } from './client/cloud-runtimes'
|
|
10
10
|
export { cloudServicesClient } from './client/cloud-services'
|
|
11
|
+
export { codeShiftClient } from './client/code-shift'
|
|
11
12
|
export { contentClient } from './client/content'
|
|
12
13
|
export { eventBusClient } from './client/event-bus'
|
|
13
14
|
export { insightsClient } from './client/insights'
|
|
@@ -30,4 +31,3 @@ export { queryClient } from './network/react-query-client'
|
|
|
30
31
|
export { OperationResult, OperationVariables, UseQueryObjectOptions } from './network/types'
|
|
31
32
|
export { StreamedJson } from './utils/StreamedJson'
|
|
32
33
|
export { useExtendedList } from './utils/use-extended-list'
|
|
33
|
-
|