@stack-spot/portal-network 0.77.1 → 0.78.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 +7 -0
- package/dist/api/workspace-ai.d.ts +158 -0
- package/dist/api/workspace-ai.d.ts.map +1 -0
- package/dist/api/workspace-ai.js +174 -0
- package/dist/api/workspace-ai.js.map +1 -0
- package/dist/apis.json +8 -0
- package/dist/client/account.d.ts +16 -0
- package/dist/client/account.d.ts.map +1 -1
- package/dist/client/account.js +10 -1
- package/dist/client/account.js.map +1 -1
- package/dist/client/workspace-ai.d.ts +98 -0
- package/dist/client/workspace-ai.d.ts.map +1 -0
- package/dist/client/workspace-ai.js +126 -0
- package/dist/client/workspace-ai.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/api/workspace-ai.ts +359 -0
- package/src/apis.json +8 -0
- package/src/client/account.ts +6 -0
- package/src/client/workspace-ai.ts +101 -0
- package/src/index.ts +1 -0
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { addPermissionV1WorkspacesWorkspaceIdPermissionPatch, addResourceV1WorkspacesWorkspaceIdResourceTypePost, createWorkspaceV1WorkspacesPost, defaults, deleteWorkspaceV1WorkspacesWorkspaceIdDelete, getWorkspaceBySlugV1WorkspacesIdGet, listAllByResourceTypeV1WorkspacesWorkspaceIdResourceTypeGet, listGroupsPermissionInWorkspaceV1WorkspacesWorkspaceIdPermissionsGet, listWorkspacesV1WorkspacesGet, removePermissionV1WorkspacesWorkspaceIdPermissionDelete, removeResourceV1WorkspacesWorkspaceIdResourceTypeResourceIdDelete, updateWorkspaceV1WorkspacesWorkspaceIdPatch, } from '../api/workspace-ai.js';
|
|
2
|
+
import apis from '../apis.json';
|
|
3
|
+
import { StackspotAPIError } from '../error/StackspotAPIError.js';
|
|
4
|
+
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient.js';
|
|
5
|
+
import { removeAuthorizationParam } from '../utils/remove-authorization-param.js';
|
|
6
|
+
class WorkspaceAiClient extends ReactQueryNetworkClient {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(apis['workspace-ai'].url, defaults);
|
|
9
|
+
Object.defineProperty(this, "createWorkspaceAi", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
configurable: true,
|
|
12
|
+
writable: true,
|
|
13
|
+
value: this.mutation(removeAuthorizationParam(createWorkspaceV1WorkspacesPost))
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(this, "workspacesAi", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
configurable: true,
|
|
18
|
+
writable: true,
|
|
19
|
+
value: this.query(removeAuthorizationParam(listWorkspacesV1WorkspacesGet))
|
|
20
|
+
});
|
|
21
|
+
Object.defineProperty(this, "workspaceAi", {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
configurable: true,
|
|
24
|
+
writable: true,
|
|
25
|
+
value: this.query(removeAuthorizationParam(getWorkspaceBySlugV1WorkspacesIdGet))
|
|
26
|
+
});
|
|
27
|
+
Object.defineProperty(this, "updateWorkspaceAi", {
|
|
28
|
+
enumerable: true,
|
|
29
|
+
configurable: true,
|
|
30
|
+
writable: true,
|
|
31
|
+
value: this.mutation(removeAuthorizationParam(updateWorkspaceV1WorkspacesWorkspaceIdPatch))
|
|
32
|
+
});
|
|
33
|
+
Object.defineProperty(this, "deleteWorkspaceAi", {
|
|
34
|
+
enumerable: true,
|
|
35
|
+
configurable: true,
|
|
36
|
+
writable: true,
|
|
37
|
+
value: this.mutation(removeAuthorizationParam(deleteWorkspaceV1WorkspacesWorkspaceIdDelete))
|
|
38
|
+
});
|
|
39
|
+
Object.defineProperty(this, "addResourceTypeToWorkspaceAi", {
|
|
40
|
+
enumerable: true,
|
|
41
|
+
configurable: true,
|
|
42
|
+
writable: true,
|
|
43
|
+
value: this.mutation(removeAuthorizationParam(addResourceV1WorkspacesWorkspaceIdResourceTypePost))
|
|
44
|
+
});
|
|
45
|
+
Object.defineProperty(this, "getKSFromWorkspaceAi", {
|
|
46
|
+
enumerable: true,
|
|
47
|
+
configurable: true,
|
|
48
|
+
writable: true,
|
|
49
|
+
value: this.query({
|
|
50
|
+
name: 'KsWorkspaceAi',
|
|
51
|
+
request: (signal, variables) => listAllByResourceTypeV1WorkspacesWorkspaceIdResourceTypeGet({ ...variables, resourceType: 'knowledge_source', authorization: '' }, { signal }),
|
|
52
|
+
permission: this.createPermissionFunctionFor(listAllByResourceTypeV1WorkspacesWorkspaceIdResourceTypeGet),
|
|
53
|
+
})
|
|
54
|
+
});
|
|
55
|
+
Object.defineProperty(this, "getStackFromWorkspaceAi", {
|
|
56
|
+
enumerable: true,
|
|
57
|
+
configurable: true,
|
|
58
|
+
writable: true,
|
|
59
|
+
value: this.query({
|
|
60
|
+
name: 'StackWorkspaceAi',
|
|
61
|
+
request: (signal, variables) => listAllByResourceTypeV1WorkspacesWorkspaceIdResourceTypeGet({ ...variables, resourceType: 'stack', authorization: '' }, { signal }),
|
|
62
|
+
permission: this.createPermissionFunctionFor(listAllByResourceTypeV1WorkspacesWorkspaceIdResourceTypeGet),
|
|
63
|
+
})
|
|
64
|
+
});
|
|
65
|
+
Object.defineProperty(this, "getQCFromWorkspaceAi", {
|
|
66
|
+
enumerable: true,
|
|
67
|
+
configurable: true,
|
|
68
|
+
writable: true,
|
|
69
|
+
value: this.query({
|
|
70
|
+
name: 'QcWorkspaceAi',
|
|
71
|
+
request: (signal, variables) => listAllByResourceTypeV1WorkspacesWorkspaceIdResourceTypeGet({ ...variables, resourceType: 'quick_command', authorization: '' }, { signal }),
|
|
72
|
+
permission: this.createPermissionFunctionFor(listAllByResourceTypeV1WorkspacesWorkspaceIdResourceTypeGet),
|
|
73
|
+
})
|
|
74
|
+
});
|
|
75
|
+
Object.defineProperty(this, "getAgentFromWorkspaceAi", {
|
|
76
|
+
enumerable: true,
|
|
77
|
+
configurable: true,
|
|
78
|
+
writable: true,
|
|
79
|
+
value: this.query({
|
|
80
|
+
name: 'AgentWorkspaceAi',
|
|
81
|
+
request: (signal, variables) => listAllByResourceTypeV1WorkspacesWorkspaceIdResourceTypeGet({ ...variables, resourceType: 'agent', authorization: '' }, { signal }),
|
|
82
|
+
permission: this.createPermissionFunctionFor(listAllByResourceTypeV1WorkspacesWorkspaceIdResourceTypeGet),
|
|
83
|
+
})
|
|
84
|
+
});
|
|
85
|
+
Object.defineProperty(this, "deleteResourceTypeFromWorkspaceAi", {
|
|
86
|
+
enumerable: true,
|
|
87
|
+
configurable: true,
|
|
88
|
+
writable: true,
|
|
89
|
+
value: this.mutation(removeAuthorizationParam(removeResourceV1WorkspacesWorkspaceIdResourceTypeResourceIdDelete))
|
|
90
|
+
});
|
|
91
|
+
Object.defineProperty(this, "addPermissionToWorkspaceAi", {
|
|
92
|
+
enumerable: true,
|
|
93
|
+
configurable: true,
|
|
94
|
+
writable: true,
|
|
95
|
+
value: this.mutation(removeAuthorizationParam(addPermissionV1WorkspacesWorkspaceIdPermissionPatch))
|
|
96
|
+
});
|
|
97
|
+
Object.defineProperty(this, "editPermissionToWorkspaceAi", {
|
|
98
|
+
enumerable: true,
|
|
99
|
+
configurable: true,
|
|
100
|
+
writable: true,
|
|
101
|
+
value: this.mutation(removeAuthorizationParam(updateWorkspaceV1WorkspacesWorkspaceIdPatch))
|
|
102
|
+
});
|
|
103
|
+
Object.defineProperty(this, "removePermissionToWorkspaceAi", {
|
|
104
|
+
enumerable: true,
|
|
105
|
+
configurable: true,
|
|
106
|
+
writable: true,
|
|
107
|
+
value: this.mutation(removeAuthorizationParam(removePermissionV1WorkspacesWorkspaceIdPermissionDelete))
|
|
108
|
+
});
|
|
109
|
+
Object.defineProperty(this, "groupsOfWorkspaceAi", {
|
|
110
|
+
enumerable: true,
|
|
111
|
+
configurable: true,
|
|
112
|
+
writable: true,
|
|
113
|
+
value: this.mutation(removeAuthorizationParam(listGroupsPermissionInWorkspaceV1WorkspacesWorkspaceIdPermissionsGet))
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
buildStackSpotError(error) {
|
|
117
|
+
return new StackspotAPIError({
|
|
118
|
+
status: error.status,
|
|
119
|
+
headers: error.headers,
|
|
120
|
+
stack: error.stack,
|
|
121
|
+
message: error.data?.detail?.map(d => d.msg)?.join('\n'),
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
export const workspaceAiClient = new WorkspaceAiClient();
|
|
126
|
+
//# sourceMappingURL=workspace-ai.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace-ai.js","sourceRoot":"","sources":["../../src/client/workspace-ai.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,mDAAmD,EACnD,kDAAkD,EAClD,+BAA+B,EAC/B,QAAQ,EACR,4CAA4C,EAC5C,mCAAmC,EAEnC,2DAA2D,EAC3D,oEAAoE,EACpE,6BAA6B,EAC7B,uDAAuD,EACvD,iEAAiE,EACjE,2CAA2C,GAC5C,MAAM,qBAAqB,CAAA;AAC5B,OAAO,IAAI,MAAM,cAAc,CAAA;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAA;AAC5E,OAAO,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAA;AAG9E,MAAM,iBAAkB,SAAQ,uBAAuB;IACrD;QACE,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAA;QAY3C;;;;mBAAoB,IAAI,CAAC,QAAQ,CAAC,wBAAwB,CAAC,+BAA+B,CAAC,CAAC;WAAA;QAC5F;;;;mBAAe,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,6BAA6B,CAAC,CAAC;WAAA;QAClF;;;;mBAAc,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,mCAAmC,CAAC,CAAC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export { secretsClient } from './client/secrets.js';
|
|
|
16
16
|
export * from './client/types.js';
|
|
17
17
|
export { workflowClient } from './client/workflow.js';
|
|
18
18
|
export { workspaceClient } from './client/workspace.js';
|
|
19
|
+
export { workspaceAiClient } from './client/workspace-ai.js';
|
|
19
20
|
export { workspaceManagerClient } from './client/workspace-manager.js';
|
|
20
21
|
export { workspaceSearchClient } from './client/workspace-search.js';
|
|
21
22
|
export { DefaultAPIError } from './error/DefaultAPIError.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAC7D,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAA;AAC5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAChD,cAAc,gBAAgB,CAAA;AAC9B,OAA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16,7 @@ export { secretsClient } from './client/secrets.js';
|
|
|
16
16
|
export * from './client/types.js';
|
|
17
17
|
export { workflowClient } from './client/workflow.js';
|
|
18
18
|
export { workspaceClient } from './client/workspace.js';
|
|
19
|
+
export { workspaceAiClient } from './client/workspace-ai.js';
|
|
19
20
|
export { workspaceManagerClient } from './client/workspace-manager.js';
|
|
20
21
|
export { workspaceSearchClient } from './client/workspace-search.js';
|
|
21
22
|
export { DefaultAPIError } from './error/DefaultAPIError.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAC7D,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAA;AAC5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAChD,cAAc,gBAAgB,CAAA;AAC9B,OA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|
7
|
+
import * as Oazapfts from "@oazapfts/runtime";
|
|
8
|
+
import * as QS from "@oazapfts/runtime/query";
|
|
9
|
+
export const defaults: Oazapfts.Defaults<Oazapfts.CustomHeaders> = {
|
|
10
|
+
headers: {},
|
|
11
|
+
baseUrl: "/",
|
|
12
|
+
};
|
|
13
|
+
const oazapfts = Oazapfts.runtime(defaults);
|
|
14
|
+
export const servers = {};
|
|
15
|
+
export type NewWorkspaceRequest = {
|
|
16
|
+
name: string;
|
|
17
|
+
slug: string;
|
|
18
|
+
description?: string | null;
|
|
19
|
+
logo?: string | null;
|
|
20
|
+
};
|
|
21
|
+
export type NewWorkspaceResponse = {
|
|
22
|
+
id: string;
|
|
23
|
+
};
|
|
24
|
+
export type ValidationError = {
|
|
25
|
+
loc: (string | number)[];
|
|
26
|
+
msg: string;
|
|
27
|
+
"type": string;
|
|
28
|
+
};
|
|
29
|
+
export type HttpValidationError = {
|
|
30
|
+
detail?: ValidationError[];
|
|
31
|
+
};
|
|
32
|
+
export type WorkspaceResponse = {
|
|
33
|
+
id: string;
|
|
34
|
+
slug: string;
|
|
35
|
+
name: string;
|
|
36
|
+
description: string | null;
|
|
37
|
+
logo: string | null;
|
|
38
|
+
created_by: string;
|
|
39
|
+
};
|
|
40
|
+
export type UpdateWorkspaceRequest = {
|
|
41
|
+
name: string;
|
|
42
|
+
description?: string | null;
|
|
43
|
+
logo?: string | null;
|
|
44
|
+
};
|
|
45
|
+
export type Action = "edit" | "read" | "manager";
|
|
46
|
+
export type PermissionListRequest = {
|
|
47
|
+
identifier: string;
|
|
48
|
+
action: Action;
|
|
49
|
+
};
|
|
50
|
+
export type PermissionType = "group" | "member";
|
|
51
|
+
export type WorkspacePermissionRequest = {
|
|
52
|
+
permission_list: PermissionListRequest[];
|
|
53
|
+
permission_type: PermissionType;
|
|
54
|
+
};
|
|
55
|
+
export type ResourceType = "knowledge_source" | "quick_command" | "agent" | "stack";
|
|
56
|
+
export type AddWorkspaceResourceRequest = {
|
|
57
|
+
resource_identifier: string[];
|
|
58
|
+
is_account_resource: boolean;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Create Workspace
|
|
62
|
+
*/
|
|
63
|
+
export function createWorkspaceV1WorkspacesPost({ authorization, xAccountId, newWorkspaceRequest }: {
|
|
64
|
+
authorization: string;
|
|
65
|
+
xAccountId?: string | null;
|
|
66
|
+
newWorkspaceRequest: NewWorkspaceRequest;
|
|
67
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
68
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
69
|
+
status: 201;
|
|
70
|
+
data: NewWorkspaceResponse;
|
|
71
|
+
} | {
|
|
72
|
+
status: 404;
|
|
73
|
+
} | {
|
|
74
|
+
status: 422;
|
|
75
|
+
data: HttpValidationError;
|
|
76
|
+
}>("/v1/workspaces", oazapfts.json({
|
|
77
|
+
...opts,
|
|
78
|
+
method: "POST",
|
|
79
|
+
body: newWorkspaceRequest,
|
|
80
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
81
|
+
authorization,
|
|
82
|
+
"x-account-id": xAccountId
|
|
83
|
+
})
|
|
84
|
+
})));
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* List Workspaces
|
|
88
|
+
*/
|
|
89
|
+
export function listWorkspacesV1WorkspacesGet({ authorization, xAccountId }: {
|
|
90
|
+
authorization: string;
|
|
91
|
+
xAccountId?: string | null;
|
|
92
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
93
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
94
|
+
status: 200;
|
|
95
|
+
data: WorkspaceResponse[];
|
|
96
|
+
} | {
|
|
97
|
+
status: 404;
|
|
98
|
+
} | {
|
|
99
|
+
status: 422;
|
|
100
|
+
data: HttpValidationError;
|
|
101
|
+
}>("/v1/workspaces", {
|
|
102
|
+
...opts,
|
|
103
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
104
|
+
authorization,
|
|
105
|
+
"x-account-id": xAccountId
|
|
106
|
+
})
|
|
107
|
+
}));
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Get Workspace By Slug
|
|
111
|
+
*/
|
|
112
|
+
export function getWorkspaceBySlugV1WorkspacesIdGet({ id, authorization, xAccountId }: {
|
|
113
|
+
id: string;
|
|
114
|
+
authorization: string;
|
|
115
|
+
xAccountId?: string | null;
|
|
116
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
117
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
118
|
+
status: 200;
|
|
119
|
+
data: WorkspaceResponse;
|
|
120
|
+
} | {
|
|
121
|
+
status: 404;
|
|
122
|
+
} | {
|
|
123
|
+
status: 422;
|
|
124
|
+
data: HttpValidationError;
|
|
125
|
+
}>(`/v1/workspaces/${encodeURIComponent(id)}`, {
|
|
126
|
+
...opts,
|
|
127
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
128
|
+
authorization,
|
|
129
|
+
"x-account-id": xAccountId
|
|
130
|
+
})
|
|
131
|
+
}));
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Update Workspace
|
|
135
|
+
*/
|
|
136
|
+
export function updateWorkspaceV1WorkspacesWorkspaceIdPatch({ workspaceId, authorization, xAccountId, updateWorkspaceRequest }: {
|
|
137
|
+
workspaceId: string;
|
|
138
|
+
authorization: string;
|
|
139
|
+
xAccountId?: string | null;
|
|
140
|
+
updateWorkspaceRequest: UpdateWorkspaceRequest;
|
|
141
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
142
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
143
|
+
status: 204;
|
|
144
|
+
} | {
|
|
145
|
+
status: 404;
|
|
146
|
+
} | {
|
|
147
|
+
status: 422;
|
|
148
|
+
data: HttpValidationError;
|
|
149
|
+
}>(`/v1/workspaces/${encodeURIComponent(workspaceId)}`, oazapfts.json({
|
|
150
|
+
...opts,
|
|
151
|
+
method: "PATCH",
|
|
152
|
+
body: updateWorkspaceRequest,
|
|
153
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
154
|
+
authorization,
|
|
155
|
+
"x-account-id": xAccountId
|
|
156
|
+
})
|
|
157
|
+
})));
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Delete Workspace
|
|
161
|
+
*/
|
|
162
|
+
export function deleteWorkspaceV1WorkspacesWorkspaceIdDelete({ workspaceId, authorization, xAccountId }: {
|
|
163
|
+
workspaceId: string;
|
|
164
|
+
authorization: string;
|
|
165
|
+
xAccountId?: string | null;
|
|
166
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
167
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
168
|
+
status: 204;
|
|
169
|
+
} | {
|
|
170
|
+
status: 404;
|
|
171
|
+
} | {
|
|
172
|
+
status: 422;
|
|
173
|
+
data: HttpValidationError;
|
|
174
|
+
}>(`/v1/workspaces/${encodeURIComponent(workspaceId)}`, {
|
|
175
|
+
...opts,
|
|
176
|
+
method: "DELETE",
|
|
177
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
178
|
+
authorization,
|
|
179
|
+
"x-account-id": xAccountId
|
|
180
|
+
})
|
|
181
|
+
}));
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Add Permission
|
|
185
|
+
*/
|
|
186
|
+
export function addPermissionV1WorkspacesWorkspaceIdPermissionPatch({ workspaceId, authorization, xAccountId, workspacePermissionRequest }: {
|
|
187
|
+
workspaceId: string;
|
|
188
|
+
authorization: string;
|
|
189
|
+
xAccountId?: string | null;
|
|
190
|
+
workspacePermissionRequest: WorkspacePermissionRequest;
|
|
191
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
192
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
193
|
+
status: 204;
|
|
194
|
+
} | {
|
|
195
|
+
status: 404;
|
|
196
|
+
} | {
|
|
197
|
+
status: 422;
|
|
198
|
+
data: HttpValidationError;
|
|
199
|
+
}>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/permission`, oazapfts.json({
|
|
200
|
+
...opts,
|
|
201
|
+
method: "PATCH",
|
|
202
|
+
body: workspacePermissionRequest,
|
|
203
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
204
|
+
authorization,
|
|
205
|
+
"x-account-id": xAccountId
|
|
206
|
+
})
|
|
207
|
+
})));
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Remove Permission
|
|
211
|
+
*/
|
|
212
|
+
export function removePermissionV1WorkspacesWorkspaceIdPermissionDelete({ workspaceId, authorization, xAccountId, workspacePermissionRequest }: {
|
|
213
|
+
workspaceId: string;
|
|
214
|
+
authorization: string;
|
|
215
|
+
xAccountId?: string | null;
|
|
216
|
+
workspacePermissionRequest: WorkspacePermissionRequest;
|
|
217
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
218
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
219
|
+
status: 204;
|
|
220
|
+
} | {
|
|
221
|
+
status: 404;
|
|
222
|
+
} | {
|
|
223
|
+
status: 422;
|
|
224
|
+
data: HttpValidationError;
|
|
225
|
+
}>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/permission`, oazapfts.json({
|
|
226
|
+
...opts,
|
|
227
|
+
method: "DELETE",
|
|
228
|
+
body: workspacePermissionRequest,
|
|
229
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
230
|
+
authorization,
|
|
231
|
+
"x-account-id": xAccountId
|
|
232
|
+
})
|
|
233
|
+
})));
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* List Groups Permission In Workspace
|
|
237
|
+
*/
|
|
238
|
+
export function listGroupsPermissionInWorkspaceV1WorkspacesWorkspaceIdPermissionsGet({ workspaceId, authorization, xAccountId }: {
|
|
239
|
+
workspaceId: string;
|
|
240
|
+
authorization: string;
|
|
241
|
+
xAccountId?: string | null;
|
|
242
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
243
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
244
|
+
status: 200;
|
|
245
|
+
data: object;
|
|
246
|
+
} | {
|
|
247
|
+
status: 404;
|
|
248
|
+
} | {
|
|
249
|
+
status: 422;
|
|
250
|
+
data: HttpValidationError;
|
|
251
|
+
}>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/permissions`, {
|
|
252
|
+
...opts,
|
|
253
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
254
|
+
authorization,
|
|
255
|
+
"x-account-id": xAccountId
|
|
256
|
+
})
|
|
257
|
+
}));
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* Add Resource
|
|
261
|
+
*/
|
|
262
|
+
export function addResourceV1WorkspacesWorkspaceIdResourceTypePost({ workspaceId, resourceType, authorization, xAccountId, addWorkspaceResourceRequest }: {
|
|
263
|
+
workspaceId: string;
|
|
264
|
+
resourceType: ResourceType;
|
|
265
|
+
authorization: string;
|
|
266
|
+
xAccountId?: string | null;
|
|
267
|
+
addWorkspaceResourceRequest: AddWorkspaceResourceRequest;
|
|
268
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
269
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
270
|
+
status: 200;
|
|
271
|
+
data: object;
|
|
272
|
+
} | {
|
|
273
|
+
status: 404;
|
|
274
|
+
} | {
|
|
275
|
+
status: 422;
|
|
276
|
+
data: HttpValidationError;
|
|
277
|
+
}>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/${encodeURIComponent(resourceType)}`, oazapfts.json({
|
|
278
|
+
...opts,
|
|
279
|
+
method: "POST",
|
|
280
|
+
body: addWorkspaceResourceRequest,
|
|
281
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
282
|
+
authorization,
|
|
283
|
+
"x-account-id": xAccountId
|
|
284
|
+
})
|
|
285
|
+
})));
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* List All By Resource Type
|
|
289
|
+
*/
|
|
290
|
+
export function listAllByResourceTypeV1WorkspacesWorkspaceIdResourceTypeGet({ workspaceId, resourceType, authorization, xAccountId }: {
|
|
291
|
+
workspaceId: string;
|
|
292
|
+
resourceType: ResourceType;
|
|
293
|
+
authorization: string;
|
|
294
|
+
xAccountId?: string | null;
|
|
295
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
296
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
297
|
+
status: 200;
|
|
298
|
+
data: any;
|
|
299
|
+
} | {
|
|
300
|
+
status: 404;
|
|
301
|
+
} | {
|
|
302
|
+
status: 422;
|
|
303
|
+
data: HttpValidationError;
|
|
304
|
+
}>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/${encodeURIComponent(resourceType)}`, {
|
|
305
|
+
...opts,
|
|
306
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
307
|
+
authorization,
|
|
308
|
+
"x-account-id": xAccountId
|
|
309
|
+
})
|
|
310
|
+
}));
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* Remove Resource
|
|
314
|
+
*/
|
|
315
|
+
export function removeResourceV1WorkspacesWorkspaceIdResourceTypeResourceIdDelete({ workspaceId, resourceType, resourceId, authorization, xAccountId }: {
|
|
316
|
+
workspaceId: string;
|
|
317
|
+
resourceType: ResourceType;
|
|
318
|
+
resourceId: string;
|
|
319
|
+
authorization: string;
|
|
320
|
+
xAccountId?: string | null;
|
|
321
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
322
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
323
|
+
status: 204;
|
|
324
|
+
} | {
|
|
325
|
+
status: 404;
|
|
326
|
+
} | {
|
|
327
|
+
status: 422;
|
|
328
|
+
data: HttpValidationError;
|
|
329
|
+
}>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/${encodeURIComponent(resourceType)}/${encodeURIComponent(resourceId)}`, {
|
|
330
|
+
...opts,
|
|
331
|
+
method: "DELETE",
|
|
332
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
333
|
+
authorization,
|
|
334
|
+
"x-account-id": xAccountId
|
|
335
|
+
})
|
|
336
|
+
}));
|
|
337
|
+
}
|
|
338
|
+
/**
|
|
339
|
+
* Healthz
|
|
340
|
+
*/
|
|
341
|
+
export function healthzHealthzGet(opts?: Oazapfts.RequestOpts) {
|
|
342
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
343
|
+
status: 200;
|
|
344
|
+
data: any;
|
|
345
|
+
}>("/healthz", {
|
|
346
|
+
...opts
|
|
347
|
+
}));
|
|
348
|
+
}
|
|
349
|
+
/**
|
|
350
|
+
* Base Get
|
|
351
|
+
*/
|
|
352
|
+
export function baseGetGet(opts?: Oazapfts.RequestOpts) {
|
|
353
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
354
|
+
status: 200;
|
|
355
|
+
data: any;
|
|
356
|
+
}>("/", {
|
|
357
|
+
...opts
|
|
358
|
+
}));
|
|
359
|
+
}
|
package/src/apis.json
CHANGED
|
@@ -7,6 +7,14 @@
|
|
|
7
7
|
},
|
|
8
8
|
"docs": "/openapi.json"
|
|
9
9
|
},
|
|
10
|
+
"workspace-ai": {
|
|
11
|
+
"url": {
|
|
12
|
+
"dev": "https://genai-workspace-ai-api.dev.stackspot.com",
|
|
13
|
+
"stg": "https://genai-workspace-ai-api.stg.stackspot.com",
|
|
14
|
+
"prd": "https://genai-workspace-ai-api.stackspot.com"
|
|
15
|
+
},
|
|
16
|
+
"docs": "/openapi.json"
|
|
17
|
+
},
|
|
10
18
|
"agent": {
|
|
11
19
|
"url": {
|
|
12
20
|
"dev": "https://genai-ai-agent-mgmt-api.dev.stackspot.com",
|
package/src/client/account.ts
CHANGED
|
@@ -92,6 +92,7 @@ import {
|
|
|
92
92
|
updateUser,
|
|
93
93
|
validateNewPartnerData,
|
|
94
94
|
validatePartnerAssociationLimit,
|
|
95
|
+
getResourceMembers,
|
|
95
96
|
} from '../api/account'
|
|
96
97
|
import apis from '../apis.json'
|
|
97
98
|
import { DefaultAPIError } from '../error/DefaultAPIError'
|
|
@@ -687,6 +688,11 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
687
688
|
*/
|
|
688
689
|
deleteExtensionLink = this.mutation(deleteExtensionLink)
|
|
689
690
|
|
|
691
|
+
/**
|
|
692
|
+
* Get members by resource id
|
|
693
|
+
*/
|
|
694
|
+
membersByResourceId = this.query(getResourceMembers)
|
|
695
|
+
|
|
690
696
|
/*
|
|
691
697
|
* Delete profile image
|
|
692
698
|
*/
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { HttpError } from '@oazapfts/runtime'
|
|
2
|
+
import { GetAiStackResponse, KnowledgeSourceItemResponse, QuickCommandResponse } from '../api/ai'
|
|
3
|
+
import {
|
|
4
|
+
addPermissionV1WorkspacesWorkspaceIdPermissionPatch,
|
|
5
|
+
addResourceV1WorkspacesWorkspaceIdResourceTypePost,
|
|
6
|
+
createWorkspaceV1WorkspacesPost,
|
|
7
|
+
defaults,
|
|
8
|
+
deleteWorkspaceV1WorkspacesWorkspaceIdDelete,
|
|
9
|
+
getWorkspaceBySlugV1WorkspacesIdGet,
|
|
10
|
+
HttpValidationError,
|
|
11
|
+
listAllByResourceTypeV1WorkspacesWorkspaceIdResourceTypeGet,
|
|
12
|
+
listGroupsPermissionInWorkspaceV1WorkspacesWorkspaceIdPermissionsGet,
|
|
13
|
+
listWorkspacesV1WorkspacesGet,
|
|
14
|
+
removePermissionV1WorkspacesWorkspaceIdPermissionDelete,
|
|
15
|
+
removeResourceV1WorkspacesWorkspaceIdResourceTypeResourceIdDelete,
|
|
16
|
+
updateWorkspaceV1WorkspacesWorkspaceIdPatch,
|
|
17
|
+
} from '../api/workspace-ai'
|
|
18
|
+
import apis from '../apis.json'
|
|
19
|
+
import { StackspotAPIError } from '../error/StackspotAPIError'
|
|
20
|
+
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
|
|
21
|
+
import { removeAuthorizationParam } from '../utils/remove-authorization-param'
|
|
22
|
+
import { AgentResponse } from '../api/agent'
|
|
23
|
+
|
|
24
|
+
class WorkspaceAiClient extends ReactQueryNetworkClient {
|
|
25
|
+
constructor() {
|
|
26
|
+
super(apis['workspace-ai'].url, defaults)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
protected buildStackSpotError(error: HttpError): StackspotAPIError {
|
|
30
|
+
return new StackspotAPIError({
|
|
31
|
+
status: error.status,
|
|
32
|
+
headers: error.headers,
|
|
33
|
+
stack: error.stack,
|
|
34
|
+
message: (error.data as HttpValidationError | undefined)?.detail?.map(d => d.msg)?.join('\n'),
|
|
35
|
+
})
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
createWorkspaceAi = this.mutation(removeAuthorizationParam(createWorkspaceV1WorkspacesPost))
|
|
39
|
+
workspacesAi = this.query(removeAuthorizationParam(listWorkspacesV1WorkspacesGet))
|
|
40
|
+
workspaceAi = this.query(removeAuthorizationParam(getWorkspaceBySlugV1WorkspacesIdGet))
|
|
41
|
+
updateWorkspaceAi = this.mutation(removeAuthorizationParam(updateWorkspaceV1WorkspacesWorkspaceIdPatch))
|
|
42
|
+
deleteWorkspaceAi = this.mutation(removeAuthorizationParam(deleteWorkspaceV1WorkspacesWorkspaceIdDelete))
|
|
43
|
+
addResourceTypeToWorkspaceAi = this.mutation(removeAuthorizationParam(addResourceV1WorkspacesWorkspaceIdResourceTypePost))
|
|
44
|
+
|
|
45
|
+
getKSFromWorkspaceAi = this.query({
|
|
46
|
+
name: 'KsWorkspaceAi',
|
|
47
|
+
request: (
|
|
48
|
+
signal,
|
|
49
|
+
variables: Omit<Parameters<typeof listAllByResourceTypeV1WorkspacesWorkspaceIdResourceTypeGet>[0],
|
|
50
|
+
'authorization' | 'resourceType'>,
|
|
51
|
+
) =>
|
|
52
|
+
listAllByResourceTypeV1WorkspacesWorkspaceIdResourceTypeGet({ ...variables, resourceType: 'knowledge_source', authorization: '' },
|
|
53
|
+
{ signal }) as unknown as Promise<KnowledgeSourceItemResponse[]>,
|
|
54
|
+
permission: this.createPermissionFunctionFor(listAllByResourceTypeV1WorkspacesWorkspaceIdResourceTypeGet),
|
|
55
|
+
})
|
|
56
|
+
|
|
57
|
+
getStackFromWorkspaceAi = this.query({
|
|
58
|
+
name: 'StackWorkspaceAi',
|
|
59
|
+
request: (
|
|
60
|
+
signal,
|
|
61
|
+
variables: Omit<Parameters<typeof listAllByResourceTypeV1WorkspacesWorkspaceIdResourceTypeGet>[0],
|
|
62
|
+
'authorization' | 'resourceType'>,
|
|
63
|
+
) =>
|
|
64
|
+
listAllByResourceTypeV1WorkspacesWorkspaceIdResourceTypeGet({ ...variables, resourceType: 'stack', authorization: '' },
|
|
65
|
+
{ signal }) as unknown as Promise<GetAiStackResponse[]>,
|
|
66
|
+
permission: this.createPermissionFunctionFor(listAllByResourceTypeV1WorkspacesWorkspaceIdResourceTypeGet),
|
|
67
|
+
})
|
|
68
|
+
|
|
69
|
+
getQCFromWorkspaceAi = this.query({
|
|
70
|
+
name: 'QcWorkspaceAi',
|
|
71
|
+
request: (
|
|
72
|
+
signal,
|
|
73
|
+
variables: Omit<Parameters<typeof listAllByResourceTypeV1WorkspacesWorkspaceIdResourceTypeGet>[0],
|
|
74
|
+
'authorization' | 'resourceType'>,
|
|
75
|
+
) =>
|
|
76
|
+
listAllByResourceTypeV1WorkspacesWorkspaceIdResourceTypeGet({ ...variables, resourceType: 'quick_command', authorization: '' },
|
|
77
|
+
{ signal }) as unknown as Promise<QuickCommandResponse[]>,
|
|
78
|
+
permission: this.createPermissionFunctionFor(listAllByResourceTypeV1WorkspacesWorkspaceIdResourceTypeGet),
|
|
79
|
+
})
|
|
80
|
+
|
|
81
|
+
getAgentFromWorkspaceAi = this.query({
|
|
82
|
+
name: 'AgentWorkspaceAi',
|
|
83
|
+
request: (
|
|
84
|
+
signal,
|
|
85
|
+
variables: Omit<Parameters<typeof listAllByResourceTypeV1WorkspacesWorkspaceIdResourceTypeGet>[0],
|
|
86
|
+
'authorization' | 'resourceType'>,
|
|
87
|
+
) =>
|
|
88
|
+
listAllByResourceTypeV1WorkspacesWorkspaceIdResourceTypeGet({ ...variables, resourceType: 'agent', authorization: '' },
|
|
89
|
+
{ signal }) as unknown as Promise<AgentResponse[]>,
|
|
90
|
+
permission: this.createPermissionFunctionFor(listAllByResourceTypeV1WorkspacesWorkspaceIdResourceTypeGet),
|
|
91
|
+
})
|
|
92
|
+
|
|
93
|
+
deleteResourceTypeFromWorkspaceAi = this.mutation(removeAuthorizationParam(
|
|
94
|
+
removeResourceV1WorkspacesWorkspaceIdResourceTypeResourceIdDelete))
|
|
95
|
+
addPermissionToWorkspaceAi = this.mutation(removeAuthorizationParam(addPermissionV1WorkspacesWorkspaceIdPermissionPatch))
|
|
96
|
+
editPermissionToWorkspaceAi = this.mutation(removeAuthorizationParam(updateWorkspaceV1WorkspacesWorkspaceIdPatch))
|
|
97
|
+
removePermissionToWorkspaceAi = this.mutation(removeAuthorizationParam(removePermissionV1WorkspacesWorkspaceIdPermissionDelete))
|
|
98
|
+
groupsOfWorkspaceAi = this.mutation(removeAuthorizationParam(listGroupsPermissionInWorkspaceV1WorkspacesWorkspaceIdPermissionsGet))
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export const workspaceAiClient = new WorkspaceAiClient()
|