@stack-spot/portal-network 0.195.1 → 0.196.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.
Files changed (92) hide show
  1. package/CHANGELOG.md +79 -0
  2. package/dist/api/agent-tools.d.ts +135 -148
  3. package/dist/api/agent-tools.d.ts.map +1 -1
  4. package/dist/api/agent-tools.js +41 -4
  5. package/dist/api/agent-tools.js.map +1 -1
  6. package/dist/api/agent.d.ts +55 -55
  7. package/dist/api/agent.d.ts.map +1 -1
  8. package/dist/api/ai.d.ts +196 -25
  9. package/dist/api/ai.d.ts.map +1 -1
  10. package/dist/api/ai.js +153 -22
  11. package/dist/api/ai.js.map +1 -1
  12. package/dist/api/cloudPlatformHorizon.d.ts +178 -9
  13. package/dist/api/cloudPlatformHorizon.d.ts.map +1 -1
  14. package/dist/api/cloudPlatformHorizon.js +69 -1
  15. package/dist/api/cloudPlatformHorizon.js.map +1 -1
  16. package/dist/api/codeShift.d.ts +315 -62
  17. package/dist/api/codeShift.d.ts.map +1 -1
  18. package/dist/api/codeShift.js +153 -12
  19. package/dist/api/codeShift.js.map +1 -1
  20. package/dist/api/discover.d.ts +23 -12
  21. package/dist/api/discover.d.ts.map +1 -1
  22. package/dist/api/discover.js +10 -0
  23. package/dist/api/discover.js.map +1 -1
  24. package/dist/api-addresses.d.ts.map +1 -1
  25. package/dist/client/account.d.ts +233 -233
  26. package/dist/client/account.d.ts.map +1 -1
  27. package/dist/client/agent-tools.d.ts +152 -126
  28. package/dist/client/agent-tools.d.ts.map +1 -1
  29. package/dist/client/agent-tools.js +29 -2
  30. package/dist/client/agent-tools.js.map +1 -1
  31. package/dist/client/agent.d.ts +46 -46
  32. package/dist/client/agent.d.ts.map +1 -1
  33. package/dist/client/ai.d.ts +120 -110
  34. package/dist/client/ai.d.ts.map +1 -1
  35. package/dist/client/ai.js +29 -2
  36. package/dist/client/ai.js.map +1 -1
  37. package/dist/client/api-management.d.ts +2 -2
  38. package/dist/client/cloud-account.d.ts +13 -13
  39. package/dist/client/cloud-platform-horizon.d.ts +38 -19
  40. package/dist/client/cloud-platform-horizon.d.ts.map +1 -1
  41. package/dist/client/cloud-platform-horizon.js +19 -1
  42. package/dist/client/cloud-platform-horizon.js.map +1 -1
  43. package/dist/client/cloud-platform.d.ts +50 -50
  44. package/dist/client/cloud-runtimes.d.ts +4 -4
  45. package/dist/client/cloud-services.d.ts +17 -17
  46. package/dist/client/cloud-services.d.ts.map +1 -1
  47. package/dist/client/code-shift.d.ts +349 -258
  48. package/dist/client/code-shift.d.ts.map +1 -1
  49. package/dist/client/code-shift.js +82 -1
  50. package/dist/client/code-shift.js.map +1 -1
  51. package/dist/client/content.d.ts +127 -132
  52. package/dist/client/content.d.ts.map +1 -1
  53. package/dist/client/data-integration.d.ts +55 -55
  54. package/dist/client/data-integration.d.ts.map +1 -1
  55. package/dist/client/discover.d.ts +15 -9
  56. package/dist/client/discover.d.ts.map +1 -1
  57. package/dist/client/discover.js +208 -0
  58. package/dist/client/discover.js.map +1 -1
  59. package/dist/client/event-bus.d.ts.map +1 -1
  60. package/dist/client/gen-ai-inference.d.ts +20 -20
  61. package/dist/client/insights.d.ts +7 -7
  62. package/dist/client/notification.d.ts +10 -10
  63. package/dist/client/runtime-manager.d.ts +8 -8
  64. package/dist/client/types.d.ts +14 -0
  65. package/dist/client/types.d.ts.map +1 -1
  66. package/dist/client/workflow.d.ts +10 -10
  67. package/dist/client/workspace-ai.d.ts +53 -53
  68. package/dist/client/workspace-manager.d.ts +77 -77
  69. package/dist/client/workspace-search.d.ts +2 -2
  70. package/dist/client/workspace.d.ts +58 -105
  71. package/dist/client/workspace.d.ts.map +1 -1
  72. package/dist/error/dictionary/cloud-platform.d.ts +6 -0
  73. package/dist/error/dictionary/cloud-platform.d.ts.map +1 -1
  74. package/dist/error/dictionary/cloud-platform.js +6 -0
  75. package/dist/error/dictionary/cloud-platform.js.map +1 -1
  76. package/dist/utils/StreamedJson.d.ts.map +1 -1
  77. package/dist/utils/StreamedJson.js +9 -1
  78. package/dist/utils/StreamedJson.js.map +1 -1
  79. package/package.json +2 -2
  80. package/src/api/agent-tools.ts +182 -150
  81. package/src/api/ai.ts +381 -40
  82. package/src/api/cloudPlatformHorizon.ts +412 -9
  83. package/src/api/codeShift.ts +607 -69
  84. package/src/api/discover.ts +35 -12
  85. package/src/client/agent-tools.ts +20 -2
  86. package/src/client/ai.ts +25 -10
  87. package/src/client/cloud-platform-horizon.ts +12 -4
  88. package/src/client/code-shift.ts +50 -1
  89. package/src/client/discover.ts +220 -3
  90. package/src/client/types.ts +17 -2
  91. package/src/error/dictionary/cloud-platform.ts +6 -0
  92. package/src/utils/StreamedJson.tsx +9 -2
@@ -28,7 +28,7 @@ export type GetOpportunityResponse = {
28
28
  hypotheses: GetOpportunityResponseHypothesisResponse[];
29
29
  updatedBy?: string;
30
30
  updatedAt?: string;
31
- chatId?: string;
31
+ chatId: string;
32
32
  };
33
33
  export type UpdateOpportunityRequest = {
34
34
  title?: string;
@@ -42,7 +42,7 @@ export type UpdateOpportunityResponse = {
42
42
  createdAt?: string;
43
43
  updatedBy?: string;
44
44
  updatedAt?: string;
45
- chatId?: string;
45
+ chatId: string;
46
46
  };
47
47
  export type GetHypothesisResponseDocumentResponse = {
48
48
  id: string;
@@ -59,7 +59,7 @@ export type GetHypothesisResponse = {
59
59
  createdAt?: string;
60
60
  updatedBy?: string;
61
61
  updatedAt?: string;
62
- chatId?: string;
62
+ chatId: string;
63
63
  };
64
64
  export type UpdateHypothesisRequest = {
65
65
  title?: string;
@@ -74,7 +74,7 @@ export type UpdateHypothesisResponse = {
74
74
  createdAt?: string;
75
75
  updatedBy?: string;
76
76
  updatedAt?: string;
77
- chatId?: string;
77
+ chatId: string;
78
78
  };
79
79
  export type GetDocumentResponse = {
80
80
  id: string;
@@ -85,7 +85,7 @@ export type GetDocumentResponse = {
85
85
  createdAt?: string;
86
86
  updatedBy?: string;
87
87
  updatedAt?: string;
88
- chatId?: string;
88
+ chatId: string;
89
89
  };
90
90
  export type UpdateDocumentRequest = {
91
91
  title?: string;
@@ -101,7 +101,7 @@ export type UpdateDocumentResponse = {
101
101
  createdAt?: string;
102
102
  updatedBy?: string;
103
103
  updatedAt?: string;
104
- chatId?: string;
104
+ chatId: string;
105
105
  };
106
106
  export type SortResponse = {
107
107
  direction: string;
@@ -134,7 +134,7 @@ export type PageResponseGetOpportunityResponse = {
134
134
  export type CreateOpportunityRequest = {
135
135
  title?: string;
136
136
  description?: string;
137
- chatId?: string;
137
+ chatId: string;
138
138
  };
139
139
  export type CreateOpportunityResponse = {
140
140
  id: string;
@@ -144,13 +144,13 @@ export type CreateOpportunityResponse = {
144
144
  createdAt?: string;
145
145
  updatedBy?: string;
146
146
  updatedAt?: string;
147
- chatId?: string;
147
+ chatId: string;
148
148
  };
149
149
  export type CreateHypothesisRequest = {
150
150
  opportunityId?: string;
151
151
  title?: string;
152
152
  description?: string;
153
- chatId?: string;
153
+ chatId: string;
154
154
  };
155
155
  export type CreateHypothesisResponse = {
156
156
  id: string;
@@ -161,14 +161,14 @@ export type CreateHypothesisResponse = {
161
161
  createdAt?: string;
162
162
  updatedBy?: string;
163
163
  updatedAt?: string;
164
- chatId?: string;
164
+ chatId: string;
165
165
  };
166
166
  export type CreateDocumentRequest = {
167
167
  hypothesisId?: string;
168
168
  title?: string;
169
169
  description?: string;
170
170
  content?: string;
171
- chatId?: string;
171
+ chatId: string;
172
172
  };
173
173
  export type CreateDocumentResponse = {
174
174
  id: string;
@@ -179,7 +179,14 @@ export type CreateDocumentResponse = {
179
179
  createdAt?: string;
180
180
  updatedBy?: string;
181
181
  updatedAt?: string;
182
- chatId?: string;
182
+ chatId: string;
183
+ };
184
+ export type MessageRequest = {
185
+ prompt: string;
186
+ conversationId: string;
187
+ };
188
+ export type SseEmitter = {
189
+ timeout?: number;
183
190
  };
184
191
  export type GetArtifactResponse = {
185
192
  "type": "OPPORTUNITY" | "HYPOTHESIS" | "DOCUMENT";
@@ -405,6 +412,22 @@ export function create2({ createDocumentRequest }: {
405
412
  body: createDocumentRequest
406
413
  })));
407
414
  }
415
+ export function chat({ authorization, messageRequest }: {
416
+ authorization: string;
417
+ messageRequest: MessageRequest;
418
+ }, opts?: Oazapfts.RequestOpts) {
419
+ return oazapfts.ok(oazapfts.fetchJson<{
420
+ status: 200;
421
+ data: SseEmitter;
422
+ }>("/v2/ai/chat", oazapfts.json({
423
+ ...opts,
424
+ method: "POST",
425
+ body: messageRequest,
426
+ headers: oazapfts.mergeHeaders(opts?.headers, {
427
+ Authorization: authorization
428
+ })
429
+ })));
430
+ }
408
431
  /**
409
432
  * Get specific Document content
410
433
  */
@@ -1,6 +1,6 @@
1
1
  import { HttpError } from '@oazapfts/runtime'
2
2
  import { getApiAddresses } from '../api-addresses'
3
- import { addFavoriteV1AgentsAgentIdFavoritePost, AgentVisibilityLevelEnum, createAgentV1AgentsPost, createToolkitToolsV1ToolkitsToolkitIdToolsPost, createToolkitV1ToolkitsPost, defaults, deleteAgentV1AgentsAgentIdDelete, deleteFavoriteV1AgentsAgentIdFavoriteDelete, deleteToolkitToolsV1ToolkitsToolkitIdToolsDelete, deleteToolkitV1ToolkitsToolkitIdDelete, editToolkitToolV1ToolkitsToolkitIdToolsToolIdPut, forkAgentV1AgentsAgentIdForkPost, forkToolkitV1ToolkitsToolkitIdForkPost, getAgentV1AgentsAgentIdGet, getPublicToolKitsV1BuiltinToolkitGet, getToolkitToolV1ToolkitsToolkitIdToolsToolIdGet, getToolkitV1ToolkitsToolkitIdGet, listAgentsUsingToolsV1ToolkitsToolkitIdToolsAgentsPost, listAgentsV1AgentsGet, listAgentsV3AgentsGet, listMultiAgentsV1AgentsMultiAgentsGet, listToolkitsV1ToolkitsGet, publishAgentV1AgentsAgentIdPublishPost, searchAgentsV1AgentsSearchPost, shareV1AgentsAgentIdSharePost, updateAgentV1AgentsAgentIdPatch, updateToolkitV1ToolkitsToolkitIdPatch, VisibilityLevelEnum } from '../api/agent-tools'
3
+ import { addFavoriteV1AgentsAgentIdFavoritePost, AgentVisibilityLevelEnum, createAgentV1AgentsPost, createToolkitToolsV1ToolkitsToolkitIdToolsPost, createToolkitV1ToolkitsPost, defaults, deleteAgentV1AgentsAgentIdDelete, deleteFavoriteV1AgentsAgentIdFavoriteDelete, deleteToolkitToolsV1ToolkitsToolkitIdToolsDelete, deleteToolkitV1ToolkitsToolkitIdDelete, editToolkitToolV1ToolkitsToolkitIdToolsToolIdPut, forkAgentV1AgentsAgentIdForkPost, forkToolkitV1ToolkitsToolkitIdForkPost, getAgentV1AgentsAgentIdGet, getPublicToolKitsV1BuiltinToolkitGet, getToolkitToolV1ToolkitsToolkitIdToolsToolIdGet, getToolkitV1ToolkitsToolkitIdGet, listAgentsUsingToolsV1ToolkitsToolkitIdToolsAgentsPost, listAgentsV1AgentsGet, listAgentsV3AgentsGet, listMultiAgentsV1AgentsMultiAgentsGet, listToolkitsV1ToolkitsGet, listToolkitsV2ToolkitsGet, publishAgentV1AgentsAgentIdPublishPost, publishToolkitV1ToolkitsToolkitIdPublishPost, searchAgentsV1AgentsSearchPost, shareV1AgentsAgentIdSharePost, updateAgentV1AgentsAgentIdPatch, updateToolkitV1ToolkitsToolkitIdPatch, VisibilityLevelEnum } from '../api/agent-tools'
4
4
  import { DefaultAPIError } from '../error/DefaultAPIError'
5
5
  import { agentToolsDictionary } from '../error/dictionary/agent-tools'
6
6
  import { StackspotAPIError } from '../error/StackspotAPIError'
@@ -12,6 +12,7 @@ import { AgentResponseWithBuiltIn, AgentToolsOpenAPIPreview, AgentVisibilityLeve
12
12
  import { workspaceAiClient } from './workspace-ai'
13
13
 
14
14
  const AGENT_DEFAULT_SLUG = 'stk_flex'
15
+ const listAgentsV3AgentsWithoutAuthorization = removeAuthorizationParam(listAgentsV3AgentsGet)
15
16
 
16
17
  class AgentToolsClient extends ReactQueryNetworkClient {
17
18
  constructor() {
@@ -57,7 +58,15 @@ class AgentToolsClient extends ReactQueryNetworkClient {
57
58
  /**
58
59
  * List agents with support for multiple filters
59
60
  */
60
- agentsMultipleFilters = this.infiniteQuery(removeAuthorizationParam(listAgentsV3AgentsGet), { pageParamName: 'filters.page' })
61
+ agentsMultipleFilters = this.infiniteQuery(listAgentsV3AgentsWithoutAuthorization, {
62
+ pageParamName: 'filters.page',
63
+ accumulator: 'items',
64
+ getNextPageParam: ({ variables, lastPage, lastPageParam }) => {
65
+ const size = variables.filters.size ?? 1
66
+ const parsedLastPageParam = (lastPageParam as number) ?? variables.filters.page ?? 1
67
+ return lastPage.items && lastPage.items.length < size ? undefined : parsedLastPageParam + 1
68
+ },
69
+ })
61
70
 
62
71
  /**
63
72
  * List agents available to be added to other agents
@@ -134,6 +143,10 @@ class AgentToolsClient extends ReactQueryNetworkClient {
134
143
  /* Get list of Toolkits
135
144
  */
136
145
  toolkits = this.query(removeAuthorizationParam(listToolkitsV1ToolkitsGet))
146
+ /**
147
+ * Get list of Toolkits V2
148
+ */
149
+ toolkitsV2 = this.query(removeAuthorizationParam(listToolkitsV2ToolkitsGet))
137
150
  /**
138
151
  * Get a toolkit by Id
139
152
  */
@@ -166,6 +179,11 @@ class AgentToolsClient extends ReactQueryNetworkClient {
166
179
  * Delete tool from Toolkit
167
180
  */
168
181
  deleteToolFromToolkit = this.mutation(removeAuthorizationParam(deleteToolkitToolsV1ToolkitsToolkitIdToolsDelete))
182
+ /**
183
+ * Publish Toolkit
184
+ */
185
+ publishToolkit = this.mutation(removeAuthorizationParam(publishToolkitV1ToolkitsToolkitIdPublishPost))
186
+
169
187
  /**
170
188
  * Previews an uploaded open api file as a stream where each array item is an OpenAPI operation.
171
189
  */
package/src/client/ai.ts CHANGED
@@ -9,7 +9,6 @@ import {
9
9
  conversationHistoryV1ConversationsConversationIdGet,
10
10
  createExecutionV1QuickCommandsCreateExecutionSlugPost,
11
11
  currentV1TokensUsageCurrentGet,
12
- currentV1TokensUsageTotalGet,
13
12
  defaults,
14
13
  deleteConversationV1ConversationsConversationIdDelete,
15
14
  deleteFavoriteV1AiStacksStackIdFavoriteDelete,
@@ -21,7 +20,9 @@ import {
21
20
  formatFetchStepV1QuickCommandsSlugStepsStepSlugFetchFormatPost,
22
21
  formatResultV1QuickCommandsSlugResultFormatPost,
23
22
  getContentDependenciesV1ContentContentTypeContentIdDependenciesGet,
23
+ getFlagsV1FlagsGet,
24
24
  getQuickCommandV1QuickCommandsSlugGet,
25
+ getScriptExecutionStatusV1QuickCommandsScriptExecutionsScriptExecutionIdGet,
25
26
  getUploadFormV1FileUploadFormPost,
26
27
  HttpValidationError,
27
28
  listAiStacksV1AiStacksGet,
@@ -38,6 +39,8 @@ import {
38
39
  resetKnowledgeObjectsV1KnowledgeSourcesSlugObjectsDelete,
39
40
  runFetchStepV1QuickCommandsSlugStepsStepSlugFetchRunPost,
40
41
  searchKnowledgeSourcesV1KnowledgeSourcesSearchPost,
42
+ startScriptStepV1QuickCommandsSlugStepsStepSlugStartScriptPost,
43
+ totalV1TokensUsageTotalGet,
41
44
  updateQuickCommandV1QuickCommandsSlugPatch,
42
45
  updateTitleV1ConversationsConversationIdPatch,
43
46
  vectorizeCustomKnowledgeSourceV1KnowledgeSourcesSlugCustomPost,
@@ -106,7 +109,7 @@ class AIClient extends ReactQueryNetworkClient {
106
109
  /**
107
110
  * Gets total tokens usage
108
111
  */
109
- totalTokensUsage = this.query(removeAuthorizationParam(currentV1TokensUsageTotalGet))
112
+ totalTokensUsage = this.query(removeAuthorizationParam(totalV1TokensUsageTotalGet))
110
113
  /**
111
114
  * Gets current tokens usage
112
115
  */
@@ -257,6 +260,18 @@ class AIClient extends ReactQueryNetworkClient {
257
260
  * Removes the resource of type Quick Command from the list of favorites.
258
261
  */
259
262
  removeFavoriteQuickCommand = this.mutation(removeAuthorizationParam(deleteFavoriteV1QuickCommandsSlugFavoriteDelete))
263
+ /**
264
+ * Lists all the feature flags for this user.
265
+ */
266
+ flags = this.query(getFlagsV1FlagsGet)
267
+ /**
268
+ * Starts the execution of a script step
269
+ */
270
+ startScriptStep = this.mutation(removeAuthorizationParam(startScriptStepV1QuickCommandsSlugStepsStepSlugStartScriptPost))
271
+ /**
272
+ * Gets the status of the execution of a script step
273
+ */
274
+ getStatusScriptStep = this.query(removeAuthorizationParam(getScriptExecutionStatusV1QuickCommandsScriptExecutionsScriptExecutionIdGet))
260
275
 
261
276
  private static async toolsOfAgent(agentId?: string) {
262
277
  try {
@@ -308,7 +323,7 @@ class AIClient extends ReactQueryNetworkClient {
308
323
  steps: info.data?.steps?.map(s => s.goal) ?? [],
309
324
  goal: info.data?.plan_goal ?? '',
310
325
  })
311
-
326
+
312
327
  info.data?.steps.forEach(s => data.steps?.push({
313
328
  id: s.id,
314
329
  type: 'step',
@@ -368,7 +383,7 @@ class AIClient extends ReactQueryNetworkClient {
368
383
  }
369
384
 
370
385
  if (info.type === 'tool' && info.action === 'awaiting_approval') {
371
- const tool = tools.find(({ id }) => id === info.data?.tool_id)
386
+ const tool = tools.find(({ id }) => id === info.data?.tool_id)
372
387
  data.steps.push({
373
388
  id: info.id,
374
389
  type: 'tool',
@@ -392,7 +407,7 @@ class AIClient extends ReactQueryNetworkClient {
392
407
  if (info.type === 'tool' && info.action === 'start') {
393
408
  const currentStep = data.steps.find(s => s.status === 'running') as StepChatStep
394
409
  if (!info.data) return
395
-
410
+
396
411
  //There might be a tool with status awaiting_approval, so we want to inform tool has already started
397
412
  if (!currentStep || !currentStep.attempts[0].tools) {
398
413
  const input = formatJson(info.data.input)
@@ -405,7 +420,7 @@ class AIClient extends ReactQueryNetworkClient {
405
420
  input: info.data?.input,
406
421
  user_question: info.data?.user_question,
407
422
  attempts: [{
408
- tools:[{ ...tool, executionId: info.id, input }],
423
+ tools: [{ ...tool, executionId: info.id, input }],
409
424
  }],
410
425
  })
411
426
  } else {
@@ -415,7 +430,7 @@ class AIClient extends ReactQueryNetworkClient {
415
430
  if (!toolInFirstAttempt) {
416
431
  const input = formatJson(info.data.input)
417
432
  const tool = tools?.find(({ id }) => id === info.data?.tool_id) ?? { id: info.data?.tool_id, name: info.data?.tool_id }
418
- currentStep.attempts[info.data.attempt-1].tools?.push({
433
+ currentStep.attempts[info.data.attempt - 1].tools?.push({
419
434
  ...tool,
420
435
  executionId: info.id,
421
436
  input,
@@ -426,8 +441,8 @@ class AIClient extends ReactQueryNetworkClient {
426
441
  toolInFirstAttempt.input = input
427
442
  } else {
428
443
  const tool = tools.find(({ id }) => id === info.data?.tool_id) ?? { id: info.data?.tool_id, name: info.data?.tool_id }
429
- currentStep.attempts[info.data.attempt-1] ??= { tools: [] }
430
- currentStep.attempts[info.data.attempt-1].tools?.push({
444
+ currentStep.attempts[info.data.attempt - 1] ??= { tools: [] }
445
+ currentStep.attempts[info.data.attempt - 1].tools?.push({
431
446
  ...tool,
432
447
  executionId: info.id,
433
448
  input,
@@ -440,7 +455,7 @@ class AIClient extends ReactQueryNetworkClient {
440
455
  if (info.type === 'tool' && info.action === 'end') {
441
456
  const currentStep = data.steps.find(s => s.status === 'running') as StepChatStep
442
457
  if (!currentStep || !info.data) return
443
- const tool = currentStep.attempts[info.data.attempt-1]?.tools?.find(t => t.executionId === info.id)
458
+ const tool = currentStep.attempts[info.data.attempt - 1]?.tools?.find(t => t.executionId === info.id)
444
459
  if (tool) {
445
460
  tool.output = formatJson(info.data.output)
446
461
  tool.duration = info.duration
@@ -4,7 +4,7 @@ import { DefaultAPIError } from '../error/DefaultAPIError'
4
4
  import { StackspotAPIError } from '../error/StackspotAPIError'
5
5
  import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
6
6
  import { removeAuthorizationParam } from '../utils/remove-authorization-param'
7
- import { associateWithWorkspaceEnvironment, createAddon, createDeployTemplate, createOrganization, createRuntime1, createTenant1, defaults, deploy, findApplicationDeploymentById, getApplicationDeploymentHealth, getApplicationDeploymentLogs, getAssociationWorkspaceEnvironmentByRuntimeId, getOrganizationById, getOrganizations, getRuntime1, getTenant1, listAddon, listApplicationDeployments, listAssociations, listDeployTemplate, listRuntimes, listRuntimes1, listTenants, listTenants1 } from '../api/cloudPlatformHorizon'
7
+ import { associateWithWorkspaceEnvironment, createAddon, createDeployTemplate, createOrganization, createRuntime1, createTenant1, defaults, deploy, findApplicationDeploymentById, getApplicationDeploymentHealth, getApplicationDeploymentLogs, getAssociationWorkspaceEnvironmentByRuntimeId, getOrganizationById, getOrganizations, getRuntime1, getTenant1, listAddon, listApplicationDeploymentRollouts, listApplicationDeployments, listAssociations, listDeployTemplate, listRuntimes, listRuntimes1, listTenants, listTenants1, postApplicationDeploymentRolloutAction } from '../api/cloudPlatformHorizon'
8
8
  import { baseDictionary } from '../error/dictionary/base'
9
9
  import { getApiAddresses } from '../api-addresses'
10
10
 
@@ -19,7 +19,7 @@ class CloudPlatformHorizonClient extends ReactQueryNetworkClient {
19
19
  /**
20
20
  * Get a list of organizations
21
21
  */
22
- listOrganizations= this.query(removeAuthorizationParam(getOrganizations))
22
+ listOrganizations = this.query(removeAuthorizationParam(getOrganizations))
23
23
  /**
24
24
  * Get organization by id
25
25
  */
@@ -27,11 +27,11 @@ class CloudPlatformHorizonClient extends ReactQueryNetworkClient {
27
27
  /**
28
28
  * Get details of an tenant
29
29
  */
30
- getTenantById= this.query(removeAuthorizationParam(getTenant1))
30
+ getTenantById = this.query(removeAuthorizationParam(getTenant1))
31
31
  /**
32
32
  * Get details of an runtime
33
33
  */
34
- getRuntimeById= this.query(removeAuthorizationParam(getRuntime1))
34
+ getRuntimeById = this.query(removeAuthorizationParam(getRuntime1))
35
35
  /**
36
36
  * Create an tenant
37
37
  */
@@ -108,6 +108,14 @@ class CloudPlatformHorizonClient extends ReactQueryNetworkClient {
108
108
  * List runtime associations to workspace's environment
109
109
  */
110
110
  listRuntimeAssociationsToEnv = this.query(removeAuthorizationParam(listAssociations))
111
+ /**
112
+ * List of application deployments rollout
113
+ */
114
+ listApplicationDeploymentRollouts = this.query(removeAuthorizationParam(listApplicationDeploymentRollouts))
115
+ /**
116
+ * Set an action to application deployment rollout
117
+ */
118
+ deployApplicationRolloutAction = this.mutation(removeAuthorizationParam(postApplicationDeploymentRolloutAction))
111
119
  }
112
120
 
113
121
  export const cloudPlatformHorizonClient = new CloudPlatformHorizonClient()
@@ -66,10 +66,19 @@ import {
66
66
  putCustomerRatingReportV1ReportsReportIdCustomerRatingPut,
67
67
  updateModuleServiceV1ModulesModuleIdPut,
68
68
  downloadSearchReposScmV2V2ReposSearchScmSearchIdDownloadGet,
69
+ moduleFavoriteServiceAddV1ModulesModuleIdFavoritesPost,
70
+ moduleFavoriteServiceDeleteV1ModulesModuleIdFavoritesDelete,
71
+ patHealthCheckV1ScmPatHealthCheckGet,
72
+ getModuleDocsV1ModulesModuleIdDocsGet,
73
+ analyticsModuleExecutionTimesReportV1AnalyticsModulesExecutionTimesGet,
74
+ analyticsModuleExecutionTimesDownloadV1AnalyticsModulesExecutionTimesDownloadGet,
75
+ createReposBatchServiceV2ReposBatchPost,
76
+ getImportResultV2ReposBatchImportIdGet,
77
+ downloadImportResultV2ReposBatchImportIdDownloadGet,
69
78
  } from '../api/codeShift'
70
79
  import { DefaultAPIError } from '../error/DefaultAPIError'
71
80
  import { codeShiftDictionary } from '../error/dictionary/code-shift'
72
- import { StackspotAPIError } from '../error/StackspotAPIError'
81
+ import { StackspotAPIError } from '../error/StackspotAPIError'
73
82
  import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
74
83
  import { removeAuthorizationParam } from '../utils/remove-authorization-param'
75
84
  import { getApiAddresses } from '../api-addresses'
@@ -91,6 +100,18 @@ class CodeShift extends ReactQueryNetworkClient {
91
100
  * Creates repositories in batch.
92
101
  */
93
102
  createRepositoriesBatch = this.mutation(removeAuthorizationParam(createReposBatchServiceV1ReposBatchPost))
103
+ /**
104
+ * Imports repositories in batch.
105
+ */
106
+ createRepositoriesBatchV2 = this.mutation(removeAuthorizationParam(createReposBatchServiceV2ReposBatchPost))
107
+ /**
108
+ * Gets the status of a batch import.
109
+ */
110
+ getImportBatchResultsV2 = this.query(removeAuthorizationParam(getImportResultV2ReposBatchImportIdGet))
111
+ /**
112
+ * Downloads the import result for a batch.
113
+ */
114
+ downloadImportBatchResultsV2 = this.query(removeAuthorizationParam(downloadImportResultV2ReposBatchImportIdDownloadGet))
94
115
  /**
95
116
  * Gets list of repositories.
96
117
  */
@@ -123,6 +144,14 @@ class CodeShift extends ReactQueryNetworkClient {
123
144
  * Gets module by id.
124
145
  */
125
146
  module = this.query(removeAuthorizationParam(getModuleV1ModulesModuleIdGet))
147
+ /**
148
+ * Add a module in favorites.
149
+ */
150
+ addFavoriteModule = this.mutation(removeAuthorizationParam(moduleFavoriteServiceAddV1ModulesModuleIdFavoritesPost))
151
+ /**
152
+ * Remove a module from favorites.
153
+ */
154
+ removeFavoriteModule = this.mutation(removeAuthorizationParam(moduleFavoriteServiceDeleteV1ModulesModuleIdFavoritesDelete))
126
155
  /**
127
156
  * Gets module inputs.
128
157
  */
@@ -139,6 +168,10 @@ class CodeShift extends ReactQueryNetworkClient {
139
168
  * Generates a report.
140
169
  */
141
170
  generateReport = this.mutation(removeAuthorizationParam(dispatchModuleServiceV1ModulesDispatchesPost))
171
+ /**
172
+ * Gets module docs.
173
+ */
174
+ moduleDocs = this.query(removeAuthorizationParam(getModuleDocsV1ModulesModuleIdDocsGet))
142
175
  /**
143
176
  * Gets repository reports.
144
177
  */
@@ -263,6 +296,10 @@ class CodeShift extends ReactQueryNetworkClient {
263
296
  * Validates a SCM URL.
264
297
  */
265
298
  validateSCMUrl = this.mutation(removeAuthorizationParam(validateScmUrlServiceV1ReposValidateScmUrlPost))
299
+ /**
300
+ * PAT Health Check
301
+ */
302
+ checkScmPatHealth = this.query(removeAuthorizationParam(patHealthCheckV1ScmPatHealthCheckGet))
266
303
  /**
267
304
  * Get Branches for a Repository
268
305
  */
@@ -379,6 +416,18 @@ class CodeShift extends ReactQueryNetworkClient {
379
416
  analyticsRepositoryTargetDetailsDownload = this.query(
380
417
  removeAuthorizationParam(analyticsRepositoryTargetDetailsDownloadV1AnalyticsRepositoriesTargetDetailsDownloadGet),
381
418
  )
419
+ /**
420
+ * Analytics Modules Execution Times
421
+ */
422
+ analyticsModulesExecutionTimes = this.query(
423
+ removeAuthorizationParam(analyticsModuleExecutionTimesReportV1AnalyticsModulesExecutionTimesGet),
424
+ )
425
+ /**
426
+ * Analytics Modules Execution Times Download
427
+ */
428
+ analyticsModulesExecutionTimesDownload = this.query(
429
+ removeAuthorizationParam(analyticsModuleExecutionTimesDownloadV1AnalyticsModulesExecutionTimesDownloadGet),
430
+ )
382
431
  }
383
432
 
384
433
  export const codeShiftClient = new CodeShift()