@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
package/src/client/event-bus.ts
CHANGED
|
@@ -1,84 +1,84 @@
|
|
|
1
|
-
import { HttpError } from '@oazapfts/runtime'
|
|
2
|
-
import { CompletablePromise } from '@stack-spot/opa'
|
|
3
|
-
import { cloneDeep } from 'lodash'
|
|
4
|
-
import { defaults, EventProcessingResponse, Event as EventType, sendEvents } from '../api/eventBus'
|
|
5
|
-
import { DefaultAPIError } from '../error/DefaultAPIError'
|
|
6
|
-
import { baseDictionary } from '../error/dictionary/base'
|
|
7
|
-
import { StackspotAPIError } from '../error/StackspotAPIError'
|
|
8
|
-
import { NetworkClient } from '../network/NetworkClient'
|
|
9
|
-
import { getApiAddresses } from '../api-addresses'
|
|
10
|
-
|
|
11
|
-
export const EVENTS_STORAGE_IDENTIFIER = 'eventsError'
|
|
12
|
-
const DEFER_MS = 5000
|
|
13
|
-
class EventBusClient extends NetworkClient {
|
|
14
|
-
private queue: EventType[] = []
|
|
15
|
-
private deferred = new CompletablePromise<EventProcessingResponse>()
|
|
16
|
-
private timeout: number | undefined
|
|
17
|
-
private lock = false
|
|
18
|
-
|
|
19
|
-
constructor() {
|
|
20
|
-
super(getApiAddresses().eventBus.url)
|
|
21
|
-
defaults.baseUrl = ''
|
|
22
|
-
defaults.fetch = (...args) => this.fetch(...args)
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
protected buildStackSpotError(error: HttpError): StackspotAPIError {
|
|
26
|
-
return new DefaultAPIError(error.data, error.status, baseDictionary, error.headers)
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
private async consume() {
|
|
30
|
-
if (this.queue.length === 0) return
|
|
31
|
-
if (this.lock) return this.timeout = window.setTimeout(() => this.consume(), DEFER_MS)
|
|
32
|
-
|
|
33
|
-
this.lock = true
|
|
34
|
-
const deferred = this.deferred
|
|
35
|
-
this.deferred = new CompletablePromise()
|
|
36
|
-
const sendingQueue = cloneDeep(this.queue)
|
|
37
|
-
this.queue = []
|
|
38
|
-
|
|
39
|
-
const storageEvents = JSON.parse(localStorage.getItem(EVENTS_STORAGE_IDENTIFIER) || '[]')
|
|
40
|
-
|
|
41
|
-
const bodyData = {
|
|
42
|
-
events: sendingQueue.concat(storageEvents),
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
try {
|
|
46
|
-
const allResults: EventProcessingResponse = await sendEvents({ sendEventsRequest: bodyData })
|
|
47
|
-
|
|
48
|
-
if (allResults.errorCount === 0) {
|
|
49
|
-
localStorage.removeItem(EVENTS_STORAGE_IDENTIFIER)
|
|
50
|
-
}
|
|
51
|
-
deferred.resolve(allResults)
|
|
52
|
-
|
|
53
|
-
} catch (error: any) {
|
|
54
|
-
if (error instanceof HttpError) {
|
|
55
|
-
deferred.reject(new Error(`Error while sending events. Network error ${error.status}.\n}`))
|
|
56
|
-
}
|
|
57
|
-
throw error
|
|
58
|
-
} finally {
|
|
59
|
-
this.lock = false
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
private async add(event: EventType) {
|
|
64
|
-
if (this.timeout) window.clearTimeout(this.timeout)
|
|
65
|
-
const index = this.queue.length
|
|
66
|
-
this.queue.push(event)
|
|
67
|
-
this.timeout = window.setTimeout(() => this.consume(), DEFER_MS)
|
|
68
|
-
const response = await this.deferred.promise
|
|
69
|
-
const result = response.results[index]
|
|
70
|
-
if ('errorCode' in result) {
|
|
71
|
-
throw result
|
|
72
|
-
}
|
|
73
|
-
return result
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* Sends an event
|
|
78
|
-
*/
|
|
79
|
-
sendEvent = async (event: EventType) => {
|
|
80
|
-
await this.add(event)
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export const eventBusClient = new EventBusClient()
|
|
1
|
+
import { HttpError } from '@oazapfts/runtime'
|
|
2
|
+
import { CompletablePromise } from '@stack-spot/opa'
|
|
3
|
+
import { cloneDeep } from 'lodash'
|
|
4
|
+
import { defaults, EventProcessingResponse, Event as EventType, sendEvents } from '../api/eventBus'
|
|
5
|
+
import { DefaultAPIError } from '../error/DefaultAPIError'
|
|
6
|
+
import { baseDictionary } from '../error/dictionary/base'
|
|
7
|
+
import { StackspotAPIError } from '../error/StackspotAPIError'
|
|
8
|
+
import { NetworkClient } from '../network/NetworkClient'
|
|
9
|
+
import { getApiAddresses } from '../api-addresses'
|
|
10
|
+
|
|
11
|
+
export const EVENTS_STORAGE_IDENTIFIER = 'eventsError'
|
|
12
|
+
const DEFER_MS = 5000
|
|
13
|
+
class EventBusClient extends NetworkClient {
|
|
14
|
+
private queue: EventType[] = []
|
|
15
|
+
private deferred = new CompletablePromise<EventProcessingResponse>()
|
|
16
|
+
private timeout: number | undefined
|
|
17
|
+
private lock = false
|
|
18
|
+
|
|
19
|
+
constructor() {
|
|
20
|
+
super(getApiAddresses().eventBus.url)
|
|
21
|
+
defaults.baseUrl = ''
|
|
22
|
+
defaults.fetch = (...args) => this.fetch(...args)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
protected buildStackSpotError(error: HttpError): StackspotAPIError {
|
|
26
|
+
return new DefaultAPIError(error.data, error.status, baseDictionary, error.headers)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
private async consume() {
|
|
30
|
+
if (this.queue.length === 0) return
|
|
31
|
+
if (this.lock) return this.timeout = window.setTimeout(() => this.consume(), DEFER_MS)
|
|
32
|
+
|
|
33
|
+
this.lock = true
|
|
34
|
+
const deferred = this.deferred
|
|
35
|
+
this.deferred = new CompletablePromise()
|
|
36
|
+
const sendingQueue = cloneDeep(this.queue)
|
|
37
|
+
this.queue = []
|
|
38
|
+
|
|
39
|
+
const storageEvents = JSON.parse(localStorage.getItem(EVENTS_STORAGE_IDENTIFIER) || '[]')
|
|
40
|
+
|
|
41
|
+
const bodyData = {
|
|
42
|
+
events: sendingQueue.concat(storageEvents),
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
try {
|
|
46
|
+
const allResults: EventProcessingResponse = await sendEvents({ sendEventsRequest: bodyData })
|
|
47
|
+
|
|
48
|
+
if (allResults.errorCount === 0) {
|
|
49
|
+
localStorage.removeItem(EVENTS_STORAGE_IDENTIFIER)
|
|
50
|
+
}
|
|
51
|
+
deferred.resolve(allResults)
|
|
52
|
+
|
|
53
|
+
} catch (error: any) {
|
|
54
|
+
if (error instanceof HttpError) {
|
|
55
|
+
deferred.reject(new Error(`Error while sending events. Network error ${error.status}.\n}`))
|
|
56
|
+
}
|
|
57
|
+
throw error
|
|
58
|
+
} finally {
|
|
59
|
+
this.lock = false
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
private async add(event: EventType) {
|
|
64
|
+
if (this.timeout) window.clearTimeout(this.timeout)
|
|
65
|
+
const index = this.queue.length
|
|
66
|
+
this.queue.push(event)
|
|
67
|
+
this.timeout = window.setTimeout(() => this.consume(), DEFER_MS)
|
|
68
|
+
const response = await this.deferred.promise
|
|
69
|
+
const result = response.results[index]
|
|
70
|
+
if ('errorCode' in result) {
|
|
71
|
+
throw result
|
|
72
|
+
}
|
|
73
|
+
return result
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Sends an event
|
|
78
|
+
*/
|
|
79
|
+
sendEvent = async (event: EventType) => {
|
|
80
|
+
await this.add(event)
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export const eventBusClient = new EventBusClient()
|
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
|
|
2
|
-
import { HttpError } from '@oazapfts/runtime'
|
|
3
|
-
import { getApiAddresses } from '../api-addresses'
|
|
4
|
-
import { addSelfHostedModelV1LlmModelsPost, agentChatV1AgentAgentIdChatPost, defaults, deleteModelResourcesV1LlmResourcesResourceIdDelete, deleteV1LlmModelsModelIdDelete, getModelV1LlmModelsModelIdGet, listLlmProvidersV1LlmProvidersGet, listModelsV1LlmModelsGet, saveOrUpdateModelResourcesV1LlmModelsModelIdResourcesPut, toggleModelStatusV1LlmModelsModelIdPatch, updateV1LlmModelsModelIdPut } from '../api/genAiInference'
|
|
5
|
-
import { DefaultAPIError } from '../error/DefaultAPIError'
|
|
6
|
-
import { inferenceDictionary } from '../error/dictionary/ai-inference'
|
|
7
|
-
import { StackspotAPIError } from '../error/StackspotAPIError'
|
|
8
|
-
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
|
|
9
|
-
import { removeAuthorizationParam } from '../utils/remove-authorization-param'
|
|
10
|
-
|
|
11
|
-
class GenAiInference extends ReactQueryNetworkClient {
|
|
12
|
-
constructor() {
|
|
13
|
-
super(getApiAddresses().genAiInference.url, defaults)
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
protected buildStackSpotError(error: HttpError): StackspotAPIError {
|
|
17
|
-
return new DefaultAPIError(error.data, error.status, inferenceDictionary, error.headers)
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* List all models.
|
|
22
|
-
*/
|
|
23
|
-
listModels = this.query(removeAuthorizationParam(listModelsV1LlmModelsGet))
|
|
24
|
-
/**
|
|
25
|
-
* List llm providers.
|
|
26
|
-
*/
|
|
27
|
-
listProviders = this.query(removeAuthorizationParam(listLlmProvidersV1LlmProvidersGet))
|
|
28
|
-
/**
|
|
29
|
-
* Creates LLM self hosted model
|
|
30
|
-
*/
|
|
31
|
-
createModel = this.mutation(removeAuthorizationParam(addSelfHostedModelV1LlmModelsPost))
|
|
32
|
-
/**
|
|
33
|
-
* Deletes a LLM self hosted model
|
|
34
|
-
*/
|
|
35
|
-
deleteModel = this.mutation(removeAuthorizationParam(deleteV1LlmModelsModelIdDelete))
|
|
36
|
-
/**
|
|
37
|
-
* Gets model by ID.
|
|
38
|
-
*/
|
|
39
|
-
getModel = this.query(removeAuthorizationParam(getModelV1LlmModelsModelIdGet))
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Updates model by ID.
|
|
43
|
-
*/
|
|
44
|
-
updateModel = this.mutation(removeAuthorizationParam(updateV1LlmModelsModelIdPut))
|
|
45
|
-
/**
|
|
46
|
-
* Toggle Model Status
|
|
47
|
-
*/
|
|
48
|
-
toggleModelActive = this.mutation(removeAuthorizationParam(toggleModelStatusV1LlmModelsModelIdPatch))
|
|
49
|
-
/**
|
|
50
|
-
* Updates resources for a specific model ID.
|
|
51
|
-
*/
|
|
52
|
-
updateModelResource = this.mutation(removeAuthorizationParam(saveOrUpdateModelResourcesV1LlmModelsModelIdResourcesPut))
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Deletes a specific model resource by resource ID.
|
|
56
|
-
*/
|
|
57
|
-
deleteModelResource = this.mutation(removeAuthorizationParam(deleteModelResourcesV1LlmResourcesResourceIdDelete))
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Interaction with a specific AI agent
|
|
61
|
-
*/
|
|
62
|
-
sendAgentMessage = this.mutation(removeAuthorizationParam(agentChatV1AgentAgentIdChatPost))
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export const genAiInferenceClient = new GenAiInference()
|
|
1
|
+
|
|
2
|
+
import { HttpError } from '@oazapfts/runtime'
|
|
3
|
+
import { getApiAddresses } from '../api-addresses'
|
|
4
|
+
import { addSelfHostedModelV1LlmModelsPost, agentChatV1AgentAgentIdChatPost, defaults, deleteModelResourcesV1LlmResourcesResourceIdDelete, deleteV1LlmModelsModelIdDelete, getModelV1LlmModelsModelIdGet, listLlmProvidersV1LlmProvidersGet, listModelsV1LlmModelsGet, saveOrUpdateModelResourcesV1LlmModelsModelIdResourcesPut, toggleModelStatusV1LlmModelsModelIdPatch, updateV1LlmModelsModelIdPut } from '../api/genAiInference'
|
|
5
|
+
import { DefaultAPIError } from '../error/DefaultAPIError'
|
|
6
|
+
import { inferenceDictionary } from '../error/dictionary/ai-inference'
|
|
7
|
+
import { StackspotAPIError } from '../error/StackspotAPIError'
|
|
8
|
+
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
|
|
9
|
+
import { removeAuthorizationParam } from '../utils/remove-authorization-param'
|
|
10
|
+
|
|
11
|
+
class GenAiInference extends ReactQueryNetworkClient {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(getApiAddresses().genAiInference.url, defaults)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
protected buildStackSpotError(error: HttpError): StackspotAPIError {
|
|
17
|
+
return new DefaultAPIError(error.data, error.status, inferenceDictionary, error.headers)
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* List all models.
|
|
22
|
+
*/
|
|
23
|
+
listModels = this.query(removeAuthorizationParam(listModelsV1LlmModelsGet))
|
|
24
|
+
/**
|
|
25
|
+
* List llm providers.
|
|
26
|
+
*/
|
|
27
|
+
listProviders = this.query(removeAuthorizationParam(listLlmProvidersV1LlmProvidersGet))
|
|
28
|
+
/**
|
|
29
|
+
* Creates LLM self hosted model
|
|
30
|
+
*/
|
|
31
|
+
createModel = this.mutation(removeAuthorizationParam(addSelfHostedModelV1LlmModelsPost))
|
|
32
|
+
/**
|
|
33
|
+
* Deletes a LLM self hosted model
|
|
34
|
+
*/
|
|
35
|
+
deleteModel = this.mutation(removeAuthorizationParam(deleteV1LlmModelsModelIdDelete))
|
|
36
|
+
/**
|
|
37
|
+
* Gets model by ID.
|
|
38
|
+
*/
|
|
39
|
+
getModel = this.query(removeAuthorizationParam(getModelV1LlmModelsModelIdGet))
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Updates model by ID.
|
|
43
|
+
*/
|
|
44
|
+
updateModel = this.mutation(removeAuthorizationParam(updateV1LlmModelsModelIdPut))
|
|
45
|
+
/**
|
|
46
|
+
* Toggle Model Status
|
|
47
|
+
*/
|
|
48
|
+
toggleModelActive = this.mutation(removeAuthorizationParam(toggleModelStatusV1LlmModelsModelIdPatch))
|
|
49
|
+
/**
|
|
50
|
+
* Updates resources for a specific model ID.
|
|
51
|
+
*/
|
|
52
|
+
updateModelResource = this.mutation(removeAuthorizationParam(saveOrUpdateModelResourcesV1LlmModelsModelIdResourcesPut))
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Deletes a specific model resource by resource ID.
|
|
56
|
+
*/
|
|
57
|
+
deleteModelResource = this.mutation(removeAuthorizationParam(deleteModelResourcesV1LlmResourcesResourceIdDelete))
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Interaction with a specific AI agent
|
|
61
|
+
*/
|
|
62
|
+
sendAgentMessage = this.mutation(removeAuthorizationParam(agentChatV1AgentAgentIdChatPost))
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export const genAiInferenceClient = new GenAiInference()
|
package/src/client/insights.ts
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { HttpError } from '@oazapfts/runtime'
|
|
2
|
-
import { defaults, downloadAccountData, getDashboardAccount } from '../api/insights'
|
|
3
|
-
import { DefaultAPIError } from '../error/DefaultAPIError'
|
|
4
|
-
import { baseDictionary } from '../error/dictionary/base'
|
|
5
|
-
import { StackspotAPIError } from '../error/StackspotAPIError'
|
|
6
|
-
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
|
|
7
|
-
import { getApiAddresses } from '../api-addresses'
|
|
8
|
-
|
|
9
|
-
class InsightsClient extends ReactQueryNetworkClient {
|
|
10
|
-
|
|
11
|
-
constructor() {
|
|
12
|
-
super(getApiAddresses().insights.url, defaults)
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
protected buildStackSpotError(error: HttpError): StackspotAPIError {
|
|
16
|
-
return new DefaultAPIError(error.data, error.status, baseDictionary, error.headers)
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Download account Data
|
|
20
|
-
*/
|
|
21
|
-
downloadAccountData = this.query(downloadAccountData)
|
|
22
|
-
/**
|
|
23
|
-
* Get data for analysis in account
|
|
24
|
-
*/
|
|
25
|
-
getDashboardAccount = this.query(getDashboardAccount)
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export const insightsClient = new InsightsClient()
|
|
1
|
+
import { HttpError } from '@oazapfts/runtime'
|
|
2
|
+
import { defaults, downloadAccountData, getDashboardAccount } from '../api/insights'
|
|
3
|
+
import { DefaultAPIError } from '../error/DefaultAPIError'
|
|
4
|
+
import { baseDictionary } from '../error/dictionary/base'
|
|
5
|
+
import { StackspotAPIError } from '../error/StackspotAPIError'
|
|
6
|
+
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
|
|
7
|
+
import { getApiAddresses } from '../api-addresses'
|
|
8
|
+
|
|
9
|
+
class InsightsClient extends ReactQueryNetworkClient {
|
|
10
|
+
|
|
11
|
+
constructor() {
|
|
12
|
+
super(getApiAddresses().insights.url, defaults)
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
protected buildStackSpotError(error: HttpError): StackspotAPIError {
|
|
16
|
+
return new DefaultAPIError(error.data, error.status, baseDictionary, error.headers)
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Download account Data
|
|
20
|
+
*/
|
|
21
|
+
downloadAccountData = this.query(downloadAccountData)
|
|
22
|
+
/**
|
|
23
|
+
* Get data for analysis in account
|
|
24
|
+
*/
|
|
25
|
+
getDashboardAccount = this.query(getDashboardAccount)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export const insightsClient = new InsightsClient()
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { HttpError } from '@oazapfts/runtime'
|
|
2
|
-
import { commit, committedNotifications, defaults, findAll } from '../api/notification'
|
|
3
|
-
import { DefaultAPIError } from '../error/DefaultAPIError'
|
|
4
|
-
import { baseDictionary } from '../error/dictionary/base'
|
|
5
|
-
import { StackspotAPIError } from '../error/StackspotAPIError'
|
|
6
|
-
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
|
|
7
|
-
import { getApiAddresses } from '../api-addresses'
|
|
8
|
-
|
|
9
|
-
class NotificationClient extends ReactQueryNetworkClient {
|
|
10
|
-
|
|
11
|
-
constructor() {
|
|
12
|
-
super(getApiAddresses().notification.url, defaults)
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
protected buildStackSpotError(error: HttpError): StackspotAPIError {
|
|
16
|
-
return new DefaultAPIError(error.data, error.status, baseDictionary, error.headers)
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Gets all notification by tenant
|
|
20
|
-
*/
|
|
21
|
-
notifications = this.query(findAll)
|
|
22
|
-
/**
|
|
23
|
-
* Gets all committed notifications by tenant
|
|
24
|
-
*/
|
|
25
|
-
committedNotifications = this.query(committedNotifications)
|
|
26
|
-
/**
|
|
27
|
-
* Mark a notification as committed (mark as read)
|
|
28
|
-
*/
|
|
29
|
-
commit = this.mutation(commit)
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export const notificationClient = new NotificationClient()
|
|
1
|
+
import { HttpError } from '@oazapfts/runtime'
|
|
2
|
+
import { commit, committedNotifications, defaults, findAll } from '../api/notification'
|
|
3
|
+
import { DefaultAPIError } from '../error/DefaultAPIError'
|
|
4
|
+
import { baseDictionary } from '../error/dictionary/base'
|
|
5
|
+
import { StackspotAPIError } from '../error/StackspotAPIError'
|
|
6
|
+
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
|
|
7
|
+
import { getApiAddresses } from '../api-addresses'
|
|
8
|
+
|
|
9
|
+
class NotificationClient extends ReactQueryNetworkClient {
|
|
10
|
+
|
|
11
|
+
constructor() {
|
|
12
|
+
super(getApiAddresses().notification.url, defaults)
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
protected buildStackSpotError(error: HttpError): StackspotAPIError {
|
|
16
|
+
return new DefaultAPIError(error.data, error.status, baseDictionary, error.headers)
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Gets all notification by tenant
|
|
20
|
+
*/
|
|
21
|
+
notifications = this.query(findAll)
|
|
22
|
+
/**
|
|
23
|
+
* Gets all committed notifications by tenant
|
|
24
|
+
*/
|
|
25
|
+
committedNotifications = this.query(committedNotifications)
|
|
26
|
+
/**
|
|
27
|
+
* Mark a notification as committed (mark as read)
|
|
28
|
+
*/
|
|
29
|
+
commit = this.mutation(commit)
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export const notificationClient = new NotificationClient()
|
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
import { HttpError } from '@oazapfts/runtime'
|
|
2
|
-
import { defaults, getAppInfo, getAppsInRealm, getPluginDeployments, getRunByUlid, getRunsOnAllEnvs, getRunsOnEnv, getRunsRunning, getRunTaskPlugins, getRunTasks, runRollbackApp1, runRollbackInfra1 } from '../api/apiRuntime'
|
|
3
|
-
import { DefaultAPIError } from '../error/DefaultAPIError'
|
|
4
|
-
import { rteDictionary } from '../error/dictionary/rte'
|
|
5
|
-
import { StackspotAPIError } from '../error/StackspotAPIError'
|
|
6
|
-
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
|
|
7
|
-
import { getApiAddresses } from '../api-addresses'
|
|
8
|
-
|
|
9
|
-
class RuntimeManagerClient extends ReactQueryNetworkClient {
|
|
10
|
-
constructor() {
|
|
11
|
-
super(getApiAddresses().apiRuntime.url, defaults)
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
protected buildStackSpotError(error: HttpError): StackspotAPIError {
|
|
15
|
-
return new DefaultAPIError(error.data, error.status, rteDictionary, error.headers)
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Runs an app rollback
|
|
20
|
-
*/
|
|
21
|
-
appRollback = this.mutation(runRollbackApp1)
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Runs an infra rollback
|
|
25
|
-
*/
|
|
26
|
-
infraRollback = this.mutation(runRollbackInfra1)
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Internal use only (Only Authorized tokens) - Admin endpoint for getting all runnings run
|
|
30
|
-
*/
|
|
31
|
-
adminGetRunsRunning = this.query(getRunsRunning)
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Internal use only (Only Authorized tokens) - Admin endpoint for getting all runs off an app or infra on an env
|
|
35
|
-
*/
|
|
36
|
-
adminGetRunsOnEnv = this.query(getRunsOnEnv)
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Internal use only (Only Authorized tokens) - Admin endpoint for getting all runs off an app or infra on every environment its deployed
|
|
40
|
-
*/
|
|
41
|
-
adminGetRunsOnAllEnvs = this.query(getRunsOnAllEnvs)
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Internal use only (Only Authorized tokens) - Admin endpoint for getting run data by ulid identifier
|
|
45
|
-
*/
|
|
46
|
-
adminGetRunByUlid = this.query(getRunByUlid)
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Internal use only (Only Authorized tokens) - Admin endpoint for getting run task data of a run
|
|
50
|
-
*/
|
|
51
|
-
adminGetRunTasks = this.query(getRunTasks)
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Internal use only (Only Authorized tokens) - Admin endpoint for getting run task plugin data of a run
|
|
55
|
-
*/
|
|
56
|
-
adminGetRunTaskPlugins = this.query(getRunTaskPlugins)
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Internal use only (Only Authorized tokens) - Admin endpoint for getting plugin deployment data of a run
|
|
60
|
-
*/
|
|
61
|
-
adminGetPluginDeployments = this.query(getPluginDeployments)
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Internal use only (Only Authorized tokens) - Admin endpoint for getting the list of apps in a realm
|
|
66
|
-
*/
|
|
67
|
-
adminGetAppsInRealm = this.query(getAppsInRealm)
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Internal use only (Only Authorized tokens) - Admin endpoint for getting app or infra information by ulid
|
|
72
|
-
*/
|
|
73
|
-
adminGetAppInfo = this.query(getAppInfo)
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export const runtimeManagerClient = new RuntimeManagerClient()
|
|
1
|
+
import { HttpError } from '@oazapfts/runtime'
|
|
2
|
+
import { defaults, getAppInfo, getAppsInRealm, getPluginDeployments, getRunByUlid, getRunsOnAllEnvs, getRunsOnEnv, getRunsRunning, getRunTaskPlugins, getRunTasks, runRollbackApp1, runRollbackInfra1 } from '../api/apiRuntime'
|
|
3
|
+
import { DefaultAPIError } from '../error/DefaultAPIError'
|
|
4
|
+
import { rteDictionary } from '../error/dictionary/rte'
|
|
5
|
+
import { StackspotAPIError } from '../error/StackspotAPIError'
|
|
6
|
+
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
|
|
7
|
+
import { getApiAddresses } from '../api-addresses'
|
|
8
|
+
|
|
9
|
+
class RuntimeManagerClient extends ReactQueryNetworkClient {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(getApiAddresses().apiRuntime.url, defaults)
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
protected buildStackSpotError(error: HttpError): StackspotAPIError {
|
|
15
|
+
return new DefaultAPIError(error.data, error.status, rteDictionary, error.headers)
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Runs an app rollback
|
|
20
|
+
*/
|
|
21
|
+
appRollback = this.mutation(runRollbackApp1)
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Runs an infra rollback
|
|
25
|
+
*/
|
|
26
|
+
infraRollback = this.mutation(runRollbackInfra1)
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Internal use only (Only Authorized tokens) - Admin endpoint for getting all runnings run
|
|
30
|
+
*/
|
|
31
|
+
adminGetRunsRunning = this.query(getRunsRunning)
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Internal use only (Only Authorized tokens) - Admin endpoint for getting all runs off an app or infra on an env
|
|
35
|
+
*/
|
|
36
|
+
adminGetRunsOnEnv = this.query(getRunsOnEnv)
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Internal use only (Only Authorized tokens) - Admin endpoint for getting all runs off an app or infra on every environment its deployed
|
|
40
|
+
*/
|
|
41
|
+
adminGetRunsOnAllEnvs = this.query(getRunsOnAllEnvs)
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Internal use only (Only Authorized tokens) - Admin endpoint for getting run data by ulid identifier
|
|
45
|
+
*/
|
|
46
|
+
adminGetRunByUlid = this.query(getRunByUlid)
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Internal use only (Only Authorized tokens) - Admin endpoint for getting run task data of a run
|
|
50
|
+
*/
|
|
51
|
+
adminGetRunTasks = this.query(getRunTasks)
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Internal use only (Only Authorized tokens) - Admin endpoint for getting run task plugin data of a run
|
|
55
|
+
*/
|
|
56
|
+
adminGetRunTaskPlugins = this.query(getRunTaskPlugins)
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Internal use only (Only Authorized tokens) - Admin endpoint for getting plugin deployment data of a run
|
|
60
|
+
*/
|
|
61
|
+
adminGetPluginDeployments = this.query(getPluginDeployments)
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Internal use only (Only Authorized tokens) - Admin endpoint for getting the list of apps in a realm
|
|
66
|
+
*/
|
|
67
|
+
adminGetAppsInRealm = this.query(getAppsInRealm)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Internal use only (Only Authorized tokens) - Admin endpoint for getting app or infra information by ulid
|
|
72
|
+
*/
|
|
73
|
+
adminGetAppInfo = this.query(getAppInfo)
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export const runtimeManagerClient = new RuntimeManagerClient()
|