@agent-os-sdk/client 0.1.2 → 0.2.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/dist/client/AgentOsClient.d.ts +39 -44
- package/dist/client/AgentOsClient.d.ts.map +1 -1
- package/dist/client/AgentOsClient.js +162 -44
- package/dist/client/auth.d.ts +102 -0
- package/dist/client/auth.d.ts.map +1 -0
- package/dist/client/auth.js +44 -0
- package/dist/generated/openapi.d.ts +914 -202
- package/dist/generated/openapi.d.ts.map +1 -1
- package/dist/index.d.ts +10 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/modules/approvals.d.ts +8 -22
- package/dist/modules/approvals.d.ts.map +1 -1
- package/dist/modules/approvals.js +27 -130
- package/dist/modules/artifacts.d.ts +28 -79
- package/dist/modules/artifacts.d.ts.map +1 -1
- package/dist/modules/artifacts.js +30 -197
- package/dist/modules/budgets.d.ts +47 -70
- package/dist/modules/budgets.d.ts.map +1 -1
- package/dist/modules/budgets.js +28 -139
- package/dist/modules/builder.d.ts +21 -1
- package/dist/modules/builder.d.ts.map +1 -1
- package/dist/modules/builder.js +25 -3
- package/dist/modules/capabilities.d.ts +39 -50
- package/dist/modules/capabilities.d.ts.map +1 -1
- package/dist/modules/capabilities.js +32 -95
- package/dist/modules/deployments.d.ts +49 -92
- package/dist/modules/deployments.d.ts.map +1 -1
- package/dist/modules/deployments.js +37 -209
- package/dist/modules/flows.d.ts +11 -31
- package/dist/modules/flows.d.ts.map +1 -1
- package/dist/modules/flows.js +33 -157
- package/dist/modules/handoff.d.ts +7 -4
- package/dist/modules/handoff.d.ts.map +1 -1
- package/dist/modules/handoff.js +25 -88
- package/dist/modules/incidents.d.ts +40 -101
- package/dist/modules/incidents.d.ts.map +1 -1
- package/dist/modules/incidents.js +31 -208
- package/dist/modules/policies.d.ts +42 -69
- package/dist/modules/policies.d.ts.map +1 -1
- package/dist/modules/policies.js +25 -159
- package/dist/modules/runs.d.ts +89 -3
- package/dist/modules/runs.d.ts.map +1 -1
- package/dist/modules/runs.js +75 -4
- package/package.json +1 -1
- package/src/client/AgentOsClient.ts +185 -67
- package/src/client/auth.ts +148 -0
- package/src/generated/openapi.ts +914 -202
- package/src/generated/swagger.json +770 -630
- package/src/index.ts +22 -10
- package/src/modules/approvals.ts +31 -132
- package/src/modules/artifacts.ts +41 -245
- package/src/modules/budgets.ts +65 -181
- package/src/modules/builder.ts +25 -3
- package/src/modules/capabilities.ts +58 -139
- package/src/modules/deployments.ts +67 -271
- package/src/modules/flows.ts +37 -163
- package/src/modules/handoff.ts +29 -93
- package/src/modules/incidents.ts +56 -282
- package/src/modules/policies.ts +57 -203
- package/src/modules/runs.ts +123 -5
package/dist/modules/builder.js
CHANGED
|
@@ -1,8 +1,28 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Builder Module - Meta-Agent for Agent Building
|
|
3
3
|
*
|
|
4
|
-
* Connects to the
|
|
4
|
+
* Connects to the Control Plane's builder endpoint which proxies to the
|
|
5
|
+
* Data Plane's meta-agent for AI-assisted agent creation.
|
|
5
6
|
* Uses SSE streaming for real-time responses and graph updates.
|
|
7
|
+
*
|
|
8
|
+
* Flow: Frontend → CP:5000/v1/api/builder/{agentId}/chat → DP:8001/v1/internal/builder/{agentId}/chat
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const client = new AgentOsClient({ ... })
|
|
13
|
+
*
|
|
14
|
+
* // SSE streaming chat
|
|
15
|
+
* for await (const event of client.builder.chat(agentId, {
|
|
16
|
+
* message: "Adicione um nó de pesquisa web",
|
|
17
|
+
* current_graph_spec: { nodes: [...], edges: [...] }
|
|
18
|
+
* })) {
|
|
19
|
+
* if (event.type === 'message') console.log(event.data.text)
|
|
20
|
+
* if (event.type === 'graph_update') applyAction(event.data)
|
|
21
|
+
* }
|
|
22
|
+
*
|
|
23
|
+
* // Sync chat (no streaming)
|
|
24
|
+
* const result = await client.builder.chatSync(agentId, { message: "Mude as instruções" })
|
|
25
|
+
* ```
|
|
6
26
|
*/
|
|
7
27
|
import { streamSSE } from "../sse/client.js";
|
|
8
28
|
export class BuilderModule {
|
|
@@ -17,7 +37,8 @@ export class BuilderModule {
|
|
|
17
37
|
* Returns async generator of events.
|
|
18
38
|
*/
|
|
19
39
|
async *chat(agentId, request, options) {
|
|
20
|
-
|
|
40
|
+
// Use public API route (CP proxies to DP)
|
|
41
|
+
const url = `${this.baseUrl}/v1/api/builder/${agentId}/chat`;
|
|
21
42
|
const response = await fetch(url, {
|
|
22
43
|
method: "POST",
|
|
23
44
|
headers: {
|
|
@@ -77,7 +98,8 @@ export class BuilderModule {
|
|
|
77
98
|
* Sync chat with meta-agent (no streaming).
|
|
78
99
|
*/
|
|
79
100
|
async chatSync(agentId, request) {
|
|
80
|
-
|
|
101
|
+
// Use public API route (CP proxies to DP)
|
|
102
|
+
const url = `${this.baseUrl}/v1/api/builder/${agentId}/chat/sync`;
|
|
81
103
|
const response = await fetch(url, {
|
|
82
104
|
method: "POST",
|
|
83
105
|
headers: {
|
|
@@ -1,68 +1,57 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Capabilities Module - Agent
|
|
2
|
+
* Capabilities Module - Agent Capability Discovery
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* Manages what agents/runs can do. Formal capability system
|
|
7
|
-
* that enables enterprise-grade governance.
|
|
4
|
+
* NOT IMPLEMENTED - Backend endpoint not available.
|
|
5
|
+
* All methods return 501 NotImplemented.
|
|
8
6
|
*/
|
|
9
7
|
import type { RawClient, APIResponse } from "../client/raw.js";
|
|
8
|
+
export type CapabilityType = "tool" | "skill" | "knowledge" | "integration" | "model_feature";
|
|
10
9
|
export interface Capability {
|
|
11
10
|
id: string;
|
|
12
11
|
name: string;
|
|
12
|
+
type: CapabilityType;
|
|
13
13
|
description?: string;
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
agent_id?: string;
|
|
15
|
+
is_available: boolean;
|
|
16
|
+
required_credentials?: string[];
|
|
17
|
+
required_permissions?: string[];
|
|
18
|
+
metadata?: Record<string, unknown>;
|
|
16
19
|
}
|
|
17
|
-
export interface
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
allow_egress?: boolean;
|
|
24
|
-
file_read?: boolean;
|
|
25
|
-
file_write?: boolean;
|
|
26
|
-
allowed_paths?: string[];
|
|
27
|
-
mcp_server_allowlist?: string[];
|
|
28
|
-
max_tokens?: number;
|
|
29
|
-
max_input_tokens?: number;
|
|
30
|
-
max_output_tokens?: number;
|
|
31
|
-
streaming_allowed?: boolean;
|
|
20
|
+
export interface CapabilityTest {
|
|
21
|
+
capability_id: string;
|
|
22
|
+
test_name: string;
|
|
23
|
+
passed: boolean;
|
|
24
|
+
message?: string;
|
|
25
|
+
duration_ms: number;
|
|
32
26
|
}
|
|
33
|
-
export interface
|
|
34
|
-
agent_id
|
|
35
|
-
run_id?: string;
|
|
27
|
+
export interface CapabilityMatrix {
|
|
28
|
+
agent_id: string;
|
|
36
29
|
capabilities: Capability[];
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
export interface CapabilityOverride {
|
|
41
|
-
run_id: string;
|
|
42
|
-
overrides: Partial<CapabilityConfig>;
|
|
43
|
-
reason?: string;
|
|
44
|
-
applied_at: string;
|
|
45
|
-
applied_by: string;
|
|
30
|
+
total: number;
|
|
31
|
+
available: number;
|
|
32
|
+
unavailable: number;
|
|
46
33
|
}
|
|
47
34
|
export declare class CapabilitiesModule {
|
|
48
35
|
private client;
|
|
49
36
|
private headers;
|
|
50
37
|
constructor(client: RawClient, headers: () => Record<string, string>);
|
|
51
|
-
/**
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
38
|
+
/** @returns 501 Not Implemented */
|
|
39
|
+
list(params?: {
|
|
40
|
+
agent_id?: string;
|
|
41
|
+
type?: CapabilityType;
|
|
42
|
+
limit?: number;
|
|
43
|
+
offset?: number;
|
|
44
|
+
}): Promise<APIResponse<{
|
|
45
|
+
items: Capability[];
|
|
46
|
+
total: number;
|
|
47
|
+
}>>;
|
|
48
|
+
/** @returns 501 Not Implemented */
|
|
49
|
+
get(capabilityId: string): Promise<APIResponse<Capability>>;
|
|
50
|
+
/** @returns 501 Not Implemented */
|
|
51
|
+
getMatrix(agentId: string): Promise<APIResponse<CapabilityMatrix>>;
|
|
52
|
+
/** @returns 501 Not Implemented */
|
|
53
|
+
test(agentId: string, capabilityId: string): Promise<APIResponse<CapabilityTest>>;
|
|
54
|
+
/** @returns 501 Not Implemented */
|
|
55
|
+
testAll(agentId: string): Promise<APIResponse<CapabilityTest[]>>;
|
|
67
56
|
}
|
|
68
57
|
//# sourceMappingURL=capabilities.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../src/modules/capabilities.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../src/modules/capabilities.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAM/D,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,OAAO,GAAG,WAAW,GAAG,aAAa,GAAG,eAAe,CAAC;AAE9F,MAAM,WAAW,UAAU;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,cAAc,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,OAAO,CA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AmC;IAC7B,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;IAIvF,mCAAmC;IAC7B,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,cAAc,EAAE,CAAC,CAAC;CAGzE"}
|
|
@@ -1,12 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Capabilities Module - Agent
|
|
2
|
+
* Capabilities Module - Agent Capability Discovery
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* Manages what agents/runs can do. Formal capability system
|
|
7
|
-
* that enables enterprise-grade governance.
|
|
4
|
+
* NOT IMPLEMENTED - Backend endpoint not available.
|
|
5
|
+
* All methods return 501 NotImplemented.
|
|
8
6
|
*/
|
|
9
7
|
// ============================================================================
|
|
8
|
+
// Helper for 501 responses
|
|
9
|
+
// ============================================================================
|
|
10
|
+
function notImplemented(method) {
|
|
11
|
+
return {
|
|
12
|
+
data: undefined,
|
|
13
|
+
error: {
|
|
14
|
+
code: "NOT_IMPLEMENTED",
|
|
15
|
+
message: `CapabilitiesModule.${method}() is not implemented. Backend endpoint not available.`,
|
|
16
|
+
},
|
|
17
|
+
response: new Response(null, { status: 501, statusText: "Not Implemented" }),
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
// ============================================================================
|
|
10
21
|
// Module
|
|
11
22
|
// ============================================================================
|
|
12
23
|
export class CapabilitiesModule {
|
|
@@ -16,98 +27,24 @@ export class CapabilitiesModule {
|
|
|
16
27
|
this.client = client;
|
|
17
28
|
this.headers = headers;
|
|
18
29
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
agent_id: agentId,
|
|
27
|
-
capabilities: [
|
|
28
|
-
{
|
|
29
|
-
id: "cap_tools",
|
|
30
|
-
name: "Tool Access",
|
|
31
|
-
type: "tool",
|
|
32
|
-
config: {
|
|
33
|
-
tool_allowlist: ["web_search", "calculator", "file_read"],
|
|
34
|
-
max_tool_calls: 50,
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
id: "cap_network",
|
|
39
|
-
name: "Network Access",
|
|
40
|
-
type: "network",
|
|
41
|
-
config: {
|
|
42
|
-
allow_egress: true,
|
|
43
|
-
allowed_domains: ["*.google.com", "*.openai.com"],
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
id: "cap_tokens",
|
|
48
|
-
name: "Token Limits",
|
|
49
|
-
type: "token",
|
|
50
|
-
config: {
|
|
51
|
-
max_tokens: 100000,
|
|
52
|
-
max_input_tokens: 50000,
|
|
53
|
-
max_output_tokens: 50000,
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
],
|
|
57
|
-
effective_at: new Date().toISOString(),
|
|
58
|
-
};
|
|
59
|
-
return { data: mockCaps, error: undefined, response: new Response() };
|
|
30
|
+
/** @returns 501 Not Implemented */
|
|
31
|
+
async list(params) {
|
|
32
|
+
return notImplemented("list");
|
|
33
|
+
}
|
|
34
|
+
/** @returns 501 Not Implemented */
|
|
35
|
+
async get(capabilityId) {
|
|
36
|
+
return notImplemented("get");
|
|
60
37
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
*/
|
|
65
|
-
async setForAgent(agentId, capabilities) {
|
|
66
|
-
// MOCK - Returns simulated data
|
|
67
|
-
const mockCaps = {
|
|
68
|
-
agent_id: agentId,
|
|
69
|
-
capabilities,
|
|
70
|
-
effective_at: new Date().toISOString(),
|
|
71
|
-
};
|
|
72
|
-
return { data: mockCaps, error: undefined, response: new Response() };
|
|
38
|
+
/** @returns 501 Not Implemented */
|
|
39
|
+
async getMatrix(agentId) {
|
|
40
|
+
return notImplemented("getMatrix");
|
|
73
41
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
*/
|
|
78
|
-
async getForRun(runId) {
|
|
79
|
-
// MOCK - Returns simulated data
|
|
80
|
-
const mockCaps = {
|
|
81
|
-
run_id: runId,
|
|
82
|
-
capabilities: [
|
|
83
|
-
{
|
|
84
|
-
id: "cap_tools",
|
|
85
|
-
name: "Tool Access",
|
|
86
|
-
type: "tool",
|
|
87
|
-
config: {
|
|
88
|
-
tool_allowlist: ["web_search"],
|
|
89
|
-
max_tool_calls: 10,
|
|
90
|
-
},
|
|
91
|
-
},
|
|
92
|
-
],
|
|
93
|
-
inherited_from: "agent_123",
|
|
94
|
-
effective_at: new Date().toISOString(),
|
|
95
|
-
};
|
|
96
|
-
return { data: mockCaps, error: undefined, response: new Response() };
|
|
42
|
+
/** @returns 501 Not Implemented */
|
|
43
|
+
async test(agentId, capabilityId) {
|
|
44
|
+
return notImplemented("test");
|
|
97
45
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
*/
|
|
102
|
-
async overrideForRun(runId, overrides, reason) {
|
|
103
|
-
// MOCK - Returns simulated data
|
|
104
|
-
const mockOverride = {
|
|
105
|
-
run_id: runId,
|
|
106
|
-
overrides,
|
|
107
|
-
reason,
|
|
108
|
-
applied_at: new Date().toISOString(),
|
|
109
|
-
applied_by: "user_123",
|
|
110
|
-
};
|
|
111
|
-
return { data: mockOverride, error: undefined, response: new Response() };
|
|
46
|
+
/** @returns 501 Not Implemented */
|
|
47
|
+
async testAll(agentId) {
|
|
48
|
+
return notImplemented("testAll");
|
|
112
49
|
}
|
|
113
50
|
}
|
|
@@ -1,110 +1,67 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Deployments Module -
|
|
2
|
+
* Deployments Module - Agent Lifecycle
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* Provides deployment management, environment promotion,
|
|
7
|
-
* rollback, canary releases, and change freezes.
|
|
4
|
+
* NOT IMPLEMENTED - Backend endpoint not available.
|
|
5
|
+
* All methods return 501 NotImplemented.
|
|
8
6
|
*/
|
|
9
7
|
import type { RawClient, APIResponse } from "../client/raw.js";
|
|
10
|
-
export type DeploymentStatus = "pending" | "deploying" | "active" | "
|
|
11
|
-
export type
|
|
12
|
-
export interface Environment {
|
|
13
|
-
id: string;
|
|
14
|
-
name: string;
|
|
15
|
-
type: EnvironmentType;
|
|
16
|
-
description?: string;
|
|
17
|
-
is_frozen: boolean;
|
|
18
|
-
frozen_until?: string;
|
|
19
|
-
frozen_reason?: string;
|
|
20
|
-
config: Record<string, unknown>;
|
|
21
|
-
created_at: string;
|
|
22
|
-
updated_at: string;
|
|
23
|
-
}
|
|
8
|
+
export type DeploymentStatus = "pending" | "building" | "deploying" | "active" | "failed" | "rolled_back" | "deactivated";
|
|
9
|
+
export type Environment = "development" | "staging" | "production";
|
|
24
10
|
export interface Deployment {
|
|
25
11
|
id: string;
|
|
26
12
|
agent_id: string;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
environment_name: string;
|
|
13
|
+
version_id: string;
|
|
14
|
+
environment: Environment;
|
|
30
15
|
status: DeploymentStatus;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
16
|
+
endpoint_url?: string;
|
|
17
|
+
deployed_at?: string;
|
|
18
|
+
created_at: string;
|
|
19
|
+
created_by: string;
|
|
34
20
|
rollback_version_id?: string;
|
|
35
|
-
canary_percent?: number;
|
|
36
|
-
notes?: string;
|
|
37
|
-
}
|
|
38
|
-
export interface DeploymentDiff {
|
|
39
|
-
from_version: string;
|
|
40
|
-
to_version: string;
|
|
41
|
-
changes: {
|
|
42
|
-
category: string;
|
|
43
|
-
field: string;
|
|
44
|
-
old_value: unknown;
|
|
45
|
-
new_value: unknown;
|
|
46
|
-
}[];
|
|
47
|
-
config_changes: number;
|
|
48
|
-
prompt_changes: number;
|
|
49
|
-
graph_changes: number;
|
|
50
21
|
}
|
|
51
|
-
export interface
|
|
52
|
-
|
|
53
|
-
|
|
22
|
+
export interface DeploymentConfig {
|
|
23
|
+
replicas?: number;
|
|
24
|
+
memory_mb?: number;
|
|
25
|
+
timeout_seconds?: number;
|
|
26
|
+
env_vars?: Record<string, string>;
|
|
27
|
+
auto_scale?: boolean;
|
|
28
|
+
min_replicas?: number;
|
|
29
|
+
max_replicas?: number;
|
|
54
30
|
}
|
|
55
|
-
export interface
|
|
56
|
-
|
|
57
|
-
|
|
31
|
+
export interface DeploymentHealth {
|
|
32
|
+
deployment_id: string;
|
|
33
|
+
healthy: boolean;
|
|
34
|
+
replicas_running: number;
|
|
35
|
+
replicas_desired: number;
|
|
36
|
+
last_check: string;
|
|
37
|
+
error?: string;
|
|
58
38
|
}
|
|
59
39
|
export declare class DeploymentsModule {
|
|
60
40
|
private client;
|
|
61
41
|
private headers;
|
|
62
42
|
constructor(client: RawClient, headers: () => Record<string, string>);
|
|
63
|
-
/**
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* Rollback an environment to a previous version.
|
|
88
|
-
*/
|
|
89
|
-
rollback(environmentId: string, toVersionId?: string): Promise<APIResponse<Deployment>>;
|
|
90
|
-
/**
|
|
91
|
-
* Start a canary deployment.
|
|
92
|
-
*/
|
|
93
|
-
canary(environmentId: string, agentVersionId: string, percent: number): Promise<APIResponse<Deployment>>;
|
|
94
|
-
/**
|
|
95
|
-
* Freeze an environment (change freeze).
|
|
96
|
-
*/
|
|
97
|
-
freeze(environmentId: string, options?: {
|
|
98
|
-
until?: string;
|
|
99
|
-
reason?: string;
|
|
100
|
-
}): Promise<APIResponse<Environment>>;
|
|
101
|
-
/**
|
|
102
|
-
* Unfreeze an environment.
|
|
103
|
-
*/
|
|
104
|
-
unfreeze(environmentId: string): Promise<APIResponse<Environment>>;
|
|
105
|
-
/**
|
|
106
|
-
* Get diff between two versions.
|
|
107
|
-
*/
|
|
108
|
-
diff(fromVersionId: string, toVersionId: string): Promise<APIResponse<DeploymentDiff>>;
|
|
43
|
+
/** @returns 501 Not Implemented */
|
|
44
|
+
list(params?: {
|
|
45
|
+
agent_id?: string;
|
|
46
|
+
environment?: Environment;
|
|
47
|
+
status?: DeploymentStatus;
|
|
48
|
+
limit?: number;
|
|
49
|
+
offset?: number;
|
|
50
|
+
}): Promise<APIResponse<{
|
|
51
|
+
items: Deployment[];
|
|
52
|
+
total: number;
|
|
53
|
+
}>>;
|
|
54
|
+
/** @returns 501 Not Implemented */
|
|
55
|
+
get(deploymentId: string): Promise<APIResponse<Deployment>>;
|
|
56
|
+
/** @returns 501 Not Implemented */
|
|
57
|
+
deploy(agentId: string, environment: Environment, config?: DeploymentConfig): Promise<APIResponse<Deployment>>;
|
|
58
|
+
/** @returns 501 Not Implemented */
|
|
59
|
+
promote(deploymentId: string, toEnvironment: Environment): Promise<APIResponse<Deployment>>;
|
|
60
|
+
/** @returns 501 Not Implemented */
|
|
61
|
+
rollback(deploymentId: string): Promise<APIResponse<Deployment>>;
|
|
62
|
+
/** @returns 501 Not Implemented */
|
|
63
|
+
health(deploymentId: string): Promise<APIResponse<DeploymentHealth>>;
|
|
64
|
+
/** @returns 501 Not Implemented */
|
|
65
|
+
deactivate(deploymentId: string): Promise<APIResponse<void>>;
|
|
109
66
|
}
|
|
110
67
|
//# sourceMappingURL=deployments.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deployments.d.ts","sourceRoot":"","sources":["../../src/modules/deployments.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"deployments.d.ts","sourceRoot":"","sources":["../../src/modules/deployments.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO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