@workel/mcp 0.3.0 → 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/README.md +85 -16
- package/dist/api/client.d.ts +19 -0
- package/dist/api/client.d.ts.map +1 -1
- package/dist/api/client.js +41 -6
- package/dist/api/client.js.map +1 -1
- package/dist/api/mapping.d.ts +13 -1
- package/dist/api/mapping.d.ts.map +1 -1
- package/dist/api/mapping.js +72 -0
- package/dist/api/mapping.js.map +1 -1
- package/dist/api/types.d.ts +106 -0
- package/dist/api/types.d.ts.map +1 -1
- package/dist/server.d.ts +2 -2
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +14 -4
- package/dist/server.js.map +1 -1
- package/dist/tools/createComment.js +1 -1
- package/dist/tools/createComment.js.map +1 -1
- package/dist/tools/createEvent.js +1 -1
- package/dist/tools/createEvent.js.map +1 -1
- package/dist/tools/createTask.js +1 -1
- package/dist/tools/createTask.js.map +1 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +4 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/logTime.d.ts +28 -0
- package/dist/tools/logTime.d.ts.map +1 -0
- package/dist/tools/logTime.js +83 -0
- package/dist/tools/logTime.js.map +1 -0
- package/dist/tools/registration.d.ts +5 -2
- package/dist/tools/registration.d.ts.map +1 -1
- package/dist/tools/registration.js +9 -2
- package/dist/tools/registration.js.map +1 -1
- package/dist/tools/updateTask.d.ts +20 -6
- package/dist/tools/updateTask.d.ts.map +1 -1
- package/dist/tools/updateTask.js +37 -11
- package/dist/tools/updateTask.js.map +1 -1
- package/dist/tools/uploadAttachment.d.ts +49 -0
- package/dist/tools/uploadAttachment.d.ts.map +1 -0
- package/dist/tools/uploadAttachment.js +133 -0
- package/dist/tools/uploadAttachment.js.map +1 -0
- package/dist/tools/workel_projects.js +1 -1
- package/dist/tools/workel_projects.js.map +1 -1
- package/dist/tools/workel_task_activity.d.ts +27 -0
- package/dist/tools/workel_task_activity.d.ts.map +1 -0
- package/dist/tools/workel_task_activity.js +67 -0
- package/dist/tools/workel_task_activity.js.map +1 -0
- package/dist/tools/workel_tasks.d.ts.map +1 -1
- package/dist/tools/workel_tasks.js +10 -4
- package/dist/tools/workel_tasks.js.map +1 -1
- package/dist/tools/workel_time_entries.d.ts +25 -0
- package/dist/tools/workel_time_entries.d.ts.map +1 -0
- package/dist/tools/workel_time_entries.js +74 -0
- package/dist/tools/workel_time_entries.js.map +1 -0
- package/dist/version.d.ts +16 -0
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +17 -1
- package/dist/version.js.map +1 -1
- package/dist/worker.d.ts +41 -0
- package/dist/worker.d.ts.map +1 -0
- package/dist/worker.js +113 -0
- package/dist/worker.js.map +1 -0
- package/package.json +10 -4
package/README.md
CHANGED
|
@@ -12,7 +12,57 @@ exactly what this server can do, no more.
|
|
|
12
12
|
|
|
13
13
|
For full per-client setup (Claude Desktop, Claude Code, project-scoped
|
|
14
14
|
`.mcp.json`, and the OpenAI Agents SDK), see
|
|
15
|
-
[developer
|
|
15
|
+
[the Workel developer docs](https://developer.workel.com/#mcp).
|
|
16
|
+
|
|
17
|
+
## Using Claude? You probably don't need this package
|
|
18
|
+
|
|
19
|
+
Workel runs a **hosted** MCP server. Add it in Claude under
|
|
20
|
+
**Settings → Connectors → Add custom connector**:
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
https://mcp.workel.com/mcp
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
You sign in to Workel, pick one workspace, and you're connected. No install,
|
|
27
|
+
no config file, and no API key — you never see one and neither does Claude.
|
|
28
|
+
Authorizing requires owner or admin on the workspace you choose, and the
|
|
29
|
+
connection is re-checked on every request, so losing that role disconnects it
|
|
30
|
+
without anyone having to remember to revoke a key.
|
|
31
|
+
|
|
32
|
+
It can read your projects, tasks, comments, events and members — including a
|
|
33
|
+
task's cover image, attachments and full history — and it can create tasks,
|
|
34
|
+
comments and events, and update existing tasks: renaming them, changing dates
|
|
35
|
+
and priority, moving them between columns and projects, and changing who they
|
|
36
|
+
are assigned to. It cannot delete anything, and it cannot upload files. Read
|
|
37
|
+
and write permissions are listed separately on the consent screen, so you
|
|
38
|
+
approve them knowingly rather than discovering them later.
|
|
39
|
+
|
|
40
|
+
### Connecting more than one workspace
|
|
41
|
+
|
|
42
|
+
One connection covers one workspace, because the credential behind it is bound
|
|
43
|
+
to that workspace. To reach a second, **add the connector again** and pick the
|
|
44
|
+
other workspace — each connection registers separately, so they coexist, and
|
|
45
|
+
each appears under the name of its workspace (`workel — Acme`) rather than as
|
|
46
|
+
identical entries you can't tell apart.
|
|
47
|
+
|
|
48
|
+
One thing to watch: **re-authorizing an existing connection moves it, it does
|
|
49
|
+
not add.** Going through consent again on a connector you already added
|
|
50
|
+
replaces its credential and disables the old one, so that connection switches
|
|
51
|
+
to whichever workspace you pick. If you want both, add a new connector instead
|
|
52
|
+
of re-authorizing the one you have.
|
|
53
|
+
|
|
54
|
+
## Running it yourself
|
|
55
|
+
|
|
56
|
+
This package is for the cases the hosted server doesn't cover: **Claude Code,
|
|
57
|
+
CI agents, the OpenAI Agents SDK** — anywhere you want to run the process
|
|
58
|
+
yourself and hold the credential. Everything below is about that.
|
|
59
|
+
|
|
60
|
+
It handles multiple workspaces differently, and better for this use case: set
|
|
61
|
+
[`WORKEL_API_KEYS`](#environment-variables) to a comma-separated list, one key per
|
|
62
|
+
workspace, and every tool gains a `workspace` argument naming which one to act
|
|
63
|
+
in. The tool count stays the same however many workspaces you configure, rather
|
|
64
|
+
than multiplying per workspace — which matters because every tool definition is
|
|
65
|
+
context the model pays for on each turn.
|
|
16
66
|
|
|
17
67
|
## Mint a dedicated read-only key before you start
|
|
18
68
|
|
|
@@ -20,7 +70,8 @@ Before pointing any AI client at this server, go to **Workel → Settings →
|
|
|
20
70
|
Developers** and mint a **new** API key just for this purpose — don't reuse
|
|
21
71
|
a key another integration already holds. Minting a key requires an owner or
|
|
22
72
|
admin role. Grant it only the `read:*` scopes the tools in this release
|
|
23
|
-
actually use (`read:projects`, `read:tasks`, `read:members`, `read:events
|
|
73
|
+
actually use (`read:projects`, `read:tasks`, `read:members`, `read:events`,
|
|
74
|
+
`read:time` —
|
|
24
75
|
see [Tools](#tools) below); leave every `write:*` scope unchecked unless you
|
|
25
76
|
have deliberately decided to let an agent create and edit things in your
|
|
26
77
|
workspace on its own. Use one key per machine or agent, name it so you
|
|
@@ -53,10 +104,10 @@ Two things worth understanding before touching the flags described below:
|
|
|
53
104
|
## Install
|
|
54
105
|
|
|
55
106
|
```
|
|
56
|
-
npx -y @workel/mcp@0.
|
|
107
|
+
npx -y @workel/mcp@0.4.0
|
|
57
108
|
```
|
|
58
109
|
|
|
59
|
-
Pin the version — `0.
|
|
110
|
+
Pin the version — `0.4.0` above is this package's current release; check
|
|
60
111
|
`npm view @workel/mcp version` for the latest one before you pin it. The
|
|
61
112
|
unpinned form below is **convenience only**, fine for a one-off manual try,
|
|
62
113
|
not for anything an agent's config runs unattended:
|
|
@@ -78,7 +129,7 @@ npx -y @workel/mcp
|
|
|
78
129
|
|
|
79
130
|
## `doctor`
|
|
80
131
|
|
|
81
|
-
Run `npx -y @workel/mcp@0.
|
|
132
|
+
Run `npx -y @workel/mcp@0.4.0 doctor` any time your MCP client reports only
|
|
82
133
|
"server failed to start" with no further detail. It runs the exact same
|
|
83
134
|
startup check the server itself runs — load config, then probe `GET /me` —
|
|
84
135
|
and prints a plain-text report to stdout instead of trying to speak the MCP
|
|
@@ -104,7 +155,7 @@ default — because a doctor run is exactly the moment a tampered
|
|
|
104
155
|
|
|
105
156
|
## Tools
|
|
106
157
|
|
|
107
|
-
This release registers the following read
|
|
158
|
+
This release registers the following read tools. `workel_whoami` needs
|
|
108
159
|
no scope at all and works with any valid key; every other tool is only
|
|
109
160
|
registered when the key's scopes (discovered via the `GET /me` probe above)
|
|
110
161
|
include the scope listed. List tools return 25 results per call by default
|
|
@@ -117,20 +168,38 @@ include the scope listed. List tools return 25 results per call by default
|
|
|
117
168
|
| `workel_get_project` | `read:projects` | Fetch one project by id, including its full (possibly truncated) description. |
|
|
118
169
|
| `workel_list_project_columns` | `read:projects` | List a project's board columns — its kanban lists such as "To Do" or "Done" — not the tasks inside them. |
|
|
119
170
|
| `workel_list_tasks` | `read:tasks` | List tasks, filterable by project, column, completion, and due-date/update-time. There is no text search on this endpoint. |
|
|
120
|
-
| `workel_get_task` | `read:tasks` | Fetch one task by id
|
|
171
|
+
| `workel_get_task` | `read:tasks` | Fetch one task by id — the full detail view: description, cover image, and attachments (each with a download url, size, and uploader). |
|
|
121
172
|
| `workel_list_task_comments` | `read:tasks` | List every comment on a task — top-level comments and replies together. Order is unspecified; sort by `created_at`. |
|
|
173
|
+
| `workel_list_task_activity` | `read:tasks` | List a task's history, newest first — who did what to it and when. `action` is human prose, not an enum. |
|
|
122
174
|
| `workel_list_members` | `read:members` | List the workspace's active members — the only tool that returns email addresses. |
|
|
123
175
|
| `workel_list_events` | `read:events` | List events on the workspace and any of its visible projects. |
|
|
176
|
+
| `workel_list_time_entries` | `read:time` | List time tracked on tasks — who tracked how long on what — filterable by task, project, person and a `from`/`to` window (`to` is exclusive). A running timer appears with `running: true`. |
|
|
177
|
+
|
|
178
|
+
### Write tools
|
|
179
|
+
|
|
180
|
+
Six, and they register only when **both** gates pass: the key carries the
|
|
181
|
+
matching `write:*` scope **and** `WORKEL_ENABLE_WRITES=true` is set. Either
|
|
182
|
+
one alone registers nothing, so a read-only install never sees them.
|
|
124
183
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
`
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
184
|
+
| Tool | Scope | What it does |
|
|
185
|
+
|---|---|---|
|
|
186
|
+
| `workel_create_task` | `write:tasks` | Create a task, placed by either `column_id` or `project_id` — exactly one, never both. |
|
|
187
|
+
| `workel_update_task` | `write:tasks` | Update fields on an existing task, including moving it to another column (`column_id`, which may belong to a different project) and reassigning it (`assignee_ids`, which **replaces** the set rather than adding to it). Cover image and attachments are not writable here — use `workel_upload_task_attachment` for files; there is no way to set a cover image over this API. |
|
|
188
|
+
| `workel_create_task_comment` | `write:comments` | Add a plain-text comment to a task. No @-mentions; the API rejects the request outright if a mention field is sent. |
|
|
189
|
+
| `workel_create_event` | `write:events` | Create a calendar event. `repeat_interval` is required whenever `repeat` is anything but `none`. |
|
|
190
|
+
| `workel_upload_task_attachment` | `write:attachments` | Attach a file to a task by passing its **content** (there is no path argument — an MCP server may not share a filesystem with the caller). Text by default; `encoding: "base64"` for small binaries. Uploads count against the workspace's storage plan, and script-bearing types (`.html`, `.svg`, `.js`, …) are refused. |
|
|
191
|
+
| `workel_log_time` | `write:time` | Log time already spent on a task, as the key's owner: `duration_minutes`, an optional `started_at` (defaults to ending now), `note` and `billable`. There is no live start/stop timer over the API. |
|
|
192
|
+
|
|
193
|
+
No tool deletes anything. `workel_update_task` is annotated
|
|
194
|
+
`destructiveHint: true`, so a client that honours annotations prompts before
|
|
195
|
+
each call; the read tools are annotated read-only and run without one.
|
|
196
|
+
|
|
197
|
+
The hosted server at `mcp.workel.com` runs with writes enabled, so all
|
|
198
|
+
seventeen tools are available there — subject to the scopes the connected key
|
|
199
|
+
actually holds. `write:attachments` is a distinct scope from `write:tasks`, so
|
|
200
|
+
a connection authorized before the upload tool existed does not carry it and
|
|
201
|
+
will not be offered that tool until it is re-authorized. The same holds for `read:time` and
|
|
202
|
+
`write:time`, the scopes of the two time tools.
|
|
134
203
|
|
|
135
204
|
## Limitations
|
|
136
205
|
|
package/dist/api/client.d.ts
CHANGED
|
@@ -98,9 +98,28 @@ export interface WorkelApiWriteOptions {
|
|
|
98
98
|
export interface WorkelApiClient {
|
|
99
99
|
get<T = unknown>(path: string, query?: QueryParams): Promise<WorkelApiResult<T>>;
|
|
100
100
|
post<T = unknown>(path: string, body?: unknown, options?: WorkelApiWriteOptions): Promise<WorkelApiResult<T>>;
|
|
101
|
+
/**
|
|
102
|
+
* `multipart/form-data` POST — the upload path. Shares every behaviour
|
|
103
|
+
* `post` has (write queue, 429 retry, error mapping, replay detection,
|
|
104
|
+
* body-parse guard) and differs only in how the body is framed.
|
|
105
|
+
*/
|
|
106
|
+
postFile<T = unknown>(path: string, file: UploadPart, options?: WorkelApiWriteOptions): Promise<WorkelApiResult<T>>;
|
|
101
107
|
/** Never carries `Idempotency-Key` — see the file-level docblock. */
|
|
102
108
|
patch<T = unknown>(path: string, body?: unknown): Promise<WorkelApiResult<T>>;
|
|
103
109
|
}
|
|
110
|
+
/**
|
|
111
|
+
* One file part of a multipart upload.
|
|
112
|
+
*
|
|
113
|
+
* `fieldName` defaults to `file`, which is what every current upload route
|
|
114
|
+
* expects; it is a parameter rather than a constant so a future endpoint
|
|
115
|
+
* naming its part differently does not need a second client method.
|
|
116
|
+
*/
|
|
117
|
+
export interface UploadPart {
|
|
118
|
+
fieldName?: string;
|
|
119
|
+
fileName: string;
|
|
120
|
+
bytes: Uint8Array;
|
|
121
|
+
contentType?: string;
|
|
122
|
+
}
|
|
104
123
|
/**
|
|
105
124
|
* Thrown for every non-2xx response. Wraps `errors.ts`'s pure, network-free
|
|
106
125
|
* mapping with the one thing that module deliberately has no knowledge of:
|
package/dist/api/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/api/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AAKH,OAAO,EAAe,KAAK,cAAc,EAAoB,MAAM,UAAU,CAAC;AAE9E,MAAM,MAAM,SAAS,GAAG,OAAO,KAAK,CAAC;AACrC,MAAM,MAAM,SAAS,GAAG,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AAEtD,sGAAsG;AACtG,eAAO,MAAM,0BAA0B,QAAS,CAAC;AAEjD,MAAM,WAAW,m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|
package/dist/api/client.js
CHANGED
|
@@ -305,18 +305,46 @@ function createWorkelApiClient(deps) {
|
|
|
305
305
|
return { data: body, requestId: extractRequestId(response) };
|
|
306
306
|
}
|
|
307
307
|
async function performWrite(method, path, body, idempotencyKey) {
|
|
308
|
-
const url = buildRequestUrl(baseUrl, path);
|
|
309
308
|
const hasBody = body !== undefined;
|
|
310
309
|
const headers = { ...requestHeaders };
|
|
311
310
|
if (hasBody)
|
|
312
311
|
headers['Content-Type'] = 'application/json';
|
|
313
312
|
if (idempotencyKey !== null)
|
|
314
313
|
headers['Idempotency-Key'] = idempotencyKey;
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
314
|
+
return sendWrite(method, path, headers, hasBody ? JSON.stringify(body) : undefined);
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* The multipart sibling of performWrite.
|
|
318
|
+
*
|
|
319
|
+
* Content-Type is deliberately NOT set: `fetch` derives it from the
|
|
320
|
+
* FormData body, and the value it derives carries the multipart BOUNDARY.
|
|
321
|
+
* Setting it by hand — the reflex, since every other write here sets it —
|
|
322
|
+
* produces a header with no boundary, which the server cannot parse; PHP
|
|
323
|
+
* then reports zero fields and zero files and the endpoint 422s on a
|
|
324
|
+
* "missing" file that was in fact sent. (The web app hit exactly this:
|
|
325
|
+
* CLAUDE.md §57.3.)
|
|
326
|
+
*/
|
|
327
|
+
async function performMultipartWrite(path, file, idempotencyKey) {
|
|
328
|
+
const headers = { ...requestHeaders };
|
|
329
|
+
if (idempotencyKey !== null)
|
|
330
|
+
headers['Idempotency-Key'] = idempotencyKey;
|
|
331
|
+
const form = new FormData();
|
|
332
|
+
// `bytes.slice()` hands Blob a plain ArrayBuffer of exactly this view's
|
|
333
|
+
// range — a Uint8Array over a larger/pooled buffer would otherwise
|
|
334
|
+
// contribute the WHOLE buffer to the part.
|
|
335
|
+
const blob = new Blob([file.bytes.slice()], {
|
|
336
|
+
type: file.contentType ?? 'application/octet-stream',
|
|
319
337
|
});
|
|
338
|
+
form.append(file.fieldName ?? 'file', blob, file.fileName);
|
|
339
|
+
return sendWrite('POST', path, headers, form);
|
|
340
|
+
}
|
|
341
|
+
async function sendWrite(method, path, headers,
|
|
342
|
+
// Not `BodyInit`: that type ships with the DOM lib, and this project
|
|
343
|
+
// compiles against lib ES2020 + @types/node. The union is exactly what
|
|
344
|
+
// the two callers pass.
|
|
345
|
+
body) {
|
|
346
|
+
const url = buildRequestUrl(baseUrl, path);
|
|
347
|
+
const response = await fetchWithRetry(url, { method, headers, body });
|
|
320
348
|
if (!response.ok) {
|
|
321
349
|
return throwMappedError(response);
|
|
322
350
|
}
|
|
@@ -339,12 +367,19 @@ function createWorkelApiClient(deps) {
|
|
|
339
367
|
const idempotencyKey = options?.idempotencyKey ?? (0, node_crypto_1.randomUUID)();
|
|
340
368
|
return enqueueWrite(() => performWrite('POST', path, body, idempotencyKey));
|
|
341
369
|
}
|
|
370
|
+
async function postFile(path, file, options) {
|
|
371
|
+
// Same one-key-per-logical-call rule as post(): generated above the
|
|
372
|
+
// retry loop so a retried attempt reuses it unchanged. It matters more
|
|
373
|
+
// here — a retried upload without a stable key stores the file twice.
|
|
374
|
+
const idempotencyKey = options?.idempotencyKey ?? (0, node_crypto_1.randomUUID)();
|
|
375
|
+
return enqueueWrite(() => performMultipartWrite(path, file, idempotencyKey));
|
|
376
|
+
}
|
|
342
377
|
async function patch(path, body) {
|
|
343
378
|
// Never carries Idempotency-Key: PublicApiIdempotency::handle() only
|
|
344
379
|
// inspects POST (PublicApiIdempotency.php:65-67).
|
|
345
380
|
return enqueueWrite(() => performWrite('PATCH', path, body, null));
|
|
346
381
|
}
|
|
347
|
-
return { get, post, patch };
|
|
382
|
+
return { get, post, postFile, patch };
|
|
348
383
|
}
|
|
349
384
|
function defaultSleep(ms) {
|
|
350
385
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
package/dist/api/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/api/client.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;;;
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/api/client.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;;;AAgQH,sDA0NC;AAaD,oEAQC;AA7eD,6CAAyC;AACzC,sCAAuC;AACvC,qCAAkC;AAClC,qCAA8E;AAK9E,sGAAsG;AACzF,QAAA,0BAA0B,GAAG,KAAM,CAAC;AA6EjD,gIAAgI;AAChI,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAEnC,MAAM,iBAAiB,GAAG,cAAc,CAAC;AACzC,MAAM,kBAAkB,GAAG,aAAa,CAAC;AACzC,MAAM,aAAa,GAAG,mBAAmB,CAAC;AAE1C;;;;;GAKG;AACH,MAAa,cAAe,SAAQ,KAAK;IAMvC,YAAY,MAAsB;QAChC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QACtB,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC;QAC7B,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QAC5B,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;QAChC,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;IACpC,CAAC;CACF;AAdD,wCAcC;AAED,SAAS,oBAAoB,CAAC,KAAa;IACzC,OAAO,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AACnC,CAAC;AAED,SAAS,kBAAkB,CAAC,KAAa;IACvC,OAAO,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC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B,KAAK;QACL,KAAK,EAAE,YAAY;KACpB,CAAC,CAAC;AACL,CAAC"}
|
package/dist/api/mapping.d.ts
CHANGED
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
* no such field to begin with, and `mapCreateCommentToWire` cannot forward
|
|
31
31
|
* one even if a caller forces it in via a type cast.
|
|
32
32
|
*/
|
|
33
|
-
import type { Column, Event, Member, Project, ProjectColumn, Task, TaskComment, TaskCommentAuthor, WireCard, WireEvent, WireMember, WireProject, WireProjectColumn, WireTask, WireTaskComment, WireTaskCommentAuthor } from './types';
|
|
33
|
+
import type { Column, TaskActivity, TaskAttachment, TaskCover, Event, Member, Project, ProjectColumn, Task, TaskComment, TaskCommentAuthor, TimeEntry, WireCard, WireTaskActivity, WireTaskAttachment, WireTaskCover, WireEvent, WireMember, WireProject, WireProjectColumn, WireTask, WireTaskComment, WireTaskCommentAuthor, WireTimeEntry } from './types';
|
|
34
34
|
export interface CreateTaskInput {
|
|
35
35
|
column_id?: string | null;
|
|
36
36
|
project_id?: string | null;
|
|
@@ -61,6 +61,8 @@ export interface UpdateTaskInput {
|
|
|
61
61
|
progress?: number | null;
|
|
62
62
|
due_date?: string | null;
|
|
63
63
|
due_time?: string | null;
|
|
64
|
+
column_id?: string;
|
|
65
|
+
assignee_ids?: string[];
|
|
64
66
|
}
|
|
65
67
|
export interface WireUpdateTaskRequest {
|
|
66
68
|
title_text?: string | null;
|
|
@@ -69,6 +71,8 @@ export interface WireUpdateTaskRequest {
|
|
|
69
71
|
progress?: number | null;
|
|
70
72
|
end_date?: string | null;
|
|
71
73
|
end_time?: string | null;
|
|
74
|
+
card_id?: string;
|
|
75
|
+
user_ids?: string[];
|
|
72
76
|
reminder_date?: string | null;
|
|
73
77
|
}
|
|
74
78
|
export declare function mapUpdateTaskToWire(input: UpdateTaskInput): WireUpdateTaskRequest;
|
|
@@ -132,6 +136,9 @@ export declare function mapColumnFromWire(card: WireCard): Column;
|
|
|
132
136
|
* key on the wire response is silently dropped rather than leaking through,
|
|
133
137
|
* and so the literal key `card` can never appear anywhere in the output.
|
|
134
138
|
*/
|
|
139
|
+
export declare function mapTaskCoverFromWire(cover: WireTaskCover): TaskCover;
|
|
140
|
+
export declare function mapTaskAttachmentFromWire(attachment: WireTaskAttachment): TaskAttachment;
|
|
141
|
+
export declare function mapTaskActivityFromWire(row: WireTaskActivity): TaskActivity;
|
|
135
142
|
export declare function mapTaskFromWire(task: WireTask): Task;
|
|
136
143
|
export declare function mapProjectFromWire(project: WireProject): Project;
|
|
137
144
|
export declare function mapMemberFromWire(member: WireMember): Member;
|
|
@@ -144,4 +151,9 @@ export declare function mapProjectColumnFromWire(card: WireProjectColumn): Proje
|
|
|
144
151
|
export declare function mapTaskCommentAuthorFromWire(author: WireTaskCommentAuthor): TaskCommentAuthor;
|
|
145
152
|
export declare function mapTaskCommentFromWire(comment: WireTaskComment): TaskComment;
|
|
146
153
|
export declare function mapEventFromWire(event: WireEvent): Event;
|
|
154
|
+
/**
|
|
155
|
+
* A time entry, field for field. `user` is `{id, name}` only, as everywhere on
|
|
156
|
+
* this surface; `note` is passed through and bounded by the tool that shows it.
|
|
157
|
+
*/
|
|
158
|
+
export declare function mapTimeEntryFromWire(entry: WireTimeEntry): TimeEntry;
|
|
147
159
|
//# sourceMappingURL=mapping.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mapping.d.ts","sourceRoot":"","sources":["../../src/api/mapping.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,KAAK,EACV,MAAM,EACN,KAAK,EACL,MAAM,EACN,OAAO,EACP,aAAa,EACb,IAAI,EACJ,WAAW,EACX,iBAAiB,EACjB,QAAQ,EACR,SAAS,EACT,UAAU,EACV,WAAW,EACX,iBAAiB,EACjB,QAAQ,EACR,eAAe,EACf,qBAAqB,
|
|
1
|
+
{"version":3,"file":"mapping.d.ts","sourceRoot":"","sources":["../../src/api/mapping.ts"],"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A4B,CAAC,MAAM,EAAE,qBAAqB,GAAG,iBAAiB,CAK7F;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,eAAe,GAAG,WAAW,CAO5E;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,SAAS,GAAG,KAAK,CAgBxD;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,aAAa,GAAG,SAAS,CAgBpE"}
|
package/dist/api/mapping.js
CHANGED
|
@@ -37,6 +37,9 @@ exports.mapUpdateTaskToWire = mapUpdateTaskToWire;
|
|
|
37
37
|
exports.mapCreateEventToWire = mapCreateEventToWire;
|
|
38
38
|
exports.mapCreateCommentToWire = mapCreateCommentToWire;
|
|
39
39
|
exports.mapColumnFromWire = mapColumnFromWire;
|
|
40
|
+
exports.mapTaskCoverFromWire = mapTaskCoverFromWire;
|
|
41
|
+
exports.mapTaskAttachmentFromWire = mapTaskAttachmentFromWire;
|
|
42
|
+
exports.mapTaskActivityFromWire = mapTaskActivityFromWire;
|
|
40
43
|
exports.mapTaskFromWire = mapTaskFromWire;
|
|
41
44
|
exports.mapProjectFromWire = mapProjectFromWire;
|
|
42
45
|
exports.mapMemberFromWire = mapMemberFromWire;
|
|
@@ -44,6 +47,7 @@ exports.mapProjectColumnFromWire = mapProjectColumnFromWire;
|
|
|
44
47
|
exports.mapTaskCommentAuthorFromWire = mapTaskCommentAuthorFromWire;
|
|
45
48
|
exports.mapTaskCommentFromWire = mapTaskCommentFromWire;
|
|
46
49
|
exports.mapEventFromWire = mapEventFromWire;
|
|
50
|
+
exports.mapTimeEntryFromWire = mapTimeEntryFromWire;
|
|
47
51
|
/**
|
|
48
52
|
* True when `key` is an own, enumerable property of `obj` — used by every
|
|
49
53
|
* write mapper below to decide "was this field actually given" as opposed
|
|
@@ -90,6 +94,14 @@ function mapUpdateTaskToWire(input) {
|
|
|
90
94
|
wire.end_date = input.due_date;
|
|
91
95
|
if (hasOwn(input, 'due_time'))
|
|
92
96
|
wire.end_time = input.due_time;
|
|
97
|
+
// Board move + assignee replacement. `column_id -> card_id` is the same
|
|
98
|
+
// rename `mapCreateTaskToWire` performs, and `assignee_ids -> user_ids`
|
|
99
|
+
// matches its `user_ids` too — the two write mappers must agree on these
|
|
100
|
+
// names or a move works on create and silently no-ops on update.
|
|
101
|
+
if (hasOwn(input, 'column_id'))
|
|
102
|
+
wire.card_id = input.column_id;
|
|
103
|
+
if (hasOwn(input, 'assignee_ids'))
|
|
104
|
+
wire.user_ids = input.assignee_ids;
|
|
93
105
|
return wire;
|
|
94
106
|
}
|
|
95
107
|
function mapCreateEventToWire(input) {
|
|
@@ -152,6 +164,35 @@ function mapColumnFromWire(card) {
|
|
|
152
164
|
* key on the wire response is silently dropped rather than leaking through,
|
|
153
165
|
* and so the literal key `card` can never appear anywhere in the output.
|
|
154
166
|
*/
|
|
167
|
+
function mapTaskCoverFromWire(cover) {
|
|
168
|
+
return {
|
|
169
|
+
url: cover.url,
|
|
170
|
+
name: cover.name,
|
|
171
|
+
type: cover.type,
|
|
172
|
+
size: cover.size,
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
function mapTaskAttachmentFromWire(attachment) {
|
|
176
|
+
return {
|
|
177
|
+
id: attachment.id,
|
|
178
|
+
name: attachment.name,
|
|
179
|
+
url: attachment.url,
|
|
180
|
+
type: attachment.type,
|
|
181
|
+
size: attachment.size,
|
|
182
|
+
uploaded_by: attachment.uploaded_by
|
|
183
|
+
? { id: attachment.uploaded_by.id, name: attachment.uploaded_by.name }
|
|
184
|
+
: null,
|
|
185
|
+
created_at: attachment.created_at,
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
function mapTaskActivityFromWire(row) {
|
|
189
|
+
return {
|
|
190
|
+
id: row.id,
|
|
191
|
+
action: row.action,
|
|
192
|
+
actor: row.actor ? { id: row.actor.id, name: row.actor.name } : null,
|
|
193
|
+
occurred_at: row.occurred_at,
|
|
194
|
+
};
|
|
195
|
+
}
|
|
155
196
|
function mapTaskFromWire(task) {
|
|
156
197
|
const column = task.card ? mapColumnFromWire(task.card) : null;
|
|
157
198
|
return {
|
|
@@ -167,6 +208,16 @@ function mapTaskFromWire(task) {
|
|
|
167
208
|
progress: task.progress,
|
|
168
209
|
completed: task.completed,
|
|
169
210
|
assignee_ids: task.assignee_ids,
|
|
211
|
+
// Detail-only fields. `undefined` (the listing) is passed through as
|
|
212
|
+
// undefined so the key is dropped from JSON output entirely, rather than
|
|
213
|
+
// appearing as an explicit null that would read as "this task has no
|
|
214
|
+
// attachments" when the truth is "this view does not report them".
|
|
215
|
+
...(task.cover_image !== undefined
|
|
216
|
+
? { cover_image: task.cover_image ? mapTaskCoverFromWire(task.cover_image) : null }
|
|
217
|
+
: {}),
|
|
218
|
+
...(task.attachments !== undefined
|
|
219
|
+
? { attachments: task.attachments.map(mapTaskAttachmentFromWire) }
|
|
220
|
+
: {}),
|
|
170
221
|
created_at: task.created_at,
|
|
171
222
|
updated_at: task.updated_at,
|
|
172
223
|
};
|
|
@@ -245,4 +296,25 @@ function mapEventFromWire(event) {
|
|
|
245
296
|
updated_at: event.updated_at,
|
|
246
297
|
};
|
|
247
298
|
}
|
|
299
|
+
/**
|
|
300
|
+
* A time entry, field for field. `user` is `{id, name}` only, as everywhere on
|
|
301
|
+
* this surface; `note` is passed through and bounded by the tool that shows it.
|
|
302
|
+
*/
|
|
303
|
+
function mapTimeEntryFromWire(entry) {
|
|
304
|
+
return {
|
|
305
|
+
id: entry.id,
|
|
306
|
+
task_id: entry.task_id,
|
|
307
|
+
project_id: entry.project_id,
|
|
308
|
+
user: entry.user ? { id: entry.user.id, name: entry.user.name } : null,
|
|
309
|
+
started_at: entry.started_at,
|
|
310
|
+
ended_at: entry.ended_at,
|
|
311
|
+
duration_seconds: entry.duration_seconds,
|
|
312
|
+
running: entry.running,
|
|
313
|
+
billable: entry.billable,
|
|
314
|
+
note: entry.note,
|
|
315
|
+
source: entry.source,
|
|
316
|
+
created_at: entry.created_at,
|
|
317
|
+
updated_at: entry.updated_at,
|
|
318
|
+
};
|
|
319
|
+
}
|
|
248
320
|
//# sourceMappingURL=mapping.js.map
|
package/dist/api/mapping.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mapping.js","sourceRoot":"","sources":["../../src/api/mapping.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;;
|
|
1
|
+
{"version":3,"file":"mapping.js","sourceRoot":"","sources":["../../src/api/mapping.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;;AAwEH,kDAaC;AAsCD,kDAiBC;AAuDD,oDAsBC;AAqBD,wDAEC;AAYD,8CAMC;AAWD,oDAOC;AAED,8DAYC;AAED,0DAOC;AAED,0CA6BC;AAeD,gDAQC;AAED,8CAQC;AAOD,4DAOC;AAED,oEAKC;AAED,wDAOC;AAED,4CAgBC;AAMD,oDAgBC;AApZD;;;;;;;;GAQG;AACH,SAAS,MAAM,CAAC,GAAW,EAAE,GAAW;IACtC,OAAO,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AACxD,CAAC;AAgCD,SAAgB,mBAAmB,CAAC,KAAsB;IACxD,MAAM,IAAI,GAA0B,EAAE,UAAU,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC;IAEhE,IAAI,MAAM,CAAC,KAAK,EAAE,WAAW,CAAC;QAAE,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,SAAS,CAAC;IAC/D,IAAI,MAAM,CAAC,KAAK,EAAE,YAAY,CAAC;QAAE,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC;IACpE,IAAI,MAAM,CAAC,KAAK,EAAE,aAAa,CAAC;QAAE,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC;IACvE,IAAI,MAAM,CAAC,KAAK,EAAE,UAAU,CAAC;QAAE,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