@stack-spot/portal-network 0.77.1 → 0.79.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.
@@ -0,0 +1,121 @@
1
+ import { addPermissionV1WorkspacesWorkspaceIdPermissionPatch, addResourceV1WorkspacesWorkspaceIdResourceTypePost, createWorkspaceV1WorkspacesPost, defaults, deleteWorkspaceV1WorkspacesWorkspaceIdDelete, getWorkspaceByIdV1WorkspacesIdGet, listAllByResourceTypeV1WorkspacesWorkspaceIdResourceTypeGet, listGroupsAndMembersPermissionInWorkspaceV1WorkspacesWorkspaceIdPermissionsGet, 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(getWorkspaceByIdV1WorkspacesIdGet))
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, "removePermissionToWorkspaceAi", {
98
+ enumerable: true,
99
+ configurable: true,
100
+ writable: true,
101
+ value: this.mutation(removeAuthorizationParam(removePermissionV1WorkspacesWorkspaceIdPermissionDelete))
102
+ });
103
+ // eslint-disable-next-line max-len
104
+ Object.defineProperty(this, "groupsOfWorkspaceAi", {
105
+ enumerable: true,
106
+ configurable: true,
107
+ writable: true,
108
+ value: this.query(removeAuthorizationParam(listGroupsAndMembersPermissionInWorkspaceV1WorkspacesWorkspaceIdPermissionsGet))
109
+ });
110
+ }
111
+ buildStackSpotError(error) {
112
+ return new StackspotAPIError({
113
+ status: error.status,
114
+ headers: error.headers,
115
+ stack: error.stack,
116
+ message: error.data?.detail?.map(d => d.msg)?.join('\n'),
117
+ });
118
+ }
119
+ }
120
+ export const workspaceAiClient = new WorkspaceAiClient();
121
+ //# sourceMappingURL=workspace-ai.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worksp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iE,CAAC,CAAC;WAAA;QACrE;;;;mBAA6B,IAAI,CAAC,QAAQ,CAAC,wBAAwB,CAAC,mDAAmD,CAAC,CAAC;WAAA;QACzH;;;;mBAAgC,IAAI,CAAC,QAAQ,CAAC,wBAAwB,CAAC,uDAAuD,CAAC,CAAC;WAAA;QAChI,mCAAmC;QACnC;;;;mBAAsB,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,8EAA8E,CAAiJ,CAAC;WAAA;IAvE1R,CAAC;IAES,mBAAmB,CAAC,KAAgB;QAC5C,OAAO,IAAI,iBAAiB,CAAC;YAC3B,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,OAAO,EAAG,KAAK,CAAC,IAAwC,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC;SAC9F,CAAC,CAAA;IACJ,CAAC;CA+DF;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,iBAAiB,EAAE,CAAA"}
package/dist/index.d.ts CHANGED
@@ -16,6 +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';
@@ -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,gBAA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AAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAA;AACnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAC1D,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAA;AAC5F,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA"}
package/dist/index.js CHANGED
@@ -16,6 +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,EA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E,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAE1D,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stack-spot/portal-network",
3
- "version": "0.77.1",
3
+ "version": "0.79.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -0,0 +1,367 @@
1
+ /**
2
+ * FastAPI
3
+ * 0.1.0
4
+ * DO NOT MODIFY - This file has been generated using oazapfts.
5
+ * See https://www.npmjs.com/package/oazapfts
6
+ */
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 OrderEnum = "a-to-z" | "z-to-a" | "oldest-first" | "newest-first";
33
+ export type WorkspaceResponse = {
34
+ id: string;
35
+ slug: string;
36
+ name: string;
37
+ description?: string | null;
38
+ logo?: string | null;
39
+ created_by: string;
40
+ };
41
+ export type UpdateWorkspaceRequest = {
42
+ name: string;
43
+ description?: string | null;
44
+ logo?: string | null;
45
+ };
46
+ export type Action = "edit" | "read" | "manager";
47
+ export type PermissionListRequest = {
48
+ identifier: string;
49
+ action: Action;
50
+ };
51
+ export type PermissionType = "group" | "member";
52
+ export type WorkspacePermissionRequest = {
53
+ permission_list: PermissionListRequest[];
54
+ permission_type: PermissionType;
55
+ };
56
+ export type ResourceType = "knowledge_source" | "quick_command" | "agent" | "stack";
57
+ export type AddWorkspaceResourceRequest = {
58
+ resource_identifier: string[];
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({ order, name, authorization, xAccountId }: {
90
+ order?: OrderEnum;
91
+ name?: string | null;
92
+ authorization: string;
93
+ xAccountId?: string | null;
94
+ }, opts?: Oazapfts.RequestOpts) {
95
+ return oazapfts.ok(oazapfts.fetchJson<{
96
+ status: 200;
97
+ data: WorkspaceResponse[];
98
+ } | {
99
+ status: 404;
100
+ } | {
101
+ status: 422;
102
+ data: HttpValidationError;
103
+ }>(`/v1/workspaces${QS.query(QS.explode({
104
+ order,
105
+ name
106
+ }))}`, {
107
+ ...opts,
108
+ headers: oazapfts.mergeHeaders(opts?.headers, {
109
+ authorization,
110
+ "x-account-id": xAccountId
111
+ })
112
+ }));
113
+ }
114
+ /**
115
+ * Get Workspace By Id
116
+ */
117
+ export function getWorkspaceByIdV1WorkspacesIdGet({ id, authorization, xAccountId }: {
118
+ id: string;
119
+ authorization: string;
120
+ xAccountId?: string | null;
121
+ }, opts?: Oazapfts.RequestOpts) {
122
+ return oazapfts.ok(oazapfts.fetchJson<{
123
+ status: 200;
124
+ data: WorkspaceResponse;
125
+ } | {
126
+ status: 404;
127
+ } | {
128
+ status: 422;
129
+ data: HttpValidationError;
130
+ }>(`/v1/workspaces/${encodeURIComponent(id)}`, {
131
+ ...opts,
132
+ headers: oazapfts.mergeHeaders(opts?.headers, {
133
+ authorization,
134
+ "x-account-id": xAccountId
135
+ })
136
+ }));
137
+ }
138
+ /**
139
+ * Update Workspace
140
+ */
141
+ export function updateWorkspaceV1WorkspacesWorkspaceIdPatch({ workspaceId, authorization, xAccountId, updateWorkspaceRequest }: {
142
+ workspaceId: string;
143
+ authorization: string;
144
+ xAccountId?: string | null;
145
+ updateWorkspaceRequest: UpdateWorkspaceRequest;
146
+ }, opts?: Oazapfts.RequestOpts) {
147
+ return oazapfts.ok(oazapfts.fetchJson<{
148
+ status: 204;
149
+ } | {
150
+ status: 404;
151
+ } | {
152
+ status: 422;
153
+ data: HttpValidationError;
154
+ }>(`/v1/workspaces/${encodeURIComponent(workspaceId)}`, oazapfts.json({
155
+ ...opts,
156
+ method: "PATCH",
157
+ body: updateWorkspaceRequest,
158
+ headers: oazapfts.mergeHeaders(opts?.headers, {
159
+ authorization,
160
+ "x-account-id": xAccountId
161
+ })
162
+ })));
163
+ }
164
+ /**
165
+ * Delete Workspace
166
+ */
167
+ export function deleteWorkspaceV1WorkspacesWorkspaceIdDelete({ workspaceId, authorization, xAccountId }: {
168
+ workspaceId: string;
169
+ authorization: string;
170
+ xAccountId?: string | null;
171
+ }, opts?: Oazapfts.RequestOpts) {
172
+ return oazapfts.ok(oazapfts.fetchJson<{
173
+ status: 204;
174
+ } | {
175
+ status: 404;
176
+ } | {
177
+ status: 422;
178
+ data: HttpValidationError;
179
+ }>(`/v1/workspaces/${encodeURIComponent(workspaceId)}`, {
180
+ ...opts,
181
+ method: "DELETE",
182
+ headers: oazapfts.mergeHeaders(opts?.headers, {
183
+ authorization,
184
+ "x-account-id": xAccountId
185
+ })
186
+ }));
187
+ }
188
+ /**
189
+ * Add Permission
190
+ */
191
+ export function addPermissionV1WorkspacesWorkspaceIdPermissionPatch({ workspaceId, authorization, xAccountId, workspacePermissionRequest }: {
192
+ workspaceId: string;
193
+ authorization: string;
194
+ xAccountId?: string | null;
195
+ workspacePermissionRequest: WorkspacePermissionRequest;
196
+ }, opts?: Oazapfts.RequestOpts) {
197
+ return oazapfts.ok(oazapfts.fetchJson<{
198
+ status: 204;
199
+ } | {
200
+ status: 404;
201
+ } | {
202
+ status: 422;
203
+ data: HttpValidationError;
204
+ }>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/permission`, oazapfts.json({
205
+ ...opts,
206
+ method: "PATCH",
207
+ body: workspacePermissionRequest,
208
+ headers: oazapfts.mergeHeaders(opts?.headers, {
209
+ authorization,
210
+ "x-account-id": xAccountId
211
+ })
212
+ })));
213
+ }
214
+ /**
215
+ * Remove Permission
216
+ */
217
+ export function removePermissionV1WorkspacesWorkspaceIdPermissionDelete({ workspaceId, authorization, xAccountId, workspacePermissionRequest }: {
218
+ workspaceId: string;
219
+ authorization: string;
220
+ xAccountId?: string | null;
221
+ workspacePermissionRequest: WorkspacePermissionRequest;
222
+ }, opts?: Oazapfts.RequestOpts) {
223
+ return oazapfts.ok(oazapfts.fetchJson<{
224
+ status: 204;
225
+ } | {
226
+ status: 404;
227
+ } | {
228
+ status: 422;
229
+ data: HttpValidationError;
230
+ }>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/permission`, oazapfts.json({
231
+ ...opts,
232
+ method: "DELETE",
233
+ body: workspacePermissionRequest,
234
+ headers: oazapfts.mergeHeaders(opts?.headers, {
235
+ authorization,
236
+ "x-account-id": xAccountId
237
+ })
238
+ })));
239
+ }
240
+ /**
241
+ * List Groups And Members Permission In Workspace
242
+ */
243
+ export function listGroupsAndMembersPermissionInWorkspaceV1WorkspacesWorkspaceIdPermissionsGet({ workspaceId, authorization, xAccountId }: {
244
+ workspaceId: string;
245
+ authorization: string;
246
+ xAccountId?: string | null;
247
+ }, opts?: Oazapfts.RequestOpts) {
248
+ return oazapfts.ok(oazapfts.fetchJson<{
249
+ status: 200;
250
+ data: object;
251
+ } | {
252
+ status: 404;
253
+ } | {
254
+ status: 422;
255
+ data: HttpValidationError;
256
+ }>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/permissions`, {
257
+ ...opts,
258
+ headers: oazapfts.mergeHeaders(opts?.headers, {
259
+ authorization,
260
+ "x-account-id": xAccountId
261
+ })
262
+ }));
263
+ }
264
+ /**
265
+ * Add Resource
266
+ */
267
+ export function addResourceV1WorkspacesWorkspaceIdResourceTypePost({ workspaceId, resourceType, authorization, xAccountId, addWorkspaceResourceRequest }: {
268
+ workspaceId: string;
269
+ resourceType: ResourceType;
270
+ authorization: string;
271
+ xAccountId?: string | null;
272
+ addWorkspaceResourceRequest: AddWorkspaceResourceRequest;
273
+ }, opts?: Oazapfts.RequestOpts) {
274
+ return oazapfts.ok(oazapfts.fetchJson<{
275
+ status: 200;
276
+ data: object;
277
+ } | {
278
+ status: 404;
279
+ } | {
280
+ status: 422;
281
+ data: HttpValidationError;
282
+ }>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/${encodeURIComponent(resourceType)}`, oazapfts.json({
283
+ ...opts,
284
+ method: "POST",
285
+ body: addWorkspaceResourceRequest,
286
+ headers: oazapfts.mergeHeaders(opts?.headers, {
287
+ authorization,
288
+ "x-account-id": xAccountId
289
+ })
290
+ })));
291
+ }
292
+ /**
293
+ * List All By Resource Type
294
+ */
295
+ export function listAllByResourceTypeV1WorkspacesWorkspaceIdResourceTypeGet({ workspaceId, resourceType, name, authorization, xAccountId }: {
296
+ workspaceId: string;
297
+ resourceType: ResourceType;
298
+ name?: string | null;
299
+ authorization: string;
300
+ xAccountId?: string | null;
301
+ }, opts?: Oazapfts.RequestOpts) {
302
+ return oazapfts.ok(oazapfts.fetchJson<{
303
+ status: 200;
304
+ data: any;
305
+ } | {
306
+ status: 404;
307
+ } | {
308
+ status: 422;
309
+ data: HttpValidationError;
310
+ }>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/${encodeURIComponent(resourceType)}${QS.query(QS.explode({
311
+ name
312
+ }))}`, {
313
+ ...opts,
314
+ headers: oazapfts.mergeHeaders(opts?.headers, {
315
+ authorization,
316
+ "x-account-id": xAccountId
317
+ })
318
+ }));
319
+ }
320
+ /**
321
+ * Remove Resource
322
+ */
323
+ export function removeResourceV1WorkspacesWorkspaceIdResourceTypeResourceIdDelete({ workspaceId, resourceType, resourceId, authorization, xAccountId }: {
324
+ workspaceId: string;
325
+ resourceType: ResourceType;
326
+ resourceId: string;
327
+ authorization: string;
328
+ xAccountId?: string | null;
329
+ }, opts?: Oazapfts.RequestOpts) {
330
+ return oazapfts.ok(oazapfts.fetchJson<{
331
+ status: 204;
332
+ } | {
333
+ status: 404;
334
+ } | {
335
+ status: 422;
336
+ data: HttpValidationError;
337
+ }>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/${encodeURIComponent(resourceType)}/${encodeURIComponent(resourceId)}`, {
338
+ ...opts,
339
+ method: "DELETE",
340
+ headers: oazapfts.mergeHeaders(opts?.headers, {
341
+ authorization,
342
+ "x-account-id": xAccountId
343
+ })
344
+ }));
345
+ }
346
+ /**
347
+ * Healthz
348
+ */
349
+ export function healthzHealthzGet(opts?: Oazapfts.RequestOpts) {
350
+ return oazapfts.ok(oazapfts.fetchJson<{
351
+ status: 200;
352
+ data: any;
353
+ }>("/healthz", {
354
+ ...opts
355
+ }));
356
+ }
357
+ /**
358
+ * Base Get
359
+ */
360
+ export function baseGetGet(opts?: Oazapfts.RequestOpts) {
361
+ return oazapfts.ok(oazapfts.fetchJson<{
362
+ status: 200;
363
+ data: any;
364
+ }>("/", {
365
+ ...opts
366
+ }));
367
+ }
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",
@@ -22,7 +22,7 @@ import {
22
22
  deleteGroupMapping,
23
23
  deleteMember,
24
24
  deleteMemberFavorite,
25
- deletePartner, deleteProfileImage,
25
+ deletePartner, deleteProfileImage,
26
26
  deleteResourceFromGroup, deleteRole, deleteSso, deleteV1GroupsByGroupId, disablePersonalAccessTokenGeneration,
27
27
  disassociateGroupToServiceCredential, enableFidoCredentials,
28
28
  getAccess,
@@ -91,7 +91,7 @@ import {
91
91
  updateSso,
92
92
  updateUser,
93
93
  validateNewPartnerData,
94
- validatePartnerAssociationLimit,
94
+ validatePartnerAssociationLimit
95
95
  } from '../api/account'
96
96
  import apis from '../apis.json'
97
97
  import { DefaultAPIError } from '../error/DefaultAPIError'
@@ -1,5 +1,5 @@
1
1
  import { RequestOpts } from '@oazapfts/runtime'
2
- import { AccountScmInfoSaveRequest, AccountScmInfoUpdateRequest, AccountScmStatusResponse } from '../api/account'
2
+ import { AccountScmInfoSaveRequest, AccountScmInfoUpdateRequest, AccountScmStatusResponse, GroupsFromResourceResponse, MembersFromResourceResponse } from '../api/account'
3
3
  import { ChatRequest2, 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'
@@ -197,6 +197,11 @@ export interface FixedConversationResponse extends ConversationResponse {
197
197
  history?: FixedConversationHistoryResponse[],
198
198
  }
199
199
 
200
+ export interface FixedWorkspaceAiPermissions {
201
+ members?: MembersFromResourceResponse[],
202
+ groups?: GroupsFromResourceResponse[],
203
+ }
204
+
200
205
  export type OazapftsFunction<Variables = any, Result = any> = (variables: Variables, opts?: RequestOpts) => Promise<Result>
201
206
 
202
207
  type Unpromisify<T> = T extends Promise<infer R> ? Unpromisify<R> : T