@hailer/mcp 0.0.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/.claude/commands/tool-builder.md +37 -0
- package/.claude/commands/ws-pull.md +44 -0
- package/.claude/settings.json +8 -0
- package/.claude/settings.local.json +49 -0
- package/.claude/skills/activity-api/SKILL.md +96 -0
- package/.claude/skills/activity-api/references/activity-endpoints.md +845 -0
- package/.claude/skills/add-app-member-skill/SKILL.md +977 -0
- package/.claude/skills/agent-building/SKILL.md +243 -0
- package/.claude/skills/agent-building/references/architecture-patterns.md +446 -0
- package/.claude/skills/agent-building/references/code-examples.md +587 -0
- package/.claude/skills/agent-building/references/implementation-guide.md +619 -0
- package/.claude/skills/app-api/SKILL.md +219 -0
- package/.claude/skills/app-api/references/app-endpoints.md +759 -0
- package/.claude/skills/building-hailer-apps-skill/SKILL.md +548 -0
- package/.claude/skills/create-app-skill/SKILL.md +1101 -0
- package/.claude/skills/create-insight-skill/SKILL.md +1317 -0
- package/.claude/skills/get-insight-data-skill/SKILL.md +1053 -0
- package/.claude/skills/hailer-api/SKILL.md +283 -0
- package/.claude/skills/hailer-api/references/activities.md +620 -0
- package/.claude/skills/hailer-api/references/authentication.md +216 -0
- package/.claude/skills/hailer-api/references/datasets.md +437 -0
- package/.claude/skills/hailer-api/references/files.md +301 -0
- package/.claude/skills/hailer-api/references/insights.md +469 -0
- package/.claude/skills/hailer-api/references/workflows.md +720 -0
- package/.claude/skills/hailer-api/references/workspaces-users.md +445 -0
- package/.claude/skills/insight-api/SKILL.md +185 -0
- package/.claude/skills/insight-api/references/insight-endpoints.md +514 -0
- package/.claude/skills/install-workflow-skill/SKILL.md +1056 -0
- package/.claude/skills/list-apps-skill/SKILL.md +1010 -0
- package/.claude/skills/list-workflows-minimal-skill/SKILL.md +992 -0
- package/.claude/skills/local-first-skill/SKILL.md +570 -0
- package/.claude/skills/mcp-tools/SKILL.md +419 -0
- package/.claude/skills/mcp-tools/references/api-endpoints.md +499 -0
- package/.claude/skills/mcp-tools/references/data-structures.md +554 -0
- package/.claude/skills/mcp-tools/references/implementation-patterns.md +717 -0
- package/.claude/skills/preview-insight-skill/SKILL.md +1290 -0
- package/.claude/skills/publish-hailer-app-skill/SKILL.md +453 -0
- package/.claude/skills/remove-app-member-skill/SKILL.md +671 -0
- package/.claude/skills/remove-app-skill/SKILL.md +985 -0
- package/.claude/skills/remove-insight-skill/SKILL.md +1011 -0
- package/.claude/skills/remove-workflow-skill/SKILL.md +920 -0
- package/.claude/skills/scaffold-hailer-app-skill/SKILL.md +1034 -0
- package/.claude/skills/skill-testing/README.md +137 -0
- package/.claude/skills/skill-testing/SKILL.md +348 -0
- package/.claude/skills/skill-testing/references/test-patterns.md +705 -0
- package/.claude/skills/skill-testing/references/testing-guide.md +603 -0
- package/.claude/skills/skill-testing/references/validation-checklist.md +537 -0
- package/.claude/skills/tool-builder/SKILL.md +328 -0
- package/.claude/skills/update-app-skill/SKILL.md +970 -0
- package/.claude/skills/update-workflow-field-skill/SKILL.md +1098 -0
- package/.env.example +81 -0
- package/.mcp.json +13 -0
- package/README.md +297 -0
- package/dist/app.d.ts +4 -0
- package/dist/app.js +74 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.js +5 -0
- package/dist/client/adaptive-documentation-bot.d.ts +108 -0
- package/dist/client/adaptive-documentation-bot.js +475 -0
- package/dist/client/adaptive-documentation-types.d.ts +66 -0
- package/dist/client/adaptive-documentation-types.js +9 -0
- package/dist/client/agent-activity-bot.d.ts +51 -0
- package/dist/client/agent-activity-bot.js +166 -0
- package/dist/client/agent-tracker.d.ts +499 -0
- package/dist/client/agent-tracker.js +659 -0
- package/dist/client/description-updater.d.ts +56 -0
- package/dist/client/description-updater.js +259 -0
- package/dist/client/log-parser.d.ts +72 -0
- package/dist/client/log-parser.js +387 -0
- package/dist/client/mcp-client.d.ts +50 -0
- package/dist/client/mcp-client.js +532 -0
- package/dist/client/message-processor.d.ts +35 -0
- package/dist/client/message-processor.js +352 -0
- package/dist/client/multi-bot-manager.d.ts +24 -0
- package/dist/client/multi-bot-manager.js +74 -0
- package/dist/client/providers/anthropic-provider.d.ts +19 -0
- package/dist/client/providers/anthropic-provider.js +631 -0
- package/dist/client/providers/llm-provider.d.ts +47 -0
- package/dist/client/providers/llm-provider.js +367 -0
- package/dist/client/providers/openai-provider.d.ts +23 -0
- package/dist/client/providers/openai-provider.js +621 -0
- package/dist/client/simple-llm-caller.d.ts +19 -0
- package/dist/client/simple-llm-caller.js +100 -0
- package/dist/client/skill-generator.d.ts +81 -0
- package/dist/client/skill-generator.js +386 -0
- package/dist/client/test-adaptive-bot.d.ts +9 -0
- package/dist/client/test-adaptive-bot.js +82 -0
- package/dist/client/token-pricing.d.ts +38 -0
- package/dist/client/token-pricing.js +127 -0
- package/dist/client/token-tracker.d.ts +232 -0
- package/dist/client/token-tracker.js +457 -0
- package/dist/client/token-usage-bot.d.ts +53 -0
- package/dist/client/token-usage-bot.js +153 -0
- package/dist/client/tool-executor.d.ts +69 -0
- package/dist/client/tool-executor.js +159 -0
- package/dist/client/tool-schema-loader.d.ts +60 -0
- package/dist/client/tool-schema-loader.js +178 -0
- package/dist/client/types.d.ts +69 -0
- package/dist/client/types.js +7 -0
- package/dist/config.d.ts +162 -0
- package/dist/config.js +296 -0
- package/dist/core.d.ts +26 -0
- package/dist/core.js +147 -0
- package/dist/lib/context-manager.d.ts +111 -0
- package/dist/lib/context-manager.js +431 -0
- package/dist/lib/logger.d.ts +74 -0
- package/dist/lib/logger.js +277 -0
- package/dist/lib/materialize.d.ts +3 -0
- package/dist/lib/materialize.js +101 -0
- package/dist/lib/normalizedName.d.ts +7 -0
- package/dist/lib/normalizedName.js +48 -0
- package/dist/lib/prompt-length-manager.d.ts +81 -0
- package/dist/lib/prompt-length-manager.js +457 -0
- package/dist/lib/terminal-prompt.d.ts +9 -0
- package/dist/lib/terminal-prompt.js +108 -0
- package/dist/mcp/UserContextCache.d.ts +56 -0
- package/dist/mcp/UserContextCache.js +163 -0
- package/dist/mcp/auth.d.ts +2 -0
- package/dist/mcp/auth.js +29 -0
- package/dist/mcp/hailer-clients.d.ts +42 -0
- package/dist/mcp/hailer-clients.js +246 -0
- package/dist/mcp/signal-handler.d.ts +45 -0
- package/dist/mcp/signal-handler.js +317 -0
- package/dist/mcp/tool-registry.d.ts +100 -0
- package/dist/mcp/tool-registry.js +306 -0
- package/dist/mcp/tools/activity.d.ts +15 -0
- package/dist/mcp/tools/activity.js +955 -0
- package/dist/mcp/tools/app.d.ts +20 -0
- package/dist/mcp/tools/app.js +1488 -0
- package/dist/mcp/tools/discussion.d.ts +19 -0
- package/dist/mcp/tools/discussion.js +950 -0
- package/dist/mcp/tools/file.d.ts +15 -0
- package/dist/mcp/tools/file.js +119 -0
- package/dist/mcp/tools/insight.d.ts +17 -0
- package/dist/mcp/tools/insight.js +806 -0
- package/dist/mcp/tools/skill.d.ts +10 -0
- package/dist/mcp/tools/skill.js +279 -0
- package/dist/mcp/tools/user.d.ts +10 -0
- package/dist/mcp/tools/user.js +108 -0
- package/dist/mcp/tools/workflow-template.d.ts +19 -0
- package/dist/mcp/tools/workflow-template.js +822 -0
- package/dist/mcp/tools/workflow.d.ts +18 -0
- package/dist/mcp/tools/workflow.js +1362 -0
- package/dist/mcp/utils/api-errors.d.ts +45 -0
- package/dist/mcp/utils/api-errors.js +160 -0
- package/dist/mcp/utils/data-transformers.d.ts +102 -0
- package/dist/mcp/utils/data-transformers.js +194 -0
- package/dist/mcp/utils/file-upload.d.ts +33 -0
- package/dist/mcp/utils/file-upload.js +148 -0
- package/dist/mcp/utils/hailer-api-client.d.ts +120 -0
- package/dist/mcp/utils/hailer-api-client.js +323 -0
- package/dist/mcp/utils/index.d.ts +13 -0
- package/dist/mcp/utils/index.js +39 -0
- package/dist/mcp/utils/logger.d.ts +42 -0
- package/dist/mcp/utils/logger.js +103 -0
- package/dist/mcp/utils/types.d.ts +286 -0
- package/dist/mcp/utils/types.js +7 -0
- package/dist/mcp/workspace-cache.d.ts +42 -0
- package/dist/mcp/workspace-cache.js +97 -0
- package/dist/mcp-server.d.ts +42 -0
- package/dist/mcp-server.js +280 -0
- package/package.json +56 -0
- package/tsconfig.json +23 -0
|
@@ -0,0 +1,620 @@
|
|
|
1
|
+
# Hailer Activities API
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
Activities are the core unit of work in Hailer - tasks, projects, issues, requests, or any trackable work item. Activities support rich metadata, hierarchical relationships, workflows, files, comments, and custom fields.
|
|
6
|
+
|
|
7
|
+
## Activity Object Structure
|
|
8
|
+
|
|
9
|
+
```json
|
|
10
|
+
{
|
|
11
|
+
"id": "act_123",
|
|
12
|
+
"title": "Implement new feature",
|
|
13
|
+
"description": "Detailed description of the task",
|
|
14
|
+
"status": "in_progress",
|
|
15
|
+
"priority": "high",
|
|
16
|
+
"workspace_id": "ws_456",
|
|
17
|
+
"created_at": "2025-01-15T10:30:00Z",
|
|
18
|
+
"updated_at": "2025-01-16T14:20:00Z",
|
|
19
|
+
"created_by": {
|
|
20
|
+
"id": "user_123",
|
|
21
|
+
"name": "Johan Rekna",
|
|
22
|
+
"email": "johan@rekna.fi"
|
|
23
|
+
},
|
|
24
|
+
"assigned_to": [
|
|
25
|
+
{
|
|
26
|
+
"id": "user_456",
|
|
27
|
+
"name": "Team Member"
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"due_date": "2025-01-30T23:59:59Z",
|
|
31
|
+
"completed_at": null,
|
|
32
|
+
"parent_id": "act_100",
|
|
33
|
+
"tags": ["feature", "sprint-5"],
|
|
34
|
+
"custom_fields": {
|
|
35
|
+
"story_points": 8,
|
|
36
|
+
"customer": "Acme Corp"
|
|
37
|
+
},
|
|
38
|
+
"file_count": 3,
|
|
39
|
+
"comment_count": 12
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Endpoints
|
|
44
|
+
|
|
45
|
+
### List Activities
|
|
46
|
+
|
|
47
|
+
```http
|
|
48
|
+
GET /v3/activities
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**Query Parameters:**
|
|
52
|
+
- `workspace_id` - Filter by workspace
|
|
53
|
+
- `status` - Filter by status
|
|
54
|
+
- `priority` - Filter by priority
|
|
55
|
+
- `assigned_to` - Filter by assigned user ID
|
|
56
|
+
- `created_after` - ISO 8601 timestamp
|
|
57
|
+
- `created_before` - ISO 8601 timestamp
|
|
58
|
+
- `due_after` - ISO 8601 timestamp
|
|
59
|
+
- `due_before` - ISO 8601 timestamp
|
|
60
|
+
- `tags` - Comma-separated tags
|
|
61
|
+
- `parent_id` - Filter by parent activity
|
|
62
|
+
- `search` - Text search in title/description
|
|
63
|
+
- `page` - Page number (default: 1)
|
|
64
|
+
- `per_page` - Items per page (default: 50, max: 100)
|
|
65
|
+
- `sort` - Sort field (e.g., `-created_at`, `due_date`, `priority`)
|
|
66
|
+
|
|
67
|
+
**Example:**
|
|
68
|
+
```http
|
|
69
|
+
GET /v3/activities?workspace_id=ws_123&status=open&priority=high&sort=-created_at
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
**Response:**
|
|
73
|
+
```json
|
|
74
|
+
{
|
|
75
|
+
"data": [...],
|
|
76
|
+
"meta": {
|
|
77
|
+
"page": 1,
|
|
78
|
+
"per_page": 50,
|
|
79
|
+
"total": 150,
|
|
80
|
+
"total_pages": 3
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Get Activity
|
|
86
|
+
|
|
87
|
+
```http
|
|
88
|
+
GET /v3/activities/{activity_id}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Returns full activity details including all custom fields, relationships, and metadata.
|
|
92
|
+
|
|
93
|
+
### Create Activity
|
|
94
|
+
|
|
95
|
+
```http
|
|
96
|
+
POST /v3/activities
|
|
97
|
+
Content-Type: application/json
|
|
98
|
+
|
|
99
|
+
{
|
|
100
|
+
"title": "New feature request",
|
|
101
|
+
"workspace_id": "ws_123",
|
|
102
|
+
"description": "Detailed description",
|
|
103
|
+
"status": "open",
|
|
104
|
+
"priority": "medium",
|
|
105
|
+
"assigned_to": ["user_456", "user_789"],
|
|
106
|
+
"due_date": "2025-02-01T23:59:59Z",
|
|
107
|
+
"parent_id": "act_100",
|
|
108
|
+
"tags": ["feature", "customer-request"],
|
|
109
|
+
"custom_fields": {
|
|
110
|
+
"customer_name": "Acme Corp",
|
|
111
|
+
"estimated_hours": 40
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
**Required Fields:**
|
|
117
|
+
- `title` - Activity title (1-500 chars)
|
|
118
|
+
- `workspace_id` - Target workspace
|
|
119
|
+
|
|
120
|
+
**Response:** Full activity object with generated ID
|
|
121
|
+
|
|
122
|
+
### Update Activity
|
|
123
|
+
|
|
124
|
+
```http
|
|
125
|
+
PATCH /v3/activities/{activity_id}
|
|
126
|
+
Content-Type: application/json
|
|
127
|
+
|
|
128
|
+
{
|
|
129
|
+
"status": "in_progress",
|
|
130
|
+
"assigned_to": ["user_123"],
|
|
131
|
+
"priority": "high"
|
|
132
|
+
}
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Only include fields you want to update. Omitted fields remain unchanged.
|
|
136
|
+
|
|
137
|
+
### Delete Activity
|
|
138
|
+
|
|
139
|
+
```http
|
|
140
|
+
DELETE /v3/activities/{activity_id}
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
⚠️ **Warning:** This also deletes all comments, file associations, and child activities.
|
|
144
|
+
|
|
145
|
+
**Response:** `204 No Content`
|
|
146
|
+
|
|
147
|
+
## Batch Operations
|
|
148
|
+
|
|
149
|
+
### Batch Create
|
|
150
|
+
|
|
151
|
+
```http
|
|
152
|
+
POST /v3/activities/batch
|
|
153
|
+
Content-Type: application/json
|
|
154
|
+
|
|
155
|
+
{
|
|
156
|
+
"activities": [
|
|
157
|
+
{
|
|
158
|
+
"title": "Task 1",
|
|
159
|
+
"workspace_id": "ws_123",
|
|
160
|
+
"status": "open"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"title": "Task 2",
|
|
164
|
+
"workspace_id": "ws_123",
|
|
165
|
+
"status": "open"
|
|
166
|
+
}
|
|
167
|
+
]
|
|
168
|
+
}
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
**Limits:** Up to 100 activities per batch
|
|
172
|
+
|
|
173
|
+
**Response:**
|
|
174
|
+
```json
|
|
175
|
+
{
|
|
176
|
+
"created": 2,
|
|
177
|
+
"failed": 0,
|
|
178
|
+
"activities": [
|
|
179
|
+
{
|
|
180
|
+
"id": "act_124",
|
|
181
|
+
"title": "Task 1",
|
|
182
|
+
"success": true
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"id": "act_125",
|
|
186
|
+
"title": "Task 2",
|
|
187
|
+
"success": true
|
|
188
|
+
}
|
|
189
|
+
]
|
|
190
|
+
}
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### Batch Update
|
|
194
|
+
|
|
195
|
+
```http
|
|
196
|
+
PATCH /v3/activities/batch
|
|
197
|
+
Content-Type: application/json
|
|
198
|
+
|
|
199
|
+
{
|
|
200
|
+
"activities": [
|
|
201
|
+
{
|
|
202
|
+
"id": "act_123",
|
|
203
|
+
"status": "completed"
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
"id": "act_124",
|
|
207
|
+
"status": "in_progress",
|
|
208
|
+
"priority": "high"
|
|
209
|
+
}
|
|
210
|
+
]
|
|
211
|
+
}
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
### Batch Delete
|
|
215
|
+
|
|
216
|
+
```http
|
|
217
|
+
DELETE /v3/activities/batch
|
|
218
|
+
Content-Type: application/json
|
|
219
|
+
|
|
220
|
+
{
|
|
221
|
+
"activity_ids": ["act_123", "act_124", "act_125"]
|
|
222
|
+
}
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
## Activity Status
|
|
226
|
+
|
|
227
|
+
### Standard Statuses
|
|
228
|
+
|
|
229
|
+
- `open` - New or unstarted
|
|
230
|
+
- `in_progress` - Currently being worked on
|
|
231
|
+
- `blocked` - Cannot proceed due to dependency
|
|
232
|
+
- `review` - Awaiting review/approval
|
|
233
|
+
- `completed` - Successfully finished
|
|
234
|
+
- `cancelled` - Abandoned or no longer needed
|
|
235
|
+
|
|
236
|
+
### Custom Statuses
|
|
237
|
+
|
|
238
|
+
Workspaces can define custom statuses:
|
|
239
|
+
|
|
240
|
+
```http
|
|
241
|
+
POST /v3/workspaces/{workspace_id}/statuses
|
|
242
|
+
{
|
|
243
|
+
"name": "Testing",
|
|
244
|
+
"color": "#FF9800",
|
|
245
|
+
"order": 3
|
|
246
|
+
}
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
## Activity Priority
|
|
250
|
+
|
|
251
|
+
Standard priorities:
|
|
252
|
+
- `critical` - Highest priority
|
|
253
|
+
- `high` - Important
|
|
254
|
+
- `medium` - Normal priority (default)
|
|
255
|
+
- `low` - Can wait
|
|
256
|
+
- `none` - No priority set
|
|
257
|
+
|
|
258
|
+
## Comments
|
|
259
|
+
|
|
260
|
+
### Add Comment
|
|
261
|
+
|
|
262
|
+
```http
|
|
263
|
+
POST /v3/activities/{activity_id}/comments
|
|
264
|
+
Content-Type: application/json
|
|
265
|
+
|
|
266
|
+
{
|
|
267
|
+
"text": "This is a comment",
|
|
268
|
+
"mentions": ["user_456"]
|
|
269
|
+
}
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
Supports Markdown formatting.
|
|
273
|
+
|
|
274
|
+
### List Comments
|
|
275
|
+
|
|
276
|
+
```http
|
|
277
|
+
GET /v3/activities/{activity_id}/comments?page=1&per_page=50
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
**Response:**
|
|
281
|
+
```json
|
|
282
|
+
{
|
|
283
|
+
"data": [
|
|
284
|
+
{
|
|
285
|
+
"id": "comment_789",
|
|
286
|
+
"text": "This is a comment",
|
|
287
|
+
"created_at": "2025-01-15T10:30:00Z",
|
|
288
|
+
"created_by": {
|
|
289
|
+
"id": "user_123",
|
|
290
|
+
"name": "Johan Rekna"
|
|
291
|
+
},
|
|
292
|
+
"mentions": [
|
|
293
|
+
{
|
|
294
|
+
"id": "user_456",
|
|
295
|
+
"name": "Team Member"
|
|
296
|
+
}
|
|
297
|
+
]
|
|
298
|
+
}
|
|
299
|
+
]
|
|
300
|
+
}
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
### Update Comment
|
|
304
|
+
|
|
305
|
+
```http
|
|
306
|
+
PATCH /v3/activities/{activity_id}/comments/{comment_id}
|
|
307
|
+
{
|
|
308
|
+
"text": "Updated comment text"
|
|
309
|
+
}
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
### Delete Comment
|
|
313
|
+
|
|
314
|
+
```http
|
|
315
|
+
DELETE /v3/activities/{activity_id}/comments/{comment_id}
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
## Activity Relationships
|
|
319
|
+
|
|
320
|
+
### Parent-Child Hierarchy
|
|
321
|
+
|
|
322
|
+
Activities can be organized hierarchically:
|
|
323
|
+
|
|
324
|
+
```python
|
|
325
|
+
# Create parent project
|
|
326
|
+
project = client.create_activity(
|
|
327
|
+
title="Website Redesign",
|
|
328
|
+
workspace_id="ws_123"
|
|
329
|
+
)
|
|
330
|
+
|
|
331
|
+
# Create child tasks
|
|
332
|
+
task1 = client.create_activity(
|
|
333
|
+
title="Design mockups",
|
|
334
|
+
workspace_id="ws_123",
|
|
335
|
+
parent_id=project["id"]
|
|
336
|
+
)
|
|
337
|
+
|
|
338
|
+
task2 = client.create_activity(
|
|
339
|
+
title="Implement frontend",
|
|
340
|
+
workspace_id="ws_123",
|
|
341
|
+
parent_id=project["id"]
|
|
342
|
+
)
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
### Get Child Activities
|
|
346
|
+
|
|
347
|
+
```http
|
|
348
|
+
GET /v3/activities?parent_id=act_123
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
### Activity Links
|
|
352
|
+
|
|
353
|
+
Link related activities:
|
|
354
|
+
|
|
355
|
+
```http
|
|
356
|
+
POST /v3/activities/{activity_id}/links
|
|
357
|
+
{
|
|
358
|
+
"linked_activity_id": "act_456",
|
|
359
|
+
"link_type": "blocks"
|
|
360
|
+
}
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
**Link Types:**
|
|
364
|
+
- `blocks` - This activity blocks another
|
|
365
|
+
- `blocked_by` - This activity is blocked by another
|
|
366
|
+
- `relates_to` - General relationship
|
|
367
|
+
- `duplicates` - Duplicate activity
|
|
368
|
+
- `parent_of` / `child_of` - Hierarchical
|
|
369
|
+
|
|
370
|
+
### List Links
|
|
371
|
+
|
|
372
|
+
```http
|
|
373
|
+
GET /v3/activities/{activity_id}/links
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
## Assignments
|
|
377
|
+
|
|
378
|
+
### Assign Users
|
|
379
|
+
|
|
380
|
+
```http
|
|
381
|
+
POST /v3/activities/{activity_id}/assignments
|
|
382
|
+
{
|
|
383
|
+
"user_ids": ["user_123", "user_456"]
|
|
384
|
+
}
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
This adds to existing assignments.
|
|
388
|
+
|
|
389
|
+
### Replace Assignments
|
|
390
|
+
|
|
391
|
+
```http
|
|
392
|
+
PUT /v3/activities/{activity_id}/assignments
|
|
393
|
+
{
|
|
394
|
+
"user_ids": ["user_789"]
|
|
395
|
+
}
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
This replaces all assignments.
|
|
399
|
+
|
|
400
|
+
### Assign Team
|
|
401
|
+
|
|
402
|
+
```http
|
|
403
|
+
POST /v3/activities/{activity_id}/assignments
|
|
404
|
+
{
|
|
405
|
+
"team_id": "team_123"
|
|
406
|
+
}
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
## Custom Fields
|
|
410
|
+
|
|
411
|
+
### Define Custom Fields
|
|
412
|
+
|
|
413
|
+
```http
|
|
414
|
+
POST /v3/workspaces/{workspace_id}/custom-fields
|
|
415
|
+
{
|
|
416
|
+
"name": "story_points",
|
|
417
|
+
"type": "number",
|
|
418
|
+
"label": "Story Points",
|
|
419
|
+
"required": false,
|
|
420
|
+
"options": null
|
|
421
|
+
}
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
**Field Types:**
|
|
425
|
+
- `text` - String values
|
|
426
|
+
- `number` - Numeric values
|
|
427
|
+
- `date` - Date only
|
|
428
|
+
- `datetime` - Date and time
|
|
429
|
+
- `boolean` - True/false
|
|
430
|
+
- `select` - Single choice from options
|
|
431
|
+
- `multiselect` - Multiple choices
|
|
432
|
+
- `user` - User reference
|
|
433
|
+
- `url` - URL field
|
|
434
|
+
|
|
435
|
+
### Set Custom Field Values
|
|
436
|
+
|
|
437
|
+
```http
|
|
438
|
+
PATCH /v3/activities/{activity_id}
|
|
439
|
+
{
|
|
440
|
+
"custom_fields": {
|
|
441
|
+
"story_points": 8,
|
|
442
|
+
"customer_name": "Acme Corp",
|
|
443
|
+
"delivery_date": "2025-02-15"
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
```
|
|
447
|
+
|
|
448
|
+
## Activity Templates
|
|
449
|
+
|
|
450
|
+
### Create from Template
|
|
451
|
+
|
|
452
|
+
```http
|
|
453
|
+
POST /v3/activities/from-template
|
|
454
|
+
{
|
|
455
|
+
"template_id": "tmpl_123",
|
|
456
|
+
"workspace_id": "ws_456",
|
|
457
|
+
"variables": {
|
|
458
|
+
"project_name": "New Project",
|
|
459
|
+
"start_date": "2025-02-01"
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
```
|
|
463
|
+
|
|
464
|
+
Templates can include predefined:
|
|
465
|
+
- Title and description with variables
|
|
466
|
+
- Status and priority
|
|
467
|
+
- Custom fields
|
|
468
|
+
- Subtasks
|
|
469
|
+
- Checklists
|
|
470
|
+
|
|
471
|
+
## Time Tracking
|
|
472
|
+
|
|
473
|
+
### Log Time
|
|
474
|
+
|
|
475
|
+
```http
|
|
476
|
+
POST /v3/activities/{activity_id}/time-entries
|
|
477
|
+
{
|
|
478
|
+
"hours": 4.5,
|
|
479
|
+
"description": "Frontend implementation",
|
|
480
|
+
"date": "2025-01-15"
|
|
481
|
+
}
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
### Get Time Entries
|
|
485
|
+
|
|
486
|
+
```http
|
|
487
|
+
GET /v3/activities/{activity_id}/time-entries
|
|
488
|
+
```
|
|
489
|
+
|
|
490
|
+
### Time Statistics
|
|
491
|
+
|
|
492
|
+
```http
|
|
493
|
+
GET /v3/activities/{activity_id}/time-stats
|
|
494
|
+
```
|
|
495
|
+
|
|
496
|
+
**Response:**
|
|
497
|
+
```json
|
|
498
|
+
{
|
|
499
|
+
"total_hours": 42.5,
|
|
500
|
+
"estimated_hours": 40,
|
|
501
|
+
"remaining_hours": -2.5,
|
|
502
|
+
"entries_count": 12
|
|
503
|
+
}
|
|
504
|
+
```
|
|
505
|
+
|
|
506
|
+
## Watchers/Followers
|
|
507
|
+
|
|
508
|
+
### Add Watcher
|
|
509
|
+
|
|
510
|
+
```http
|
|
511
|
+
POST /v3/activities/{activity_id}/watchers
|
|
512
|
+
{
|
|
513
|
+
"user_id": "user_123"
|
|
514
|
+
}
|
|
515
|
+
```
|
|
516
|
+
|
|
517
|
+
### Remove Watcher
|
|
518
|
+
|
|
519
|
+
```http
|
|
520
|
+
DELETE /v3/activities/{activity_id}/watchers/{user_id}
|
|
521
|
+
```
|
|
522
|
+
|
|
523
|
+
### List Watchers
|
|
524
|
+
|
|
525
|
+
```http
|
|
526
|
+
GET /v3/activities/{activity_id}/watchers
|
|
527
|
+
```
|
|
528
|
+
|
|
529
|
+
## Activity History
|
|
530
|
+
|
|
531
|
+
### Get Activity History
|
|
532
|
+
|
|
533
|
+
```http
|
|
534
|
+
GET /v3/activities/{activity_id}/history
|
|
535
|
+
```
|
|
536
|
+
|
|
537
|
+
**Response:**
|
|
538
|
+
```json
|
|
539
|
+
{
|
|
540
|
+
"data": [
|
|
541
|
+
{
|
|
542
|
+
"id": "hist_123",
|
|
543
|
+
"action": "updated",
|
|
544
|
+
"changes": {
|
|
545
|
+
"status": {
|
|
546
|
+
"old": "open",
|
|
547
|
+
"new": "in_progress"
|
|
548
|
+
},
|
|
549
|
+
"assigned_to": {
|
|
550
|
+
"added": ["user_456"],
|
|
551
|
+
"removed": []
|
|
552
|
+
}
|
|
553
|
+
},
|
|
554
|
+
"user": {
|
|
555
|
+
"id": "user_123",
|
|
556
|
+
"name": "Johan Rekna"
|
|
557
|
+
},
|
|
558
|
+
"timestamp": "2025-01-15T10:30:00Z"
|
|
559
|
+
}
|
|
560
|
+
]
|
|
561
|
+
}
|
|
562
|
+
```
|
|
563
|
+
|
|
564
|
+
## Filters and Saved Views
|
|
565
|
+
|
|
566
|
+
### Save Filter
|
|
567
|
+
|
|
568
|
+
```http
|
|
569
|
+
POST /v3/activities/filters
|
|
570
|
+
{
|
|
571
|
+
"name": "My High Priority Tasks",
|
|
572
|
+
"workspace_id": "ws_123",
|
|
573
|
+
"filters": {
|
|
574
|
+
"status": ["open", "in_progress"],
|
|
575
|
+
"priority": ["high", "critical"],
|
|
576
|
+
"assigned_to": "user_123"
|
|
577
|
+
},
|
|
578
|
+
"sort": "-priority,due_date"
|
|
579
|
+
}
|
|
580
|
+
```
|
|
581
|
+
|
|
582
|
+
### List Saved Filters
|
|
583
|
+
|
|
584
|
+
```http
|
|
585
|
+
GET /v3/activities/filters?workspace_id=ws_123
|
|
586
|
+
```
|
|
587
|
+
|
|
588
|
+
### Apply Filter
|
|
589
|
+
|
|
590
|
+
```http
|
|
591
|
+
GET /v3/activities?filter_id=filter_123
|
|
592
|
+
```
|
|
593
|
+
|
|
594
|
+
## Bulk Export
|
|
595
|
+
|
|
596
|
+
### Export Activities
|
|
597
|
+
|
|
598
|
+
```http
|
|
599
|
+
GET /v3/activities/export?workspace_id=ws_123&format=csv
|
|
600
|
+
GET /v3/activities/export?workspace_id=ws_123&format=json
|
|
601
|
+
GET /v3/activities/export?workspace_id=ws_123&format=xlsx
|
|
602
|
+
```
|
|
603
|
+
|
|
604
|
+
Exports can include filters:
|
|
605
|
+
```http
|
|
606
|
+
GET /v3/activities/export?workspace_id=ws_123&status=completed&format=xlsx
|
|
607
|
+
```
|
|
608
|
+
|
|
609
|
+
## Best Practices
|
|
610
|
+
|
|
611
|
+
1. **Use batch operations** - More efficient for bulk updates
|
|
612
|
+
2. **Set appropriate due dates** - Helps with prioritization
|
|
613
|
+
3. **Use tags consistently** - Makes filtering and reporting easier
|
|
614
|
+
4. **Link related activities** - Provides context and dependencies
|
|
615
|
+
5. **Add detailed descriptions** - Use Markdown for formatting
|
|
616
|
+
6. **Track time accurately** - Essential for project estimation
|
|
617
|
+
7. **Clean up completed activities** - Archive or delete old items
|
|
618
|
+
8. **Use custom fields sparingly** - Too many can be overwhelming
|
|
619
|
+
9. **Leverage templates** - For recurring activity types
|
|
620
|
+
10. **Monitor activity history** - Track changes and accountability
|