@stack-spot/portal-network 0.82.0 → 0.82.2
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 +14 -0
- package/dist/api/ai.d.ts +224 -181
- package/dist/api/ai.d.ts.map +1 -1
- package/dist/api/ai.js +223 -204
- package/dist/api/ai.js.map +1 -1
- package/dist/client/ai.d.ts +0 -1
- package/dist/client/ai.d.ts.map +1 -1
- package/dist/client/types.d.ts +5 -2
- package/dist/client/types.d.ts.map +1 -1
- package/dist/client/workspace-ai.d.ts +2 -2
- package/dist/client/workspace-ai.d.ts.map +1 -1
- package/dist/client/workspace-ai.js +5 -1
- package/dist/client/workspace-ai.js.map +1 -1
- package/package.json +1 -1
- package/src/api/ai.ts +507 -445
- package/src/client/types.ts +6 -2
- package/src/client/workspace-ai.ts +12 -2
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 {
|
|
3
|
+
import { ChatRequest, ChatResponse3, ConversationHistoryResponse, ConversationResponse } 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'
|
|
@@ -169,7 +169,7 @@ export interface FixedPaginatedActivityResponse extends Omit<PaginatedActivityRe
|
|
|
169
169
|
items: FixedActivityResponse[],
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
-
export interface FixedChatRequest extends
|
|
172
|
+
export interface FixedChatRequest extends ChatRequest {
|
|
173
173
|
context?: {
|
|
174
174
|
workspace?: string,
|
|
175
175
|
conversation_id?: string,
|
|
@@ -211,6 +211,10 @@ export interface FixedWorkspaceAiPermissions {
|
|
|
211
211
|
groups?: WorkspaceAiGroupsPermissions[],
|
|
212
212
|
}
|
|
213
213
|
|
|
214
|
+
export interface FixedAddResourceToWorkspaceAi {
|
|
215
|
+
error_id: string[],
|
|
216
|
+
}
|
|
217
|
+
|
|
214
218
|
export type OazapftsFunction<Variables = any, Result = any> = (variables: Variables, opts?: RequestOpts) => Promise<Result>
|
|
215
219
|
|
|
216
220
|
type Unpromisify<T> = T extends Promise<infer R> ? Unpromisify<R> : T
|
|
@@ -20,7 +20,7 @@ import apis from '../apis.json'
|
|
|
20
20
|
import { StackspotAPIError } from '../error/StackspotAPIError'
|
|
21
21
|
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
|
|
22
22
|
import { removeAuthorizationParam } from '../utils/remove-authorization-param'
|
|
23
|
-
import { FixedWorkspaceAiPermissions, ReplaceResult } from './types'
|
|
23
|
+
import { FixedAddResourceToWorkspaceAi, FixedWorkspaceAiPermissions, ReplaceResult } from './types'
|
|
24
24
|
|
|
25
25
|
class WorkspaceAiClient extends ReactQueryNetworkClient {
|
|
26
26
|
constructor() {
|
|
@@ -41,7 +41,17 @@ class WorkspaceAiClient extends ReactQueryNetworkClient {
|
|
|
41
41
|
workspaceAi = this.query(removeAuthorizationParam(getWorkspaceByIdV1WorkspacesIdGet))
|
|
42
42
|
updateWorkspaceAi = this.mutation(removeAuthorizationParam(updateWorkspaceV1WorkspacesWorkspaceIdPatch))
|
|
43
43
|
deleteWorkspaceAi = this.mutation(removeAuthorizationParam(deleteWorkspaceV1WorkspacesWorkspaceIdDelete))
|
|
44
|
-
|
|
44
|
+
|
|
45
|
+
addResourceTypeToWorkspaceAi = this.mutation({
|
|
46
|
+
name: 'addResourceTypeToWorkspaceAi',
|
|
47
|
+
request: (
|
|
48
|
+
signal,
|
|
49
|
+
variables: Omit<Parameters<typeof addResourceV1WorkspacesWorkspaceIdResourceTypePost>[0], 'authorization'>,
|
|
50
|
+
) =>
|
|
51
|
+
addResourceV1WorkspacesWorkspaceIdResourceTypePost({ ...variables, authorization: '' },
|
|
52
|
+
{ signal }) as unknown as Promise<FixedAddResourceToWorkspaceAi>,
|
|
53
|
+
permission: this.createPermissionFunctionFor(addResourceV1WorkspacesWorkspaceIdResourceTypePost),
|
|
54
|
+
})
|
|
45
55
|
|
|
46
56
|
getKSFromWorkspaceAi = this.query({
|
|
47
57
|
name: 'KsWorkspaceAi',
|