@parall/sdk 1.12.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/dist/client.d.ts +329 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +718 -0
- package/dist/constants.d.ts +161 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +194 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/types.d.ts +1130 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +4 -0
- package/dist/ws.d.ts +83 -0
- package/dist/ws.d.ts.map +1 -0
- package/dist/ws.js +354 -0
- package/package.json +31 -0
- package/src/client.ts +1069 -0
- package/src/constants.ts +265 -0
- package/src/index.ts +6 -0
- package/src/types.ts +1399 -0
- package/src/ws.ts +404 -0
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
export declare const API_BASE = "/api/v1";
|
|
2
|
+
export declare const WIKI_BASE = "/wiki/v1";
|
|
3
|
+
export declare const ENDPOINTS: {
|
|
4
|
+
readonly AUTH_REGISTER: "/api/v1/auth/register";
|
|
5
|
+
readonly AUTH_LOGIN: "/api/v1/auth/login";
|
|
6
|
+
readonly AUTH_REFRESH: "/api/v1/auth/refresh";
|
|
7
|
+
readonly AUTH_LOGOUT: "/api/v1/auth/logout";
|
|
8
|
+
readonly AUTH_CHECK_EMAIL: "/api/v1/auth/check-email";
|
|
9
|
+
readonly AUTH_VERIFY_EMAIL: "/api/v1/auth/verify-email";
|
|
10
|
+
readonly AUTH_RESEND_CODE: "/api/v1/auth/resend-code";
|
|
11
|
+
readonly USERS_ME: "/api/v1/users/me";
|
|
12
|
+
readonly USER: (id: string) => string;
|
|
13
|
+
readonly WS_TICKET: "/api/v1/ws/ticket";
|
|
14
|
+
readonly ORGS: "/api/v1/orgs";
|
|
15
|
+
readonly ORG: (orgId: string) => string;
|
|
16
|
+
readonly ORG_MEMBERS: (orgId: string) => string;
|
|
17
|
+
readonly ORG_MEMBERS_ONLINE: (orgId: string) => string;
|
|
18
|
+
readonly ORG_MEMBER: (orgId: string, userId: string) => string;
|
|
19
|
+
readonly DM: (orgId: string) => string;
|
|
20
|
+
readonly CHATS: (orgId: string) => string;
|
|
21
|
+
readonly CHAT: (orgId: string, chatId: string) => string;
|
|
22
|
+
readonly CHAT_MEMBERS: (orgId: string, chatId: string) => string;
|
|
23
|
+
readonly CHAT_MEMBER: (orgId: string, chatId: string, userId: string) => string;
|
|
24
|
+
readonly CHAT_MESSAGES: (orgId: string, chatId: string) => string;
|
|
25
|
+
readonly MESSAGE: (id: string) => string;
|
|
26
|
+
readonly MESSAGE_PATCHES: (id: string) => string;
|
|
27
|
+
readonly MESSAGE_REPLIES: (id: string) => string;
|
|
28
|
+
readonly UPLOAD_PRESIGN: (orgId: string) => string;
|
|
29
|
+
readonly UPLOAD_COMPLETE: (orgId: string) => string;
|
|
30
|
+
readonly FILE: (id: string) => string;
|
|
31
|
+
readonly APPROVAL_DECIDE: (id: string) => string;
|
|
32
|
+
readonly APPROVALS_PENDING: "/api/v1/approvals/pending";
|
|
33
|
+
readonly AGENTS: (orgId: string) => string;
|
|
34
|
+
readonly AGENT: (orgId: string, agentId: string) => string;
|
|
35
|
+
readonly AGENT_API_KEYS: (orgId: string, agentId: string) => string;
|
|
36
|
+
readonly AGENT_API_KEY: (orgId: string, agentId: string, key: string) => string;
|
|
37
|
+
readonly AGENT_ACTIVITY: (orgId: string, agentId: string) => string;
|
|
38
|
+
readonly AGENT_MONITOR: (orgId: string, agentId: string) => string;
|
|
39
|
+
readonly AGENT_ME: (orgId: string) => string;
|
|
40
|
+
readonly AGENT_SESSIONS: (orgId: string, agentId: string) => string;
|
|
41
|
+
readonly AGENT_SESSION: (orgId: string, agentId: string, sessionId: string) => string;
|
|
42
|
+
readonly AGENT_SESSION_STEPS: (orgId: string, agentId: string, sessionId: string) => string;
|
|
43
|
+
readonly AGENT_TASKS: (orgId: string, agentId: string) => string;
|
|
44
|
+
readonly MACHINES: (orgId: string) => string;
|
|
45
|
+
readonly MACHINE: (orgId: string, machineId: string) => string;
|
|
46
|
+
readonly MACHINE_START: (orgId: string, machineId: string) => string;
|
|
47
|
+
readonly MACHINE_STOP: (orgId: string, machineId: string) => string;
|
|
48
|
+
readonly MACHINE_STATUS: (orgId: string, machineId: string) => string;
|
|
49
|
+
readonly MACHINE_LOGS: (orgId: string, machineId: string) => string;
|
|
50
|
+
readonly MACHINE_RESTART: (orgId: string, machineId: string) => string;
|
|
51
|
+
readonly MACHINE_RESTART_ALL: (orgId: string) => string;
|
|
52
|
+
readonly MACHINE_WORKSPACE: (orgId: string, machineId: string) => string;
|
|
53
|
+
readonly TASKS: (orgId: string) => string;
|
|
54
|
+
readonly TASK: (orgId: string, taskId: string) => string;
|
|
55
|
+
readonly TASK_SUBTASKS: (orgId: string, taskId: string) => string;
|
|
56
|
+
readonly TASK_RELATIONS: (orgId: string, taskId: string) => string;
|
|
57
|
+
readonly TASK_RELATION: (orgId: string, taskId: string, relId: string) => string;
|
|
58
|
+
readonly TASK_COMMENTS: (orgId: string, taskId: string) => string;
|
|
59
|
+
readonly TASK_COMMENT: (orgId: string, taskId: string, commentId: string) => string;
|
|
60
|
+
readonly TASK_ACTIVITIES: (orgId: string, taskId: string) => string;
|
|
61
|
+
readonly PROJECTS: (orgId: string) => string;
|
|
62
|
+
readonly PROJECT: (orgId: string, projectId: string) => string;
|
|
63
|
+
readonly ORG_INVITATIONS: (orgId: string) => string;
|
|
64
|
+
readonly ORG_INVITATION: (orgId: string, invId: string) => string;
|
|
65
|
+
readonly ORG_INVITATION_RESEND: (orgId: string, invId: string) => string;
|
|
66
|
+
readonly MY_INVITATIONS: "/api/v1/invitations/pending";
|
|
67
|
+
readonly INVITATION_ACCEPT: (id: string) => string;
|
|
68
|
+
readonly INVITATION_DECLINE: (id: string) => string;
|
|
69
|
+
readonly INVITATION_BY_TOKEN: (token: string) => string;
|
|
70
|
+
readonly WIKIS: (orgId: string) => string;
|
|
71
|
+
readonly WIKI: (orgId: string, wikiId: string) => string;
|
|
72
|
+
readonly WIKI_TREE: (orgId: string, wikiId: string) => string;
|
|
73
|
+
readonly WIKI_BLOB: (orgId: string, wikiId: string) => string;
|
|
74
|
+
readonly WIKI_NODE_SECTIONS: (orgId: string, wikiId: string) => string;
|
|
75
|
+
readonly WIKI_SEARCH: (orgId: string, wikiId: string) => string;
|
|
76
|
+
readonly WIKI_PAGE_INDEX: (orgId: string, wikiId: string) => string;
|
|
77
|
+
readonly WIKI_REFS: (orgId: string, wikiId: string) => string;
|
|
78
|
+
readonly WIKI_REFS_CHECK: (orgId: string, wikiId: string) => string;
|
|
79
|
+
readonly WIKI_CHANGESETS: (orgId: string, wikiId: string) => string;
|
|
80
|
+
readonly WIKI_CHANGESET: (orgId: string, wikiId: string, changesetId: string) => string;
|
|
81
|
+
readonly WIKI_CHANGESET_DIFF: (orgId: string, wikiId: string, changesetId: string) => string;
|
|
82
|
+
readonly WIKI_CHANGESET_MERGE: (orgId: string, wikiId: string, changesetId: string) => string;
|
|
83
|
+
readonly WIKI_CHANGESET_CLOSE: (orgId: string, wikiId: string, changesetId: string) => string;
|
|
84
|
+
readonly WIKI_PATH_SCOPES: (orgId: string, wikiId: string) => string;
|
|
85
|
+
readonly WIKI_PATH_SCOPE: (orgId: string, wikiId: string, scopeId: string) => string;
|
|
86
|
+
readonly WIKI_ACCESS_STATUS: (orgId: string, wikiId: string) => string;
|
|
87
|
+
readonly WIKI_ACCESS_REQUESTS: (orgId: string, wikiId: string) => string;
|
|
88
|
+
readonly WIKI_COMMITS: (orgId: string, wikiId: string) => string;
|
|
89
|
+
readonly WIKI_FILE_COMMITS: (orgId: string, wikiId: string) => string;
|
|
90
|
+
readonly WIKI_BLAME: (orgId: string, wikiId: string) => string;
|
|
91
|
+
readonly WIKI_OPERATIONS: (orgId: string, wikiId: string) => string;
|
|
92
|
+
readonly WIKI_OPERATION_REVERT: (orgId: string, wikiId: string, opId: string) => string;
|
|
93
|
+
readonly INBOX: (orgId: string) => string;
|
|
94
|
+
readonly INBOX_UNREAD_COUNT: (orgId: string) => string;
|
|
95
|
+
readonly INBOX_ITEM_READ: (orgId: string, id: string) => string;
|
|
96
|
+
readonly INBOX_ITEM_ARCHIVE: (orgId: string, id: string) => string;
|
|
97
|
+
readonly INBOX_MARK_ALL_READ: (orgId: string) => string;
|
|
98
|
+
readonly INBOX_ARCHIVE_ALL: (orgId: string) => string;
|
|
99
|
+
readonly INBOX_ITEM: (orgId: string, id: string) => string;
|
|
100
|
+
readonly INBOX_ACK: (orgId: string) => string;
|
|
101
|
+
readonly DISPATCH: (orgId: string) => string;
|
|
102
|
+
readonly DISPATCH_PENDING_COUNT: (orgId: string) => string;
|
|
103
|
+
readonly DISPATCH_ACK: (orgId: string) => string;
|
|
104
|
+
readonly DISPATCH_ACK_BY_ID: (orgId: string, id: string) => string;
|
|
105
|
+
readonly UNREAD: "/api/v1/me/unread";
|
|
106
|
+
readonly CHAT_READ: (orgId: string, chatId: string) => string;
|
|
107
|
+
readonly REFS_RESOLVE: (orgId: string) => string;
|
|
108
|
+
readonly REFS_BACKLINKS: (orgId: string) => string;
|
|
109
|
+
readonly REFS_CHECK: (orgId: string) => string;
|
|
110
|
+
readonly PLATFORM_CONFIG: "/api/v1/agents/platform-config";
|
|
111
|
+
readonly PUSH_SUBSCRIBE: "/api/v1/push/subscribe";
|
|
112
|
+
readonly PUSH_UNSUBSCRIBE: "/api/v1/push/unsubscribe";
|
|
113
|
+
readonly PUSH_VAPID_KEY: "/api/v1/push/vapid-key";
|
|
114
|
+
readonly NOTIFICATION_PREFERENCES: "/api/v1/notification-preferences";
|
|
115
|
+
};
|
|
116
|
+
export declare const WS_EVENTS: {
|
|
117
|
+
readonly PING: "ping";
|
|
118
|
+
readonly TYPING: "typing";
|
|
119
|
+
readonly WATCH: "watch";
|
|
120
|
+
readonly AGENT_HEARTBEAT: "agent.heartbeat";
|
|
121
|
+
readonly HELLO: "hello";
|
|
122
|
+
readonly PONG: "pong";
|
|
123
|
+
readonly WATCHING: "watching";
|
|
124
|
+
readonly MESSAGE_NEW: "message.new";
|
|
125
|
+
readonly MESSAGE_PATCH: "message.patch";
|
|
126
|
+
readonly MESSAGE_EDIT: "message.edit";
|
|
127
|
+
readonly MESSAGE_DELETE: "message.delete";
|
|
128
|
+
readonly TYPING_UPDATE: "typing.update";
|
|
129
|
+
readonly CHAT_UPDATE: "chat.update";
|
|
130
|
+
readonly CHAT_DELETED: "chat.deleted";
|
|
131
|
+
readonly APPROVAL_UPDATE: "approval.update";
|
|
132
|
+
readonly CARD_UPDATE: "card.update";
|
|
133
|
+
readonly RECOVERY_OVERFLOW: "recovery.overflow";
|
|
134
|
+
readonly MEMBERSHIP_CHANGED: "membership.changed";
|
|
135
|
+
readonly TASK_CREATED: "task.created";
|
|
136
|
+
readonly TASK_UPDATED: "task.updated";
|
|
137
|
+
readonly TASK_DELETED: "task.deleted";
|
|
138
|
+
readonly TASK_COMMENT_CREATED: "task.comment.created";
|
|
139
|
+
readonly TASK_COMMENT_UPDATED: "task.comment.updated";
|
|
140
|
+
readonly TASK_COMMENT_DELETED: "task.comment.deleted";
|
|
141
|
+
readonly PROJECT_CREATED: "project.created";
|
|
142
|
+
readonly PROJECT_UPDATED: "project.updated";
|
|
143
|
+
readonly PROJECT_DELETED: "project.deleted";
|
|
144
|
+
readonly AGENT_SESSION_NEW: "agent_session.new";
|
|
145
|
+
readonly AGENT_SESSION_UPDATE: "agent_session.update";
|
|
146
|
+
readonly AGENT_STEP_NEW: "agent_step.new";
|
|
147
|
+
readonly INVITATION_NEW: "invitation.new";
|
|
148
|
+
readonly INVITATION_ACCEPTED: "invitation.accepted";
|
|
149
|
+
readonly INVITATION_DECLINED: "invitation.declined";
|
|
150
|
+
readonly AGENT_CONFIG_UPDATE: "agent_config.update";
|
|
151
|
+
readonly PRESENCE_UPDATE: "presence.update";
|
|
152
|
+
readonly WIKI_CHANGESET_CREATED: "wiki.changeset.created";
|
|
153
|
+
readonly WIKI_CHANGESET_UPDATED: "wiki.changeset.updated";
|
|
154
|
+
readonly NOTIFICATION_ALERT: "notification.alert";
|
|
155
|
+
readonly INBOX_NEW: "inbox.new";
|
|
156
|
+
readonly INBOX_UPDATE: "inbox.update";
|
|
157
|
+
readonly INBOX_BULK_UPDATE: "inbox.bulk_update";
|
|
158
|
+
readonly READ_POSITION_UPDATED: "read_position.updated";
|
|
159
|
+
readonly DISPATCH_NEW: "dispatch.new";
|
|
160
|
+
};
|
|
161
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,QAAQ,YAAY,CAAC;AAGlC,eAAO,MAAM,SAAS,aAAa,CAAC;AAGpC,eAAO,MAAM,SAAS;;;;;;;;;wBAYT,MAAM;;;0BAQJ,MAAM;kCACE,MAAM;yCACC,MAAM;iCACd,MAAM,UAAU,MAAM;yBAI9B,MAAM;4BAGH,MAAM;2BACP,MAAM,UAAU,MAAM;mCACd,MAAM,UAAU,MAAM;kCAEvB,MAAM,UAAU,MAAM,UAAU,MAAM;oCAEpC,MAAM,UAAU,MAAM;2BAI/B,MAAM;mCACE,MAAM;mCACN,MAAM;qCAGJ,MAAM;sCACL,MAAM;wBACpB,MAAM;mCAGK,MAAM;;6BAIZ,MAAM;4BACP,MAAM,WAAW,MAAM;qCACd,MAAM,WAAW,MAAM;oCAExB,MAAM,WAAW,MAAM,OAAO,MAAM;qCAEnC,MAAM,WAAW,MAAM;oCAExB,MAAM,WAAW,MAAM;+BAE5B,MAAM;qCAEA,MAAM,WAAW,MAAM;oCAExB,MAAM,WAAW,MAAM,aAAa,MAAM;0CAEpC,MAAM,WAAW,MAAM,aAAa,MAAM;kCAElD,MAAM,WAAW,MAAM;+BAG1B,MAAM;8BACP,MAAM,aAAa,MAAM;oCAEnB,MAAM,aAAa,MAAM;mCAE1B,MAAM,aAAa,MAAM;qCAEvB,MAAM,aAAa,MAAM;mCAE3B,MAAM,aAAa,MAAM;sCAEtB,MAAM,aAAa,MAAM;0CAErB,MAAM;wCAER,MAAM,aAAa,MAAM;4BAGrC,MAAM;2BACP,MAAM,UAAU,MAAM;oCACb,MAAM,UAAU,MAAM;qCAErB,MAAM,UAAU,MAAM;oCAEvB,MAAM,UAAU,MAAM,SAAS,MAAM;oCAErC,MAAM,UAAU,MAAM;mCAEvB,MAAM,UAAU,MAAM,aAAa,MAAM;sCAEtC,MAAM,UAAU,MAAM;+BAI7B,MAAM;8BACP,MAAM,aAAa,MAAM;sCAGjB,MAAM;qCACP,MAAM,SAAS,MAAM;4CAEd,MAAM,SAAS,MAAM;;qCAK5B,MAAM;sCACL,MAAM;0CACF,MAAM;4BAGpB,MAAM;2BACP,MAAM,UAAU,MAAM;gCACjB,MAAM,UAAU,MAAM;gCACtB,MAAM,UAAU,MAAM;yCACb,MAAM,UAAU,MAAM;kCAC7B,MAAM,UAAU,MAAM;sCAClB,MAAM,UAAU,MAAM;gCAC5B,MAAM,UAAU,MAAM;sCAChB,MAAM,UAAU,MAAM;sCACtB,MAAM,UAAU,MAAM;qCACvB,MAAM,UAAU,MAAM,eAAe,MAAM;0CAEtC,MAAM,UAAU,MAAM,eAAe,MAAM;2CAE1C,MAAM,UAAU,MAAM,eAAe,MAAM;2CAE3C,MAAM,UAAU,MAAM,eAAe,MAAM;uCAI/C,MAAM,UAAU,MAAM;sCAEvB,MAAM,UAAU,MAAM,WAAW,MAAM;yCAEpC,MAAM,UAAU,MAAM;2CAEpB,MAAM,UAAU,MAAM;mCAI9B,MAAM,UAAU,MAAM;wCAEjB,MAAM,UAAU,MAAM;iCAE7B,MAAM,UAAU,MAAM;sCAIjB,MAAM,UAAU,MAAM;4CAEhB,MAAM,UAAU,MAAM,QAAQ,MAAM;4BAIpD,MAAM;yCACO,MAAM;sCACT,MAAM,MAAM,MAAM;yCACf,MAAM,MAAM,MAAM;0CAEjB,MAAM;wCACR,MAAM;iCACb,MAAM,MAAM,MAAM;gCACnB,MAAM;+BAGP,MAAM;6CACQ,MAAM;mCAChB,MAAM;yCACA,MAAM,MAAM,MAAM;;gCAI3B,MAAM,UAAU,MAAM;mCAInB,MAAM;qCACJ,MAAM;iCACV,MAAM;;;;;;CAalB,CAAC;AAGX,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+CZ,CAAC"}
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
// API base path
|
|
2
|
+
export const API_BASE = '/api/v1';
|
|
3
|
+
// Wiki-service base path (served by wiki-service, routed via LB path rules)
|
|
4
|
+
export const WIKI_BASE = '/wiki/v1';
|
|
5
|
+
// REST endpoints
|
|
6
|
+
export const ENDPOINTS = {
|
|
7
|
+
// Auth
|
|
8
|
+
AUTH_REGISTER: `${API_BASE}/auth/register`,
|
|
9
|
+
AUTH_LOGIN: `${API_BASE}/auth/login`,
|
|
10
|
+
AUTH_REFRESH: `${API_BASE}/auth/refresh`,
|
|
11
|
+
AUTH_LOGOUT: `${API_BASE}/auth/logout`,
|
|
12
|
+
AUTH_CHECK_EMAIL: `${API_BASE}/auth/check-email`,
|
|
13
|
+
AUTH_VERIFY_EMAIL: `${API_BASE}/auth/verify-email`,
|
|
14
|
+
AUTH_RESEND_CODE: `${API_BASE}/auth/resend-code`,
|
|
15
|
+
// Users
|
|
16
|
+
USERS_ME: `${API_BASE}/users/me`,
|
|
17
|
+
USER: (id) => `${API_BASE}/users/${id}`,
|
|
18
|
+
// WebSocket ticket
|
|
19
|
+
WS_TICKET: `${API_BASE}/ws/ticket`,
|
|
20
|
+
// Organizations (global)
|
|
21
|
+
ORGS: `${API_BASE}/orgs`,
|
|
22
|
+
// Org-scoped
|
|
23
|
+
ORG: (orgId) => `${API_BASE}/orgs/${orgId}`,
|
|
24
|
+
ORG_MEMBERS: (orgId) => `${API_BASE}/orgs/${orgId}/members`,
|
|
25
|
+
ORG_MEMBERS_ONLINE: (orgId) => `${API_BASE}/orgs/${orgId}/members/online`,
|
|
26
|
+
ORG_MEMBER: (orgId, userId) => `${API_BASE}/orgs/${orgId}/members/${userId}`,
|
|
27
|
+
// Direct messages (org-scoped, atomic find-or-create + send)
|
|
28
|
+
DM: (orgId) => `${API_BASE}/orgs/${orgId}/dm`,
|
|
29
|
+
// Chats (org-scoped)
|
|
30
|
+
CHATS: (orgId) => `${API_BASE}/orgs/${orgId}/chats`,
|
|
31
|
+
CHAT: (orgId, chatId) => `${API_BASE}/orgs/${orgId}/chats/${chatId}`,
|
|
32
|
+
CHAT_MEMBERS: (orgId, chatId) => `${API_BASE}/orgs/${orgId}/chats/${chatId}/members`,
|
|
33
|
+
CHAT_MEMBER: (orgId, chatId, userId) => `${API_BASE}/orgs/${orgId}/chats/${chatId}/members/${userId}`,
|
|
34
|
+
CHAT_MESSAGES: (orgId, chatId) => `${API_BASE}/orgs/${orgId}/chats/${chatId}/messages`,
|
|
35
|
+
// Messages (global, by message ID)
|
|
36
|
+
MESSAGE: (id) => `${API_BASE}/messages/${id}`,
|
|
37
|
+
MESSAGE_PATCHES: (id) => `${API_BASE}/messages/${id}/patches`,
|
|
38
|
+
MESSAGE_REPLIES: (id) => `${API_BASE}/messages/${id}/replies`,
|
|
39
|
+
// Upload (org-scoped)
|
|
40
|
+
UPLOAD_PRESIGN: (orgId) => `${API_BASE}/orgs/${orgId}/upload/presign`,
|
|
41
|
+
UPLOAD_COMPLETE: (orgId) => `${API_BASE}/orgs/${orgId}/upload/complete`,
|
|
42
|
+
FILE: (id) => `${API_BASE}/files/${id}`,
|
|
43
|
+
// Approvals (global)
|
|
44
|
+
APPROVAL_DECIDE: (id) => `${API_BASE}/approvals/${id}/decide`,
|
|
45
|
+
APPROVALS_PENDING: `${API_BASE}/approvals/pending`,
|
|
46
|
+
// Agents (org-scoped)
|
|
47
|
+
AGENTS: (orgId) => `${API_BASE}/orgs/${orgId}/agents`,
|
|
48
|
+
AGENT: (orgId, agentId) => `${API_BASE}/orgs/${orgId}/agents/${agentId}`,
|
|
49
|
+
AGENT_API_KEYS: (orgId, agentId) => `${API_BASE}/orgs/${orgId}/agents/${agentId}/api-keys`,
|
|
50
|
+
AGENT_API_KEY: (orgId, agentId, key) => `${API_BASE}/orgs/${orgId}/agents/${agentId}/api-keys/${key}`,
|
|
51
|
+
AGENT_ACTIVITY: (orgId, agentId) => `${API_BASE}/orgs/${orgId}/agents/${agentId}/activity`,
|
|
52
|
+
AGENT_MONITOR: (orgId, agentId) => `${API_BASE}/orgs/${orgId}/agents/${agentId}/monitor`,
|
|
53
|
+
AGENT_ME: (orgId) => `${API_BASE}/orgs/${orgId}/agents/me`,
|
|
54
|
+
AGENT_SESSIONS: (orgId, agentId) => `${API_BASE}/orgs/${orgId}/agents/${agentId}/sessions`,
|
|
55
|
+
AGENT_SESSION: (orgId, agentId, sessionId) => `${API_BASE}/orgs/${orgId}/agents/${agentId}/sessions/${sessionId}`,
|
|
56
|
+
AGENT_SESSION_STEPS: (orgId, agentId, sessionId) => `${API_BASE}/orgs/${orgId}/agents/${agentId}/sessions/${sessionId}/steps`,
|
|
57
|
+
AGENT_TASKS: (orgId, agentId) => `${API_BASE}/orgs/${orgId}/agents/${agentId}/tasks`,
|
|
58
|
+
// Machines (org-scoped)
|
|
59
|
+
MACHINES: (orgId) => `${API_BASE}/orgs/${orgId}/machines`,
|
|
60
|
+
MACHINE: (orgId, machineId) => `${API_BASE}/orgs/${orgId}/machines/${machineId}`,
|
|
61
|
+
MACHINE_START: (orgId, machineId) => `${API_BASE}/orgs/${orgId}/machines/${machineId}/start`,
|
|
62
|
+
MACHINE_STOP: (orgId, machineId) => `${API_BASE}/orgs/${orgId}/machines/${machineId}/stop`,
|
|
63
|
+
MACHINE_STATUS: (orgId, machineId) => `${API_BASE}/orgs/${orgId}/machines/${machineId}/status`,
|
|
64
|
+
MACHINE_LOGS: (orgId, machineId) => `${API_BASE}/orgs/${orgId}/machines/${machineId}/logs`,
|
|
65
|
+
MACHINE_RESTART: (orgId, machineId) => `${API_BASE}/orgs/${orgId}/machines/${machineId}/restart`,
|
|
66
|
+
MACHINE_RESTART_ALL: (orgId) => `${API_BASE}/orgs/${orgId}/machines/restart-all`,
|
|
67
|
+
MACHINE_WORKSPACE: (orgId, machineId) => `${API_BASE}/orgs/${orgId}/machines/${machineId}/workspace`,
|
|
68
|
+
// Tasks (org-scoped)
|
|
69
|
+
TASKS: (orgId) => `${API_BASE}/orgs/${orgId}/tasks`,
|
|
70
|
+
TASK: (orgId, taskId) => `${API_BASE}/orgs/${orgId}/tasks/${taskId}`,
|
|
71
|
+
TASK_SUBTASKS: (orgId, taskId) => `${API_BASE}/orgs/${orgId}/tasks/${taskId}/subtasks`,
|
|
72
|
+
TASK_RELATIONS: (orgId, taskId) => `${API_BASE}/orgs/${orgId}/tasks/${taskId}/relations`,
|
|
73
|
+
TASK_RELATION: (orgId, taskId, relId) => `${API_BASE}/orgs/${orgId}/tasks/${taskId}/relations/${relId}`,
|
|
74
|
+
TASK_COMMENTS: (orgId, taskId) => `${API_BASE}/orgs/${orgId}/tasks/${taskId}/comments`,
|
|
75
|
+
TASK_COMMENT: (orgId, taskId, commentId) => `${API_BASE}/orgs/${orgId}/tasks/${taskId}/comments/${commentId}`,
|
|
76
|
+
TASK_ACTIVITIES: (orgId, taskId) => `${API_BASE}/orgs/${orgId}/tasks/${taskId}/activities`,
|
|
77
|
+
// Projects (org-scoped)
|
|
78
|
+
PROJECTS: (orgId) => `${API_BASE}/orgs/${orgId}/projects`,
|
|
79
|
+
PROJECT: (orgId, projectId) => `${API_BASE}/orgs/${orgId}/projects/${projectId}`,
|
|
80
|
+
// Invitations (org-scoped, admin)
|
|
81
|
+
ORG_INVITATIONS: (orgId) => `${API_BASE}/orgs/${orgId}/invitations`,
|
|
82
|
+
ORG_INVITATION: (orgId, invId) => `${API_BASE}/orgs/${orgId}/invitations/${invId}`,
|
|
83
|
+
ORG_INVITATION_RESEND: (orgId, invId) => `${API_BASE}/orgs/${orgId}/invitations/${invId}/resend`,
|
|
84
|
+
// Invitations (invitee)
|
|
85
|
+
MY_INVITATIONS: `${API_BASE}/invitations/pending`,
|
|
86
|
+
INVITATION_ACCEPT: (id) => `${API_BASE}/invitations/${id}/accept`,
|
|
87
|
+
INVITATION_DECLINE: (id) => `${API_BASE}/invitations/${id}/decline`,
|
|
88
|
+
INVITATION_BY_TOKEN: (token) => `${API_BASE}/invitations/by-token/${token}`,
|
|
89
|
+
// Wikis (org-scoped, served by wiki-service)
|
|
90
|
+
WIKIS: (orgId) => `${WIKI_BASE}/orgs/${orgId}/wikis`,
|
|
91
|
+
WIKI: (orgId, wikiId) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}`,
|
|
92
|
+
WIKI_TREE: (orgId, wikiId) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/tree`,
|
|
93
|
+
WIKI_BLOB: (orgId, wikiId) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/blob`,
|
|
94
|
+
WIKI_NODE_SECTIONS: (orgId, wikiId) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/node-sections`,
|
|
95
|
+
WIKI_SEARCH: (orgId, wikiId) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/search`,
|
|
96
|
+
WIKI_PAGE_INDEX: (orgId, wikiId) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/page-index`,
|
|
97
|
+
WIKI_REFS: (orgId, wikiId) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/refs`,
|
|
98
|
+
WIKI_REFS_CHECK: (orgId, wikiId) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/refs/check`,
|
|
99
|
+
WIKI_CHANGESETS: (orgId, wikiId) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/changesets`,
|
|
100
|
+
WIKI_CHANGESET: (orgId, wikiId, changesetId) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/changesets/${changesetId}`,
|
|
101
|
+
WIKI_CHANGESET_DIFF: (orgId, wikiId, changesetId) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/changesets/${changesetId}/diff`,
|
|
102
|
+
WIKI_CHANGESET_MERGE: (orgId, wikiId, changesetId) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/changesets/${changesetId}/merge`,
|
|
103
|
+
WIKI_CHANGESET_CLOSE: (orgId, wikiId, changesetId) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/changesets/${changesetId}/close`,
|
|
104
|
+
// Wiki Path Scopes (AFCS ACL)
|
|
105
|
+
WIKI_PATH_SCOPES: (orgId, wikiId) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/path-scopes`,
|
|
106
|
+
WIKI_PATH_SCOPE: (orgId, wikiId, scopeId) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/path-scopes/${scopeId}`,
|
|
107
|
+
WIKI_ACCESS_STATUS: (orgId, wikiId) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/access-status`,
|
|
108
|
+
WIKI_ACCESS_REQUESTS: (orgId, wikiId) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/access-requests`,
|
|
109
|
+
// Wiki History (commits, file commits, blame)
|
|
110
|
+
WIKI_COMMITS: (orgId, wikiId) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/commits`,
|
|
111
|
+
WIKI_FILE_COMMITS: (orgId, wikiId) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/file-commits`,
|
|
112
|
+
WIKI_BLAME: (orgId, wikiId) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/blame`,
|
|
113
|
+
// Wiki Operations (audit log)
|
|
114
|
+
WIKI_OPERATIONS: (orgId, wikiId) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/operations`,
|
|
115
|
+
WIKI_OPERATION_REVERT: (orgId, wikiId, opId) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/operations/${opId}/revert`,
|
|
116
|
+
// Inbox (org-scoped)
|
|
117
|
+
INBOX: (orgId) => `${API_BASE}/orgs/${orgId}/inbox`,
|
|
118
|
+
INBOX_UNREAD_COUNT: (orgId) => `${API_BASE}/orgs/${orgId}/inbox/unread-count`,
|
|
119
|
+
INBOX_ITEM_READ: (orgId, id) => `${API_BASE}/orgs/${orgId}/inbox/${id}/read`,
|
|
120
|
+
INBOX_ITEM_ARCHIVE: (orgId, id) => `${API_BASE}/orgs/${orgId}/inbox/${id}/archive`,
|
|
121
|
+
// Snooze/Unsnooze deferred until un-snooze cron worker is implemented
|
|
122
|
+
INBOX_MARK_ALL_READ: (orgId) => `${API_BASE}/orgs/${orgId}/inbox/mark-all-read`,
|
|
123
|
+
INBOX_ARCHIVE_ALL: (orgId) => `${API_BASE}/orgs/${orgId}/inbox/archive-all`,
|
|
124
|
+
INBOX_ITEM: (orgId, id) => `${API_BASE}/orgs/${orgId}/inbox/${id}`,
|
|
125
|
+
INBOX_ACK: (orgId) => `${API_BASE}/orgs/${orgId}/inbox/ack`,
|
|
126
|
+
// Dispatch (agent event delivery)
|
|
127
|
+
DISPATCH: (orgId) => `${API_BASE}/orgs/${orgId}/dispatch`,
|
|
128
|
+
DISPATCH_PENDING_COUNT: (orgId) => `${API_BASE}/orgs/${orgId}/dispatch/pending-count`,
|
|
129
|
+
DISPATCH_ACK: (orgId) => `${API_BASE}/orgs/${orgId}/dispatch/ack`,
|
|
130
|
+
DISPATCH_ACK_BY_ID: (orgId, id) => `${API_BASE}/orgs/${orgId}/dispatch/${id}/ack`,
|
|
131
|
+
// Unread
|
|
132
|
+
UNREAD: `${API_BASE}/me/unread`,
|
|
133
|
+
CHAT_READ: (orgId, chatId) => `${API_BASE}/orgs/${orgId}/chats/${chatId}/read`,
|
|
134
|
+
// References (org-scoped)
|
|
135
|
+
REFS_RESOLVE: (orgId) => `${API_BASE}/orgs/${orgId}/refs/resolve`,
|
|
136
|
+
REFS_BACKLINKS: (orgId) => `${API_BASE}/orgs/${orgId}/refs/backlinks`,
|
|
137
|
+
REFS_CHECK: (orgId) => `${API_BASE}/orgs/${orgId}/refs/check`,
|
|
138
|
+
// Platform config (agent-scoped, not org-scoped)
|
|
139
|
+
PLATFORM_CONFIG: `${API_BASE}/agents/platform-config`,
|
|
140
|
+
// Push notifications
|
|
141
|
+
PUSH_SUBSCRIBE: `${API_BASE}/push/subscribe`,
|
|
142
|
+
PUSH_UNSUBSCRIBE: `${API_BASE}/push/unsubscribe`,
|
|
143
|
+
PUSH_VAPID_KEY: `${API_BASE}/push/vapid-key`,
|
|
144
|
+
// Notification preferences
|
|
145
|
+
NOTIFICATION_PREFERENCES: `${API_BASE}/notification-preferences`,
|
|
146
|
+
};
|
|
147
|
+
// WebSocket event types
|
|
148
|
+
export const WS_EVENTS = {
|
|
149
|
+
// Client -> Server
|
|
150
|
+
PING: 'ping',
|
|
151
|
+
TYPING: 'typing',
|
|
152
|
+
WATCH: 'watch',
|
|
153
|
+
AGENT_HEARTBEAT: 'agent.heartbeat',
|
|
154
|
+
// Server -> Client
|
|
155
|
+
HELLO: 'hello',
|
|
156
|
+
PONG: 'pong',
|
|
157
|
+
WATCHING: 'watching',
|
|
158
|
+
MESSAGE_NEW: 'message.new',
|
|
159
|
+
MESSAGE_PATCH: 'message.patch',
|
|
160
|
+
MESSAGE_EDIT: 'message.edit',
|
|
161
|
+
MESSAGE_DELETE: 'message.delete',
|
|
162
|
+
TYPING_UPDATE: 'typing.update',
|
|
163
|
+
CHAT_UPDATE: 'chat.update',
|
|
164
|
+
CHAT_DELETED: 'chat.deleted',
|
|
165
|
+
APPROVAL_UPDATE: 'approval.update', // deprecated
|
|
166
|
+
CARD_UPDATE: 'card.update',
|
|
167
|
+
RECOVERY_OVERFLOW: 'recovery.overflow',
|
|
168
|
+
MEMBERSHIP_CHANGED: 'membership.changed',
|
|
169
|
+
TASK_CREATED: 'task.created',
|
|
170
|
+
TASK_UPDATED: 'task.updated',
|
|
171
|
+
TASK_DELETED: 'task.deleted',
|
|
172
|
+
TASK_COMMENT_CREATED: 'task.comment.created',
|
|
173
|
+
TASK_COMMENT_UPDATED: 'task.comment.updated',
|
|
174
|
+
TASK_COMMENT_DELETED: 'task.comment.deleted',
|
|
175
|
+
PROJECT_CREATED: 'project.created',
|
|
176
|
+
PROJECT_UPDATED: 'project.updated',
|
|
177
|
+
PROJECT_DELETED: 'project.deleted',
|
|
178
|
+
AGENT_SESSION_NEW: 'agent_session.new',
|
|
179
|
+
AGENT_SESSION_UPDATE: 'agent_session.update',
|
|
180
|
+
AGENT_STEP_NEW: 'agent_step.new',
|
|
181
|
+
INVITATION_NEW: 'invitation.new',
|
|
182
|
+
INVITATION_ACCEPTED: 'invitation.accepted',
|
|
183
|
+
INVITATION_DECLINED: 'invitation.declined',
|
|
184
|
+
AGENT_CONFIG_UPDATE: 'agent_config.update',
|
|
185
|
+
PRESENCE_UPDATE: 'presence.update',
|
|
186
|
+
WIKI_CHANGESET_CREATED: 'wiki.changeset.created',
|
|
187
|
+
WIKI_CHANGESET_UPDATED: 'wiki.changeset.updated',
|
|
188
|
+
NOTIFICATION_ALERT: 'notification.alert',
|
|
189
|
+
INBOX_NEW: 'inbox.new',
|
|
190
|
+
INBOX_UPDATE: 'inbox.update',
|
|
191
|
+
INBOX_BULK_UPDATE: 'inbox.bulk_update',
|
|
192
|
+
READ_POSITION_UPDATED: 'read_position.updated',
|
|
193
|
+
DISPATCH_NEW: 'dispatch.new',
|
|
194
|
+
};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './types.js';
|
|
2
|
+
export * from './constants.js';
|
|
3
|
+
export { ParallClient, ApiError } from './client.js';
|
|
4
|
+
export type { ParallClientOptions } from './client.js';
|
|
5
|
+
export { ParallWs } from './ws.js';
|
|
6
|
+
export type { ParallWsOptions, WsConnectionState, WsEventType, WsEventHandler, WsClientEventMap } from './ws.js';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACrD,YAAY,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,YAAY,EAAE,eAAe,EAAE,iBAAiB,EAAE,WAAW,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC"}
|
package/dist/index.js
ADDED