@stack-spot/portal-network 0.102.0 → 0.104.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/agent-tools.d.ts +131 -0
- package/dist/api/agent-tools.d.ts.map +1 -0
- package/dist/api/agent-tools.js +114 -0
- package/dist/api/agent-tools.js.map +1 -0
- package/dist/api/ai.d.ts +128 -25
- package/dist/api/ai.d.ts.map +1 -1
- package/dist/api/ai.js +106 -0
- package/dist/api/ai.js.map +1 -1
- package/dist/apis.json +8 -0
- package/dist/client/account.d.ts +4 -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/agent-tools.d.ts +11 -0
- package/dist/client/agent-tools.d.ts.map +1 -0
- package/dist/client/agent-tools.js +25 -0
- package/dist/client/agent-tools.js.map +1 -0
- package/dist/client/ai.d.ts +7 -0
- package/dist/client/ai.d.ts.map +1 -1
- package/dist/client/ai.js +10 -1
- package/dist/client/ai.js.map +1 -1
- 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/agent-tools.ts +255 -0
- package/src/api/ai.ts +264 -25
- package/src/apis.json +8 -0
- package/src/client/account.ts +5 -0
- package/src/client/agent-tools.ts +24 -0
- package/src/client/ai.ts +5 -0
- package/src/index.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.104.0](https://github.com/stack-spot/portal-commons/compare/portal-network@v0.103.0...portal-network@v0.104.0) (2025-03-25)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* Add tokens usage ([#844](https://github.com/stack-spot/portal-commons/issues/844)) ([52a27cd](https://github.com/stack-spot/portal-commons/commit/52a27cd3ac6a3c2fb8ed25ae7edce128f22c31d7))
|
|
9
|
+
|
|
10
|
+
## [0.103.0](https://github.com/stack-spot/portal-commons/compare/portal-network@v0.102.0...portal-network@v0.103.0) (2025-03-25)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* Add remove account ([#841](https://github.com/stack-spot/portal-commons/issues/841)) ([df178f6](https://github.com/stack-spot/portal-commons/commit/df178f6da859e79c62770204596cd138053daec0))
|
|
16
|
+
* tools ([#843](https://github.com/stack-spot/portal-commons/issues/843)) ([fb8aeb6](https://github.com/stack-spot/portal-commons/commit/fb8aeb6439408f039a25f36f302c49f0970a956d))
|
|
17
|
+
|
|
3
18
|
## [0.102.0](https://github.com/stack-spot/portal-commons/compare/portal-network@v0.101.0...portal-network@v0.102.0) (2025-03-24)
|
|
4
19
|
|
|
5
20
|
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* genAI Agent Application
|
|
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
|
+
export declare const defaults: Oazapfts.Defaults<Oazapfts.CustomHeaders>;
|
|
9
|
+
export declare const servers: {};
|
|
10
|
+
export type BuiltinToolResponse = {
|
|
11
|
+
id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
description: string;
|
|
14
|
+
};
|
|
15
|
+
export type BuiltinToolkitResponse = {
|
|
16
|
+
id: string;
|
|
17
|
+
name: string;
|
|
18
|
+
description: string;
|
|
19
|
+
image_url: string;
|
|
20
|
+
tools: BuiltinToolResponse[];
|
|
21
|
+
};
|
|
22
|
+
export type AssignToolsToAgentRequest = {
|
|
23
|
+
builtin_tool_ids?: string[] | null;
|
|
24
|
+
tool_ids?: string[] | null;
|
|
25
|
+
};
|
|
26
|
+
export type ValidationError = {
|
|
27
|
+
loc: (string | number)[];
|
|
28
|
+
msg: string;
|
|
29
|
+
"type": string;
|
|
30
|
+
};
|
|
31
|
+
export type HttpValidationError = {
|
|
32
|
+
detail?: ValidationError[];
|
|
33
|
+
};
|
|
34
|
+
export type SchemaEnum = "OPENAI";
|
|
35
|
+
export type FunctionParameter = {
|
|
36
|
+
/** The type of the parameter */
|
|
37
|
+
"type": string;
|
|
38
|
+
/** A description of the parameter (optional) */
|
|
39
|
+
description?: string | null;
|
|
40
|
+
/** A list of possible values for the parameter (optional) */
|
|
41
|
+
"enum"?: string[] | null;
|
|
42
|
+
/** A dictionary of properties for the parameter (optional) */
|
|
43
|
+
properties?: object | null;
|
|
44
|
+
/** A list of required parameters (optional) */
|
|
45
|
+
required?: string[] | null;
|
|
46
|
+
/** Allow arbitrary data of specific typed */
|
|
47
|
+
additionalProperties?: boolean;
|
|
48
|
+
};
|
|
49
|
+
export type Function = {
|
|
50
|
+
/** The name of the function */
|
|
51
|
+
name: string;
|
|
52
|
+
/** A description of what the function does */
|
|
53
|
+
description: string;
|
|
54
|
+
/** The parameters required by the function */
|
|
55
|
+
parameters: FunctionParameter;
|
|
56
|
+
/** Strict specific schema response. Only `strict` function tools can be auto-parsed */
|
|
57
|
+
strict: boolean;
|
|
58
|
+
};
|
|
59
|
+
export type OpenAiTool = {
|
|
60
|
+
/** The type of the tool; must be 'function' */
|
|
61
|
+
"type": "function";
|
|
62
|
+
/** The function associated with this tool */
|
|
63
|
+
"function": Function;
|
|
64
|
+
};
|
|
65
|
+
export type ExecuteAgentToolRequest = {
|
|
66
|
+
arguments: string;
|
|
67
|
+
};
|
|
68
|
+
export type AgentToolExecutionResponse = {
|
|
69
|
+
result: string;
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* Health Check
|
|
73
|
+
*/
|
|
74
|
+
export declare function healthCheckHealthzGet(opts?: Oazapfts.RequestOpts): Promise<any>;
|
|
75
|
+
/**
|
|
76
|
+
* Health Check
|
|
77
|
+
*/
|
|
78
|
+
export declare function healthCheckReadyzGet(opts?: Oazapfts.RequestOpts): Promise<any>;
|
|
79
|
+
/**
|
|
80
|
+
* Get Public Tool Kits
|
|
81
|
+
*/
|
|
82
|
+
export declare function getPublicToolKitsV1BuiltinToolkitGet(opts?: Oazapfts.RequestOpts): Promise<BuiltinToolkitResponse[]>;
|
|
83
|
+
/**
|
|
84
|
+
* Assign Tools
|
|
85
|
+
*/
|
|
86
|
+
export declare function assignToolsV1AgentsAgentIdToolsPost({ agentId, isPublic, xAccountId, authorization, assignToolsToAgentRequest }: {
|
|
87
|
+
agentId: string;
|
|
88
|
+
isPublic?: boolean;
|
|
89
|
+
xAccountId?: string | null;
|
|
90
|
+
authorization: string;
|
|
91
|
+
assignToolsToAgentRequest: AssignToolsToAgentRequest;
|
|
92
|
+
}, opts?: Oazapfts.RequestOpts): Promise<unknown>;
|
|
93
|
+
/**
|
|
94
|
+
* List Tools
|
|
95
|
+
*/
|
|
96
|
+
export declare function listToolsV1AgentsAgentIdToolsGet({ agentId, isPublic, xAccountId, authorization }: {
|
|
97
|
+
agentId: string;
|
|
98
|
+
isPublic?: boolean;
|
|
99
|
+
xAccountId?: string | null;
|
|
100
|
+
authorization: string;
|
|
101
|
+
}, opts?: Oazapfts.RequestOpts): Promise<any>;
|
|
102
|
+
/**
|
|
103
|
+
* Delete Tools
|
|
104
|
+
*/
|
|
105
|
+
export declare function deleteToolsV1AgentsAgentIdToolsDelete({ agentId, isPublic, xAccountId, authorization }: {
|
|
106
|
+
agentId: string;
|
|
107
|
+
isPublic?: boolean;
|
|
108
|
+
xAccountId?: string | null;
|
|
109
|
+
authorization: string;
|
|
110
|
+
}, opts?: Oazapfts.RequestOpts): Promise<unknown>;
|
|
111
|
+
/**
|
|
112
|
+
* List Tools By Agent For Schema
|
|
113
|
+
*/
|
|
114
|
+
export declare function listToolsByAgentForSchemaV1AgentsAgentIdToolsSchemaSchemaGet({ agentId, schema, isPublic, xAccountId, authorization }: {
|
|
115
|
+
agentId: string;
|
|
116
|
+
schema: SchemaEnum;
|
|
117
|
+
isPublic?: boolean;
|
|
118
|
+
xAccountId?: string | null;
|
|
119
|
+
authorization: string;
|
|
120
|
+
}, opts?: Oazapfts.RequestOpts): Promise<(object | OpenAiTool)[]>;
|
|
121
|
+
/**
|
|
122
|
+
* Execute Tool
|
|
123
|
+
*/
|
|
124
|
+
export declare function executeToolV1AgentsToolsAgentToolIdExecutePost({ agentToolId, isPublic, xAccountId, authorization, executeAgentToolRequest }: {
|
|
125
|
+
agentToolId: string;
|
|
126
|
+
isPublic?: boolean;
|
|
127
|
+
xAccountId?: string | null;
|
|
128
|
+
authorization: string;
|
|
129
|
+
executeAgentToolRequest: ExecuteAgentToolRequest;
|
|
130
|
+
}, opts?: Oazapfts.RequestOpts): Promise<AgentToolExecutionResponse>;
|
|
131
|
+
//# sourceMappingURL=agent-tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-tools.d.ts","sourceRoot":"","sources":["../../src/api/agent-tools.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAC;AAE9C,eAAO,MAAM,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC,aAAa,CAG9D,CAAC;AAEF,eAAO,MAAM,OAAO,IAAK,CAAC;AAC1B,MAAM,MAAM,mBAAmB,GAAG;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACvB,CAAC;AACF,MAAM,MAAM,sBAAsB,GAAG;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,mBAAmB,EAAE,CAAC;CAChC,CAAC;AACF,MAAM,MAAM,yBAAyB,GAAG;IACpC,gBAAg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AC3B,aAAa,EAAE,MAAM,CAAC;CACzB,EAAE,IAAI,CAAC,EAAE,QAAQ,CAAC,WAAW,oBAkB7B;AACD;;GAEG;AACH,wBAAgB,4DAA4D,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,aAAa,EAAE,EAAE;IACnI,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,UAAU,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC;CACzB,EAAE,IAAI,CAAC,EAAE,QAAQ,CAAC,WAAW,oCAkB7B;AACD;;GAEG;AACH,wBAAgB,8CAA8C,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,aAAa,EAAE,uBAAuB,EAAE,EAAE;IAC1I,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,uBAAuB,EAAE,uBAAuB,CAAC;CACpD,EAAE,IAAI,CAAC,EAAE,QAAQ,CAAC,WAAW,uCAoB7B"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* genAI Agent Application
|
|
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 = {
|
|
10
|
+
headers: {},
|
|
11
|
+
baseUrl: "/",
|
|
12
|
+
};
|
|
13
|
+
const oazapfts = Oazapfts.runtime(defaults);
|
|
14
|
+
export const servers = {};
|
|
15
|
+
/**
|
|
16
|
+
* Health Check
|
|
17
|
+
*/
|
|
18
|
+
export function healthCheckHealthzGet(opts) {
|
|
19
|
+
return oazapfts.ok(oazapfts.fetchJson("/healthz", {
|
|
20
|
+
...opts
|
|
21
|
+
}));
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Health Check
|
|
25
|
+
*/
|
|
26
|
+
export function healthCheckReadyzGet(opts) {
|
|
27
|
+
return oazapfts.ok(oazapfts.fetchJson("/readyz", {
|
|
28
|
+
...opts
|
|
29
|
+
}));
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Get Public Tool Kits
|
|
33
|
+
*/
|
|
34
|
+
export function getPublicToolKitsV1BuiltinToolkitGet(opts) {
|
|
35
|
+
return oazapfts.ok(oazapfts.fetchJson("/v1/builtin/toolkit", {
|
|
36
|
+
...opts
|
|
37
|
+
}));
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Assign Tools
|
|
41
|
+
*/
|
|
42
|
+
export function assignToolsV1AgentsAgentIdToolsPost({ agentId, isPublic, xAccountId, authorization, assignToolsToAgentRequest }, opts) {
|
|
43
|
+
return oazapfts.ok(oazapfts.fetchJson(`/v1/agents/${encodeURIComponent(agentId)}/tools${QS.query(QS.explode({
|
|
44
|
+
is_public: isPublic
|
|
45
|
+
}))}`, oazapfts.json({
|
|
46
|
+
...opts,
|
|
47
|
+
method: "POST",
|
|
48
|
+
body: assignToolsToAgentRequest,
|
|
49
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
50
|
+
"x-account-id": xAccountId,
|
|
51
|
+
authorization
|
|
52
|
+
})
|
|
53
|
+
})));
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* List Tools
|
|
57
|
+
*/
|
|
58
|
+
export function listToolsV1AgentsAgentIdToolsGet({ agentId, isPublic, xAccountId, authorization }, opts) {
|
|
59
|
+
return oazapfts.ok(oazapfts.fetchJson(`/v1/agents/${encodeURIComponent(agentId)}/tools${QS.query(QS.explode({
|
|
60
|
+
is_public: isPublic
|
|
61
|
+
}))}`, {
|
|
62
|
+
...opts,
|
|
63
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
64
|
+
"x-account-id": xAccountId,
|
|
65
|
+
authorization
|
|
66
|
+
})
|
|
67
|
+
}));
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Delete Tools
|
|
71
|
+
*/
|
|
72
|
+
export function deleteToolsV1AgentsAgentIdToolsDelete({ agentId, isPublic, xAccountId, authorization }, opts) {
|
|
73
|
+
return oazapfts.ok(oazapfts.fetchJson(`/v1/agents/${encodeURIComponent(agentId)}/tools${QS.query(QS.explode({
|
|
74
|
+
is_public: isPublic
|
|
75
|
+
}))}`, {
|
|
76
|
+
...opts,
|
|
77
|
+
method: "DELETE",
|
|
78
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
79
|
+
"x-account-id": xAccountId,
|
|
80
|
+
authorization
|
|
81
|
+
})
|
|
82
|
+
}));
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* List Tools By Agent For Schema
|
|
86
|
+
*/
|
|
87
|
+
export function listToolsByAgentForSchemaV1AgentsAgentIdToolsSchemaSchemaGet({ agentId, schema, isPublic, xAccountId, authorization }, opts) {
|
|
88
|
+
return oazapfts.ok(oazapfts.fetchJson(`/v1/agents/${encodeURIComponent(agentId)}/tools/schema/${encodeURIComponent(schema)}${QS.query(QS.explode({
|
|
89
|
+
is_public: isPublic
|
|
90
|
+
}))}`, {
|
|
91
|
+
...opts,
|
|
92
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
93
|
+
"x-account-id": xAccountId,
|
|
94
|
+
authorization
|
|
95
|
+
})
|
|
96
|
+
}));
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Execute Tool
|
|
100
|
+
*/
|
|
101
|
+
export function executeToolV1AgentsToolsAgentToolIdExecutePost({ agentToolId, isPublic, xAccountId, authorization, executeAgentToolRequest }, opts) {
|
|
102
|
+
return oazapfts.ok(oazapfts.fetchJson(`/v1/agents/tools/${encodeURIComponent(agentToolId)}/execute${QS.query(QS.explode({
|
|
103
|
+
is_public: isPublic
|
|
104
|
+
}))}`, oazapfts.json({
|
|
105
|
+
...opts,
|
|
106
|
+
method: "POST",
|
|
107
|
+
body: executeAgentToolRequest,
|
|
108
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
109
|
+
"x-account-id": xAccountId,
|
|
110
|
+
authorization
|
|
111
|
+
})
|
|
112
|
+
})));
|
|
113
|
+
}
|
|
114
|
+
//# sourceMappingURL=agent-tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-tools.js","sourceRoot":"","sources":["../../src/api/agent-tools.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAC;AAC9C,OAAO,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAC9C,MAAM,CAAC,MAAM,QAAQ,GAA8C;IAC/D,OAAO,EAAE,EAAE;IACX,OAAO,EAAE,GAAG;CACf,CAAC;AACF,MAAM,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC5C,MAAM,CAAC,MAAM,OAAO,GAAG,EAAE,CAAC;AA8D1B;;GAEG;AACH,MAAM,UAAU,qBAAqB,CAAC,IAA2B;IAC7D,OAAO,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,SAAS,CAKlC,UAAU,EAAE;QACX,GAAG,IAAI;KACV,CAAC,CAAC,CAAC;AACR,CAAC;AACD;;GAEG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAA2B;IAC5D,OAAO,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,SAAS,CAKlC,SAAS,EAAE;QACV,GAAG,IAAI;KACV,CAAC,CAAC,CAAC;AACR,CAAC;AACD;;GAEG;AACH,MAAM,UAAU,oCAAoC,CAAC,IAA2B;IAC5E,OAAO,QAAQ,CA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AE,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC;QACjF,SAAS,EAAE,QAAQ;KACtB,CAAC,CAAC,EAAE,EAAE,QAAQ,CAAC,IAAI,CAAC;QACjB,GAAG,IAAI;QACP,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,uBAAuB;QAC7B,OAAO,EAAE,QAAQ,CAAC,YAAY,CAAC,IAAI,EAAE,OAAO,EAAE;YAC1C,cAAc,EAAE,UAAU;YAC1B,aAAa;SAChB,CAAC;KACL,CAAC,CAAC,CAAC,CAAC;AACT,CAAC"}
|
package/dist/api/ai.d.ts
CHANGED
|
@@ -7,7 +7,30 @@
|
|
|
7
7
|
import * as Oazapfts from "@oazapfts/runtime";
|
|
8
8
|
export declare const defaults: Oazapfts.Defaults<Oazapfts.CustomHeaders>;
|
|
9
9
|
export declare const servers: {};
|
|
10
|
-
export type
|
|
10
|
+
export type AiStackWorkspaceForkRequest = {
|
|
11
|
+
ids: string[];
|
|
12
|
+
member_id: string;
|
|
13
|
+
};
|
|
14
|
+
export type AiStackWorkspaceForkResponse = {
|
|
15
|
+
stack_ids: string[];
|
|
16
|
+
stack_ids_account: string[];
|
|
17
|
+
error_ids: string[];
|
|
18
|
+
};
|
|
19
|
+
export type ValidationError = {
|
|
20
|
+
loc: (string | number)[];
|
|
21
|
+
msg: string;
|
|
22
|
+
"type": string;
|
|
23
|
+
};
|
|
24
|
+
export type HttpValidationError = {
|
|
25
|
+
detail?: ValidationError[];
|
|
26
|
+
};
|
|
27
|
+
export type AiStackWorkspaceDeleteRequest = {
|
|
28
|
+
ids: string[];
|
|
29
|
+
};
|
|
30
|
+
export type AiStackWorkspaceListRequest = {
|
|
31
|
+
ids: string[];
|
|
32
|
+
name?: string | null;
|
|
33
|
+
};
|
|
11
34
|
export type GetAiStackResponse = {
|
|
12
35
|
id: string;
|
|
13
36
|
name: string;
|
|
@@ -26,14 +49,7 @@ export type GetAiStackResponse = {
|
|
|
26
49
|
visibility_level: string;
|
|
27
50
|
use_only?: boolean | null;
|
|
28
51
|
};
|
|
29
|
-
export type
|
|
30
|
-
loc: (string | number)[];
|
|
31
|
-
msg: string;
|
|
32
|
-
"type": string;
|
|
33
|
-
};
|
|
34
|
-
export type HttpValidationError = {
|
|
35
|
-
detail?: ValidationError[];
|
|
36
|
-
};
|
|
52
|
+
export type VisibilityLevelEnum = "account" | "personal" | "shared" | "workspace";
|
|
37
53
|
export type NewAiStackRequest = {
|
|
38
54
|
name: string;
|
|
39
55
|
use_case: string;
|
|
@@ -126,6 +142,17 @@ export type ChatResponse = {
|
|
|
126
142
|
total_cost?: string | null;
|
|
127
143
|
sources: (SourceStackAi | SourceKnowledgeSource | SourceProjectFile | KnowledgeSourceEvent)[];
|
|
128
144
|
};
|
|
145
|
+
export type AutoCompleteRequest = {
|
|
146
|
+
context?: object | null;
|
|
147
|
+
code_to_complete: string;
|
|
148
|
+
file_extension: string;
|
|
149
|
+
file_path: string;
|
|
150
|
+
file_context: string | null;
|
|
151
|
+
file_relevant: string | null;
|
|
152
|
+
};
|
|
153
|
+
export type AutoCompleteResult = {
|
|
154
|
+
code: string;
|
|
155
|
+
};
|
|
129
156
|
export type EventTypeEnum = "code_injected" | "code_copied" | "custom_quick_command_execution" | "user_feedback_provided" | "copied_all";
|
|
130
157
|
export type SourceProjectFile2 = {
|
|
131
158
|
"type"?: "project_file";
|
|
@@ -278,15 +305,46 @@ export type TokensCurrentUsageResponse = {
|
|
|
278
305
|
used: number;
|
|
279
306
|
limit: number;
|
|
280
307
|
renewal_date: string;
|
|
308
|
+
embeddings_tokens_usage: number;
|
|
309
|
+
prompt_tokens_usage: number;
|
|
281
310
|
};
|
|
282
311
|
export type TokensMonthlyUsageResponse = {
|
|
283
312
|
used: number;
|
|
284
313
|
month: number;
|
|
314
|
+
embeddings_tokens_usage: number;
|
|
315
|
+
prompt_tokens_usage: number;
|
|
285
316
|
};
|
|
286
317
|
export type AddWorkspaceKnowledgeSourceRequest = {
|
|
287
318
|
knowledge_source_slugs: string[];
|
|
288
319
|
};
|
|
320
|
+
export type QuickCommandWorkspaceForkRequest = {
|
|
321
|
+
ids: string[];
|
|
322
|
+
member_id: string;
|
|
323
|
+
};
|
|
324
|
+
export type QuickCommandWorkspaceDeleteRequest = {
|
|
325
|
+
ids: string[];
|
|
326
|
+
};
|
|
327
|
+
export type QuickCommandWorkspaceListRequest = {
|
|
328
|
+
ids: string[];
|
|
329
|
+
name?: string | null;
|
|
330
|
+
};
|
|
289
331
|
export type QuickCommandTypeRequest = "IDE" | "REMOTE";
|
|
332
|
+
export type QuickCommandsReturnType = "CHAT" | "REPLACE_CODE" | "BEFORE_CODE" | "AFTER_CODE";
|
|
333
|
+
export type QuickCommandListResponse = {
|
|
334
|
+
slug: string;
|
|
335
|
+
name: string;
|
|
336
|
+
"type": QuickCommandTypeRequest;
|
|
337
|
+
description: string;
|
|
338
|
+
studio_id?: string | null;
|
|
339
|
+
flow?: object | null;
|
|
340
|
+
preserve_conversation: boolean;
|
|
341
|
+
use_selected_code: boolean;
|
|
342
|
+
return_type?: QuickCommandsReturnType | null;
|
|
343
|
+
creator: string | null;
|
|
344
|
+
visibility_level: string;
|
|
345
|
+
use_only: boolean;
|
|
346
|
+
id: string;
|
|
347
|
+
};
|
|
290
348
|
export type Method = "GET" | "OPTIONS" | "HEAD" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
291
349
|
export type QuickCommandsStepFetchRequest = {
|
|
292
350
|
slug: string;
|
|
@@ -307,7 +365,6 @@ export type QuickCommandsStepPromptRequest = {
|
|
|
307
365
|
agent_id?: string | null;
|
|
308
366
|
agent_built_in?: boolean | null;
|
|
309
367
|
};
|
|
310
|
-
export type QuickCommandsReturnType = "CHAT" | "REPLACE_CODE" | "BEFORE_CODE" | "AFTER_CODE";
|
|
311
368
|
export type CustomInputRequest = {
|
|
312
369
|
slug: string;
|
|
313
370
|
question: string;
|
|
@@ -328,21 +385,6 @@ export type QuickCommandsCreateRequest = {
|
|
|
328
385
|
export type BaseContextualRequest = {
|
|
329
386
|
context?: object | null;
|
|
330
387
|
};
|
|
331
|
-
export type QuickCommandListResponse = {
|
|
332
|
-
slug: string;
|
|
333
|
-
name: string;
|
|
334
|
-
"type": QuickCommandTypeRequest;
|
|
335
|
-
description: string;
|
|
336
|
-
studio_id?: string | null;
|
|
337
|
-
flow?: object | null;
|
|
338
|
-
preserve_conversation: boolean;
|
|
339
|
-
use_selected_code: boolean;
|
|
340
|
-
return_type?: QuickCommandsReturnType | null;
|
|
341
|
-
creator: string | null;
|
|
342
|
-
visibility_level: string;
|
|
343
|
-
use_only: boolean;
|
|
344
|
-
id: string;
|
|
345
|
-
};
|
|
346
388
|
export type QuickCommandsUpdateRequest = {
|
|
347
389
|
name?: string | null;
|
|
348
390
|
description?: string | null;
|
|
@@ -594,6 +636,30 @@ export type ChatResponse3 = {
|
|
|
594
636
|
* Metrics
|
|
595
637
|
*/
|
|
596
638
|
export declare function metricsMetricsGet(opts?: Oazapfts.RequestOpts): Promise<any>;
|
|
639
|
+
/**
|
|
640
|
+
* Workspace Fork
|
|
641
|
+
*/
|
|
642
|
+
export declare function workspaceForkV1AiStacksWorkspaceForkPost({ authorization, xAccountId, aiStackWorkspaceForkRequest }: {
|
|
643
|
+
authorization: string;
|
|
644
|
+
xAccountId?: string | null;
|
|
645
|
+
aiStackWorkspaceForkRequest: AiStackWorkspaceForkRequest;
|
|
646
|
+
}, opts?: Oazapfts.RequestOpts): Promise<AiStackWorkspaceForkResponse>;
|
|
647
|
+
/**
|
|
648
|
+
* Workspace Delete Fork
|
|
649
|
+
*/
|
|
650
|
+
export declare function workspaceDeleteForkV1AiStacksWorkspaceForkDelete({ authorization, xAccountId, aiStackWorkspaceDeleteRequest }: {
|
|
651
|
+
authorization: string;
|
|
652
|
+
xAccountId?: string | null;
|
|
653
|
+
aiStackWorkspaceDeleteRequest: AiStackWorkspaceDeleteRequest;
|
|
654
|
+
}, opts?: Oazapfts.RequestOpts): Promise<unknown>;
|
|
655
|
+
/**
|
|
656
|
+
* Workspace List
|
|
657
|
+
*/
|
|
658
|
+
export declare function workspaceListV1AiStacksWorkspaceListPost({ authorization, xAccountId, aiStackWorkspaceListRequest }: {
|
|
659
|
+
authorization: string;
|
|
660
|
+
xAccountId?: string | null;
|
|
661
|
+
aiStackWorkspaceListRequest: AiStackWorkspaceListRequest;
|
|
662
|
+
}, opts?: Oazapfts.RequestOpts): Promise<GetAiStackResponse[]>;
|
|
597
663
|
/**
|
|
598
664
|
* List Ai Stacks
|
|
599
665
|
*/
|
|
@@ -688,6 +754,12 @@ export declare function quickActionsV1QuickActionsPost({ authorization, xAccount
|
|
|
688
754
|
* Dev Assistant
|
|
689
755
|
*/
|
|
690
756
|
export declare function devAssistantV1ChatPost(opts?: Oazapfts.RequestOpts): Promise<ChatResponse>;
|
|
757
|
+
/**
|
|
758
|
+
* Autocomplete V1
|
|
759
|
+
*/
|
|
760
|
+
export declare function autocompleteV1V1AutocompletePost({ autoCompleteRequest }: {
|
|
761
|
+
autoCompleteRequest: AutoCompleteRequest;
|
|
762
|
+
}, opts?: Oazapfts.RequestOpts): Promise<string | AutoCompleteResult>;
|
|
691
763
|
/**
|
|
692
764
|
* Post Event
|
|
693
765
|
*/
|
|
@@ -945,6 +1017,13 @@ export declare function getExternalConfigsV1AccountsExternalConfigGet(opts?: Oaz
|
|
|
945
1017
|
export declare function changeExternalConfigsV1AccountsExternalConfigPatch({ body }: {
|
|
946
1018
|
body: object;
|
|
947
1019
|
}, opts?: Oazapfts.RequestOpts): Promise<unknown>;
|
|
1020
|
+
/**
|
|
1021
|
+
* Current
|
|
1022
|
+
*/
|
|
1023
|
+
export declare function currentV1TokensUsageTotalGet({ authorization, xAccountId }: {
|
|
1024
|
+
authorization: string;
|
|
1025
|
+
xAccountId?: string | null;
|
|
1026
|
+
}, opts?: Oazapfts.RequestOpts): Promise<TokensCurrentUsageResponse>;
|
|
948
1027
|
/**
|
|
949
1028
|
* Current
|
|
950
1029
|
*/
|
|
@@ -997,6 +1076,30 @@ export declare function deleteAssociationV1WorkspaceWorkspaceIdKnowledgeSourceKn
|
|
|
997
1076
|
authorization: string;
|
|
998
1077
|
xAccountId?: string | null;
|
|
999
1078
|
}, opts?: Oazapfts.RequestOpts): Promise<unknown>;
|
|
1079
|
+
/**
|
|
1080
|
+
* Workspace Fork
|
|
1081
|
+
*/
|
|
1082
|
+
export declare function workspaceForkV1QuickCommandsWorkspaceForkPost({ authorization, xAccountId, quickCommandWorkspaceForkRequest }: {
|
|
1083
|
+
authorization: string;
|
|
1084
|
+
xAccountId?: string | null;
|
|
1085
|
+
quickCommandWorkspaceForkRequest: QuickCommandWorkspaceForkRequest;
|
|
1086
|
+
}, opts?: Oazapfts.RequestOpts): Promise<any>;
|
|
1087
|
+
/**
|
|
1088
|
+
* Workspace Delete Fork
|
|
1089
|
+
*/
|
|
1090
|
+
export declare function workspaceDeleteForkV1QuickCommandsWorkspaceForkDelete({ authorization, xAccountId, quickCommandWorkspaceDeleteRequest }: {
|
|
1091
|
+
authorization: string;
|
|
1092
|
+
xAccountId?: string | null;
|
|
1093
|
+
quickCommandWorkspaceDeleteRequest: QuickCommandWorkspaceDeleteRequest;
|
|
1094
|
+
}, opts?: Oazapfts.RequestOpts): Promise<unknown>;
|
|
1095
|
+
/**
|
|
1096
|
+
* Workspace List
|
|
1097
|
+
*/
|
|
1098
|
+
export declare function workspaceListV1QuickCommandsWorkspaceListPost({ authorization, xAccountId, quickCommandWorkspaceListRequest }: {
|
|
1099
|
+
authorization: string;
|
|
1100
|
+
xAccountId?: string | null;
|
|
1101
|
+
quickCommandWorkspaceListRequest: QuickCommandWorkspaceListRequest;
|
|
1102
|
+
}, opts?: Oazapfts.RequestOpts): Promise<QuickCommandListResponse[]>;
|
|
1000
1103
|
/**
|
|
1001
1104
|
* Create Quick Command
|
|
1002
1105
|
*/
|