@opengeni/sdk 0.32.1 → 0.33.1
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/README.md +35 -0
- package/dist/artifact-client.d.ts +11 -0
- package/dist/chunk-YROWFD7R.js +2971 -0
- package/dist/chunk-YROWFD7R.js.map +1 -0
- package/dist/client.d.ts +1 -1
- package/dist/core.d.ts +5 -0
- package/dist/core.js +23 -0
- package/dist/core.js.map +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +45 -2916
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +3 -3
- package/dist/workspace-artifacts.d.ts +94 -0
- package/package.json +5 -1
- package/src/artifact-client.ts +85 -0
- package/src/client.ts +1 -1
- package/src/core.ts +19 -0
- package/src/index.ts +14 -1
- package/src/types.ts +9 -2
- package/src/workspace-artifacts.ts +94 -0
package/dist/types.d.ts
CHANGED
|
@@ -1312,14 +1312,14 @@ export type CreateSessionRequest = {
|
|
|
1312
1312
|
groupId: string;
|
|
1313
1313
|
} | undefined;
|
|
1314
1314
|
};
|
|
1315
|
-
export declare const KNOWN_PERMISSIONS: readonly ["account:read", "account:admin", "members:manage", "workspace:create", "billing:read", "billing:manage", "workspace:read", "workspace:admin", "sessions:create", "sessions:read", "sessions:control", "stream:view", "stream:control", "stream:acknowledge", "files:upload", "files:read", "files:write", "terminal:attach", "documents:manage", "documents:search", "scheduled_tasks:manage", "scheduled_tasks:run", "github:manage", "github:use", "api_keys:manage", "connections:read", "connections:write", "environments:manage", "environments:use", "variable-sets:manage", "variable-sets:use", "mcp_servers:attach", "toolspace:call", "goals:manage", "enrollments:read", "enrollments:manage", "rigs:use", "rigs:manage"];
|
|
1315
|
+
export declare const KNOWN_PERMISSIONS: readonly ["account:read", "account:admin", "members:manage", "workspace:create", "billing:read", "billing:manage", "workspace:read", "workspace:admin", "sessions:create", "sessions:read", "sessions:control", "stream:view", "stream:control", "stream:acknowledge", "files:upload", "files:read", "files:write", "terminal:attach", "documents:manage", "documents:search", "scheduled_tasks:manage", "scheduled_tasks:run", "github:manage", "github:use", "api_keys:manage", "connections:read", "connections:write", "environments:manage", "environments:use", "variable-sets:manage", "variable-sets:use", "mcp_servers:attach", "toolspace:call", "goals:manage", "enrollments:read", "enrollments:manage", "rigs:use", "rigs:manage", "artifacts:read", "artifacts:publish"];
|
|
1316
1316
|
export type KnownPermission = (typeof KNOWN_PERMISSIONS)[number];
|
|
1317
1317
|
/**
|
|
1318
1318
|
* Permissions the SDK knows about today, kept open so a newer OpenGeni server
|
|
1319
1319
|
* can introduce permissions without breaking older SDK consumers.
|
|
1320
1320
|
*/
|
|
1321
1321
|
export type Permission = KnownPermission | (string & {});
|
|
1322
|
-
export type FirstPartyMcpToolName = "set_session_title" | "goal_set" | "goal_update" | "goal_complete" | "goal_pause" | "memory_search" | "memory_save" | "memory_correct" | "preference_registry_summary" | "preference_registry_get" | "sandboxes_list" | "sandbox_attach" | "sandbox_swap" | "run_on" | "sandbox_provision" | "rig_list" | "rig_get" | "rig_propose_change" | "rig_verify" | "rig_promote" | "sessions_list" | "session_get" | "session_events" | "session_create" | "session_send_message" | "session_pause" | "session_resume" | "session_steer" | "set_other_session_title" | "variable_set_list" | "environment_list" | "variable_set_set_variable" | "environment_set_variable" | "github_connect_link" | "github_token" | "github_repositories_list" | "social_connections_list" | "social_posts_recent" | "social_daily_analysis_context" | "scheduled_tasks_list" | "scheduled_tasks_get" | "scheduled_tasks_create" | "scheduled_tasks_update" | "scheduled_tasks_pause" | "scheduled_tasks_resume" | "scheduled_tasks_trigger" | "scheduled_tasks_delete" | "scheduled_task_runs_list" | "slack_bot_list_channels" | "slack_bot_channel_history" | "slack_bot_thread_replies" | "slack_bot_list_users" | "slack_bot_list_files" | "slack_bot_file_info" | "slack_bot_file_content" | "slack_bot_post_message" | "slack_bot_delete_message";
|
|
1322
|
+
export type FirstPartyMcpToolName = "set_session_title" | "goal_set" | "goal_update" | "goal_complete" | "goal_pause" | "memory_search" | "memory_save" | "memory_correct" | "preference_registry_summary" | "preference_registry_get" | "sandboxes_list" | "sandbox_attach" | "sandbox_swap" | "run_on" | "sandbox_provision" | "rig_list" | "rig_get" | "rig_propose_change" | "rig_verify" | "rig_promote" | "sessions_list" | "session_get" | "session_events" | "session_create" | "session_send_message" | "session_pause" | "session_resume" | "session_steer" | "set_other_session_title" | "variable_set_list" | "environment_list" | "variable_set_set_variable" | "environment_set_variable" | "github_connect_link" | "github_token" | "github_repositories_list" | "social_connections_list" | "social_posts_recent" | "social_daily_analysis_context" | "scheduled_tasks_list" | "scheduled_tasks_get" | "scheduled_tasks_create" | "scheduled_tasks_update" | "scheduled_tasks_pause" | "scheduled_tasks_resume" | "scheduled_tasks_trigger" | "scheduled_tasks_delete" | "scheduled_task_runs_list" | "slack_bot_list_channels" | "slack_bot_channel_history" | "slack_bot_thread_replies" | "slack_bot_list_users" | "slack_bot_list_files" | "slack_bot_file_info" | "slack_bot_file_content" | "slack_bot_post_message" | "slack_bot_delete_message" | "artifacts_list" | "artifacts_get_source" | "artifacts_create" | "artifacts_publish" | "artifacts_rollback";
|
|
1323
1323
|
export type ProductAccessMode = "local" | "configured" | "managed";
|
|
1324
1324
|
export type ModelCapabilitySupportV1 = "supported" | "unsupported" | "unknown";
|
|
1325
1325
|
export type ModelCapabilityStateV1 = {
|
|
@@ -1644,7 +1644,7 @@ export type ClientAuthConfig = {
|
|
|
1644
1644
|
mode: "managedSession";
|
|
1645
1645
|
session: "cookie";
|
|
1646
1646
|
};
|
|
1647
|
-
export declare const OPENGENI_API_CONTRACT_REVISION: "2026-07-
|
|
1647
|
+
export declare const OPENGENI_API_CONTRACT_REVISION: "2026-07-workspace-artifacts-v1";
|
|
1648
1648
|
export declare const OPENGENI_API_CONTRACT_HEADER: "x-opengeni-api-contract";
|
|
1649
1649
|
/** Bounded request/response identifier shared by browser, ingress, and API diagnostics. */
|
|
1650
1650
|
export declare const OPENGENI_CORRELATION_HEADER: "x-opengeni-correlation-id";
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
export type WorkspaceArtifactVersion = {
|
|
2
|
+
id: string;
|
|
3
|
+
accountId: string;
|
|
4
|
+
workspaceId: string;
|
|
5
|
+
artifactId: string;
|
|
6
|
+
revision: number;
|
|
7
|
+
contentType: "text/html";
|
|
8
|
+
contentSha256: string;
|
|
9
|
+
sizeBytes: number;
|
|
10
|
+
sourceSessionId: string | null;
|
|
11
|
+
sourceTurnId: string | null;
|
|
12
|
+
sourceAttemptId: string | null;
|
|
13
|
+
sourceExecutionGeneration: number | null;
|
|
14
|
+
createdBySubjectId: string;
|
|
15
|
+
createdAt: string;
|
|
16
|
+
};
|
|
17
|
+
export type WorkspaceArtifact = {
|
|
18
|
+
id: string;
|
|
19
|
+
accountId: string;
|
|
20
|
+
workspaceId: string;
|
|
21
|
+
slug: string;
|
|
22
|
+
title: string;
|
|
23
|
+
description: string | null;
|
|
24
|
+
status: "active" | "archived";
|
|
25
|
+
currentVersion: WorkspaceArtifactVersion | null;
|
|
26
|
+
createdBySubjectId: string;
|
|
27
|
+
createdAt: string;
|
|
28
|
+
updatedAt: string;
|
|
29
|
+
};
|
|
30
|
+
export type WorkspaceArtifactEvent = {
|
|
31
|
+
id: string;
|
|
32
|
+
accountId: string;
|
|
33
|
+
workspaceId: string;
|
|
34
|
+
artifactId: string;
|
|
35
|
+
type: "published" | "rolled_back";
|
|
36
|
+
fromVersionId: string | null;
|
|
37
|
+
toVersionId: string;
|
|
38
|
+
sourceSessionId: string | null;
|
|
39
|
+
sourceTurnId: string | null;
|
|
40
|
+
sourceAttemptId: string | null;
|
|
41
|
+
sourceExecutionGeneration: number | null;
|
|
42
|
+
actorSubjectId: string;
|
|
43
|
+
reason: string;
|
|
44
|
+
createdAt: string;
|
|
45
|
+
};
|
|
46
|
+
export type WorkspaceArtifactListOptions = {
|
|
47
|
+
limit?: number;
|
|
48
|
+
cursor?: string;
|
|
49
|
+
};
|
|
50
|
+
export type WorkspaceArtifactListResponse = {
|
|
51
|
+
artifacts: WorkspaceArtifact[];
|
|
52
|
+
nextCursor: string | null;
|
|
53
|
+
truncated: boolean;
|
|
54
|
+
};
|
|
55
|
+
export type WorkspaceArtifactDetailResponse = {
|
|
56
|
+
artifact: WorkspaceArtifact;
|
|
57
|
+
versions: WorkspaceArtifactVersion[];
|
|
58
|
+
events: WorkspaceArtifactEvent[];
|
|
59
|
+
versionsTruncated: boolean;
|
|
60
|
+
eventsTruncated: boolean;
|
|
61
|
+
};
|
|
62
|
+
export type WorkspaceArtifactContentResponse = {
|
|
63
|
+
artifactId: string;
|
|
64
|
+
versionId: string;
|
|
65
|
+
contentType: "text/html";
|
|
66
|
+
contentSha256: string;
|
|
67
|
+
html: string;
|
|
68
|
+
};
|
|
69
|
+
export type WorkspaceArtifactMutationResponse = {
|
|
70
|
+
artifact: WorkspaceArtifact;
|
|
71
|
+
version: WorkspaceArtifactVersion;
|
|
72
|
+
event: WorkspaceArtifactEvent;
|
|
73
|
+
replayed: boolean;
|
|
74
|
+
};
|
|
75
|
+
export type CreateWorkspaceArtifactRequest = {
|
|
76
|
+
slug?: string;
|
|
77
|
+
title: string;
|
|
78
|
+
description?: string | null;
|
|
79
|
+
html: string;
|
|
80
|
+
idempotencyKey: string;
|
|
81
|
+
};
|
|
82
|
+
export type PublishWorkspaceArtifactVersionRequest = {
|
|
83
|
+
title?: string;
|
|
84
|
+
description?: string | null;
|
|
85
|
+
html: string;
|
|
86
|
+
expectedCurrentVersionId: string;
|
|
87
|
+
idempotencyKey: string;
|
|
88
|
+
};
|
|
89
|
+
export type RollbackWorkspaceArtifactRequest = {
|
|
90
|
+
versionId: string;
|
|
91
|
+
expectedCurrentVersionId: string;
|
|
92
|
+
reason: string;
|
|
93
|
+
idempotencyKey: string;
|
|
94
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeni/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.33.1",
|
|
4
4
|
"description": "Framework-agnostic TypeScript SDK for the OpenGeni API: typed client, session lifecycle, SSE event streaming with reconnect + replay-by-sequence, and proxy re-streaming helpers.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -21,6 +21,10 @@
|
|
|
21
21
|
".": {
|
|
22
22
|
"types": "./dist/index.d.ts",
|
|
23
23
|
"import": "./dist/index.js"
|
|
24
|
+
},
|
|
25
|
+
"./core": {
|
|
26
|
+
"types": "./dist/core.d.ts",
|
|
27
|
+
"import": "./dist/core.js"
|
|
24
28
|
}
|
|
25
29
|
},
|
|
26
30
|
"publishConfig": {
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { OpenGeniClient as OpenGeniCoreClient } from "./client";
|
|
2
|
+
import type {
|
|
3
|
+
CreateWorkspaceArtifactRequest,
|
|
4
|
+
PublishWorkspaceArtifactVersionRequest,
|
|
5
|
+
RollbackWorkspaceArtifactRequest,
|
|
6
|
+
WorkspaceArtifactContentResponse,
|
|
7
|
+
WorkspaceArtifactDetailResponse,
|
|
8
|
+
WorkspaceArtifactListOptions,
|
|
9
|
+
WorkspaceArtifactListResponse,
|
|
10
|
+
WorkspaceArtifactMutationResponse,
|
|
11
|
+
} from "./workspace-artifacts";
|
|
12
|
+
|
|
13
|
+
/** Public SDK client. Artifact operations stay out of the console's eager core graph. */
|
|
14
|
+
export class OpenGeniClient extends OpenGeniCoreClient {
|
|
15
|
+
async listWorkspaceArtifacts(
|
|
16
|
+
workspaceId: string,
|
|
17
|
+
options: WorkspaceArtifactListOptions = {},
|
|
18
|
+
): Promise<WorkspaceArtifactListResponse> {
|
|
19
|
+
const query = new URLSearchParams();
|
|
20
|
+
if (options.limit !== undefined) query.set("limit", String(options.limit));
|
|
21
|
+
if (options.cursor) query.set("cursor", options.cursor);
|
|
22
|
+
const suffix = query.size > 0 ? `?${query.toString()}` : "";
|
|
23
|
+
return await this.requestJson<WorkspaceArtifactListResponse>(
|
|
24
|
+
"GET",
|
|
25
|
+
`/v1/workspaces/${workspaceId}/published-artifacts${suffix}`,
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
async getWorkspaceArtifact(
|
|
30
|
+
workspaceId: string,
|
|
31
|
+
artifactId: string,
|
|
32
|
+
): Promise<WorkspaceArtifactDetailResponse> {
|
|
33
|
+
return await this.requestJson<WorkspaceArtifactDetailResponse>(
|
|
34
|
+
"GET",
|
|
35
|
+
`/v1/workspaces/${workspaceId}/published-artifacts/${encodeURIComponent(artifactId)}`,
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
async getWorkspaceArtifactContent(
|
|
40
|
+
workspaceId: string,
|
|
41
|
+
artifactId: string,
|
|
42
|
+
versionId?: string,
|
|
43
|
+
): Promise<WorkspaceArtifactContentResponse> {
|
|
44
|
+
const query = versionId ? `?versionId=${encodeURIComponent(versionId)}` : "";
|
|
45
|
+
return await this.requestJson<WorkspaceArtifactContentResponse>(
|
|
46
|
+
"GET",
|
|
47
|
+
`/v1/workspaces/${workspaceId}/published-artifacts/${encodeURIComponent(artifactId)}/content${query}`,
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
async createWorkspaceArtifact(
|
|
52
|
+
workspaceId: string,
|
|
53
|
+
request: CreateWorkspaceArtifactRequest,
|
|
54
|
+
): Promise<WorkspaceArtifactMutationResponse> {
|
|
55
|
+
return await this.requestJson<WorkspaceArtifactMutationResponse>(
|
|
56
|
+
"POST",
|
|
57
|
+
`/v1/workspaces/${workspaceId}/published-artifacts`,
|
|
58
|
+
request,
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
async publishWorkspaceArtifactVersion(
|
|
63
|
+
workspaceId: string,
|
|
64
|
+
artifactId: string,
|
|
65
|
+
request: PublishWorkspaceArtifactVersionRequest,
|
|
66
|
+
): Promise<WorkspaceArtifactMutationResponse> {
|
|
67
|
+
return await this.requestJson<WorkspaceArtifactMutationResponse>(
|
|
68
|
+
"POST",
|
|
69
|
+
`/v1/workspaces/${workspaceId}/published-artifacts/${encodeURIComponent(artifactId)}/versions`,
|
|
70
|
+
request,
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
async rollbackWorkspaceArtifact(
|
|
75
|
+
workspaceId: string,
|
|
76
|
+
artifactId: string,
|
|
77
|
+
request: RollbackWorkspaceArtifactRequest,
|
|
78
|
+
): Promise<WorkspaceArtifactMutationResponse> {
|
|
79
|
+
return await this.requestJson<WorkspaceArtifactMutationResponse>(
|
|
80
|
+
"POST",
|
|
81
|
+
`/v1/workspaces/${workspaceId}/published-artifacts/${encodeURIComponent(artifactId)}/rollback`,
|
|
82
|
+
request,
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
}
|
package/src/client.ts
CHANGED
package/src/core.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export { OpenGeniClient as OpenGeniCoreClient } from "./client";
|
|
2
|
+
export type {
|
|
3
|
+
FetchLike,
|
|
4
|
+
OpenGeniClientOptions,
|
|
5
|
+
OpenGeniRequestOptions,
|
|
6
|
+
SendMessageInput,
|
|
7
|
+
SteerMessageResult,
|
|
8
|
+
TranscribeAudioInput,
|
|
9
|
+
WorkspaceControlEventPage,
|
|
10
|
+
} from "./client";
|
|
11
|
+
export {
|
|
12
|
+
OpenGeniApiContractMismatchError,
|
|
13
|
+
OpenGeniApiError,
|
|
14
|
+
OpenGeniSessionListCursorError,
|
|
15
|
+
OpenGeniStreamError,
|
|
16
|
+
isRetryableStreamError,
|
|
17
|
+
} from "./errors";
|
|
18
|
+
export { resolveWorkspaceVoiceInputEnabled } from "./transcription";
|
|
19
|
+
export { OPENGENI_API_CONTRACT_HEADER, OPENGENI_API_CONTRACT_REVISION } from "./types";
|
package/src/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { OpenGeniClient } from "./client";
|
|
1
|
+
export { OpenGeniClient } from "./artifact-client";
|
|
2
2
|
export type {
|
|
3
3
|
FetchLike,
|
|
4
4
|
OpenGeniClientOptions,
|
|
@@ -56,6 +56,19 @@ export type {
|
|
|
56
56
|
} from "./stream";
|
|
57
57
|
export { streamWorkspaceControlEvents } from "./workspace-control-stream";
|
|
58
58
|
export type { WorkspaceControlStreamTransport } from "./workspace-control-stream";
|
|
59
|
+
export type {
|
|
60
|
+
CreateWorkspaceArtifactRequest,
|
|
61
|
+
PublishWorkspaceArtifactVersionRequest,
|
|
62
|
+
RollbackWorkspaceArtifactRequest,
|
|
63
|
+
WorkspaceArtifact,
|
|
64
|
+
WorkspaceArtifactContentResponse,
|
|
65
|
+
WorkspaceArtifactDetailResponse,
|
|
66
|
+
WorkspaceArtifactEvent,
|
|
67
|
+
WorkspaceArtifactListOptions,
|
|
68
|
+
WorkspaceArtifactListResponse,
|
|
69
|
+
WorkspaceArtifactMutationResponse,
|
|
70
|
+
WorkspaceArtifactVersion,
|
|
71
|
+
} from "./workspace-artifacts";
|
|
59
72
|
export { normalizeWorkspaceInstructionPolicyRoleKey } from "./workspace-instruction-policies";
|
|
60
73
|
export type {
|
|
61
74
|
ActivateWorkspaceInstructionPolicyRequest,
|
package/src/types.ts
CHANGED
|
@@ -1728,6 +1728,8 @@ export const KNOWN_PERMISSIONS = [
|
|
|
1728
1728
|
"enrollments:manage",
|
|
1729
1729
|
"rigs:use",
|
|
1730
1730
|
"rigs:manage",
|
|
1731
|
+
"artifacts:read",
|
|
1732
|
+
"artifacts:publish",
|
|
1731
1733
|
] as const;
|
|
1732
1734
|
|
|
1733
1735
|
export type KnownPermission = (typeof KNOWN_PERMISSIONS)[number];
|
|
@@ -1795,7 +1797,12 @@ export type FirstPartyMcpToolName =
|
|
|
1795
1797
|
| "slack_bot_file_info"
|
|
1796
1798
|
| "slack_bot_file_content"
|
|
1797
1799
|
| "slack_bot_post_message"
|
|
1798
|
-
| "slack_bot_delete_message"
|
|
1800
|
+
| "slack_bot_delete_message"
|
|
1801
|
+
| "artifacts_list"
|
|
1802
|
+
| "artifacts_get_source"
|
|
1803
|
+
| "artifacts_create"
|
|
1804
|
+
| "artifacts_publish"
|
|
1805
|
+
| "artifacts_rollback";
|
|
1799
1806
|
|
|
1800
1807
|
export type ProductAccessMode = "local" | "configured" | "managed";
|
|
1801
1808
|
|
|
@@ -2160,7 +2167,7 @@ export type ClientAuthConfig =
|
|
|
2160
2167
|
|
|
2161
2168
|
// Kept value-identical to @opengeni/contracts and pinned by the SDK contract
|
|
2162
2169
|
// parity suite. The SDK has no runtime dependency on the Zod contracts package.
|
|
2163
|
-
export const OPENGENI_API_CONTRACT_REVISION = "2026-07-
|
|
2170
|
+
export const OPENGENI_API_CONTRACT_REVISION = "2026-07-workspace-artifacts-v1" as const;
|
|
2164
2171
|
export const OPENGENI_API_CONTRACT_HEADER = "x-opengeni-api-contract" as const;
|
|
2165
2172
|
/** Bounded request/response identifier shared by browser, ingress, and API diagnostics. */
|
|
2166
2173
|
export const OPENGENI_CORRELATION_HEADER = "x-opengeni-correlation-id" as const;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
export type WorkspaceArtifactVersion = {
|
|
2
|
+
id: string;
|
|
3
|
+
accountId: string;
|
|
4
|
+
workspaceId: string;
|
|
5
|
+
artifactId: string;
|
|
6
|
+
revision: number;
|
|
7
|
+
contentType: "text/html";
|
|
8
|
+
contentSha256: string;
|
|
9
|
+
sizeBytes: number;
|
|
10
|
+
sourceSessionId: string | null;
|
|
11
|
+
sourceTurnId: string | null;
|
|
12
|
+
sourceAttemptId: string | null;
|
|
13
|
+
sourceExecutionGeneration: number | null;
|
|
14
|
+
createdBySubjectId: string;
|
|
15
|
+
createdAt: string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export type WorkspaceArtifact = {
|
|
19
|
+
id: string;
|
|
20
|
+
accountId: string;
|
|
21
|
+
workspaceId: string;
|
|
22
|
+
slug: string;
|
|
23
|
+
title: string;
|
|
24
|
+
description: string | null;
|
|
25
|
+
status: "active" | "archived";
|
|
26
|
+
currentVersion: WorkspaceArtifactVersion | null;
|
|
27
|
+
createdBySubjectId: string;
|
|
28
|
+
createdAt: string;
|
|
29
|
+
updatedAt: string;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export type WorkspaceArtifactEvent = {
|
|
33
|
+
id: string;
|
|
34
|
+
accountId: string;
|
|
35
|
+
workspaceId: string;
|
|
36
|
+
artifactId: string;
|
|
37
|
+
type: "published" | "rolled_back";
|
|
38
|
+
fromVersionId: string | null;
|
|
39
|
+
toVersionId: string;
|
|
40
|
+
sourceSessionId: string | null;
|
|
41
|
+
sourceTurnId: string | null;
|
|
42
|
+
sourceAttemptId: string | null;
|
|
43
|
+
sourceExecutionGeneration: number | null;
|
|
44
|
+
actorSubjectId: string;
|
|
45
|
+
reason: string;
|
|
46
|
+
createdAt: string;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export type WorkspaceArtifactListOptions = { limit?: number; cursor?: string };
|
|
50
|
+
export type WorkspaceArtifactListResponse = {
|
|
51
|
+
artifacts: WorkspaceArtifact[];
|
|
52
|
+
nextCursor: string | null;
|
|
53
|
+
truncated: boolean;
|
|
54
|
+
};
|
|
55
|
+
export type WorkspaceArtifactDetailResponse = {
|
|
56
|
+
artifact: WorkspaceArtifact;
|
|
57
|
+
versions: WorkspaceArtifactVersion[];
|
|
58
|
+
events: WorkspaceArtifactEvent[];
|
|
59
|
+
versionsTruncated: boolean;
|
|
60
|
+
eventsTruncated: boolean;
|
|
61
|
+
};
|
|
62
|
+
export type WorkspaceArtifactContentResponse = {
|
|
63
|
+
artifactId: string;
|
|
64
|
+
versionId: string;
|
|
65
|
+
contentType: "text/html";
|
|
66
|
+
contentSha256: string;
|
|
67
|
+
html: string;
|
|
68
|
+
};
|
|
69
|
+
export type WorkspaceArtifactMutationResponse = {
|
|
70
|
+
artifact: WorkspaceArtifact;
|
|
71
|
+
version: WorkspaceArtifactVersion;
|
|
72
|
+
event: WorkspaceArtifactEvent;
|
|
73
|
+
replayed: boolean;
|
|
74
|
+
};
|
|
75
|
+
export type CreateWorkspaceArtifactRequest = {
|
|
76
|
+
slug?: string;
|
|
77
|
+
title: string;
|
|
78
|
+
description?: string | null;
|
|
79
|
+
html: string;
|
|
80
|
+
idempotencyKey: string;
|
|
81
|
+
};
|
|
82
|
+
export type PublishWorkspaceArtifactVersionRequest = {
|
|
83
|
+
title?: string;
|
|
84
|
+
description?: string | null;
|
|
85
|
+
html: string;
|
|
86
|
+
expectedCurrentVersionId: string;
|
|
87
|
+
idempotencyKey: string;
|
|
88
|
+
};
|
|
89
|
+
export type RollbackWorkspaceArtifactRequest = {
|
|
90
|
+
versionId: string;
|
|
91
|
+
expectedCurrentVersionId: string;
|
|
92
|
+
reason: string;
|
|
93
|
+
idempotencyKey: string;
|
|
94
|
+
};
|