@stack-spot/portal-network 1.0.0-betaadp.3 → 1.0.0-dev.1768422812092
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 +633 -0
- package/dist/api/account.d.ts +413 -277
- package/dist/api/account.d.ts.map +1 -1
- package/dist/api/account.js +261 -176
- package/dist/api/account.js.map +1 -1
- package/dist/api/accountAssetManager.d.ts +309 -0
- package/dist/api/accountAssetManager.d.ts.map +1 -0
- package/dist/api/accountAssetManager.js +169 -0
- package/dist/api/accountAssetManager.js.map +1 -0
- package/dist/api/agent-tools.d.ts +243 -149
- package/dist/api/agent-tools.d.ts.map +1 -1
- package/dist/api/agent-tools.js +77 -5
- package/dist/api/agent-tools.js.map +1 -1
- package/dist/api/agent.d.ts +55 -55
- package/dist/api/agent.d.ts.map +1 -1
- package/dist/api/ai.d.ts +487 -98
- package/dist/api/ai.d.ts.map +1 -1
- package/dist/api/ai.js +427 -146
- package/dist/api/ai.js.map +1 -1
- package/dist/api/cloudPlatform.d.ts +374 -221
- package/dist/api/cloudPlatform.d.ts.map +1 -1
- package/dist/api/cloudPlatform.js +299 -93
- package/dist/api/cloudPlatform.js.map +1 -1
- package/dist/api/cloudPlatformHorizon.d.ts +178 -9
- package/dist/api/cloudPlatformHorizon.d.ts.map +1 -1
- package/dist/api/cloudPlatformHorizon.js +69 -1
- package/dist/api/cloudPlatformHorizon.js.map +1 -1
- package/dist/api/codeShift.d.ts +1125 -83
- package/dist/api/codeShift.d.ts.map +1 -1
- package/dist/api/codeShift.js +538 -16
- package/dist/api/codeShift.js.map +1 -1
- package/dist/api/dataIntegration.d.ts +291 -1
- package/dist/api/dataIntegration.d.ts.map +1 -1
- package/dist/api/dataIntegration.js +254 -0
- package/dist/api/dataIntegration.js.map +1 -1
- package/dist/api/discover.d.ts +98 -12
- package/dist/api/discover.d.ts.map +1 -1
- package/dist/api/discover.js +78 -2
- package/dist/api/discover.js.map +1 -1
- package/dist/api/edpBfa.d.ts +215 -0
- package/dist/api/edpBfa.d.ts.map +1 -0
- package/dist/api/edpBfa.js +87 -0
- package/dist/api/edpBfa.js.map +1 -0
- package/dist/api/genAiInference.d.ts +22 -2
- package/dist/api/genAiInference.d.ts.map +1 -1
- package/dist/api/genAiInference.js +22 -3
- package/dist/api/genAiInference.js.map +1 -1
- package/dist/api/workflows.d.ts +68 -5
- package/dist/api/workflows.d.ts.map +1 -1
- package/dist/api/workflows.js +16 -0
- package/dist/api/workflows.js.map +1 -1
- package/dist/api/workspaceManager.d.ts +16 -10
- package/dist/api/workspaceManager.d.ts.map +1 -1
- package/dist/api/workspaceManager.js +10 -0
- package/dist/api/workspaceManager.js.map +1 -1
- package/dist/api-addresses.d.ts +20 -18
- package/dist/api-addresses.d.ts.map +1 -1
- package/dist/api-addresses.js +81 -21
- package/dist/api-addresses.js.map +1 -1
- package/dist/apis-itau.json +241 -0
- package/dist/apis.json +17 -1
- package/dist/client/account-asset-manager.d.ts +112 -0
- package/dist/client/account-asset-manager.d.ts.map +1 -0
- package/dist/client/account-asset-manager.js +160 -0
- package/dist/client/account-asset-manager.js.map +1 -0
- package/dist/client/account.d.ts +265 -242
- package/dist/client/account.d.ts.map +1 -1
- package/dist/client/account.js +80 -34
- package/dist/client/account.js.map +1 -1
- package/dist/client/agent-tools.d.ts +166 -119
- package/dist/client/agent-tools.d.ts.map +1 -1
- package/dist/client/agent-tools.js +62 -11
- package/dist/client/agent-tools.js.map +1 -1
- package/dist/client/agent.d.ts +46 -46
- package/dist/client/agent.d.ts.map +1 -1
- package/dist/client/ai.d.ts +266 -79
- package/dist/client/ai.d.ts.map +1 -1
- package/dist/client/ai.js +262 -20
- package/dist/client/ai.js.map +1 -1
- package/dist/client/api-management.d.ts +10 -1
- package/dist/client/api-management.d.ts.map +1 -1
- package/dist/client/api-management.js +11 -2
- package/dist/client/api-management.js.map +1 -1
- package/dist/client/cloud-account.d.ts +13 -13
- package/dist/client/cloud-platform-horizon.d.ts +38 -19
- package/dist/client/cloud-platform-horizon.d.ts.map +1 -1
- package/dist/client/cloud-platform-horizon.js +19 -1
- package/dist/client/cloud-platform-horizon.js.map +1 -1
- package/dist/client/cloud-platform.d.ts +213 -46
- package/dist/client/cloud-platform.d.ts.map +1 -1
- package/dist/client/cloud-platform.js +168 -33
- package/dist/client/cloud-platform.js.map +1 -1
- package/dist/client/cloud-runtimes.d.ts +4 -4
- package/dist/client/cloud-services.d.ts +17 -17
- package/dist/client/cloud-services.d.ts.map +1 -1
- package/dist/client/code-shift.d.ts +535 -162
- package/dist/client/code-shift.d.ts.map +1 -1
- package/dist/client/code-shift.js +296 -7
- package/dist/client/code-shift.js.map +1 -1
- package/dist/client/content.d.ts +127 -132
- package/dist/client/content.d.ts.map +1 -1
- package/dist/client/data-integration.d.ts +92 -53
- package/dist/client/data-integration.d.ts.map +1 -1
- package/dist/client/data-integration.js +38 -2
- package/dist/client/data-integration.js.map +1 -1
- package/dist/client/discover.d.ts +31 -10
- package/dist/client/discover.d.ts.map +1 -1
- package/dist/client/discover.js +239 -3
- package/dist/client/discover.js.map +1 -1
- package/dist/client/edp-bfa.d.ts +16 -0
- package/dist/client/edp-bfa.d.ts.map +1 -0
- package/dist/client/edp-bfa.js +24 -0
- package/dist/client/edp-bfa.js.map +1 -0
- package/dist/client/event-bus.d.ts.map +1 -1
- package/dist/client/gen-ai-inference.d.ts +20 -20
- package/dist/client/insights.d.ts +7 -7
- package/dist/client/notification.d.ts +17 -10
- package/dist/client/notification.d.ts.map +1 -1
- package/dist/client/notification.js +10 -1
- package/dist/client/notification.js.map +1 -1
- package/dist/client/runtime-manager.d.ts +8 -8
- package/dist/client/secrets.d.ts.map +1 -1
- package/dist/client/secrets.js +1 -1
- package/dist/client/secrets.js.map +1 -1
- package/dist/client/types.d.ts +50 -7
- package/dist/client/types.d.ts.map +1 -1
- package/dist/client/workflow.d.ts +10 -10
- package/dist/client/workspace-ai.d.ts +53 -53
- package/dist/client/workspace-ai.d.ts.map +1 -1
- package/dist/client/workspace-ai.js +3 -7
- package/dist/client/workspace-ai.js.map +1 -1
- package/dist/client/workspace-manager.d.ts +115 -76
- package/dist/client/workspace-manager.d.ts.map +1 -1
- package/dist/client/workspace-manager.js +47 -2
- package/dist/client/workspace-manager.js.map +1 -1
- package/dist/client/workspace-search.d.ts +2 -2
- package/dist/client/workspace.d.ts +58 -105
- package/dist/client/workspace.d.ts.map +1 -1
- package/dist/error/DefaultAPIError.d.ts.map +1 -1
- package/dist/error/DefaultAPIError.js.map +1 -1
- package/dist/error/StackspotAPIError.d.ts +3 -4
- package/dist/error/StackspotAPIError.d.ts.map +1 -1
- package/dist/error/StackspotAPIError.js +3 -3
- package/dist/error/StackspotAPIError.js.map +1 -1
- package/dist/error/dictionary/accountAssetManager.d.ts +11 -0
- package/dist/error/dictionary/accountAssetManager.d.ts.map +1 -0
- package/dist/error/dictionary/accountAssetManager.js +11 -0
- package/dist/error/dictionary/accountAssetManager.js.map +1 -0
- package/dist/error/dictionary/cloud-platform.d.ts +76 -8
- package/dist/error/dictionary/cloud-platform.d.ts.map +1 -1
- package/dist/error/dictionary/cloud-platform.js +80 -12
- package/dist/error/dictionary/cloud-platform.js.map +1 -1
- package/dist/error/dictionary/workspace-ai.d.ts +9 -0
- package/dist/error/dictionary/workspace-ai.d.ts.map +1 -0
- package/dist/error/dictionary/workspace-ai.js +9 -0
- package/dist/error/dictionary/workspace-ai.js.map +1 -0
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/network/NetworkClient.d.ts +4 -2
- package/dist/network/NetworkClient.d.ts.map +1 -1
- package/dist/network/NetworkClient.js +16 -4
- package/dist/network/NetworkClient.js.map +1 -1
- package/dist/network/types.d.ts +2 -0
- package/dist/network/types.d.ts.map +1 -1
- package/dist/utils/StreamedJson.d.ts +3 -1
- package/dist/utils/StreamedJson.d.ts.map +1 -1
- package/dist/utils/StreamedJson.js +23 -3
- package/dist/utils/StreamedJson.js.map +1 -1
- package/package.dev.json +3 -0
- package/package.json +10 -9
- package/package.stg.json +3 -0
- package/readme.md +40 -1
- package/src/api/account.ts +701 -540
- package/src/api/accountAssetManager.ts +771 -0
- package/src/api/agent-tools.ts +332 -151
- package/src/api/ai.ts +891 -170
- package/src/api/cloudPlatform.ts +667 -298
- package/src/api/cloudPlatformHorizon.ts +412 -9
- package/src/api/codeShift.ts +2088 -97
- package/src/api/dataIntegration.ts +635 -1
- package/src/api/discover.ts +180 -14
- package/src/api/edpBfa.ts +472 -0
- package/src/api/genAiInference.ts +47 -4
- package/src/api/workflows.ts +100 -5
- package/src/api/workspaceManager.ts +25 -10
- package/src/api-addresses.ts +113 -38
- package/src/apis-itau.json +241 -0
- package/src/apis.json +17 -1
- package/src/client/account-asset-manager.ts +100 -0
- package/src/client/account.ts +71 -40
- package/src/client/agent-tools.ts +57 -17
- package/src/client/ai.ts +232 -20
- package/src/client/api-management.ts +7 -2
- package/src/client/cloud-platform-horizon.ts +12 -4
- package/src/client/cloud-platform.ts +101 -27
- package/src/client/code-shift.ts +196 -8
- package/src/client/data-integration.ts +28 -1
- package/src/client/discover.ts +238 -5
- package/src/client/edp-bfa.ts +24 -0
- package/src/client/notification.ts +6 -1
- package/src/client/secrets.ts +1 -1
- package/src/client/types.ts +55 -9
- package/src/client/workspace-ai.ts +19 -23
- package/src/client/workspace-manager.ts +31 -2
- package/src/error/DefaultAPIError.ts +5 -5
- package/src/error/StackspotAPIError.ts +4 -4
- package/src/error/dictionary/accountAssetManager.ts +12 -0
- package/src/error/dictionary/cloud-platform.ts +80 -12
- package/src/error/dictionary/workspace-ai.ts +10 -0
- package/src/index.ts +6 -3
- package/src/network/NetworkClient.ts +18 -6
- package/src/network/types.ts +3 -0
- package/src/utils/StreamedJson.tsx +19 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HttpError } from '@oazapfts/runtime'
|
|
2
|
-
import { commit, committedNotifications, defaults, findAll } from '../api/notification'
|
|
2
|
+
import { commit, committedNotifications, defaults, findAll, uncommit } from '../api/notification'
|
|
3
3
|
import { DefaultAPIError } from '../error/DefaultAPIError'
|
|
4
4
|
import { baseDictionary } from '../error/dictionary/base'
|
|
5
5
|
import { StackspotAPIError } from '../error/StackspotAPIError'
|
|
@@ -27,6 +27,11 @@ class NotificationClient extends ReactQueryNetworkClient {
|
|
|
27
27
|
* Mark a notification as committed (mark as read)
|
|
28
28
|
*/
|
|
29
29
|
commit = this.mutation(commit)
|
|
30
|
+
/**
|
|
31
|
+
* Mark a notification as uncommitted (mark as unread)
|
|
32
|
+
*/
|
|
33
|
+
uncommit = this.mutation(uncommit)
|
|
34
|
+
|
|
30
35
|
}
|
|
31
36
|
|
|
32
37
|
export const notificationClient = new NotificationClient()
|
package/src/client/secrets.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { HttpError } from '@oazapfts/runtime'
|
|
2
2
|
|
|
3
|
+
import { getApiAddresses } from '../api-addresses'
|
|
3
4
|
import { createKey, defaults, deleteKey, deleteSecretValue, editKey, encrypt, getAll1, getAvailability, updateSecretValue } from '../api/secrets'
|
|
4
5
|
import { DefaultAPIError } from '../error/DefaultAPIError'
|
|
5
6
|
import { secretsDictionary } from '../error/dictionary/secrets'
|
|
6
7
|
import { StackspotAPIError } from '../error/StackspotAPIError'
|
|
7
8
|
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
|
|
8
|
-
import { getApiAddresses } from '../api-addresses'
|
|
9
9
|
|
|
10
10
|
class SecretClient extends ReactQueryNetworkClient {
|
|
11
11
|
constructor() {
|
package/src/client/types.ts
CHANGED
|
@@ -185,6 +185,7 @@ export interface FixedChatRequest extends ChatRequest {
|
|
|
185
185
|
stackspot_ai_version?: string,
|
|
186
186
|
os?: string,
|
|
187
187
|
upload_ids?: string[],
|
|
188
|
+
selected_model_id?: string,
|
|
188
189
|
},
|
|
189
190
|
}
|
|
190
191
|
|
|
@@ -245,6 +246,8 @@ export interface ChatAgentTool {
|
|
|
245
246
|
image?: string,
|
|
246
247
|
input?: string,
|
|
247
248
|
output?: string,
|
|
249
|
+
goal?: string,
|
|
250
|
+
status?: 'running' | 'success' | 'error',
|
|
248
251
|
}
|
|
249
252
|
|
|
250
253
|
export interface ChatStepAttempt {
|
|
@@ -256,8 +259,8 @@ export interface ChatStepAttempt {
|
|
|
256
259
|
|
|
257
260
|
export interface BaseChatStep {
|
|
258
261
|
id: string,
|
|
259
|
-
type: 'planning' | 'step' | 'answer',
|
|
260
|
-
status: 'pending' | 'running' | 'success' | 'error',
|
|
262
|
+
type: 'planning' | 'step' | 'answer' | 'tool',
|
|
263
|
+
status: 'pending' | 'running' | 'success' | 'error' | 'awaiting_approval',
|
|
261
264
|
/**
|
|
262
265
|
* Duration in seconds.
|
|
263
266
|
*/
|
|
@@ -266,9 +269,24 @@ export interface BaseChatStep {
|
|
|
266
269
|
|
|
267
270
|
export interface PlanningChatStep extends BaseChatStep {
|
|
268
271
|
type: 'planning',
|
|
269
|
-
status: 'success',
|
|
272
|
+
status: 'success' | 'awaiting_approval',
|
|
270
273
|
steps: string[],
|
|
271
274
|
goal: string,
|
|
275
|
+
user_question?: string,
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
export interface ToolChatStep extends BaseChatStep {
|
|
279
|
+
type: 'tool',
|
|
280
|
+
status: 'running' | 'success' | 'error' | 'awaiting_approval',
|
|
281
|
+
/**
|
|
282
|
+
* Each step might attempt to run for multiple times, with different inputs and outputs. If first attempt succeeds, this array will have
|
|
283
|
+
* only one element.
|
|
284
|
+
*
|
|
285
|
+
* This array never has less than one element, despite the step's status.
|
|
286
|
+
*/
|
|
287
|
+
attempts: ChatStepAttempt[],
|
|
288
|
+
input?: Record<string, any>,
|
|
289
|
+
user_question?: string,
|
|
272
290
|
}
|
|
273
291
|
|
|
274
292
|
export interface StepChatStep extends BaseChatStep {
|
|
@@ -288,17 +306,19 @@ export interface AnswerChatStep extends BaseChatStep {
|
|
|
288
306
|
type: 'answer',
|
|
289
307
|
}
|
|
290
308
|
|
|
291
|
-
export type ChatStep = PlanningChatStep | StepChatStep | AnswerChatStep
|
|
309
|
+
export type ChatStep = PlanningChatStep | StepChatStep | AnswerChatStep | ToolChatStep
|
|
292
310
|
|
|
293
311
|
export interface BaseAgentInfo {
|
|
294
|
-
type: 'chat' | 'planning' | 'step' | 'tool' | 'final_answer',
|
|
295
|
-
action: 'start' | 'end',
|
|
312
|
+
type: 'chat' | 'planning' | 'step' | 'tool' | 'final_answer' | 'tool_calls',
|
|
313
|
+
action: 'start' | 'end' | 'awaiting_approval',
|
|
296
314
|
duration?: number,
|
|
315
|
+
id?: string,
|
|
297
316
|
}
|
|
298
317
|
|
|
299
318
|
export interface AgentTool {
|
|
300
319
|
tool_id: string,
|
|
301
320
|
tool_execution_id: string,
|
|
321
|
+
goal: string,
|
|
302
322
|
}
|
|
303
323
|
|
|
304
324
|
export interface PlanningAgentInfo extends BaseAgentInfo {
|
|
@@ -311,6 +331,7 @@ export interface PlanningAgentInfo extends BaseAgentInfo {
|
|
|
311
331
|
goal: string,
|
|
312
332
|
tools?: AgentTool[],
|
|
313
333
|
}[],
|
|
334
|
+
user_question?: string,
|
|
314
335
|
},
|
|
315
336
|
}
|
|
316
337
|
|
|
@@ -326,6 +347,8 @@ export interface ToolAgentInfo extends BaseAgentInfo {
|
|
|
326
347
|
input?: any,
|
|
327
348
|
attempt: number,
|
|
328
349
|
output?: string,
|
|
350
|
+
user_question?: string,
|
|
351
|
+
tool_id: string,
|
|
329
352
|
},
|
|
330
353
|
}
|
|
331
354
|
|
|
@@ -333,16 +356,39 @@ export interface GenericAgentInfo extends BaseAgentInfo {
|
|
|
333
356
|
type: 'chat' | 'final_answer',
|
|
334
357
|
}
|
|
335
358
|
|
|
336
|
-
export
|
|
359
|
+
export interface ToolCallsAgentInfo extends BaseAgentInfo {
|
|
360
|
+
type: 'tool_calls',
|
|
361
|
+
data?: {
|
|
362
|
+
tools?: string[],
|
|
363
|
+
duration?: number,
|
|
364
|
+
},
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
export type AgentInfo = GenericAgentInfo | PlanningAgentInfo | StepAgentInfo | ToolAgentInfo | ToolCallsAgentInfo
|
|
337
368
|
|
|
338
369
|
export interface FixedChatResponse extends ChatResponse3 {
|
|
339
370
|
agent_info: AgentInfo,
|
|
340
371
|
tools?: string[],
|
|
341
372
|
}
|
|
373
|
+
export interface OpportunitiesPMAgent {
|
|
374
|
+
title: string,
|
|
375
|
+
description: string,
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
export type HypothesisPMAgent = OpportunitiesPMAgent
|
|
342
379
|
|
|
380
|
+
export type PrfaqPMAgent = {
|
|
381
|
+
title: string,
|
|
382
|
+
content: string,
|
|
383
|
+
}
|
|
343
384
|
export interface ChatResponseWithSteps extends FixedChatResponse {
|
|
344
385
|
steps: ChatStep[],
|
|
345
386
|
}
|
|
387
|
+
export interface ChatResponseWithPMResources {
|
|
388
|
+
opportunities?: OpportunitiesPMAgent[],
|
|
389
|
+
hypothesis?: HypothesisPMAgent[],
|
|
390
|
+
prfaq?: PrfaqPMAgent,
|
|
391
|
+
}
|
|
346
392
|
|
|
347
393
|
export type OazapftsFunction<Variables = any, Result = any> = (variables: Variables, opts?: RequestOpts) => Promise<Result>
|
|
348
394
|
|
|
@@ -358,12 +404,12 @@ export type FixVariables<
|
|
|
358
404
|
|
|
359
405
|
export type ReplaceResult<T extends (...args: any[]) => Promise<any>, Fix> = (...args: Parameters<T>) => Promise<Fix>
|
|
360
406
|
|
|
361
|
-
export interface AgentResponseWithBuiltIn extends Omit<ListAgentResponse, 'conversation_starter' | 'avatar'>
|
|
407
|
+
export interface AgentResponseWithBuiltIn extends Omit<ListAgentResponse, 'conversation_starter' | 'avatar'> {
|
|
362
408
|
builtIn?: boolean,
|
|
363
409
|
spaceName?: string,
|
|
364
410
|
conversation_starter?: string[] | null,
|
|
365
411
|
avatar?: string | null | undefined,
|
|
366
|
-
}
|
|
412
|
+
}
|
|
367
413
|
|
|
368
414
|
export type AgentVisibilityLevel = AgentVisibilityLevelEnum | VisibilityLevelEnum
|
|
369
415
|
|
|
@@ -13,7 +13,6 @@ import {
|
|
|
13
13
|
deleteFavoriteV1WorkspacesWorkspaceIdFavoriteDelete,
|
|
14
14
|
deleteWorkspaceV1WorkspacesWorkspaceIdDelete,
|
|
15
15
|
getWorkspaceByIdV1WorkspacesIdGet,
|
|
16
|
-
HttpValidationError,
|
|
17
16
|
listAllByContentTypeV1WorkspacesWorkspaceIdContentTypeGet,
|
|
18
17
|
listAllContentsV1WorkspacesContentsContentTypeGet,
|
|
19
18
|
listGroupsAndMembersPermissionInWorkspaceV1WorkspacesWorkspaceIdPermissionsGet,
|
|
@@ -28,8 +27,10 @@ import {
|
|
|
28
27
|
import { StackspotAPIError } from '../error/StackspotAPIError'
|
|
29
28
|
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
|
|
30
29
|
import { removeAuthorizationParam } from '../utils/remove-authorization-param'
|
|
31
|
-
import { FixedAddResourceToWorkspaceAi, FixedWorkspaceAiPermissions, ReplaceResult } from './types'
|
|
32
30
|
import { getApiAddresses } from '../api-addresses'
|
|
31
|
+
import { DefaultAPIError } from '../error/DefaultAPIError'
|
|
32
|
+
import { wksAiDictionary } from '../error/dictionary/workspace-ai'
|
|
33
|
+
import { FixedAddResourceToWorkspaceAi, FixedWorkspaceAiPermissions, ReplaceResult } from './types'
|
|
33
34
|
|
|
34
35
|
class WorkspaceAiClient extends ReactQueryNetworkClient {
|
|
35
36
|
constructor() {
|
|
@@ -37,12 +38,7 @@ class WorkspaceAiClient extends ReactQueryNetworkClient {
|
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
protected buildStackSpotError(error: HttpError): StackspotAPIError {
|
|
40
|
-
return new
|
|
41
|
-
status: error.status,
|
|
42
|
-
headers: error.headers,
|
|
43
|
-
stack: error.stack,
|
|
44
|
-
message: (error.data as HttpValidationError | undefined)?.detail?.map(d => d.msg)?.join('\n'),
|
|
45
|
-
})
|
|
41
|
+
return new DefaultAPIError(error.data, error.status, wksAiDictionary, error.headers)
|
|
46
42
|
}
|
|
47
43
|
|
|
48
44
|
createWorkspaceAi = this.mutation(removeAuthorizationParam(createWorkspaceV1WorkspacesPost))
|
|
@@ -50,7 +46,7 @@ class WorkspaceAiClient extends ReactQueryNetworkClient {
|
|
|
50
46
|
workspaceAi = this.query(removeAuthorizationParam(getWorkspaceByIdV1WorkspacesIdGet))
|
|
51
47
|
updateWorkspaceAi = this.mutation(removeAuthorizationParam(updateWorkspaceV1WorkspacesWorkspaceIdPatch))
|
|
52
48
|
deleteWorkspaceAi = this.mutation(removeAuthorizationParam(deleteWorkspaceV1WorkspacesWorkspaceIdDelete))
|
|
53
|
-
|
|
49
|
+
|
|
54
50
|
/**
|
|
55
51
|
* Adds a resource to the Spot.
|
|
56
52
|
*/
|
|
@@ -73,7 +69,7 @@ class WorkspaceAiClient extends ReactQueryNetworkClient {
|
|
|
73
69
|
request: (
|
|
74
70
|
signal,
|
|
75
71
|
variables: Omit<Parameters<typeof listAllByContentTypeV1WorkspacesWorkspaceIdContentTypeGet>[0],
|
|
76
|
-
|
|
72
|
+
'authorization' | 'contentType'>,
|
|
77
73
|
) =>
|
|
78
74
|
listAllByContentTypeV1WorkspacesWorkspaceIdContentTypeGet({ ...variables, contentType: 'knowledge_source', authorization: '' },
|
|
79
75
|
{ signal }) as unknown as Promise<KnowledgeSourceItemResponse[]>,
|
|
@@ -88,7 +84,7 @@ class WorkspaceAiClient extends ReactQueryNetworkClient {
|
|
|
88
84
|
request: (
|
|
89
85
|
signal,
|
|
90
86
|
variables: Omit<Parameters<typeof listAllByContentTypeV1WorkspacesWorkspaceIdContentTypeGet>[0],
|
|
91
|
-
|
|
87
|
+
'authorization' | 'contentType'>,
|
|
92
88
|
) =>
|
|
93
89
|
listAllByContentTypeV1WorkspacesWorkspaceIdContentTypeGet({ ...variables, contentType: 'stack', authorization: '' },
|
|
94
90
|
{ signal }) as unknown as Promise<GetAiStackResponse[]>,
|
|
@@ -103,7 +99,7 @@ class WorkspaceAiClient extends ReactQueryNetworkClient {
|
|
|
103
99
|
request: (
|
|
104
100
|
signal,
|
|
105
101
|
variables: Omit<Parameters<typeof listAllByContentTypeV1WorkspacesWorkspaceIdContentTypeGet>[0],
|
|
106
|
-
|
|
102
|
+
'authorization' | 'contentType'>,
|
|
107
103
|
) =>
|
|
108
104
|
listAllByContentTypeV1WorkspacesWorkspaceIdContentTypeGet({ ...variables, contentType: 'quick_command', authorization: '' },
|
|
109
105
|
{ signal }) as unknown as Promise<QuickCommandResponse[]>,
|
|
@@ -118,7 +114,7 @@ class WorkspaceAiClient extends ReactQueryNetworkClient {
|
|
|
118
114
|
request: (
|
|
119
115
|
signal,
|
|
120
116
|
variables: Omit<Parameters<typeof listAllByContentTypeV1WorkspacesWorkspaceIdContentTypeGet>[0],
|
|
121
|
-
|
|
117
|
+
'authorization' | 'contentType'>,
|
|
122
118
|
) =>
|
|
123
119
|
listAllByContentTypeV1WorkspacesWorkspaceIdContentTypeGet({ ...variables, contentType: 'agent', authorization: '' },
|
|
124
120
|
{ signal }) as unknown as Promise<AgentResponse[]>,
|
|
@@ -133,7 +129,7 @@ class WorkspaceAiClient extends ReactQueryNetworkClient {
|
|
|
133
129
|
request: (
|
|
134
130
|
signal,
|
|
135
131
|
variables: Omit<Parameters<typeof listAllByContentTypeV1WorkspacesWorkspaceIdContentTypeGet>[0],
|
|
136
|
-
|
|
132
|
+
'authorization' | 'contentType'>,
|
|
137
133
|
) =>
|
|
138
134
|
listAllByContentTypeV1WorkspacesWorkspaceIdContentTypeGet({ ...variables, contentType: 'toolkit', authorization: '' },
|
|
139
135
|
{ signal }) as unknown as Promise<CustomToolkitResponse[]>,
|
|
@@ -144,7 +140,7 @@ class WorkspaceAiClient extends ReactQueryNetworkClient {
|
|
|
144
140
|
removeContentV1WorkspacesWorkspaceIdContentTypeContentIdDelete))
|
|
145
141
|
addPermissionToWorkspaceAi = this.mutation(removeAuthorizationParam(addPermissionV1WorkspacesWorkspaceIdPermissionsPatch))
|
|
146
142
|
removePermissionToWorkspaceAi = this.mutation(removeAuthorizationParam(removePermissionV1WorkspacesWorkspaceIdPermissionsDelete))
|
|
147
|
-
|
|
143
|
+
|
|
148
144
|
/**
|
|
149
145
|
* Get group of permission on workspace AI
|
|
150
146
|
* @param search can be used to search by name
|
|
@@ -158,24 +154,24 @@ class WorkspaceAiClient extends ReactQueryNetworkClient {
|
|
|
158
154
|
* Adds the resource of type Workspace AI to the list of favorites.
|
|
159
155
|
*/
|
|
160
156
|
addFavoriteWorkspaceAi = this.mutation(removeAuthorizationParam(addFavoriteV1WorkspacesWorkspaceIdFavoritePost))
|
|
161
|
-
|
|
157
|
+
|
|
162
158
|
/**
|
|
163
159
|
* Removes the resource of type Workspace AI from the list of favorites.
|
|
164
160
|
*/
|
|
165
|
-
removeFavoriteWorkspaceAi = this.mutation(removeAuthorizationParam(deleteFavoriteV1WorkspacesWorkspaceIdFavoriteDelete))
|
|
161
|
+
removeFavoriteWorkspaceAi = this.mutation(removeAuthorizationParam(deleteFavoriteV1WorkspacesWorkspaceIdFavoriteDelete))
|
|
166
162
|
|
|
167
163
|
/**
|
|
168
164
|
* Gets all content from all workspaces to which the user has permissions.
|
|
169
165
|
*/
|
|
170
|
-
workspacesContentsByType
|
|
166
|
+
workspacesContentsByType = this.query(removeAuthorizationParam(listAllContentsV1WorkspacesContentsContentTypeGet))
|
|
171
167
|
/**
|
|
172
168
|
* Get a generated link to share a spot
|
|
173
169
|
*/
|
|
174
|
-
generateShareSpotLink
|
|
170
|
+
generateShareSpotLink = this.mutation(removeAuthorizationParam(createShareableLinkV1WorkspacesWorkspaceIdSharePost))
|
|
175
171
|
/**
|
|
176
172
|
* Get a shareable link from a spot
|
|
177
173
|
*/
|
|
178
|
-
shareableLink
|
|
174
|
+
shareableLink = this.mutation(removeAuthorizationParam(useShareableLinkV1ShareShareIdPatch))
|
|
179
175
|
/**
|
|
180
176
|
* Add permission to resource
|
|
181
177
|
*/
|
|
@@ -183,13 +179,13 @@ class WorkspaceAiClient extends ReactQueryNetworkClient {
|
|
|
183
179
|
/**
|
|
184
180
|
* Remove permission to resource
|
|
185
181
|
*/
|
|
186
|
-
removePermissionResource =
|
|
182
|
+
removePermissionResource =
|
|
187
183
|
this.mutation(removeAuthorizationParam(removePermissionV1ResourceTypeResourceTypeResourcesResourceIdentifierDelete))
|
|
188
184
|
/**
|
|
189
185
|
* List members with permission to resource
|
|
190
186
|
*/
|
|
191
|
-
listMembersResource =
|
|
187
|
+
listMembersResource =
|
|
192
188
|
this.infiniteQuery(removeAuthorizationParam(listMembersV1ResourceTypeResourceTypeResourcesResourceIdentifierMembersGet))
|
|
193
|
-
}
|
|
189
|
+
}
|
|
194
190
|
|
|
195
191
|
export const workspaceAiClient = new WorkspaceAiClient()
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/* eslint-disable max-len */
|
|
2
2
|
import { HttpError } from '@oazapfts/runtime'
|
|
3
|
+
import { getApiAddresses } from '../api-addresses'
|
|
3
4
|
import {
|
|
4
5
|
accountApplicationControllergetAccountApplicationPage,
|
|
5
6
|
accountApplicationControllergetAccountApplicationsFilters,
|
|
@@ -20,6 +21,7 @@ import {
|
|
|
20
21
|
applicationControllergetApplicationLinks,
|
|
21
22
|
applicationControllergetApplications,
|
|
22
23
|
applicationControllerregistryAppDestroy,
|
|
24
|
+
availableConnectionInterfaceControllergetAvailableConnectionInterfaces,
|
|
23
25
|
contentWorkflowControllercreateApplicationThroughWorkflow,
|
|
24
26
|
contentWorkflowControllercreateSharedInfraThroughWorkflow,
|
|
25
27
|
contextActionControllergetStackActionInputsInAccountContext,
|
|
@@ -28,6 +30,8 @@ import {
|
|
|
28
30
|
contextControllerclearActionContextInWorkspace,
|
|
29
31
|
contextControllerclearPluginContextInAccount,
|
|
30
32
|
contextControllerclearPluginContextInWorkspace,
|
|
33
|
+
contextControllerclearWorkflowContextInAccount,
|
|
34
|
+
contextControllerclearWorkflowContextInWorkspace,
|
|
31
35
|
contextControllerimportContextInAccount,
|
|
32
36
|
contextControllerimportContextInWorkspace,
|
|
33
37
|
contextControllerupsertAccountActionsInputContext,
|
|
@@ -38,6 +42,7 @@ import {
|
|
|
38
42
|
contextControllerupsertWorkspaceActionsInputContext,
|
|
39
43
|
contextWorkflowControllergetAccountWorkflowInputs,
|
|
40
44
|
contextWorkflowControllergetConsolidatedWorkflowInputs,
|
|
45
|
+
contextWorkflowControllergetWorkspaceWorkflowInputs,
|
|
41
46
|
contextgetAccountPluginInputs,
|
|
42
47
|
contextgetConsolidatedPluginInputs,
|
|
43
48
|
contextgetConsolidatedPluginInputsWithConnectionInterfaces,
|
|
@@ -63,6 +68,7 @@ import {
|
|
|
63
68
|
workflowWorkspaceControllerlistWorkflowByStackIdAndWorkflowType,
|
|
64
69
|
workspaceControllerdelete,
|
|
65
70
|
workspaceControllergetWorkspaces,
|
|
71
|
+
workspaceControllergetWorkspacesSummary,
|
|
66
72
|
workspaceStackControlleraddStacksInWorkspace,
|
|
67
73
|
workspaceStackControllerdeleteStacksInWorkspace,
|
|
68
74
|
workspaceStackControllerlistStacks,
|
|
@@ -79,7 +85,6 @@ import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
|
|
|
79
85
|
import { contentClient } from './content'
|
|
80
86
|
import { FixedFullInputContextResponse, FixedPaginatedActivityResponse, FixedPluginForAppCreationV2Response, FixedWorkflowForCreationResponse, ReplaceResult } from './types'
|
|
81
87
|
import { workspaceClient } from './workspace'
|
|
82
|
-
import { getApiAddresses } from '../api-addresses'
|
|
83
88
|
|
|
84
89
|
class WorkspaceManagerClient extends ReactQueryNetworkClient {
|
|
85
90
|
constructor() {
|
|
@@ -153,6 +158,12 @@ class WorkspaceManagerClient extends ReactQueryNetworkClient {
|
|
|
153
158
|
*/
|
|
154
159
|
workflowDataWithInputsInWorkspace = this.query(contextWorkflowControllergetConsolidatedWorkflowInputs as
|
|
155
160
|
unknown as ReplaceResult<typeof contextWorkflowControllergetConsolidatedWorkflowInputs, FixedWorkflowForCreationResponse>)
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Gets workflow inputs in a workspace stack
|
|
164
|
+
*/
|
|
165
|
+
workflowInputsInWorkspace = this.query(contextWorkflowControllergetWorkspaceWorkflowInputs as unknown as ReplaceResult<typeof contextWorkflowControllergetWorkspaceWorkflowInputs, FixedWorkflowForCreationResponse>)
|
|
166
|
+
|
|
156
167
|
/**
|
|
157
168
|
* Gets workflow inputs in an account stack
|
|
158
169
|
*/
|
|
@@ -531,6 +542,17 @@ class WorkspaceManagerClient extends ReactQueryNetworkClient {
|
|
|
531
542
|
permission: async ({ stackVersionId, workflowVersionId }: Parameters<typeof contextControllerupsertWorkflowAccountContext>[0]) =>
|
|
532
543
|
workspaceClient.saveContextInAccount.isAllowed({ $type: 'workflow', stackVersionId, externalId: workflowVersionId }),
|
|
533
544
|
})
|
|
545
|
+
|
|
546
|
+
/**
|
|
547
|
+
* Clear stack workflow context in account
|
|
548
|
+
*/
|
|
549
|
+
clearInputContextWorkflowAccount = this.mutation(contextControllerclearWorkflowContextInAccount)
|
|
550
|
+
|
|
551
|
+
/**
|
|
552
|
+
* Clear stack workflow context in workspace
|
|
553
|
+
*/
|
|
554
|
+
clearInputContextWorkflowWorkspace = this.mutation(contextControllerclearWorkflowContextInWorkspace)
|
|
555
|
+
|
|
534
556
|
/**
|
|
535
557
|
* Get Stacks with context
|
|
536
558
|
*/
|
|
@@ -547,7 +569,14 @@ class WorkspaceManagerClient extends ReactQueryNetworkClient {
|
|
|
547
569
|
* Get list of versions with context of stack
|
|
548
570
|
*/
|
|
549
571
|
getStacksVersionWithContext = this.query(accountStackControllerlistVersionsWithContext)
|
|
550
|
-
|
|
572
|
+
/**
|
|
573
|
+
* Receives a list of workspace id's and returns that workspaces detailed
|
|
574
|
+
*/
|
|
575
|
+
workspacesFilterById = this.mutation(workspaceControllergetWorkspacesSummary)
|
|
576
|
+
/**
|
|
577
|
+
* Gets available connection interfaces from a workspace
|
|
578
|
+
*/
|
|
579
|
+
availableConnectionInterfaces = this.query(availableConnectionInterfaceControllergetAvailableConnectionInterfaces)
|
|
551
580
|
}
|
|
552
581
|
|
|
553
582
|
export const workspaceManagerClient = new WorkspaceManagerClient()
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Dictionary
|
|
1
|
+
import { Dictionary } from '@stack-spot/portal-translate'
|
|
2
2
|
import { every, isString } from 'lodash'
|
|
3
3
|
import { actionDetails } from './dictionary/action-details'
|
|
4
4
|
import { baseDictionary } from './dictionary/base'
|
|
@@ -24,7 +24,7 @@ const detailsDictionary = {
|
|
|
24
24
|
actionapi: actionDetails,
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
function getTitle(status: number, raw: ErrorResponse, dictionary: Dictionary, language:
|
|
27
|
+
function getTitle(status: number, raw: ErrorResponse, dictionary: Dictionary, language: 'pt' | 'en') {
|
|
28
28
|
if (ignoredTitleErrorCodes.includes(raw.code)) return ' '
|
|
29
29
|
if (dictionary[language][raw.code]) return dictionary[language][raw.code]
|
|
30
30
|
if (raw.details && !ignoredDescriptions.includes(raw.details)) return raw.details
|
|
@@ -35,8 +35,8 @@ function getValues(detail: ValidationDetails) {
|
|
|
35
35
|
return detail.values && every(detail.values, isString) ? `\n${detail.values.join('\n')}` : ''
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
function getSuggestedMessages(suggestedMessage: ErrorResponse['suggestedMessages'] | null | undefined, language?:
|
|
39
|
-
const parseLanguage: Record<
|
|
38
|
+
function getSuggestedMessages(suggestedMessage: ErrorResponse['suggestedMessages'] | null | undefined, language?: 'pt' | 'en') {
|
|
39
|
+
const parseLanguage: Record<'pt' | 'en', LanguageSuggestedMessageKeys> = { pt: 'ptBr', en: 'enUs' }
|
|
40
40
|
return suggestedMessage?.[parseLanguage?.[language || 'en']]
|
|
41
41
|
}
|
|
42
42
|
|
|
@@ -60,7 +60,7 @@ export function interpolateErrors(message: string, values: string[], fieldValues
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
|
|
63
|
-
function createMessage(status: number, raw: ErrorResponse, dictionary: Dictionary, language?:
|
|
63
|
+
function createMessage(status: number, raw: ErrorResponse, dictionary: Dictionary, language?: 'pt' | 'en'): ErrorDetailsProperties {
|
|
64
64
|
const title = getTitle(status, raw, dictionary, language || 'en')
|
|
65
65
|
const api = raw.code?.split(/[-_]/)[0]
|
|
66
66
|
const dictDetails = (detailsDictionary[api?.toLowerCase() as keyof typeof detailsDictionary] ?? {})[language || 'en']
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getLanguage, ptEn } from '@stack-spot/portal-translate'
|
|
2
2
|
|
|
3
|
-
export type InternationalizedMessage = (language:
|
|
3
|
+
export type InternationalizedMessage = (language: 'pt' | 'en') => string | ErrorDetailsProperties
|
|
4
4
|
|
|
5
5
|
export interface ErrorDetailsProperties {
|
|
6
6
|
/**
|
|
@@ -81,7 +81,7 @@ export class StackspotAPIError extends Error {
|
|
|
81
81
|
* @param language
|
|
82
82
|
* @returns an error message
|
|
83
83
|
*/
|
|
84
|
-
translate(language
|
|
84
|
+
translate(language = getLanguage(ptEn)): string {
|
|
85
85
|
const unknown = language === 'en' ? 'unknown error' : 'erro desconhecido'
|
|
86
86
|
|
|
87
87
|
const error = this.intl?.(language)
|
|
@@ -89,7 +89,7 @@ export class StackspotAPIError extends Error {
|
|
|
89
89
|
return message ?? this.message ?? this.code ?? (this.status === 0 ? unknown : `${this.status}`)
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
translateDetails(language
|
|
92
|
+
translateDetails(language = getLanguage(ptEn)): ErrorDetailsProperties {
|
|
93
93
|
const unknown = language === 'en' ? 'unknown error' : 'erro desconhecido'
|
|
94
94
|
const errorMessage = this.intl?.(language)
|
|
95
95
|
if (typeof errorMessage === 'string')
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Dictionary } from '@stack-spot/portal-translate'
|
|
2
|
+
|
|
3
|
+
export const accountAssetManagerDictionary = {
|
|
4
|
+
en: {
|
|
5
|
+
FOLDER_BAD_REQUEST_ERROR: 'The provided data is invalid or inconsistent.',
|
|
6
|
+
FOLDER_ALREADY_EXISTS: 'A folder with this name already exists.',
|
|
7
|
+
},
|
|
8
|
+
pt: {
|
|
9
|
+
FOLDER_BAD_REQUEST_ERROR: 'Os dados informados estão inválidos ou inconsistentes.',
|
|
10
|
+
FOLDER_ALREADY_EXISTS: 'Já existe uma pasta com esse nome.',
|
|
11
|
+
},
|
|
12
|
+
} satisfies Dictionary
|
|
@@ -2,19 +2,87 @@ import { Dictionary } from '@stack-spot/portal-translate'
|
|
|
2
2
|
|
|
3
3
|
export const scfDictionary = {
|
|
4
4
|
en: {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
SCF_CIDR_FOUNDATION_RESERVED: '
|
|
10
|
-
|
|
5
|
+
SCF_CERTIFICATE_ERROR: 'Certificate operation failed.',
|
|
6
|
+
SCF_CERTIFICATE_NOT_FOUND_ERROR: 'Certificate with ID {1} not found.',
|
|
7
|
+
SCF_CIDR_ERROR: 'CIDR operation failed.',
|
|
8
|
+
SCF_CIDR_RANGE_CONFLICT: 'CIDR range {1} conflicts with an existing range.',
|
|
9
|
+
SCF_CIDR_FOUNDATION_RESERVED: 'CIDR range {1} conflicts with the Foundation\'s reserved range.',
|
|
10
|
+
SCF_CIDR_NOT_FOUND_ERROR: 'CIDR with ID {1} not found.',
|
|
11
|
+
SCF_CONTROL_TOWER_BUSY_ERROR: 'Foundation\'s Control Tower is currently busy. Please try again later.',
|
|
12
|
+
SCF_DNS_RECORD_ERROR: 'DNS Record operation failed.',
|
|
13
|
+
SCF_DNS_RECORD_NOT_FOUND_ERROR: 'DNS Record with ID {1} not found.',
|
|
14
|
+
SCF_DNS_ZONE_ERROR: 'DNS Zone operation failed.',
|
|
15
|
+
SCF_DNS_ZONE_NOT_FOUND_ERROR: 'DNS Zone with ID {1} not found.',
|
|
16
|
+
SCF_DNS_ZONE_NOT_READY_ERROR: 'DNS Zone with ID {1} not ready.',
|
|
17
|
+
SCF_FOLDER_ALREADY_EXISTS_ERROR: 'A folder named {1} already exists.',
|
|
18
|
+
SCF_FOLDER_ERROR: 'Folder operation failed.',
|
|
19
|
+
SCF_FOLDER_NOT_FOUND_ERROR: 'Folder with ID {1} not found.',
|
|
20
|
+
SCF_FOLDER_NOT_READY_ERROR: 'Folder with ID {1} not ready.',
|
|
21
|
+
SCF_FOUNDATION_ERROR: 'Foundation operation failed.',
|
|
22
|
+
SCF_FOUNDATION_NOT_FOUND_ERROR: 'Foundation with ID {1} not found.',
|
|
23
|
+
SCF_FOUNDATION_NOT_READY_ERROR: 'Foundation with ID {1} not ready.',
|
|
24
|
+
SCF_INBOUND_ERROR: 'Inbound operation failed.',
|
|
25
|
+
SCF_INVALID_REGEX_ERROR: 'The value {1} is invalid.',
|
|
26
|
+
SCF_MASTER_ACCOUNT_ERROR: 'Master Account operation failed.',
|
|
27
|
+
SCF_MASTER_ACCOUNT_NOT_FOUND_ERROR: 'No Master Account available for Foundation creation.',
|
|
28
|
+
SCF_NAMESPACE_CREATION_ERROR: 'An error occurred while creating the Kubernetes namespace.',
|
|
29
|
+
SCF_NETWORK_CONNECTION_ERROR: 'Network Connection operation failed.',
|
|
30
|
+
SCF_NETWORK_ERROR: 'Network operation failed.',
|
|
31
|
+
SCF_NETWORK_NOT_FOUND_ERROR: 'Network with ID {1} not found.',
|
|
32
|
+
SCF_NETWORK_NOT_READY_ERROR: 'Network with ID {1} not ready.',
|
|
33
|
+
SCF_PARENT_FOLDER_NOT_READY_ERROR: 'Parent Folder with ID {1} not ready.',
|
|
34
|
+
SCF_PROJECT_ERROR: 'Project operation failed.',
|
|
35
|
+
SCF_PROJECT_NOT_FOUND_ERROR: 'Project with ID {1} not found.',
|
|
36
|
+
SCF_PROJECT_NOT_READY_ERROR: 'Project with ID {1} not ready.',
|
|
37
|
+
SCF_UNKNOWN_ERROR: 'An unexpected error has occurred.',
|
|
38
|
+
SCF_VPN_CONFIGURATION_NOT_FOUND_ERROR: 'Configuration for VPN with ID {1} not found.',
|
|
39
|
+
SCF_VPN_ERROR: 'VPN operation failed.',
|
|
40
|
+
SCF_VPN_NOT_FOUND_ERROR: 'VPN with ID {1} not found.',
|
|
41
|
+
SCF_VPN_NOT_READY_ERROR: 'VPN with ID {1} not ready.',
|
|
42
|
+
SCF_DNS_ZONE_NOT_EMPTY_ERROR: 'DNS Zone with ID {1} is not empty.',
|
|
43
|
+
SCF_FOLDER_NOT_EMPTY_ERROR: 'Folder with ID {1} is not empty.',
|
|
44
|
+
SCF_PROJECT_NOT_EMPTY_ERROR: 'Project with ID {1} is not empty.',
|
|
11
45
|
},
|
|
12
46
|
pt: {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
SCF_CIDR_FOUNDATION_RESERVED: 'O
|
|
18
|
-
|
|
47
|
+
SCF_CERTIFICATE_ERROR: 'Falha na operação de Certificado.',
|
|
48
|
+
SCF_CERTIFICATE_NOT_FOUND_ERROR: 'Certificado com ID {1} não encontrado.',
|
|
49
|
+
SCF_CIDR_ERROR: 'Falha na operação de CIDR.',
|
|
50
|
+
SCF_CIDR_RANGE_CONFLICT: 'O intervalo CIDR {1} conflita com um intervalo existente.',
|
|
51
|
+
SCF_CIDR_FOUNDATION_RESERVED: 'O intervalo CIDR {1} conflita com o intervalo reservado da Fundação.',
|
|
52
|
+
SCF_CIDR_NOT_FOUND_ERROR: 'CIDR com ID {1} não encontrado.',
|
|
53
|
+
SCF_CONTROL_TOWER_BUSY_ERROR: 'Control Tower da Fundação está ocupada no momento. Por favor, tente novamente mais tarde.',
|
|
54
|
+
SCF_DNS_RECORD_ERROR: 'Falha na operação de DNS Record.',
|
|
55
|
+
SCF_DNS_RECORD_NOT_FOUND_ERROR: 'DNS Record com ID {1} não encontrado.',
|
|
56
|
+
SCF_DNS_ZONE_ERROR: 'Falha na operação de DNS Zone.',
|
|
57
|
+
SCF_DNS_ZONE_NOT_FOUND_ERROR: 'DNS Zone com ID {1} não encontrada.',
|
|
58
|
+
SCF_DNS_ZONE_NOT_READY_ERROR: 'DNS Zone com ID {1} não está pronta.',
|
|
59
|
+
SCF_FOLDER_ALREADY_EXISTS_ERROR: 'Uma Pasta com o nome {1} já existe.',
|
|
60
|
+
SCF_FOLDER_ERROR: 'Falha na operação de Pasta.',
|
|
61
|
+
SCF_FOLDER_NOT_FOUND_ERROR: 'Pasta com ID {1} não encontrada.',
|
|
62
|
+
SCF_FOLDER_NOT_READY_ERROR: 'Pasta com ID {1} não está pronta.',
|
|
63
|
+
SCF_FOUNDATION_ERROR: 'Falha na operação da Fundação.',
|
|
64
|
+
SCF_FOUNDATION_NOT_FOUND_ERROR: 'Fundação com ID {1} não encontrada.',
|
|
65
|
+
SCF_FOUNDATION_NOT_READY_ERROR: 'Fundação com ID {1} não está pronta.',
|
|
66
|
+
SCF_INBOUND_ERROR: 'Falha na operação de Inbound.',
|
|
67
|
+
SCF_INVALID_REGEX_ERROR: 'O valor {1} é inválido.',
|
|
68
|
+
SCF_MASTER_ACCOUNT_ERROR: 'Falha na operação da Master Account.',
|
|
69
|
+
SCF_MASTER_ACCOUNT_NOT_FOUND_ERROR: 'Nenhuma Master Account disponível para criação da Fundação.',
|
|
70
|
+
SCF_NAMESPACE_CREATION_ERROR: 'Ocorreu um erro ao criar o namespace no Kubernetes.',
|
|
71
|
+
SCF_NETWORK_CONNECTION_ERROR: 'Falha na operação de Network Connection.',
|
|
72
|
+
SCF_NETWORK_ERROR: 'Falha na operação de Network.',
|
|
73
|
+
SCF_NETWORK_NOT_FOUND_ERROR: 'Network com ID {1} não encontrada.',
|
|
74
|
+
SCF_NETWORK_NOT_READY_ERROR: 'Network com ID {1} não está pronta.',
|
|
75
|
+
SCF_PARENT_FOLDER_NOT_READY_ERROR: 'Pasta pai com ID {1} não está pronta.',
|
|
76
|
+
SCF_PROJECT_ERROR: 'Falha na operação do Projeto.',
|
|
77
|
+
SCF_PROJECT_NOT_FOUND_ERROR: 'Projeto com ID {1} não encontrado.',
|
|
78
|
+
SCF_PROJECT_NOT_READY_ERROR: 'Projeto com ID {1} não está pronto.',
|
|
79
|
+
SCF_UNKNOWN_ERROR: 'Ocorreu um erro inesperado.',
|
|
80
|
+
SCF_VPN_CONFIGURATION_NOT_FOUND_ERROR: 'Configuração para VPN com ID {1} não encontrada.',
|
|
81
|
+
SCF_VPN_ERROR: 'Falha na operação de VPN.',
|
|
82
|
+
SCF_VPN_NOT_FOUND_ERROR: 'VPN com ID {1} não encontrada.',
|
|
83
|
+
SCF_VPN_NOT_READY_ERROR: 'VPN com ID {1} não está pronta.',
|
|
84
|
+
SCF_DNS_ZONE_NOT_EMPTY_ERROR: 'DNS Zone com ID {1} não está vazia.',
|
|
85
|
+
SCF_FOLDER_NOT_EMPTY_ERROR: 'Folder com ID {1} não está vazia.',
|
|
86
|
+
SCF_PROJECT_NOT_EMPTY_ERROR: 'Project com ID {1} não está vazia.',
|
|
19
87
|
},
|
|
20
88
|
} satisfies Dictionary
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Dictionary } from '@stack-spot/portal-translate'
|
|
2
|
+
|
|
3
|
+
export const wksAiDictionary = {
|
|
4
|
+
en: {
|
|
5
|
+
AGENT_1105_TOOLKIT_WITH_PERSONAL_SECRET: 'It is not possible to share the agent, as it has a tool with a personal secret. Remove the tool or replace it with an organization secret.',
|
|
6
|
+
},
|
|
7
|
+
pt: {
|
|
8
|
+
AGENT_1105_TOOLKIT_WITH_PERSONAL_SECRET: 'Não é possível compartilhar o agente, pois ele possui uma ferramenta com segredo pessoal. Remova a ferramenta ou substitua por um segredo da organização.',
|
|
9
|
+
},
|
|
10
|
+
} satisfies Dictionary
|
package/src/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { CancelledError } from '@tanstack/react-query'
|
|
2
|
-
export { apiAddresses, getApiAddresses,
|
|
2
|
+
export { apiAddresses, getApiAddresses, getApisBaseUrlConfig, getBaseUrlByTenantWithOverride } from './api-addresses'
|
|
3
3
|
export { accountClient } from './client/account'
|
|
4
|
-
export
|
|
4
|
+
export { accountAssetManagerClient } from './client/account-asset-manager'
|
|
5
5
|
export { agentClient } from './client/agent'
|
|
6
6
|
export { agentToolsClient } from './client/agent-tools'
|
|
7
7
|
export { aiClient } from './client/ai'
|
|
@@ -14,7 +14,9 @@ export { cloudServicesClient } from './client/cloud-services'
|
|
|
14
14
|
export { codeShiftClient } from './client/code-shift'
|
|
15
15
|
export { contentClient } from './client/content'
|
|
16
16
|
export { dataIntegrationClient } from './client/data-integration'
|
|
17
|
+
export * from './client/discover'
|
|
17
18
|
export { discoverClient } from './client/discover'
|
|
19
|
+
export { edpBfaClient } from './client/edp-bfa'
|
|
18
20
|
export { eventBusClient } from './client/event-bus'
|
|
19
21
|
export { genAiInferenceClient } from './client/gen-ai-inference'
|
|
20
22
|
export { insightsClient } from './client/insights'
|
|
@@ -35,9 +37,10 @@ export { StreamError } from './error/StreamError'
|
|
|
35
37
|
export { StreamJsonError } from './error/StreamJsonError'
|
|
36
38
|
export { NetworkClient } from './network/NetworkClient'
|
|
37
39
|
export { queryClient } from './network/react-query-client'
|
|
38
|
-
export { OperationResult, OperationVariables, UseQueryObjectOptions } from './network/types'
|
|
40
|
+
export { Env, OperationResult, OperationVariables, Tenant, UseQueryObjectOptions } from './network/types'
|
|
39
41
|
export { StreamingStatus } from './types'
|
|
40
42
|
export { StreamedArray } from './utils/StreamedArray'
|
|
41
43
|
export { StreamedJson } from './utils/StreamedJson'
|
|
42
44
|
export { useExtendedList } from './utils/use-extended-list'
|
|
43
45
|
export { useStreamedArray } from './utils/use-streamed-array'
|
|
46
|
+
|