openclaw-remote 0.1.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/src/types.ts ADDED
@@ -0,0 +1,102 @@
1
+ /**
2
+ * Type definitions for the Remote channel plugin.
3
+ */
4
+
5
+ /** Raw channel config from openclaw.json channels.remote */
6
+ export interface RemoteChannelConfig {
7
+ enabled?: boolean;
8
+ baseUrl?: string;
9
+ apiKey?: string;
10
+ projectId?: string;
11
+ supabaseUrl?: string;
12
+ supabaseKey?: string;
13
+ dmPolicy?: "open" | "allowlist" | "disabled";
14
+ allowedUserIds?: string | string[];
15
+ webhookPath?: string;
16
+ accounts?: Record<string, RemoteAccountRaw>;
17
+ }
18
+
19
+ /** Raw per-account config (overrides base config) */
20
+ export interface RemoteAccountRaw {
21
+ enabled?: boolean;
22
+ baseUrl?: string;
23
+ apiKey?: string;
24
+ projectId?: string;
25
+ supabaseUrl?: string;
26
+ supabaseKey?: string;
27
+ dmPolicy?: "open" | "allowlist" | "disabled";
28
+ allowedUserIds?: string | string[];
29
+ webhookPath?: string;
30
+ }
31
+
32
+ /** Fully resolved account config with defaults applied */
33
+ export interface RemoteAccount {
34
+ accountId: string;
35
+ enabled: boolean;
36
+ baseUrl: string;
37
+ apiKey: string;
38
+ projectId?: string;
39
+ supabaseUrl?: string;
40
+ supabaseKey?: string;
41
+ dmPolicy: "open" | "allowlist" | "disabled";
42
+ allowedUserIds: string[];
43
+ webhookPath?: string;
44
+ }
45
+
46
+ /** SSE event from Remote API */
47
+ export interface RemoteEvent {
48
+ type: string;
49
+ task?: RemoteTask;
50
+ task_id?: string;
51
+ comment?: RemoteComment;
52
+ changes?: { field: string; from: string; to: string };
53
+ assigned_to?: { name: string; role: string };
54
+ }
55
+
56
+ /** Remote task object */
57
+ export interface RemoteTask {
58
+ id: string;
59
+ title: string;
60
+ description?: string;
61
+ status: string;
62
+ priority: string;
63
+ type: string;
64
+ assigned_profile_id?: string;
65
+ epic_id?: string;
66
+ created_at?: string;
67
+ updated_at?: string;
68
+ task_comments?: RemoteComment[];
69
+ }
70
+
71
+ /** Remote comment object */
72
+ export interface RemoteComment {
73
+ id: string;
74
+ content: string;
75
+ author_name: string;
76
+ author_id: string;
77
+ created_at: string;
78
+ }
79
+
80
+ /** Remote heartbeat response */
81
+ export interface RemoteHeartbeat {
82
+ pending_tasks: number;
83
+ in_progress_tasks: number;
84
+ unassigned_tasks: number;
85
+ recent_activity_24h: number;
86
+ my_roles: string[];
87
+ checked_at: string;
88
+ }
89
+
90
+ /** Remote activity entry */
91
+ export interface RemoteActivity {
92
+ id: string;
93
+ type: string;
94
+ description: string;
95
+ created_at: string;
96
+ actor?: string;
97
+ }
98
+
99
+ /** API result wrapper */
100
+ export type ApiResult<T> =
101
+ | { ok: true; data: T }
102
+ | { ok: false; error: string };