@mind-your-now/myn 0.4.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/LICENSE +21 -0
- package/README.md +318 -0
- package/dist/index.d.ts +77 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +147 -0
- package/dist/index.js.map +1 -0
- package/dist/src/client.d.ts +40 -0
- package/dist/src/client.d.ts.map +1 -0
- package/dist/src/client.js +95 -0
- package/dist/src/client.js.map +1 -0
- package/dist/src/tools/briefing.d.ts +44 -0
- package/dist/src/tools/briefing.d.ts.map +1 -0
- package/dist/src/tools/briefing.js +116 -0
- package/dist/src/tools/briefing.js.map +1 -0
- package/dist/src/tools/calendar.d.ts +56 -0
- package/dist/src/tools/calendar.d.ts.map +1 -0
- package/dist/src/tools/calendar.js +206 -0
- package/dist/src/tools/calendar.js.map +1 -0
- package/dist/src/tools/capabilityHash.d.ts +26 -0
- package/dist/src/tools/capabilityHash.d.ts.map +1 -0
- package/dist/src/tools/capabilityHash.js +48 -0
- package/dist/src/tools/capabilityHash.js.map +1 -0
- package/dist/src/tools/habits.d.ts +43 -0
- package/dist/src/tools/habits.d.ts.map +1 -0
- package/dist/src/tools/habits.js +123 -0
- package/dist/src/tools/habits.js.map +1 -0
- package/dist/src/tools/household.d.ts +44 -0
- package/dist/src/tools/household.d.ts.map +1 -0
- package/dist/src/tools/household.js +146 -0
- package/dist/src/tools/household.js.map +1 -0
- package/dist/src/tools/lists.d.ts +45 -0
- package/dist/src/tools/lists.d.ts.map +1 -0
- package/dist/src/tools/lists.js +167 -0
- package/dist/src/tools/lists.js.map +1 -0
- package/dist/src/tools/memory.d.ts +45 -0
- package/dist/src/tools/memory.d.ts.map +1 -0
- package/dist/src/tools/memory.js +131 -0
- package/dist/src/tools/memory.js.map +1 -0
- package/dist/src/tools/myn_a2a_pairing.d.ts +42 -0
- package/dist/src/tools/myn_a2a_pairing.d.ts.map +1 -0
- package/dist/src/tools/myn_a2a_pairing.js +166 -0
- package/dist/src/tools/myn_a2a_pairing.js.map +1 -0
- package/dist/src/tools/planning.d.ts +56 -0
- package/dist/src/tools/planning.d.ts.map +1 -0
- package/dist/src/tools/planning.js +94 -0
- package/dist/src/tools/planning.js.map +1 -0
- package/dist/src/tools/profile.d.ts +47 -0
- package/dist/src/tools/profile.d.ts.map +1 -0
- package/dist/src/tools/profile.js +125 -0
- package/dist/src/tools/profile.js.map +1 -0
- package/dist/src/tools/projects.d.ts +45 -0
- package/dist/src/tools/projects.d.ts.map +1 -0
- package/dist/src/tools/projects.js +106 -0
- package/dist/src/tools/projects.js.map +1 -0
- package/dist/src/tools/search.d.ts +46 -0
- package/dist/src/tools/search.d.ts.map +1 -0
- package/dist/src/tools/search.js +93 -0
- package/dist/src/tools/search.js.map +1 -0
- package/dist/src/tools/syncOnMismatch.d.ts +48 -0
- package/dist/src/tools/syncOnMismatch.d.ts.map +1 -0
- package/dist/src/tools/syncOnMismatch.js +94 -0
- package/dist/src/tools/syncOnMismatch.js.map +1 -0
- package/dist/src/tools/tasks.d.ts +52 -0
- package/dist/src/tools/tasks.d.ts.map +1 -0
- package/dist/src/tools/tasks.js +200 -0
- package/dist/src/tools/tasks.js.map +1 -0
- package/dist/src/tools/timers.d.ts +48 -0
- package/dist/src/tools/timers.d.ts.map +1 -0
- package/dist/src/tools/timers.js +138 -0
- package/dist/src/tools/timers.js.map +1 -0
- package/openclaw.plugin.json +30 -0
- package/package.json +74 -0
- package/skills/myn/SKILL.md +54 -0
- package/skills/myn/references/authentication.md +83 -0
- package/skills/myn/references/briefing-api.md +187 -0
- package/skills/myn/references/calendar-api.md +139 -0
- package/skills/myn/references/habits-api.md +257 -0
- package/skills/myn/references/household-api.md +175 -0
- package/skills/myn/references/lists-api.md +180 -0
- package/skills/myn/references/memory-api.md +95 -0
- package/skills/myn/references/planning-api.md +191 -0
- package/skills/myn/references/profile-api.md +148 -0
- package/skills/myn/references/projects-api.md +127 -0
- package/skills/myn/references/search-api.md +97 -0
- package/skills/myn/references/tasks-api.md +187 -0
- package/skills/myn/references/timers-api.md +171 -0
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# Profile API
|
|
2
|
+
|
|
3
|
+
User information, goals, and preferences.
|
|
4
|
+
|
|
5
|
+
## Base Path
|
|
6
|
+
|
|
7
|
+
`/api/v1/customers`
|
|
8
|
+
|
|
9
|
+
## Endpoints
|
|
10
|
+
|
|
11
|
+
### Get User Info
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
GET /api/v1/customers/me
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
**Response:**
|
|
18
|
+
|
|
19
|
+
```json
|
|
20
|
+
{
|
|
21
|
+
"id": "uuid",
|
|
22
|
+
"email": "user@example.com",
|
|
23
|
+
"name": "John Doe",
|
|
24
|
+
"timezone": "America/New_York",
|
|
25
|
+
"language": "en",
|
|
26
|
+
"createdAt": "2026-01-15T00:00:00Z",
|
|
27
|
+
"households": [
|
|
28
|
+
{ "id": "uuid", "name": "Home", "role": "owner" }
|
|
29
|
+
],
|
|
30
|
+
"subscription": {
|
|
31
|
+
"tier": "pro",
|
|
32
|
+
"expiresAt": "2027-01-15T00:00:00Z"
|
|
33
|
+
},
|
|
34
|
+
"stats": {
|
|
35
|
+
"totalTasksCompleted": 1234,
|
|
36
|
+
"currentStreak": 45,
|
|
37
|
+
"longestStreak": 120
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
curl -H "X-API-KEY: $MYN_API_KEY" "$MYN_API_URL/api/v1/customers/me"
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Get Goals
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
GET /api/v1/customers/goals
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
**Response:** `{ goals[{ id, title, description?, targetDate?, priority, status, progress, createdAt, updatedAt, relatedTasks?[] }], activeCount, completedCount }`
|
|
53
|
+
|
|
54
|
+
- `priority`: `low`, `medium`, `high`
|
|
55
|
+
- `status`: `active`, `completed`, `paused`, `abandoned`
|
|
56
|
+
- `progress`: 0–100
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
curl -H "X-API-KEY: $MYN_API_KEY" "$MYN_API_URL/api/v1/customers/goals"
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Create Goals
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
POST /api/v1/customers/goals
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**Body:**
|
|
69
|
+
|
|
70
|
+
```json
|
|
71
|
+
{
|
|
72
|
+
"goals": [
|
|
73
|
+
{
|
|
74
|
+
"title": "Run a marathon",
|
|
75
|
+
"description": "Complete a full marathon by end of year",
|
|
76
|
+
"targetDate": "2026-12-31",
|
|
77
|
+
"priority": "high"
|
|
78
|
+
}
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
**Response:** `{ created[{ goalId, title }] }`
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
curl -X POST "$MYN_API_URL/api/v1/customers/goals" \
|
|
87
|
+
-H "X-API-KEY: $MYN_API_KEY" \
|
|
88
|
+
-H "Content-Type: application/json" \
|
|
89
|
+
-d '{"goals": [{"title": "Read 24 books this year", "priority": "medium"}]}'
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Update Goal
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
PUT /api/v1/customers/goals/{goalId}
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
**Body:** `{ title?, description?, targetDate?, priority?, status? }`
|
|
99
|
+
|
|
100
|
+
**Response:** `{ goalId, updated }`
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
curl -X PUT "$MYN_API_URL/api/v1/customers/goals/aabb0000-0000-0000-0000-000000000001" \
|
|
104
|
+
-H "X-API-KEY: $MYN_API_KEY" \
|
|
105
|
+
-H "Content-Type: application/json" \
|
|
106
|
+
-d '{"status": "completed"}'
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Get Preferences
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
GET /api/v1/customers/preferences
|
|
113
|
+
GET /api/v1/customers/preferences/{key}
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
**Query Parameters:**
|
|
117
|
+
|
|
118
|
+
| Parameter | Type | Description |
|
|
119
|
+
|-----------|------|-------------|
|
|
120
|
+
| `category` | string | Filter: `notifications`, `display`, `ai`, `privacy`, `integrations` |
|
|
121
|
+
|
|
122
|
+
**Response (all):** `{ preferences: { key: value, ... }, categories[] }`
|
|
123
|
+
**Response (specific):** `{ key, value, category, updatedAt }`
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
# Get all preferences
|
|
127
|
+
curl -H "X-API-KEY: $MYN_API_KEY" "$MYN_API_URL/api/v1/customers/preferences"
|
|
128
|
+
|
|
129
|
+
# Get AI preferences only
|
|
130
|
+
curl -H "X-API-KEY: $MYN_API_KEY" "$MYN_API_URL/api/v1/customers/preferences?category=ai"
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Set Preference
|
|
134
|
+
|
|
135
|
+
```
|
|
136
|
+
PUT /api/v1/customers/preferences
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
**Body:** `{ key, value, category? }`
|
|
140
|
+
|
|
141
|
+
**Response:** `{ key, updated }`
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
curl -X PUT "$MYN_API_URL/api/v1/customers/preferences" \
|
|
145
|
+
-H "X-API-KEY: $MYN_API_KEY" \
|
|
146
|
+
-H "Content-Type: application/json" \
|
|
147
|
+
-d '{"key": "ai.tone", "value": "friendly", "category": "ai"}'
|
|
148
|
+
```
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# Projects API
|
|
2
|
+
|
|
3
|
+
Project and category management for organizing tasks.
|
|
4
|
+
|
|
5
|
+
## Base Path
|
|
6
|
+
|
|
7
|
+
`/api/project`
|
|
8
|
+
|
|
9
|
+
## Endpoints
|
|
10
|
+
|
|
11
|
+
### List Projects
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
GET /api/project
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
**Query Parameters:**
|
|
18
|
+
|
|
19
|
+
| Parameter | Type | Description |
|
|
20
|
+
|-----------|------|-------------|
|
|
21
|
+
| `includeArchived` | boolean | Include archived projects (default: false) |
|
|
22
|
+
| `includeStats` | boolean | Include task statistics (default: true) |
|
|
23
|
+
|
|
24
|
+
**Response:**
|
|
25
|
+
|
|
26
|
+
```json
|
|
27
|
+
{
|
|
28
|
+
"projects": [
|
|
29
|
+
{
|
|
30
|
+
"id": "uuid",
|
|
31
|
+
"name": "Q1 Planning",
|
|
32
|
+
"description": "First quarter objectives",
|
|
33
|
+
"color": "#3B82F6",
|
|
34
|
+
"icon": "target",
|
|
35
|
+
"parentId": null,
|
|
36
|
+
"createdAt": "2026-01-01T00:00:00Z",
|
|
37
|
+
"stats": {
|
|
38
|
+
"totalTasks": 12,
|
|
39
|
+
"completedTasks": 8,
|
|
40
|
+
"criticalTasks": 2
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
curl -H "X-API-KEY: $MYN_API_KEY" "$MYN_API_URL/api/project?includeStats=true"
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Get Project
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
GET /api/project/{projectId}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
**Response:**
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"id": "uuid",
|
|
62
|
+
"name": "Q1 Planning",
|
|
63
|
+
"description": "First quarter objectives",
|
|
64
|
+
"color": "#3B82F6",
|
|
65
|
+
"icon": "target",
|
|
66
|
+
"parentId": null,
|
|
67
|
+
"createdAt": "2026-01-01T00:00:00Z",
|
|
68
|
+
"tasks": [
|
|
69
|
+
{
|
|
70
|
+
"id": "uuid",
|
|
71
|
+
"title": "Prepare budget",
|
|
72
|
+
"priority": "CRITICAL",
|
|
73
|
+
"status": "PENDING",
|
|
74
|
+
"startDate": "2026-03-01"
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
"subProjects": [
|
|
78
|
+
{ "id": "uuid", "name": "Budget", "taskCount": 3 }
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
curl -H "X-API-KEY: $MYN_API_KEY" "$MYN_API_URL/api/project/PROJECT_ID"
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Create Project
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
POST /api/project
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
**Body:**
|
|
94
|
+
|
|
95
|
+
| Field | Type | Required | Description |
|
|
96
|
+
|-------|------|----------|-------------|
|
|
97
|
+
| `name` | string | Yes | Project name (1–100 chars) |
|
|
98
|
+
| `description` | string | No | Description (max 500 chars) |
|
|
99
|
+
| `color` | string | No | Hex color (`#3B82F6`) |
|
|
100
|
+
| `icon` | string | No | Icon identifier |
|
|
101
|
+
| `parentId` | UUID | No | Parent project for nesting |
|
|
102
|
+
|
|
103
|
+
**Response:** `{ id, name, created }`
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
curl -X POST "$MYN_API_URL/api/project" \
|
|
107
|
+
-H "X-API-KEY: $MYN_API_KEY" \
|
|
108
|
+
-H "Content-Type: application/json" \
|
|
109
|
+
-d '{"name": "Home Renovation", "color": "#10B981", "icon": "home"}'
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Move Task to Project
|
|
113
|
+
|
|
114
|
+
```
|
|
115
|
+
PUT /api/v2/unified-tasks/{taskId}/project
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
**Body:** `{ projectId: "target-project-uuid" }`
|
|
119
|
+
|
|
120
|
+
**Response:** `{ taskId, previousProjectId?, newProjectId, moved }`
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
curl -X PUT "$MYN_API_URL/api/v2/unified-tasks/TASK_ID/project" \
|
|
124
|
+
-H "X-API-KEY: $MYN_API_KEY" \
|
|
125
|
+
-H "Content-Type: application/json" \
|
|
126
|
+
-d '{"projectId": "TARGET_PROJECT_ID"}'
|
|
127
|
+
```
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# Search API
|
|
2
|
+
|
|
3
|
+
Unified search across all MYN entity types with filtering, pagination, and relevance highlighting.
|
|
4
|
+
|
|
5
|
+
## Base Path
|
|
6
|
+
|
|
7
|
+
`/api/v2/search`
|
|
8
|
+
|
|
9
|
+
## Endpoints
|
|
10
|
+
|
|
11
|
+
### Search
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
POST /api/v2/search
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Performs a full-text search across tasks, habits, chores, events, projects, notes, and memories.
|
|
18
|
+
|
|
19
|
+
**Body Parameters:**
|
|
20
|
+
|
|
21
|
+
| Field | Type | Description |
|
|
22
|
+
|-------|------|-------------|
|
|
23
|
+
| `query` | string | **Required.** Search query text |
|
|
24
|
+
| `types` | string[] | Entity types to search. Options: `task`, `habit`, `chore`, `event`, `project`, `note`, `memory`. Omit to search all types. |
|
|
25
|
+
| `filters` | object | Optional filters to narrow results |
|
|
26
|
+
| `filters.status` | string | Filter by status (e.g., `PENDING`, `COMPLETED`) |
|
|
27
|
+
| `filters.priority` | string | Filter by priority (e.g., `CRITICAL`, `OPPORTUNITY_NOW`) |
|
|
28
|
+
| `filters.projectId` | UUID | Filter by project |
|
|
29
|
+
| `filters.dateFrom` | date | Results from this date onward (YYYY-MM-DD) |
|
|
30
|
+
| `filters.dateTo` | date | Results up to this date (YYYY-MM-DD) |
|
|
31
|
+
| `limit` | number | Max results (default: 20, max: 100) |
|
|
32
|
+
| `offset` | number | Pagination offset (default: 0) |
|
|
33
|
+
|
|
34
|
+
**Response Fields:**
|
|
35
|
+
|
|
36
|
+
| Field | Type | Description |
|
|
37
|
+
|-------|------|-------------|
|
|
38
|
+
| `results` | object[] | Array of search result objects |
|
|
39
|
+
| `results[].id` | UUID | Entity identifier |
|
|
40
|
+
| `results[].type` | string | Entity type (`task`, `habit`, `chore`, `event`, `project`, `note`, `memory`) |
|
|
41
|
+
| `results[].title` | string | Entity title |
|
|
42
|
+
| `results[].description` | string | Entity description (nullable) |
|
|
43
|
+
| `results[].relevance` | number | Relevance score (0.0 to 1.0) |
|
|
44
|
+
| `results[].highlights` | object[] | Matched text snippets |
|
|
45
|
+
| `results[].highlights[].field` | string | Field where the match occurred (e.g., `title`, `description`) |
|
|
46
|
+
| `results[].highlights[].snippet` | string | Text snippet with match context |
|
|
47
|
+
| `results[].metadata` | object | Type-specific metadata (e.g., `priority`, `status`, `dueDate`) |
|
|
48
|
+
| `total` | number | Total matching results |
|
|
49
|
+
| `limit` | number | Limit used in this request |
|
|
50
|
+
| `offset` | number | Offset used in this request |
|
|
51
|
+
| `query` | string | The query that was executed |
|
|
52
|
+
| `suggestions` | string[] | Alternative search suggestions (nullable) |
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
# Basic search
|
|
56
|
+
curl -X POST "$MYN_API_URL/api/v2/search" \
|
|
57
|
+
-H "X-API-KEY: $MYN_API_KEY" \
|
|
58
|
+
-H "Content-Type: application/json" \
|
|
59
|
+
-d '{"query": "quarterly report"}'
|
|
60
|
+
|
|
61
|
+
# Search only tasks and notes
|
|
62
|
+
curl -X POST "$MYN_API_URL/api/v2/search" \
|
|
63
|
+
-H "X-API-KEY: $MYN_API_KEY" \
|
|
64
|
+
-H "Content-Type: application/json" \
|
|
65
|
+
-d '{
|
|
66
|
+
"query": "quarterly report",
|
|
67
|
+
"types": ["task", "note"],
|
|
68
|
+
"limit": 10
|
|
69
|
+
}'
|
|
70
|
+
|
|
71
|
+
# Search with filters
|
|
72
|
+
curl -X POST "$MYN_API_URL/api/v2/search" \
|
|
73
|
+
-H "X-API-KEY: $MYN_API_KEY" \
|
|
74
|
+
-H "Content-Type: application/json" \
|
|
75
|
+
-d '{
|
|
76
|
+
"query": "budget",
|
|
77
|
+
"types": ["task", "project"],
|
|
78
|
+
"filters": {
|
|
79
|
+
"status": "PENDING",
|
|
80
|
+
"priority": "CRITICAL",
|
|
81
|
+
"dateFrom": "2026-01-01",
|
|
82
|
+
"dateTo": "2026-03-31"
|
|
83
|
+
},
|
|
84
|
+
"limit": 50,
|
|
85
|
+
"offset": 0
|
|
86
|
+
}'
|
|
87
|
+
|
|
88
|
+
# Paginated search
|
|
89
|
+
curl -X POST "$MYN_API_URL/api/v2/search" \
|
|
90
|
+
-H "X-API-KEY: $MYN_API_KEY" \
|
|
91
|
+
-H "Content-Type: application/json" \
|
|
92
|
+
-d '{
|
|
93
|
+
"query": "meeting notes",
|
|
94
|
+
"limit": 20,
|
|
95
|
+
"offset": 20
|
|
96
|
+
}'
|
|
97
|
+
```
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
# Tasks API
|
|
2
|
+
|
|
3
|
+
Unified task management covering Tasks, Habits, and Chores.
|
|
4
|
+
|
|
5
|
+
## Base Path
|
|
6
|
+
|
|
7
|
+
`/api/v2/unified-tasks`
|
|
8
|
+
|
|
9
|
+
## Endpoints
|
|
10
|
+
|
|
11
|
+
### List Tasks
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
GET /api/v2/unified-tasks
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
**Query Parameters:**
|
|
18
|
+
|
|
19
|
+
| Parameter | Type | Description |
|
|
20
|
+
|-----------|------|-------------|
|
|
21
|
+
| `status` | string | Filter: `PENDING`, `IN_PROGRESS`, `COMPLETED`, `ARCHIVED` |
|
|
22
|
+
| `priority` | string | Filter: `CRITICAL`, `OPPORTUNITY_NOW`, `OVER_THE_HORIZON`, `PARKING_LOT` |
|
|
23
|
+
| `projectId` | UUID | Filter by project |
|
|
24
|
+
| `startDate` | date | Filter by start date (YYYY-MM-DD) |
|
|
25
|
+
| `endDate` | date | Filter by end date (YYYY-MM-DD) |
|
|
26
|
+
| `limit` | number | Max results (default: 20) |
|
|
27
|
+
| `offset` | number | Pagination offset (default: 0) |
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
# List Critical Now tasks
|
|
31
|
+
curl -H "X-API-KEY: $MYN_API_KEY" \
|
|
32
|
+
"$MYN_API_URL/api/v2/unified-tasks?priority=CRITICAL&status=PENDING"
|
|
33
|
+
|
|
34
|
+
# List tasks for a date range
|
|
35
|
+
curl -H "X-API-KEY: $MYN_API_KEY" \
|
|
36
|
+
"$MYN_API_URL/api/v2/unified-tasks?startDate=2026-03-01&endDate=2026-03-07"
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Get Task
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
GET /api/v2/unified-tasks/{taskId}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
curl -H "X-API-KEY: $MYN_API_KEY" \
|
|
47
|
+
"$MYN_API_URL/api/v2/unified-tasks/550e8400-e29b-41d4-a716-446655440000"
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Create Task
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
POST /api/v2/unified-tasks
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
**Required Fields:**
|
|
57
|
+
|
|
58
|
+
| Field | Type | Description |
|
|
59
|
+
|-------|------|-------------|
|
|
60
|
+
| `id` | UUID | Client-generated UUID |
|
|
61
|
+
| `title` | string | Task title (1–200 chars) |
|
|
62
|
+
| `taskType` | string | `TASK`, `HABIT`, or `CHORE` |
|
|
63
|
+
| `priority` | string | `CRITICAL`, `OPPORTUNITY_NOW`, `OVER_THE_HORIZON`, `PARKING_LOT` |
|
|
64
|
+
| `startDate` | date | Start date (YYYY-MM-DD) |
|
|
65
|
+
|
|
66
|
+
**Optional Fields:**
|
|
67
|
+
|
|
68
|
+
| Field | Type | Description |
|
|
69
|
+
|-------|------|-------------|
|
|
70
|
+
| `description` | string | Description (max 2000 chars) |
|
|
71
|
+
| `duration` | string | Duration: `"30m"`, `"1h"`, `"1h30m"` (NOT ISO PT prefix) |
|
|
72
|
+
| `projectId` | UUID | Assign to project |
|
|
73
|
+
| `recurrenceRule` | string | RRULE for HABIT/CHORE types (**required** for HABIT and CHORE) |
|
|
74
|
+
|
|
75
|
+
**Type-Specific Rules:**
|
|
76
|
+
|
|
77
|
+
- `TASK`: Basic task, can be shared
|
|
78
|
+
- `HABIT`: MUST have `recurrenceRule`, CANNOT be shared
|
|
79
|
+
- `CHORE`: MUST have `recurrenceRule`, always household-scoped
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
# Create a regular task
|
|
83
|
+
curl -X POST "$MYN_API_URL/api/v2/unified-tasks" \
|
|
84
|
+
-H "X-API-KEY: $MYN_API_KEY" \
|
|
85
|
+
-H "Content-Type: application/json" \
|
|
86
|
+
-d '{
|
|
87
|
+
"id": "550e8400-e29b-41d4-a716-446655440000",
|
|
88
|
+
"title": "Prepare quarterly report",
|
|
89
|
+
"taskType": "TASK",
|
|
90
|
+
"priority": "CRITICAL",
|
|
91
|
+
"startDate": "2026-03-01",
|
|
92
|
+
"duration": "2h",
|
|
93
|
+
"description": "Q1 financials and projections"
|
|
94
|
+
}'
|
|
95
|
+
|
|
96
|
+
# Create a habit
|
|
97
|
+
curl -X POST "$MYN_API_URL/api/v2/unified-tasks" \
|
|
98
|
+
-H "X-API-KEY: $MYN_API_KEY" \
|
|
99
|
+
-H "Content-Type: application/json" \
|
|
100
|
+
-d '{
|
|
101
|
+
"id": "660e8400-e29b-41d4-a716-446655440001",
|
|
102
|
+
"title": "Morning meditation",
|
|
103
|
+
"taskType": "HABIT",
|
|
104
|
+
"priority": "OPPORTUNITY_NOW",
|
|
105
|
+
"startDate": "2026-03-01",
|
|
106
|
+
"duration": "15m",
|
|
107
|
+
"recurrenceRule": "FREQ=DAILY"
|
|
108
|
+
}'
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Update Task
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
PATCH /api/v2/unified-tasks/{taskId}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Send only the fields to update:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
curl -X PATCH "$MYN_API_URL/api/v2/unified-tasks/550e8400-e29b-41d4-a716-446655440000" \
|
|
121
|
+
-H "X-API-KEY: $MYN_API_KEY" \
|
|
122
|
+
-H "Content-Type: application/json" \
|
|
123
|
+
-d '{"priority": "OPPORTUNITY_NOW", "startDate": "2026-03-05"}'
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Complete Task
|
|
127
|
+
|
|
128
|
+
```
|
|
129
|
+
POST /api/v2/unified-tasks/{taskId}/complete
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
curl -X POST "$MYN_API_URL/api/v2/unified-tasks/550e8400-e29b-41d4-a716-446655440000/complete" \
|
|
134
|
+
-H "X-API-KEY: $MYN_API_KEY" \
|
|
135
|
+
-H "Content-Type: application/json" \
|
|
136
|
+
-d '{}'
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### Archive Task
|
|
140
|
+
|
|
141
|
+
```
|
|
142
|
+
POST /api/v2/unified-tasks/{taskId}/archive
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
curl -X POST "$MYN_API_URL/api/v2/unified-tasks/550e8400-e29b-41d4-a716-446655440000/archive" \
|
|
147
|
+
-H "X-API-KEY: $MYN_API_KEY" \
|
|
148
|
+
-H "Content-Type: application/json" \
|
|
149
|
+
-d '{}'
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### Search (via unified search)
|
|
153
|
+
|
|
154
|
+
```
|
|
155
|
+
GET /api/v2/search
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
See [search-api.md](search-api.md) for full search documentation.
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
curl -H "X-API-KEY: $MYN_API_KEY" \
|
|
162
|
+
"$MYN_API_URL/api/v2/search?q=quarterly+report&limit=10"
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### Get Habit Streak
|
|
166
|
+
|
|
167
|
+
```
|
|
168
|
+
GET /api/v2/unified-tasks/{taskId}/streak
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
curl -H "X-API-KEY: $MYN_API_KEY" \
|
|
173
|
+
"$MYN_API_URL/api/v2/unified-tasks/660e8400-e29b-41d4-a716-446655440001/streak"
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
### Move Task to Project
|
|
177
|
+
|
|
178
|
+
```
|
|
179
|
+
PUT /api/v2/unified-tasks/{taskId}/project
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
curl -X PUT "$MYN_API_URL/api/v2/unified-tasks/550e8400-e29b-41d4-a716-446655440000/project" \
|
|
184
|
+
-H "X-API-KEY: $MYN_API_KEY" \
|
|
185
|
+
-H "Content-Type: application/json" \
|
|
186
|
+
-d '{"projectId": "770e8400-e29b-41d4-a716-446655440002"}'
|
|
187
|
+
```
|