@superdurable/connector-clickup 0.1.2 → 0.2.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 +6 -4
- package/dex-connector.json +367 -9
- package/dist/{chunk-PAUZSKGN.js → chunk-PQCNNSDL.js} +35 -13
- package/dist/{connection-BB-IGLLD.d.ts → connection-CIEP4aiP.d.ts} +8 -2
- package/dist/index.d.ts +141 -26
- package/dist/index.js +607 -114
- package/dist/mock.d.ts +1 -1
- package/dist/mock.js +1 -1
- package/package.json +7 -5
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# ClickUp TypeScript connector
|
|
2
2
|
|
|
3
|
-
`@superdurable/connector-clickup` provides
|
|
3
|
+
`@superdurable/connector-clickup` provides seven ClickUp task operations and the signed `taskEvent` webhook Trigger to Dex TypeScript Flows. Operation specific Step factories, model validators, connection contracts, and mock cases are generated from the [manifest](../connector.yaml) and Go model types. The [task event example](examples/task-event/) mounts the durable Trigger endpoint and starts a real Flow for each status change.
|
|
4
4
|
|
|
5
5
|
## Connect
|
|
6
6
|
|
|
7
|
-
Install Node.js 22 or 24 and Dex TypeScript SDK 1.
|
|
7
|
+
Install Node.js 22 or 24 and Dex TypeScript SDK 1.45.4 or later. Create a personal API token at [ClickUp Settings > Apps](https://app.clickup.com/settings/apps) and save it as the private `api_token` in a Dex Web Connection named `clickup-workspace`. Keep it out of Flow input, Attributes, results, and logs. The [runnable example](examples/get-task/) loads that connection at Worker startup. The client resolves the current token before each provider request and sends it as the raw Authorization header.
|
|
8
8
|
|
|
9
9
|
| Step factory | ClickUp API request | Happy branch |
|
|
10
10
|
| --- | --- | --- |
|
|
@@ -16,7 +16,7 @@ Install Node.js 22 or 24 and Dex TypeScript SDK 1.28.0 or later. Create a person
|
|
|
16
16
|
| `newAddCommentStep` | `POST /task/{taskId}/comment` | `added` |
|
|
17
17
|
| `newFindMemberByEmailStep` | `GET /team` | `found` |
|
|
18
18
|
|
|
19
|
-
Unwired optional branches fail the Flow. `createTask` and `addComment`
|
|
19
|
+
Unwired optional branches fail the Flow. `createTask` and `addComment` send behind the SDK single-dispatch fence, whose Dex heartbeat counts each possible send. After an unknown outcome the next attempt reads the write back, by its saved ID or by name or text, and sends again only while possible sends stay within the Step's send cap (three by default); several matches, or no match at the cap, select uncertain. Only HTTP 400, 401, 403, 404, 411, 413, 414, 415, and 422 select a refusal branch. The other mutations repeat safely using absolute changes or tag membership, and retry every other unknown outcome.
|
|
20
20
|
|
|
21
21
|
Task writes reject duplicate assignee or custom field IDs, non-JSON custom field values, and invalid status names before contacting ClickUp. Tags must be unique names of 1–100 UTF-8 bytes without surrounding whitespace, slashes, control characters, or dot segments (`.` and `..`). `updateTaskTags` bounds the entire write and read-back sequence to 25 seconds.
|
|
22
22
|
|
|
@@ -27,4 +27,6 @@ npm ci
|
|
|
27
27
|
npm run check
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
Run `npm run test:integration` against a local `dexcli dev` with `DEX_FLOW_SERVICE_ADDRESS` set. The integration
|
|
30
|
+
Run `npm run test:integration` against a local `dexcli dev` with `DEX_FLOW_SERVICE_ADDRESS` set. The integration tests run the operation example and signed Trigger example through a real Dex Worker and Client. The Go recorded conformance suite checks the provider operation scenarios. Live ClickUp authorization, provider operations, and webhook delivery have not been verified.
|
|
31
|
+
|
|
32
|
+
The `taskEvent` Trigger preserves the spelling of numeric task and history IDs. A positive history user ID outside JavaScript’s safe integer range is represented by a native raw JSON token, including after inbox replay.
|
package/dex-connector.json
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"connectorId": "clickup",
|
|
3
|
-
"releaseTag": "connectors/clickup/go/v0.23.
|
|
3
|
+
"releaseTag": "connectors/clickup/go/v0.23.1",
|
|
4
4
|
"package": {
|
|
5
5
|
"ecosystem": "npm",
|
|
6
6
|
"name": "@superdurable/connector-clickup",
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.2.0"
|
|
8
8
|
},
|
|
9
9
|
"factories": [
|
|
10
10
|
{
|
|
11
11
|
"name": "newSearchTasksStep",
|
|
12
12
|
"kind": "query",
|
|
13
13
|
"operationId": "searchTasks",
|
|
14
|
+
"inputType": "SearchTasksInput",
|
|
15
|
+
"description": "Search one Workspace's tasks by List, Folder, Space, status, assignee, tag, and update time, returning one page of up to 100 tasks and the next page number.",
|
|
14
16
|
"fields": {
|
|
15
17
|
"stepType": "stepType",
|
|
16
18
|
"annotations": "annotations",
|
|
@@ -43,12 +45,104 @@
|
|
|
43
45
|
"field": "defect",
|
|
44
46
|
"optional": true
|
|
45
47
|
}
|
|
46
|
-
]
|
|
48
|
+
],
|
|
49
|
+
"inputSchema": {
|
|
50
|
+
"additionalProperties": false,
|
|
51
|
+
"description": "SearchTasksInput filters one Workspace's tasks. Every non-empty filter narrows the search, and the values of one list filter are alternatives.",
|
|
52
|
+
"properties": {
|
|
53
|
+
"areSubtasksIncluded": {
|
|
54
|
+
"description": "AreSubtasksIncluded also returns subtasks; ClickUp excludes them by default.",
|
|
55
|
+
"type": "boolean"
|
|
56
|
+
},
|
|
57
|
+
"assigneeIds": {
|
|
58
|
+
"description": "AssigneeIDs keeps tasks assigned to any of these user IDs.",
|
|
59
|
+
"items": {
|
|
60
|
+
"type": "integer"
|
|
61
|
+
},
|
|
62
|
+
"type": "array"
|
|
63
|
+
},
|
|
64
|
+
"folderIds": {
|
|
65
|
+
"description": "FolderIDs keeps tasks of Lists in these Folders.",
|
|
66
|
+
"items": {
|
|
67
|
+
"type": "string"
|
|
68
|
+
},
|
|
69
|
+
"type": "array"
|
|
70
|
+
},
|
|
71
|
+
"isClosedIncluded": {
|
|
72
|
+
"description": "IsClosedIncluded also returns tasks in a closed status; ClickUp excludes them by default.",
|
|
73
|
+
"type": "boolean"
|
|
74
|
+
},
|
|
75
|
+
"isReverse": {
|
|
76
|
+
"description": "IsReverse reverses ClickUp's order.",
|
|
77
|
+
"type": "boolean"
|
|
78
|
+
},
|
|
79
|
+
"listIds": {
|
|
80
|
+
"description": "ListIDs keeps tasks of these Lists.",
|
|
81
|
+
"items": {
|
|
82
|
+
"type": "string"
|
|
83
|
+
},
|
|
84
|
+
"type": "array"
|
|
85
|
+
},
|
|
86
|
+
"orderBy": {
|
|
87
|
+
"description": "OrderBy is created, updated, due_date, or id; empty uses ClickUp's default order by creation.",
|
|
88
|
+
"enum": [
|
|
89
|
+
"created",
|
|
90
|
+
"due_date",
|
|
91
|
+
"id",
|
|
92
|
+
"updated"
|
|
93
|
+
],
|
|
94
|
+
"type": "string"
|
|
95
|
+
},
|
|
96
|
+
"page": {
|
|
97
|
+
"description": "Page is the zero-based page to read; continue with SearchTasksOutput.NextPage.",
|
|
98
|
+
"type": "integer"
|
|
99
|
+
},
|
|
100
|
+
"spaceIds": {
|
|
101
|
+
"description": "SpaceIDs keeps tasks of these Spaces.",
|
|
102
|
+
"items": {
|
|
103
|
+
"type": "string"
|
|
104
|
+
},
|
|
105
|
+
"type": "array"
|
|
106
|
+
},
|
|
107
|
+
"statuses": {
|
|
108
|
+
"description": "Statuses keeps tasks in these status names, such as in progress.",
|
|
109
|
+
"items": {
|
|
110
|
+
"type": "string"
|
|
111
|
+
},
|
|
112
|
+
"type": "array"
|
|
113
|
+
},
|
|
114
|
+
"tags": {
|
|
115
|
+
"description": "Tags keeps tasks with any of these tag names.",
|
|
116
|
+
"items": {
|
|
117
|
+
"type": "string"
|
|
118
|
+
},
|
|
119
|
+
"type": "array"
|
|
120
|
+
},
|
|
121
|
+
"updatedAfter": {
|
|
122
|
+
"description": "UpdatedAfter keeps tasks updated after this time, for polling changes since a checkpoint.",
|
|
123
|
+
"format": "date-time",
|
|
124
|
+
"type": [
|
|
125
|
+
"string",
|
|
126
|
+
"null"
|
|
127
|
+
]
|
|
128
|
+
},
|
|
129
|
+
"workspaceId": {
|
|
130
|
+
"description": "WorkspaceID is the Workspace (ClickUp API team) ID, the first number in a ClickUp web address.",
|
|
131
|
+
"type": "string"
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"required": [
|
|
135
|
+
"workspaceId"
|
|
136
|
+
],
|
|
137
|
+
"type": "object"
|
|
138
|
+
}
|
|
47
139
|
},
|
|
48
140
|
{
|
|
49
141
|
"name": "newGetTaskStep",
|
|
50
142
|
"kind": "query",
|
|
51
143
|
"operationId": "getTask",
|
|
144
|
+
"inputType": "GetTaskInput",
|
|
145
|
+
"description": "Read one task by ID or custom task ID with its status, priority, dates, assignees, tags, List, Markdown description, and custom field values.",
|
|
52
146
|
"fields": {
|
|
53
147
|
"stepType": "stepType",
|
|
54
148
|
"annotations": "annotations",
|
|
@@ -81,12 +175,36 @@
|
|
|
81
175
|
"field": "defect",
|
|
82
176
|
"optional": true
|
|
83
177
|
}
|
|
84
|
-
]
|
|
178
|
+
],
|
|
179
|
+
"inputSchema": {
|
|
180
|
+
"additionalProperties": false,
|
|
181
|
+
"description": "GetTaskInput names one task.",
|
|
182
|
+
"properties": {
|
|
183
|
+
"isCustomTaskId": {
|
|
184
|
+
"description": "IsCustomTaskID reads TaskID as the Workspace's custom task ID; it requires WorkspaceID.",
|
|
185
|
+
"type": "boolean"
|
|
186
|
+
},
|
|
187
|
+
"taskId": {
|
|
188
|
+
"description": "TaskID is ClickUp's task ID, the code after /t/ in the task's web address, or a custom task ID such as DEV-123 when IsCustomTaskID is set.",
|
|
189
|
+
"type": "string"
|
|
190
|
+
},
|
|
191
|
+
"workspaceId": {
|
|
192
|
+
"description": "WorkspaceID is the Workspace of a custom task ID; leave it empty for an ordinary task ID.",
|
|
193
|
+
"type": "string"
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
"required": [
|
|
197
|
+
"taskId"
|
|
198
|
+
],
|
|
199
|
+
"type": "object"
|
|
200
|
+
}
|
|
85
201
|
},
|
|
86
202
|
{
|
|
87
203
|
"name": "newCreateTaskStep",
|
|
88
204
|
"kind": "mutation",
|
|
89
205
|
"operationId": "createTask",
|
|
206
|
+
"inputType": "CreateTaskInput",
|
|
207
|
+
"description": "Create one task in a List with a name, Markdown description, status, priority, due time, assignees, tags, parent task, and custom field values. ClickUp has no idempotency key, so the Step runs with sync durability and counts each send in a Dex heartbeat checkpoint. After an unknown outcome the next attempt reads the task back, by ID or among the List's tasks with the same name and parent, and resends only while the send cap allows.",
|
|
90
208
|
"fields": {
|
|
91
209
|
"stepType": "stepType",
|
|
92
210
|
"annotations": "annotations",
|
|
@@ -119,12 +237,108 @@
|
|
|
119
237
|
"field": "defect",
|
|
120
238
|
"optional": true
|
|
121
239
|
}
|
|
122
|
-
]
|
|
240
|
+
],
|
|
241
|
+
"inputSchema": {
|
|
242
|
+
"$defs": {
|
|
243
|
+
"CustomFieldInput": {
|
|
244
|
+
"additionalProperties": false,
|
|
245
|
+
"description": "CustomFieldInput sets one custom field on a new task.",
|
|
246
|
+
"properties": {
|
|
247
|
+
"id": {
|
|
248
|
+
"description": "ID is the custom field's ID, from getTask or ClickUp's Get Accessible Custom Fields.",
|
|
249
|
+
"type": "string"
|
|
250
|
+
},
|
|
251
|
+
"value": {
|
|
252
|
+
"description": "Value is the JSON value ClickUp expects for the field's type, such as \"text\", 5, or an option ID."
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
"required": [
|
|
256
|
+
"id",
|
|
257
|
+
"value"
|
|
258
|
+
],
|
|
259
|
+
"type": "object"
|
|
260
|
+
}
|
|
261
|
+
},
|
|
262
|
+
"additionalProperties": false,
|
|
263
|
+
"description": "CreateTaskInput is one task to create in a List.",
|
|
264
|
+
"properties": {
|
|
265
|
+
"assigneeIds": {
|
|
266
|
+
"description": "AssigneeIDs are the users to assign, such as a findMemberByEmail result's ID.",
|
|
267
|
+
"items": {
|
|
268
|
+
"type": "integer"
|
|
269
|
+
},
|
|
270
|
+
"type": "array"
|
|
271
|
+
},
|
|
272
|
+
"customFields": {
|
|
273
|
+
"description": "CustomFields set custom field values; ClickUp ignores fields that do not apply to the task.",
|
|
274
|
+
"items": {
|
|
275
|
+
"$ref": "#/$defs/CustomFieldInput"
|
|
276
|
+
},
|
|
277
|
+
"type": "array"
|
|
278
|
+
},
|
|
279
|
+
"dueAt": {
|
|
280
|
+
"description": "DueAt is the due date and time; nil sets none.",
|
|
281
|
+
"format": "date-time",
|
|
282
|
+
"type": [
|
|
283
|
+
"string",
|
|
284
|
+
"null"
|
|
285
|
+
]
|
|
286
|
+
},
|
|
287
|
+
"isCreatorNotified": {
|
|
288
|
+
"description": "IsCreatorNotified also notifies the token's user; assignees and watchers are always notified.",
|
|
289
|
+
"type": "boolean"
|
|
290
|
+
},
|
|
291
|
+
"listId": {
|
|
292
|
+
"description": "ListID is the List to create the task in, the number after /li/ in the List's web address.",
|
|
293
|
+
"type": "string"
|
|
294
|
+
},
|
|
295
|
+
"markdownDescription": {
|
|
296
|
+
"description": "MarkdownDescription is the description in Markdown, at most MaxDescriptionBytes; empty sets none.",
|
|
297
|
+
"type": "string"
|
|
298
|
+
},
|
|
299
|
+
"name": {
|
|
300
|
+
"description": "Name is the task name. A retried attempt finds its earlier task by this name, so a name that carries the application's own request key, such as [REQ-1042], makes reconciliation unambiguous.",
|
|
301
|
+
"type": "string"
|
|
302
|
+
},
|
|
303
|
+
"parentTaskId": {
|
|
304
|
+
"description": "ParentTaskID creates a subtask of this task, which must be in the same List; empty creates a task.",
|
|
305
|
+
"type": "string"
|
|
306
|
+
},
|
|
307
|
+
"priority": {
|
|
308
|
+
"description": "Priority is 1 urgent through 4 low; zero sets no priority.",
|
|
309
|
+
"enum": [
|
|
310
|
+
1,
|
|
311
|
+
2,
|
|
312
|
+
3,
|
|
313
|
+
4
|
|
314
|
+
],
|
|
315
|
+
"type": "integer"
|
|
316
|
+
},
|
|
317
|
+
"status": {
|
|
318
|
+
"description": "Status is a status name of the List's workflow, such as in progress; empty uses the List's first status.",
|
|
319
|
+
"type": "string"
|
|
320
|
+
},
|
|
321
|
+
"tags": {
|
|
322
|
+
"description": "Tags are tag names of the List's Space to add.",
|
|
323
|
+
"items": {
|
|
324
|
+
"type": "string"
|
|
325
|
+
},
|
|
326
|
+
"type": "array"
|
|
327
|
+
}
|
|
328
|
+
},
|
|
329
|
+
"required": [
|
|
330
|
+
"listId",
|
|
331
|
+
"name"
|
|
332
|
+
],
|
|
333
|
+
"type": "object"
|
|
334
|
+
}
|
|
123
335
|
},
|
|
124
336
|
{
|
|
125
337
|
"name": "newUpdateTaskStep",
|
|
126
338
|
"kind": "mutation",
|
|
127
339
|
"operationId": "updateTask",
|
|
340
|
+
"inputType": "UpdateTaskInput",
|
|
341
|
+
"description": "Change one task's name, Markdown description, status, priority, or due time, and add or remove assignees; every change is an absolute value or a set membership, so a repeated update leaves the same task.",
|
|
128
342
|
"fields": {
|
|
129
343
|
"stepType": "stepType",
|
|
130
344
|
"annotations": "annotations",
|
|
@@ -157,12 +371,72 @@
|
|
|
157
371
|
"field": "defect",
|
|
158
372
|
"optional": true
|
|
159
373
|
}
|
|
160
|
-
]
|
|
374
|
+
],
|
|
375
|
+
"inputSchema": {
|
|
376
|
+
"additionalProperties": false,
|
|
377
|
+
"description": "UpdateTaskInput changes one task. Only set fields change; every change is an absolute value or a set membership, so a repeated update leaves the same task.",
|
|
378
|
+
"properties": {
|
|
379
|
+
"addAssigneeIds": {
|
|
380
|
+
"description": "AddAssigneeIDs assigns these users; an existing assignee stays assigned.",
|
|
381
|
+
"items": {
|
|
382
|
+
"type": "integer"
|
|
383
|
+
},
|
|
384
|
+
"type": "array"
|
|
385
|
+
},
|
|
386
|
+
"dueAt": {
|
|
387
|
+
"description": "DueAt sets the due date and time; nil keeps it.",
|
|
388
|
+
"format": "date-time",
|
|
389
|
+
"type": [
|
|
390
|
+
"string",
|
|
391
|
+
"null"
|
|
392
|
+
]
|
|
393
|
+
},
|
|
394
|
+
"markdownDescription": {
|
|
395
|
+
"description": "MarkdownDescription replaces the description with Markdown when set; a pointer to \"\" clears it.",
|
|
396
|
+
"type": "string"
|
|
397
|
+
},
|
|
398
|
+
"name": {
|
|
399
|
+
"description": "Name renames the task when set.",
|
|
400
|
+
"type": "string"
|
|
401
|
+
},
|
|
402
|
+
"priority": {
|
|
403
|
+
"description": "Priority sets 1 urgent through 4 low; zero keeps the current priority.",
|
|
404
|
+
"enum": [
|
|
405
|
+
1,
|
|
406
|
+
2,
|
|
407
|
+
3,
|
|
408
|
+
4
|
|
409
|
+
],
|
|
410
|
+
"type": "integer"
|
|
411
|
+
},
|
|
412
|
+
"removeAssigneeIds": {
|
|
413
|
+
"description": "RemoveAssigneeIDs unassigns these users; a user who is not assigned is ignored.",
|
|
414
|
+
"items": {
|
|
415
|
+
"type": "integer"
|
|
416
|
+
},
|
|
417
|
+
"type": "array"
|
|
418
|
+
},
|
|
419
|
+
"status": {
|
|
420
|
+
"description": "Status moves the task to a status name of its List's workflow, such as in progress; empty keeps it.",
|
|
421
|
+
"type": "string"
|
|
422
|
+
},
|
|
423
|
+
"taskId": {
|
|
424
|
+
"description": "TaskID is ClickUp's task ID.",
|
|
425
|
+
"type": "string"
|
|
426
|
+
}
|
|
427
|
+
},
|
|
428
|
+
"required": [
|
|
429
|
+
"taskId"
|
|
430
|
+
],
|
|
431
|
+
"type": "object"
|
|
432
|
+
}
|
|
161
433
|
},
|
|
162
434
|
{
|
|
163
435
|
"name": "newUpdateTaskTagsStep",
|
|
164
436
|
"kind": "mutation",
|
|
165
437
|
"operationId": "updateTaskTags",
|
|
438
|
+
"inputType": "UpdateTaskTagsInput",
|
|
439
|
+
"description": "Add tags to and remove tags from one task, then read the task's tags back; adding a present tag or removing an absent one changes nothing, so a repeated update is safe.",
|
|
166
440
|
"fields": {
|
|
167
441
|
"stepType": "stepType",
|
|
168
442
|
"annotations": "annotations",
|
|
@@ -195,12 +469,42 @@
|
|
|
195
469
|
"field": "defect",
|
|
196
470
|
"optional": true
|
|
197
471
|
}
|
|
198
|
-
]
|
|
472
|
+
],
|
|
473
|
+
"inputSchema": {
|
|
474
|
+
"additionalProperties": false,
|
|
475
|
+
"description": "UpdateTaskTagsInput adds tags to and removes tags from one task.",
|
|
476
|
+
"properties": {
|
|
477
|
+
"addTags": {
|
|
478
|
+
"description": "AddTags are tag names to add; a tag the task already has stays.",
|
|
479
|
+
"items": {
|
|
480
|
+
"type": "string"
|
|
481
|
+
},
|
|
482
|
+
"type": "array"
|
|
483
|
+
},
|
|
484
|
+
"removeTags": {
|
|
485
|
+
"description": "RemoveTags are tag names to remove from the task; the tag stays in the Space.",
|
|
486
|
+
"items": {
|
|
487
|
+
"type": "string"
|
|
488
|
+
},
|
|
489
|
+
"type": "array"
|
|
490
|
+
},
|
|
491
|
+
"taskId": {
|
|
492
|
+
"description": "TaskID is ClickUp's task ID.",
|
|
493
|
+
"type": "string"
|
|
494
|
+
}
|
|
495
|
+
},
|
|
496
|
+
"required": [
|
|
497
|
+
"taskId"
|
|
498
|
+
],
|
|
499
|
+
"type": "object"
|
|
500
|
+
}
|
|
199
501
|
},
|
|
200
502
|
{
|
|
201
503
|
"name": "newAddCommentStep",
|
|
202
504
|
"kind": "mutation",
|
|
203
505
|
"operationId": "addComment",
|
|
506
|
+
"inputType": "AddCommentInput",
|
|
507
|
+
"description": "Add one plain-text comment, authored by the token's user, to a task. ClickUp has no idempotency key, so the Step runs with sync durability and counts each send in a Dex heartbeat checkpoint. After an unknown outcome the next attempt reads the task's comments back, by ID or by text, and resends only while the send cap allows.",
|
|
204
508
|
"fields": {
|
|
205
509
|
"stepType": "stepType",
|
|
206
510
|
"annotations": "annotations",
|
|
@@ -233,12 +537,37 @@
|
|
|
233
537
|
"field": "defect",
|
|
234
538
|
"optional": true
|
|
235
539
|
}
|
|
236
|
-
]
|
|
540
|
+
],
|
|
541
|
+
"inputSchema": {
|
|
542
|
+
"additionalProperties": false,
|
|
543
|
+
"description": "AddCommentInput is one plain-text comment to add to a task.",
|
|
544
|
+
"properties": {
|
|
545
|
+
"isCreatorNotified": {
|
|
546
|
+
"description": "IsCreatorNotified also notifies the token's user; assignees and watchers are always notified.",
|
|
547
|
+
"type": "boolean"
|
|
548
|
+
},
|
|
549
|
+
"taskId": {
|
|
550
|
+
"description": "TaskID is ClickUp's task ID.",
|
|
551
|
+
"type": "string"
|
|
552
|
+
},
|
|
553
|
+
"text": {
|
|
554
|
+
"description": "Text is the comment's plain text, at most MaxCommentBytes; ClickUp shows it as written.",
|
|
555
|
+
"type": "string"
|
|
556
|
+
}
|
|
557
|
+
},
|
|
558
|
+
"required": [
|
|
559
|
+
"taskId",
|
|
560
|
+
"text"
|
|
561
|
+
],
|
|
562
|
+
"type": "object"
|
|
563
|
+
}
|
|
237
564
|
},
|
|
238
565
|
{
|
|
239
566
|
"name": "newFindMemberByEmailStep",
|
|
240
567
|
"kind": "query",
|
|
241
568
|
"operationId": "findMemberByEmail",
|
|
569
|
+
"inputType": "FindMemberByEmailInput",
|
|
570
|
+
"description": "Find the member of one Workspace whose email address equals the given address, returning the numeric user ID that task assignees use.",
|
|
242
571
|
"fields": {
|
|
243
572
|
"stepType": "stepType",
|
|
244
573
|
"annotations": "annotations",
|
|
@@ -271,7 +600,36 @@
|
|
|
271
600
|
"field": "defect",
|
|
272
601
|
"optional": true
|
|
273
602
|
}
|
|
274
|
-
]
|
|
603
|
+
],
|
|
604
|
+
"inputSchema": {
|
|
605
|
+
"additionalProperties": false,
|
|
606
|
+
"description": "FindMemberByEmailInput names one Workspace and one email address.",
|
|
607
|
+
"properties": {
|
|
608
|
+
"email": {
|
|
609
|
+
"description": "Email is one bare email address, compared without regard to case.",
|
|
610
|
+
"type": "string"
|
|
611
|
+
},
|
|
612
|
+
"workspaceId": {
|
|
613
|
+
"description": "WorkspaceID is the Workspace (ClickUp API team) ID, the first number in a ClickUp web address.",
|
|
614
|
+
"type": "string"
|
|
615
|
+
}
|
|
616
|
+
},
|
|
617
|
+
"required": [
|
|
618
|
+
"email",
|
|
619
|
+
"workspaceId"
|
|
620
|
+
],
|
|
621
|
+
"type": "object"
|
|
622
|
+
}
|
|
623
|
+
},
|
|
624
|
+
{
|
|
625
|
+
"name": "defineTaskEventTriggerBinding",
|
|
626
|
+
"kind": "trigger",
|
|
627
|
+
"triggerName": "taskEvent",
|
|
628
|
+
"fields": {
|
|
629
|
+
"connectionName": "connectionName",
|
|
630
|
+
"bindingName": "bindingName",
|
|
631
|
+
"configurationUI": "configurationUI"
|
|
632
|
+
}
|
|
275
633
|
}
|
|
276
634
|
]
|
|
277
635
|
}
|
|
@@ -28,15 +28,29 @@ var ConfigSchema = z.object({
|
|
|
28
28
|
"maxResponseBytes": z.number().int().optional(),
|
|
29
29
|
"webhookMaxBodyBytes": z.number().int().optional()
|
|
30
30
|
});
|
|
31
|
+
var CredentialMaterialError = class extends TypeError {
|
|
32
|
+
constructor(message) {
|
|
33
|
+
super(message);
|
|
34
|
+
this.name = "CredentialMaterialError";
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
var sdkCredentialDecodingFailureMessages = /* @__PURE__ */ new Set([
|
|
38
|
+
"project credential decoding failed",
|
|
39
|
+
"shared project credential decoding failed",
|
|
40
|
+
"project credential decoding failed: this connector version does not support shared credentials"
|
|
41
|
+
]);
|
|
42
|
+
function isCredentialMaterialError(error) {
|
|
43
|
+
return error instanceof CredentialMaterialError || error instanceof TypeError && sdkCredentialDecodingFailureMessages.has(error.message);
|
|
44
|
+
}
|
|
31
45
|
function decodeCredentials(value) {
|
|
32
|
-
if (!value || typeof value !== "object" || Array.isArray(value)) throw new
|
|
46
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) throw new CredentialMaterialError("credential fields are invalid");
|
|
33
47
|
const fields = value;
|
|
34
48
|
const allowed = /* @__PURE__ */ new Set(["api_token", "webhook_secret"]);
|
|
35
|
-
if (Object.keys(fields).some((key) => !allowed.has(key))) throw new
|
|
36
|
-
if (fields["api_token"] != null && !(typeof fields["api_token"] === "string")) throw new
|
|
37
|
-
if (fields["webhook_secret"] != null && !(typeof fields["webhook_secret"] === "string")) throw new
|
|
49
|
+
if (Object.keys(fields).some((key) => !allowed.has(key))) throw new CredentialMaterialError("stored credential does not match the connector credential fields");
|
|
50
|
+
if (fields["api_token"] != null && !(typeof fields["api_token"] === "string")) throw new CredentialMaterialError("credential api_token has an invalid type");
|
|
51
|
+
if (fields["webhook_secret"] != null && !(typeof fields["webhook_secret"] === "string")) throw new CredentialMaterialError("credential webhook_secret has an invalid type");
|
|
38
52
|
const credentials = {};
|
|
39
|
-
if (!fields["api_token"]) throw new
|
|
53
|
+
if (!fields["api_token"]) throw new CredentialMaterialError("credential api_token is required");
|
|
40
54
|
credentials.apiToken = new SecretString(fields["api_token"] ?? "");
|
|
41
55
|
credentials.webhookSecret = new SecretString(fields["webhook_secret"] ?? "");
|
|
42
56
|
return credentials;
|
|
@@ -245,10 +259,12 @@ var CreateTaskDefinition = {
|
|
|
245
259
|
{ id: "created", description: "ClickUp created the task; a retried attempt that found its own earlier task in the List reports it instead of creating another." },
|
|
246
260
|
{ id: "notFound", description: "The List does not exist or the connection cannot see it; nothing was created.", optional: true },
|
|
247
261
|
{ id: "providerRejected", description: "ClickUp conclusively rejected the task, such as an unknown status, assignee, or custom field value, or missing permission; nothing was created.", optional: true },
|
|
248
|
-
{ id: "uncertain", description: "
|
|
262
|
+
{ id: "uncertain", description: "Earlier attempts sent the create up to the send cap, ClickUp accepted it without a usable task ID, or read-back after a possible send cannot confirm a single matching task, including a List that is now missing, so the task may exist; the connector does not send it again.", optional: true },
|
|
249
263
|
{ id: "defect", description: "Local input, connection configuration, or connector definition is invalid.", optional: true }
|
|
250
264
|
],
|
|
251
|
-
stepDefaults: { executeMethodTimeoutMs: 3e4, executeDurability: "sync", executeRetry: { initialIntervalMs: 1e3, backoffCoefficient: 2, maximumIntervalMs: 6e4, maximumAttempts: 5, totalDurationMs: 3e5 } }
|
|
265
|
+
stepDefaults: { executeMethodTimeoutMs: 3e4, executeDurability: "sync", executeRetry: { initialIntervalMs: 1e3, backoffCoefficient: 2, maximumIntervalMs: 6e4, maximumAttempts: 5, totalDurationMs: 3e5 } },
|
|
266
|
+
repeatOnUnknown: "limited",
|
|
267
|
+
maxSends: 3
|
|
252
268
|
};
|
|
253
269
|
var CreateTaskMetadata = { kind: "mutation", idempotency: "required", authorization: "required" };
|
|
254
270
|
var UpdateTaskBranch = {
|
|
@@ -269,10 +285,11 @@ var UpdateTaskDefinition = {
|
|
|
269
285
|
{ id: "updated", description: "ClickUp applied every requested change, including when the task already had those values, and the Value holds the task it returned." },
|
|
270
286
|
{ id: "notFound", description: "The task does not exist or the connection cannot see it.", optional: true },
|
|
271
287
|
{ id: "providerRejected", description: "ClickUp conclusively rejected the change, such as a status that is not in the task's List or missing permission.", optional: true },
|
|
272
|
-
{ id: "invalidResponse", description: "
|
|
288
|
+
{ id: "invalidResponse", description: "Kept for compatibility and no longer selected: the update is safe to repeat, so an invalid or oversized task after the update retries.", optional: true },
|
|
273
289
|
{ id: "defect", description: "Local input, connection configuration, or connector definition is invalid.", optional: true }
|
|
274
290
|
],
|
|
275
|
-
stepDefaults: { executeMethodTimeoutMs: 3e4, executeDurability: "async" }
|
|
291
|
+
stepDefaults: { executeMethodTimeoutMs: 3e4, executeDurability: "async" },
|
|
292
|
+
repeatOnUnknown: "safe"
|
|
276
293
|
};
|
|
277
294
|
var UpdateTaskMetadata = { kind: "mutation", idempotency: "required", authorization: "required" };
|
|
278
295
|
var UpdateTaskTagsBranch = {
|
|
@@ -293,10 +310,11 @@ var UpdateTaskTagsDefinition = {
|
|
|
293
310
|
{ id: "updated", description: "ClickUp applied every tag change, and the Value holds the task's tags read back." },
|
|
294
311
|
{ id: "notFound", description: "The task does not exist or the connection cannot see it.", optional: true },
|
|
295
312
|
{ id: "providerRejected", description: "ClickUp conclusively rejected a tag change, such as missing permission; earlier changes in the same Step may have been applied.", optional: true },
|
|
296
|
-
{ id: "invalidResponse", description: "
|
|
313
|
+
{ id: "invalidResponse", description: "Kept for compatibility and no longer selected: the tag changes are safe to repeat, so an invalid or oversized task read back retries.", optional: true },
|
|
297
314
|
{ id: "defect", description: "Local input, connection configuration, or connector definition is invalid.", optional: true }
|
|
298
315
|
],
|
|
299
|
-
stepDefaults: { executeMethodTimeoutMs: 3e4, executeDurability: "async" }
|
|
316
|
+
stepDefaults: { executeMethodTimeoutMs: 3e4, executeDurability: "async" },
|
|
317
|
+
repeatOnUnknown: "safe"
|
|
300
318
|
};
|
|
301
319
|
var UpdateTaskTagsMetadata = { kind: "mutation", idempotency: "required", authorization: "required" };
|
|
302
320
|
var AddCommentBranch = {
|
|
@@ -317,10 +335,12 @@ var AddCommentDefinition = {
|
|
|
317
335
|
{ id: "added", description: "The comment is on the task; a retried attempt that found its own earlier comment reports it instead of adding another." },
|
|
318
336
|
{ id: "notFound", description: "The task does not exist or the connection cannot see it; nothing was added.", optional: true },
|
|
319
337
|
{ id: "providerRejected", description: "ClickUp conclusively rejected the comment, such as missing permission; nothing was added.", optional: true },
|
|
320
|
-
{ id: "uncertain", description: "
|
|
338
|
+
{ id: "uncertain", description: "Earlier attempts sent the comment up to the send cap, ClickUp accepted it without a usable comment ID, or read-back after a possible send cannot confirm a single matching comment, including a task that is now missing, so the comment may exist; the connector does not send it again.", optional: true },
|
|
321
339
|
{ id: "defect", description: "Local input, connection configuration, or connector definition is invalid.", optional: true }
|
|
322
340
|
],
|
|
323
|
-
stepDefaults: { executeMethodTimeoutMs: 3e4, executeDurability: "sync", executeRetry: { initialIntervalMs: 1e3, backoffCoefficient: 2, maximumIntervalMs: 6e4, maximumAttempts: 5, totalDurationMs: 3e5 } }
|
|
341
|
+
stepDefaults: { executeMethodTimeoutMs: 3e4, executeDurability: "sync", executeRetry: { initialIntervalMs: 1e3, backoffCoefficient: 2, maximumIntervalMs: 6e4, maximumAttempts: 5, totalDurationMs: 3e5 } },
|
|
342
|
+
repeatOnUnknown: "limited",
|
|
343
|
+
maxSends: 3
|
|
324
344
|
};
|
|
325
345
|
var AddCommentMetadata = { kind: "mutation", idempotency: "required", authorization: "required" };
|
|
326
346
|
var FindMemberByEmailBranch = {
|
|
@@ -380,6 +400,8 @@ function newProjectConnection(project, connectionName, createClient) {
|
|
|
380
400
|
|
|
381
401
|
export {
|
|
382
402
|
ConfigSchema,
|
|
403
|
+
CredentialMaterialError,
|
|
404
|
+
isCredentialMaterialError,
|
|
383
405
|
decodeCredentials,
|
|
384
406
|
SearchTasksInputSchema,
|
|
385
407
|
TaskStatusSchema,
|
|
@@ -20,6 +20,12 @@ interface Credentials {
|
|
|
20
20
|
/** Secret signing secret of the ClickUp webhook that delivers task events to this connection, returned once as webhook.secret by Create Webhook (POST https://api.clickup.com/api/v2/team/{team_id}/webhook, documented at https://developer.clickup.com/reference/createwebhook). It is an opaque string of letters and digits, stored only in this credential field and never sent to ClickUp; the taskEvent Trigger checks each request's X-Signature, a hex HMAC-SHA256 of the body, with it. Leave it blank when no Flow uses the taskEvent Trigger; while it is blank, the webhook endpoint answers 503. */
|
|
21
21
|
webhookSecret?: SecretString;
|
|
22
22
|
}
|
|
23
|
+
/** Stored credential material that fails the connector credential checks, so no retry can succeed. */
|
|
24
|
+
declare class CredentialMaterialError extends TypeError {
|
|
25
|
+
constructor(message: string);
|
|
26
|
+
}
|
|
27
|
+
/** Report malformed stored credential material, also behind the SDK provider's decoding TypeError. */
|
|
28
|
+
declare function isCredentialMaterialError(error: unknown): boolean;
|
|
23
29
|
/** Decode private credential fields for the connector. */
|
|
24
30
|
declare function decodeCredentials(value: unknown): Credentials;
|
|
25
31
|
/** Host-owned source of private connector credentials. */
|
|
@@ -194,7 +200,7 @@ interface CreateTaskOutput {
|
|
|
194
200
|
/** Task is the task ClickUp created, or empty on every branch except created. */
|
|
195
201
|
"task": Task;
|
|
196
202
|
/** WasAlreadyApplied reports that an earlier attempt of this Step created the task without a
|
|
197
|
-
* confirmed outcome and this attempt
|
|
203
|
+
* confirmed outcome and this attempt read it back, so nothing was sent again. */
|
|
198
204
|
"wasAlreadyApplied"?: boolean | undefined;
|
|
199
205
|
}
|
|
200
206
|
/** UpdateTaskInput changes one task. Only set fields change; every change is an absolute value or a set
|
|
@@ -602,4 +608,4 @@ declare function newConnection(client: Operations, reference: ConnectionRef): Co
|
|
|
602
608
|
/** Bind scripted operations to a named connection. */
|
|
603
609
|
declare function newConnectionWithOperations(operations: Operations, reference: ConnectionRef): Connection;
|
|
604
610
|
|
|
605
|
-
export { type AddCommentInput as A,
|
|
611
|
+
export { type AddCommentInput as A, type TaskStatus as B, Connection as C, TaskStatusSchema as D, UpdateTaskInputSchema as E, type FindMemberByEmailInput as F, type GetTaskInput as G, UpdateTaskOutputSchema as H, UpdateTaskTagsInputSchema as I, UpdateTaskTagsOutputSchema as J, type User as K, UserSchema as L, type Member as M, decodeCredentials as N, type Operations as O, isCredentialMaterialError as P, newConnection as Q, newConnectionWithOperations as R, type SearchTasksInput as S, type Task as T, type UpdateTaskInput as U, type AddCommentOutput as a, type CreateTaskInput as b, type CreateTaskOutput as c, type SearchTasksOutput as d, type UpdateTaskOutput as e, type UpdateTaskTagsInput as f, type UpdateTaskTagsOutput as g, type Credentials as h, type Config as i, AddCommentInputSchema as j, AddCommentOutputSchema as k, ConfigSchema as l, CreateTaskInputSchema as m, CreateTaskOutputSchema as n, CredentialMaterialError as o, type CredentialSource as p, type CustomFieldInput as q, CustomFieldInputSchema as r, type CustomFieldValue as s, CustomFieldValueSchema as t, FindMemberByEmailInputSchema as u, GetTaskInputSchema as v, MemberSchema as w, SearchTasksInputSchema as x, SearchTasksOutputSchema as y, TaskSchema as z };
|