@stack-spot/portal-network 0.92.0 → 0.94.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/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/api/workspaceManager.d.ts +11 -6
- package/dist/api/workspaceManager.d.ts.map +1 -1
- package/dist/api/workspaceManager.js +6 -2
- package/dist/api/workspaceManager.js.map +1 -1
- package/dist/apis.json +8 -0
- 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/client/workspace-manager.d.ts +1 -1
- 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/codeShift.ts +277 -0
- package/src/api/workspaceManager.ts +17 -8
- package/src/apis.json +8 -0
- package/src/client/code-shift.ts +33 -0
- package/src/index.ts +1 -1
package/src/apis.json
CHANGED
|
@@ -181,5 +181,13 @@
|
|
|
181
181
|
"prd": "https://cloud-platform-horizon.prd.stackspot.com"
|
|
182
182
|
},
|
|
183
183
|
"docs": "/v3/api-docs"
|
|
184
|
+
},
|
|
185
|
+
"codeShift": {
|
|
186
|
+
"url": {
|
|
187
|
+
"dev": "https://code-shift-code-shift-api.dev.stackspot.com",
|
|
188
|
+
"stg": "https://code-shift-code-shift-api.stg.stackspot.com",
|
|
189
|
+
"prd": "https://code-shift-code-shift-api.stackspot.com"
|
|
190
|
+
},
|
|
191
|
+
"docs": "/docs"
|
|
184
192
|
}
|
|
185
193
|
}
|
|
@@ -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
|
-
|