@stack-spot/portal-network 0.204.2 → 0.205.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/dist/api/ai.d.ts +275 -12
- package/dist/api/ai.d.ts.map +1 -1
- package/dist/api/ai.js +186 -7
- package/dist/api/ai.js.map +1 -1
- package/dist/client/ai.d.ts +131 -0
- package/dist/client/ai.d.ts.map +1 -1
- package/dist/client/ai.js +92 -9
- package/dist/client/ai.js.map +1 -1
- package/dist/client/code-shift.d.ts +8 -0
- package/dist/client/code-shift.d.ts.map +1 -1
- package/dist/client/code-shift.js +10 -1
- package/dist/client/code-shift.js.map +1 -1
- package/package.json +1 -1
- package/src/api/ai.ts +498 -16
- package/src/client/ai.ts +66 -8
- package/src/client/code-shift.ts +5 -0
package/src/client/ai.ts
CHANGED
|
@@ -7,13 +7,17 @@ import {
|
|
|
7
7
|
calculateNextStepV1QuickCommandsSlugStepsStepSlugCalculateNextStepPost,
|
|
8
8
|
callbackV1QuickCommandsCallbackExecutionIdGet,
|
|
9
9
|
conversationHistoryV1ConversationsConversationIdGet,
|
|
10
|
+
createAnswerForReviewV1ResourcesResourceTypeSlugResourceSlugReviewsReviewIdAnswersPost,
|
|
10
11
|
createExecutionV1QuickCommandsCreateExecutionSlugPost,
|
|
12
|
+
createResourceReviewV1ResourcesResourceTypeSlugResourceSlugReviewsPost,
|
|
11
13
|
currentV1TokensUsageCurrentGet,
|
|
12
14
|
defaults,
|
|
13
15
|
deleteConversationV1ConversationsConversationIdDelete,
|
|
14
16
|
deleteFavoriteV1AiStacksStackIdFavoriteDelete,
|
|
15
17
|
deleteFavoriteV1QuickCommandsSlugFavoriteDelete,
|
|
16
18
|
deleteKnowledgeObjectByCustomIdV1KnowledgeSourcesSlugObjectsCustomIdDelete,
|
|
19
|
+
deleteResourceReviewV1ResourcesResourceTypeSlugResourceSlugReviewsReviewIdDelete,
|
|
20
|
+
deleteReviewCommentV1ResourcesResourceTypeSlugResourceSlugReviewsReviewIdAnswersAnswerIdDelete,
|
|
17
21
|
downloadConversationV1ConversationsConversationIdDownloadGet,
|
|
18
22
|
findKnowledgeObjectByCustomIdV1KnowledgeSourcesSlugObjectsCustomIdGet,
|
|
19
23
|
findKnowledgeSourceV1KnowledgeSourcesSlugGet,
|
|
@@ -22,11 +26,14 @@ import {
|
|
|
22
26
|
getContentDependenciesV1ContentContentTypeContentIdDependenciesGet,
|
|
23
27
|
getFlagsV1FlagsGet,
|
|
24
28
|
getQuickCommandV1QuickCommandsSlugGet,
|
|
29
|
+
getScriptExecutionStatusV1QuickCommandsScriptExecutionsScriptExecutionIdGet,
|
|
30
|
+
getReviewsByResourceV1ResourcesResourceTypeSlugResourceSlugReviewsGet,
|
|
25
31
|
getUploadFormV1FileUploadFormPost,
|
|
26
32
|
HttpValidationError,
|
|
27
33
|
listAiStacksV1AiStacksGet,
|
|
28
34
|
listAllV1QuickCommandsAllGet,
|
|
29
35
|
listAllV2QuickCommandsAllGet,
|
|
36
|
+
listAllV3QuickCommandsGet,
|
|
30
37
|
listAssociationV1WorkspaceWorkspaceIdGet,
|
|
31
38
|
listConversationsV1ConversationsGet,
|
|
32
39
|
listKnowledgeSourcesV1KnowledgeSourcesGet,
|
|
@@ -38,11 +45,16 @@ import {
|
|
|
38
45
|
resetKnowledgeObjectsV1KnowledgeSourcesSlugObjectsDelete,
|
|
39
46
|
runFetchStepV1QuickCommandsSlugStepsStepSlugFetchRunPost,
|
|
40
47
|
searchKnowledgeSourcesV1KnowledgeSourcesSearchPost,
|
|
48
|
+
startScriptStepV1QuickCommandsSlugStepsStepSlugStartScriptPost,
|
|
41
49
|
totalV1TokensUsageTotalGet,
|
|
42
50
|
updateQuickCommandV1QuickCommandsSlugPatch,
|
|
51
|
+
updateResourceReviewV1ResourcesResourceTypeSlugResourceSlugReviewsReviewIdPatch,
|
|
52
|
+
updateReviewCommentV1ResourcesResourceTypeSlugResourceSlugReviewsReviewIdAnswersAnswerIdPatch,
|
|
43
53
|
updateTitleV1ConversationsConversationIdPatch,
|
|
44
54
|
vectorizeCustomKnowledgeSourceV1KnowledgeSourcesSlugCustomPost,
|
|
45
55
|
} from '../api/ai'
|
|
56
|
+
|
|
57
|
+
|
|
46
58
|
import { StackspotAPIError } from '../error/StackspotAPIError'
|
|
47
59
|
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
|
|
48
60
|
import { removeAuthorizationParam } from '../utils/remove-authorization-param'
|
|
@@ -60,6 +72,8 @@ import {
|
|
|
60
72
|
StepChatStep,
|
|
61
73
|
} from './types'
|
|
62
74
|
|
|
75
|
+
const listQAV3WithoutAuthorization = removeAuthorizationParam(listAllV3QuickCommandsGet)
|
|
76
|
+
|
|
63
77
|
class AIClient extends ReactQueryNetworkClient {
|
|
64
78
|
constructor() {
|
|
65
79
|
super(getApiAddresses().ai.url, defaults)
|
|
@@ -125,6 +139,10 @@ class AIClient extends ReactQueryNetworkClient {
|
|
|
125
139
|
* Lists all the quick commands according to filters passed as parameter (including QC with secrets).
|
|
126
140
|
*/
|
|
127
141
|
allQuickCommands = this.query(removeAuthorizationParam(listAllV2QuickCommandsAllGet))
|
|
142
|
+
/**
|
|
143
|
+
* Lists all the quick commands according to filters passed as parameter (including QC with secrets) with pagination.
|
|
144
|
+
*/
|
|
145
|
+
allQuickCommandsV3 = this.infiniteQuery(listQAV3WithoutAuthorization, { accumulator: 'items' })
|
|
128
146
|
/**
|
|
129
147
|
* Gets a quick command by its slug.
|
|
130
148
|
*/
|
|
@@ -262,14 +280,54 @@ class AIClient extends ReactQueryNetworkClient {
|
|
|
262
280
|
* Lists all the feature flags for this user.
|
|
263
281
|
*/
|
|
264
282
|
flags = this.query(getFlagsV1FlagsGet)
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
283
|
+
/**
|
|
284
|
+
* Starts the execution of a script step
|
|
285
|
+
*/
|
|
286
|
+
startScriptStep = this.mutation(removeAuthorizationParam(startScriptStepV1QuickCommandsSlugStepsStepSlugStartScriptPost))
|
|
287
|
+
/**
|
|
288
|
+
* Gets the status of the execution of a script step
|
|
289
|
+
*/
|
|
290
|
+
getStatusScriptStep = this.query(removeAuthorizationParam(getScriptExecutionStatusV1QuickCommandsScriptExecutionsScriptExecutionIdGet))
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* Get reviews by resource
|
|
294
|
+
*/
|
|
295
|
+
getReviewsByResource = this.query(removeAuthorizationParam(getReviewsByResourceV1ResourcesResourceTypeSlugResourceSlugReviewsGet))
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* Create a resource review
|
|
299
|
+
*/
|
|
300
|
+
createResourceReview = this.mutation(removeAuthorizationParam(createResourceReviewV1ResourcesResourceTypeSlugResourceSlugReviewsPost))
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* Create an answer for a review
|
|
304
|
+
*/
|
|
305
|
+
createAnswerForReview = this.mutation(
|
|
306
|
+
removeAuthorizationParam(createAnswerForReviewV1ResourcesResourceTypeSlugResourceSlugReviewsReviewIdAnswersPost))
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* Update a resource review
|
|
310
|
+
*/
|
|
311
|
+
updateResourceReview = this.mutation(
|
|
312
|
+
removeAuthorizationParam(updateResourceReviewV1ResourcesResourceTypeSlugResourceSlugReviewsReviewIdPatch))
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* Delete a resource review
|
|
316
|
+
*/
|
|
317
|
+
deleteResourceReview = this.mutation(
|
|
318
|
+
removeAuthorizationParam(deleteResourceReviewV1ResourcesResourceTypeSlugResourceSlugReviewsReviewIdDelete))
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* Update a review comment (answer)
|
|
322
|
+
*/
|
|
323
|
+
updateReviewComment = this.mutation(
|
|
324
|
+
removeAuthorizationParam(updateReviewCommentV1ResourcesResourceTypeSlugResourceSlugReviewsReviewIdAnswersAnswerIdPatch))
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* Delete a review comment (answer)
|
|
328
|
+
*/
|
|
329
|
+
deleteReviewComment = this.mutation(
|
|
330
|
+
removeAuthorizationParam(deleteReviewCommentV1ResourcesResourceTypeSlugResourceSlugReviewsReviewIdAnswersAnswerIdDelete))
|
|
273
331
|
|
|
274
332
|
private static async toolsOfAgent(agentId?: string) {
|
|
275
333
|
try {
|
package/src/client/code-shift.ts
CHANGED
|
@@ -75,6 +75,7 @@ import {
|
|
|
75
75
|
createReposBatchServiceV2ReposBatchPost,
|
|
76
76
|
getImportResultV2ReposBatchImportIdGet,
|
|
77
77
|
downloadImportResultV2ReposBatchImportIdDownloadGet,
|
|
78
|
+
deleteModuleServiceV1ModulesModuleIdDelete,
|
|
78
79
|
} from '../api/codeShift'
|
|
79
80
|
import { DefaultAPIError } from '../error/DefaultAPIError'
|
|
80
81
|
import { codeShiftDictionary } from '../error/dictionary/code-shift'
|
|
@@ -144,6 +145,10 @@ class CodeShift extends ReactQueryNetworkClient {
|
|
|
144
145
|
* Gets module by id.
|
|
145
146
|
*/
|
|
146
147
|
module = this.query(removeAuthorizationParam(getModuleV1ModulesModuleIdGet))
|
|
148
|
+
/**
|
|
149
|
+
* Deletes a module by id.
|
|
150
|
+
*/
|
|
151
|
+
deleteModule = this.query(removeAuthorizationParam(deleteModuleServiceV1ModulesModuleIdDelete))
|
|
147
152
|
/**
|
|
148
153
|
* Add a module in favorites.
|
|
149
154
|
*/
|