@stack-spot/portal-network 0.83.1 → 0.84.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 +15 -0
- package/dist/api/ai.d.ts +22 -16
- package/dist/api/ai.d.ts.map +1 -1
- package/dist/api/ai.js +12 -14
- package/dist/api/ai.js.map +1 -1
- package/dist/api/workspace-ai.d.ts +2 -1
- package/dist/api/workspace-ai.d.ts.map +1 -1
- package/dist/api/workspace-ai.js +3 -2
- package/dist/api/workspace-ai.js.map +1 -1
- package/dist/api/workspaceManager.d.ts +3 -3
- package/dist/api/workspaceManager.d.ts.map +1 -1
- package/dist/api/workspaceManager.js +2 -2
- package/dist/api/workspaceManager.js.map +1 -1
- package/dist/client/ai.d.ts +7 -1
- package/dist/client/ai.d.ts.map +1 -1
- package/dist/client/ai.js +7 -1
- package/dist/client/ai.js.map +1 -1
- package/dist/client/types.d.ts +11 -1
- package/dist/client/types.d.ts.map +1 -1
- package/dist/client/workspace-ai.d.ts +1 -0
- package/dist/client/workspace-ai.d.ts.map +1 -1
- package/dist/client/workspace-manager.d.ts +2 -2
- package/dist/client/workspace-manager.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/api/ai.ts +38 -34
- package/src/api/workspace-ai.ts +4 -2
- package/src/api/workspaceManager.ts +9 -3
- package/src/client/ai.ts +9 -1
- package/src/client/types.ts +13 -1
package/src/api/ai.ts
CHANGED
|
@@ -297,14 +297,6 @@ export type CustomKnowledgeSourceRequest = {
|
|
|
297
297
|
export type SearchKnowledgeSourcesRequest = {
|
|
298
298
|
knowledge_source_ids: string[];
|
|
299
299
|
};
|
|
300
|
-
export type KnowledgeSourcesDependenciesRequest = {
|
|
301
|
-
ids: string[];
|
|
302
|
-
};
|
|
303
|
-
export type KnowledgeSourcesDependenciesResponseV2 = {
|
|
304
|
-
ks_names?: string[] | null;
|
|
305
|
-
error_ks_names?: string[] | null;
|
|
306
|
-
missing_ks_list?: string[] | null;
|
|
307
|
-
};
|
|
308
300
|
export type AccountSettingsChangeLlmRequest = {
|
|
309
301
|
llm_type: string | null;
|
|
310
302
|
llm_data: object | null;
|
|
@@ -610,6 +602,19 @@ export type FeatureFlagResponse = {
|
|
|
610
602
|
action: string;
|
|
611
603
|
active: boolean;
|
|
612
604
|
};
|
|
605
|
+
export type ContentDependencyResponse = {
|
|
606
|
+
id: string;
|
|
607
|
+
slug: string;
|
|
608
|
+
name: string;
|
|
609
|
+
"type": string;
|
|
610
|
+
visibility: string;
|
|
611
|
+
};
|
|
612
|
+
export type DependencyResponse = {
|
|
613
|
+
promote_contents?: ContentDependencyResponse[] | null;
|
|
614
|
+
promote_error_list?: ContentDependencyResponse[] | null;
|
|
615
|
+
missing_list?: ContentDependencyResponse[] | null;
|
|
616
|
+
delete_contents?: ContentDependencyResponse[] | null;
|
|
617
|
+
};
|
|
613
618
|
export type SourceProjectFile3 = {
|
|
614
619
|
"type": "project_file";
|
|
615
620
|
path: string;
|
|
@@ -1683,32 +1688,6 @@ export function searchKnowledgeSourcesV1KnowledgeSourcesSearchPost({ authorizati
|
|
|
1683
1688
|
})
|
|
1684
1689
|
})));
|
|
1685
1690
|
}
|
|
1686
|
-
/**
|
|
1687
|
-
* Ks Dependencies
|
|
1688
|
-
*/
|
|
1689
|
-
export function ksDependenciesV1KnowledgeSourcesDependenciesPost({ authorization, xAccountId, knowledgeSourcesDependenciesRequest }: {
|
|
1690
|
-
authorization: string;
|
|
1691
|
-
xAccountId?: string | null;
|
|
1692
|
-
knowledgeSourcesDependenciesRequest: KnowledgeSourcesDependenciesRequest;
|
|
1693
|
-
}, opts?: Oazapfts.RequestOpts) {
|
|
1694
|
-
return oazapfts.ok(oazapfts.fetchJson<{
|
|
1695
|
-
status: 200;
|
|
1696
|
-
data: KnowledgeSourcesDependenciesResponseV2;
|
|
1697
|
-
} | {
|
|
1698
|
-
status: 404;
|
|
1699
|
-
} | {
|
|
1700
|
-
status: 422;
|
|
1701
|
-
data: HttpValidationError;
|
|
1702
|
-
}>("/v1/knowledge-sources/dependencies", oazapfts.json({
|
|
1703
|
-
...opts,
|
|
1704
|
-
method: "POST",
|
|
1705
|
-
body: knowledgeSourcesDependenciesRequest,
|
|
1706
|
-
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
1707
|
-
authorization,
|
|
1708
|
-
"x-account-id": xAccountId
|
|
1709
|
-
})
|
|
1710
|
-
})));
|
|
1711
|
-
}
|
|
1712
1691
|
/**
|
|
1713
1692
|
* Change Llm
|
|
1714
1693
|
*/
|
|
@@ -2870,6 +2849,31 @@ export function getFlagsV1FlagsGet(opts?: Oazapfts.RequestOpts) {
|
|
|
2870
2849
|
...opts
|
|
2871
2850
|
}));
|
|
2872
2851
|
}
|
|
2852
|
+
/**
|
|
2853
|
+
* Get Content Dependencies
|
|
2854
|
+
*/
|
|
2855
|
+
export function getContentDependenciesV1ContentContentTypeContentIdDependenciesGet({ contentType, contentId, authorization, xAccountId }: {
|
|
2856
|
+
contentType: string;
|
|
2857
|
+
contentId: string;
|
|
2858
|
+
authorization: string;
|
|
2859
|
+
xAccountId?: string | null;
|
|
2860
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
2861
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
2862
|
+
status: 200;
|
|
2863
|
+
data: DependencyResponse;
|
|
2864
|
+
} | {
|
|
2865
|
+
status: 404;
|
|
2866
|
+
} | {
|
|
2867
|
+
status: 422;
|
|
2868
|
+
data: HttpValidationError;
|
|
2869
|
+
}>(`/v1/content/${encodeURIComponent(contentType)}/${encodeURIComponent(contentId)}/dependencies`, {
|
|
2870
|
+
...opts,
|
|
2871
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
2872
|
+
authorization,
|
|
2873
|
+
"x-account-id": xAccountId
|
|
2874
|
+
})
|
|
2875
|
+
}));
|
|
2876
|
+
}
|
|
2873
2877
|
/**
|
|
2874
2878
|
* Dev Assistant V2
|
|
2875
2879
|
*/
|
package/src/api/workspace-ai.ts
CHANGED
|
@@ -241,9 +241,10 @@ export function removePermissionV1WorkspacesWorkspaceIdPermissionsDelete({ works
|
|
|
241
241
|
/**
|
|
242
242
|
* List Groups And Members Permission In Workspace
|
|
243
243
|
*/
|
|
244
|
-
export function listGroupsAndMembersPermissionInWorkspaceV1WorkspacesWorkspaceIdPermissionsGet({ workspaceId, sortBy, authorization, xAccountId }: {
|
|
244
|
+
export function listGroupsAndMembersPermissionInWorkspaceV1WorkspacesWorkspaceIdPermissionsGet({ workspaceId, sortBy, order, authorization, xAccountId }: {
|
|
245
245
|
workspaceId: string;
|
|
246
246
|
sortBy?: SortBy | null;
|
|
247
|
+
order?: OrderEnum;
|
|
247
248
|
authorization: string;
|
|
248
249
|
xAccountId?: string | null;
|
|
249
250
|
}, opts?: Oazapfts.RequestOpts) {
|
|
@@ -256,7 +257,8 @@ export function listGroupsAndMembersPermissionInWorkspaceV1WorkspacesWorkspaceId
|
|
|
256
257
|
status: 422;
|
|
257
258
|
data: HttpValidationError;
|
|
258
259
|
}>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/permissions${QS.query(QS.explode({
|
|
259
|
-
sort_by: sortBy
|
|
260
|
+
sort_by: sortBy,
|
|
261
|
+
order
|
|
260
262
|
}))}`, {
|
|
261
263
|
...opts,
|
|
262
264
|
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
@@ -455,7 +455,7 @@ export type UpdatePluginAndCreatePrRequest = {
|
|
|
455
455
|
originBranchName: string;
|
|
456
456
|
newBranchName: string;
|
|
457
457
|
stkFilePath: string;
|
|
458
|
-
|
|
458
|
+
plugins: InfraPluginRequest[];
|
|
459
459
|
};
|
|
460
460
|
export type CreateConnectionInterfaceRequest = {
|
|
461
461
|
/** Connection interface type id. */
|
|
@@ -1599,7 +1599,10 @@ export function updateInfrastructureControllerupdateInfraPluginsAndCreatePullReq
|
|
|
1599
1599
|
sharedInfraId: string;
|
|
1600
1600
|
updatePluginAndCreatePrRequest: UpdatePluginAndCreatePrRequest;
|
|
1601
1601
|
}, opts?: Oazapfts.RequestOpts) {
|
|
1602
|
-
return oazapfts.ok(oazapfts.
|
|
1602
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
1603
|
+
status: 200;
|
|
1604
|
+
data: string;
|
|
1605
|
+
}>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/shared-infra/${encodeURIComponent(sharedInfraId)}/create-pull-request`, oazapfts.json({
|
|
1603
1606
|
...opts,
|
|
1604
1607
|
method: "POST",
|
|
1605
1608
|
body: updatePluginAndCreatePrRequest
|
|
@@ -1623,7 +1626,10 @@ export function updateInfrastructureControllerupdateInfraPluginsAndCreatePullReq
|
|
|
1623
1626
|
applicationId: string;
|
|
1624
1627
|
updatePluginAndCreatePrRequest: UpdatePluginAndCreatePrRequest;
|
|
1625
1628
|
}, opts?: Oazapfts.RequestOpts) {
|
|
1626
|
-
return oazapfts.ok(oazapfts.
|
|
1629
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
1630
|
+
status: 200;
|
|
1631
|
+
data: string;
|
|
1632
|
+
}>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}/create-pull-request`, oazapfts.json({
|
|
1627
1633
|
...opts,
|
|
1628
1634
|
method: "POST",
|
|
1629
1635
|
body: updatePluginAndCreatePrRequest
|
package/src/client/ai.ts
CHANGED
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
findKnowledgeSourceV1KnowledgeSourcesSlugGet,
|
|
10
10
|
formatFetchStepV1QuickCommandsSlugStepsStepSlugFetchFormatPost,
|
|
11
11
|
formatResultV1QuickCommandsSlugResultFormatPost,
|
|
12
|
+
getContentDependenciesV1ContentContentTypeContentIdDependenciesGet,
|
|
12
13
|
getQuickCommandV1QuickCommandsSlugGet,
|
|
13
14
|
HttpValidationError,
|
|
14
15
|
listAiStacksV1AiStacksGet,
|
|
@@ -26,7 +27,7 @@ import { StackspotAPIError } from '../error/StackspotAPIError'
|
|
|
26
27
|
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
|
|
27
28
|
import { removeAuthorizationParam } from '../utils/remove-authorization-param'
|
|
28
29
|
import { StreamedJson } from '../utils/StreamedJson'
|
|
29
|
-
import { FixedChatRequest, FixedConversationResponse, ReplaceResult } from './types'
|
|
30
|
+
import { FixedChatRequest, FixedConversationResponse, FixedDependencyResponse, ReplaceResult } from './types'
|
|
30
31
|
|
|
31
32
|
class AIClient extends ReactQueryNetworkClient {
|
|
32
33
|
constructor() {
|
|
@@ -77,6 +78,13 @@ class AIClient extends ReactQueryNetworkClient {
|
|
|
77
78
|
)
|
|
78
79
|
return new StreamedJson(events, abortController, minChangeIntervalMS)
|
|
79
80
|
}
|
|
81
|
+
|
|
82
|
+
contentDependencies = this.query(removeAuthorizationParam(
|
|
83
|
+
getContentDependenciesV1ContentContentTypeContentIdDependenciesGet as ReplaceResult<
|
|
84
|
+
typeof getContentDependenciesV1ContentContentTypeContentIdDependenciesGet,
|
|
85
|
+
FixedDependencyResponse
|
|
86
|
+
>,
|
|
87
|
+
))
|
|
80
88
|
}
|
|
81
89
|
|
|
82
90
|
export const aiClient = new AIClient()
|
package/src/client/types.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RequestOpts } from '@oazapfts/runtime'
|
|
2
2
|
import { AccountScmInfoSaveRequest, AccountScmInfoUpdateRequest, AccountScmStatusResponse, GroupsFromResourceResponse, MembersFromResourceResponse } from '../api/account'
|
|
3
|
-
import { ChatRequest, ChatResponse3, ConversationHistoryResponse, ConversationResponse } from '../api/ai'
|
|
3
|
+
import { ChatRequest, ChatResponse3, ContentDependencyResponse, ConversationHistoryResponse, ConversationResponse, DependencyResponse } from '../api/ai'
|
|
4
4
|
import { ConnectAccountRequestV2, ManagedAccountProvisionRequest } from '../api/cloudAccount'
|
|
5
5
|
import { AllocationCostRequest, AllocationCostResponse, ChargePeriod, getAllocationCostFilters, ManagedService, ServiceResource } from '../api/cloudServices'
|
|
6
6
|
import { Action } from '../api/workspace-ai'
|
|
@@ -198,6 +198,18 @@ export interface FixedConversationResponse extends ConversationResponse {
|
|
|
198
198
|
history?: FixedConversationHistoryResponse[],
|
|
199
199
|
}
|
|
200
200
|
|
|
201
|
+
export interface FixedContentDependencyResponse extends ContentDependencyResponse {
|
|
202
|
+
type: 'agent' | 'knowledge_source' | 'quick_command',
|
|
203
|
+
visibility: 'account' | 'personal' | 'shared',
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export interface FixedDependencyResponse extends DependencyResponse {
|
|
207
|
+
promote_contents?: FixedContentDependencyResponse[] | null,
|
|
208
|
+
promote_error_list?: FixedContentDependencyResponse[] | null,
|
|
209
|
+
missing_list?: FixedContentDependencyResponse[] | null,
|
|
210
|
+
delete_contents?: FixedContentDependencyResponse[] | null,
|
|
211
|
+
}
|
|
212
|
+
|
|
201
213
|
export interface WorkspaceAiMembersPermissions extends MembersFromResourceResponse {
|
|
202
214
|
actions: Action[],
|
|
203
215
|
}
|