@stack-spot/portal-network 0.153.0-beta.2 → 0.153.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/CHANGELOG.md +2 -31
  2. package/dist/api/codeShift.d.ts +196 -99
  3. package/dist/api/codeShift.d.ts.map +1 -1
  4. package/dist/api/codeShift.js +94 -37
  5. package/dist/api/codeShift.js.map +1 -1
  6. package/dist/api/dataIntegration.d.ts +15 -2
  7. package/dist/api/dataIntegration.d.ts.map +1 -1
  8. package/dist/api/dataIntegration.js +16 -2
  9. package/dist/api/dataIntegration.js.map +1 -1
  10. package/dist/client/agent-tools.d.ts +3 -89
  11. package/dist/client/agent-tools.d.ts.map +1 -1
  12. package/dist/client/agent-tools.js +2 -133
  13. package/dist/client/agent-tools.js.map +1 -1
  14. package/dist/client/agent.d.ts +50 -5
  15. package/dist/client/agent.d.ts.map +1 -1
  16. package/dist/client/agent.js +64 -0
  17. package/dist/client/agent.js.map +1 -1
  18. package/dist/client/ai.d.ts +0 -7
  19. package/dist/client/ai.d.ts.map +1 -1
  20. package/dist/client/ai.js +1 -10
  21. package/dist/client/ai.js.map +1 -1
  22. package/dist/client/code-shift.d.ts +67 -25
  23. package/dist/client/code-shift.d.ts.map +1 -1
  24. package/dist/client/code-shift.js +73 -30
  25. package/dist/client/code-shift.js.map +1 -1
  26. package/dist/client/data-integration.d.ts +22 -0
  27. package/dist/client/data-integration.d.ts.map +1 -1
  28. package/dist/client/data-integration.js +19 -1
  29. package/dist/client/data-integration.js.map +1 -1
  30. package/dist/client/types.d.ts +4 -5
  31. package/dist/client/types.d.ts.map +1 -1
  32. package/package.json +1 -1
  33. package/readme.md +1 -1
  34. package/src/api/account.ts +0 -1
  35. package/src/api/agent-tools.ts +0 -3
  36. package/src/api/agent.ts +0 -2
  37. package/src/api/codeShift.ts +481 -246
  38. package/src/api/dataIntegration.ts +35 -3
  39. package/src/api/notification.ts +0 -2
  40. package/src/client/agent-tools.ts +3 -102
  41. package/src/client/agent.ts +68 -0
  42. package/src/client/ai.ts +0 -6
  43. package/src/client/code-shift.ts +57 -19
  44. package/src/client/data-integration.ts +11 -0
  45. package/src/client/types.ts +5 -7
@@ -102,7 +102,7 @@ export type KnowledgeSourceItemResponse = {
102
102
  object_count: number;
103
103
  use_only: boolean;
104
104
  };
105
- export type ExceptionType = "DATAINTEGRATION_1000_INVALID_JWT" | "DATAINTEGRATION_1001_DECODE_JWT_ERROR" | "DATAINTEGRATION_1002_KNOWLEDGE_SOURCE_DOES_NOT_EXISTS" | "DATAINTEGRATION_1003_KNOWLEDGE_SOURCE_WRONG_TYPE" | "DATAINTEGRATION_1004_UNSUPPORTED_KNOWLEDGE_SOURCE_TYPE_FOR_UPLOAD" | "DATAINTEGRATION_1005_KNOWLEDGE_OBJECT_NOT_FOUND" | "DATAINTEGRATION_1006_UNSUPPORTED_FILE_TYPE" | "DATAINTEGRATION_1007_KNOWLEDGE_SOURCE_SLUG_ALREADY_EXISTS" | "DATAINTEGRATION_1008_KNOWLEDGE_SOURCE_NOT_FOUND" | "DATAINTEGRATION_1009_KNOWLEDGE_SOURCE_CANNOT_BE_ASSOCIATED" | "DATAINTEGRATION_1010_KNOWLEDGE_SOURCE_NOT_ACCOUNT_VISIBLE" | "DATAINTEGRATION_1011_ACCOUNT_SETTINGS_NOT_FOUND" | "DATAINTEGRATION_1012_SECRET_NOT_FOUND" | "DATAINTEGRATION_1013_STRATEGY_NOT_FOUND" | "DATAINTEGRATION_1014_EMBEDDING_INTEGRATION_ERROR" | "DATAINTEGRATION_1015_KNOWLEDGE_OBJECT_UNEXPECTED_ERROR" | "DATAINTEGRATION_1016_FILE_UPLOAD_DOES_NOT_EXISTS" | "DATAINTEGRATION_1017_INVALID_VISIBILITY_CHANGE" | "DATAINTEGRATION_1018_TOKENS_USAGE_LIMIT_REACHED" | "DATAINTEGRATION_1019_KNOWLEDGE_SOURCE_INVALID_SPLIT_STRATEGY" | "DATAINTEGRATION_1020_FILE_UPLOAD_INVALID_SPLIT_STRATEGY" | "DATAINTEGRATION_1021_FILE_UPLOAD_INDEXED_OR_NOT_SPLITTED" | "DATAINTEGRATION_1022_KNOWLEDGE_GROUP_NOT_FOUND" | "DATAINTEGRATION_2000_LLM_INTEGRATION_ERROR" | "DATAINTEGRATION_2001_LLM_RATE_LIMIT_ERROR" | "DATAINTEGRATION_2002_LLM_PROMPT_TOO_LARGE_ERROR" | "DATAINTEGRATION_2003_LLM_FILE_TOO_LARGE_ERROR" | "DATAINTEGRATION_3000_FEATURE_DISABLED_ERROR" | "DATAINTEGRATION_5000_UNEXPECTED_ERROR" | "DATAINTEGRATION_6000_FORBIDDEN" | "DATAINTEGRATION_8001_ACCOUNT_API_ERROR" | "DATAINTEGRATION_4001_FAVORITE_ALREADY_EXISTS" | "DATAINTEGRATION_4002_FAVORITE_NOT_FOUND";
105
+ export type ExceptionType = "DATAINTEGRATION_1000_INVALID_JWT" | "DATAINTEGRATION_1001_DECODE_JWT_ERROR" | "DATAINTEGRATION_1002_KNOWLEDGE_SOURCE_DOES_NOT_EXISTS" | "DATAINTEGRATION_1003_KNOWLEDGE_SOURCE_WRONG_TYPE" | "DATAINTEGRATION_1004_UNSUPPORTED_KNOWLEDGE_SOURCE_TYPE_FOR_UPLOAD" | "DATAINTEGRATION_1005_KNOWLEDGE_OBJECT_NOT_FOUND" | "DATAINTEGRATION_1006_UNSUPPORTED_FILE_TYPE" | "DATAINTEGRATION_1007_KNOWLEDGE_SOURCE_SLUG_ALREADY_EXISTS" | "DATAINTEGRATION_1008_KNOWLEDGE_SOURCE_NOT_FOUND" | "DATAINTEGRATION_1009_KNOWLEDGE_SOURCE_CANNOT_BE_ASSOCIATED" | "DATAINTEGRATION_1010_KNOWLEDGE_SOURCE_NOT_ACCOUNT_VISIBLE" | "DATAINTEGRATION_1011_ACCOUNT_SETTINGS_NOT_FOUND" | "DATAINTEGRATION_1012_SECRET_NOT_FOUND" | "DATAINTEGRATION_1013_STRATEGY_NOT_FOUND" | "DATAINTEGRATION_1014_EMBEDDING_INTEGRATION_ERROR" | "DATAINTEGRATION_1015_KNOWLEDGE_OBJECT_UNEXPECTED_ERROR" | "DATAINTEGRATION_1016_FILE_UPLOAD_DOES_NOT_EXISTS" | "DATAINTEGRATION_1017_INVALID_VISIBILITY_CHANGE" | "DATAINTEGRATION_1018_TOKENS_USAGE_LIMIT_REACHED" | "DATAINTEGRATION_1019_KNOWLEDGE_SOURCE_INVALID_SPLIT_STRATEGY" | "DATAINTEGRATION_1020_FILE_UPLOAD_INVALID_SPLIT_STRATEGY" | "DATAINTEGRATION_1021_FILE_UPLOAD_INDEXED_OR_NOT_SPLITTED" | "DATAINTEGRATION_1022_KNOWLEDGE_GROUP_NOT_FOUND" | "DATAINTEGRATION_1023_FILE_UPLOAD_UNSUPPORTED_TARGET" | "DATAINTEGRATION_2000_LLM_INTEGRATION_ERROR" | "DATAINTEGRATION_2001_LLM_RATE_LIMIT_ERROR" | "DATAINTEGRATION_2002_LLM_PROMPT_TOO_LARGE_ERROR" | "DATAINTEGRATION_2003_LLM_FILE_TOO_LARGE_ERROR" | "DATAINTEGRATION_3000_FEATURE_DISABLED_ERROR" | "DATAINTEGRATION_5000_UNEXPECTED_ERROR" | "DATAINTEGRATION_6000_FORBIDDEN" | "DATAINTEGRATION_8001_ACCOUNT_API_ERROR" | "DATAINTEGRATION_4001_FAVORITE_ALREADY_EXISTS" | "DATAINTEGRATION_4002_FAVORITE_NOT_FOUND";
106
106
  export type HttpErrorResponse = {
107
107
  "type"?: string;
108
108
  status: string;
@@ -144,6 +144,9 @@ export type KnowledgeObjectResponse = {
144
144
  [key: string]: any;
145
145
  } | null;
146
146
  };
147
+ export type KnowledgeObjectChecksumResponse = {
148
+ checksum: string;
149
+ };
147
150
  export type KnowledgeSourceLastMessageResponse = {
148
151
  id: string;
149
152
  prompt_content: string;
@@ -890,10 +893,11 @@ export function forkKsV1KnowledgeSourcesSlugForkPost({ slug, xAccountId, xUserna
890
893
  /**
891
894
  * List Kos
892
895
  */
893
- export function listKosV1KnowledgeSourcesKsSlugObjectsGet({ ksSlug, standalone, filePath, xAccountId, xUsername, authorization }: {
896
+ export function listKosV1KnowledgeSourcesKsSlugObjectsGet({ ksSlug, standalone, filePath, contentLimit, xAccountId, xUsername, authorization }: {
894
897
  ksSlug: string;
895
898
  standalone?: boolean | null;
896
899
  filePath?: string[];
900
+ contentLimit?: number | null;
897
901
  xAccountId?: string | null;
898
902
  xUsername?: string | null;
899
903
  authorization: string;
@@ -909,7 +913,8 @@ export function listKosV1KnowledgeSourcesKsSlugObjectsGet({ ksSlug, standalone,
909
913
  data: HttpValidationError;
910
914
  }>(`/v1/knowledge-sources/${encodeURIComponent(ksSlug)}/objects${QS.query(QS.explode({
911
915
  standalone,
912
- file_path: filePath
916
+ file_path: filePath,
917
+ content_limit: contentLimit
913
918
  }))}`, {
914
919
  ...opts,
915
920
  headers: oazapfts.mergeHeaders(opts?.headers, {
@@ -952,6 +957,33 @@ export function resetKosV1KnowledgeSourcesKsSlugObjectsDelete({ ksSlug, standalo
952
957
  })
953
958
  }));
954
959
  }
960
+ /**
961
+ * List Kos Checksums
962
+ */
963
+ export function listKosChecksumsV1KnowledgeSourcesKsSlugObjectsChecksumsGet({ ksSlug, xAccountId, xUsername, authorization }: {
964
+ ksSlug: string;
965
+ xAccountId?: string | null;
966
+ xUsername?: string | null;
967
+ authorization: string;
968
+ }, opts?: Oazapfts.RequestOpts) {
969
+ return oazapfts.ok(oazapfts.fetchJson<{
970
+ status: 200;
971
+ data: KnowledgeObjectChecksumResponse[];
972
+ } | {
973
+ status: 404;
974
+ data: HttpErrorResponse;
975
+ } | {
976
+ status: 422;
977
+ data: HttpValidationError;
978
+ }>(`/v1/knowledge-sources/${encodeURIComponent(ksSlug)}/objects/checksums`, {
979
+ ...opts,
980
+ headers: oazapfts.mergeHeaders(opts?.headers, {
981
+ "x-account-id": xAccountId,
982
+ "x-username": xUsername,
983
+ authorization
984
+ })
985
+ }));
986
+ }
955
987
  /**
956
988
  * Vectorize Snippet Ks
957
989
  */
@@ -332,5 +332,3 @@ export function delete1({ notificationIntentId }: {
332
332
  method: "DELETE"
333
333
  }));
334
334
  }
335
-
336
-
@@ -1,15 +1,12 @@
1
1
  import { HttpError } from '@oazapfts/runtime'
2
- import { addFavoriteV1AgentsAgentIdFavoritePost, AgentVisibilityLevelEnum, createAgentV1AgentsPost, createToolkitToolsV1ToolkitsToolkitIdToolsPost, createToolkitV1ToolkitsPost, defaults, deleteAgentV1AgentsAgentIdDelete, deleteToolkitToolsV1ToolkitsToolkitIdToolsDelete, deleteToolkitV1ToolkitsToolkitIdDelete, editToolkitToolV1ToolkitsToolkitIdToolsToolIdPut, forkToolkitV1ToolkitsToolkitIdForkPost, getAgentV1AgentsAgentIdGet, getPublicToolKitsV1BuiltinToolkitGet, getToolkitToolV1ToolkitsToolkitIdToolsToolIdGet, getToolkitV1ToolkitsToolkitIdGet, HttpValidationError, listAgentsUsingToolsV1ToolkitsToolkitIdToolsAgentsPost, listAgentsV1AgentsGet, listToolkitsV1ToolkitsGet, publishAgentV1AgentsAgentIdPublishPost, searchAgentsV1AgentsSearchPost, updateAgentV1AgentsAgentIdPut, updateToolkitV1ToolkitsToolkitIdPatch, VisibilityLevelEnum } from '../api/agent-tools'
2
+ import { createToolkitToolsV1ToolkitsToolkitIdToolsPost, createToolkitV1ToolkitsPost, defaults, deleteToolkitToolsV1ToolkitsToolkitIdToolsDelete, deleteToolkitV1ToolkitsToolkitIdDelete, editToolkitToolV1ToolkitsToolkitIdToolsToolIdPut, forkToolkitV1ToolkitsToolkitIdForkPost, getPublicToolKitsV1BuiltinToolkitGet, getToolkitToolV1ToolkitsToolkitIdToolsToolIdGet, getToolkitV1ToolkitsToolkitIdGet, HttpValidationError, listAgentsUsingToolsV1ToolkitsToolkitIdToolsAgentsPost, listToolkitsV1ToolkitsGet, updateToolkitV1ToolkitsToolkitIdPatch } from '../api/agent-tools'
3
3
  import apis from '../apis.json'
4
4
  import { StackspotAPIError } from '../error/StackspotAPIError'
5
5
  import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
6
6
  import { FetchEventStream } from '../network/types'
7
7
  import { removeAuthorizationParam } from '../utils/remove-authorization-param'
8
8
  import { StreamedArray } from '../utils/StreamedArray'
9
- import { AgentResponseWithBuiltIn, AgentToolsOpenAPIPreview, AgentVisibilityLevel } from './types'
10
- import { workspaceAiClient } from './workspace-ai'
11
-
12
- const AGENT_DEFAULT_SLUG = 'stk_code_buddy'
9
+ import { AgentToolsOpenAPIPreview } from './types'
13
10
 
14
11
  class AgentToolsClient extends ReactQueryNetworkClient {
15
12
  constructor() {
@@ -29,104 +26,8 @@ class AgentToolsClient extends ReactQueryNetworkClient {
29
26
  tools = this.query(removeAuthorizationParam(getPublicToolKitsV1BuiltinToolkitGet))
30
27
 
31
28
  /**
32
- * Create agent
33
- */
34
- createAgent = this.mutation(removeAuthorizationParam(createAgentV1AgentsPost))
35
-
36
- /**
37
- * Delete agent
38
- */
39
- deleteAgent = this.mutation(deleteAgentV1AgentsAgentIdDelete)
40
-
41
- /**
42
- * Updates an agent
43
- */
44
- updateAgent = this.mutation(updateAgentV1AgentsAgentIdPut)
45
-
46
- /**
47
- * Favorite an agent
48
- */
49
- favoriteAgent = this.mutation(addFavoriteV1AgentsAgentIdFavoritePost)
50
-
51
- /**
52
- * Publish an agent
53
- */
54
- publishAgent = this.mutation(publishAgentV1AgentsAgentIdPublishPost)
55
-
56
- /**
57
- * List agents
58
- */
59
- agents = this.infiniteQuery(removeAuthorizationParam(listAgentsV1AgentsGet))
60
-
61
- /**
62
- * Gets agent by id
63
- */
64
- agent = this.query(removeAuthorizationParam(getAgentV1AgentsAgentIdGet))
65
-
66
- /**
67
- * Gets agents by ids
68
- */
69
- agentsByIds = this.query(removeAuthorizationParam(searchAgentsV1AgentsSearchPost))
70
-
71
- /**
72
- * Gets the default agent slug
73
- */
74
- agentDefaultSlug = AGENT_DEFAULT_SLUG
75
-
76
- /**
77
- * Gets the default agent
78
- */
79
- agentDefault = this.query({
80
- name: 'agentDefault',
81
- request: async (signal) => {
82
- const agentDefault = await listAgentsV1AgentsGet(
83
- { visibility: 'built_in', slug: this.agentDefaultSlug, authorization: '' }, { signal },
84
- )
85
-
86
- const agentId = agentDefault.at(0)?.id
87
- const agent = agentId ? await this.agent.query({ agentId }) : undefined
88
- return agent
89
- },
90
- })
91
-
92
- /**
93
- * List agents filtered by visibility.
29
+ * Get list of Toolkits
94
30
  */
95
- allAgents = this.query({
96
- name: 'allAgents',
97
- request: async (signal, variables: { visibilities: (AgentVisibilityLevel | 'all')[] }) => {
98
- const allVisibilities = ['account', 'built_in', 'favorite', 'personal', 'shared', 'workspace'] as const
99
- const visibilities = variables.visibilities.includes('all')
100
- ? allVisibilities
101
- : variables.visibilities as Array<AgentVisibilityLevelEnum | VisibilityLevelEnum>
102
-
103
- const shouldFetchWorkspaceAgents = visibilities.includes('workspace')
104
-
105
- const workspaceAgentsPromise = shouldFetchWorkspaceAgents
106
- ? workspaceAiClient.workspacesContentsByType.query({ contentType: 'agent' })
107
- : Promise.resolve([])
108
-
109
- const [workspaceAgents, ...agentsByVisibility] = await Promise.all([
110
- workspaceAgentsPromise,
111
- ...visibilities.map((visibility) => listAgentsV1AgentsGet({ visibility, authorization: '' }, { signal })),
112
- ])
113
-
114
- const workspaceAgentsWithSpaceName = workspaceAgents.flatMap(({ agents, space_name }) =>
115
- agents?.map((agent) => ({ ...agent, spaceName: space_name, builtIn: false }))) as AgentResponseWithBuiltIn[]
116
-
117
- const allAgents: AgentResponseWithBuiltIn[] = workspaceAgentsWithSpaceName ?? []
118
-
119
- agentsByVisibility.forEach(agents => allAgents.push(...agents.map(agent => ({
120
- ...agent,
121
- builtIn: agent?.visibility_level === 'built_in',
122
- }))))
123
-
124
- return allAgents
125
- },
126
- })
127
-
128
- /* Get list of Toolkits
129
- */
130
31
  toolkits = this.query(removeAuthorizationParam(listToolkitsV1ToolkitsGet))
131
32
  /**
132
33
  * Get a toolkit by Id
@@ -2,10 +2,15 @@ import { HttpError } from '@oazapfts/runtime'
2
2
  import {
3
3
  defaults, deleteV1AgentByAgentIdFavorite, getV1AgentByAgentId, getV1Agents, getV1PublicAgentByAgentId, getV1PublicAgents,
4
4
  postV1AgentByAgentIdFavorite, putV1AgentByAgentId,
5
+ VisibilityLevel,
5
6
  } from '../api/agent'
6
7
  import apis from '../apis.json'
7
8
  import { StackspotAPIError } from '../error/StackspotAPIError'
8
9
  import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
10
+ import { AgentResponseWithBuiltIn, AgentVisibilityLevel } from './types'
11
+ import { workspaceAiClient } from './workspace-ai'
12
+
13
+ export const isAgentDefault = (agentSlug?: string) => agentSlug === 'stk_code_buddy'
9
14
 
10
15
  interface AgentError {
11
16
  code?: string,
@@ -31,6 +36,57 @@ class AgentClient extends ReactQueryNetworkClient {
31
36
  })
32
37
  }
33
38
 
39
+ /**
40
+ * List agents filtered by visibility.
41
+ */
42
+ allAgents = this.query({
43
+ name: 'allAgents',
44
+ request: async (signal, variables: { visibilities: AgentVisibilityLevel[] }) => {
45
+ const visibilities: VisibilityLevel[] = variables.visibilities.includes('ALL')
46
+ ? ['PERSONAL', 'SHARED', 'WORKSPACE', 'ACCOUNT', 'FAVORITE']
47
+ : variables.visibilities.filter((visibility) => visibility !== 'BUILT-IN' && visibility !== 'ALL') as VisibilityLevel[]
48
+
49
+ const shouldIncludeBuiltInAgent = variables.visibilities.includes('ALL') || variables.visibilities.includes('BUILT-IN')
50
+ const shouldFetchBuiltInAgent = shouldIncludeBuiltInAgent || variables.visibilities.includes('FAVORITE')
51
+ const shouldFetchWorkspaceAgents = variables.visibilities.includes('ALL') || variables.visibilities.includes('WORKSPACE')
52
+
53
+ const publicAgentsPromise = shouldFetchBuiltInAgent ? getV1PublicAgents({}, { signal }) : Promise.resolve([])
54
+ const workspaceAgentsPromise = shouldFetchWorkspaceAgents
55
+ ? workspaceAiClient.workspacesContentsByType.query({ contentType: 'agent' })
56
+ : Promise.resolve([])
57
+
58
+ const [publicAgents, workspaceAgents, ...agentsByVisibility] = await Promise.all([
59
+ publicAgentsPromise,
60
+ workspaceAgentsPromise,
61
+ ...visibilities.map((visibility) => getV1Agents({ visibility }, { signal })),
62
+ ])
63
+
64
+ const workspaceAgentsWithSpaceName = workspaceAgents?.flatMap(({ agents, space_name }) =>
65
+ agents?.map((agent) => ({
66
+ ...agent,
67
+ spaceName: space_name,
68
+ builtIn: publicAgents?.some(publicAgent => publicAgent.id === agent.id),
69
+ }))) as AgentResponseWithBuiltIn[]
70
+
71
+ const allAgents: AgentResponseWithBuiltIn[] = workspaceAgentsWithSpaceName || []
72
+
73
+ if (shouldIncludeBuiltInAgent) {
74
+ const builtInsAgents = publicAgents?.map((agent) => ({ ...agent, builtIn: true, visibility_level: 'BUILT-IN' }))
75
+ // @ts-ignore fixme: above, BUILT-IN is not a valid value for the enum VisibilityLevel.
76
+ allAgents.push(...builtInsAgents)
77
+ }
78
+
79
+ agentsByVisibility.forEach(agents => {
80
+ allAgents.push(...agents.map(agent => ({
81
+ ...agent,
82
+ builtIn: publicAgents?.some(publicAgent => publicAgent.id === agent.id),
83
+ })))
84
+ })
85
+
86
+ return allAgents
87
+ },
88
+ })
89
+
34
90
  /**
35
91
  * Gets an agent by id
36
92
  */
@@ -41,6 +97,18 @@ class AgentClient extends ReactQueryNetworkClient {
41
97
  : getV1AgentByAgentId({ ...variables }, { signal }),
42
98
  })
43
99
 
100
+ /**
101
+ * Gets the default agent
102
+ */
103
+ agentDefault = this.query({
104
+ name: 'agentDefault',
105
+ request: async (signal) => {
106
+ const publicAgents = await getV1PublicAgents({}, { signal })
107
+ const agentDefault = publicAgents.find((agent) => isAgentDefault(agent.slug))
108
+ return agentDefault ? { ...agentDefault, builtIn: true } : undefined
109
+ },
110
+ })
111
+
44
112
  /**
45
113
  * List commons agents
46
114
  */
package/src/client/ai.ts CHANGED
@@ -33,7 +33,6 @@ import {
33
33
  quickCommandsRunV2V2QuickCommandsSlugStepsStepSlugRunPost,
34
34
  resetKnowledgeObjectsV1KnowledgeSourcesSlugObjectsDelete,
35
35
  runFetchStepV1QuickCommandsSlugStepsStepSlugFetchRunPost,
36
- searchKnowledgeSourcesV1KnowledgeSourcesSearchPost,
37
36
  updateQuickCommandV1QuickCommandsSlugPatch,
38
37
  updateTitleV1ConversationsConversationIdPatch,
39
38
  vectorizeCustomKnowledgeSourceV1KnowledgeSourcesSlugCustomPost,
@@ -135,10 +134,6 @@ class AIClient extends ReactQueryNetworkClient {
135
134
  * Gets a knowledge source document by the slug of the parent knowledge source and the document id.
136
135
  */
137
136
  knowledgeSourceDocument = this.query(removeAuthorizationParam(findKnowledgeObjectByCustomIdV1KnowledgeSourcesSlugObjectsCustomIdGet))
138
- /**
139
- * Lists knowledge sources matching the provided IDs.
140
- */
141
- searchKnowledgeSources = this.query(removeAuthorizationParam(searchKnowledgeSourcesV1KnowledgeSourcesSearchPost))
142
137
  /**
143
138
  * Gets the chat history. This is a paginated resource.
144
139
  */
@@ -376,4 +371,3 @@ class AIClient extends ReactQueryNetworkClient {
376
371
  }
377
372
 
378
373
  export const aiClient = new AIClient()
379
-
@@ -3,12 +3,15 @@ import { HttpError } from '@oazapfts/runtime'
3
3
  import {
4
4
  checkRoleRouteV1RolesRoleGet,
5
5
  createAccountSettingsV1SettingsPut,
6
+ createApplicationsBatchServiceV1ApplicationsBatchPost,
7
+ createApplicationServiceV1ApplicationsPost,
6
8
  createIntegrationServiceV1IntegrationsPost,
7
9
  createModuleServiceV1ModulesPost,
8
10
  createProgramGroupServiceV1ProgramGroupsPost,
9
11
  createReposBatchServiceV1ReposBatchPost,
10
12
  createRepositoryServiceV1ReposPost,
11
13
  defaults,
14
+ deleteApplicationServiceV1ApplicationsApplicationIdDelete,
12
15
  deleteIntegrationServiceV1IntegrationsIntegrationIdDelete,
13
16
  deleteProgramGroupServiceV1ProgramGroupsProgramGroupIdDelete,
14
17
  deleteRepositoryServiceV1ReposRepositoryIdDelete,
@@ -16,12 +19,14 @@ import {
16
19
  downloadReportV1ReportsReportIdDownloadGet,
17
20
  downloadSearchReposScmServiceV1ReposSearchScmSearchRepoIdDownloadGet,
18
21
  getAccountSettingsV1SettingsGet,
22
+ getApplicationByIdServiceV1ApplicationsApplicationIdGet,
19
23
  getIntegrationByIdServiceV1IntegrationsIntegrationIdGet,
20
24
  getProgramGroupByIdServiceV1ProgramGroupsProgramGroupIdGet,
21
- getReportPullRequestContentV1ReportsReportIdPullRequestGet,
22
25
  getReportV1ReportsReportIdGet,
23
26
  getRepositoryByIdServiceV1ReposRepositoryIdGet,
24
27
  getStatusSearchReposScmServiceV1ReposSearchScmSearchRepoIdStatusGet,
28
+ listApplicationReportV1ApplicationsApplicationIdReportsGet,
29
+ listApplicationServiceV1ApplicationsGet,
25
30
  listIntegrationServiceV1IntegrationsGet,
26
31
  listModulesServiceV1ModulesGet,
27
32
  listProgramGroupReportServiceV1ProgramGroupsProgramGroupIdReportsGet,
@@ -30,11 +35,10 @@ import {
30
35
  listRepositoryServiceV1ReposGet,
31
36
  listTagsServiceV1TagsGet,
32
37
  searchReposScmServiceV1ReposSearchScmGet,
38
+ updateApplicationServiceV1ApplicationsApplicationIdPut,
33
39
  updateIntegrationServiceV1IntegrationsIntegrationIdPut,
34
- updateProgramGroupComponentsServiceV1ProgramGroupsProgramGroupIdComponentsPut,
35
40
  updateProgramGroupServiceV1ProgramGroupsProgramGroupIdPut,
36
41
  updateRepositoryServiceV1ReposRepositoryIdPut,
37
- validateScmUrlServiceV1ReposValidateScmUrlPost,
38
42
  } from '../api/codeShift'
39
43
  import apis from '../apis.json'
40
44
  import { DefaultAPIError } from '../error/DefaultAPIError'
@@ -52,6 +56,36 @@ class CodeShift extends ReactQueryNetworkClient {
52
56
  return new DefaultAPIError(error.data, error.status, codeShiftDictionary, error.headers)
53
57
  }
54
58
 
59
+ /**
60
+ * @deprecated use createRepository instead
61
+ * Creates a code shift application.
62
+ */
63
+ createApplication = this.mutation(removeAuthorizationParam(createApplicationServiceV1ApplicationsPost))
64
+ /**
65
+ * @deprecated use createRepositoriesBatch instead
66
+ * Creates a code shift application in batch.
67
+ */
68
+ createApplicationBatch = this.mutation(removeAuthorizationParam(createApplicationsBatchServiceV1ApplicationsBatchPost))
69
+ /**
70
+ * @deprecated use repositories instead
71
+ * Gets code shift applications.
72
+ */
73
+ applications = this.query(removeAuthorizationParam(listApplicationServiceV1ApplicationsGet))
74
+ /**
75
+ * @deprecated use repository instead
76
+ * Gets code shift application
77
+ */
78
+ application = this.query(removeAuthorizationParam(getApplicationByIdServiceV1ApplicationsApplicationIdGet))
79
+ /**
80
+ * @deprecated use updateRepository instead
81
+ * Updates a code shift application
82
+ */
83
+ updateApplication = this.mutation(removeAuthorizationParam(updateApplicationServiceV1ApplicationsApplicationIdPut))
84
+ /**
85
+ * @deprecated use deleteRepository instead
86
+ * Deletes a code shift application.
87
+ */
88
+ deleteImportedApp = this.mutation(removeAuthorizationParam(deleteApplicationServiceV1ApplicationsApplicationIdDelete))
55
89
  /**
56
90
  * Creates a repository.
57
91
  */
@@ -76,10 +110,6 @@ class CodeShift extends ReactQueryNetworkClient {
76
110
  * Updates a repository
77
111
  */
78
112
  updateRepository = this.mutation(removeAuthorizationParam(updateRepositoryServiceV1ReposRepositoryIdPut))
79
- /**
80
- * Get a report for a pull request by id.
81
- */
82
- getReportPullRequestContent = this.query(removeAuthorizationParam(getReportPullRequestContentV1ReportsReportIdPullRequestGet))
83
113
  /**
84
114
  * Gets modules.
85
115
  */
@@ -92,6 +122,11 @@ class CodeShift extends ReactQueryNetworkClient {
92
122
  * Generates a report.
93
123
  */
94
124
  generateReport = this.mutation(removeAuthorizationParam(dispatchModuleServiceV1ModulesDispatchesPost))
125
+ /**
126
+ * @deprecated use repositoryReports instead
127
+ * Gets reports.
128
+ */
129
+ reports = this.query(removeAuthorizationParam(listApplicationReportV1ApplicationsApplicationIdReportsGet))
95
130
  /**
96
131
  * Gets repository reports.
97
132
  */
@@ -129,64 +164,67 @@ class CodeShift extends ReactQueryNetworkClient {
129
164
  * We do not use opa in this api, so this is the fn needed to check permissions.
130
165
  */
131
166
  validateRolePermissions = this.query(removeAuthorizationParam(checkRoleRouteV1RolesRoleGet))
167
+
132
168
  /**
133
169
  * Creates an integration
134
170
  */
135
171
  createIntegration = this.mutation(removeAuthorizationParam(createIntegrationServiceV1IntegrationsPost))
172
+
136
173
  /**
137
174
  * Lists integrations
138
175
  */
139
176
  listIntegration = this.query(removeAuthorizationParam(listIntegrationServiceV1IntegrationsGet))
177
+
140
178
  /**
141
179
  * Gets an integration by id
142
180
  */
143
181
  getIntegrationById = this.query(removeAuthorizationParam(getIntegrationByIdServiceV1IntegrationsIntegrationIdGet))
182
+
144
183
  /**
145
184
  * Updates an integration
146
185
  */
147
186
  updateIntegration = this.mutation(removeAuthorizationParam(updateIntegrationServiceV1IntegrationsIntegrationIdPut))
187
+
148
188
  /**
149
189
  * Deletes an integration
150
190
  */
151
191
  deleteIntegration = this.mutation(removeAuthorizationParam(deleteIntegrationServiceV1IntegrationsIntegrationIdDelete))
192
+
152
193
  /**
153
194
  * Creates a program group.
154
195
  */
155
196
  createProgramGroup = this.mutation(removeAuthorizationParam(createProgramGroupServiceV1ProgramGroupsPost))
197
+
156
198
  /**
157
199
  * Gets list of program groups.
158
200
  */
159
201
  listProgramGroups = this.query(removeAuthorizationParam(listProgramGroupServiceV1ProgramGroupsGet))
202
+
160
203
  /**
161
204
  * Gets a program group by id.
162
205
  */
163
206
  getProgramGroupById = this.query(removeAuthorizationParam(getProgramGroupByIdServiceV1ProgramGroupsProgramGroupIdGet))
207
+
164
208
  /**
165
- * List Program Group Report Service
166
- */
209
+ * List Program Group Report Service
210
+ */
167
211
  listProgramGroupReport = this.query(removeAuthorizationParam(listProgramGroupReportServiceV1ProgramGroupsProgramGroupIdReportsGet))
212
+
168
213
  /**
169
214
  * Updates a program group.
170
215
  */
171
216
  updateProgramGroup = this.mutation(removeAuthorizationParam(updateProgramGroupServiceV1ProgramGroupsProgramGroupIdPut))
172
- /**
173
- * Updates a program group components.
174
- */
175
- updateProgramGroupComponents = this.mutation(
176
- removeAuthorizationParam(updateProgramGroupComponentsServiceV1ProgramGroupsProgramGroupIdComponentsPut),
177
- )
217
+
178
218
  /**
179
219
  * Deletes a program group.
180
220
  */
181
221
  deleteProgramGroup = this.mutation(removeAuthorizationParam(deleteProgramGroupServiceV1ProgramGroupsProgramGroupIdDelete))
222
+
182
223
  /**
183
224
  * Gets list of tags.
184
225
  */
185
226
  tags = this.query(removeAuthorizationParam(listTagsServiceV1TagsGet))
186
- /**
187
- * Validates a SCM URL.
188
- */
189
- validateSCMUrl = this.mutation(removeAuthorizationParam(validateScmUrlServiceV1ReposValidateScmUrlPost))
227
+
190
228
  }
191
229
 
192
230
  export const codeShiftClient = new CodeShift()
@@ -4,8 +4,10 @@ import {
4
4
  defaults,
5
5
  deleteFavoriteV1KnowledgeSourcesSlugFavoriteDelete,
6
6
  FileUploadType,
7
+ findKoByIdV1KnowledgeSourcesKsSlugObjectsKoIdGet,
7
8
  getFileUploadStatusV1FileUploadFileUploadIdGet,
8
9
  getUploadFormV2V2FileUploadFormPost,
10
+ listKosV1KnowledgeSourcesKsSlugObjectsGet,
9
11
  listKsV1KnowledgeSourcesGet,
10
12
  saveChunkedFilesDeprecatedV1FileUploadFileUploadIdPost,
11
13
  saveChunkedFilesV1FileUploadFileUploadIdKnowledgeObjectsPost,
@@ -84,6 +86,15 @@ class DataIntegrationClient extends ReactQueryNetworkClient {
84
86
  * Removes the resource of type Knowledge Source from the list of favorites.
85
87
  */
86
88
  removeFavoriteKnowledgeSource = this.mutation(removeAuthorizationParam(deleteFavoriteV1KnowledgeSourcesSlugFavoriteDelete))
89
+ /**
90
+ * List knowledge objects from a knowledge source
91
+ */
92
+ listKnowledgeObjects = this.query(removeAuthorizationParam(listKosV1KnowledgeSourcesKsSlugObjectsGet))
93
+ /**
94
+ * Get a knowledge object by id
95
+ */
96
+ getKnowledgeObjectById = this.query(removeAuthorizationParam(findKoByIdV1KnowledgeSourcesKsSlugObjectsKoIdGet))
97
+
87
98
 
88
99
  uploadFiles = this.mutation({
89
100
  name: 'uploadFiles',
@@ -1,6 +1,7 @@
1
1
  import { RequestOpts } from '@oazapfts/runtime'
2
2
  import { AccountScmInfoSaveRequest, AccountScmInfoUpdateRequest, AccountScmStatusResponse, GroupsFromResourceResponse, MembersFromResourceResponse } from '../api/account'
3
- import { AgentVisibilityLevelEnum, HttpMethod, ListAgentResponse, VisibilityLevelEnum } from '../api/agent-tools'
3
+ import { AgentResponse, VisibilityLevel } from '../api/agent'
4
+ import { HttpMethod } from '../api/agent-tools'
4
5
  import { ChatRequest, ChatResponse3, ContentDependencyResponse, ConversationHistoryResponse, ConversationResponse, DependencyResponse } from '../api/ai'
5
6
  import { ConnectAccountRequestV2, ManagedAccountProvisionRequest } from '../api/cloudAccount'
6
7
  import { AllocationCostRequest, AllocationCostResponse, ChargePeriod, getAllocationCostFilters, ManagedService, ServiceResource } from '../api/cloudServices'
@@ -219,7 +220,6 @@ export interface WorkspaceAiMembersPermissions {
219
220
  totalPages: number,
220
221
  }
221
222
 
222
-
223
223
  export interface WorkspaceAiGroupsPermissions extends GroupsFromResourceResponse {
224
224
  actions: Action[],
225
225
  }
@@ -358,14 +358,12 @@ export type FixVariables<
358
358
 
359
359
  export type ReplaceResult<T extends (...args: any[]) => Promise<any>, Fix> = (...args: Parameters<T>) => Promise<Fix>
360
360
 
361
- export interface AgentResponseWithBuiltIn extends Omit<ListAgentResponse, 'conversation_starter' | 'avatar'> {
361
+ export interface AgentResponseWithBuiltIn extends AgentResponse {
362
362
  builtIn?: boolean,
363
363
  spaceName?: string,
364
- conversation_starter?: string[] | null,
365
- avatar?: string | null | undefined,
366
- }
364
+ }
367
365
 
368
- export type AgentVisibilityLevel = AgentVisibilityLevelEnum | VisibilityLevelEnum
366
+ export type AgentVisibilityLevel = VisibilityLevel | 'BUILT-IN' | 'ALL'
369
367
 
370
368
  export interface AgentToolsOpenAPIPreview {
371
369
  name: string,